@fileverse-dev/dsheet 2.0.36-rtc-5 → 2.0.36-rtc-6
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.
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
var Hg = Object.defineProperty;
|
|
2
2
|
var Fg = (e, t, n) => t in e ? Hg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ae = (e, t, n) => Fg(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import hn, { useRef as je, useContext as lt, useState as Ie, useMemo as at, useEffect as Se, useCallback as Ee, useLayoutEffect as vn, forwardRef as
|
|
5
|
-
import { g as Oi, a as De, b as Ht, r as Ft, d as Qn, s as Ta, h as Te, i as mi, j as pi, l as ht, k as Ug, m as Tl, n as Yr, o as Qt, p as qt, q as kr, t as J0, u as Mt, v as em, w as mt, x as tm, y as
|
|
4
|
+
import hn, { useRef as je, useContext as lt, useState as Ie, useMemo as at, useEffect as Se, useCallback as Ee, useLayoutEffect as vn, forwardRef as Rf, createElement as ku, useImperativeHandle as Pg, createContext as Bg } from "react";
|
|
5
|
+
import { g as Oi, a as De, b as Ht, r as Ft, d as Qn, s as Ta, h as Te, i as mi, j as pi, l as ht, k as Ug, m as Tl, n as Yr, o as Qt, p as qt, q as kr, t as J0, u as Mt, v as em, w as mt, x as tm, y as Nc, z as If, A as nm, B as _r, C as Bo, D as Ro, E as om, F as rm, G as sm, H as jf, I as po, J as Or, K as zg, L as Vg, M as Hi, N as Df, O as Dn, P as La, Q as $g, R as Tn, S as Wg, T as Ll, U as Af, V as im, W as Zl, X as wr, Y as lm, Z as Yg, _ as sn, $ as $n, a0 as Kg, a1 as am, a2 as Fi, a3 as go, a4 as Xt, a5 as qg, a6 as xn, a7 as Rs, a8 as Is, a9 as rl, aa as Tc, ab as fr, ac as Ma, ad as _u, ae as cm, af as cs, ag as Gl, ah as Zg, ai as Pi, aj as Gg, ak as Oa, al as Bi, am as sl, an as il, ao as Tt, ap as So, aq as ln, ar as ro, as as dr, at as Uo, au as Xd, av as Xg, aw as Ha, ax as Ui, ay as Qd, az as Qg, aA as um, aB as zi, aC as Jg, aD as Wo, aE as an, aF as zn, aG as Ur, aH as e5, aI as xr, aJ as t5, aK as Sn, aL as sr, aM as n5, aN as fm, aO as Nf, aP as dm, aQ as hm, aR as mm, aS as pm, aT as gm, aU as ym, aV as wm, aW as Tf, aX as gi, aY as ms, aZ as vm, a_ as o5, a$ as bm, b0 as Lc, b1 as r5, b2 as s5, b3 as i5, b4 as l5, b5 as Jn, b6 as en, b7 as ps, b8 as yi, b9 as a5, ba as gs, bb as Xl, bc as Xn, bd as vr, be as Fa, bf as Ql, bg as Xr, bh as c5, bi as u5, bj as Lf, bk as zr, bl as qn, bm as Pa, bn as Ba, bo as Cm, bp as rr, bq as ll, br as f5, bs as d5, bt as Yo, bu as Ua, bv as mn, bw as Gt, bx as km, by as _m, bz as Vr, bA as za, bB as h5, bC as m5, bD as p5, bE as g5, bF as y5, bG as xm, bH as Sm, bI as Nr, bJ as w5, bK as Em, bL as Rm, bM as Im, bN as jm, bO as Dm, bP as Mf, bQ as Va, bR as Zn, bS as v5, bT as Am, bU as hr, bV as zo, bW as mr, bX as pr, bY as Ml, bZ as b5, b_ as Nm, b$ as C5, c0 as Of, c1 as Tm, c2 as k5, c3 as Lm, c4 as Mm, c5 as Om, c6 as xu, c7 as Hm, c8 as Fm, c9 as _5, ca as Su, cb as Pm, cc as Io, cd as x5, ce as Hf, cf as Bm, cg as S5, ch as Jl, ci as E5, cj as Um, ck as zm, cl as Ho, cm as Vm, cn as $m, co as R5, cp as wi, cq as Eu, cr as Ff, cs as Pf, ct as Bf, cu as Wm, cv as Ym, cw as Km, cx as I5, cy as j5, cz as vi, cA as bi, cB as qm, cC as Ru, c as ir, cD as D5, e as $a, f as Vi, cE as A5, cF as N5, cG as Jd, cH as e1, cI as t1, cJ as n1, cK as T5, cL as L5, cM as o1 } from "./executeStringFunction-F9mb-SpN.js";
|
|
6
6
|
import * as He from "yjs";
|
|
7
|
-
import { p as
|
|
7
|
+
import { p as Iu, E as M5, C as Mc, a as r1, D as Zm, H as O5, b as H5, T as F5 } from "./constants-yStXQJiK.js";
|
|
8
8
|
import { IndexeddbPersistence as P5 } from "y-indexeddb";
|
|
9
|
-
import Un, { applyPatches as
|
|
9
|
+
import Un, { applyPatches as ju, produceWithPatches as B5, enablePatches as U5, isDraft as z5, current as V5 } from "immer";
|
|
10
10
|
import V, { isObject as Gm } from "lodash";
|
|
11
11
|
import Ue from "dayjs";
|
|
12
|
-
import { Tooltip as An, LucideIcon as We, cn as pn, TextField as Pt, Button as dt, DatePicker as $5, IconButton as xt, Select as eo, SelectTrigger as to, SelectValue as no, SelectContent as oo, SelectItem as Lt, Checkbox as Fo, Divider as Ci, Table as W5, TableHeader as Y5, TableRow as s1, TableHead as
|
|
12
|
+
import { Tooltip as An, LucideIcon as We, cn as pn, TextField as Pt, Button as dt, DatePicker as $5, IconButton as xt, Select as eo, SelectTrigger as to, SelectValue as no, SelectContent as oo, SelectItem as Lt, Checkbox as Fo, Divider as Ci, Table as W5, TableHeader as Y5, TableRow as s1, TableHead as Oc, TableBody as K5, TableCell as Hc, Popover as Ko, PopoverTrigger as qo, PopoverContent as Zo, SelectGroup as i1, SelectLabel as l1, Command as q5, CommandInput as Z5, CommandList as G5, CommandEmpty as X5, CommandGroup as Q5, CommandItem as J5, RadioGroup as Xm, RadioGroupItem as ea, Label as ta, DynamicModal as ey } from "@fileverse/ui";
|
|
13
13
|
import { createPortal as Qm } from "react-dom";
|
|
14
14
|
import { S as ty } from "./crypto-constants-CqpCRs86.js";
|
|
15
15
|
import al from "@tippyjs/react";
|
|
16
16
|
import ny from "papaparse";
|
|
17
17
|
import "@fileverse-dev/formulajs";
|
|
18
|
-
var
|
|
18
|
+
var Du = { exports: {} }, Vs = {};
|
|
19
19
|
/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
@@ -639,8 +639,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
639
639
|
$s.Fragment = o, $s.jsx = Wt, $s.jsxs = Zt;
|
|
640
640
|
}()), $s;
|
|
641
641
|
}
|
|
642
|
-
process.env.NODE_ENV === "production" ?
|
|
643
|
-
var u =
|
|
642
|
+
process.env.NODE_ENV === "production" ? Du.exports = oy() : Du.exports = ry();
|
|
643
|
+
var u = Du.exports, Jm = { exports: {} };
|
|
644
644
|
/*!
|
|
645
645
|
Copyright (c) 2018 Jed Watson.
|
|
646
646
|
Licensed under the MIT License (MIT), see
|
|
@@ -788,15 +788,15 @@ function hy(e) {
|
|
|
788
788
|
return typeof e == "string" && dy.test(e);
|
|
789
789
|
}
|
|
790
790
|
var _n = [];
|
|
791
|
-
for (var
|
|
792
|
-
_n.push((
|
|
791
|
+
for (var Fc = 0; Fc < 256; ++Fc)
|
|
792
|
+
_n.push((Fc + 256).toString(16).substr(1));
|
|
793
793
|
function my(e) {
|
|
794
794
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = (_n[e[t + 0]] + _n[e[t + 1]] + _n[e[t + 2]] + _n[e[t + 3]] + "-" + _n[e[t + 4]] + _n[e[t + 5]] + "-" + _n[e[t + 6]] + _n[e[t + 7]] + "-" + _n[e[t + 8]] + _n[e[t + 9]] + "-" + _n[e[t + 10]] + _n[e[t + 11]] + _n[e[t + 12]] + _n[e[t + 13]] + _n[e[t + 14]] + _n[e[t + 15]]).toLowerCase();
|
|
795
795
|
if (!hy(n))
|
|
796
796
|
throw TypeError("Stringified UUID is invalid");
|
|
797
797
|
return n;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Uf(e, t, n) {
|
|
800
800
|
e = e || {};
|
|
801
801
|
var o = e.random || (e.rng || fy)();
|
|
802
802
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, my(o);
|
|
@@ -833,7 +833,7 @@ function py(e, t) {
|
|
|
833
833
|
function tp(e) {
|
|
834
834
|
return e.luckysheetfile;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function zf(e, t, n) {
|
|
837
837
|
const { celldata: o, row: r, column: s } = n, a = V.maxBy(o, "r"), i = V.maxBy(o, "c");
|
|
838
838
|
let l = ((a == null ? void 0 : a.r) ?? 0) + 1, f = ((i == null ? void 0 : i.c) ?? 0) + 1;
|
|
839
839
|
if (r != null && s != null && r > 0 && s > 0 ? (l = Math.max(l, r), f = Math.max(f, s)) : (l = Math.max(l, e.defaultrowNum), f = Math.max(f, e.defaultcolumnNum)), l && f) {
|
|
@@ -886,10 +886,10 @@ function gy(e, t) {
|
|
|
886
886
|
function rp(e, t) {
|
|
887
887
|
var c, d, h, p, m;
|
|
888
888
|
const n = De(e, t), o = e.luckysheetfile[n].order + 1, r = gy(e, t), s = V.cloneDeep(e.luckysheetfile[n]);
|
|
889
|
-
delete s.id, delete s.status, s.celldata = pi(s.data), delete s.data,
|
|
889
|
+
delete s.id, delete s.status, s.celldata = pi(s.data), delete s.data, dd(
|
|
890
890
|
e,
|
|
891
891
|
void 0,
|
|
892
|
-
|
|
892
|
+
Uf(),
|
|
893
893
|
e.luckysheetfile[n].isPivotTable,
|
|
894
894
|
r,
|
|
895
895
|
s
|
|
@@ -1015,7 +1015,7 @@ function Wa(e, t, n = void 0, o = !1, r = void 0, s = void 0) {
|
|
|
1015
1015
|
isPivotTable: !!o,
|
|
1016
1016
|
zoomRatio: 1
|
|
1017
1017
|
} : s;
|
|
1018
|
-
r !== void 0 && (f.name = r), f.id === void 0 && (f.id =
|
|
1018
|
+
r !== void 0 && (f.name = r), f.id === void 0 && (f.id = Uf()), ((d = (c = e.hooks).beforeAddSheet) == null ? void 0 : d.call(c, f)) !== !1 && (e.luckysheetfile.push(f), e.hooks.afterAddSheet && ((p = (h = e.hooks).afterAddSheet) == null || p.call(h, { ...f })));
|
|
1019
1019
|
}
|
|
1020
1020
|
function Ya(e, t) {
|
|
1021
1021
|
var o, r, s, a, i;
|
|
@@ -1046,7 +1046,7 @@ function wy(e, t) {
|
|
|
1046
1046
|
for (let d = 0; d < o[c].length; d += 1)
|
|
1047
1047
|
f[c][d] = o[c][d];
|
|
1048
1048
|
n.data = f, e.luckysheetfile[a] == null ? e.luckysheetfile.push(n) : e.luckysheetfile[a] = n;
|
|
1049
|
-
} else n.celldata != null &&
|
|
1049
|
+
} else n.celldata != null && zf(e, a, n);
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
function lp(e, t) {
|
|
@@ -1102,7 +1102,7 @@ function vy(e) {
|
|
|
1102
1102
|
return e == null ? !1 : Tl(e.ct) || !V.isEmpty(e.v) || e.f != null || // @ts-ignore
|
|
1103
1103
|
e.s != null || e.ct && ((t = e.ct.s) == null ? void 0 : t.length);
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Au(e) {
|
|
1106
1106
|
var n, o;
|
|
1107
1107
|
const t = Te(e);
|
|
1108
1108
|
if (!t || !((n = e.luckysheet_select_save) != null && n.length)) return !1;
|
|
@@ -1304,7 +1304,7 @@ function up(e, t, n, o, r) {
|
|
|
1304
1304
|
const p = kr(e, s, d, h);
|
|
1305
1305
|
return p && ([, , d] = p.row, [, , h] = p.column), { r: d, c: h };
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Vf(e) {
|
|
1308
1308
|
return e == null ? [] : Array.isArray(e) ? e.filter(
|
|
1309
1309
|
(t) => t && typeof t == "object" && t.linkType && t.linkAddress
|
|
1310
1310
|
) : typeof e == "object" && e.linkType && e.linkAddress ? [e] : [];
|
|
@@ -1331,7 +1331,7 @@ function js(e, t, n) {
|
|
|
1331
1331
|
var a, i, l;
|
|
1332
1332
|
const o = De(e, e.currentSheetId);
|
|
1333
1333
|
if (o == null) return [];
|
|
1334
|
-
const r = (a = e.luckysheetfile[o].hyperlink) == null ? void 0 : a[`${t}_${n}`], s =
|
|
1334
|
+
const r = (a = e.luckysheetfile[o].hyperlink) == null ? void 0 : a[`${t}_${n}`], s = Vf(r);
|
|
1335
1335
|
return s.length > 0 ? s : Yr(
|
|
1336
1336
|
((l = (i = Te(e)) == null ? void 0 : i[t]) == null ? void 0 : l[n]) ?? void 0
|
|
1337
1337
|
);
|
|
@@ -1339,11 +1339,11 @@ function js(e, t, n) {
|
|
|
1339
1339
|
function ra(e, t, n) {
|
|
1340
1340
|
return js(e, t, n)[0];
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function $f(e, t) {
|
|
1343
1343
|
var n;
|
|
1344
1344
|
return ((n = e == null ? void 0 : e.ct) == null ? void 0 : n.t) !== "inlineStr" || !Array.isArray(e.ct.s) ? "" : e.ct.s.filter((o) => o.link && Vo(o.link, t)).map((o) => o.v ?? "").join("");
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function Wf(e) {
|
|
1347
1347
|
return (e ?? "").replace(/\r\n/g, `
|
|
1348
1348
|
`).replace(/\r/g, `
|
|
1349
1349
|
`);
|
|
@@ -1354,7 +1354,7 @@ function by(e, t) {
|
|
|
1354
1354
|
return;
|
|
1355
1355
|
let n = 0, o, r;
|
|
1356
1356
|
for (const a of e.ct.s) {
|
|
1357
|
-
const l =
|
|
1357
|
+
const l = Wf(a == null ? void 0 : a.v).length;
|
|
1358
1358
|
if ((a == null ? void 0 : a.link) && Vo(a.link, t))
|
|
1359
1359
|
o == null && (o = n), r = n + l;
|
|
1360
1360
|
else if (o != null)
|
|
@@ -1370,7 +1370,7 @@ function dp(e, t, n) {
|
|
|
1370
1370
|
return;
|
|
1371
1371
|
let o = 0, r;
|
|
1372
1372
|
for (const l of e.ct.s) {
|
|
1373
|
-
const c =
|
|
1373
|
+
const c = Wf(l == null ? void 0 : l.v).length, d = o + c, h = Math.max(t, o), p = Math.min(n, d);
|
|
1374
1374
|
if (h < p) {
|
|
1375
1375
|
if (!((a = l == null ? void 0 : l.link) != null && a.linkType) || !((i = l == null ? void 0 : l.link) != null && i.linkAddress)) return;
|
|
1376
1376
|
if (r == null)
|
|
@@ -1388,7 +1388,7 @@ function hp(e, t) {
|
|
|
1388
1388
|
return;
|
|
1389
1389
|
let n = 0;
|
|
1390
1390
|
for (const a of e.ct.s) {
|
|
1391
|
-
const l =
|
|
1391
|
+
const l = Wf(a == null ? void 0 : a.v).length;
|
|
1392
1392
|
if (l > 0 && t >= n && t < n + l)
|
|
1393
1393
|
return (r = a == null ? void 0 : a.link) != null && r.linkType && ((s = a == null ? void 0 : a.link) != null && s.linkAddress) ? a.link : void 0;
|
|
1394
1394
|
n += l;
|
|
@@ -1521,7 +1521,7 @@ function Kr(e, t, n, o, r, s, a) {
|
|
|
1521
1521
|
g.innerText ?? g.textContent ?? ""
|
|
1522
1522
|
), R = Math.max(0, Math.min(b.start, C.length)), x = Math.max(R, Math.min(b.end, C.length)), P = C.slice(R, x), q = E.length > 0 && E !== P, J = typeof ((d = e.linkCard) == null ? void 0 : d.linkInsertOffset) == "number" ? e.linkCard.linkInsertOffset : x, W = Math.max(0, Math.min(J, C.length));
|
|
1523
1523
|
if (g.focus({ preventScroll: !0 }), q) {
|
|
1524
|
-
|
|
1524
|
+
Nc(g, W, W), document.execCommand(
|
|
1525
1525
|
"insertText",
|
|
1526
1526
|
!1,
|
|
1527
1527
|
E.replace(/\r\n/g, `
|
|
@@ -1529,12 +1529,12 @@ function Kr(e, t, n, o, r, s, a) {
|
|
|
1529
1529
|
`)
|
|
1530
1530
|
);
|
|
1531
1531
|
const S = E.length;
|
|
1532
|
-
|
|
1532
|
+
Nc(g, W, W + S);
|
|
1533
1533
|
} else
|
|
1534
|
-
|
|
1534
|
+
Nc(g, b.start, b.end);
|
|
1535
1535
|
} else
|
|
1536
1536
|
g.focus({ preventScroll: !0 });
|
|
1537
|
-
|
|
1537
|
+
If(g, r, s);
|
|
1538
1538
|
const v = m.fs || 10;
|
|
1539
1539
|
m.ct || (m.ct = { fa: "General", tb: "1" }), m.ct.t = "inlineStr", m.ct.s = nm(
|
|
1540
1540
|
a.cellInput.querySelectorAll("span"),
|
|
@@ -1566,7 +1566,7 @@ function Kr(e, t, n, o, r, s, a) {
|
|
|
1566
1566
|
]));
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Yf(e, t, n) {
|
|
1570
1570
|
var i, l, f, c;
|
|
1571
1571
|
if (!mt(e)) return;
|
|
1572
1572
|
const r = De(e, e.currentSheetId), s = Te(e);
|
|
@@ -1614,10 +1614,10 @@ function mp(e, t, n, o) {
|
|
|
1614
1614
|
vs(i, t, n, g), qa(e, t, n, f, i), _i(e, t, n);
|
|
1615
1615
|
return;
|
|
1616
1616
|
}
|
|
1617
|
-
const c =
|
|
1617
|
+
const c = Vf((p = i.hyperlink) == null ? void 0 : p[l]), d = c.filter((g) => !Vo(g, o));
|
|
1618
1618
|
if (d.length !== c.length) {
|
|
1619
1619
|
if (d.length === 0) {
|
|
1620
|
-
|
|
1620
|
+
Yf(e, t, n);
|
|
1621
1621
|
return;
|
|
1622
1622
|
}
|
|
1623
1623
|
vs(i, t, n, d), (m = e == null ? void 0 : e.hooks) != null && m.updateCellYdoc && e.hooks.updateCellYdoc([
|
|
@@ -1647,7 +1647,7 @@ function pp(e, t, n, o, r, s, a) {
|
|
|
1647
1647
|
vs(c, t, n, k), qa(e, t, n, h, c), _i(e, t, n);
|
|
1648
1648
|
return;
|
|
1649
1649
|
}
|
|
1650
|
-
const p =
|
|
1650
|
+
const p = Vf((E = c.hyperlink) == null ? void 0 : E[d]), m = p.findIndex((v) => Vo(v, o));
|
|
1651
1651
|
if (m < 0) return;
|
|
1652
1652
|
const g = [...p];
|
|
1653
1653
|
if (g[m] = { linkType: s, linkAddress: a }, vs(c, t, n, g), h && typeof h == "object" && (h.v = r || a, h.m = r || a), (b = e == null ? void 0 : e.hooks) != null && b.updateCellYdoc) {
|
|
@@ -1684,7 +1684,7 @@ function bs(e, t, n, o, r = !1, s = !1) {
|
|
|
1684
1684
|
const x = n - 1 === -1 ? 0 : e.visibledatacolumn[n - 1], P = e.visibledatarow[t], q = (() => {
|
|
1685
1685
|
if ((o == null ? void 0 : o.originText) !== void 0) return o.originText;
|
|
1686
1686
|
if (i && c) {
|
|
1687
|
-
const S =
|
|
1687
|
+
const S = $f(c, i);
|
|
1688
1688
|
if (S.length > 0) return S;
|
|
1689
1689
|
}
|
|
1690
1690
|
return (c == null ? void 0 : c.v) == null ? "" : `${c.v}`;
|
|
@@ -1710,7 +1710,7 @@ function bs(e, t, n, o, r = !1, s = !1) {
|
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function Nu(e, t, n, o, r, s, a) {
|
|
1714
1714
|
if (De(e, e.currentSheetId) != null && js(e, t, n).length !== 0) {
|
|
1715
1715
|
if (o === "webpage") {
|
|
1716
1716
|
const l = String(r ?? "").trim();
|
|
@@ -1754,7 +1754,7 @@ function Sy(e, t) {
|
|
|
1754
1754
|
function Ey(e) {
|
|
1755
1755
|
V.set(e, "linkCard.rangeSelectionModal", void 0);
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function Kf(e, t, n, o) {
|
|
1758
1758
|
let r = [];
|
|
1759
1759
|
const s = n.row[0] - t.row[0], a = n.column[0] - t.column[0], i = e.row[0], l = e.row[1], f = e.column[0], c = e.column[1];
|
|
1760
1760
|
return i >= t.row[0] && l <= t.row[1] && f >= t.column[0] && c <= t.column[1] ? o === "allPart" ? r = [
|
|
@@ -2016,7 +2016,7 @@ function Yf(e, t, n, o) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
function yp(e, t, n, o) {
|
|
2018
2018
|
var s, a, i;
|
|
2019
|
-
|
|
2019
|
+
Af();
|
|
2020
2020
|
const r = (s = o[t]) == null ? void 0 : s[n];
|
|
2021
2021
|
(i = (a = e.hooks) == null ? void 0 : a.updateCellYdoc) == null || i.call(a, [
|
|
2022
2022
|
{
|
|
@@ -2040,7 +2040,7 @@ function wp(e, t, n, o, r, s, a, i, l) {
|
|
|
2040
2040
|
let K;
|
|
2041
2041
|
V.isPlainObject(ee) ? ((f = ee == null ? void 0 : ee.ct) == null ? void 0 : f.t) === "d" ? K = (ee == null ? void 0 : ee.m) ?? (ee == null ? void 0 : ee.v) ?? ((h = (d = (c = ee == null ? void 0 : ee.ct) == null ? void 0 : c.s) == null ? void 0 : d[0]) == null ? void 0 : h.v) : K = (ee == null ? void 0 : ee.v) ?? ((g = (m = (p = ee == null ? void 0 : ee.ct) == null ? void 0 : p.s) == null ? void 0 : m[0]) == null ? void 0 : g.v) : K = ee;
|
|
2042
2042
|
let ae = "n";
|
|
2043
|
-
if (
|
|
2043
|
+
if (Df(o) || o === 14 || o === 15 || o === 16 || o === 17 || o === 18 || o === 19 || o === 20 || o === 21 || o === 22 || o === 45 || o === 46 || o === 47 ? ae = "d" : (o === "@" || o === 49) && (ae = "s"), V.isNil(K)) {
|
|
2044
2044
|
if (!V.isNil(t[N]))
|
|
2045
2045
|
if (V.isNil(t[N][G])) {
|
|
2046
2046
|
const de = { ct: { fa: o, t: ae } };
|
|
@@ -2122,7 +2122,7 @@ function wp(e, t, n, o, r, s, a, i, l) {
|
|
|
2122
2122
|
});
|
|
2123
2123
|
}
|
|
2124
2124
|
if (n === "tb" && l) {
|
|
2125
|
-
|
|
2125
|
+
Af();
|
|
2126
2126
|
for (let G = r; G <= s; G += 1)
|
|
2127
2127
|
if (!(!V.isNil(e.config.rowhidden) && !V.isNil(e.config.rowhidden[G]))) {
|
|
2128
2128
|
if (o === "2") {
|
|
@@ -2651,7 +2651,7 @@ function Ga(e, t) {
|
|
|
2651
2651
|
function Xa(e, t) {
|
|
2652
2652
|
Za(e, t, "it");
|
|
2653
2653
|
}
|
|
2654
|
-
function
|
|
2654
|
+
function qf(e, t) {
|
|
2655
2655
|
Za(e, t, "cl");
|
|
2656
2656
|
}
|
|
2657
2657
|
function Qa(e, t) {
|
|
@@ -2734,7 +2734,7 @@ function Ty(e) {
|
|
|
2734
2734
|
let y = [];
|
|
2735
2735
|
for (let k = 0; k < v.length; k += 1)
|
|
2736
2736
|
y = y.concat(
|
|
2737
|
-
|
|
2737
|
+
Kf(
|
|
2738
2738
|
v[k],
|
|
2739
2739
|
{ row: [c, d], column: [h, p] },
|
|
2740
2740
|
{ row: [c, d], column: [h, p] },
|
|
@@ -2823,7 +2823,7 @@ function Lr(e, t) {
|
|
|
2823
2823
|
function xp(e, t) {
|
|
2824
2824
|
Or(e, t);
|
|
2825
2825
|
}
|
|
2826
|
-
function
|
|
2826
|
+
function Tu(e, t) {
|
|
2827
2827
|
var l, f;
|
|
2828
2828
|
if (!mt(e)) return;
|
|
2829
2829
|
const o = e.luckysheetfile[De(e, e.currentSheetId)];
|
|
@@ -2861,7 +2861,7 @@ function My(e, t) {
|
|
|
2861
2861
|
}
|
|
2862
2862
|
return (t == null ? void 0 : t.innerText) ?? "";
|
|
2863
2863
|
}
|
|
2864
|
-
function
|
|
2864
|
+
function Zf(e, t) {
|
|
2865
2865
|
var f, c;
|
|
2866
2866
|
const n = (f = e.luckysheet_select_save) == null ? void 0 : f[0], o = Te(e);
|
|
2867
2867
|
if (o == null || n == null) return !1;
|
|
@@ -2870,7 +2870,7 @@ function qf(e, t) {
|
|
|
2870
2870
|
const l = My(e, t);
|
|
2871
2871
|
return !!(l.length > 0 && l.trimStart().startsWith("="));
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function Gf(e, t, n) {
|
|
2874
2874
|
if (!n || !t) return;
|
|
2875
2875
|
if (e.luckysheetCellUpdate.length !== 2) {
|
|
2876
2876
|
delete n.linkEditorOpenSnapshot;
|
|
@@ -2899,7 +2899,7 @@ function Zf(e, t, n) {
|
|
|
2899
2899
|
function Ja(e, t, n) {
|
|
2900
2900
|
var g, w, E, b;
|
|
2901
2901
|
if (!mt(e)) return;
|
|
2902
|
-
if (
|
|
2902
|
+
if (Zf(e, t)) {
|
|
2903
2903
|
(g = n == null ? void 0 : n.onHyperlinkInsertBlocked) == null || g.call(n);
|
|
2904
2904
|
return;
|
|
2905
2905
|
}
|
|
@@ -2928,7 +2928,7 @@ function Ja(e, t, n) {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
d && m && v.substring(0, 1) !== "=" && (p =
|
|
2931
|
+
d && m && v.substring(0, 1) !== "=" && (p = jf(t) ?? dp(
|
|
2932
2932
|
m,
|
|
2933
2933
|
d.start,
|
|
2934
2934
|
d.end
|
|
@@ -2972,7 +2972,7 @@ const Oy = {
|
|
|
2972
2972
|
"border-all": (e) => ia(e, "border-all"),
|
|
2973
2973
|
bold: Ga,
|
|
2974
2974
|
italic: Xa,
|
|
2975
|
-
"strike-through":
|
|
2975
|
+
"strike-through": qf,
|
|
2976
2976
|
underline: Qa,
|
|
2977
2977
|
"clear-format": Ty,
|
|
2978
2978
|
"format-painter": Ny,
|
|
@@ -3080,7 +3080,7 @@ function Ys(e, t, n, o, r, s, a) {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
e.beginPath(), t.indexOf("Medium") > -1 ? (n === "h" ? (e.moveTo(o, r - 0.5), e.lineTo(s, a - 0.5)) : (e.moveTo(o - 0.5, r), e.lineTo(s - 0.5, a)), e.lineWidth = 2) : t === "Thick" ? (e.moveTo(o, r), e.lineTo(s, a), e.lineWidth = 3) : (e.moveTo(o, r), e.lineTo(s, a), e.lineWidth = 1);
|
|
3082
3082
|
}
|
|
3083
|
-
class
|
|
3083
|
+
class Xf {
|
|
3084
3084
|
constructor(t, n) {
|
|
3085
3085
|
Ae(this, "canvasElement");
|
|
3086
3086
|
Ae(this, "sheetCtx");
|
|
@@ -3134,7 +3134,7 @@ class Gf {
|
|
|
3134
3134
|
this.sheetCtx.rowHeaderWidth - 1,
|
|
3135
3135
|
i - l + 1 + k - y
|
|
3136
3136
|
), r.fillStyle = "#000000", r.save(), r.scale(this.sheetCtx.zoomRatio, this.sheetCtx.zoomRatio);
|
|
3137
|
-
const C =
|
|
3137
|
+
const C = Tc(v + 1, r, this.sheetCtx), R = (this.sheetCtx.rowHeaderWidth - C.width) / 2, x = l + (i - l) / 2 + o;
|
|
3138
3138
|
r.fillText(
|
|
3139
3139
|
`${v + 1}`,
|
|
3140
3140
|
R / this.sheetCtx.zoomRatio,
|
|
@@ -3218,7 +3218,7 @@ class Gf {
|
|
|
3218
3218
|
i - l,
|
|
3219
3219
|
this.sheetCtx.columnHeaderHeight - 1
|
|
3220
3220
|
), r.fillStyle = "#000000", r.save(), r.scale(this.sheetCtx.zoomRatio, this.sheetCtx.zoomRatio);
|
|
3221
|
-
const k =
|
|
3221
|
+
const k = Tc(y, r, this.sheetCtx), C = Math.round(
|
|
3222
3222
|
l + (i - l) / 2 + o - k.width / 2
|
|
3223
3223
|
), R = Math.round(
|
|
3224
3224
|
this.sheetCtx.columnHeaderHeight / 2
|
|
@@ -3388,7 +3388,7 @@ class Gf {
|
|
|
3388
3388
|
else {
|
|
3389
3389
|
const ee = c[j][F];
|
|
3390
3390
|
let K = null;
|
|
3391
|
-
ee != null && ee.mc ? q.push(b[oe]) : K =
|
|
3391
|
+
ee != null && ee.mc ? q.push(b[oe]) : K = _u(j, F, c);
|
|
3392
3392
|
const ae = this.sheetCtx.showFormulasFromFindReplace && (ee == null ? void 0 : ee.f);
|
|
3393
3393
|
!ae && (V.isNil(K) || K.toString().length === 0) ? this.nullCellRender(
|
|
3394
3394
|
j,
|
|
@@ -3441,7 +3441,7 @@ class Gf {
|
|
|
3441
3441
|
const ae = ee.mc;
|
|
3442
3442
|
if (!ae) continue;
|
|
3443
3443
|
const pe = (A = c == null ? void 0 : c[ae.r]) == null ? void 0 : A[ae.c], de = this.sheetCtx.showFormulasFromFindReplace && (pe == null ? void 0 : pe.f);
|
|
3444
|
-
K =
|
|
3444
|
+
K = _u(ae.r, ae.c, c), j = ae.r, F = ae.c;
|
|
3445
3445
|
const me = c[j][F];
|
|
3446
3446
|
!((B = me == null ? void 0 : me.mc) != null && B.rs) || !((M = me.mc) != null && M.cs) || (F === 0 ? _ = -t : _ = this.sheetCtx.visibledatacolumn[F - 1] - t, j === 0 ? U = -n - 1 : U = this.sheetCtx.visibledatarow[j - 1] - n - 1, N = this.sheetCtx.visibledatarow[j + me.mc.rs - 1] - n, G = this.sheetCtx.visibledatacolumn[F + me.mc.cs - 1] - t, !de && (V.isNil(K) || K.toString().length === 0) ? this.nullCellRender(
|
|
3447
3447
|
j,
|
|
@@ -3595,7 +3595,7 @@ class Gf {
|
|
|
3595
3595
|
this.sheetCtx.ch_width - this.sheetCtx.visibledatacolumn[g],
|
|
3596
3596
|
w - n
|
|
3597
3597
|
), d.restore(), this.measureTextCacheTimeOut = setTimeout(() => {
|
|
3598
|
-
|
|
3598
|
+
Af(), this.cellOverflowMapCache = {};
|
|
3599
3599
|
}, 100);
|
|
3600
3600
|
}
|
|
3601
3601
|
// 获取表格渲染范围 溢出单元格
|
|
@@ -3876,7 +3876,7 @@ class Gf {
|
|
|
3876
3876
|
else if (((j = H == null ? void 0 : H[`${t}_${n}`]) == null ? void 0 : j.type) === "checkbox") {
|
|
3877
3877
|
const pe = r + d, de = o + h + 1;
|
|
3878
3878
|
l.save(), l.beginPath(), l.rect(pe, de, R, x), l.clip(), l.scale(this.sheetCtx.zoomRatio, this.sheetCtx.zoomRatio);
|
|
3879
|
-
const me =
|
|
3879
|
+
const me = Tc(i, l, this.sheetCtx), ve = me.width + 18, ue = me.actualBoundingBoxDescent + me.actualBoundingBoxAscent;
|
|
3880
3880
|
let he = pe + P;
|
|
3881
3881
|
J === 0 ? he = pe + R / 2 - ve / 2 : J === 2 && (he = pe + R - P - ve);
|
|
3882
3882
|
const ge = x > ue ? x : ue;
|
|
@@ -4233,7 +4233,7 @@ function Dp(e) {
|
|
|
4233
4233
|
let i, l;
|
|
4234
4234
|
o - 1 < 0 ? (i = 0, l = e.visibledatacolumn[r]) : (i = e.visibledatacolumn[o - 1], l = e.visibledatacolumn[r] - e.visibledatacolumn[o - 1]);
|
|
4235
4235
|
const f = document.createElement("canvas");
|
|
4236
|
-
f.width = Math.ceil(l * devicePixelRatio), f.height = Math.ceil(a * devicePixelRatio), f.style.width = `${l}px`, f.style.height = `${a}px`, new
|
|
4236
|
+
f.width = Math.ceil(l * devicePixelRatio), f.height = Math.ceil(a * devicePixelRatio), f.style.width = `${l}px`, f.style.height = `${a}px`, new Xf(f, e).drawMain({
|
|
4237
4237
|
scrollWidth: i,
|
|
4238
4238
|
scrollHeight: s,
|
|
4239
4239
|
drawWidth: l,
|
|
@@ -4362,7 +4362,7 @@ function ec(e, t, n, o) {
|
|
|
4362
4362
|
(c = (f = e.hooks).afterInsertComment) == null || c.call(f, n, o);
|
|
4363
4363
|
});
|
|
4364
4364
|
}
|
|
4365
|
-
function
|
|
4365
|
+
function Qf(e, t, n, o) {
|
|
4366
4366
|
var i, l;
|
|
4367
4367
|
const r = Te(e), s = (l = (i = r == null ? void 0 : r[n]) == null ? void 0 : i[o]) == null ? void 0 : l.ps;
|
|
4368
4368
|
if (!s) return;
|
|
@@ -4424,7 +4424,7 @@ function Lp(e, t, n, o) {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
]);
|
|
4426
4426
|
}
|
|
4427
|
-
function
|
|
4427
|
+
function Lu(e) {
|
|
4428
4428
|
var r, s, a;
|
|
4429
4429
|
const t = Te(e);
|
|
4430
4430
|
if (!t) return;
|
|
@@ -4466,7 +4466,7 @@ function Tu(e) {
|
|
|
4466
4466
|
function Mp(e) {
|
|
4467
4467
|
e.hoveredCommentBox = void 0;
|
|
4468
4468
|
}
|
|
4469
|
-
function
|
|
4469
|
+
function Jf(e) {
|
|
4470
4470
|
const t = document.getElementById(e);
|
|
4471
4471
|
if (!t) return;
|
|
4472
4472
|
const { width: n, height: o } = t.getBoundingClientRect(), r = t.offsetLeft, s = t.offsetTop;
|
|
@@ -4491,7 +4491,7 @@ function $y(e, t) {
|
|
|
4491
4491
|
commentRC: { r: s, c: a }
|
|
4492
4492
|
} = t.commentBox;
|
|
4493
4493
|
t.commentBox.resizingId = void 0;
|
|
4494
|
-
const i =
|
|
4494
|
+
const i = Jf(r);
|
|
4495
4495
|
if (i) {
|
|
4496
4496
|
const { top: l, left: f, width: c, height: d } = i, h = Te(e), p = h == null ? void 0 : h[s][a];
|
|
4497
4497
|
if (!h || !(p != null && p.ps)) return;
|
|
@@ -4508,7 +4508,7 @@ function $y(e, t) {
|
|
|
4508
4508
|
}
|
|
4509
4509
|
}
|
|
4510
4510
|
function Op(e, t, n, { r: o, c: r, rc: s }, a) {
|
|
4511
|
-
const i =
|
|
4511
|
+
const i = Jf(a);
|
|
4512
4512
|
if (i) {
|
|
4513
4513
|
const { top: l, left: f } = i;
|
|
4514
4514
|
V.set(t, "commentBox", {
|
|
@@ -4540,7 +4540,7 @@ function Yy(e, t) {
|
|
|
4540
4540
|
commentRC: { r: s, c: a }
|
|
4541
4541
|
} = t.commentBox;
|
|
4542
4542
|
t.commentBox.movingId = void 0;
|
|
4543
|
-
const i =
|
|
4543
|
+
const i = Jf(r);
|
|
4544
4544
|
if (i) {
|
|
4545
4545
|
const { top: l, left: f } = i, c = Te(e), d = c == null ? void 0 : c[s][a];
|
|
4546
4546
|
if (!c || !(d != null && d.ps)) return;
|
|
@@ -4565,7 +4565,7 @@ function Hp(e) {
|
|
|
4565
4565
|
const o = (/* @__PURE__ */ new Date()).getTime();
|
|
4566
4566
|
return `${e}_${n}_${o}`;
|
|
4567
4567
|
}
|
|
4568
|
-
function
|
|
4568
|
+
function ed() {
|
|
4569
4569
|
const e = document.getElementById(
|
|
4570
4570
|
"fortune-img-upload"
|
|
4571
4571
|
);
|
|
@@ -4929,7 +4929,7 @@ function r4(e, t, n) {
|
|
|
4929
4929
|
}
|
|
4930
4930
|
return o;
|
|
4931
4931
|
}
|
|
4932
|
-
function
|
|
4932
|
+
function Pc(e, t, n) {
|
|
4933
4933
|
var r;
|
|
4934
4934
|
const o = [];
|
|
4935
4935
|
for (let s = 1; s <= t; s += 1) {
|
|
@@ -5107,7 +5107,7 @@ function nn(e, t, n, o, r) {
|
|
|
5107
5107
|
s = dl(e, t, $);
|
|
5108
5108
|
} else if (!te[0] && te[2]) {
|
|
5109
5109
|
const $ = Ue((f = e[1]) == null ? void 0 : f.m).diff(Ue((c = e[0]) == null ? void 0 : c.m), "days");
|
|
5110
|
-
s =
|
|
5110
|
+
s = Pc(e, t, $);
|
|
5111
5111
|
} else
|
|
5112
5112
|
s = Yn(e, t);
|
|
5113
5113
|
} else if (r === "chnNumber" && ((d = e[0]) == null ? void 0 : d.m) != null) {
|
|
@@ -5171,7 +5171,7 @@ function nn(e, t, n, o, r) {
|
|
|
5171
5171
|
if (e.length === 2) {
|
|
5172
5172
|
(n === "up" || n === "left") && e.reverse();
|
|
5173
5173
|
const te = Ue((w = e[1]) == null ? void 0 : w.m).diff(Ue((E = e[0]) == null ? void 0 : E.m), "days");
|
|
5174
|
-
s =
|
|
5174
|
+
s = Pc(e, t, te);
|
|
5175
5175
|
} else {
|
|
5176
5176
|
(n === "up" || n === "left") && e.reverse();
|
|
5177
5177
|
const te = qs(e);
|
|
@@ -5180,7 +5180,7 @@ function nn(e, t, n, o, r) {
|
|
|
5180
5180
|
s = dl(e, t, $);
|
|
5181
5181
|
} else if (!te[0] && te[2]) {
|
|
5182
5182
|
const $ = Ue((y = e[1]) == null ? void 0 : y.m).diff(Ue((k = e[0]) == null ? void 0 : k.m), "days");
|
|
5183
|
-
s =
|
|
5183
|
+
s = Pc(e, t, $);
|
|
5184
5184
|
} else
|
|
5185
5185
|
s = Yn(e, t);
|
|
5186
5186
|
}
|
|
@@ -5983,7 +5983,7 @@ function c4(e, t, n) {
|
|
|
5983
5983
|
W && (W.style.display = "none");
|
|
5984
5984
|
}
|
|
5985
5985
|
}
|
|
5986
|
-
function
|
|
5986
|
+
function td(e, t, n) {
|
|
5987
5987
|
var i;
|
|
5988
5988
|
const o = (e == null ? void 0 : e.length) ?? 0, r = ((i = e == null ? void 0 : e[0]) == null ? void 0 : i.length) ?? 0, s = o > 0 ? o : Math.max(0, t ?? 0), a = r > 0 ? r : Math.max(0, n ?? 0);
|
|
5989
5989
|
return s <= 0 || a <= 0 ? null : [
|
|
@@ -6031,7 +6031,7 @@ function ks(e, t, {
|
|
|
6031
6031
|
const r = w1(e, !!o), s = w1(t, !!o);
|
|
6032
6032
|
return n ? r === s : s.indexOf(r) !== -1;
|
|
6033
6033
|
}
|
|
6034
|
-
function
|
|
6034
|
+
function nd(e, t, n, o) {
|
|
6035
6035
|
if (!t) return e;
|
|
6036
6036
|
if (o) return e.split(t).join(n);
|
|
6037
6037
|
const r = e.toLowerCase(), s = t.toLowerCase(), a = [];
|
|
@@ -6126,7 +6126,7 @@ const Zp = 5e4, Gp = {
|
|
|
6126
6126
|
wordCheck: !1,
|
|
6127
6127
|
linkCheck: !1
|
|
6128
6128
|
};
|
|
6129
|
-
function
|
|
6129
|
+
function od(e) {
|
|
6130
6130
|
return {
|
|
6131
6131
|
rowhidden: e.config.rowhidden ?? null,
|
|
6132
6132
|
colhidden: e.config.colhidden ?? null
|
|
@@ -6141,10 +6141,10 @@ function Xp(e, t, n) {
|
|
|
6141
6141
|
n,
|
|
6142
6142
|
Gp,
|
|
6143
6143
|
void 0,
|
|
6144
|
-
|
|
6144
|
+
od(e)
|
|
6145
6145
|
);
|
|
6146
6146
|
}
|
|
6147
|
-
function
|
|
6147
|
+
function Mu(e, t, n) {
|
|
6148
6148
|
var i;
|
|
6149
6149
|
const o = Te(e);
|
|
6150
6150
|
if (!((i = o == null ? void 0 : o[t]) != null && i[n])) return { r1: t, r2: t, c1: n, c2: n };
|
|
@@ -6232,7 +6232,7 @@ function Jp(e, t, n, o = "thisSheet", r = "next", s) {
|
|
|
6232
6232
|
for (const S of e.luckysheetfile) {
|
|
6233
6233
|
const D = S.id ?? "";
|
|
6234
6234
|
if (!D || !S.data) continue;
|
|
6235
|
-
const I = S.data, O =
|
|
6235
|
+
const I = S.data, O = td(
|
|
6236
6236
|
I,
|
|
6237
6237
|
S.row,
|
|
6238
6238
|
S.column
|
|
@@ -6379,7 +6379,7 @@ function e3(e, t, n, o = "thisSheet", r) {
|
|
|
6379
6379
|
if (o === "allSheets") {
|
|
6380
6380
|
for (const d of e.luckysheetfile) {
|
|
6381
6381
|
if (!d.data) continue;
|
|
6382
|
-
const h = d.data, p =
|
|
6382
|
+
const h = d.data, p = td(
|
|
6383
6383
|
h,
|
|
6384
6384
|
d.row,
|
|
6385
6385
|
d.column
|
|
@@ -6538,7 +6538,7 @@ function t3(e, t, n, o, r) {
|
|
|
6538
6538
|
if (!Y || I.search(Y) === -1) return null;
|
|
6539
6539
|
} else if (!ks(t, I, o))
|
|
6540
6540
|
return null;
|
|
6541
|
-
const O = o.regCheck && W ? I.replace(W, n) :
|
|
6541
|
+
const O = o.regCheck && W ? I.replace(W, n) : nd(
|
|
6542
6542
|
I,
|
|
6543
6543
|
t,
|
|
6544
6544
|
n,
|
|
@@ -6656,7 +6656,7 @@ function n3(e, t, n, o, r) {
|
|
|
6656
6656
|
p += 1;
|
|
6657
6657
|
continue;
|
|
6658
6658
|
}
|
|
6659
|
-
const Y = o.regCheck ? O.replace(q, n) :
|
|
6659
|
+
const Y = o.regCheck ? O.replace(q, n) : nd(
|
|
6660
6660
|
O,
|
|
6661
6661
|
t,
|
|
6662
6662
|
n,
|
|
@@ -6755,7 +6755,7 @@ function y4(e, t, n, o, r, s, a, i, l) {
|
|
|
6755
6755
|
h += 1;
|
|
6756
6756
|
continue;
|
|
6757
6757
|
}
|
|
6758
|
-
const q = s.regCheck ? P.replace(v, r) :
|
|
6758
|
+
const q = s.regCheck ? P.replace(v, r) : nd(
|
|
6759
6759
|
P,
|
|
6760
6760
|
o,
|
|
6761
6761
|
r,
|
|
@@ -6795,7 +6795,7 @@ function o3(e, t, n, o, r = "thisSheet") {
|
|
|
6795
6795
|
for (const h of e.luckysheetfile) {
|
|
6796
6796
|
const p = h.id ?? "", m = h.data;
|
|
6797
6797
|
if (!p || !m) continue;
|
|
6798
|
-
const g =
|
|
6798
|
+
const g = td(m, h.row, h.column);
|
|
6799
6799
|
if (g == null) continue;
|
|
6800
6800
|
e.currentSheetId = p;
|
|
6801
6801
|
const w = y4(
|
|
@@ -6888,7 +6888,7 @@ function s3(e, t, n, o, r) {
|
|
|
6888
6888
|
n,
|
|
6889
6889
|
Gp,
|
|
6890
6890
|
void 0,
|
|
6891
|
-
|
|
6891
|
+
od(e),
|
|
6892
6892
|
o,
|
|
6893
6893
|
r
|
|
6894
6894
|
);
|
|
@@ -7005,7 +7005,7 @@ function a3(e, t, n) {
|
|
|
7005
7005
|
const a = e.luckysheetfile[s];
|
|
7006
7006
|
a.filter == null && (a.filter = {}), delete a.filter[r], V.isEmpty(a.filter) && (a.filter = void 0), a.config = V.assign({}, e.config);
|
|
7007
7007
|
}
|
|
7008
|
-
function
|
|
7008
|
+
function rd(e) {
|
|
7009
7009
|
var s, a;
|
|
7010
7010
|
if (V.size(e.luckysheet_select_save) > 1)
|
|
7011
7011
|
return;
|
|
@@ -7162,7 +7162,7 @@ function u3(e, t, n, o) {
|
|
|
7162
7162
|
fcColors: f.length < 2 ? [] : f
|
|
7163
7163
|
};
|
|
7164
7164
|
}
|
|
7165
|
-
function
|
|
7165
|
+
function Ou(e, t, n, o, r, s, a, i, l) {
|
|
7166
7166
|
Ha(e), w4(
|
|
7167
7167
|
e,
|
|
7168
7168
|
t,
|
|
@@ -7194,7 +7194,7 @@ function b4(e, t, n, o, r, s, a) {
|
|
|
7194
7194
|
for (let d = s; d <= a; d += 1) c.add(d);
|
|
7195
7195
|
c.forEach((d) => im(e, d, t, f));
|
|
7196
7196
|
}
|
|
7197
|
-
function
|
|
7197
|
+
function sd(e, t, n, o, r) {
|
|
7198
7198
|
const s = r.getBoundingClientRect(), a = t.pageX - s.left - e.rowHeaderWidth + n.scrollLeft, i = t.pageY - s.top - e.columnHeaderHeight + o.scrollTop;
|
|
7199
7199
|
return {
|
|
7200
7200
|
row: Qt(i, e.visibledatarow),
|
|
@@ -7208,7 +7208,7 @@ function f3(e, t, n, o, r, s) {
|
|
|
7208
7208
|
let {
|
|
7209
7209
|
row: [i, l, f],
|
|
7210
7210
|
column: [c, d, h]
|
|
7211
|
-
} =
|
|
7211
|
+
} = sd(e, n, o, r, s);
|
|
7212
7212
|
const p = V.last(e.luckysheet_select_save);
|
|
7213
7213
|
if (p == null) return;
|
|
7214
7214
|
f < p.row[0] ? [f] = p.row : f > p.row[1] && ([, f] = p.row), h < p.column[0] ? [h] = p.column : h > p.column[1] && ([, h] = p.column), [i, l] = Ft(f, e.visibledatarow), [c, d] = Ht(h, e.visibledatacolumn), e.luckysheet_cell_selected_move_index = [f, h];
|
|
@@ -7223,7 +7223,7 @@ function C4(e, t, n, o, r, s) {
|
|
|
7223
7223
|
return;
|
|
7224
7224
|
t.dragCellStartPos = void 0;
|
|
7225
7225
|
}
|
|
7226
|
-
const [a, i] = um(n.pageX, n.pageY, e), l = s.getBoundingClientRect(), f = l.height - 20 * e.zoomRatio, c = l.width - 60 * e.zoomRatio, { row: d, column: h } =
|
|
7226
|
+
const [a, i] = um(n.pageX, n.pageY, e), l = s.getBoundingClientRect(), f = l.height - 20 * e.zoomRatio, c = l.width - 60 * e.zoomRatio, { row: d, column: h } = sd(
|
|
7227
7227
|
e,
|
|
7228
7228
|
n,
|
|
7229
7229
|
o,
|
|
@@ -7250,7 +7250,7 @@ function k4(e, t, n, o, r, s) {
|
|
|
7250
7250
|
const [i, l] = um(n.pageX, n.pageY, e), f = s.getBoundingClientRect(), c = f.height - 20 * e.zoomRatio, d = f.width - 60 * e.zoomRatio, {
|
|
7251
7251
|
row: [, , h],
|
|
7252
7252
|
column: [, , p]
|
|
7253
|
-
} =
|
|
7253
|
+
} = sd(e, n, o, r, s);
|
|
7254
7254
|
if (!mt(e, [
|
|
7255
7255
|
{
|
|
7256
7256
|
row: [h, h],
|
|
@@ -7318,7 +7318,7 @@ function k4(e, t, n, o, r, s) {
|
|
|
7318
7318
|
let z = [];
|
|
7319
7319
|
for (let Z = 0; Z < ye.length; Z += 1)
|
|
7320
7320
|
z = z.concat(
|
|
7321
|
-
|
|
7321
|
+
Kf(
|
|
7322
7322
|
ye[Z],
|
|
7323
7323
|
{ row: b.row, column: b.column },
|
|
7324
7324
|
{ row: [C, R], column: [x, P] },
|
|
@@ -7462,7 +7462,7 @@ function _4(e, t) {
|
|
|
7462
7462
|
}
|
|
7463
7463
|
return n;
|
|
7464
7464
|
}
|
|
7465
|
-
function
|
|
7465
|
+
function Hu(e, t, n, o) {
|
|
7466
7466
|
var a;
|
|
7467
7467
|
if (o.allowEdit === !1) return;
|
|
7468
7468
|
const r = Te(o), s = [];
|
|
@@ -7508,7 +7508,7 @@ function ei(e, t) {
|
|
|
7508
7508
|
}
|
|
7509
7509
|
return e;
|
|
7510
7510
|
}
|
|
7511
|
-
function
|
|
7511
|
+
function Fu(e, t) {
|
|
7512
7512
|
let n = [];
|
|
7513
7513
|
const o = t.luckysheet_select_save[0].row[0], r = t.luckysheet_select_save[0].row[1], s = t.luckysheet_select_save[0].column[0], a = Te(t);
|
|
7514
7514
|
if (!V.isNull(e) && e !== "") {
|
|
@@ -7590,7 +7590,7 @@ function ti(e, t, n, o, r, s, a) {
|
|
|
7590
7590
|
}
|
|
7591
7591
|
return s;
|
|
7592
7592
|
}
|
|
7593
|
-
function
|
|
7593
|
+
function Pu(e) {
|
|
7594
7594
|
const t = V.cloneDeep(e), n = V.filter(t, (r) => r).length;
|
|
7595
7595
|
let o;
|
|
7596
7596
|
if (n === 0)
|
|
@@ -7606,7 +7606,7 @@ function Fu(e) {
|
|
|
7606
7606
|
}
|
|
7607
7607
|
return o;
|
|
7608
7608
|
}
|
|
7609
|
-
function
|
|
7609
|
+
function Bu(e) {
|
|
7610
7610
|
var n, o;
|
|
7611
7611
|
let t;
|
|
7612
7612
|
if (((n = e.luckysheet_select_save) == null ? void 0 : n.length) === 0 || ((o = e.luckysheet_select_save) == null ? void 0 : o.length) === 1 && e.luckysheet_select_save[0].row[0] === e.luckysheet_select_save[0].row[1] && e.luckysheet_select_save[0].column[0] === e.luckysheet_select_save[0].column[1]) {
|
|
@@ -7721,7 +7721,7 @@ function x4(e, t) {
|
|
|
7721
7721
|
console.info(s);
|
|
7722
7722
|
}
|
|
7723
7723
|
}
|
|
7724
|
-
function
|
|
7724
|
+
function id(e, t) {
|
|
7725
7725
|
const n = Ki(t);
|
|
7726
7726
|
if (!n) {
|
|
7727
7727
|
console.warn("Unsupported Dune chart URL:", t);
|
|
@@ -7735,7 +7735,7 @@ function ic() {
|
|
|
7735
7735
|
const { width: t, height: n } = e.getBoundingClientRect(), o = e.offsetLeft, r = e.offsetTop;
|
|
7736
7736
|
return { left: o, top: r, width: t, height: n };
|
|
7737
7737
|
}
|
|
7738
|
-
function
|
|
7738
|
+
function ld(e, t) {
|
|
7739
7739
|
var n;
|
|
7740
7740
|
if ((n = t.iframe) != null && n.resizingSide) {
|
|
7741
7741
|
t.iframe = void 0;
|
|
@@ -7759,7 +7759,7 @@ function g3(e, t, n) {
|
|
|
7759
7759
|
}
|
|
7760
7760
|
return !1;
|
|
7761
7761
|
}
|
|
7762
|
-
function
|
|
7762
|
+
function ad(e, t) {
|
|
7763
7763
|
var o;
|
|
7764
7764
|
const n = ic();
|
|
7765
7765
|
if (!((o = t.iframe) != null && o.resizingSide) && (t.iframe = void 0, n)) {
|
|
@@ -7853,7 +7853,7 @@ function S4(e, t) {
|
|
|
7853
7853
|
}
|
|
7854
7854
|
return f;
|
|
7855
7855
|
}
|
|
7856
|
-
function
|
|
7856
|
+
function Uu(e) {
|
|
7857
7857
|
return V.filter(
|
|
7858
7858
|
e,
|
|
7859
7859
|
(t) => t.path[0] === "luckysheetfile" && t.path[2] !== "luckysheet_select_save"
|
|
@@ -8071,7 +8071,7 @@ function k3(e) {
|
|
|
8071
8071
|
}
|
|
8072
8072
|
} : e;
|
|
8073
8073
|
}
|
|
8074
|
-
const
|
|
8074
|
+
const zu = (e) => {
|
|
8075
8075
|
var l, f, c, d;
|
|
8076
8076
|
const t = De(e, e.currentSheetId);
|
|
8077
8077
|
if (t == null) return { isRowFrozen: !1, isColFrozen: !1 };
|
|
@@ -8230,7 +8230,7 @@ function S3(e, t, n, o = {}) {
|
|
|
8230
8230
|
const r = zn(e, o), s = (i = (a = r.data) == null ? void 0 : a[t]) == null ? void 0 : i[n];
|
|
8231
8231
|
s && V.isPlainObject(s) && (delete s.m, delete s.v, s.f != null && (delete s.f, Ur(e, t, n, r.id), delete s.spl));
|
|
8232
8232
|
}
|
|
8233
|
-
function
|
|
8233
|
+
function cd(e, t, n, o, r, s = {}) {
|
|
8234
8234
|
var c;
|
|
8235
8235
|
if (!V.isNumber(t) || !V.isNumber(n))
|
|
8236
8236
|
throw new Error("row or column cannot be null or undefined");
|
|
@@ -8273,7 +8273,7 @@ function br(e) {
|
|
|
8273
8273
|
column: n.column
|
|
8274
8274
|
}));
|
|
8275
8275
|
}
|
|
8276
|
-
function
|
|
8276
|
+
function ud(e, t) {
|
|
8277
8277
|
t = t || br(e);
|
|
8278
8278
|
const n = [];
|
|
8279
8279
|
return t == null || t.forEach((o) => {
|
|
@@ -8284,7 +8284,7 @@ function cd(e, t) {
|
|
|
8284
8284
|
}), n;
|
|
8285
8285
|
}
|
|
8286
8286
|
function R3(e, t) {
|
|
8287
|
-
t = t ||
|
|
8287
|
+
t = t || ud(e);
|
|
8288
8288
|
const n = Te(e);
|
|
8289
8289
|
return n ? t.map((o) => {
|
|
8290
8290
|
var r;
|
|
@@ -8354,17 +8354,17 @@ function N3(e, t, n, o, r = {}) {
|
|
|
8354
8354
|
o.forEach((s) => {
|
|
8355
8355
|
for (let a = s.row[0]; a <= s.row[1]; a += 1)
|
|
8356
8356
|
for (let i = s.column[0]; i <= s.column[1]; i += 1)
|
|
8357
|
-
|
|
8357
|
+
cd(e, a, i, t, n, r);
|
|
8358
8358
|
});
|
|
8359
8359
|
}
|
|
8360
|
-
function
|
|
8360
|
+
function fd(e, t, n, o = {}) {
|
|
8361
8361
|
const r = zn(e, o);
|
|
8362
8362
|
ap(e, r.id, t, n);
|
|
8363
8363
|
}
|
|
8364
8364
|
function T3(e, t, n = {}) {
|
|
8365
|
-
|
|
8365
|
+
fd(e, t, "merge-cancel", n);
|
|
8366
8366
|
}
|
|
8367
|
-
function
|
|
8367
|
+
function dd(e, t, n, o = !1, r = void 0, s = void 0) {
|
|
8368
8368
|
Wa(
|
|
8369
8369
|
e,
|
|
8370
8370
|
t,
|
|
@@ -8422,7 +8422,7 @@ function F3(e, t, n, o) {
|
|
|
8422
8422
|
const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8423
8423
|
__proto__: null,
|
|
8424
8424
|
activateSheet: O3,
|
|
8425
|
-
addSheet:
|
|
8425
|
+
addSheet: dd,
|
|
8426
8426
|
applyRemoteCellValue: x3,
|
|
8427
8427
|
autoFillCell: E3,
|
|
8428
8428
|
calculateReferencedCellSheetFromula: sp,
|
|
@@ -8430,7 +8430,7 @@ const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8430
8430
|
cancelMerge: T3,
|
|
8431
8431
|
celldataToData: fm,
|
|
8432
8432
|
clearCell: S3,
|
|
8433
|
-
clearCellError:
|
|
8433
|
+
clearCellError: Nf,
|
|
8434
8434
|
copySheet: rp,
|
|
8435
8435
|
dataToCelldata: pi,
|
|
8436
8436
|
deleteRowOrColumn: dm,
|
|
@@ -8441,7 +8441,7 @@ const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8441
8441
|
getCellsByFlattenRange: R3,
|
|
8442
8442
|
getCellsByRange: j3,
|
|
8443
8443
|
getColumnWidth: Gl,
|
|
8444
|
-
getFlattenRange:
|
|
8444
|
+
getFlattenRange: ud,
|
|
8445
8445
|
getHtmlByRange: D3,
|
|
8446
8446
|
getRowHeight: mm,
|
|
8447
8447
|
getSelection: br,
|
|
@@ -8450,13 +8450,13 @@ const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8450
8450
|
getSheetWithLatestCelldata: pm,
|
|
8451
8451
|
hideRowOrColumn: gm,
|
|
8452
8452
|
hideSheet: np,
|
|
8453
|
-
initSheetData:
|
|
8453
|
+
initSheetData: zf,
|
|
8454
8454
|
insertRowOrColumn: ym,
|
|
8455
|
-
mergeCells:
|
|
8455
|
+
mergeCells: fd,
|
|
8456
8456
|
overShowError: wm,
|
|
8457
8457
|
scroll: F3,
|
|
8458
|
-
setCellError:
|
|
8459
|
-
setCellFormat:
|
|
8458
|
+
setCellError: Tf,
|
|
8459
|
+
setCellFormat: cd,
|
|
8460
8460
|
setCellFormatByRange: N3,
|
|
8461
8461
|
setCellValue: qi,
|
|
8462
8462
|
setCellValuesByRange: A3,
|
|
@@ -8468,7 +8468,7 @@ const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8468
8468
|
showRowOrColumn: vm,
|
|
8469
8469
|
showSheet: op,
|
|
8470
8470
|
updateSheet: M3
|
|
8471
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
8471
|
+
}, Symbol.toStringTag, { value: "Module" })), hd = {
|
|
8472
8472
|
column: 60,
|
|
8473
8473
|
// 空表格默认的列数量
|
|
8474
8474
|
row: 84,
|
|
@@ -8663,7 +8663,7 @@ const E4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8663
8663
|
"filter-by-value"
|
|
8664
8664
|
],
|
|
8665
8665
|
// 筛选菜单
|
|
8666
|
-
generateSheetId: () =>
|
|
8666
|
+
generateSheetId: () => Uf(),
|
|
8667
8667
|
hooks: {},
|
|
8668
8668
|
customToolbarItems: [],
|
|
8669
8669
|
currency: "$",
|
|
@@ -8746,15 +8746,15 @@ function A4(e) {
|
|
|
8746
8746
|
function N4(e) {
|
|
8747
8747
|
return (e.metaKey || e.ctrlKey) && e.shiftKey && !e.altKey && e.code === "Semicolon";
|
|
8748
8748
|
}
|
|
8749
|
-
function
|
|
8749
|
+
function md(e) {
|
|
8750
8750
|
if (e.luckysheetCellUpdate.length === 0) return !1;
|
|
8751
8751
|
const t = R4();
|
|
8752
8752
|
return !t || !(t.innerText || "").trim().startsWith("=") || e.formulaCache.rangeSelectionActive === !0 && Pa(t) !== null ? !1 : !Ba(t);
|
|
8753
8753
|
}
|
|
8754
|
-
function
|
|
8754
|
+
function pd(e, t) {
|
|
8755
8755
|
t === "rangeOfFormula" && (e.formulaCache.formulaKeyboardRefSync = !0, e.formulaRangeNavRevision = (e.formulaRangeNavRevision ?? 0) + 1);
|
|
8756
8756
|
}
|
|
8757
|
-
function
|
|
8757
|
+
function gd(e) {
|
|
8758
8758
|
var r;
|
|
8759
8759
|
const t = e.luckysheetCellUpdate.length > 0 && Jn(e);
|
|
8760
8760
|
t && Cm(e);
|
|
@@ -8812,7 +8812,7 @@ function L4(e, t, n, o, r) {
|
|
|
8812
8812
|
e.luckysheetCellUpdate = [c, d], o.enteredEditByTyping = !1, lr(o), n.preventDefault();
|
|
8813
8813
|
}
|
|
8814
8814
|
}
|
|
8815
|
-
function
|
|
8815
|
+
function Bc(e) {
|
|
8816
8816
|
var t;
|
|
8817
8817
|
return e == null ? !1 : V.isPlainObject(e) ? e.f != null && String(e.f) !== "" || !V.isNil(e.v) ? !0 : Bo(e) ? (((t = e.ct) == null ? void 0 : t.s) ?? []).some(
|
|
8818
8818
|
(n) => (n == null ? void 0 : n.v) != null && String(n.v).length > 0
|
|
@@ -8826,7 +8826,7 @@ function ml(e, t, n, o, r, s, a, i, l, f, c) {
|
|
|
8826
8826
|
let p = r === 0 ? d : n, m = r === 0 ? n : d;
|
|
8827
8827
|
for (; p >= 0 && m >= 0 && (r === 0 ? p : m) < h - 1; ) {
|
|
8828
8828
|
const b = (g = e == null ? void 0 : e[p]) == null ? void 0 : g[m], v = (w = e == null ? void 0 : e[p - o]) == null ? void 0 : w[m - r], y = (E = e == null ? void 0 : e[p + o]) == null ? void 0 : E[m + r];
|
|
8829
|
-
if (
|
|
8829
|
+
if (Bc(b) && (!Bc(v) || !Bc(y)))
|
|
8830
8830
|
break;
|
|
8831
8831
|
p += 1 * o, m += 1 * r;
|
|
8832
8832
|
}
|
|
@@ -8857,13 +8857,13 @@ function U3(e, t, n, o) {
|
|
|
8857
8857
|
), t && (t.enteredEditByTyping = !1, lr(t)));
|
|
8858
8858
|
}
|
|
8859
8859
|
function S1(e, t, n) {
|
|
8860
|
-
if (
|
|
8860
|
+
if (md(e))
|
|
8861
8861
|
return;
|
|
8862
8862
|
e.formulaCache.rangeSelectionActive === !1 && zr(e);
|
|
8863
8863
|
const o = Xr(e);
|
|
8864
8864
|
if (o && (e.formulaCache.rangeSelectionActive = !0), e.luckysheetCellUpdate.length > 0 && !o && !Jn(e))
|
|
8865
8865
|
return;
|
|
8866
|
-
const { navType: r, navSelection: s } =
|
|
8866
|
+
const { navType: r, navSelection: s } = gd(e);
|
|
8867
8867
|
if (!s) return;
|
|
8868
8868
|
const a = De(e, e.currentSheetId);
|
|
8869
8869
|
if (V.isNil(a)) return;
|
|
@@ -8938,7 +8938,7 @@ function S1(e, t, n) {
|
|
|
8938
8938
|
default:
|
|
8939
8939
|
return;
|
|
8940
8940
|
}
|
|
8941
|
-
|
|
8941
|
+
pd(e, r);
|
|
8942
8942
|
}
|
|
8943
8943
|
function M4(e, t, n, o, r, s, a, i) {
|
|
8944
8944
|
var f, c, d, h, p;
|
|
@@ -9020,18 +9020,18 @@ function M4(e, t, n, o, r, s, a, i) {
|
|
|
9020
9020
|
} else if (n.code === "KeyZ") {
|
|
9021
9021
|
s(), n.stopPropagation();
|
|
9022
9022
|
return;
|
|
9023
|
-
} else n.code === "KeyA" &&
|
|
9023
|
+
} else n.code === "KeyA" && Lf(e);
|
|
9024
9024
|
n.preventDefault();
|
|
9025
9025
|
}
|
|
9026
9026
|
}
|
|
9027
9027
|
function O4(e, t) {
|
|
9028
9028
|
var r;
|
|
9029
|
-
if (
|
|
9029
|
+
if (md(e) || e.formulaCache.keyboardRangeSelectionLock === !0 || e.formulaCache.rangeSelectionActive === !1 && !zr(e))
|
|
9030
9030
|
return;
|
|
9031
9031
|
const n = Xr(e);
|
|
9032
9032
|
if (n && (e.formulaCache.rangeSelectionActive = !0), e.luckysheetCellUpdate.length > 0 && !n && !Jn(e))
|
|
9033
9033
|
return;
|
|
9034
|
-
const { navType: o } =
|
|
9034
|
+
const { navType: o } = gd(e);
|
|
9035
9035
|
switch (e.luckysheet_shiftpositon = V.cloneDeep(
|
|
9036
9036
|
(r = e.luckysheet_select_save) == null ? void 0 : r[e.luckysheet_select_save.length - 1]
|
|
9037
9037
|
), e.luckysheet_shiftkeydown = !0, t.key) {
|
|
@@ -9048,16 +9048,16 @@ function O4(e, t) {
|
|
|
9048
9048
|
qn(e, "right", 1, o);
|
|
9049
9049
|
break;
|
|
9050
9050
|
}
|
|
9051
|
-
|
|
9051
|
+
pd(e, o), t.preventDefault();
|
|
9052
9052
|
}
|
|
9053
9053
|
function E1(e, t) {
|
|
9054
|
-
if (
|
|
9054
|
+
if (md(e) || e.formulaCache.keyboardRangeSelectionLock === !0 || e.formulaCache.rangeSelectionActive === !1 && !zr(e))
|
|
9055
9055
|
return;
|
|
9056
9056
|
const n = Xr(e);
|
|
9057
9057
|
if (n && (e.formulaCache.rangeSelectionActive = !0), e.luckysheetCellUpdate.length > 0 && !n && !Jn(e))
|
|
9058
9058
|
return;
|
|
9059
9059
|
e.luckysheetCellUpdate.length > 0 || e.luckysheet_cell_selected_move || e.luckysheet_cell_selected_extend;
|
|
9060
|
-
const { navType: o } =
|
|
9060
|
+
const { navType: o } = gd(e), r = ps(e, t.key);
|
|
9061
9061
|
switch (t.key) {
|
|
9062
9062
|
case "ArrowUp":
|
|
9063
9063
|
en(e, "down", -r, o);
|
|
@@ -9072,7 +9072,7 @@ function E1(e, t) {
|
|
|
9072
9072
|
en(e, "right", r, o);
|
|
9073
9073
|
break;
|
|
9074
9074
|
}
|
|
9075
|
-
|
|
9075
|
+
pd(e, o), t.preventDefault();
|
|
9076
9076
|
}
|
|
9077
9077
|
async function z3(e, t, n, o, r, s, a, i) {
|
|
9078
9078
|
var v, y, k, C, R, x;
|
|
@@ -9081,7 +9081,7 @@ async function z3(e, t, n, o, r, s, a, i) {
|
|
|
9081
9081
|
return;
|
|
9082
9082
|
}
|
|
9083
9083
|
let l = !1;
|
|
9084
|
-
if ((o.ctrlKey || o.metaKey && o.shiftKey) && o.code === "KeyE" ? (
|
|
9084
|
+
if ((o.ctrlKey || o.metaKey && o.shiftKey) && o.code === "KeyE" ? (Lc(e, "center"), l = !0) : (o.ctrlKey || o.metaKey && o.shiftKey) && o.code === "KeyL" ? (Lc(e, "left"), l = !0) : (o.ctrlKey || o.metaKey && o.shiftKey) && o.code === "KeyR" && (Lc(e, "right"), l = !0), (o.metaKey || o.ctrlKey) && o.code === "KeyK") {
|
|
9085
9085
|
Ja(e, t, r), o.preventDefault(), o.stopPropagation();
|
|
9086
9086
|
return;
|
|
9087
9087
|
}
|
|
@@ -9606,7 +9606,7 @@ const Z4 = "Helvetica Neue, system-ui, Roboto, Lato, Segoe UI, Oxygen, Ubuntu, C
|
|
|
9606
9606
|
}, G4 = (e) => {
|
|
9607
9607
|
var t;
|
|
9608
9608
|
return Number(e == null ? void 0 : e.tb) === 2 || ((t = e == null ? void 0 : e.ct) == null ? void 0 : t.t) === "inlineStr" || /[\r\n]/.test(da(e));
|
|
9609
|
-
},
|
|
9609
|
+
}, Vu = (e, t) => {
|
|
9610
9610
|
const n = (e == null ? void 0 : e.fs) ?? $3, o = (e == null ? void 0 : e.ff) ?? Z4, r = (e == null ? void 0 : e.bl) === 1 ? "700" : "400", s = (e == null ? void 0 : e.it) === 1 ? "italic" : "normal";
|
|
9611
9611
|
return t.style.fontSize = `${n}px`, t.style.fontFamily = o, t.style.fontWeight = r, t.style.fontStyle = s, n;
|
|
9612
9612
|
};
|
|
@@ -9633,7 +9633,7 @@ function X4(e, t, n, o, r, s, a = 1200) {
|
|
|
9633
9633
|
const v = (m = f == null ? void 0 : f[b]) == null ? void 0 : m[w];
|
|
9634
9634
|
if (v != null && v.mc && v.mc.rs == null) continue;
|
|
9635
9635
|
const y = da(v);
|
|
9636
|
-
|
|
9636
|
+
Vu(v, h), h.style.whiteSpace = "pre", h.style.width = "auto", h.textContent = y;
|
|
9637
9637
|
const k = Math.ceil(h.scrollWidth + 12);
|
|
9638
9638
|
k > E && (E = k);
|
|
9639
9639
|
}
|
|
@@ -9644,7 +9644,7 @@ function X4(e, t, n, o, r, s, a = 1200) {
|
|
|
9644
9644
|
for (let b = r; b <= s; b++) {
|
|
9645
9645
|
const v = (g = f == null ? void 0 : f[w]) == null ? void 0 : g[b];
|
|
9646
9646
|
if (v != null && v.mc && v.mc.rs == null) continue;
|
|
9647
|
-
const y = da(v), k =
|
|
9647
|
+
const y = da(v), k = Vu(v, h);
|
|
9648
9648
|
if (G4(v)) {
|
|
9649
9649
|
const C = Math.max(
|
|
9650
9650
|
j1(b, e, l),
|
|
@@ -9689,7 +9689,7 @@ function Q4(e, t) {
|
|
|
9689
9689
|
if (!l || l.mc && l.mc.rs == null) continue;
|
|
9690
9690
|
const f = da(l);
|
|
9691
9691
|
if (!f) continue;
|
|
9692
|
-
|
|
9692
|
+
Vu(l, r);
|
|
9693
9693
|
const c = l.fs ?? e.defaultFontSize;
|
|
9694
9694
|
r.style.fontSize = `${c}pt`, r.style.whiteSpace = "pre", r.style.width = "auto", r.textContent = f;
|
|
9695
9695
|
const d = Math.ceil(r.scrollWidth + 12);
|
|
@@ -9746,7 +9746,7 @@ function W3(e, t, n, o, r, s, a) {
|
|
|
9746
9746
|
startColumn: x,
|
|
9747
9747
|
endRow: v,
|
|
9748
9748
|
endColumn: R
|
|
9749
|
-
})) !== !1 && (d5(e, k, P),
|
|
9749
|
+
})) !== !1 && (d5(e, k, P), Qf(e, t, k, P), !w && !E && (x < e.scrollLeft && (e.scrollLeft = x), y < e.scrollTop && (e.scrollTop = y)), !(n.button === 2 && V.some(
|
|
9750
9750
|
e.luckysheet_select_save,
|
|
9751
9751
|
(F) => F.row != null && k >= F.row[0] && k <= F.row[1] && P >= F.column[0] && P <= F.column[1]
|
|
9752
9752
|
)))) {
|
|
@@ -9959,7 +9959,7 @@ function Y3(e, t, n, o, r) {
|
|
|
9959
9959
|
const { column_focus: C, row_focus: R } = e.luckysheet_select_save[0];
|
|
9960
9960
|
!V.isNil(C) && !V.isNil(R) && (C !== b || R !== w) && (w = R, b = C), t.enteredEditByTyping = !1, delete t.pendingTypeOverCell, f5(e, w, b);
|
|
9961
9961
|
}
|
|
9962
|
-
function
|
|
9962
|
+
function yd(e, t, n, o, r, s) {
|
|
9963
9963
|
var d, h, p, m, g, w, E;
|
|
9964
9964
|
if (!e.allowEdit)
|
|
9965
9965
|
return;
|
|
@@ -10143,7 +10143,7 @@ function gd(e, t, n, o, r, s) {
|
|
|
10143
10143
|
});
|
|
10144
10144
|
}
|
|
10145
10145
|
}
|
|
10146
|
-
function
|
|
10146
|
+
function wd(e, t, n, o, r, s, a, i) {
|
|
10147
10147
|
var c, d, h, p;
|
|
10148
10148
|
const l = a.getBoundingClientRect();
|
|
10149
10149
|
if (e.luckysheet_scroll_status && !e.luckysheet_cols_change_size && !e.luckysheet_rows_change_size) {
|
|
@@ -10342,7 +10342,7 @@ function K3(e, t, n, o, r, s, a, i) {
|
|
|
10342
10342
|
((S == null ? void 0 : S.contains(n.target)) ?? !1) || (!W || ((x = e.editingCommentBox) == null ? void 0 : x.rc) === J ? e.hoveredCommentBox = void 0 : ((P = e.hoveredCommentBox) == null ? void 0 : P.rc) !== J && (e.hoveredCommentBox = Ds(e, q, b, y)));
|
|
10343
10343
|
}
|
|
10344
10344
|
}
|
|
10345
|
-
wm(e, n, r, s, a), p4(t, n), Sy(t, n), (e.luckysheet_scroll_status || e.luckysheet_select_status || e.luckysheet_rows_selected_status || e.luckysheet_cols_selected_status || e.luckysheet_cell_selected_move || e.luckysheet_cell_selected_extend || e.luckysheet_cols_change_size || e.luckysheet_rows_change_size) &&
|
|
10345
|
+
wm(e, n, r, s, a), p4(t, n), Sy(t, n), (e.luckysheet_scroll_status || e.luckysheet_select_status || e.luckysheet_rows_selected_status || e.luckysheet_cols_selected_status || e.luckysheet_cell_selected_move || e.luckysheet_cell_selected_extend || e.luckysheet_cols_change_size || e.luckysheet_rows_change_size) && wd(
|
|
10346
10346
|
e,
|
|
10347
10347
|
t,
|
|
10348
10348
|
n,
|
|
@@ -10356,7 +10356,7 @@ function K3(e, t, n, o, r, s, a, i) {
|
|
|
10356
10356
|
function q3(e, t, n, o, r, s, a, i, l) {
|
|
10357
10357
|
var c, d, h, p, m, g, w, E, b, v;
|
|
10358
10358
|
const f = a.getBoundingClientRect();
|
|
10359
|
-
if (qy(e, t), Gy(e, t),
|
|
10359
|
+
if (qy(e, t), Gy(e, t), ad(e, t), ld(e, t), Yy(e, t), $y(e, t), h5(e), g4(t), Ey(t), k4(e, t, o, r, s, a), e.formulaCache.rangestart || e.formulaCache.rangedrag_column_start || e.formulaCache.rangedrag_row_start) {
|
|
10360
10360
|
sn(e) === "fx" ? vr(e, i, l, 0, void 0, !1) : vr(e, l, i, 0, void 0, !1), e.luckysheet_select_status = !1, e.luckysheet_scroll_status = !1, e.luckysheet_rows_selected_status = !1, e.luckysheet_cols_selected_status = !1, o.preventDefault();
|
|
10361
10361
|
return;
|
|
10362
10362
|
}
|
|
@@ -11060,7 +11060,7 @@ const A1 = (e, t) => {
|
|
|
11060
11060
|
}
|
|
11061
11061
|
(r = e == null ? void 0 : e.hooks) != null && r.updateCellYdoc && ((s = e.hooks) == null || s.updateCellYdoc(n));
|
|
11062
11062
|
};
|
|
11063
|
-
function
|
|
11063
|
+
function $u(e, t, n) {
|
|
11064
11064
|
var s, a, i, l, f, c, d, h, p, m, g, w;
|
|
11065
11065
|
const o = (E) => {
|
|
11066
11066
|
const b = E.trim();
|
|
@@ -12014,12 +12014,12 @@ function r2(e, t) {
|
|
|
12014
12014
|
else if (!(h.indexOf("fortune-copy-action-image") > -1)) {
|
|
12015
12015
|
if (/<table[\s/>]/i.test(h) || s7(h)) {
|
|
12016
12016
|
const w = /<table[\s/>]/i.test(h), E = w ? h : i7(h);
|
|
12017
|
-
q4(e, E,
|
|
12017
|
+
q4(e, E, $u), w && pl(e);
|
|
12018
12018
|
} else if (!(c.files.length === 1 && c.files[0].type.indexOf("image") > -1)) {
|
|
12019
12019
|
if (h = c.getData("text/plain"), h.startsWith("="))
|
|
12020
12020
|
o2(e, h);
|
|
12021
12021
|
else {
|
|
12022
|
-
|
|
12022
|
+
$u(e, h);
|
|
12023
12023
|
const E = c.getData("text/html") || c.getData("text/plain");
|
|
12024
12024
|
if (Ki(E)) {
|
|
12025
12025
|
const v = (a = e.luckysheet_select_save) == null ? void 0 : a[e.luckysheet_select_save.length - 1];
|
|
@@ -12044,7 +12044,7 @@ function r2(e, t) {
|
|
|
12044
12044
|
}
|
|
12045
12045
|
}
|
|
12046
12046
|
}
|
|
12047
|
-
function
|
|
12047
|
+
function vd(e, t, n) {
|
|
12048
12048
|
var l, f, c;
|
|
12049
12049
|
if (!mt(e) || e.isFlvReadOnly) return;
|
|
12050
12050
|
if (t) {
|
|
@@ -12058,12 +12058,12 @@ function wd(e, t, n) {
|
|
|
12058
12058
|
if (a.abortPaste)
|
|
12059
12059
|
return;
|
|
12060
12060
|
const { internalFortunePaste: i } = a;
|
|
12061
|
-
(s.indexOf("fortune-copy-action-table") > -1 || s.indexOf("fortune-copy-action-span") > -1) && ((c = e.luckysheet_copy_save) == null ? void 0 : c.copyRange) != null && e.luckysheet_copy_save.copyRange.length > 0 && i ? e.luckysheet_paste_iscut ? (e.luckysheet_paste_iscut = !1, t2(e, e.luckysheet_copy_save)) : n2(e, e.luckysheet_copy_save) : s.indexOf("fortune-copy-action-image") > -1 || n !== "btn" && (t.startsWith("=") ? o2(e, t) :
|
|
12061
|
+
(s.indexOf("fortune-copy-action-table") > -1 || s.indexOf("fortune-copy-action-span") > -1) && ((c = e.luckysheet_copy_save) == null ? void 0 : c.copyRange) != null && e.luckysheet_copy_save.copyRange.length > 0 && i ? e.luckysheet_paste_iscut ? (e.luckysheet_paste_iscut = !1, t2(e, e.luckysheet_copy_save)) : n2(e, e.luckysheet_copy_save) : s.indexOf("fortune-copy-action-image") > -1 || n !== "btn" && (t.startsWith("=") ? o2(e, t) : $u(e, t));
|
|
12062
12062
|
}
|
|
12063
12063
|
const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12064
12064
|
__proto__: null,
|
|
12065
12065
|
CF_DATE_DEFAULT_FORMAT: Nr,
|
|
12066
|
-
Canvas:
|
|
12066
|
+
Canvas: Xf,
|
|
12067
12067
|
FormulaCache: w5,
|
|
12068
12068
|
MAX_ZOOM_RATIO: ca,
|
|
12069
12069
|
MIN_ZOOM_RATIO: ua,
|
|
@@ -12071,7 +12071,7 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12071
12071
|
addSheet: Wa,
|
|
12072
12072
|
advancePrimaryCellInLastMultiSelection: Ql,
|
|
12073
12073
|
api: E4,
|
|
12074
|
-
applyLinkToSelection:
|
|
12074
|
+
applyLinkToSelection: If,
|
|
12075
12075
|
applyLocation: Fn,
|
|
12076
12076
|
autoSelectionFormula: vp,
|
|
12077
12077
|
buildFiatCurrencyFormat: Fi,
|
|
@@ -12080,12 +12080,12 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12080
12080
|
cancelFunctionrangeSelected: Ua,
|
|
12081
12081
|
cancelNormalSelected: _r,
|
|
12082
12082
|
cancelPaintModel: Wi,
|
|
12083
|
-
captureLinkEditorOpenSnapshot:
|
|
12083
|
+
captureLinkEditorOpenSnapshot: Gf,
|
|
12084
12084
|
cellFadeAnimator: $r,
|
|
12085
|
-
cfSplitRange:
|
|
12085
|
+
cfSplitRange: Kf,
|
|
12086
12086
|
changeSheet: ws,
|
|
12087
12087
|
checkCF: cs,
|
|
12088
|
-
clearCellError:
|
|
12088
|
+
clearCellError: Nf,
|
|
12089
12089
|
clearColumnsCellsFormat: Rm,
|
|
12090
12090
|
clearFilter: sc,
|
|
12091
12091
|
clearFilterForColumn: a3,
|
|
@@ -12096,13 +12096,13 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12096
12096
|
colLocationByIndex: Ht,
|
|
12097
12097
|
confirmMessage: Dm,
|
|
12098
12098
|
createDropCellRange: Wp,
|
|
12099
|
-
createFilter:
|
|
12099
|
+
createFilter: rd,
|
|
12100
12100
|
createFilterOptions: rc,
|
|
12101
12101
|
createFormulaRangeSelect: Is,
|
|
12102
12102
|
createRangeHightlight: mn,
|
|
12103
|
-
defaultContext:
|
|
12103
|
+
defaultContext: Mf,
|
|
12104
12104
|
defaultLuckysheetSelectRanges: Va,
|
|
12105
|
-
defaultSettings:
|
|
12105
|
+
defaultSettings: hd,
|
|
12106
12106
|
defaultStyle: Mn,
|
|
12107
12107
|
deleteComment: Np,
|
|
12108
12108
|
deleteRowCol: Zn,
|
|
@@ -12111,7 +12111,7 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12111
12111
|
detectDateFormat: La,
|
|
12112
12112
|
diff: v5,
|
|
12113
12113
|
drawArrow: Ap,
|
|
12114
|
-
editComment:
|
|
12114
|
+
editComment: Qf,
|
|
12115
12115
|
editSheetName: lp,
|
|
12116
12116
|
ensureManualHiddenInitialized: Ha,
|
|
12117
12117
|
ensureSheetIndex: Am,
|
|
@@ -12119,8 +12119,8 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12119
12119
|
escapeScriptTag: zo,
|
|
12120
12120
|
execFunctionGroup: Ro,
|
|
12121
12121
|
execfunction: Qn,
|
|
12122
|
-
expandCellRectForMerge:
|
|
12123
|
-
filterPatch:
|
|
12122
|
+
expandCellRectForMerge: Mu,
|
|
12123
|
+
filterPatch: Uu,
|
|
12124
12124
|
fixColumnStyleOverflowInFreeze: mr,
|
|
12125
12125
|
fixPositionOnFrozenCells: Jt,
|
|
12126
12126
|
fixRowStyleOverflowInFreeze: pr,
|
|
@@ -12134,10 +12134,10 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12134
12134
|
getCellRowColumn: up,
|
|
12135
12135
|
getCellValue: an,
|
|
12136
12136
|
getComputeMap: Ma,
|
|
12137
|
-
getDataArr:
|
|
12137
|
+
getDataArr: Fu,
|
|
12138
12138
|
getDateBaseLocale: Nm,
|
|
12139
12139
|
getDateEditFormatForCell: C5,
|
|
12140
|
-
getDropdownList:
|
|
12140
|
+
getDropdownList: Of,
|
|
12141
12141
|
getFilterColumnColors: u3,
|
|
12142
12142
|
getFilterColumnValues: c3,
|
|
12143
12143
|
getFilterHiddenRowsUnion: Tm,
|
|
@@ -12147,33 +12147,33 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12147
12147
|
getFormulaEditorOwner: sn,
|
|
12148
12148
|
getFormulaRangeIndexAtCaret: Pa,
|
|
12149
12149
|
getFormulaRangeIndexForKeyboardSync: Lm,
|
|
12150
|
-
getFreezeState:
|
|
12150
|
+
getFreezeState: zu,
|
|
12151
12151
|
getHyperlinkAtCaretInContentEditable: Mm,
|
|
12152
|
-
getHyperlinkDisplayTextInCell:
|
|
12152
|
+
getHyperlinkDisplayTextInCell: $f,
|
|
12153
12153
|
getHyperlinksFromInlineSegments: Yr,
|
|
12154
12154
|
getInlineLinkPlainRange: by,
|
|
12155
12155
|
getInlineStringHTML: Om,
|
|
12156
|
-
getInlineStringNoStyle:
|
|
12157
|
-
getOptionValue:
|
|
12158
|
-
getQuickSearchHiddenConfig:
|
|
12156
|
+
getInlineStringNoStyle: xu,
|
|
12157
|
+
getOptionValue: Pu,
|
|
12158
|
+
getQuickSearchHiddenConfig: od,
|
|
12159
12159
|
getQuickSearchIndexArr: Xp,
|
|
12160
12160
|
getRangeByTxt: dr,
|
|
12161
12161
|
getRangeRectsByCharacterOffset: Hm,
|
|
12162
12162
|
getRangetxt: go,
|
|
12163
|
-
getRealCellValue:
|
|
12163
|
+
getRealCellValue: _u,
|
|
12164
12164
|
getRegStr: ei,
|
|
12165
12165
|
getSearchIndexArr: yo,
|
|
12166
12166
|
getSearchIndexArrAsync: r3,
|
|
12167
|
-
getSelectRange:
|
|
12167
|
+
getSelectRange: Bu,
|
|
12168
12168
|
getSheetIndex: De,
|
|
12169
12169
|
getStyleByCell: Fm,
|
|
12170
12170
|
getUniformLinkAtPlainOffset: hp,
|
|
12171
12171
|
getUniformLinkCoveringPlainRange: dp,
|
|
12172
|
-
getUniformLinkFromWindowSelectionInEditor:
|
|
12172
|
+
getUniformLinkFromWindowSelectionInEditor: jf,
|
|
12173
12173
|
getcellrange: J0,
|
|
12174
12174
|
getdatabyselection: zi,
|
|
12175
12175
|
getrangeseleciton: _5,
|
|
12176
|
-
goToLink:
|
|
12176
|
+
goToLink: Nu,
|
|
12177
12177
|
groupValuesRefresh: Hi,
|
|
12178
12178
|
handleBold: Ga,
|
|
12179
12179
|
handleBorder: ia,
|
|
@@ -12183,10 +12183,10 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12183
12183
|
handleColSizeHandleDoubleClick: G3,
|
|
12184
12184
|
handleColSizeHandleMouseDown: Z3,
|
|
12185
12185
|
handleColumnHeaderMouseDown: Hl,
|
|
12186
|
-
handleContextMenu:
|
|
12186
|
+
handleContextMenu: yd,
|
|
12187
12187
|
handleCopy: fa,
|
|
12188
12188
|
handleFormulaInput: vr,
|
|
12189
|
-
handleFreeze:
|
|
12189
|
+
handleFreeze: Tu,
|
|
12190
12190
|
handleGlobalKeyDown: z3,
|
|
12191
12191
|
handleHorizontalAlign: bp,
|
|
12192
12192
|
handleItalic: Xa,
|
|
@@ -12198,13 +12198,13 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12198
12198
|
handleOverlayTouchEnd: h3,
|
|
12199
12199
|
handleOverlayTouchStart: d3,
|
|
12200
12200
|
handlePaste: r2,
|
|
12201
|
-
handlePasteByClick:
|
|
12201
|
+
handlePasteByClick: vd,
|
|
12202
12202
|
handleRowFreezeHandleMouseDown: J3,
|
|
12203
12203
|
handleRowHeaderMouseDown: Ol,
|
|
12204
12204
|
handleRowSizeHandleMouseDown: X3,
|
|
12205
12205
|
handleScreenShot: Dp,
|
|
12206
12206
|
handleSort: xp,
|
|
12207
|
-
handleStrikeThrough:
|
|
12207
|
+
handleStrikeThrough: qf,
|
|
12208
12208
|
handleSum: Ly,
|
|
12209
12209
|
handleTextBackground: _p,
|
|
12210
12210
|
handleTextColor: kp,
|
|
@@ -12212,11 +12212,11 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12212
12212
|
handleUnderline: Qa,
|
|
12213
12213
|
handleVerticalAlign: Cp,
|
|
12214
12214
|
hideCRCount: ps,
|
|
12215
|
-
hideSelected:
|
|
12215
|
+
hideSelected: Su,
|
|
12216
12216
|
indexToColumnChar: fr,
|
|
12217
12217
|
initFreeze: ep,
|
|
12218
12218
|
initSheetIndex: Pm,
|
|
12219
|
-
insertDuneChart:
|
|
12219
|
+
insertDuneChart: id,
|
|
12220
12220
|
insertImage: Fp,
|
|
12221
12221
|
insertRowCol: Io,
|
|
12222
12222
|
insertUpdateFunctionGroup: mi,
|
|
@@ -12226,18 +12226,18 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12226
12226
|
isCaretAtValidFormulaRangeInsertionPoint: Ba,
|
|
12227
12227
|
isCurrencyLikeNumberFormat: x5,
|
|
12228
12228
|
isFormulaReferenceInputMode: Jn,
|
|
12229
|
-
isHyperlinkCreationBlocked:
|
|
12229
|
+
isHyperlinkCreationBlocked: Zf,
|
|
12230
12230
|
isInlineStringCell: Bo,
|
|
12231
12231
|
isLegacyFormulaRangeMode: Xr,
|
|
12232
12232
|
isLinkValid: gp,
|
|
12233
12233
|
isNumericCellType: Pi,
|
|
12234
12234
|
isRealNull: wr,
|
|
12235
12235
|
isRealNum: Dn,
|
|
12236
|
-
isShowHidenCR:
|
|
12236
|
+
isShowHidenCR: Hf,
|
|
12237
12237
|
isTypedCurrencyDisplayFormat: Bm,
|
|
12238
12238
|
isUsDateBaseLocale: S5,
|
|
12239
12239
|
isValidRangeText: Jl,
|
|
12240
|
-
is_date:
|
|
12240
|
+
is_date: Df,
|
|
12241
12241
|
iscelldata: em,
|
|
12242
12242
|
isdatatypemulti: lm,
|
|
12243
12243
|
isdatetime: E5,
|
|
@@ -12249,8 +12249,8 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12249
12249
|
markRangeSelectionDirty: gs,
|
|
12250
12250
|
maybeRecoverDirtyRangeSelection: zr,
|
|
12251
12251
|
mergeBorder: kr,
|
|
12252
|
-
mergeSelectionHasValues:
|
|
12253
|
-
mouseRender:
|
|
12252
|
+
mergeSelectionHasValues: Au,
|
|
12253
|
+
mouseRender: wd,
|
|
12254
12254
|
moveHighlightCell: en,
|
|
12255
12255
|
moveToEnd: Fa,
|
|
12256
12256
|
newComment: ec,
|
|
@@ -12261,10 +12261,10 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12261
12261
|
onCellsMoveStart: f3,
|
|
12262
12262
|
onCommentBoxMoveStart: Op,
|
|
12263
12263
|
onIframeMove: g3,
|
|
12264
|
-
onIframeMoveEnd:
|
|
12264
|
+
onIframeMoveEnd: ad,
|
|
12265
12265
|
onIframeMoveStart: y3,
|
|
12266
12266
|
onIframeResize: w3,
|
|
12267
|
-
onIframeResizeEnd:
|
|
12267
|
+
onIframeResizeEnd: ld,
|
|
12268
12268
|
onIframeResizeStart: v3,
|
|
12269
12269
|
onImageMoveStart: Pp,
|
|
12270
12270
|
onImageResizeStart: Bp,
|
|
@@ -12281,30 +12281,30 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12281
12281
|
remapFormulaReferencesByMap: wi,
|
|
12282
12282
|
removeActiveImage: la,
|
|
12283
12283
|
removeEditingComment: Ao,
|
|
12284
|
-
removeHyperlink:
|
|
12284
|
+
removeHyperlink: Yf,
|
|
12285
12285
|
removeHyperlinkForLink: mp,
|
|
12286
12286
|
removeOverShowComment: Mp,
|
|
12287
12287
|
replace: t3,
|
|
12288
12288
|
replaceAll: n3,
|
|
12289
12289
|
replaceAllScoped: o3,
|
|
12290
|
-
replaceHtml:
|
|
12290
|
+
replaceHtml: Eu,
|
|
12291
12291
|
rowLocation: Qt,
|
|
12292
12292
|
rowLocationByIndex: Ft,
|
|
12293
12293
|
runQuickSearchIndexArrAsync: s3,
|
|
12294
12294
|
sanitizeDuneUrl: Ki,
|
|
12295
|
-
saveFilter:
|
|
12295
|
+
saveFilter: Ou,
|
|
12296
12296
|
saveHyperlink: Kr,
|
|
12297
12297
|
scrollToHighlightCell: Uo,
|
|
12298
12298
|
searchAll: e3,
|
|
12299
12299
|
searchNext: Jp,
|
|
12300
12300
|
seedFormulaFuncSelectedRangeFromLastSelection: Cm,
|
|
12301
|
-
selectAll:
|
|
12302
|
-
selectTitlesMap:
|
|
12303
|
-
selectTitlesRange:
|
|
12304
|
-
selectionIsExactlyOneMergeBlock:
|
|
12301
|
+
selectAll: Lf,
|
|
12302
|
+
selectTitlesMap: Ff,
|
|
12303
|
+
selectTitlesRange: Pf,
|
|
12304
|
+
selectionIsExactlyOneMergeBlock: Bf,
|
|
12305
12305
|
seletedHighlistByindex: Vr,
|
|
12306
12306
|
setCaretPosition: Zl,
|
|
12307
|
-
setCellError:
|
|
12307
|
+
setCellError: Tf,
|
|
12308
12308
|
setCellValue: Xt,
|
|
12309
12309
|
setConditionRules: Wm,
|
|
12310
12310
|
setDateBaseLocale: Ym,
|
|
@@ -12315,9 +12315,9 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12315
12315
|
shouldPreserveDateFormatForEdit: j5,
|
|
12316
12316
|
shouldQuickSearchUseAsync: Qp,
|
|
12317
12317
|
showComments: Tp,
|
|
12318
|
-
showHideAllComments:
|
|
12318
|
+
showHideAllComments: Lu,
|
|
12319
12319
|
showHideComment: Lp,
|
|
12320
|
-
showImgChooser:
|
|
12320
|
+
showImgChooser: ed,
|
|
12321
12321
|
showLinkCard: bs,
|
|
12322
12322
|
showSelected: vi,
|
|
12323
12323
|
snapSheetSelectionFocusToCellPreserveMultiRange: bi,
|
|
@@ -12333,11 +12333,11 @@ const ON = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12333
12333
|
toolbarItemSelectedFunc: Ip,
|
|
12334
12334
|
update: Tn,
|
|
12335
12335
|
updateCell: Sn,
|
|
12336
|
-
updateContextWithCanvas:
|
|
12336
|
+
updateContextWithCanvas: Ru,
|
|
12337
12337
|
updateContextWithSheetData: Wo,
|
|
12338
12338
|
updateFormat: bn,
|
|
12339
12339
|
updateHyperlinkForLink: pp,
|
|
12340
|
-
updateMoreCell:
|
|
12340
|
+
updateMoreCell: Hu,
|
|
12341
12341
|
valueShowEs: ro
|
|
12342
12342
|
}, Symbol.toStringTag, { value: "Module" })), T1 = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd,aed,ars,aud,bdt,bhd,bmd,brl,cad,chf,clp,cny,czk,dkk,eur,gbp,gel,hkd,huf,idr,ils,inr,jpy,krw,kwd,lkr,mmk,mxn,myr,ngn,nok,nzd,php,pkr,pln,rub,sar,sek,sgd,thb,try,twd,uah,vef,vnd,zar", l7 = 60 * 1e3, a7 = ["bitcoin", "ethereum", "solana"], c7 = [
|
|
12343
12343
|
"usd",
|
|
@@ -12402,7 +12402,7 @@ function L1(e, t) {
|
|
|
12402
12402
|
const M1 = async (e) => new Promise((t, n) => {
|
|
12403
12403
|
fetch(e).then((o) => o.json()).then((o) => t(o)).catch((o) => n(o));
|
|
12404
12404
|
});
|
|
12405
|
-
async function
|
|
12405
|
+
async function bd(e, t) {
|
|
12406
12406
|
var a;
|
|
12407
12407
|
const n = `${e}-${t}`.toLowerCase(), o = Date.now();
|
|
12408
12408
|
if (Mr[n] && o - Mr[n].timestamp < l7)
|
|
@@ -12418,7 +12418,7 @@ async function vd(e, t) {
|
|
|
12418
12418
|
const u7 = (e, t) => {
|
|
12419
12419
|
var o;
|
|
12420
12420
|
const n = `${e}-${t}`.toLowerCase();
|
|
12421
|
-
return
|
|
12421
|
+
return bd(e, t), (o = Mr[n]) == null ? void 0 : o.price;
|
|
12422
12422
|
}, f7 = {
|
|
12423
12423
|
globalCache: { undoList: [], redoList: [] },
|
|
12424
12424
|
cellInput: hn.createRef(),
|
|
@@ -12427,10 +12427,10 @@ const u7 = (e, t) => {
|
|
|
12427
12427
|
cellArea: hn.createRef(),
|
|
12428
12428
|
workbookContainer: hn.createRef()
|
|
12429
12429
|
}, ct = hn.createContext({
|
|
12430
|
-
context:
|
|
12430
|
+
context: Mf(f7),
|
|
12431
12431
|
setContext: () => {
|
|
12432
12432
|
},
|
|
12433
|
-
settings:
|
|
12433
|
+
settings: hd,
|
|
12434
12434
|
handleUndo: () => {
|
|
12435
12435
|
},
|
|
12436
12436
|
handleRedo: () => {
|
|
@@ -13069,9 +13069,9 @@ const u7 = (e, t) => {
|
|
|
13069
13069
|
let A = {};
|
|
13070
13070
|
for (let Q = 0; Q < L.length; Q += 1) {
|
|
13071
13071
|
const X = L[Q].column[0], oe = L[Q].column[1];
|
|
13072
|
-
A =
|
|
13072
|
+
A = Ff(A, X, oe);
|
|
13073
13073
|
}
|
|
13074
|
-
const B =
|
|
13074
|
+
const B = Pf(A), M = [];
|
|
13075
13075
|
for (let Q = 0; Q < B.length; Q += 1) {
|
|
13076
13076
|
const X = B[Q][0], oe = B[Q][B[Q].length - 1], T = Ht(oe, e.visibledatacolumn)[1], j = Ht(X, e.visibledatacolumn)[0];
|
|
13077
13077
|
V.isNumber(T) && V.isNumber(j) && M.push({ col: T, col_pre: j, c1: X, c2: oe });
|
|
@@ -13929,7 +13929,7 @@ const u7 = (e, t) => {
|
|
|
13929
13929
|
(H) => {
|
|
13930
13930
|
const { nativeEvent: L } = H;
|
|
13931
13931
|
t((A) => {
|
|
13932
|
-
|
|
13932
|
+
yd(
|
|
13933
13933
|
A,
|
|
13934
13934
|
n,
|
|
13935
13935
|
L,
|
|
@@ -13952,9 +13952,9 @@ const u7 = (e, t) => {
|
|
|
13952
13952
|
let B = {};
|
|
13953
13953
|
for (let X = 0; X < A.length; X += 1) {
|
|
13954
13954
|
const oe = A[X].row[0], T = A[X].row[1];
|
|
13955
|
-
B =
|
|
13955
|
+
B = Ff(B, oe, T);
|
|
13956
13956
|
}
|
|
13957
|
-
const M =
|
|
13957
|
+
const M = Pf(B), Q = [];
|
|
13958
13958
|
for (let X = 0; X < M.length; X += 1) {
|
|
13959
13959
|
const oe = M[X][0], T = M[X][M[X].length - 1], j = Ft(T, e.visibledatarow)[1], F = Ft(oe, e.visibledatarow)[0];
|
|
13960
13960
|
V.isNumber(F) && V.isNumber(j) && Q.push({ row: j, row_pre: F, r1: oe, r2: T });
|
|
@@ -15780,7 +15780,7 @@ function ha(e) {
|
|
|
15780
15780
|
t.current = e;
|
|
15781
15781
|
}, [e]), t.current;
|
|
15782
15782
|
}
|
|
15783
|
-
function
|
|
15783
|
+
function Uc(e) {
|
|
15784
15784
|
e.focus();
|
|
15785
15785
|
const t = document.createRange(), n = window.getSelection();
|
|
15786
15786
|
t.selectNodeContents(e), t.collapse(!1), n && (n.removeAllRanges(), n.addRange(t));
|
|
@@ -15852,7 +15852,7 @@ function v7(e, t, n) {
|
|
|
15852
15852
|
const f = i(s), c = document.createRange();
|
|
15853
15853
|
l && f ? (c.setStart(l.node, l.offset), c.setEnd(f.node, f.offset)) : (c.selectNodeContents(e), c.collapse(!1)), o.removeAllRanges(), o.addRange(c);
|
|
15854
15854
|
}
|
|
15855
|
-
function
|
|
15855
|
+
function Cd(e, t) {
|
|
15856
15856
|
const n = e.innerText || "", o = window.getSelection(), s = !!(o != null && o.rangeCount) && e.contains(o.getRangeAt(0).startContainer) ? Pn(e) : n.length, a = Math.max(0, Math.min(s, n.length)), i = n.slice(0, a), l = n.slice(a);
|
|
15857
15857
|
let f = a;
|
|
15858
15858
|
const c = i.match(/[A-Za-z_][A-Za-z0-9_]*$/);
|
|
@@ -15866,20 +15866,20 @@ function bd(e, t) {
|
|
|
15866
15866
|
caretOffset: f + h.length
|
|
15867
15867
|
};
|
|
15868
15868
|
}
|
|
15869
|
-
function
|
|
15869
|
+
function Wu(e) {
|
|
15870
15870
|
return /^[a-zA-Z]+\d+$/.test(e);
|
|
15871
15871
|
}
|
|
15872
|
-
function
|
|
15872
|
+
function Yu(e) {
|
|
15873
15873
|
return (e || "").replace(/\u00a0/g, " ").replace(/\u200b/g, "");
|
|
15874
15874
|
}
|
|
15875
15875
|
function c2(e) {
|
|
15876
|
-
const t = e.innerText ?? "", n = Pn(e), o = t.slice(0, Math.max(0, Math.min(n, t.length))), r =
|
|
15876
|
+
const t = e.innerText ?? "", n = Pn(e), o = t.slice(0, Math.max(0, Math.min(n, t.length))), r = Yu(t), s = Yu(o);
|
|
15877
15877
|
return { text: r, beforeCaret: s, caret: s.length };
|
|
15878
15878
|
}
|
|
15879
15879
|
function u2(e) {
|
|
15880
15880
|
if (!e) return !1;
|
|
15881
15881
|
const t = e.innerText ?? "";
|
|
15882
|
-
return
|
|
15882
|
+
return Yu(t).trimStart()[0] === "=";
|
|
15883
15883
|
}
|
|
15884
15884
|
function us(e) {
|
|
15885
15885
|
if (!e) return !1;
|
|
@@ -16771,7 +16771,7 @@ const k7 = {
|
|
|
16771
16771
|
]
|
|
16772
16772
|
}
|
|
16773
16773
|
)
|
|
16774
|
-
}, _7 = { ...k7 }, ar =
|
|
16774
|
+
}, _7 = { ...k7 }, ar = Rf(
|
|
16775
16775
|
({ name: e, className: t, strokeWidth: n, size: o, fill: r, stroke: s, ...a }, i) => {
|
|
16776
16776
|
const l = o === "sm" ? "w-6 h-6" : o === "lg" ? "w-10 h-10" : "w-8 h-8", f = _7[e];
|
|
16777
16777
|
return f ? /* @__PURE__ */ u.jsx(
|
|
@@ -17016,7 +17016,7 @@ const N7 = () => {
|
|
|
17016
17016
|
const we = o.current;
|
|
17017
17017
|
if (!we) return;
|
|
17018
17018
|
const Me = we.textContent;
|
|
17019
|
-
(!Me || Me === K) && (we.innerHTML = K,
|
|
17019
|
+
(!Me || Me === K) && (we.innerHTML = K, Uc(we));
|
|
17020
17020
|
}, ne = () => {
|
|
17021
17021
|
localStorage.setItem("formulaMore", String(W)), S(!W);
|
|
17022
17022
|
};
|
|
@@ -17178,7 +17178,7 @@ const N7 = () => {
|
|
|
17178
17178
|
}));
|
|
17179
17179
|
}, Fe = () => {
|
|
17180
17180
|
const ze = window.getSelection();
|
|
17181
|
-
ze != null && ze.focusNode && we.contains(ze.focusNode) &&
|
|
17181
|
+
ze != null && ze.focusNode && we.contains(ze.focusNode) && Gf(
|
|
17182
17182
|
Z.current,
|
|
17183
17183
|
we,
|
|
17184
17184
|
n.globalCache
|
|
@@ -17208,7 +17208,7 @@ const N7 = () => {
|
|
|
17208
17208
|
we.formulaRangeHighlight = [], we.formulaRangeSelect = void 0, we.formulaCache.selectingRangeIndex = -1, we.formulaCache.func_selectedrange = void 0, we.formulaCache.rangestart = !1, we.formulaCache.rangedrag_column_start = !1, we.formulaCache.rangedrag_row_start = !1, we.formulaCache.rangechangeindex = void 0;
|
|
17209
17209
|
});
|
|
17210
17210
|
}, [e.luckysheetCellUpdate, s, t]), Se(() => {
|
|
17211
|
-
l(
|
|
17211
|
+
l(Hf(e));
|
|
17212
17212
|
}, [e.luckysheet_select_save]), Se(() => {
|
|
17213
17213
|
var we;
|
|
17214
17214
|
(!y || (we = e.rangeDialog) != null && we.show || V.isEmpty(e.luckysheetCellUpdate)) && c(!1);
|
|
@@ -17226,7 +17226,7 @@ const N7 = () => {
|
|
|
17226
17226
|
if (!Me) return;
|
|
17227
17227
|
const Fe = document.getElementById(
|
|
17228
17228
|
"luckysheet-functionbox-cell"
|
|
17229
|
-
), { text: ze, caretOffset: $e } =
|
|
17229
|
+
), { text: ze, caretOffset: $e } = Cd(
|
|
17230
17230
|
Me,
|
|
17231
17231
|
we
|
|
17232
17232
|
), wt = zo(ze), gt = ue(wt), Ge = he(gt) ? xr(gt) : hr(gt);
|
|
@@ -17244,7 +17244,7 @@ const N7 = () => {
|
|
|
17244
17244
|
const Me = ($e = (ze = $()) == null ? void 0 : ze.querySelector(
|
|
17245
17245
|
".luckysheet-formula-search-func"
|
|
17246
17246
|
)) == null ? void 0 : $e.textContent, Fe = ye();
|
|
17247
|
-
Me &&
|
|
17247
|
+
Me && !Wu(Fe) && (se(Me), we.preventDefault(), we.stopPropagation());
|
|
17248
17248
|
},
|
|
17249
17249
|
[$, se]
|
|
17250
17250
|
), ce = Ee(
|
|
@@ -17255,7 +17255,7 @@ const N7 = () => {
|
|
|
17255
17255
|
const Me = ($e = (ze = $()) == null ? void 0 : ze.querySelector(
|
|
17256
17256
|
".luckysheet-formula-search-func"
|
|
17257
17257
|
)) == null ? void 0 : $e.textContent, Fe = ye();
|
|
17258
|
-
Me &&
|
|
17258
|
+
Me && !Wu(Fe) && (se(Me), we.preventDefault(), we.stopPropagation());
|
|
17259
17259
|
},
|
|
17260
17260
|
[$, se]
|
|
17261
17261
|
), Ce = (we) => {
|
|
@@ -17354,8 +17354,8 @@ const N7 = () => {
|
|
|
17354
17354
|
es.className = "luckysheet-input-span";
|
|
17355
17355
|
const Xo = document.createTextNode("");
|
|
17356
17356
|
es.appendChild(Xo), Ir.insertAdjacentElement("afterend", es);
|
|
17357
|
-
const
|
|
17358
|
-
|
|
17357
|
+
const Ac = document.createRange();
|
|
17358
|
+
Ac.setStart(Xo, 0), Ac.collapse(!0), et.removeAllRanges(), et.addRange(Ac);
|
|
17359
17359
|
};
|
|
17360
17360
|
if (Ye.startContainer.nodeType === Node.ELEMENT_NODE) {
|
|
17361
17361
|
const Ir = Ye.startContainer, es = Ye.startOffset - 1, Xo = es >= 0 ? Ir.childNodes[es] : null;
|
|
@@ -17491,7 +17491,7 @@ const N7 = () => {
|
|
|
17491
17491
|
et(2), Ce(we);
|
|
17492
17492
|
} else if (we.code === "KeyS") {
|
|
17493
17493
|
const Ze = ((Kt = o.current) == null ? void 0 : Kt.innerHTML) ?? "";
|
|
17494
|
-
|
|
17494
|
+
qf(e, o.current);
|
|
17495
17495
|
const et = (Ye) => {
|
|
17496
17496
|
requestAnimationFrame(() => {
|
|
17497
17497
|
var rt;
|
|
@@ -17530,7 +17530,7 @@ const N7 = () => {
|
|
|
17530
17530
|
}, 0);
|
|
17531
17531
|
}
|
|
17532
17532
|
T.current && requestAnimationFrame(ge), Pn(o == null ? void 0 : o.current) === (o == null ? void 0 : o.current.innerText.length) && setTimeout(() => {
|
|
17533
|
-
|
|
17533
|
+
Uc(o == null ? void 0 : o.current);
|
|
17534
17534
|
}, 5);
|
|
17535
17535
|
}
|
|
17536
17536
|
if (it && Jn(e) && (Ge = !1, we.shiftKey && we.preventDefault()), we.key === "Escape" && e.luckysheetCellUpdate.length > 0)
|
|
@@ -17697,8 +17697,8 @@ const N7 = () => {
|
|
|
17697
17697
|
if (et !== Ye) continue;
|
|
17698
17698
|
} else if (!et.includes(Ye))
|
|
17699
17699
|
continue;
|
|
17700
|
-
const ot =
|
|
17701
|
-
(ot == null ? void 0 : ot.linkType) === "webpage" && (ot.linkAddress || "").trim() === Dt.url.trim() || (
|
|
17700
|
+
const ot = jf(Fe);
|
|
17701
|
+
(ot == null ? void 0 : ot.linkType) === "webpage" && (ot.linkAddress || "").trim() === Dt.url.trim() || (If(Fe, "webpage", Dt.url), Et = !0);
|
|
17702
17702
|
}
|
|
17703
17703
|
if (B1(Fe), !wt || Et)
|
|
17704
17704
|
return;
|
|
@@ -17795,7 +17795,7 @@ const N7 = () => {
|
|
|
17795
17795
|
}), !Xe || i || e.luckysheetCellUpdate.length === 0)
|
|
17796
17796
|
return;
|
|
17797
17797
|
const Me = n.cellInput.current;
|
|
17798
|
-
Me && (Me.contains(we.target) || (we.preventDefault(), Me.focus({ preventScroll: !0 }),
|
|
17798
|
+
Me && (Me.contains(we.target) || (we.preventDefault(), Me.focus({ preventScroll: !0 }), Uc(Me), t((Fe) => {
|
|
17799
17799
|
Xn(Fe, "cell");
|
|
17800
17800
|
})));
|
|
17801
17801
|
},
|
|
@@ -18405,7 +18405,7 @@ const N7 = () => {
|
|
|
18405
18405
|
title: e === "yesno" ? "Confirmation" : void 0,
|
|
18406
18406
|
children: o
|
|
18407
18407
|
}
|
|
18408
|
-
),
|
|
18408
|
+
), kd = hn.createContext({
|
|
18409
18409
|
component: null,
|
|
18410
18410
|
showModal: () => {
|
|
18411
18411
|
},
|
|
@@ -18426,7 +18426,7 @@ const N7 = () => {
|
|
|
18426
18426
|
}),
|
|
18427
18427
|
[r, o]
|
|
18428
18428
|
);
|
|
18429
|
-
return /* @__PURE__ */ u.jsxs(
|
|
18429
|
+
return /* @__PURE__ */ u.jsxs(kd.Provider, { value: s, children: [
|
|
18430
18430
|
e,
|
|
18431
18431
|
t && /* @__PURE__ */ u.jsx(
|
|
18432
18432
|
"div",
|
|
@@ -18442,7 +18442,7 @@ const N7 = () => {
|
|
|
18442
18442
|
] });
|
|
18443
18443
|
};
|
|
18444
18444
|
function Go() {
|
|
18445
|
-
const { showModal: e, hideModal: t } = lt(
|
|
18445
|
+
const { showModal: e, hideModal: t } = lt(kd);
|
|
18446
18446
|
return {
|
|
18447
18447
|
showAlert: Ee(
|
|
18448
18448
|
(o, r = "ok", s = t, a = t) => {
|
|
@@ -18645,14 +18645,14 @@ const H7 = ({ getContainer: e }) => {
|
|
|
18645
18645
|
}
|
|
18646
18646
|
const { findAndReplace: ge } = ht(ue), ne = s, fe = i;
|
|
18647
18647
|
he.skipped > 0 ? m(
|
|
18648
|
-
|
|
18648
|
+
Eu(ge.replaceAllSuccessWithSkippedInfotext, {
|
|
18649
18649
|
n: he.replaced,
|
|
18650
18650
|
skipped: he.skipped,
|
|
18651
18651
|
find: ne,
|
|
18652
18652
|
replace: fe
|
|
18653
18653
|
})
|
|
18654
18654
|
) : m(
|
|
18655
|
-
|
|
18655
|
+
Eu(ge.replaceAllSuccessInfotext, {
|
|
18656
18656
|
n: he.replaced,
|
|
18657
18657
|
find: ne,
|
|
18658
18658
|
replace: fe
|
|
@@ -19151,9 +19151,9 @@ const H7 = ({ getContainer: e }) => {
|
|
|
19151
19151
|
children: [
|
|
19152
19152
|
/* @__PURE__ */ u.jsxs(W5, { id: "searchAllbox", children: [
|
|
19153
19153
|
/* @__PURE__ */ u.jsx(Y5, { className: "color-bg-secondary", children: /* @__PURE__ */ u.jsxs(s1, { children: [
|
|
19154
|
-
/* @__PURE__ */ u.jsx(
|
|
19155
|
-
/* @__PURE__ */ u.jsx(
|
|
19156
|
-
/* @__PURE__ */ u.jsx(
|
|
19154
|
+
/* @__PURE__ */ u.jsx(Oc, { children: r.searchTargetSheet }),
|
|
19155
|
+
/* @__PURE__ */ u.jsx(Oc, { children: r.searchTargetCell }),
|
|
19156
|
+
/* @__PURE__ */ u.jsx(Oc, { children: r.searchTargetValue })
|
|
19157
19157
|
] }) }),
|
|
19158
19158
|
/* @__PURE__ */ u.jsxs(K5, { children: [
|
|
19159
19159
|
N > 0 && /* @__PURE__ */ u.jsx(
|
|
@@ -19193,9 +19193,9 @@ const H7 = ({ getContainer: e }) => {
|
|
|
19193
19193
|
},
|
|
19194
19194
|
tabIndex: 0,
|
|
19195
19195
|
children: [
|
|
19196
|
-
/* @__PURE__ */ u.jsx(
|
|
19197
|
-
/* @__PURE__ */ u.jsx(
|
|
19198
|
-
/* @__PURE__ */ u.jsx(
|
|
19196
|
+
/* @__PURE__ */ u.jsx(Hc, { className: "find-replace-table-cell", children: ue.sheetName }),
|
|
19197
|
+
/* @__PURE__ */ u.jsx(Hc, { className: "find-replace-table-cell", children: ue.cellPosition }),
|
|
19198
|
+
/* @__PURE__ */ u.jsx(Hc, { className: "find-replace-table-cell", children: ue.value })
|
|
19199
19199
|
]
|
|
19200
19200
|
},
|
|
19201
19201
|
`${ue.sheetId}-${ue.cellPosition}`
|
|
@@ -19265,15 +19265,15 @@ function Y1(e, t) {
|
|
|
19265
19265
|
const n = Math.max(0, Math.min(e.length, t.start)), o = Math.max(n, Math.min(e.length, t.end));
|
|
19266
19266
|
return e.slice(n, o);
|
|
19267
19267
|
}
|
|
19268
|
-
function
|
|
19268
|
+
function _d(e) {
|
|
19269
19269
|
return String(e ?? "").trim().replace(/^mailto:/i, "");
|
|
19270
19270
|
}
|
|
19271
19271
|
function Fl(e) {
|
|
19272
|
-
const t =
|
|
19272
|
+
const t = _d(e);
|
|
19273
19273
|
return t ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t) : !1;
|
|
19274
19274
|
}
|
|
19275
19275
|
function w2(e, t, n) {
|
|
19276
|
-
return e === "webpage" && Fl(t) ? `Send to: ${
|
|
19276
|
+
return e === "webpage" && Fl(t) ? `Send to: ${_d(t)}` : t.trim() || n;
|
|
19277
19277
|
}
|
|
19278
19278
|
function v2(e) {
|
|
19279
19279
|
const t = String(e ?? "").trim();
|
|
@@ -19283,7 +19283,7 @@ function pa(e) {
|
|
|
19283
19283
|
const t = String(e ?? "").trim(), n = v2(e);
|
|
19284
19284
|
if (!n)
|
|
19285
19285
|
return {
|
|
19286
|
-
title: `Send to: ${
|
|
19286
|
+
title: `Send to: ${_d(e)}`,
|
|
19287
19287
|
urlText: ""
|
|
19288
19288
|
};
|
|
19289
19289
|
try {
|
|
@@ -19564,7 +19564,7 @@ const B7 = ({
|
|
|
19564
19564
|
className: "fortune-link-card__info link-content fortune-link-card__multi-info fortune-link-card__link-truncate",
|
|
19565
19565
|
onClick: () => {
|
|
19566
19566
|
h(
|
|
19567
|
-
(j) =>
|
|
19567
|
+
(j) => Nu(
|
|
19568
19568
|
j,
|
|
19569
19569
|
e,
|
|
19570
19570
|
t,
|
|
@@ -19669,7 +19669,7 @@ const B7 = ({
|
|
|
19669
19669
|
), _ = W1(F), N = Y1(
|
|
19670
19670
|
_,
|
|
19671
19671
|
U
|
|
19672
|
-
), G =
|
|
19672
|
+
), G = $f(
|
|
19673
19673
|
F ?? null,
|
|
19674
19674
|
oe
|
|
19675
19675
|
);
|
|
@@ -19696,7 +19696,7 @@ const B7 = ({
|
|
|
19696
19696
|
className: "fortune-link-card__info link-content fortune-link-card__link-truncate",
|
|
19697
19697
|
onClick: () => {
|
|
19698
19698
|
h(
|
|
19699
|
-
(oe) =>
|
|
19699
|
+
(oe) => Nu(
|
|
19700
19700
|
oe,
|
|
19701
19701
|
e,
|
|
19702
19702
|
t,
|
|
@@ -19811,7 +19811,7 @@ const B7 = ({
|
|
|
19811
19811
|
d.allowEdit === !0 && !d.isFlvReadOnly && B(
|
|
19812
19812
|
"unlink",
|
|
19813
19813
|
() => h((oe) => {
|
|
19814
|
-
V.set(p.globalCache, "linkCard.mouseEnter", !1),
|
|
19814
|
+
V.set(p.globalCache, "linkCard.mouseEnter", !1), Yf(oe, e, t), ln(oe, null, void 0);
|
|
19815
19815
|
})
|
|
19816
19816
|
)
|
|
19817
19817
|
] })
|
|
@@ -20640,7 +20640,7 @@ const B7 = ({
|
|
|
20640
20640
|
);
|
|
20641
20641
|
};
|
|
20642
20642
|
function wo() {
|
|
20643
|
-
const { showModal: e, hideModal: t } = lt(
|
|
20643
|
+
const { showModal: e, hideModal: t } = lt(kd);
|
|
20644
20644
|
return {
|
|
20645
20645
|
showDialog: Ee(
|
|
20646
20646
|
(o, r, s, a, i, l = t, f = t) => {
|
|
@@ -20695,7 +20695,7 @@ const Y7 = () => {
|
|
|
20695
20695
|
if (!C) return;
|
|
20696
20696
|
const R = C[`${g}_${w}`];
|
|
20697
20697
|
if (!R) return;
|
|
20698
|
-
const x =
|
|
20698
|
+
const x = Of(e, R.value1), P = an(g, w, v);
|
|
20699
20699
|
P && c(P.toString().split(","));
|
|
20700
20700
|
const { color: q } = R, J = q == null ? void 0 : q.split(",").map((S) => S.trim()), W = [];
|
|
20701
20701
|
for (let S = 0; S < J.length; S += 3)
|
|
@@ -20856,7 +20856,7 @@ const Y7 = () => {
|
|
|
20856
20856
|
const f = (d) => {
|
|
20857
20857
|
g3(e, n.globalCache, d);
|
|
20858
20858
|
}, c = () => {
|
|
20859
|
-
|
|
20859
|
+
ad(e, n.globalCache), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", c);
|
|
20860
20860
|
};
|
|
20861
20861
|
document.addEventListener("mousemove", f), document.addEventListener("mouseup", c);
|
|
20862
20862
|
}
|
|
@@ -20900,7 +20900,7 @@ const Y7 = () => {
|
|
|
20900
20900
|
const c = (h) => {
|
|
20901
20901
|
w3(e, n.globalCache, h);
|
|
20902
20902
|
}, d = () => {
|
|
20903
|
-
|
|
20903
|
+
ld(e, n.globalCache), document.removeEventListener(
|
|
20904
20904
|
"mousemove",
|
|
20905
20905
|
c
|
|
20906
20906
|
), document.removeEventListener(
|
|
@@ -20987,14 +20987,14 @@ function X7(e) {
|
|
|
20987
20987
|
const t = e.luckysheet_select_save;
|
|
20988
20988
|
if (!(t != null && t.length)) return null;
|
|
20989
20989
|
const n = t[t.length - 1];
|
|
20990
|
-
if (n.row[0] === n.row[1] && n.column[0] === n.column[1] ||
|
|
20990
|
+
if (n.row[0] === n.row[1] && n.column[0] === n.column[1] || Bf(e, n))
|
|
20991
20991
|
return null;
|
|
20992
20992
|
if (n.row_focus != null && n.column_focus != null)
|
|
20993
20993
|
return { r: n.row_focus, c: n.column_focus };
|
|
20994
20994
|
const o = Math.min(n.row[0], n.row[1]), r = Math.min(n.column[0], n.column[1]);
|
|
20995
20995
|
return { r: o, c: r };
|
|
20996
20996
|
}
|
|
20997
|
-
function
|
|
20997
|
+
function Ku(e) {
|
|
20998
20998
|
const t = e.replace("#", "");
|
|
20999
20999
|
if (t.length !== 6)
|
|
21000
21000
|
return { backgroundColor: e, borderColor: e };
|
|
@@ -21007,7 +21007,7 @@ function Yu(e) {
|
|
|
21007
21007
|
const Q7 = "#1a8026";
|
|
21008
21008
|
function J7(e) {
|
|
21009
21009
|
return {
|
|
21010
|
-
...
|
|
21010
|
+
...Ku(e),
|
|
21011
21011
|
borderStyle: "solid",
|
|
21012
21012
|
borderWidth: 2
|
|
21013
21013
|
};
|
|
@@ -21018,9 +21018,9 @@ const e8 = () => {
|
|
|
21018
21018
|
if (!e.showQuickSearch) return [];
|
|
21019
21019
|
const N = e.quickSearchHighlight;
|
|
21020
21020
|
if (!N || N.matches.length === 0) return [];
|
|
21021
|
-
const { matches: G, activeIndex: ee } = N, K = G[ee] ?? G[0], ae =
|
|
21021
|
+
const { matches: G, activeIndex: ee } = N, K = G[ee] ?? G[0], ae = Mu(e, K.r, K.c), pe = `${ae.r1}_${ae.r2}_${ae.c1}_${ae.c2}`, de = /* @__PURE__ */ new Map();
|
|
21022
21022
|
return G.forEach(({ r: me, c: ve }) => {
|
|
21023
|
-
const ue =
|
|
21023
|
+
const ue = Mu(e, me, ve), he = `${ue.r1}_${ue.r2}_${ue.c1}_${ue.c2}`, ge = he === pe, ne = de.get(he);
|
|
21024
21024
|
ne ? ge && (ne.active = !0) : de.set(he, { ...ue, active: ge });
|
|
21025
21025
|
}), Array.from(de.entries()).map(([me, ve]) => {
|
|
21026
21026
|
const ue = Vr(
|
|
@@ -21124,7 +21124,7 @@ const e8 = () => {
|
|
|
21124
21124
|
(N) => {
|
|
21125
21125
|
const { nativeEvent: G } = N;
|
|
21126
21126
|
t((ee) => {
|
|
21127
|
-
|
|
21127
|
+
yd(
|
|
21128
21128
|
ee,
|
|
21129
21129
|
n,
|
|
21130
21130
|
G,
|
|
@@ -21151,7 +21151,7 @@ const e8 = () => {
|
|
|
21151
21151
|
[o.cellArea, o.globalCache, t, n]
|
|
21152
21152
|
), x = Ee(() => {
|
|
21153
21153
|
t((N) => {
|
|
21154
|
-
|
|
21154
|
+
Lf(N);
|
|
21155
21155
|
});
|
|
21156
21156
|
}, [t]), P = at(
|
|
21157
21157
|
() => V.debounce(
|
|
@@ -21497,7 +21497,7 @@ const e8 = () => {
|
|
|
21497
21497
|
"div",
|
|
21498
21498
|
{
|
|
21499
21499
|
className: "fortune-selection-copy-hc",
|
|
21500
|
-
style:
|
|
21500
|
+
style: Ku("#12a5ff")
|
|
21501
21501
|
}
|
|
21502
21502
|
)
|
|
21503
21503
|
}
|
|
@@ -21514,7 +21514,7 @@ const e8 = () => {
|
|
|
21514
21514
|
"div",
|
|
21515
21515
|
{
|
|
21516
21516
|
className: "fortune-selection-copy-hc",
|
|
21517
|
-
style:
|
|
21517
|
+
style: Ku(ee)
|
|
21518
21518
|
}
|
|
21519
21519
|
)
|
|
21520
21520
|
},
|
|
@@ -21660,7 +21660,7 @@ const e8 = () => {
|
|
|
21660
21660
|
),
|
|
21661
21661
|
(((j = e.luckysheet_select_save) == null ? void 0 : j.length) ?? 0) > 0 && /* @__PURE__ */ u.jsx("div", { id: "luckysheet-cell-selected-boxs", children: e.luckysheet_select_save.map((N, G) => {
|
|
21662
21662
|
var ue, he, ge;
|
|
21663
|
-
const ee = (((ue = e.luckysheetCellUpdate) == null ? void 0 : ue.length) ?? 0) > 0, K = (e.showSearch || e.showReplace) && !!e.searchRangeScopeHighlight && N.row[0] === e.searchRangeScopeHighlight.row[0] && N.row[1] === e.searchRangeScopeHighlight.row[1] && N.column[0] === e.searchRangeScopeHighlight.column[0] && N.column[1] === e.searchRangeScopeHighlight.column[1], ae = e.formulaCache.rangestart || e.formulaCache.rangedrag_column_start || e.formulaCache.rangedrag_row_start || xn(e), de = (N.row[0] !== N.row[1] || N.column[0] !== N.column[1]) && !
|
|
21663
|
+
const ee = (((ue = e.luckysheetCellUpdate) == null ? void 0 : ue.length) ?? 0) > 0, K = (e.showSearch || e.showReplace) && !!e.searchRangeScopeHighlight && N.row[0] === e.searchRangeScopeHighlight.row[0] && N.row[1] === e.searchRangeScopeHighlight.row[1] && N.column[0] === e.searchRangeScopeHighlight.column[0] && N.column[1] === e.searchRangeScopeHighlight.column[1], ae = e.formulaCache.rangestart || e.formulaCache.rangedrag_column_start || e.formulaCache.rangedrag_row_start || xn(e), de = (N.row[0] !== N.row[1] || N.column[0] !== N.column[1]) && !Bf(e, N), me = ee && !de, ve = ee || ae;
|
|
21664
21664
|
return /* @__PURE__ */ u.jsxs(
|
|
21665
21665
|
"div",
|
|
21666
21666
|
{
|
|
@@ -22054,7 +22054,7 @@ const e8 = () => {
|
|
|
22054
22054
|
clientY: v,
|
|
22055
22055
|
view: window
|
|
22056
22056
|
});
|
|
22057
|
-
|
|
22057
|
+
wd(
|
|
22058
22058
|
B,
|
|
22059
22059
|
n.globalCache,
|
|
22060
22060
|
j,
|
|
@@ -22205,7 +22205,7 @@ const e8 = () => {
|
|
|
22205
22205
|
return Se(() => {
|
|
22206
22206
|
function d() {
|
|
22207
22207
|
t && s((h) => {
|
|
22208
|
-
i.devicePixelRatio === 0 && (h.devicePixelRatio = (globalThis || window).devicePixelRatio), Wo(h, t),
|
|
22208
|
+
i.devicePixelRatio === 0 && (h.devicePixelRatio = (globalThis || window).devicePixelRatio), Wo(h, t), Ru(
|
|
22209
22209
|
h,
|
|
22210
22210
|
a.canvas.current,
|
|
22211
22211
|
o.current
|
|
@@ -22227,7 +22227,7 @@ const e8 = () => {
|
|
|
22227
22227
|
s
|
|
22228
22228
|
]), Se(() => {
|
|
22229
22229
|
s(
|
|
22230
|
-
(d) =>
|
|
22230
|
+
(d) => Ru(
|
|
22231
22231
|
d,
|
|
22232
22232
|
a.canvas.current,
|
|
22233
22233
|
o.current
|
|
@@ -22250,7 +22250,7 @@ const e8 = () => {
|
|
|
22250
22250
|
]), Se(() => {
|
|
22251
22251
|
if (r.groupValuesRefreshData.length > 0)
|
|
22252
22252
|
return;
|
|
22253
|
-
const d = new
|
|
22253
|
+
const d = new Xf(a.canvas.current, r), h = () => {
|
|
22254
22254
|
var m, g, w, E, b;
|
|
22255
22255
|
const p = (m = a.globalCache.freezen) == null ? void 0 : m[e.id];
|
|
22256
22256
|
if ((g = p == null ? void 0 : p.horizontal) != null && g.freezenhorizontaldata || (w = p == null ? void 0 : p.vertical) != null && w.freezenverticaldata) {
|
|
@@ -22392,7 +22392,7 @@ var r8 = {
|
|
|
22392
22392
|
* This source code is licensed under the ISC license.
|
|
22393
22393
|
* See the LICENSE file in the root directory of this source tree.
|
|
22394
22394
|
*/
|
|
22395
|
-
const s8 =
|
|
22395
|
+
const s8 = Rf(
|
|
22396
22396
|
({
|
|
22397
22397
|
color: e = "currentColor",
|
|
22398
22398
|
size: t = 24,
|
|
@@ -22402,7 +22402,7 @@ const s8 = Ef(
|
|
|
22402
22402
|
children: s,
|
|
22403
22403
|
iconNode: a,
|
|
22404
22404
|
...i
|
|
22405
|
-
}, l) =>
|
|
22405
|
+
}, l) => ku(
|
|
22406
22406
|
"svg",
|
|
22407
22407
|
{
|
|
22408
22408
|
ref: l,
|
|
@@ -22415,7 +22415,7 @@ const s8 = Ef(
|
|
|
22415
22415
|
...i
|
|
22416
22416
|
},
|
|
22417
22417
|
[
|
|
22418
|
-
...a.map(([f, c]) =>
|
|
22418
|
+
...a.map(([f, c]) => ku(f, c)),
|
|
22419
22419
|
...Array.isArray(s) ? s : [s]
|
|
22420
22420
|
]
|
|
22421
22421
|
)
|
|
@@ -22427,8 +22427,8 @@ const s8 = Ef(
|
|
|
22427
22427
|
* See the LICENSE file in the root directory of this source tree.
|
|
22428
22428
|
*/
|
|
22429
22429
|
const i8 = (e, t) => {
|
|
22430
|
-
const n =
|
|
22431
|
-
({ className: o, ...r }, s) =>
|
|
22430
|
+
const n = Rf(
|
|
22431
|
+
({ className: o, ...r }, s) => ku(s8, {
|
|
22432
22432
|
ref: s,
|
|
22433
22433
|
iconNode: t,
|
|
22434
22434
|
className: b2(`lucide-${o8(e)}`, o),
|
|
@@ -22569,7 +22569,7 @@ const l8 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], a8 = i8("ChevronDow
|
|
|
22569
22569
|
}
|
|
22570
22570
|
);
|
|
22571
22571
|
};
|
|
22572
|
-
function
|
|
22572
|
+
function zc() {
|
|
22573
22573
|
return `${Date.now()}_${Math.random().toString(36).slice(2)}`;
|
|
22574
22574
|
}
|
|
22575
22575
|
const f8 = ({
|
|
@@ -22582,15 +22582,15 @@ const f8 = ({
|
|
|
22582
22582
|
const v = e.length + 1;
|
|
22583
22583
|
t((y) => [
|
|
22584
22584
|
...y,
|
|
22585
|
-
{ id:
|
|
22585
|
+
{ id: zc(), value: `Option ${v}`, color: "228, 232, 237" }
|
|
22586
22586
|
]);
|
|
22587
22587
|
};
|
|
22588
22588
|
Se(() => {
|
|
22589
22589
|
e.length === 0 && t((y) => [
|
|
22590
22590
|
...y,
|
|
22591
|
-
{ id:
|
|
22591
|
+
{ id: zc(), value: "Option 1", color: "228, 232, 237" },
|
|
22592
22592
|
{
|
|
22593
|
-
id:
|
|
22593
|
+
id: zc(),
|
|
22594
22594
|
value: "Option 2",
|
|
22595
22595
|
color: "228, 232, 237"
|
|
22596
22596
|
}
|
|
@@ -22909,7 +22909,7 @@ const m8 = () => {
|
|
|
22909
22909
|
checked: !1
|
|
22910
22910
|
};
|
|
22911
22911
|
if (L === "dropdown") {
|
|
22912
|
-
const X =
|
|
22912
|
+
const X = Of(O, A);
|
|
22913
22913
|
B.value1 = X.join(",");
|
|
22914
22914
|
}
|
|
22915
22915
|
const M = O.luckysheetfile[l()].dataVerification ?? {}, Q = Te(O);
|
|
@@ -23606,7 +23606,7 @@ const g8 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"),
|
|
|
23606
23606
|
}
|
|
23607
23607
|
},
|
|
23608
23608
|
o
|
|
23609
|
-
)) }, n)) }),
|
|
23609
|
+
)) }, n)) }), qu = ({ onCustomPick: e, onColorPick: t }) => /* @__PURE__ */ u.jsxs(
|
|
23610
23610
|
"div",
|
|
23611
23611
|
{
|
|
23612
23612
|
id: "fortune-custom-color",
|
|
@@ -23682,12 +23682,12 @@ const X1 = [
|
|
|
23682
23682
|
"textStartsWith",
|
|
23683
23683
|
"textEndsWith",
|
|
23684
23684
|
"textExactly"
|
|
23685
|
-
]),
|
|
23685
|
+
]), Vc = /* @__PURE__ */ new Set(["empty", "notEmpty"]), Q1 = /* @__PURE__ */ new Set([
|
|
23686
23686
|
"dateIs",
|
|
23687
23687
|
"dateBefore",
|
|
23688
23688
|
"dateAfter",
|
|
23689
23689
|
"occurrenceDate"
|
|
23690
|
-
]),
|
|
23690
|
+
]), $c = /* @__PURE__ */ new Set(["dateIs", "dateBefore"]), J1 = /* @__PURE__ */ new Set(["between", "notBetween"]), Pl = "#177E23", Bl = "#DDFBDF";
|
|
23691
23691
|
function eh(e) {
|
|
23692
23692
|
const t = (e == null ? void 0 : e.format) ?? {};
|
|
23693
23693
|
return {
|
|
@@ -23966,7 +23966,7 @@ const _2 = ({ context: e }) => {
|
|
|
23966
23966
|
return ne === "" ? !1 : !Jl(e, ne);
|
|
23967
23967
|
}, [h, e]), G = () => {
|
|
23968
23968
|
const ne = (h ?? "").trim();
|
|
23969
|
-
return ne === "" || !Jl(e, ne) ? !0 :
|
|
23969
|
+
return ne === "" || !Jl(e, ne) ? !0 : Vc.has(t) ? !1 : J1.has(t) ? !String(e.conditionRules.betweenValue.value1 ?? "").trim() || !String(e.conditionRules.betweenValue.value2 ?? "").trim() : Q1.has(t) ? $c.has(t) || t === "dateAfter" ? e.conditionRules.datePreset === "exact" ? $m(
|
|
23970
23970
|
String(e.conditionRules.dateValue ?? "").trim()
|
|
23971
23971
|
) == null : !String(e.conditionRules.datePreset ?? "").trim() : !String(e.conditionRules.dateValue ?? "").trim() : !(Array.isArray(m) ? String(m[0] ?? "") : String(
|
|
23972
23972
|
m ?? e.conditionRules.rulesValue ?? ""
|
|
@@ -24101,7 +24101,7 @@ const _2 = ({ context: e }) => {
|
|
|
24101
24101
|
{
|
|
24102
24102
|
value: t,
|
|
24103
24103
|
onValueChange: (ne) => {
|
|
24104
|
-
(
|
|
24104
|
+
(Vc.has(ne) || Vc.has(t)) && (x((fe) => {
|
|
24105
24105
|
fe.conditionRules.rulesValue = "";
|
|
24106
24106
|
}), g(null)), (ne === "dateIs" || ne === "dateBefore" || ne === "dateAfter") && x((fe) => {
|
|
24107
24107
|
fe.conditionRules.datePreset = "today", fe.conditionRules.dateFormat = Nr, fe.conditionRules.dateValue = Ml("today");
|
|
@@ -24188,7 +24188,7 @@ const _2 = ({ context: e }) => {
|
|
|
24188
24188
|
}
|
|
24189
24189
|
) })
|
|
24190
24190
|
] }),
|
|
24191
|
-
|
|
24191
|
+
$c.has(t) && /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
24192
24192
|
/* @__PURE__ */ u.jsxs(
|
|
24193
24193
|
eo,
|
|
24194
24194
|
{
|
|
@@ -24292,7 +24292,7 @@ const _2 = ({ context: e }) => {
|
|
|
24292
24292
|
}
|
|
24293
24293
|
)
|
|
24294
24294
|
] }),
|
|
24295
|
-
Q1.has(t) &&
|
|
24295
|
+
Q1.has(t) && !$c.has(t) && t !== "dateAfter" && /* @__PURE__ */ u.jsxs("div", { className: "datepicker-toggle", children: [
|
|
24296
24296
|
/* @__PURE__ */ u.jsx(
|
|
24297
24297
|
"input",
|
|
24298
24298
|
{
|
|
@@ -24528,7 +24528,7 @@ const _2 = ({ context: e }) => {
|
|
|
24528
24528
|
showArrow: !1,
|
|
24529
24529
|
fillColor: I.textColor,
|
|
24530
24530
|
children: (ne) => /* @__PURE__ */ u.jsx(
|
|
24531
|
-
|
|
24531
|
+
qu,
|
|
24532
24532
|
{
|
|
24533
24533
|
onCustomPick: (fe) => {
|
|
24534
24534
|
O(
|
|
@@ -24571,7 +24571,7 @@ const _2 = ({ context: e }) => {
|
|
|
24571
24571
|
tooltip: (D == null ? void 0 : D.background) ?? "Fill color",
|
|
24572
24572
|
showArrow: !1,
|
|
24573
24573
|
children: (ne) => /* @__PURE__ */ u.jsx(
|
|
24574
|
-
|
|
24574
|
+
qu,
|
|
24575
24575
|
{
|
|
24576
24576
|
onCustomPick: (fe) => {
|
|
24577
24577
|
O(
|
|
@@ -24956,10 +24956,10 @@ const _2 = ({ context: e }) => {
|
|
|
24956
24956
|
]
|
|
24957
24957
|
}
|
|
24958
24958
|
);
|
|
24959
|
-
},
|
|
24959
|
+
}, xd = () => {
|
|
24960
24960
|
const { context: e, setContext: t } = lt(ct), { splitText: n, button: o } = ht(e), [r, s] = Ie(""), [a, i] = Ie(!1), [l, f] = Ie([]), c = je(null), { showDialog: d, hideDialog: h } = wo(), p = Ee(() => {
|
|
24961
24961
|
h();
|
|
24962
|
-
const m =
|
|
24962
|
+
const m = Fu(r, e), g = e.luckysheet_select_save[0].row[0], w = e.luckysheet_select_save[0].column[0];
|
|
24963
24963
|
if (m[0].length === 1)
|
|
24964
24964
|
return;
|
|
24965
24965
|
let E = !1;
|
|
@@ -24980,11 +24980,11 @@ const _2 = ({ context: e }) => {
|
|
|
24980
24980
|
void 0,
|
|
24981
24981
|
() => {
|
|
24982
24982
|
h(), t((v) => {
|
|
24983
|
-
|
|
24983
|
+
Hu(g, w, m, v);
|
|
24984
24984
|
});
|
|
24985
24985
|
}
|
|
24986
24986
|
) : t((v) => {
|
|
24987
|
-
|
|
24987
|
+
Hu(g, w, m, v);
|
|
24988
24988
|
});
|
|
24989
24989
|
}, [
|
|
24990
24990
|
e,
|
|
@@ -24995,7 +24995,7 @@ const _2 = ({ context: e }) => {
|
|
|
24995
24995
|
n.splitConfirmToExe
|
|
24996
24996
|
]);
|
|
24997
24997
|
return Se(() => {
|
|
24998
|
-
f((m) => (m =
|
|
24998
|
+
f((m) => (m = Fu(r, e), m));
|
|
24999
24999
|
}, [e, r]), /* @__PURE__ */ u.jsxs("div", { id: "fortune-split-column", children: [
|
|
25000
25000
|
/* @__PURE__ */ u.jsx("div", { className: "splitDataPreview text-heading-xsm", children: n.splitDataPreview }),
|
|
25001
25001
|
/* @__PURE__ */ u.jsx("div", { className: "splitColumnData", children: /* @__PURE__ */ u.jsx("table", { children: /* @__PURE__ */ u.jsx("tbody", { children: l.map((m, g) => m.length >= 1 ? /* @__PURE__ */ u.jsx("tr", { children: m.map((w) => /* @__PURE__ */ u.jsx("td", { children: w }, m + w)) }, g) : /* @__PURE__ */ u.jsx("tr", { children: /* @__PURE__ */ u.jsx("td", {}) })) }) }) }),
|
|
@@ -25111,12 +25111,12 @@ const _2 = ({ context: e }) => {
|
|
|
25111
25111
|
}), h = Ee(() => {
|
|
25112
25112
|
var m, g, w, E, b, v;
|
|
25113
25113
|
if (a === "locationConstant") {
|
|
25114
|
-
const y =
|
|
25114
|
+
const y = Pu(l), k = Bu(e);
|
|
25115
25115
|
t((C) => {
|
|
25116
25116
|
Fn(k, a, y, C).length === 0 && n(r.locationTipNotFindCell, "ok");
|
|
25117
25117
|
});
|
|
25118
25118
|
} else if (a === "locationFormula") {
|
|
25119
|
-
const y =
|
|
25119
|
+
const y = Pu(c), k = Bu(e);
|
|
25120
25120
|
t((C) => {
|
|
25121
25121
|
Fn(k, a, y, C).length === 0 && n(r.locationTipNotFindCell, "ok");
|
|
25122
25122
|
});
|
|
@@ -25340,7 +25340,7 @@ const _2 = ({ context: e }) => {
|
|
|
25340
25340
|
children: r
|
|
25341
25341
|
}
|
|
25342
25342
|
);
|
|
25343
|
-
}, S8 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"),
|
|
25343
|
+
}, S8 = (e) => String(e).replace(/[^a-zA-Z0-9-]/g, "-").replace(/-+/g, "-"), Wc = ({
|
|
25344
25344
|
tooltip: e,
|
|
25345
25345
|
onClick: t,
|
|
25346
25346
|
selected: n,
|
|
@@ -25964,7 +25964,7 @@ const ih = [
|
|
|
25964
25964
|
function N8(e) {
|
|
25965
25965
|
return typeof e.renderSubmenu == "function";
|
|
25966
25966
|
}
|
|
25967
|
-
function
|
|
25967
|
+
function Yc(e) {
|
|
25968
25968
|
const t = N8(e), n = t ? e : null, o = t ? e.closeDelayMs ?? 80 : 0, [r, s] = Ie(
|
|
25969
25969
|
t ? e.defaultOpen ?? !1 : !1
|
|
25970
25970
|
), a = t ? e.open ?? r : !1, i = Ee(
|
|
@@ -26083,7 +26083,7 @@ const lh = {
|
|
|
26083
26083
|
"Statistical",
|
|
26084
26084
|
"Text",
|
|
26085
26085
|
"Other"
|
|
26086
|
-
],
|
|
26086
|
+
], Kc = (e) => !!(e instanceof HTMLElement && e.closest('[data-hovermenu-submenu="true"]')), qc = (e) => e instanceof HTMLElement ? !!e.closest(
|
|
26087
26087
|
"#luckysheet-rich-text-editor, .luckysheet-cell-input, .luckysheet-cell-input *"
|
|
26088
26088
|
) : !1;
|
|
26089
26089
|
function H8({
|
|
@@ -26158,7 +26158,7 @@ const F8 = () => {
|
|
|
26158
26158
|
}), requestAnimationFrame(() => {
|
|
26159
26159
|
const g = n.cellInput.current, w = n.fxInput.current, E = p === "fx" ? w : g;
|
|
26160
26160
|
if (!E) return;
|
|
26161
|
-
const b = String(f || "").trim().toUpperCase(), { text: v, caretOffset: y } =
|
|
26161
|
+
const b = String(f || "").trim().toUpperCase(), { text: v, caretOffset: y } = Cd(E, `=${b}`), k = v.slice(y).startsWith("(") ? y + 1 : y, C = v[k] === ")" ? v : `${v.slice(0, k)})${v.slice(k)}`, R = zo(C), x = R.startsWith("=") ? xr(R) : hr(R);
|
|
26162
26162
|
g && (g.innerHTML = x), w && (w.innerHTML = x), ac(E, k), E.focus({ preventScroll: !0 });
|
|
26163
26163
|
}), r(!1), a(null);
|
|
26164
26164
|
},
|
|
@@ -26205,17 +26205,17 @@ const F8 = () => {
|
|
|
26205
26205
|
sideOffset: 4,
|
|
26206
26206
|
style: lh,
|
|
26207
26207
|
onInteractOutside: (f) => {
|
|
26208
|
-
(
|
|
26208
|
+
(Kc(f.target) || qc(f.target)) && f.preventDefault();
|
|
26209
26209
|
},
|
|
26210
26210
|
onPointerDownOutside: (f) => {
|
|
26211
|
-
(
|
|
26211
|
+
(Kc(f.target) || qc(f.target)) && f.preventDefault();
|
|
26212
26212
|
},
|
|
26213
26213
|
onFocusOutside: (f) => {
|
|
26214
|
-
(
|
|
26214
|
+
(Kc(f.target) || qc(f.target)) && f.preventDefault();
|
|
26215
26215
|
},
|
|
26216
26216
|
children: /* @__PURE__ */ u.jsxs("div", { className: "color-text-default", children: [
|
|
26217
26217
|
T8.map((f) => /* @__PURE__ */ u.jsx(
|
|
26218
|
-
|
|
26218
|
+
Yc,
|
|
26219
26219
|
{
|
|
26220
26220
|
label: f,
|
|
26221
26221
|
onClick: () => {
|
|
@@ -26226,7 +26226,7 @@ const F8 = () => {
|
|
|
26226
26226
|
)),
|
|
26227
26227
|
/* @__PURE__ */ u.jsx("hr", { className: "color-border-default my-1" }),
|
|
26228
26228
|
l.categories.map((f) => /* @__PURE__ */ u.jsx(
|
|
26229
|
-
|
|
26229
|
+
Yc,
|
|
26230
26230
|
{
|
|
26231
26231
|
label: f,
|
|
26232
26232
|
rightSlot: /* @__PURE__ */ u.jsx(
|
|
@@ -26251,7 +26251,7 @@ const F8 = () => {
|
|
|
26251
26251
|
minWidth: "220px"
|
|
26252
26252
|
},
|
|
26253
26253
|
renderSubmenu: () => /* @__PURE__ */ u.jsx(H8, { children: /* @__PURE__ */ u.jsx("div", { className: "flex flex-col", children: l.getFunctions(f).map((c) => /* @__PURE__ */ u.jsx(
|
|
26254
|
-
|
|
26254
|
+
Yc,
|
|
26255
26255
|
{
|
|
26256
26256
|
label: c,
|
|
26257
26257
|
onClick: () => {
|
|
@@ -26904,7 +26904,7 @@ const F8 = () => {
|
|
|
26904
26904
|
Pe && Be(Pe);
|
|
26905
26905
|
},
|
|
26906
26906
|
children: (Pe) => /* @__PURE__ */ u.jsx(
|
|
26907
|
-
|
|
26907
|
+
qu,
|
|
26908
26908
|
{
|
|
26909
26909
|
onCustomPick: (Ve) => {
|
|
26910
26910
|
Be(Ve), Pe(!1);
|
|
@@ -26924,7 +26924,7 @@ const F8 = () => {
|
|
|
26924
26924
|
const Ne = Ho(S, "ct"), Be = V.find(K, (Pe) => Pe.value === (Ne == null ? void 0 : Ne.fa));
|
|
26925
26925
|
if ((Ne == null ? void 0 : Ne.fa) != null) {
|
|
26926
26926
|
const Pe = /[hH]:/.test(Ne.fa);
|
|
26927
|
-
Ne.t === "d" ? xe = Pe ? "Date time" : "Date" : Ne.t === "g" && Ne.fa === "General" ? xe = K[0].text : Be != null ? xe = Be.text : Ne.fa.includes("%") ? xe = Ne.fa === "0%" ? K[0].text : "Percent" :
|
|
26927
|
+
Ne.t === "d" ? xe = Pe ? "Date time" : "Date" : Ne.t === "g" && Ne.fa === "General" ? xe = K[0].text : Be != null ? xe = Be.text : Ne.fa.includes("%") ? xe = Ne.fa === "0%" ? K[0].text : "Percent" : Df(Ne.fa) ? xe = Pe ? "Date time" : "Date" : Bm(
|
|
26928
26928
|
Ne.fa,
|
|
26929
26929
|
ht(r).currencyDetail
|
|
26930
26930
|
) ? xe = K[0].text : Ne.t === "n" || Ne.fa.includes("#,##0") || Ne.fa === "0" || Ne.fa === "0.00" ? xe = "Number" : xe = K[0].text;
|
|
@@ -27275,7 +27275,7 @@ const F8 = () => {
|
|
|
27275
27275
|
k(T.tipNoSelect, "ok");
|
|
27276
27276
|
else {
|
|
27277
27277
|
const xe = r.luckysheet_select_save[r.luckysheet_select_save.length - 1].column;
|
|
27278
|
-
r.luckysheet_select_save.length > 1 ? k(T.tipNoMulti, "ok") : xe[0] !== xe[1] ? k(T.tipNoMultiColumn, "ok") : k(/* @__PURE__ */ u.jsx(
|
|
27278
|
+
r.luckysheet_select_save.length > 1 ? k(T.tipNoMulti, "ok") : xe[0] !== xe[1] ? k(T.tipNoMultiColumn, "ok") : k(/* @__PURE__ */ u.jsx(xd, {}));
|
|
27279
27279
|
}
|
|
27280
27280
|
}
|
|
27281
27281
|
},
|
|
@@ -27471,7 +27471,7 @@ const F8 = () => {
|
|
|
27471
27471
|
iconId: $,
|
|
27472
27472
|
tooltip: D.insertImage,
|
|
27473
27473
|
onClick: () => {
|
|
27474
|
-
r.allowEdit !== !1 &&
|
|
27474
|
+
r.allowEdit !== !1 && ed();
|
|
27475
27475
|
}
|
|
27476
27476
|
},
|
|
27477
27477
|
$
|
|
@@ -27482,7 +27482,7 @@ const F8 = () => {
|
|
|
27482
27482
|
xe ? (Ne == null && ([Ne] = xe.row), Be == null && ([Be] = xe.column)) : (Ne = 0, Be = 0);
|
|
27483
27483
|
let Pe;
|
|
27484
27484
|
return ((Re = (ke = q == null ? void 0 : q[Ne]) == null ? void 0 : ke[Be]) == null ? void 0 : Re.ps) != null ? Pe = [
|
|
27485
|
-
{ key: "edit", text: F.edit, onClick:
|
|
27485
|
+
{ key: "edit", text: F.edit, onClick: Qf },
|
|
27486
27486
|
{ key: "delete", text: F.delete, onClick: Np },
|
|
27487
27487
|
{
|
|
27488
27488
|
key: "showOrHide",
|
|
@@ -27492,14 +27492,14 @@ const F8 = () => {
|
|
|
27492
27492
|
{
|
|
27493
27493
|
key: "showOrHideAll",
|
|
27494
27494
|
text: F.showAll,
|
|
27495
|
-
onClick:
|
|
27495
|
+
onClick: Lu
|
|
27496
27496
|
}
|
|
27497
27497
|
] : Pe = [
|
|
27498
27498
|
{ key: "new", text: F.insert, onClick: ec },
|
|
27499
27499
|
{
|
|
27500
27500
|
key: "showOrHideAll",
|
|
27501
27501
|
text: F.showAll,
|
|
27502
|
-
onClick:
|
|
27502
|
+
onClick: Lu
|
|
27503
27503
|
}
|
|
27504
27504
|
], i.isRTCActive ? /* @__PURE__ */ u.jsx(
|
|
27505
27505
|
An,
|
|
@@ -27565,7 +27565,7 @@ const F8 = () => {
|
|
|
27565
27565
|
tooltip: le,
|
|
27566
27566
|
text: "合并单元格",
|
|
27567
27567
|
onClick: () => {
|
|
27568
|
-
if (!
|
|
27568
|
+
if (!Au(r)) {
|
|
27569
27569
|
s((Be) => {
|
|
27570
27570
|
Lr(Be, "merge-all");
|
|
27571
27571
|
});
|
|
@@ -27588,7 +27588,7 @@ const F8 = () => {
|
|
|
27588
27588
|
Lr(qe, Pe);
|
|
27589
27589
|
}), Ne(!1);
|
|
27590
27590
|
else {
|
|
27591
|
-
if (Ne(!1), !
|
|
27591
|
+
if (Ne(!1), !Au(r)) {
|
|
27592
27592
|
s((Xe) => {
|
|
27593
27593
|
Lr(Xe, Pe);
|
|
27594
27594
|
});
|
|
@@ -27750,14 +27750,14 @@ const F8 = () => {
|
|
|
27750
27750
|
tooltip: le,
|
|
27751
27751
|
showArrow: !1,
|
|
27752
27752
|
onClick: () => s((Ne) => {
|
|
27753
|
-
|
|
27753
|
+
Tu(Ne, "freeze-row-col");
|
|
27754
27754
|
}),
|
|
27755
27755
|
children: (Ne) => /* @__PURE__ */ u.jsx(lo, { children: xe.map(({ text: Be, value: Pe }) => /* @__PURE__ */ u.jsx(
|
|
27756
27756
|
Vn,
|
|
27757
27757
|
{
|
|
27758
27758
|
onClick: () => {
|
|
27759
27759
|
s((Ve) => {
|
|
27760
|
-
|
|
27760
|
+
Tu(Ve, Pe);
|
|
27761
27761
|
}), Ne(!1);
|
|
27762
27762
|
},
|
|
27763
27763
|
children: /* @__PURE__ */ u.jsxs("div", { className: "fortune-toolbar-menu-line", children: [
|
|
@@ -27938,7 +27938,7 @@ const F8 = () => {
|
|
|
27938
27938
|
sc(qe);
|
|
27939
27939
|
return;
|
|
27940
27940
|
}
|
|
27941
|
-
|
|
27941
|
+
rd(qe);
|
|
27942
27942
|
});
|
|
27943
27943
|
},
|
|
27944
27944
|
children: /* @__PURE__ */ u.jsx(
|
|
@@ -27981,7 +27981,7 @@ const F8 = () => {
|
|
|
27981
27981
|
toolTipText: D["currency-format"]
|
|
27982
27982
|
}
|
|
27983
27983
|
);
|
|
27984
|
-
const re = $ === "link" &&
|
|
27984
|
+
const re = $ === "link" && Zf(
|
|
27985
27985
|
r,
|
|
27986
27986
|
a.cellInput.current ?? void 0
|
|
27987
27987
|
);
|
|
@@ -27998,7 +27998,7 @@ const F8 = () => {
|
|
|
27998
27998
|
xe.preventDefault();
|
|
27999
27999
|
return;
|
|
28000
28000
|
}
|
|
28001
|
-
xe.preventDefault(),
|
|
28001
|
+
xe.preventDefault(), Gf(
|
|
28002
28002
|
r,
|
|
28003
28003
|
a.cellInput.current ?? void 0,
|
|
28004
28004
|
a.globalCache
|
|
@@ -28108,7 +28108,7 @@ const F8 = () => {
|
|
|
28108
28108
|
),
|
|
28109
28109
|
/* @__PURE__ */ u.jsxs("div", { className: "fortune-toolbar-left", children: [
|
|
28110
28110
|
i.customToolbarItems.filter(($) => $.key === "import-export" || $.key === "export-only").map(($) => /* @__PURE__ */ u.jsx(
|
|
28111
|
-
|
|
28111
|
+
Wc,
|
|
28112
28112
|
{
|
|
28113
28113
|
tooltip: $.tooltip,
|
|
28114
28114
|
onClick: $.onClick,
|
|
@@ -28135,7 +28135,7 @@ const F8 = () => {
|
|
|
28135
28135
|
/* @__PURE__ */ u.jsxs("div", { className: "fortune-toolbar-right", children: [
|
|
28136
28136
|
i.customToolbarItems.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
28137
28137
|
i.customToolbarItems.filter(($) => $.key === "Smart Contract").map(($) => /* @__PURE__ */ u.jsx(
|
|
28138
|
-
|
|
28138
|
+
Wc,
|
|
28139
28139
|
{
|
|
28140
28140
|
tooltip: $.tooltip,
|
|
28141
28141
|
onClick: $.onClick,
|
|
@@ -28176,7 +28176,7 @@ const F8 = () => {
|
|
|
28176
28176
|
i.customToolbarItems.filter(
|
|
28177
28177
|
($) => $.key !== "import-export" && $.key !== "export-only" && $.key !== "Smart Contract"
|
|
28178
28178
|
).map(($) => /* @__PURE__ */ u.jsx(
|
|
28179
|
-
|
|
28179
|
+
Wc,
|
|
28180
28180
|
{
|
|
28181
28181
|
tooltip: $.tooltip,
|
|
28182
28182
|
onClick: $.onClick,
|
|
@@ -28193,7 +28193,7 @@ const F8 = () => {
|
|
|
28193
28193
|
onSubmit: ($) => {
|
|
28194
28194
|
var se;
|
|
28195
28195
|
s((le) => {
|
|
28196
|
-
|
|
28196
|
+
id(le, $);
|
|
28197
28197
|
}), b(!1), (se = i.onDuneChartEmbed) == null || se.call(i);
|
|
28198
28198
|
},
|
|
28199
28199
|
onClose: () => b(!1),
|
|
@@ -28268,7 +28268,7 @@ const F8 = () => {
|
|
|
28268
28268
|
return window.addEventListener("keydown", K), () => window.removeEventListener("keydown", K);
|
|
28269
28269
|
}, [o]), Se(() => {
|
|
28270
28270
|
var pe, de;
|
|
28271
|
-
if (b(
|
|
28271
|
+
if (b(Hf(i)), i.luckysheetCellUpdate.length > 0)
|
|
28272
28272
|
return;
|
|
28273
28273
|
const K = Te(i);
|
|
28274
28274
|
let ae = "";
|
|
@@ -28276,7 +28276,7 @@ const F8 = () => {
|
|
|
28276
28276
|
const me = v.row_focus, ve = v.column_focus;
|
|
28277
28277
|
if (V.isNil(me) || V.isNil(ve)) return;
|
|
28278
28278
|
const ue = (pe = K == null ? void 0 : K[me]) == null ? void 0 : pe[ve];
|
|
28279
|
-
ue && (Bo(ue) ? ae =
|
|
28279
|
+
ue && (Bo(ue) ? ae = xu(me, ve, K) : ue.f ? ae = an(me, ve, K, "f") : ((de = ue.ct) == null ? void 0 : de.t) === "d" ? ae = an(me, ve, K, "f") : ae = ro(me, ve, K)), f.fxInput.current.innerHTML = hr(zo(ae));
|
|
28280
28280
|
} else
|
|
28281
28281
|
f.fxInput.current.innerHTML = "";
|
|
28282
28282
|
}, [
|
|
@@ -28309,7 +28309,7 @@ const F8 = () => {
|
|
|
28309
28309
|
const ve = (Z = me == null ? void 0 : me[ae]) == null ? void 0 : Z[pe], ue = ve != null && ve.f && typeof (ve == null ? void 0 : ve._formulaEditHtml) == "string" ? ve._formulaEditHtml : "", he = ($ = (te = (ie = ve == null ? void 0 : ve.ct) == null ? void 0 : ie.s) == null ? void 0 : te[0]) == null ? void 0 : $.v, ge = !!(ve != null && ve.f) && typeof he == "string" && /[\r\n]/.test(he), ne = typeof ue == "string" && ue.length > 0 && !/<br\s*\/?>/i.test(ue), fe = ge && ne;
|
|
28310
28310
|
let ye = "";
|
|
28311
28311
|
const z = f.globalCache.overwriteCell;
|
|
28312
|
-
if (ve && !z && (Bo(ve) ? ye =
|
|
28312
|
+
if (ve && !z && (Bo(ve) ? ye = xu(ae, pe, me) : ve.f ? ye = an(ae, pe, me, "f") : ((se = ve.ct) == null ? void 0 : se.t) === "d" ? ye = an(ae, pe, me, "f") : ye = ro(ae, pe, me)), f.globalCache.overwriteCell = !1, !f.globalCache.ignoreWriteCell && ue && !fe)
|
|
28313
28313
|
K.innerHTML = ue;
|
|
28314
28314
|
else if (!f.globalCache.ignoreWriteCell && ye)
|
|
28315
28315
|
K.innerHTML = hr(zo(ye));
|
|
@@ -28367,7 +28367,7 @@ const F8 = () => {
|
|
|
28367
28367
|
if (!ae) return;
|
|
28368
28368
|
const pe = document.getElementById(
|
|
28369
28369
|
"luckysheet-rich-text-editor"
|
|
28370
|
-
), { text: de, caretOffset: me } =
|
|
28370
|
+
), { text: de, caretOffset: me } = Cd(
|
|
28371
28371
|
ae,
|
|
28372
28372
|
K
|
|
28373
28373
|
), ve = zo(de), ue = ve.startsWith("=") ? xr(ve) : hr(ve);
|
|
@@ -28394,7 +28394,7 @@ const F8 = () => {
|
|
|
28394
28394
|
const ae = (ue = (ve = D()) == null ? void 0 : ve.querySelector(
|
|
28395
28395
|
".luckysheet-formula-search-func"
|
|
28396
28396
|
)) == null ? void 0 : ue.textContent, pe = Y();
|
|
28397
|
-
ae &&
|
|
28397
|
+
ae && !Wu(pe) && (I(ae), K.preventDefault(), K.stopPropagation());
|
|
28398
28398
|
},
|
|
28399
28399
|
[D, I]
|
|
28400
28400
|
), L = Ee(
|
|
@@ -30301,7 +30301,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30301
30301
|
)
|
|
30302
30302
|
] })
|
|
30303
30303
|
] });
|
|
30304
|
-
},
|
|
30304
|
+
}, Zu = () => /* @__PURE__ */ u.jsx("div", { className: "fortune-context-menu-divider" }), tt = ({
|
|
30305
30305
|
onClick: e,
|
|
30306
30306
|
onMouseLeave: t,
|
|
30307
30307
|
onMouseEnter: n,
|
|
@@ -30578,7 +30578,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30578
30578
|
var Q, X, oe;
|
|
30579
30579
|
const M = (Q = n.luckysheet_select_save) == null ? void 0 : Q[0];
|
|
30580
30580
|
if (A === "|")
|
|
30581
|
-
return /* @__PURE__ */ u.jsx(
|
|
30581
|
+
return /* @__PURE__ */ u.jsx(Zu, {}, `divider-${B}`);
|
|
30582
30582
|
if (A === "split-text")
|
|
30583
30583
|
return /* @__PURE__ */ u.jsx(
|
|
30584
30584
|
tt,
|
|
@@ -30590,7 +30590,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30590
30590
|
else {
|
|
30591
30591
|
const T = n.luckysheet_select_save[n.luckysheet_select_save.length - 1].column;
|
|
30592
30592
|
n.luckysheet_select_save.length > 1 ? e(h.tipNoMulti, "ok") : T[0] !== T[1] ? e(h.tipNoMultiColumn, "ok") : e(
|
|
30593
|
-
/* @__PURE__ */ u.jsx(
|
|
30593
|
+
/* @__PURE__ */ u.jsx(xd, {}),
|
|
30594
30594
|
void 0,
|
|
30595
30595
|
"Split text to columns"
|
|
30596
30596
|
);
|
|
@@ -30608,7 +30608,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30608
30608
|
"split-text"
|
|
30609
30609
|
);
|
|
30610
30610
|
if (A === "freeze-row") {
|
|
30611
|
-
const j =
|
|
30611
|
+
const j = zu(n).isRowFrozen;
|
|
30612
30612
|
return (M == null ? void 0 : M.row_select) === !0 ? /* @__PURE__ */ u.jsx(
|
|
30613
30613
|
tt,
|
|
30614
30614
|
{
|
|
@@ -30626,7 +30626,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30626
30626
|
) : null;
|
|
30627
30627
|
}
|
|
30628
30628
|
if (A === "freeze-column") {
|
|
30629
|
-
const j =
|
|
30629
|
+
const j = zu(n).isColFrozen;
|
|
30630
30630
|
return (M == null ? void 0 : M.column_select) === !0 ? /* @__PURE__ */ u.jsx(
|
|
30631
30631
|
tt,
|
|
30632
30632
|
{
|
|
@@ -30763,7 +30763,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
30763
30763
|
onClick: async () => {
|
|
30764
30764
|
const T = await navigator.clipboard.readText();
|
|
30765
30765
|
o((j) => {
|
|
30766
|
-
|
|
30766
|
+
vd(j, T), j.contextMenu = {};
|
|
30767
30767
|
});
|
|
30768
30768
|
},
|
|
30769
30769
|
children: /* @__PURE__ */ u.jsxs("div", { className: "context-item", children: [
|
|
@@ -31188,7 +31188,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
31188
31188
|
onClick: () => {
|
|
31189
31189
|
o((j) => {
|
|
31190
31190
|
let F = "";
|
|
31191
|
-
T === "hideSelected" ? F =
|
|
31191
|
+
T === "hideSelected" ? F = Su(j, "row") : T === "showHide" && vi(j, "row"), F === "noMulti" && e(f.noMulti), j.contextMenu = {};
|
|
31192
31192
|
});
|
|
31193
31193
|
},
|
|
31194
31194
|
children: /* @__PURE__ */ u.jsxs("div", { className: "context-item", children: [
|
|
@@ -31205,7 +31205,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
31205
31205
|
onClick: () => {
|
|
31206
31206
|
o((j) => {
|
|
31207
31207
|
let F = "";
|
|
31208
|
-
T === "hideSelected" ? F =
|
|
31208
|
+
T === "hideSelected" ? F = Su(j, "column") : T === "showHide" && vi(j, "column"), F === "noMulti" && e(f.noMulti), j.contextMenu = {};
|
|
31209
31209
|
});
|
|
31210
31210
|
},
|
|
31211
31211
|
children: /* @__PURE__ */ u.jsxs("div", { className: "context-item", children: [
|
|
@@ -31417,7 +31417,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
31417
31417
|
{
|
|
31418
31418
|
onClick: () => {
|
|
31419
31419
|
o((j) => {
|
|
31420
|
-
|
|
31420
|
+
rd(j), j.contextMenu = {};
|
|
31421
31421
|
});
|
|
31422
31422
|
},
|
|
31423
31423
|
children: /* @__PURE__ */ u.jsxs(
|
|
@@ -31489,7 +31489,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
31489
31489
|
{
|
|
31490
31490
|
onClick: () => {
|
|
31491
31491
|
o((T) => {
|
|
31492
|
-
|
|
31492
|
+
ed(), T.contextMenu = {};
|
|
31493
31493
|
});
|
|
31494
31494
|
},
|
|
31495
31495
|
children: l.image
|
|
@@ -31637,7 +31637,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
31637
31637
|
], H = () => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
31638
31638
|
O.map((A) => /* @__PURE__ */ u.jsx(tt, { onClick: A.onClick, children: /* @__PURE__ */ u.jsx("div", { className: "context-item", children: /* @__PURE__ */ u.jsx("p", { children: A.label }) }) }, A.key)),
|
|
31639
31639
|
/* @__PURE__ */ u.jsx(
|
|
31640
|
-
|
|
31640
|
+
Zu,
|
|
31641
31641
|
{},
|
|
31642
31642
|
D ? "delete-shortcut-divider" : "insert-shortcut-divider"
|
|
31643
31643
|
),
|
|
@@ -34275,7 +34275,7 @@ const ow = /* @__PURE__ */ Oi(nw), rw = () => {
|
|
|
34275
34275
|
children: i.focus
|
|
34276
34276
|
},
|
|
34277
34277
|
x
|
|
34278
|
-
) : x === "|" ? /* @__PURE__ */ u.jsx(
|
|
34278
|
+
) : x === "|" ? /* @__PURE__ */ u.jsx(Zu, {}, `divide-${P}`) : null)
|
|
34279
34279
|
}
|
|
34280
34280
|
);
|
|
34281
34281
|
};
|
|
@@ -34312,7 +34312,7 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34312
34312
|
d,
|
|
34313
34313
|
C.value.id
|
|
34314
34314
|
);
|
|
34315
|
-
|
|
34315
|
+
zf(d, x, C.value);
|
|
34316
34316
|
} else C.op === "deleteSheet" && (Ya(d, C.value.id), h.length = 0);
|
|
34317
34317
|
}
|
|
34318
34318
|
if (((b = (E = c[0]) == null ? void 0 : E.path) == null ? void 0 : b[0]) === "filter_select")
|
|
@@ -34328,7 +34328,7 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34328
34328
|
}
|
|
34329
34329
|
if (rc(d, d.luckysheet_filter_save, (k = c[0]) == null ? void 0 : k.id), h.length !== 0)
|
|
34330
34330
|
try {
|
|
34331
|
-
|
|
34331
|
+
ju(d, h);
|
|
34332
34332
|
} catch (C) {
|
|
34333
34333
|
console.error(C);
|
|
34334
34334
|
}
|
|
@@ -34336,7 +34336,7 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34336
34336
|
{ noHistory: !0 }
|
|
34337
34337
|
);
|
|
34338
34338
|
},
|
|
34339
|
-
getCryptoPrice:
|
|
34339
|
+
getCryptoPrice: bd,
|
|
34340
34340
|
/** Runs the formula engine on every cell in calcChain (all sheets). Use after XLSX import so values are computed, not cached from the file. */
|
|
34341
34341
|
recalculateAllFormulas: () => {
|
|
34342
34342
|
t((c) => {
|
|
@@ -34438,17 +34438,17 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34438
34438
|
),
|
|
34439
34439
|
setCellError: (c, d, h) => {
|
|
34440
34440
|
t((p) => {
|
|
34441
|
-
|
|
34441
|
+
Tf(p, c, d, h);
|
|
34442
34442
|
});
|
|
34443
34443
|
},
|
|
34444
34444
|
clearCellError: (c, d) => {
|
|
34445
34445
|
t((h) => {
|
|
34446
|
-
|
|
34446
|
+
Nf(h, c, d);
|
|
34447
34447
|
});
|
|
34448
34448
|
},
|
|
34449
34449
|
clearCell: (c, d, h = {}) => t((p) => S3(p, c, d, h)),
|
|
34450
34450
|
setCellFormat: (c, d, h, p, m = {}) => t(
|
|
34451
|
-
(g) =>
|
|
34451
|
+
(g) => cd(g, c, d, h, p, m)
|
|
34452
34452
|
),
|
|
34453
34453
|
autoFillCell: (c, d, h) => t(
|
|
34454
34454
|
(p) => E3(p, c, d, h)
|
|
@@ -34475,7 +34475,7 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34475
34475
|
getRowHeight: (c, d = {}) => mm(e, c, d),
|
|
34476
34476
|
getColumnWidth: (c, d = {}) => Gl(e, c, d),
|
|
34477
34477
|
getSelection: () => br(e),
|
|
34478
|
-
getFlattenRange: (c) =>
|
|
34478
|
+
getFlattenRange: (c) => ud(e, c),
|
|
34479
34479
|
getCellsByFlattenRange: (c) => R3(e, c),
|
|
34480
34480
|
getSelectionCoordinates: () => I3(e),
|
|
34481
34481
|
getCellsByRange: (c, d = {}) => j3(e, c, d),
|
|
@@ -34494,11 +34494,11 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34494
34494
|
setCellFormatByRange: (c, d, h, p = {}) => t(
|
|
34495
34495
|
(m) => N3(m, c, d, h, p)
|
|
34496
34496
|
),
|
|
34497
|
-
mergeCells: (c, d, h = {}) => t((p) =>
|
|
34497
|
+
mergeCells: (c, d, h = {}) => t((p) => fd(p, c, d, h)),
|
|
34498
34498
|
cancelMerge: (c, d = {}) => t((h) => T3(h, c, d)),
|
|
34499
34499
|
getAllSheets: () => tp(e),
|
|
34500
34500
|
getSheet: (c = {}) => pm(e, c),
|
|
34501
|
-
addSheet: () => t((c) =>
|
|
34501
|
+
addSheet: () => t((c) => dd(c, r)),
|
|
34502
34502
|
deleteSheet: (c = {}) => t((d) => L3(d, c)),
|
|
34503
34503
|
updateSheet: (c) => t((d) => M3(d, c)),
|
|
34504
34504
|
activateSheet: (c = {}) => t((d) => O3(d, c)),
|
|
@@ -34598,7 +34598,7 @@ function fw(e, t, n, o, r, s, a, i, l, f) {
|
|
|
34598
34598
|
getSettings: () => r,
|
|
34599
34599
|
getRefs: () => f,
|
|
34600
34600
|
getShowDialog: () => wo,
|
|
34601
|
-
getSplitColComponent: () =>
|
|
34601
|
+
getSplitColComponent: () => xd,
|
|
34602
34602
|
getConditionalFormatComponent: () => _2
|
|
34603
34603
|
};
|
|
34604
34604
|
}
|
|
@@ -35054,7 +35054,7 @@ const ch = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
|
|
|
35054
35054
|
(ee, K) => (ee[K] = 0, ee),
|
|
35055
35055
|
{}
|
|
35056
35056
|
);
|
|
35057
|
-
|
|
35057
|
+
Ou(
|
|
35058
35058
|
N,
|
|
35059
35059
|
C.current.length > 0,
|
|
35060
35060
|
G,
|
|
@@ -35113,7 +35113,7 @@ const ch = ({ item: e, isChecked: t, onChange: n, isItemVisible: o }) => {
|
|
|
35113
35113
|
(ee, K) => (ee[K] = 0, ee),
|
|
35114
35114
|
{}
|
|
35115
35115
|
);
|
|
35116
|
-
|
|
35116
|
+
Ou(
|
|
35117
35117
|
N,
|
|
35118
35118
|
!V.isEmpty(G),
|
|
35119
35119
|
G,
|
|
@@ -35323,8 +35323,8 @@ const uh = (e) => {
|
|
|
35323
35323
|
workbookContainer: h
|
|
35324
35324
|
}),
|
|
35325
35325
|
[]
|
|
35326
|
-
), [m, g] = Ie(
|
|
35327
|
-
() => V.assign(V.cloneDeep(
|
|
35326
|
+
), [m, g] = Ie(Mf(p)), [w, E] = Ie(null), b = at(
|
|
35327
|
+
() => V.assign(V.cloneDeep(hd), o),
|
|
35328
35328
|
// props expect data, onChage, onOp
|
|
35329
35329
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35330
35330
|
[...V.values(o)]
|
|
@@ -35487,8 +35487,8 @@ const uh = (e) => {
|
|
|
35487
35487
|
);
|
|
35488
35488
|
if (_.length > 0) {
|
|
35489
35489
|
j.logPatch && console.info("patch", _);
|
|
35490
|
-
const ae =
|
|
35491
|
-
let pe =
|
|
35490
|
+
const ae = Uu(_);
|
|
35491
|
+
let pe = Uu(N);
|
|
35492
35492
|
if (pe.length > 0) {
|
|
35493
35493
|
if (j.id = F.currentSheetId, j.deleteSheetOp) {
|
|
35494
35494
|
if (F.luckysheetfile.filter(
|
|
@@ -35558,7 +35558,7 @@ const uh = (e) => {
|
|
|
35558
35558
|
});
|
|
35559
35559
|
});
|
|
35560
35560
|
}
|
|
35561
|
-
const U =
|
|
35561
|
+
const U = ju(j, T.inversePatches);
|
|
35562
35562
|
s.current.redoList.push(T);
|
|
35563
35563
|
const _ = k3(T.options);
|
|
35564
35564
|
if (_ != null && _.insertRowColOp && (_.restoreDeletedCells = !0), (pe = T.options) != null && pe.addSheetOp) {
|
|
@@ -35601,7 +35601,7 @@ const uh = (e) => {
|
|
|
35601
35601
|
const T = s.current.redoList.pop();
|
|
35602
35602
|
T && g((j) => {
|
|
35603
35603
|
var G, ee, K;
|
|
35604
|
-
const F =
|
|
35604
|
+
const F = ju(j, T.patches), U = T.patches.some(
|
|
35605
35605
|
(ae) => {
|
|
35606
35606
|
var pe;
|
|
35607
35607
|
return (pe = ae.value) == null ? void 0 : pe.borderInfo;
|
|
@@ -35637,7 +35637,7 @@ const uh = (e) => {
|
|
|
35637
35637
|
var T, j;
|
|
35638
35638
|
(j = (T = b.hooks) == null ? void 0 : T.afterActivateSheet) == null || j.call(T, m.currentSheetId);
|
|
35639
35639
|
}, [m.currentSheetId]), Se(() => {
|
|
35640
|
-
|
|
35640
|
+
bd("bitcoin", "usd");
|
|
35641
35641
|
}, []), Se(() => {
|
|
35642
35642
|
var T, j;
|
|
35643
35643
|
g((F) => {
|
|
@@ -35935,7 +35935,7 @@ const uh = (e) => {
|
|
|
35935
35935
|
}
|
|
35936
35936
|
(T.metaKey || T.ctrlKey) && T.shiftKey && T.code === "KeyV" && navigator.clipboard.readText().then((me) => {
|
|
35937
35937
|
x((ve) => {
|
|
35938
|
-
|
|
35938
|
+
vd(ve, me);
|
|
35939
35939
|
});
|
|
35940
35940
|
});
|
|
35941
35941
|
const { nativeEvent: pe } = T;
|
|
@@ -36104,7 +36104,7 @@ const uh = (e) => {
|
|
|
36104
36104
|
var T;
|
|
36105
36105
|
x(
|
|
36106
36106
|
(j) => {
|
|
36107
|
-
|
|
36107
|
+
id(j, m.showDunePreview.url), j.showDunePreview = void 0;
|
|
36108
36108
|
},
|
|
36109
36109
|
{ noHistory: !0 }
|
|
36110
36110
|
), (T = b.onDuneChartEmbed) == null || T.call(b);
|
|
@@ -36331,7 +36331,7 @@ var Ow = Mw, Hw = Ow, Fw = /^\s+/;
|
|
|
36331
36331
|
function Pw(e) {
|
|
36332
36332
|
return e && e.slice(0, Hw(e) + 1).replace(Fw, "");
|
|
36333
36333
|
}
|
|
36334
|
-
var Bw = Pw, Uw = To, zw = Uw.Symbol,
|
|
36334
|
+
var Bw = Pw, Uw = To, zw = Uw.Symbol, Sd = zw, dh = Sd, N2 = Object.prototype, Vw = N2.hasOwnProperty, $w = N2.toString, Zs = dh ? dh.toStringTag : void 0;
|
|
36335
36335
|
function Ww(e) {
|
|
36336
36336
|
var t = Vw.call(e, Zs), n = e[Zs];
|
|
36337
36337
|
try {
|
|
@@ -36346,7 +36346,7 @@ var Yw = Ww, Kw = Object.prototype, qw = Kw.toString;
|
|
|
36346
36346
|
function Zw(e) {
|
|
36347
36347
|
return qw.call(e);
|
|
36348
36348
|
}
|
|
36349
|
-
var Gw = Zw, hh =
|
|
36349
|
+
var Gw = Zw, hh = Sd, Xw = Yw, Qw = Gw, Jw = "[object Null]", ev = "[object Undefined]", mh = hh ? hh.toStringTag : void 0;
|
|
36350
36350
|
function tv(e) {
|
|
36351
36351
|
return e == null ? e === void 0 ? ev : Jw : mh && mh in Object(e) ? Xw(e) : Qw(e);
|
|
36352
36352
|
}
|
|
@@ -36374,7 +36374,7 @@ function mv(e) {
|
|
|
36374
36374
|
var n = fv.test(e);
|
|
36375
36375
|
return n || dv.test(e) ? hv(e.slice(2), n ? 2 : 8) : uv.test(e) ? gh : +e;
|
|
36376
36376
|
}
|
|
36377
|
-
var pv = mv, gv = Zi,
|
|
36377
|
+
var pv = mv, gv = Zi, Zc = Tw, yh = pv, yv = "Expected a function", wv = Math.max, vv = Math.min;
|
|
36378
36378
|
function bv(e, t, n) {
|
|
36379
36379
|
var o, r, s, a, i, l, f = 0, c = !1, d = !1, h = !0;
|
|
36380
36380
|
if (typeof e != "function")
|
|
@@ -36396,7 +36396,7 @@ function bv(e, t, n) {
|
|
|
36396
36396
|
return l === void 0 || R >= t || R < 0 || d && x >= s;
|
|
36397
36397
|
}
|
|
36398
36398
|
function E() {
|
|
36399
|
-
var C =
|
|
36399
|
+
var C = Zc();
|
|
36400
36400
|
if (w(C))
|
|
36401
36401
|
return b(C);
|
|
36402
36402
|
i = setTimeout(E, g(C));
|
|
@@ -36408,10 +36408,10 @@ function bv(e, t, n) {
|
|
|
36408
36408
|
i !== void 0 && clearTimeout(i), f = 0, o = l = r = i = void 0;
|
|
36409
36409
|
}
|
|
36410
36410
|
function y() {
|
|
36411
|
-
return i === void 0 ? a : b(
|
|
36411
|
+
return i === void 0 ? a : b(Zc());
|
|
36412
36412
|
}
|
|
36413
36413
|
function k() {
|
|
36414
|
-
var C =
|
|
36414
|
+
var C = Zc(), R = w(C);
|
|
36415
36415
|
if (o = arguments, r = this, l = C, R) {
|
|
36416
36416
|
if (i === void 0)
|
|
36417
36417
|
return m(l);
|
|
@@ -36499,12 +36499,12 @@ const Yv = () => new Wv(), Kv = (e) => {
|
|
|
36499
36499
|
for (; t > zl; )
|
|
36500
36500
|
ga(e, M2 | zl & t), t = L2(t / 128);
|
|
36501
36501
|
ga(e, zl & t);
|
|
36502
|
-
},
|
|
36502
|
+
}, Gu = new Uint8Array(3e4), Zv = Gu.length / 3, Gv = (e, t) => {
|
|
36503
36503
|
if (t.length < Zv) {
|
|
36504
|
-
const n = xi.encodeInto(t,
|
|
36504
|
+
const n = xi.encodeInto(t, Gu).written || 0;
|
|
36505
36505
|
hs(e, n);
|
|
36506
36506
|
for (let o = 0; o < n; o++)
|
|
36507
|
-
ga(e,
|
|
36507
|
+
ga(e, Gu[o]);
|
|
36508
36508
|
} else
|
|
36509
36509
|
e9(e, $v(t));
|
|
36510
36510
|
}, Xv = (e, t) => {
|
|
@@ -36568,13 +36568,13 @@ const r9 = (e) => new o9(e), s9 = (e, t) => {
|
|
|
36568
36568
|
}, a9 = (e) => (
|
|
36569
36569
|
/** @type any */
|
|
36570
36570
|
ci.decode(i9(e))
|
|
36571
|
-
), c9 = ci ? a9 : l9, ya = Date.now,
|
|
36571
|
+
), c9 = ci ? a9 : l9, ya = Date.now, Gc = () => /* @__PURE__ */ new Map(), u9 = (e, t, n) => {
|
|
36572
36572
|
let o = e.get(t);
|
|
36573
36573
|
return o === void 0 && e.set(t, o = n()), o;
|
|
36574
36574
|
};
|
|
36575
36575
|
class f9 {
|
|
36576
36576
|
constructor() {
|
|
36577
|
-
this._observers =
|
|
36577
|
+
this._observers = Gc();
|
|
36578
36578
|
}
|
|
36579
36579
|
/**
|
|
36580
36580
|
* @param {N} name
|
|
@@ -36611,10 +36611,10 @@ class f9 {
|
|
|
36611
36611
|
* @param {Array<any>} args The arguments that are applied to the event listener.
|
|
36612
36612
|
*/
|
|
36613
36613
|
emit(t, n) {
|
|
36614
|
-
return Uv((this._observers.get(t) ||
|
|
36614
|
+
return Uv((this._observers.get(t) || Gc()).values()).forEach((o) => o(...n));
|
|
36615
36615
|
}
|
|
36616
36616
|
destroy() {
|
|
36617
|
-
this._observers =
|
|
36617
|
+
this._observers = Gc();
|
|
36618
36618
|
}
|
|
36619
36619
|
}
|
|
36620
36620
|
const Ch = Symbol("Equality"), d9 = Object.keys, kh = (e) => d9(e).length, h9 = (e, t) => Object.prototype.hasOwnProperty.call(e, t), fi = (e, t) => {
|
|
@@ -36670,7 +36670,7 @@ const Ch = Symbol("Equality"), d9 = Object.keys, kh = (e) => d9(e).length, h9 =
|
|
|
36670
36670
|
return !1;
|
|
36671
36671
|
}
|
|
36672
36672
|
return !0;
|
|
36673
|
-
},
|
|
36673
|
+
}, Xc = 3e4;
|
|
36674
36674
|
class m9 extends f9 {
|
|
36675
36675
|
/**
|
|
36676
36676
|
* @param {Y.Doc} doc
|
|
@@ -36679,13 +36679,13 @@ class m9 extends f9 {
|
|
|
36679
36679
|
super(), this.doc = t, this.clientID = t.clientID, this.states = /* @__PURE__ */ new Map(), this.meta = /* @__PURE__ */ new Map(), this._checkInterval = /** @type {any} */
|
|
36680
36680
|
setInterval(() => {
|
|
36681
36681
|
const n = ya();
|
|
36682
|
-
this.getLocalState() !== null &&
|
|
36682
|
+
this.getLocalState() !== null && Xc / 2 <= n - /** @type {{lastUpdated:number}} */
|
|
36683
36683
|
this.meta.get(this.clientID).lastUpdated && this.setLocalState(this.getLocalState());
|
|
36684
36684
|
const o = [];
|
|
36685
36685
|
this.meta.forEach((r, s) => {
|
|
36686
|
-
s !== this.clientID &&
|
|
36686
|
+
s !== this.clientID && Xc <= n - r.lastUpdated && this.states.has(s) && o.push(s);
|
|
36687
36687
|
}), o.length > 0 && $o(this, o, "timeout");
|
|
36688
|
-
}, L2(
|
|
36688
|
+
}, L2(Xc / 10)), t.on("destroy", () => {
|
|
36689
36689
|
this.destroy();
|
|
36690
36690
|
}), this.setLocalState({});
|
|
36691
36691
|
}
|
|
@@ -36790,7 +36790,7 @@ const Vl = /* @__PURE__ */ Object.create(null);
|
|
|
36790
36790
|
Object.keys(Do).forEach((e) => {
|
|
36791
36791
|
Vl[Do[e]] = e;
|
|
36792
36792
|
});
|
|
36793
|
-
const
|
|
36793
|
+
const Xu = { type: "error", data: "parser error" }, F2 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", P2 = typeof ArrayBuffer == "function", B2 = (e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e && e.buffer instanceof ArrayBuffer, Ed = ({ type: e, data: t }, n, o) => F2 && t instanceof Blob ? n ? o(t) : _h(t, o) : P2 && (t instanceof ArrayBuffer || B2(t)) ? n ? o(t) : _h(new Blob([t]), o) : o(Do[e] + (t || "")), _h = (e, t) => {
|
|
36794
36794
|
const n = new FileReader();
|
|
36795
36795
|
return n.onload = function() {
|
|
36796
36796
|
const o = n.result.split(",")[1];
|
|
@@ -36800,14 +36800,14 @@ const Gu = { type: "error", data: "parser error" }, F2 = typeof Blob == "functio
|
|
|
36800
36800
|
function xh(e) {
|
|
36801
36801
|
return e instanceof Uint8Array ? e : e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
36802
36802
|
}
|
|
36803
|
-
let
|
|
36803
|
+
let Qc;
|
|
36804
36804
|
function g9(e, t) {
|
|
36805
36805
|
if (F2 && e.data instanceof Blob)
|
|
36806
36806
|
return e.data.arrayBuffer().then(xh).then(t);
|
|
36807
36807
|
if (P2 && (e.data instanceof ArrayBuffer || B2(e.data)))
|
|
36808
36808
|
return t(xh(e.data));
|
|
36809
|
-
|
|
36810
|
-
|
|
36809
|
+
Ed(e, !1, (n) => {
|
|
36810
|
+
Qc || (Qc = new TextEncoder()), t(Qc.encode(n));
|
|
36811
36811
|
});
|
|
36812
36812
|
}
|
|
36813
36813
|
const Sh = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ri = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
@@ -36820,7 +36820,7 @@ const y9 = (e) => {
|
|
|
36820
36820
|
for (o = 0; o < n; o += 4)
|
|
36821
36821
|
s = ri[e.charCodeAt(o)], a = ri[e.charCodeAt(o + 1)], i = ri[e.charCodeAt(o + 2)], l = ri[e.charCodeAt(o + 3)], c[r++] = s << 2 | a >> 4, c[r++] = (a & 15) << 4 | i >> 2, c[r++] = (i & 3) << 6 | l & 63;
|
|
36822
36822
|
return f;
|
|
36823
|
-
}, w9 = typeof ArrayBuffer == "function",
|
|
36823
|
+
}, w9 = typeof ArrayBuffer == "function", Rd = (e, t) => {
|
|
36824
36824
|
if (typeof e != "string")
|
|
36825
36825
|
return {
|
|
36826
36826
|
type: "message",
|
|
@@ -36835,7 +36835,7 @@ const y9 = (e) => {
|
|
|
36835
36835
|
data: e.substring(1)
|
|
36836
36836
|
} : {
|
|
36837
36837
|
type: Vl[n]
|
|
36838
|
-
} :
|
|
36838
|
+
} : Xu;
|
|
36839
36839
|
}, v9 = (e, t) => {
|
|
36840
36840
|
if (w9) {
|
|
36841
36841
|
const n = y9(e);
|
|
@@ -36854,14 +36854,14 @@ const y9 = (e) => {
|
|
|
36854
36854
|
const n = e.length, o = new Array(n);
|
|
36855
36855
|
let r = 0;
|
|
36856
36856
|
e.forEach((s, a) => {
|
|
36857
|
-
|
|
36857
|
+
Ed(s, !1, (i) => {
|
|
36858
36858
|
o[a] = i, ++r === n && t(o.join(z2));
|
|
36859
36859
|
});
|
|
36860
36860
|
});
|
|
36861
36861
|
}, C9 = (e, t) => {
|
|
36862
36862
|
const n = e.split(z2), o = [];
|
|
36863
36863
|
for (let r = 0; r < n.length; r++) {
|
|
36864
|
-
const s =
|
|
36864
|
+
const s = Rd(n[r], t);
|
|
36865
36865
|
if (o.push(s), s.type === "error")
|
|
36866
36866
|
break;
|
|
36867
36867
|
}
|
|
@@ -36889,7 +36889,7 @@ function k9() {
|
|
|
36889
36889
|
}
|
|
36890
36890
|
});
|
|
36891
36891
|
}
|
|
36892
|
-
let
|
|
36892
|
+
let Jc;
|
|
36893
36893
|
function bl(e) {
|
|
36894
36894
|
return e.reduce((t, n) => t + n.length, 0);
|
|
36895
36895
|
}
|
|
@@ -36903,7 +36903,7 @@ function Cl(e, t) {
|
|
|
36903
36903
|
return e.length && o < e[0].length && (e[0] = e[0].slice(o)), n;
|
|
36904
36904
|
}
|
|
36905
36905
|
function _9(e, t) {
|
|
36906
|
-
|
|
36906
|
+
Jc || (Jc = new TextDecoder());
|
|
36907
36907
|
const n = [];
|
|
36908
36908
|
let o = 0, r = -1, s = !1;
|
|
36909
36909
|
return new TransformStream({
|
|
@@ -36924,7 +36924,7 @@ function _9(e, t) {
|
|
|
36924
36924
|
break;
|
|
36925
36925
|
const l = Cl(n, 8), f = new DataView(l.buffer, l.byteOffset, l.length), c = f.getUint32(0);
|
|
36926
36926
|
if (c > Math.pow(2, 21) - 1) {
|
|
36927
|
-
i.enqueue(
|
|
36927
|
+
i.enqueue(Xu);
|
|
36928
36928
|
break;
|
|
36929
36929
|
}
|
|
36930
36930
|
r = c * Math.pow(2, 32) + f.getUint32(4), o = 3;
|
|
@@ -36932,10 +36932,10 @@ function _9(e, t) {
|
|
|
36932
36932
|
if (bl(n) < r)
|
|
36933
36933
|
break;
|
|
36934
36934
|
const l = Cl(n, r);
|
|
36935
|
-
i.enqueue(
|
|
36935
|
+
i.enqueue(Rd(s ? l : Jc.decode(l), t)), o = 0;
|
|
36936
36936
|
}
|
|
36937
36937
|
if (r === 0 || r > e) {
|
|
36938
|
-
i.enqueue(
|
|
36938
|
+
i.enqueue(Xu);
|
|
36939
36939
|
break;
|
|
36940
36940
|
}
|
|
36941
36941
|
}
|
|
@@ -37032,7 +37032,7 @@ class T9 extends Error {
|
|
|
37032
37032
|
super(t), this.description = n, this.context = o, this.type = "TransportError";
|
|
37033
37033
|
}
|
|
37034
37034
|
}
|
|
37035
|
-
class
|
|
37035
|
+
class Id extends cn {
|
|
37036
37036
|
/**
|
|
37037
37037
|
* Transport abstract constructor.
|
|
37038
37038
|
*
|
|
@@ -37089,7 +37089,7 @@ class Rd extends cn {
|
|
|
37089
37089
|
* @protected
|
|
37090
37090
|
*/
|
|
37091
37091
|
onData(t) {
|
|
37092
|
-
const n =
|
|
37092
|
+
const n = Rd(t, this.socket.binaryType);
|
|
37093
37093
|
this.onPacket(n);
|
|
37094
37094
|
}
|
|
37095
37095
|
/**
|
|
@@ -37130,7 +37130,7 @@ class Rd extends cn {
|
|
|
37130
37130
|
return n.length ? "?" + n : "";
|
|
37131
37131
|
}
|
|
37132
37132
|
}
|
|
37133
|
-
class L9 extends
|
|
37133
|
+
class L9 extends Id {
|
|
37134
37134
|
constructor() {
|
|
37135
37135
|
super(...arguments), this._polling = !1;
|
|
37136
37136
|
}
|
|
@@ -37413,7 +37413,7 @@ function K2(e) {
|
|
|
37413
37413
|
}
|
|
37414
37414
|
}
|
|
37415
37415
|
const q2 = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
37416
|
-
class B9 extends
|
|
37416
|
+
class B9 extends Id {
|
|
37417
37417
|
get name() {
|
|
37418
37418
|
return "websocket";
|
|
37419
37419
|
}
|
|
@@ -37444,7 +37444,7 @@ class B9 extends Rd {
|
|
|
37444
37444
|
this.writable = !1;
|
|
37445
37445
|
for (let n = 0; n < t.length; n++) {
|
|
37446
37446
|
const o = t[n], r = n === t.length - 1;
|
|
37447
|
-
|
|
37447
|
+
Ed(o, this.supportsBinary, (s) => {
|
|
37448
37448
|
try {
|
|
37449
37449
|
this.doWrite(o, s);
|
|
37450
37450
|
} catch {
|
|
@@ -37469,16 +37469,16 @@ class B9 extends Rd {
|
|
|
37469
37469
|
return this.opts.timestampRequests && (n[this.opts.timestampParam] = W2()), this.supportsBinary || (n.b64 = 1), this.createUri(t, n);
|
|
37470
37470
|
}
|
|
37471
37471
|
}
|
|
37472
|
-
const
|
|
37472
|
+
const eu = Gn.WebSocket || Gn.MozWebSocket;
|
|
37473
37473
|
class U9 extends B9 {
|
|
37474
37474
|
createSocket(t, n, o) {
|
|
37475
|
-
return q2 ? new
|
|
37475
|
+
return q2 ? new eu(t, n, o) : n ? new eu(t, n) : new eu(t);
|
|
37476
37476
|
}
|
|
37477
37477
|
doWrite(t, n) {
|
|
37478
37478
|
this.ws.send(n);
|
|
37479
37479
|
}
|
|
37480
37480
|
}
|
|
37481
|
-
class z9 extends
|
|
37481
|
+
class z9 extends Id {
|
|
37482
37482
|
get name() {
|
|
37483
37483
|
return "webtransport";
|
|
37484
37484
|
}
|
|
@@ -37544,7 +37544,7 @@ const V9 = {
|
|
|
37544
37544
|
"query",
|
|
37545
37545
|
"anchor"
|
|
37546
37546
|
];
|
|
37547
|
-
function
|
|
37547
|
+
function Qu(e) {
|
|
37548
37548
|
if (e.length > 8e3)
|
|
37549
37549
|
throw "URI too long";
|
|
37550
37550
|
const t = e, n = e.indexOf("["), o = e.indexOf("]");
|
|
@@ -37564,8 +37564,8 @@ function K9(e, t) {
|
|
|
37564
37564
|
r && (n[r] = s);
|
|
37565
37565
|
}), n;
|
|
37566
37566
|
}
|
|
37567
|
-
const
|
|
37568
|
-
|
|
37567
|
+
const Ju = typeof addEventListener == "function" && typeof removeEventListener == "function", $l = [];
|
|
37568
|
+
Ju && addEventListener("offline", () => {
|
|
37569
37569
|
$l.forEach((e) => e());
|
|
37570
37570
|
}, !1);
|
|
37571
37571
|
class gr extends cn {
|
|
@@ -37577,9 +37577,9 @@ class gr extends cn {
|
|
|
37577
37577
|
*/
|
|
37578
37578
|
constructor(t, n) {
|
|
37579
37579
|
if (super(), this.binaryType = S9, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, t && typeof t == "object" && (n = t, t = null), t) {
|
|
37580
|
-
const o =
|
|
37580
|
+
const o = Qu(t);
|
|
37581
37581
|
n.hostname = o.host, n.secure = o.protocol === "https" || o.protocol === "wss", n.port = o.port, o.query && (n.query = o.query);
|
|
37582
|
-
} else n.host && (n.hostname =
|
|
37582
|
+
} else n.host && (n.hostname = Qu(n.host).host);
|
|
37583
37583
|
fc(this, n), this.secure = n.secure != null ? n.secure : typeof location < "u" && location.protocol === "https:", n.hostname && !n.port && (n.port = this.secure ? "443" : "80"), this.hostname = n.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = n.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = [], this._transportsByName = {}, n.transports.forEach((o) => {
|
|
37584
37584
|
const r = o.prototype.name;
|
|
37585
37585
|
this.transports.push(r), this._transportsByName[r] = o;
|
|
@@ -37597,7 +37597,7 @@ class gr extends cn {
|
|
|
37597
37597
|
},
|
|
37598
37598
|
transportOptions: {},
|
|
37599
37599
|
closeOnBeforeunload: !1
|
|
37600
|
-
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = N9(this.opts.query)),
|
|
37600
|
+
}, n), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = N9(this.opts.query)), Ju && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
|
|
37601
37601
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
37602
37602
|
}, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
|
|
37603
37603
|
this._onClose("transport close", {
|
|
@@ -37830,7 +37830,7 @@ class gr extends cn {
|
|
|
37830
37830
|
*/
|
|
37831
37831
|
_onClose(t, n) {
|
|
37832
37832
|
if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") {
|
|
37833
|
-
if (this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(),
|
|
37833
|
+
if (this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), Ju && (this._beforeunloadEventListener && removeEventListener("beforeunload", this._beforeunloadEventListener, !1), this._offlineEventListener)) {
|
|
37834
37834
|
const o = $l.indexOf(this._offlineEventListener);
|
|
37835
37835
|
o !== -1 && $l.splice(o, 1);
|
|
37836
37836
|
}
|
|
@@ -37919,12 +37919,12 @@ let Z9 = class extends q9 {
|
|
|
37919
37919
|
};
|
|
37920
37920
|
function G9(e, t = "", n) {
|
|
37921
37921
|
let o = e;
|
|
37922
|
-
n = n || typeof location < "u" && location, e == null && (e = n.protocol + "//" + n.host), typeof e == "string" && (e.charAt(0) === "/" && (e.charAt(1) === "/" ? e = n.protocol + e : e = n.host + e), /^(https?|wss?):\/\//.test(e) || (typeof n < "u" ? e = n.protocol + "//" + e : e = "https://" + e), o =
|
|
37922
|
+
n = n || typeof location < "u" && location, e == null && (e = n.protocol + "//" + n.host), typeof e == "string" && (e.charAt(0) === "/" && (e.charAt(1) === "/" ? e = n.protocol + e : e = n.host + e), /^(https?|wss?):\/\//.test(e) || (typeof n < "u" ? e = n.protocol + "//" + e : e = "https://" + e), o = Qu(e)), o.port || (/^(http|ws)$/.test(o.protocol) ? o.port = "80" : /^(http|ws)s$/.test(o.protocol) && (o.port = "443")), o.path = o.path || "/";
|
|
37923
37923
|
const s = o.host.indexOf(":") !== -1 ? "[" + o.host + "]" : o.host;
|
|
37924
37924
|
return o.id = o.protocol + "://" + s + ":" + o.port + t, o.href = o.protocol + "://" + s + (n && n.port === o.port ? "" : ":" + o.port), o;
|
|
37925
37925
|
}
|
|
37926
37926
|
const X9 = typeof ArrayBuffer == "function", Q9 = (e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e.buffer instanceof ArrayBuffer, Z2 = Object.prototype.toString, J9 = typeof Blob == "function" || typeof Blob < "u" && Z2.call(Blob) === "[object BlobConstructor]", eb = typeof File == "function" || typeof File < "u" && Z2.call(File) === "[object FileConstructor]";
|
|
37927
|
-
function
|
|
37927
|
+
function jd(e) {
|
|
37928
37928
|
return X9 && (e instanceof ArrayBuffer || Q9(e)) || J9 && e instanceof Blob || eb && e instanceof File;
|
|
37929
37929
|
}
|
|
37930
37930
|
function Wl(e, t) {
|
|
@@ -37936,7 +37936,7 @@ function Wl(e, t) {
|
|
|
37936
37936
|
return !0;
|
|
37937
37937
|
return !1;
|
|
37938
37938
|
}
|
|
37939
|
-
if (
|
|
37939
|
+
if (jd(e))
|
|
37940
37940
|
return !0;
|
|
37941
37941
|
if (e.toJSON && typeof e.toJSON == "function" && arguments.length === 1)
|
|
37942
37942
|
return Wl(e.toJSON(), !0);
|
|
@@ -37947,31 +37947,31 @@ function Wl(e, t) {
|
|
|
37947
37947
|
}
|
|
37948
37948
|
function tb(e) {
|
|
37949
37949
|
const t = [], n = e.data, o = e;
|
|
37950
|
-
return o.data =
|
|
37950
|
+
return o.data = ef(n, t), o.attachments = t.length, { packet: o, buffers: t };
|
|
37951
37951
|
}
|
|
37952
|
-
function
|
|
37952
|
+
function ef(e, t) {
|
|
37953
37953
|
if (!e)
|
|
37954
37954
|
return e;
|
|
37955
|
-
if (
|
|
37955
|
+
if (jd(e)) {
|
|
37956
37956
|
const n = { _placeholder: !0, num: t.length };
|
|
37957
37957
|
return t.push(e), n;
|
|
37958
37958
|
} else if (Array.isArray(e)) {
|
|
37959
37959
|
const n = new Array(e.length);
|
|
37960
37960
|
for (let o = 0; o < e.length; o++)
|
|
37961
|
-
n[o] =
|
|
37961
|
+
n[o] = ef(e[o], t);
|
|
37962
37962
|
return n;
|
|
37963
37963
|
} else if (typeof e == "object" && !(e instanceof Date)) {
|
|
37964
37964
|
const n = {};
|
|
37965
37965
|
for (const o in e)
|
|
37966
|
-
Object.prototype.hasOwnProperty.call(e, o) && (n[o] =
|
|
37966
|
+
Object.prototype.hasOwnProperty.call(e, o) && (n[o] = ef(e[o], t));
|
|
37967
37967
|
return n;
|
|
37968
37968
|
}
|
|
37969
37969
|
return e;
|
|
37970
37970
|
}
|
|
37971
37971
|
function nb(e, t) {
|
|
37972
|
-
return e.data =
|
|
37972
|
+
return e.data = tf(e.data, t), delete e.attachments, e;
|
|
37973
37973
|
}
|
|
37974
|
-
function
|
|
37974
|
+
function tf(e, t) {
|
|
37975
37975
|
if (!e)
|
|
37976
37976
|
return e;
|
|
37977
37977
|
if (e && e._placeholder === !0) {
|
|
@@ -37980,10 +37980,10 @@ function ef(e, t) {
|
|
|
37980
37980
|
throw new Error("illegal attachments");
|
|
37981
37981
|
} else if (Array.isArray(e))
|
|
37982
37982
|
for (let n = 0; n < e.length; n++)
|
|
37983
|
-
e[n] =
|
|
37983
|
+
e[n] = tf(e[n], t);
|
|
37984
37984
|
else if (typeof e == "object")
|
|
37985
37985
|
for (const n in e)
|
|
37986
|
-
Object.prototype.hasOwnProperty.call(e, n) && (e[n] =
|
|
37986
|
+
Object.prototype.hasOwnProperty.call(e, n) && (e[n] = tf(e[n], t));
|
|
37987
37987
|
return e;
|
|
37988
37988
|
}
|
|
37989
37989
|
const ob = [
|
|
@@ -38066,7 +38066,7 @@ let rb = class {
|
|
|
38066
38066
|
n = this.decodeString(t);
|
|
38067
38067
|
const o = n.type === Ct.BINARY_EVENT;
|
|
38068
38068
|
o || n.type === Ct.BINARY_ACK ? (n.type = o ? Ct.EVENT : Ct.ACK, this.reconstructor = new ib(n), n.attachments === 0 && super.emitReserved("decoded", n)) : super.emitReserved("decoded", n);
|
|
38069
|
-
} else if (
|
|
38069
|
+
} else if (jd(t) || t.base64)
|
|
38070
38070
|
if (this.reconstructor)
|
|
38071
38071
|
n = this.reconstructor.takeBinaryData(t), n && (this.reconstructor = null, super.emitReserved("decoded", n));
|
|
38072
38072
|
else
|
|
@@ -38830,7 +38830,7 @@ Ns.prototype.setMax = function(e) {
|
|
|
38830
38830
|
Ns.prototype.setJitter = function(e) {
|
|
38831
38831
|
this.jitter = e;
|
|
38832
38832
|
};
|
|
38833
|
-
class
|
|
38833
|
+
class nf extends cn {
|
|
38834
38834
|
constructor(t, n) {
|
|
38835
38835
|
var o;
|
|
38836
38836
|
super(), this.nsps = {}, this.subs = [], t && typeof t == "object" && (n = t, t = void 0), n = n || {}, n.path = n.path || "/socket.io", this.opts = n, fc(this, n), this.reconnection(n.reconnection !== !1), this.reconnectionAttempts(n.reconnectionAttempts || 1 / 0), this.reconnectionDelay(n.reconnectionDelay || 1e3), this.reconnectionDelayMax(n.reconnectionDelayMax || 5e3), this.randomizationFactor((o = n.randomizationFactor) !== null && o !== void 0 ? o : 0.5), this.backoff = new Ns({
|
|
@@ -39073,10 +39073,10 @@ function Yl(e, t) {
|
|
|
39073
39073
|
typeof e == "object" && (t = e, e = void 0), t = t || {};
|
|
39074
39074
|
const n = G9(e, t.path || "/socket.io"), o = n.source, r = n.id, s = n.path, a = Gs[r] && s in Gs[r].nsps, i = t.forceNew || t["force new connection"] || t.multiplex === !1 || a;
|
|
39075
39075
|
let l;
|
|
39076
|
-
return i ? l = new
|
|
39076
|
+
return i ? l = new nf(o, t) : (Gs[r] || (Gs[r] = new nf(o, t)), l = Gs[r]), n.query && !t.query && (t.query = n.queryKey), l.socket(n.path, t);
|
|
39077
39077
|
}
|
|
39078
39078
|
Object.assign(Yl, {
|
|
39079
|
-
Manager:
|
|
39079
|
+
Manager: nf,
|
|
39080
39080
|
Socket: X2,
|
|
39081
39081
|
io: Yl,
|
|
39082
39082
|
connect: Yl
|
|
@@ -39483,7 +39483,7 @@ function e6(e, t, n, o) {
|
|
|
39483
39483
|
decoder: { decode: o }
|
|
39484
39484
|
};
|
|
39485
39485
|
}
|
|
39486
|
-
const Ih = e6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) => new TextEncoder().encode(e.substring(1))),
|
|
39486
|
+
const Ih = e6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) => new TextEncoder().encode(e.substring(1))), tu = e6("ascii", "a", (e) => {
|
|
39487
39487
|
let t = "a";
|
|
39488
39488
|
for (let n = 0; n < e.length; n++)
|
|
39489
39489
|
t += String.fromCharCode(e[n]);
|
|
@@ -39498,18 +39498,18 @@ const Ih = e6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) =
|
|
|
39498
39498
|
utf8: Ih,
|
|
39499
39499
|
"utf-8": Ih,
|
|
39500
39500
|
hex: va.base16,
|
|
39501
|
-
latin1:
|
|
39502
|
-
ascii:
|
|
39503
|
-
binary:
|
|
39501
|
+
latin1: tu,
|
|
39502
|
+
ascii: tu,
|
|
39503
|
+
binary: tu,
|
|
39504
39504
|
...va
|
|
39505
39505
|
};
|
|
39506
|
-
function
|
|
39506
|
+
function Dd(e, t = "utf8") {
|
|
39507
39507
|
const n = t6[t];
|
|
39508
39508
|
if (!n)
|
|
39509
39509
|
throw new Error(`Unsupported encoding "${t}"`);
|
|
39510
39510
|
return n.decoder.decode(`${n.prefix}${e}`);
|
|
39511
39511
|
}
|
|
39512
|
-
function
|
|
39512
|
+
function Ad(e, t = "utf8") {
|
|
39513
39513
|
const n = t6[t];
|
|
39514
39514
|
if (!n)
|
|
39515
39515
|
throw new Error(`Unsupported encoding "${t}"`);
|
|
@@ -39653,22 +39653,22 @@ function i6(e, t, n) {
|
|
|
39653
39653
|
}
|
|
39654
39654
|
yt.writeUint16LE = i6;
|
|
39655
39655
|
yt.writeInt16LE = i6;
|
|
39656
|
-
function
|
|
39656
|
+
function of(e, t) {
|
|
39657
39657
|
return t === void 0 && (t = 0), e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3];
|
|
39658
39658
|
}
|
|
39659
|
-
yt.readInt32BE =
|
|
39660
|
-
function
|
|
39659
|
+
yt.readInt32BE = of;
|
|
39660
|
+
function rf(e, t) {
|
|
39661
39661
|
return t === void 0 && (t = 0), (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0;
|
|
39662
39662
|
}
|
|
39663
|
-
yt.readUint32BE =
|
|
39664
|
-
function
|
|
39663
|
+
yt.readUint32BE = rf;
|
|
39664
|
+
function sf(e, t) {
|
|
39665
39665
|
return t === void 0 && (t = 0), e[t + 3] << 24 | e[t + 2] << 16 | e[t + 1] << 8 | e[t];
|
|
39666
39666
|
}
|
|
39667
|
-
yt.readInt32LE =
|
|
39668
|
-
function
|
|
39667
|
+
yt.readInt32LE = sf;
|
|
39668
|
+
function lf(e, t) {
|
|
39669
39669
|
return t === void 0 && (t = 0), (e[t + 3] << 24 | e[t + 2] << 16 | e[t + 1] << 8 | e[t]) >>> 0;
|
|
39670
39670
|
}
|
|
39671
|
-
yt.readUint32LE =
|
|
39671
|
+
yt.readUint32LE = lf;
|
|
39672
39672
|
function ba(e, t, n) {
|
|
39673
39673
|
return t === void 0 && (t = new Uint8Array(4)), n === void 0 && (n = 0), t[n + 0] = e >>> 24, t[n + 1] = e >>> 16, t[n + 2] = e >>> 8, t[n + 3] = e >>> 0, t;
|
|
39674
39674
|
}
|
|
@@ -39681,25 +39681,25 @@ yt.writeUint32LE = Ca;
|
|
|
39681
39681
|
yt.writeInt32LE = Ca;
|
|
39682
39682
|
function kC(e, t) {
|
|
39683
39683
|
t === void 0 && (t = 0);
|
|
39684
|
-
var n =
|
|
39684
|
+
var n = of(e, t), o = of(e, t + 4);
|
|
39685
39685
|
return n * 4294967296 + o - (o >> 31) * 4294967296;
|
|
39686
39686
|
}
|
|
39687
39687
|
yt.readInt64BE = kC;
|
|
39688
39688
|
function _C(e, t) {
|
|
39689
39689
|
t === void 0 && (t = 0);
|
|
39690
|
-
var n =
|
|
39690
|
+
var n = rf(e, t), o = rf(e, t + 4);
|
|
39691
39691
|
return n * 4294967296 + o;
|
|
39692
39692
|
}
|
|
39693
39693
|
yt.readUint64BE = _C;
|
|
39694
39694
|
function xC(e, t) {
|
|
39695
39695
|
t === void 0 && (t = 0);
|
|
39696
|
-
var n =
|
|
39696
|
+
var n = sf(e, t), o = sf(e, t + 4);
|
|
39697
39697
|
return o * 4294967296 + n - (n >> 31) * 4294967296;
|
|
39698
39698
|
}
|
|
39699
39699
|
yt.readInt64LE = xC;
|
|
39700
39700
|
function SC(e, t) {
|
|
39701
39701
|
t === void 0 && (t = 0);
|
|
39702
|
-
var n =
|
|
39702
|
+
var n = lf(e, t), o = lf(e, t + 4);
|
|
39703
39703
|
return o * 4294967296 + n;
|
|
39704
39704
|
}
|
|
39705
39705
|
yt.readUint64LE = SC;
|
|
@@ -40431,21 +40431,21 @@ var c6 = {};
|
|
|
40431
40431
|
}
|
|
40432
40432
|
e.convertSecretKeyToX25519 = T;
|
|
40433
40433
|
})(di);
|
|
40434
|
-
const
|
|
40434
|
+
const Nd = new Uint8Array([237, 1]), u6 = new Uint8Array([128, 36]), f6 = new Uint8Array([133, 36]), d6 = new Uint8Array([0, 245, 2]), af = "did:key:z";
|
|
40435
40435
|
function gc(e, t) {
|
|
40436
|
-
if (!e.startsWith(
|
|
40436
|
+
if (!e.startsWith(af))
|
|
40437
40437
|
throw new Error("Please use a base58-encoded DID formatted `did:key:z...`");
|
|
40438
|
-
const n = e.slice(
|
|
40438
|
+
const n = e.slice(af.length), o = Dd(n, "base58btc");
|
|
40439
40439
|
if (!PC(o, t))
|
|
40440
40440
|
throw new Error(`Expected prefix: ${t}`);
|
|
40441
40441
|
return o.slice(t.length);
|
|
40442
40442
|
}
|
|
40443
40443
|
function FC(e, t) {
|
|
40444
|
-
const n = wa([t, e]), o =
|
|
40445
|
-
return
|
|
40444
|
+
const n = wa([t, e]), o = Ad(n, "base58btc");
|
|
40445
|
+
return af + o;
|
|
40446
40446
|
}
|
|
40447
|
-
const PC = (e, t) => ub(t, e.subarray(0, t.byteLength)), BC = (e) => gc(e,
|
|
40448
|
-
var
|
|
40447
|
+
const PC = (e, t) => ub(t, e.subarray(0, t.byteLength)), BC = (e) => gc(e, Nd), UC = (e) => FC(e, Nd);
|
|
40448
|
+
var nu = function(e, t, n, o) {
|
|
40449
40449
|
function r(s) {
|
|
40450
40450
|
return s instanceof n ? s : new n(function(a) {
|
|
40451
40451
|
a(s);
|
|
@@ -40477,28 +40477,28 @@ class Si {
|
|
|
40477
40477
|
this.jwtAlg = "EdDSA", this.secretKey = t, this.publicKey = n, this.exportable = o;
|
|
40478
40478
|
}
|
|
40479
40479
|
static create(t) {
|
|
40480
|
-
return
|
|
40480
|
+
return nu(this, void 0, void 0, function* () {
|
|
40481
40481
|
const { exportable: n } = t || {}, o = di.generateKeyPair();
|
|
40482
40482
|
return new Si(o.secretKey, o.publicKey, n ?? !1);
|
|
40483
40483
|
});
|
|
40484
40484
|
}
|
|
40485
40485
|
static fromSecretKey(t, n) {
|
|
40486
|
-
const { format: o = "base64pad", exportable: r = !1 } = n || {}, s =
|
|
40486
|
+
const { format: o = "base64pad", exportable: r = !1 } = n || {}, s = Dd(t, o), a = di.extractPublicKeyFromSecretKey(s);
|
|
40487
40487
|
return new Si(s, a, r);
|
|
40488
40488
|
}
|
|
40489
40489
|
did() {
|
|
40490
40490
|
return UC(this.publicKey);
|
|
40491
40491
|
}
|
|
40492
40492
|
sign(t) {
|
|
40493
|
-
return
|
|
40493
|
+
return nu(this, void 0, void 0, function* () {
|
|
40494
40494
|
return di.sign(this.secretKey, t);
|
|
40495
40495
|
});
|
|
40496
40496
|
}
|
|
40497
40497
|
export(t = "base64pad") {
|
|
40498
|
-
return
|
|
40498
|
+
return nu(this, void 0, void 0, function* () {
|
|
40499
40499
|
if (!this.exportable)
|
|
40500
40500
|
throw new Error("Key is not exportable");
|
|
40501
|
-
return
|
|
40501
|
+
return Ad(this.secretKey, t);
|
|
40502
40502
|
});
|
|
40503
40503
|
}
|
|
40504
40504
|
}
|
|
@@ -41315,10 +41315,10 @@ const w6 = "ECDSA", QC = "P-256", JC = "SHA-256", ek = (e) => y6(void 0, void 0,
|
|
|
41315
41315
|
throw new Error("Expected 33 byte compress pubkey");
|
|
41316
41316
|
if (e[0] !== 2 && e[0] !== 3)
|
|
41317
41317
|
throw new Error("Expected first byte to be 0x02 or 0x03");
|
|
41318
|
-
const t = kl(2), n = t.pow(256).subtract(t.pow(224)).add(t.pow(192)).add(t.pow(96)).subtract(1), o = kl("41058363725152142129326129780047268409114441015993725554835256314039467401291"), r = n.add(1).divide(4), s = kl(e[0] - 2), a = e.slice(1), i = kl(
|
|
41318
|
+
const t = kl(2), n = t.pow(256).subtract(t.pow(224)).add(t.pow(192)).add(t.pow(96)).subtract(1), o = kl("41058363725152142129326129780047268409114441015993725554835256314039467401291"), r = n.add(1).divide(4), s = kl(e[0] - 2), a = e.slice(1), i = kl(Ad(a, "base10")), l = i.pow(3).subtract(i.multiply(3)).add(o).modPow(r, n);
|
|
41319
41319
|
let f;
|
|
41320
41320
|
l.mod(2).equals(s) ? f = l : f = n.subtract(l);
|
|
41321
|
-
const c =
|
|
41321
|
+
const c = Dd(f.toString(10), "base10"), d = 32 - c.length, h = new Uint8Array(32);
|
|
41322
41322
|
return h.set(c, d), wa([[4], a, h]);
|
|
41323
41323
|
};
|
|
41324
41324
|
var rk = function(e, t, n, o) {
|
|
@@ -41349,7 +41349,7 @@ var rk = function(e, t, n, o) {
|
|
|
41349
41349
|
});
|
|
41350
41350
|
};
|
|
41351
41351
|
const sk = {
|
|
41352
|
-
prefix:
|
|
41352
|
+
prefix: Nd,
|
|
41353
41353
|
jwtAlg: "EdDSA",
|
|
41354
41354
|
verifySignature: (e, t, n) => rk(void 0, void 0, void 0, function* () {
|
|
41355
41355
|
const o = BC(e);
|
|
@@ -41455,7 +41455,7 @@ function b6(e, t, n, o) {
|
|
|
41455
41455
|
decoder: { decode: o }
|
|
41456
41456
|
};
|
|
41457
41457
|
}
|
|
41458
|
-
const Nh = b6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) => new TextEncoder().encode(e.substring(1))),
|
|
41458
|
+
const Nh = b6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) => new TextEncoder().encode(e.substring(1))), ou = b6("ascii", "a", (e) => {
|
|
41459
41459
|
let t = "a";
|
|
41460
41460
|
for (let n = 0; n < e.length; n++)
|
|
41461
41461
|
t += String.fromCharCode(e[n]);
|
|
@@ -41470,9 +41470,9 @@ const Nh = b6("utf8", "u", (e) => "u" + new TextDecoder("utf8").decode(e), (e) =
|
|
|
41470
41470
|
utf8: Nh,
|
|
41471
41471
|
"utf-8": Nh,
|
|
41472
41472
|
hex: va.base16,
|
|
41473
|
-
latin1:
|
|
41474
|
-
ascii:
|
|
41475
|
-
binary:
|
|
41473
|
+
latin1: ou,
|
|
41474
|
+
ascii: ou,
|
|
41475
|
+
binary: ou,
|
|
41476
41476
|
...va
|
|
41477
41477
|
};
|
|
41478
41478
|
function Cr(e, t = "utf8") {
|
|
@@ -41582,7 +41582,7 @@ const wk = /^0|[1-9]\d*/, vk = (e) => (t) => {
|
|
|
41582
41582
|
const n = t.match(e);
|
|
41583
41583
|
return n ? n[0].length === t.length : !1;
|
|
41584
41584
|
};
|
|
41585
|
-
function
|
|
41585
|
+
function cf(e) {
|
|
41586
41586
|
var t, n, o;
|
|
41587
41587
|
const r = e.match(/^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/);
|
|
41588
41588
|
if (r === null)
|
|
@@ -41596,19 +41596,19 @@ function af(e) {
|
|
|
41596
41596
|
function bk(e) {
|
|
41597
41597
|
return `${e.major}.${e.minor}.${e.patch}`;
|
|
41598
41598
|
}
|
|
41599
|
-
const Lh = 1, Mh = 0,
|
|
41600
|
-
function
|
|
41601
|
-
return e == null ? t == null ? Mh :
|
|
41599
|
+
const Lh = 1, Mh = 0, uf = -1;
|
|
41600
|
+
function ru(e, t) {
|
|
41601
|
+
return e == null ? t == null ? Mh : uf : t == null || e > t ? Lh : e < t ? uf : Mh;
|
|
41602
41602
|
}
|
|
41603
41603
|
function Ck(e, t) {
|
|
41604
|
-
const n = typeof e == "string" ?
|
|
41605
|
-
return
|
|
41604
|
+
const n = typeof e == "string" ? cf(e) : e, o = typeof t == "string" ? cf(t) : t;
|
|
41605
|
+
return ru(n == null ? void 0 : n.major, o == null ? void 0 : o.major) || ru(n == null ? void 0 : n.minor, o == null ? void 0 : o.minor) || ru(n == null ? void 0 : n.patch, o == null ? void 0 : o.patch);
|
|
41606
41606
|
}
|
|
41607
|
-
function
|
|
41608
|
-
return Ck(e, t) ===
|
|
41607
|
+
function Td(e, t) {
|
|
41608
|
+
return Ck(e, t) === uf;
|
|
41609
41609
|
}
|
|
41610
41610
|
function kk(e, t) {
|
|
41611
|
-
return !
|
|
41611
|
+
return !Td(e, t);
|
|
41612
41612
|
}
|
|
41613
41613
|
const un = "*", k6 = "/";
|
|
41614
41614
|
function _k(e) {
|
|
@@ -41635,7 +41635,7 @@ function Ek(e) {
|
|
|
41635
41635
|
}
|
|
41636
41636
|
}
|
|
41637
41637
|
}
|
|
41638
|
-
const
|
|
41638
|
+
const ff = ":";
|
|
41639
41639
|
function Rk(e) {
|
|
41640
41640
|
return En(e) && ut(e, "scheme") && typeof e.scheme == "string" && ut(e, "hierPart") && (e.hierPart === un || typeof e.hierPart == "string");
|
|
41641
41641
|
}
|
|
@@ -41646,11 +41646,11 @@ function Ik(e) {
|
|
|
41646
41646
|
};
|
|
41647
41647
|
}
|
|
41648
41648
|
function jk(e) {
|
|
41649
|
-
return `${e.scheme}${
|
|
41649
|
+
return `${e.scheme}${ff}${e.hierPart}`;
|
|
41650
41650
|
}
|
|
41651
41651
|
function Dk(e) {
|
|
41652
|
-
const [t, ...n] = e.split(
|
|
41653
|
-
return { scheme: t, hierPart: n.join(
|
|
41652
|
+
const [t, ...n] = e.split(ff);
|
|
41653
|
+
return { scheme: t, hierPart: n.join(ff) };
|
|
41654
41654
|
}
|
|
41655
41655
|
function Ri(e) {
|
|
41656
41656
|
return En(e) && ut(e, "with") && Rk(e.with) && ut(e, "can") && _k(e.can);
|
|
@@ -41676,7 +41676,7 @@ function Tk(e) {
|
|
|
41676
41676
|
can: Ek(e.can)
|
|
41677
41677
|
};
|
|
41678
41678
|
}
|
|
41679
|
-
function
|
|
41679
|
+
function Ld(e) {
|
|
41680
41680
|
return En(e) && ut(e, "jwtAlg") && typeof e.jwtAlg == "string" && ut(e, "sign") && typeof e.sign == "function";
|
|
41681
41681
|
}
|
|
41682
41682
|
function Lk(e) {
|
|
@@ -41703,12 +41703,12 @@ function Pk(e, t) {
|
|
|
41703
41703
|
if (e.uav !== "1.0.0")
|
|
41704
41704
|
throw n("header", `Unsupported version 'uav: ${e.uav}'`);
|
|
41705
41705
|
o = "0.3.0";
|
|
41706
|
-
} else if (
|
|
41706
|
+
} else if (Td(e.ucv, "0.8.0"))
|
|
41707
41707
|
throw n("header", `Unsupported version 'ucv: ${e.ucv}'`);
|
|
41708
41708
|
if (kk(o, "0.8.0")) {
|
|
41709
41709
|
if (typeof e.ucv != "string")
|
|
41710
41710
|
throw n("header", "Invalid format: Missing 'ucv' key or 'ucv' is not a string");
|
|
41711
|
-
if (e.ucv =
|
|
41711
|
+
if (e.ucv = cf(e.ucv), e.ucv == null)
|
|
41712
41712
|
throw n("header", "Invalid format: 'ucv' string cannot be parsed into a semantic version");
|
|
41713
41713
|
if (!Lk(e))
|
|
41714
41714
|
throw n("header", "Invalid format");
|
|
@@ -41809,7 +41809,7 @@ var x6 = function(e, t, n, o) {
|
|
|
41809
41809
|
};
|
|
41810
41810
|
const Uk = "JWT", zk = { major: 0, minor: 8, patch: 1 }, Vk = (e) => (t) => {
|
|
41811
41811
|
const n = t.issuer, o = S6(Object.assign(Object.assign({}, t), { issuer: n.did() }));
|
|
41812
|
-
return
|
|
41812
|
+
return Md(e)(o, n);
|
|
41813
41813
|
};
|
|
41814
41814
|
function S6(e) {
|
|
41815
41815
|
const { issuer: t, audience: n, capabilities: o = [], lifetimeInSeconds: r = 30, expiration: s, notBefore: a, facts: i, proofs: l = [], addNonce: f = !1 } = e;
|
|
@@ -41844,7 +41844,7 @@ const E6 = (e) => (t, n, o) => x6(void 0, void 0, void 0, function* () {
|
|
|
41844
41844
|
signedData: i,
|
|
41845
41845
|
signature: Ei(f, "base64url")
|
|
41846
41846
|
});
|
|
41847
|
-
}),
|
|
41847
|
+
}), Md = (e) => (t, n) => E6(e)(t, n.jwtAlg, (o) => n.sign(o));
|
|
41848
41848
|
function Wn(e) {
|
|
41849
41849
|
return `${e.signedData}.${e.signature}`;
|
|
41850
41850
|
}
|
|
@@ -41915,7 +41915,7 @@ const wc = (e) => (t, n) => x6(void 0, void 0, void 0, function* () {
|
|
|
41915
41915
|
throw new Error(`Invalid Proof: 'Not before' (${i.payload.nbf}) is after parent's expiration (${t.payload.exp})`);
|
|
41916
41916
|
if (r && t.payload.nbf != null && t.payload.nbf > i.payload.exp)
|
|
41917
41917
|
throw new Error(`Invalid Proof: Expiration (${i.payload.exp}) is before parent's 'not before' (${t.payload.nbf})`);
|
|
41918
|
-
if (s &&
|
|
41918
|
+
if (s && Td(t.header.ucv, i.header.ucv))
|
|
41919
41919
|
throw new Error(`Invalid Proof: Version (${i.header.ucv}) is higher than parent's version (${t.header.ucv})`);
|
|
41920
41920
|
yield yield Hr(i);
|
|
41921
41921
|
} catch (i) {
|
|
@@ -42027,8 +42027,8 @@ const Ls = (e) => function(t, n, o = () => Zk(this, void 0, void 0, function* ()
|
|
|
42027
42027
|
yield Nt(yield* hi(Po(Qk(n)))), yield Nt(yield* hi(Po(Jk(e, t, n, o))));
|
|
42028
42028
|
});
|
|
42029
42029
|
};
|
|
42030
|
-
function
|
|
42031
|
-
return "capability" in e ? e.chainStep == null ? e.ucan.payload.iss :
|
|
42030
|
+
function Od(e) {
|
|
42031
|
+
return "capability" in e ? e.chainStep == null ? e.ucan.payload.iss : Od(e.chainStep) : e.ownershipDID;
|
|
42032
42032
|
}
|
|
42033
42033
|
const Gk = {
|
|
42034
42034
|
canDelegateResource(e, t) {
|
|
@@ -42248,7 +42248,7 @@ var Oh = function(e, t, n, o) {
|
|
|
42248
42248
|
}, a);
|
|
42249
42249
|
}
|
|
42250
42250
|
};
|
|
42251
|
-
const s_ = (e) => ({ ok: !0, value: e }),
|
|
42251
|
+
const s_ = (e) => ({ ok: !0, value: e }), su = (e) => ({ ok: !1, error: e }), i_ = (e) => (t, n) => Oh(void 0, void 0, void 0, function* () {
|
|
42252
42252
|
var o, r, s, a, i;
|
|
42253
42253
|
const { audience: l, requiredCapabilities: f } = n, c = (s = n.semantics) !== null && s !== void 0 ? s : Gk, d = (a = n.isRevoked) !== null && a !== void 0 ? a : () => Oh(void 0, void 0, void 0, function* () {
|
|
42254
42254
|
return !1;
|
|
@@ -42272,7 +42272,7 @@ const s_ = (e) => ({ ok: !0, value: e }), ru = (e) => ({ ok: !1, error: e }), i_
|
|
|
42272
42272
|
try {
|
|
42273
42273
|
const g = yield wc(e)(t);
|
|
42274
42274
|
if (g.payload.aud !== l)
|
|
42275
|
-
return
|
|
42275
|
+
return su([new Error(`Invalid UCAN: Expected audience to be ${l}, but it's ${g.payload.aud}`)]);
|
|
42276
42276
|
const w = [], E = new Set(f), b = [];
|
|
42277
42277
|
try {
|
|
42278
42278
|
e: for (var p = r_(Ls(e)(c, g, d)), m; m = yield p.next(), !m.done; ) {
|
|
@@ -42282,7 +42282,7 @@ const s_ = (e) => ({ ok: !0, value: e }), ru = (e) => ({ ok: !1, error: e }), i_
|
|
|
42282
42282
|
continue;
|
|
42283
42283
|
}
|
|
42284
42284
|
for (const y of E)
|
|
42285
|
-
vc(c, y.capability, v) &&
|
|
42285
|
+
vc(c, y.capability, v) && Od(v) === y.rootIssuer && (E.delete(y), b.push(Object.assign(Object.assign({}, y), { proof: v })));
|
|
42286
42286
|
if (E.size === 0)
|
|
42287
42287
|
break e;
|
|
42288
42288
|
}
|
|
@@ -42295,9 +42295,9 @@ const s_ = (e) => ({ ok: !0, value: e }), ru = (e) => ({ ok: !1, error: e }), i_
|
|
|
42295
42295
|
if (o) throw o.error;
|
|
42296
42296
|
}
|
|
42297
42297
|
}
|
|
42298
|
-
return E.size > 0 ?
|
|
42298
|
+
return E.size > 0 ? su(w) : s_(b);
|
|
42299
42299
|
} catch (g) {
|
|
42300
|
-
return
|
|
42300
|
+
return su([g instanceof Error ? g : new Error(`Unknown error during UCAN verification: ${g}`)]);
|
|
42301
42301
|
}
|
|
42302
42302
|
});
|
|
42303
42303
|
var l_ = function(e, t, n, o) {
|
|
@@ -42328,10 +42328,10 @@ var l_ = function(e, t, n, o) {
|
|
|
42328
42328
|
});
|
|
42329
42329
|
};
|
|
42330
42330
|
function Hh(e) {
|
|
42331
|
-
return En(e) && ut(e, "issuer") &&
|
|
42331
|
+
return En(e) && ut(e, "issuer") && Ld(e.issuer) && ut(e, "audience") && typeof e.audience == "string" && ut(e, "expiration") && typeof e.expiration == "number";
|
|
42332
42332
|
}
|
|
42333
42333
|
function a_(e) {
|
|
42334
|
-
return En(e) && ut(e, "issuer") &&
|
|
42334
|
+
return En(e) && ut(e, "issuer") && Ld(e.issuer) && ut(e, "expiration") && typeof e.expiration == "number";
|
|
42335
42335
|
}
|
|
42336
42336
|
const c_ = (e) => class ao {
|
|
42337
42337
|
constructor(n, o) {
|
|
@@ -42354,7 +42354,7 @@ const c_ = (e) => class ao {
|
|
|
42354
42354
|
* The UCAN must be signed with the private key of the issuer to be valid.
|
|
42355
42355
|
*/
|
|
42356
42356
|
issuedBy(n) {
|
|
42357
|
-
if (!
|
|
42357
|
+
if (!Ld(n))
|
|
42358
42358
|
throw new TypeError(`Expected a Keypair, but got ${n}`);
|
|
42359
42359
|
return new ao(Object.assign(Object.assign({}, this.state), { issuer: n }), this.defaultable);
|
|
42360
42360
|
}
|
|
@@ -42461,7 +42461,7 @@ const c_ = (e) => class ao {
|
|
|
42461
42461
|
if (!Hh(this.state))
|
|
42462
42462
|
throw new Error("Builder is missing one of the required properties before it can be built: issuer, audience and expiration.");
|
|
42463
42463
|
const n = this.buildPayload();
|
|
42464
|
-
return yield
|
|
42464
|
+
return yield Md(e)(n, this.state.issuer);
|
|
42465
42465
|
});
|
|
42466
42466
|
}
|
|
42467
42467
|
};
|
|
@@ -42510,17 +42510,17 @@ var Fh = function(e, t, n, o) {
|
|
|
42510
42510
|
}, a);
|
|
42511
42511
|
}
|
|
42512
42512
|
};
|
|
42513
|
-
const u_ = (e) => class
|
|
42513
|
+
const u_ = (e) => class df {
|
|
42514
42514
|
constructor(n, o) {
|
|
42515
42515
|
this.index = o, this.knownSemantics = n;
|
|
42516
42516
|
}
|
|
42517
42517
|
static empty(n) {
|
|
42518
|
-
return new
|
|
42518
|
+
return new df(n, {});
|
|
42519
42519
|
}
|
|
42520
42520
|
static fromTokens(n, o) {
|
|
42521
42521
|
var r, s, a, i;
|
|
42522
42522
|
return Fh(this, void 0, void 0, function* () {
|
|
42523
|
-
const l =
|
|
42523
|
+
const l = df.empty(n);
|
|
42524
42524
|
try {
|
|
42525
42525
|
for (r = Ph(o); s = yield r.next(), !s.done; ) {
|
|
42526
42526
|
const f = s.value, c = yield wc(e)(f);
|
|
@@ -42582,7 +42582,7 @@ const u_ = (e) => class ff {
|
|
|
42582
42582
|
if (s != null)
|
|
42583
42583
|
for (const a of s)
|
|
42584
42584
|
for (const i of a.capabilities)
|
|
42585
|
-
vc(this.knownSemantics, o, i) &&
|
|
42585
|
+
vc(this.knownSemantics, o, i) && Od(i) === r && (yield i);
|
|
42586
42586
|
}
|
|
42587
42587
|
};
|
|
42588
42588
|
var f_ = function(e, t, n, o) {
|
|
@@ -42659,7 +42659,7 @@ const Bh = (e, t) => uk(t, e.subarray(0, t.byteLength)), Uh = "did:key:z", zh =
|
|
|
42659
42659
|
throw new Error(`No DID method included: ${e}`);
|
|
42660
42660
|
return t[1];
|
|
42661
42661
|
}, h_ = (e) => {
|
|
42662
|
-
const t = Vk(e), n = E6(e), o =
|
|
42662
|
+
const t = Vk(e), n = E6(e), o = Md(e), r = wc(e), s = R6(e), a = i_(e), i = Ls(e), l = c_(e), f = u_(e);
|
|
42663
42663
|
return {
|
|
42664
42664
|
build: t,
|
|
42665
42665
|
sign: n,
|
|
@@ -42739,9 +42739,9 @@ class y_ {
|
|
|
42739
42739
|
if (this._bytesHashed += n, this._bufferLength > 0) {
|
|
42740
42740
|
for (; this._bufferLength < Yh && n > 0; )
|
|
42741
42741
|
this._buffer[this._bufferLength++] = t[o++], n--;
|
|
42742
|
-
this._bufferLength === this.blockSize && (
|
|
42742
|
+
this._bufferLength === this.blockSize && (iu(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize), this._bufferLength = 0);
|
|
42743
42743
|
}
|
|
42744
|
-
for (n >= this.blockSize && (o =
|
|
42744
|
+
for (n >= this.blockSize && (o = iu(this._tempHi, this._tempLo, this._stateHi, this._stateLo, t, o, n), n %= this.blockSize); n > 0; )
|
|
42745
42745
|
this._buffer[this._bufferLength++] = t[o++], n--;
|
|
42746
42746
|
return this;
|
|
42747
42747
|
}
|
|
@@ -42755,7 +42755,7 @@ class y_ {
|
|
|
42755
42755
|
this._buffer[o] = 128;
|
|
42756
42756
|
for (let i = o + 1; i < a - 8; i++)
|
|
42757
42757
|
this._buffer[i] = 0;
|
|
42758
|
-
_l(r, this._buffer, a - 8), _l(s, this._buffer, a - 4),
|
|
42758
|
+
_l(r, this._buffer, a - 8), _l(s, this._buffer, a - 4), iu(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, a), this._finished = !0;
|
|
42759
42759
|
}
|
|
42760
42760
|
for (let n = 0; n < this.digestLength / 8; n++)
|
|
42761
42761
|
_l(this._stateHi[n], t, n * 8), _l(this._stateLo[n], t, n * 8 + 4);
|
|
@@ -42960,7 +42960,7 @@ const Kh = new Int32Array([
|
|
|
42960
42960
|
1816402316,
|
|
42961
42961
|
1246189591
|
|
42962
42962
|
]);
|
|
42963
|
-
function
|
|
42963
|
+
function iu(e, t, n, o, r, s, a) {
|
|
42964
42964
|
let i = n[0], l = n[1], f = n[2], c = n[3], d = n[4], h = n[5], p = n[6], m = n[7], g = o[0], w = o[1], E = o[2], b = o[3], v = o[4], y = o[5], k = o[6], C = o[7], R, x, P, q, J, W, S, D;
|
|
42965
42965
|
for (; a >= 128; ) {
|
|
42966
42966
|
for (let I = 0; I < 16; I++) {
|
|
@@ -42993,7 +42993,7 @@ function At(e) {
|
|
|
42993
42993
|
}
|
|
42994
42994
|
const v_ = new Uint8Array(32);
|
|
42995
42995
|
v_[0] = 9;
|
|
42996
|
-
const Zh = At(),
|
|
42996
|
+
const Zh = At(), hf = At([1]);
|
|
42997
42997
|
At([
|
|
42998
42998
|
30883,
|
|
42999
42999
|
4953,
|
|
@@ -43086,7 +43086,7 @@ function Fr(e, t) {
|
|
|
43086
43086
|
for (let n = 0; n < 16; n++)
|
|
43087
43087
|
e[n] = t[n] | 0;
|
|
43088
43088
|
}
|
|
43089
|
-
function
|
|
43089
|
+
function lu(e) {
|
|
43090
43090
|
let t = 1;
|
|
43091
43091
|
for (let n = 0; n < 16; n++) {
|
|
43092
43092
|
let o = e[n] + t + 65535;
|
|
@@ -43105,7 +43105,7 @@ function D6(e, t) {
|
|
|
43105
43105
|
const n = At(), o = At();
|
|
43106
43106
|
for (let r = 0; r < 16; r++)
|
|
43107
43107
|
o[r] = t[r];
|
|
43108
|
-
|
|
43108
|
+
lu(o), lu(o), lu(o);
|
|
43109
43109
|
for (let r = 0; r < 2; r++) {
|
|
43110
43110
|
n[0] = o[0] - 65517;
|
|
43111
43111
|
for (let a = 1; a < 15; a++)
|
|
@@ -43159,7 +43159,7 @@ function x_(e, t) {
|
|
|
43159
43159
|
__(r, t[2]), Hn(n, t[0], r), Hn(o, t[1], r), D6(e, o), e[31] ^= C_(n) << 7;
|
|
43160
43160
|
}
|
|
43161
43161
|
function S_(e, t, n) {
|
|
43162
|
-
Fr(e[0], Zh), Fr(e[1],
|
|
43162
|
+
Fr(e[0], Zh), Fr(e[1], hf), Fr(e[2], hf), Fr(e[3], Zh);
|
|
43163
43163
|
for (let o = 255; o >= 0; --o) {
|
|
43164
43164
|
const r = n[o / 8 | 0] >> (o & 7) & 1;
|
|
43165
43165
|
Jh(e, t, r), Qh(t, e), Qh(e, e), Jh(e, t, r);
|
|
@@ -43167,7 +43167,7 @@ function S_(e, t, n) {
|
|
|
43167
43167
|
}
|
|
43168
43168
|
function E_(e, t) {
|
|
43169
43169
|
const n = [At(), At(), At(), At()];
|
|
43170
|
-
Fr(n[0], Gh), Fr(n[1], Xh), Fr(n[2],
|
|
43170
|
+
Fr(n[0], Gh), Fr(n[1], Xh), Fr(n[2], hf), Hn(n[3], Gh, Xh), S_(e, n, t);
|
|
43171
43171
|
}
|
|
43172
43172
|
function R_(e) {
|
|
43173
43173
|
if (e.length !== qh)
|
|
@@ -43231,14 +43231,14 @@ function _a(...e) {
|
|
|
43231
43231
|
for (let t = 0; t < e.length; t++)
|
|
43232
43232
|
e[t].fill(0);
|
|
43233
43233
|
}
|
|
43234
|
-
function
|
|
43234
|
+
function au(e) {
|
|
43235
43235
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
43236
43236
|
}
|
|
43237
43237
|
function bo(e, t) {
|
|
43238
43238
|
return e << 32 - t | e >>> t;
|
|
43239
43239
|
}
|
|
43240
43240
|
const L6 = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", I_ = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
43241
|
-
function
|
|
43241
|
+
function Hd(e) {
|
|
43242
43242
|
if (Qr(e), L6)
|
|
43243
43243
|
return e.toHex();
|
|
43244
43244
|
let t = "";
|
|
@@ -43329,7 +43329,7 @@ let M_ = class {
|
|
|
43329
43329
|
Ae(this, "length", 0);
|
|
43330
43330
|
Ae(this, "pos", 0);
|
|
43331
43331
|
Ae(this, "destroyed", !1);
|
|
43332
|
-
this.blockLen = t, this.outputLen = n, this.padOffset = o, this.isLE = r, this.buffer = new Uint8Array(t), this.view =
|
|
43332
|
+
this.blockLen = t, this.outputLen = n, this.padOffset = o, this.isLE = r, this.buffer = new Uint8Array(t), this.view = au(this.buffer);
|
|
43333
43333
|
}
|
|
43334
43334
|
update(t) {
|
|
43335
43335
|
ka(this), Qr(t);
|
|
@@ -43337,7 +43337,7 @@ let M_ = class {
|
|
|
43337
43337
|
for (let a = 0; a < s; ) {
|
|
43338
43338
|
const i = Math.min(r - this.pos, s - a);
|
|
43339
43339
|
if (i === r) {
|
|
43340
|
-
const l =
|
|
43340
|
+
const l = au(t);
|
|
43341
43341
|
for (; r <= s - a; a += r)
|
|
43342
43342
|
this.process(l, a);
|
|
43343
43343
|
continue;
|
|
@@ -43354,7 +43354,7 @@ let M_ = class {
|
|
|
43354
43354
|
for (let d = a; d < r; d++)
|
|
43355
43355
|
n[d] = 0;
|
|
43356
43356
|
o.setBigUint64(r - 8, BigInt(this.length * 8), s), this.process(o, 0);
|
|
43357
|
-
const i =
|
|
43357
|
+
const i = au(t), l = this.outputLen;
|
|
43358
43358
|
if (l % 4)
|
|
43359
43359
|
throw new Error("_sha2: outputLen must be aligned to 32bit");
|
|
43360
43360
|
const f = l / 4, c = this.get();
|
|
@@ -43505,7 +43505,7 @@ const P_ = /* @__PURE__ */ D_(
|
|
|
43505
43505
|
/* @__PURE__ */ N_(1)
|
|
43506
43506
|
);
|
|
43507
43507
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
43508
|
-
const jn = (e, t, n) => Qr(e, t, n), O6 = Zr, H6 =
|
|
43508
|
+
const jn = (e, t, n) => Qr(e, t, n), O6 = Zr, H6 = Hd, cr = (...e) => j_(...e), mf = (e) => M6(e), F6 = A6, P6 = (e) => A_(e), xa = /* @__PURE__ */ BigInt(0), pf = /* @__PURE__ */ BigInt(1);
|
|
43509
43509
|
function ji(e, t = "") {
|
|
43510
43510
|
if (typeof e != "boolean") {
|
|
43511
43511
|
const n = t && `"${t}" `;
|
|
@@ -43513,7 +43513,7 @@ function ji(e, t = "") {
|
|
|
43513
43513
|
}
|
|
43514
43514
|
return e;
|
|
43515
43515
|
}
|
|
43516
|
-
function
|
|
43516
|
+
function Fd(e) {
|
|
43517
43517
|
if (typeof e == "bigint") {
|
|
43518
43518
|
if (!Kl(e))
|
|
43519
43519
|
throw new RangeError("positive bigint expected, got " + e);
|
|
@@ -43521,7 +43521,7 @@ function Hd(e) {
|
|
|
43521
43521
|
O6(e);
|
|
43522
43522
|
return e;
|
|
43523
43523
|
}
|
|
43524
|
-
function
|
|
43524
|
+
function gf(e, t = "") {
|
|
43525
43525
|
if (typeof e != "number") {
|
|
43526
43526
|
const n = t && `"${t}" `;
|
|
43527
43527
|
throw new TypeError(n + "expected number, got type=" + typeof e);
|
|
@@ -43532,7 +43532,7 @@ function pf(e, t = "") {
|
|
|
43532
43532
|
}
|
|
43533
43533
|
}
|
|
43534
43534
|
function Sl(e) {
|
|
43535
|
-
const t =
|
|
43535
|
+
const t = Fd(e).toString(16);
|
|
43536
43536
|
return t.length & 1 ? "0" + t : t;
|
|
43537
43537
|
}
|
|
43538
43538
|
function B6(e) {
|
|
@@ -43541,22 +43541,22 @@ function B6(e) {
|
|
|
43541
43541
|
return e === "" ? xa : BigInt("0x" + e);
|
|
43542
43542
|
}
|
|
43543
43543
|
function bc(e) {
|
|
43544
|
-
return B6(
|
|
43544
|
+
return B6(Hd(e));
|
|
43545
43545
|
}
|
|
43546
43546
|
function U6(e) {
|
|
43547
|
-
return B6(
|
|
43547
|
+
return B6(Hd(B_(Qr(e)).reverse()));
|
|
43548
43548
|
}
|
|
43549
|
-
function
|
|
43549
|
+
function Pd(e, t) {
|
|
43550
43550
|
if (Zr(t), t === 0)
|
|
43551
43551
|
throw new RangeError("zero length");
|
|
43552
|
-
e =
|
|
43552
|
+
e = Fd(e);
|
|
43553
43553
|
const n = e.toString(16);
|
|
43554
43554
|
if (n.length > t * 2)
|
|
43555
43555
|
throw new RangeError("number too large");
|
|
43556
43556
|
return M6(n.padStart(t * 2, "0"));
|
|
43557
43557
|
}
|
|
43558
43558
|
function z6(e, t) {
|
|
43559
|
-
return
|
|
43559
|
+
return Pd(e, t).reverse();
|
|
43560
43560
|
}
|
|
43561
43561
|
function B_(e) {
|
|
43562
43562
|
return Uint8Array.from(jn(e));
|
|
@@ -43569,15 +43569,15 @@ function V6(e, t, n, o) {
|
|
|
43569
43569
|
if (!U_(t, n, o))
|
|
43570
43570
|
throw new RangeError("expected valid " + e + ": " + n + " <= n < " + o + ", got " + t);
|
|
43571
43571
|
}
|
|
43572
|
-
function
|
|
43572
|
+
function Bd(e) {
|
|
43573
43573
|
if (e < xa)
|
|
43574
43574
|
throw new Error("expected non-negative bigint, got " + e);
|
|
43575
43575
|
let t;
|
|
43576
|
-
for (t = 0; e > xa; e >>=
|
|
43576
|
+
for (t = 0; e > xa; e >>= pf, t += 1)
|
|
43577
43577
|
;
|
|
43578
43578
|
return t;
|
|
43579
43579
|
}
|
|
43580
|
-
const
|
|
43580
|
+
const Ud = (e) => (pf << BigInt(e)) - pf;
|
|
43581
43581
|
function z_(e, t, n) {
|
|
43582
43582
|
if (Zr(e, "hashLen"), Zr(t, "qByteLen"), typeof n != "function")
|
|
43583
43583
|
throw new TypeError("hmacFn must be a function");
|
|
@@ -43653,18 +43653,18 @@ function t0(e, t) {
|
|
|
43653
43653
|
throw new Error("invert: does not exist");
|
|
43654
43654
|
return co(r, t);
|
|
43655
43655
|
}
|
|
43656
|
-
function
|
|
43656
|
+
function zd(e, t, n) {
|
|
43657
43657
|
const o = e;
|
|
43658
43658
|
if (!o.eql(o.sqr(t), n))
|
|
43659
43659
|
throw new Error("Cannot find square root");
|
|
43660
43660
|
}
|
|
43661
43661
|
function Z6(e, t) {
|
|
43662
43662
|
const n = e, o = (n.ORDER + gn) / W6, r = n.pow(t, o);
|
|
43663
|
-
return
|
|
43663
|
+
return zd(n, r, t), r;
|
|
43664
43664
|
}
|
|
43665
43665
|
function W_(e, t) {
|
|
43666
43666
|
const n = e, o = (n.ORDER - Y6) / K6, r = n.mul(t, Pr), s = n.pow(r, o), a = n.mul(t, s), i = n.mul(n.mul(a, Pr), s), l = n.mul(a, n.sub(i, n.ONE));
|
|
43667
|
-
return
|
|
43667
|
+
return zd(n, l, t), l;
|
|
43668
43668
|
}
|
|
43669
43669
|
function Y_(e) {
|
|
43670
43670
|
const t = kc(e), n = G6(e), o = n(t, t.neg(t.ONE)), r = n(t, o), s = n(t, t.neg(o)), a = (e + V_) / q6;
|
|
@@ -43674,7 +43674,7 @@ function Y_(e) {
|
|
|
43674
43674
|
const h = f.mul(c, r), p = f.mul(c, s), m = f.eql(f.sqr(d), l), g = f.eql(f.sqr(h), l);
|
|
43675
43675
|
c = f.cmov(c, d, m), d = f.cmov(p, h, g);
|
|
43676
43676
|
const w = f.eql(f.sqr(d), l), E = f.cmov(c, d, w);
|
|
43677
|
-
return
|
|
43677
|
+
return zd(f, E, l), E;
|
|
43678
43678
|
};
|
|
43679
43679
|
}
|
|
43680
43680
|
function G6(e) {
|
|
@@ -43740,7 +43740,7 @@ function Z_(e) {
|
|
|
43740
43740
|
BYTES: "number",
|
|
43741
43741
|
BITS: "number"
|
|
43742
43742
|
}, n = q_.reduce((o, r) => (o[r] = "function", o), t);
|
|
43743
|
-
if (Cc(e, n),
|
|
43743
|
+
if (Cc(e, n), gf(e.BYTES, "BYTES"), gf(e.BITS, "BITS"), e.BYTES < 1 || e.BITS < 1)
|
|
43744
43744
|
throw new Error("invalid field: expected BYTES/BITS > 0");
|
|
43745
43745
|
if (e.ORDER <= gn)
|
|
43746
43746
|
throw new Error("invalid field: expected ORDER > 1, got " + e.ORDER);
|
|
@@ -43774,7 +43774,7 @@ function X_(e, t) {
|
|
|
43774
43774
|
throw new Error("invalid n length: expected positive n, got " + e);
|
|
43775
43775
|
if (t !== void 0 && t < 1)
|
|
43776
43776
|
throw new Error("invalid n length: expected positive bit length, got " + t);
|
|
43777
|
-
const n =
|
|
43777
|
+
const n = Bd(e);
|
|
43778
43778
|
if (t !== void 0 && t < n)
|
|
43779
43779
|
throw new Error(`invalid n length: expected bit length (${n}) >= n.length (${t})`);
|
|
43780
43780
|
const o = t !== void 0 ? t : n, r = Math.ceil(o / 8);
|
|
@@ -43863,7 +43863,7 @@ class Q6 {
|
|
|
43863
43863
|
return n || o0.set(this, n = K_(this.ORDER)), n(this, t);
|
|
43864
43864
|
}
|
|
43865
43865
|
toBytes(t) {
|
|
43866
|
-
return this.isLE ? z6(t, this.BYTES) :
|
|
43866
|
+
return this.isLE ? z6(t, this.BYTES) : Pd(t, this.BYTES);
|
|
43867
43867
|
}
|
|
43868
43868
|
fromBytes(t, n = !1) {
|
|
43869
43869
|
jn(t);
|
|
@@ -43900,7 +43900,7 @@ function J6(e) {
|
|
|
43900
43900
|
throw new Error("field order must be bigint");
|
|
43901
43901
|
if (e <= gn)
|
|
43902
43902
|
throw new Error("field order must be greater than 1");
|
|
43903
|
-
const t =
|
|
43903
|
+
const t = Bd(e - gn);
|
|
43904
43904
|
return Math.ceil(t / 8);
|
|
43905
43905
|
}
|
|
43906
43906
|
function eg(e) {
|
|
@@ -43913,7 +43913,7 @@ function Q_(e, t, n = !1) {
|
|
|
43913
43913
|
if (o < s || o > 1024)
|
|
43914
43914
|
throw new Error("expected " + s + "-1024 bytes of input, got " + o);
|
|
43915
43915
|
const a = n ? U6(e) : bc(e), i = co(a, t - gn) + gn;
|
|
43916
|
-
return n ? z6(i, r) :
|
|
43916
|
+
return n ? z6(i, r) : Pd(i, r);
|
|
43917
43917
|
}
|
|
43918
43918
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
43919
43919
|
const Ss = /* @__PURE__ */ BigInt(0), Br = /* @__PURE__ */ BigInt(1);
|
|
@@ -43929,9 +43929,9 @@ function tg(e, t) {
|
|
|
43929
43929
|
if (!Number.isSafeInteger(e) || e <= 0 || e > t)
|
|
43930
43930
|
throw new Error("invalid window size, expected [1.." + t + "], got W=" + e);
|
|
43931
43931
|
}
|
|
43932
|
-
function
|
|
43932
|
+
function cu(e, t) {
|
|
43933
43933
|
tg(e, t);
|
|
43934
|
-
const n = Math.ceil(t / e) + 1, o = 2 ** (e - 1), r = 2 ** e, s =
|
|
43934
|
+
const n = Math.ceil(t / e) + 1, o = 2 ** (e - 1), r = 2 ** e, s = Ud(e), a = BigInt(e);
|
|
43935
43935
|
return { windows: n, windowSize: o, mask: s, maxNumber: r, shiftBy: a };
|
|
43936
43936
|
}
|
|
43937
43937
|
function s0(e, t, n) {
|
|
@@ -43941,8 +43941,8 @@ function s0(e, t, n) {
|
|
|
43941
43941
|
const f = t * o, c = f + Math.abs(i) - 1, d = i === 0, h = i < 0, p = t % 2 !== 0;
|
|
43942
43942
|
return { nextN: l, offset: c, isZero: d, isNeg: h, isNegF: p, offsetF: f };
|
|
43943
43943
|
}
|
|
43944
|
-
const
|
|
43945
|
-
function
|
|
43944
|
+
const uu = /* @__PURE__ */ new WeakMap(), ng = /* @__PURE__ */ new WeakMap();
|
|
43945
|
+
function fu(e) {
|
|
43946
43946
|
return ng.get(e) || 1;
|
|
43947
43947
|
}
|
|
43948
43948
|
function i0(e) {
|
|
@@ -43978,7 +43978,7 @@ class J_ {
|
|
|
43978
43978
|
* @returns precomputed point tables flattened to a single array
|
|
43979
43979
|
*/
|
|
43980
43980
|
precomputeWindow(t, n) {
|
|
43981
|
-
const { windows: o, windowSize: r } =
|
|
43981
|
+
const { windows: o, windowSize: r } = cu(n, this.bits), s = [];
|
|
43982
43982
|
let a = t, i = a;
|
|
43983
43983
|
for (let l = 0; l < o; l++) {
|
|
43984
43984
|
i = a, s.push(i);
|
|
@@ -43998,7 +43998,7 @@ class J_ {
|
|
|
43998
43998
|
if (!this.Fn.isValid(o))
|
|
43999
43999
|
throw new Error("invalid scalar");
|
|
44000
44000
|
let r = this.ZERO, s = this.BASE;
|
|
44001
|
-
const a =
|
|
44001
|
+
const a = cu(t, this.bits);
|
|
44002
44002
|
for (let i = 0; i < a.windows; i++) {
|
|
44003
44003
|
const { nextN: l, offset: f, isZero: c, isNeg: d, isNegF: h, offsetF: p } = s0(o, i, a);
|
|
44004
44004
|
o = l, c ? s = s.add(Sa(h, n[p])) : r = r.add(Sa(d, n[f]));
|
|
@@ -44012,7 +44012,7 @@ class J_ {
|
|
|
44012
44012
|
* @returns point
|
|
44013
44013
|
*/
|
|
44014
44014
|
wNAFUnsafe(t, n, o, r = this.ZERO) {
|
|
44015
|
-
const s =
|
|
44015
|
+
const s = cu(t, this.bits);
|
|
44016
44016
|
for (let a = 0; a < s.windows && o !== Ss; a++) {
|
|
44017
44017
|
const { nextN: i, offset: l, isZero: f, isNeg: c } = s0(o, a, s);
|
|
44018
44018
|
if (o = i, !f) {
|
|
@@ -44023,25 +44023,25 @@ class J_ {
|
|
|
44023
44023
|
return i0(o), r;
|
|
44024
44024
|
}
|
|
44025
44025
|
getPrecomputes(t, n, o) {
|
|
44026
|
-
let r =
|
|
44027
|
-
return r || (r = this.precomputeWindow(n, t), t !== 1 && (typeof o == "function" && (r = o(r)),
|
|
44026
|
+
let r = uu.get(n);
|
|
44027
|
+
return r || (r = this.precomputeWindow(n, t), t !== 1 && (typeof o == "function" && (r = o(r)), uu.set(n, r))), r;
|
|
44028
44028
|
}
|
|
44029
44029
|
cached(t, n, o) {
|
|
44030
|
-
const r =
|
|
44030
|
+
const r = fu(t);
|
|
44031
44031
|
return this.wNAF(r, this.getPrecomputes(r, t, o), n);
|
|
44032
44032
|
}
|
|
44033
44033
|
unsafe(t, n, o, r) {
|
|
44034
|
-
const s =
|
|
44034
|
+
const s = fu(t);
|
|
44035
44035
|
return s === 1 ? this._unsafeLadder(t, n, r) : this.wNAFUnsafe(s, this.getPrecomputes(s, t, o), n, r);
|
|
44036
44036
|
}
|
|
44037
44037
|
// We calculate precomputes for elliptic curve point multiplication
|
|
44038
44038
|
// using windowed method. This specifies window size and
|
|
44039
44039
|
// stores precomputed values. Usually only base point would be precomputed.
|
|
44040
44040
|
createCache(t, n) {
|
|
44041
|
-
tg(n, this.bits), ng.set(t, n),
|
|
44041
|
+
tg(n, this.bits), ng.set(t, n), uu.delete(t);
|
|
44042
44042
|
}
|
|
44043
44043
|
hasCache(t) {
|
|
44044
|
-
return
|
|
44044
|
+
return fu(t) !== 1;
|
|
44045
44045
|
}
|
|
44046
44046
|
}
|
|
44047
44047
|
function ex(e, t, n, o) {
|
|
@@ -44135,22 +44135,22 @@ function rx(e, t, n) {
|
|
|
44135
44135
|
let f = e - i * o - l * s, c = -i * r - l * a;
|
|
44136
44136
|
const d = f < Eo, h = c < Eo;
|
|
44137
44137
|
d && (f = -f), h && (c = -c);
|
|
44138
|
-
const p =
|
|
44138
|
+
const p = Ud(Math.ceil(Bd(n) / 2)) + ur;
|
|
44139
44139
|
if (f < Eo || f >= p || c < Eo || c >= p)
|
|
44140
44140
|
throw new Error("splitScalar (endomorphism): failed for k");
|
|
44141
44141
|
return { k1neg: d, k1: f, k2neg: h, k2: c };
|
|
44142
44142
|
}
|
|
44143
|
-
function
|
|
44143
|
+
function yf(e) {
|
|
44144
44144
|
if (!["compact", "recovered", "der"].includes(e))
|
|
44145
44145
|
throw new Error('Signature format must be "compact", "recovered", or "der"');
|
|
44146
44146
|
return e;
|
|
44147
44147
|
}
|
|
44148
|
-
function
|
|
44148
|
+
function du(e, t) {
|
|
44149
44149
|
Cc(e);
|
|
44150
44150
|
const n = {};
|
|
44151
44151
|
for (let o of Object.keys(t))
|
|
44152
44152
|
n[o] = e[o] === void 0 ? t[o] : e[o];
|
|
44153
|
-
return ji(n.lowS, "lowS"), ji(n.prehash, "prehash"), n.format !== void 0 &&
|
|
44153
|
+
return ji(n.lowS, "lowS"), ji(n.prehash, "prehash"), n.format !== void 0 && yf(n.format), n;
|
|
44154
44154
|
}
|
|
44155
44155
|
class sx extends Error {
|
|
44156
44156
|
constructor(t = "") {
|
|
@@ -44164,7 +44164,7 @@ const ho = {
|
|
|
44164
44164
|
_tlv: {
|
|
44165
44165
|
encode: (e, t) => {
|
|
44166
44166
|
const { Err: n } = ho;
|
|
44167
|
-
if (
|
|
44167
|
+
if (gf(e, "tag"), e < 0 || e > 255)
|
|
44168
44168
|
throw new n("tlv.encode: wrong tag");
|
|
44169
44169
|
if (typeof t != "string")
|
|
44170
44170
|
throw new TypeError('"data" expected string, got type=' + typeof t);
|
|
@@ -44218,7 +44218,7 @@ const ho = {
|
|
|
44218
44218
|
_int: {
|
|
44219
44219
|
encode(e) {
|
|
44220
44220
|
const { Err: t } = ho;
|
|
44221
|
-
if (
|
|
44221
|
+
if (Fd(e), e < Eo)
|
|
44222
44222
|
throw new t("integer: negative integers are not allowed");
|
|
44223
44223
|
let n = Sl(e);
|
|
44224
44224
|
if (Number.parseInt(n[0], 16) & 8 && (n = "00" + n), n.length & 1)
|
|
@@ -44369,7 +44369,7 @@ function lx(e, t = {}) {
|
|
|
44369
44369
|
return D.assertValidity(), D;
|
|
44370
44370
|
}
|
|
44371
44371
|
static fromHex(S) {
|
|
44372
|
-
return J.fromBytes(
|
|
44372
|
+
return J.fromBytes(mf(S));
|
|
44373
44373
|
}
|
|
44374
44374
|
get x() {
|
|
44375
44375
|
return this.toAffine().x;
|
|
@@ -44641,7 +44641,7 @@ function cx(e, t, n = {}) {
|
|
|
44641
44641
|
throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
|
|
44642
44642
|
}
|
|
44643
44643
|
function y(I, O) {
|
|
44644
|
-
|
|
44644
|
+
yf(O);
|
|
44645
44645
|
const Y = m.signature, H = O === "compact" ? Y : O === "recovered" ? Y + 1 : void 0;
|
|
44646
44646
|
return jn(I, H);
|
|
44647
44647
|
}
|
|
@@ -44669,7 +44669,7 @@ function cx(e, t, n = {}) {
|
|
|
44669
44669
|
return new k(i.fromBytes(A), i.fromBytes(B), H);
|
|
44670
44670
|
}
|
|
44671
44671
|
static fromHex(O, Y) {
|
|
44672
|
-
return this.fromBytes(
|
|
44672
|
+
return this.fromBytes(mf(O), Y);
|
|
44673
44673
|
}
|
|
44674
44674
|
assertRecovery() {
|
|
44675
44675
|
const { recovery: O } = this;
|
|
@@ -44696,8 +44696,8 @@ function cx(e, t, n = {}) {
|
|
|
44696
44696
|
return E(this.s);
|
|
44697
44697
|
}
|
|
44698
44698
|
toBytes(O = g.format) {
|
|
44699
|
-
if (
|
|
44700
|
-
return
|
|
44699
|
+
if (yf(O), O === "der")
|
|
44700
|
+
return mf(ho.hexFromSig(this));
|
|
44701
44701
|
const { r: Y, s: H } = this, L = i.toBytes(Y), A = i.toBytes(H);
|
|
44702
44702
|
return O === "recovered" ? (v(), cr(Uint8Array.of(this.assertRecovery()), L, A)) : cr(L, A);
|
|
44703
44703
|
}
|
|
@@ -44713,7 +44713,7 @@ function cx(e, t, n = {}) {
|
|
|
44713
44713
|
return H > 0 ? Y >> BigInt(H) : Y;
|
|
44714
44714
|
} : n.bits2int, R = n.bits2int_modN === void 0 ? function(O) {
|
|
44715
44715
|
return i.create(C(O));
|
|
44716
|
-
} : n.bits2int_modN, x =
|
|
44716
|
+
} : n.bits2int_modN, x = Ud(f);
|
|
44717
44717
|
function P(I) {
|
|
44718
44718
|
return V6("num < 2^" + f, I, Eo, x), i.toBytes(I);
|
|
44719
44719
|
}
|
|
@@ -44721,7 +44721,7 @@ function cx(e, t, n = {}) {
|
|
|
44721
44721
|
return jn(I, void 0, "message"), O ? jn(o(I), void 0, "prehashed message") : I;
|
|
44722
44722
|
}
|
|
44723
44723
|
function J(I, O, Y) {
|
|
44724
|
-
const { lowS: H, prehash: L, extraEntropy: A } =
|
|
44724
|
+
const { lowS: H, prehash: L, extraEntropy: A } = du(Y, g);
|
|
44725
44725
|
I = q(I, L);
|
|
44726
44726
|
const B = R(I), M = i.fromBytes(O);
|
|
44727
44727
|
if (!i.isValidNot0(M))
|
|
@@ -44752,7 +44752,7 @@ function cx(e, t, n = {}) {
|
|
|
44752
44752
|
return z_(o.outputLen, i.BYTES, s)(H, L).toBytes(Y.format);
|
|
44753
44753
|
}
|
|
44754
44754
|
function S(I, O, Y, H = {}) {
|
|
44755
|
-
const { lowS: L, prehash: A, format: B } =
|
|
44755
|
+
const { lowS: L, prehash: A, format: B } = du(H, g);
|
|
44756
44756
|
if (Y = jn(Y, void 0, "publicKey"), O = q(O, A), !F6(I)) {
|
|
44757
44757
|
const M = I instanceof k ? ", use sig.toBytes()" : "";
|
|
44758
44758
|
throw new Error("verify expects Uint8Array signature" + M);
|
|
@@ -44769,7 +44769,7 @@ function cx(e, t, n = {}) {
|
|
|
44769
44769
|
}
|
|
44770
44770
|
}
|
|
44771
44771
|
function D(I, O, Y = {}) {
|
|
44772
|
-
const { prehash: H } =
|
|
44772
|
+
const { prehash: H } = du(Y, g);
|
|
44773
44773
|
return O = q(O, H), k.fromBytes(I, "recovered").recoverPublicKey(O).toBytes();
|
|
44774
44774
|
}
|
|
44775
44775
|
return Object.freeze({
|
|
@@ -44787,7 +44787,7 @@ function cx(e, t, n = {}) {
|
|
|
44787
44787
|
});
|
|
44788
44788
|
}
|
|
44789
44789
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
44790
|
-
const
|
|
44790
|
+
const Vd = {
|
|
44791
44791
|
p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
|
|
44792
44792
|
n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
|
|
44793
44793
|
h: BigInt(1),
|
|
@@ -44803,13 +44803,13 @@ const zd = {
|
|
|
44803
44803
|
]
|
|
44804
44804
|
}, u0 = /* @__PURE__ */ BigInt(2);
|
|
44805
44805
|
function fx(e) {
|
|
44806
|
-
const t =
|
|
44807
|
-
if (!
|
|
44806
|
+
const t = Vd.p, n = BigInt(3), o = BigInt(6), r = BigInt(11), s = BigInt(22), a = BigInt(23), i = BigInt(44), l = BigInt(88), f = e * e * e % t, c = f * f * e % t, d = Kn(c, n, t) * c % t, h = Kn(d, n, t) * c % t, p = Kn(h, u0, t) * f % t, m = Kn(p, r, t) * p % t, g = Kn(m, s, t) * m % t, w = Kn(g, i, t) * g % t, E = Kn(w, l, t) * w % t, b = Kn(E, i, t) * g % t, v = Kn(b, n, t) * c % t, y = Kn(v, a, t) * m % t, k = Kn(y, o, t) * f % t, C = Kn(k, u0, t);
|
|
44807
|
+
if (!wf.eql(wf.sqr(C), e))
|
|
44808
44808
|
throw new Error("Cannot find square root");
|
|
44809
44809
|
return C;
|
|
44810
44810
|
}
|
|
44811
|
-
const
|
|
44812
|
-
Fp:
|
|
44811
|
+
const wf = kc(Vd.p, { sqrt: fx }), dx = /* @__PURE__ */ lx(Vd, {
|
|
44812
|
+
Fp: wf,
|
|
44813
44813
|
endo: ux
|
|
44814
44814
|
}), ig = /* @__PURE__ */ cx(dx, P_), hx = 12, lg = new TextEncoder().encode("ECIES-AES256-GCM-SHA256"), Di = ig, mx = (e, t) => {
|
|
44815
44815
|
const n = Di.utils.randomSecretKey(e), o = Di.getPublicKey(n), r = "bytes";
|
|
@@ -44866,11 +44866,11 @@ function yr(...e) {
|
|
|
44866
44866
|
function _c(e) {
|
|
44867
44867
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
44868
44868
|
}
|
|
44869
|
-
const
|
|
44869
|
+
const $d = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, cg = (e) => e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255, rn = $d ? (e) => e : (e) => cg(e) >>> 0, wx = (e) => {
|
|
44870
44870
|
for (let t = 0; t < e.length; t++)
|
|
44871
44871
|
e[t] = cg(e[t]);
|
|
44872
44872
|
return e;
|
|
44873
|
-
},
|
|
44873
|
+
}, Wd = $d ? (e) => e : wx;
|
|
44874
44874
|
function vx(e, t) {
|
|
44875
44875
|
if (e.length !== t.length)
|
|
44876
44876
|
return !1;
|
|
@@ -45016,30 +45016,30 @@ class Rx {
|
|
|
45016
45016
|
digestInto(t) {
|
|
45017
45017
|
d0(this), gx(t, this, !0), this.finished = !0;
|
|
45018
45018
|
const { s0: n, s1: o, s2: r, s3: s } = this, a = Wr(t);
|
|
45019
|
-
a[0] = n, a[1] = o, a[2] = r, a[3] = s,
|
|
45019
|
+
a[0] = n, a[1] = o, a[2] = r, a[3] = s, Wd(a);
|
|
45020
45020
|
}
|
|
45021
45021
|
digest() {
|
|
45022
45022
|
const t = new Uint8Array(os);
|
|
45023
45023
|
return this.digestInto(t), this.destroy(), t;
|
|
45024
45024
|
}
|
|
45025
45025
|
}
|
|
45026
|
-
const h0 = /* @__PURE__ */ bx(16, (e, t) => new Rx(e, t), (e) => [e.length]),
|
|
45026
|
+
const h0 = /* @__PURE__ */ bx(16, (e, t) => new Rx(e, t), (e) => [e.length]), vf = 16, Ix = 4, Il = /* @__PURE__ */ new Uint8Array(vf), jx = 283;
|
|
45027
45027
|
function Dx(e) {
|
|
45028
45028
|
if (![16, 24, 32].includes(e.length))
|
|
45029
45029
|
throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length=' + e.length);
|
|
45030
45030
|
}
|
|
45031
|
-
function
|
|
45031
|
+
function Yd(e) {
|
|
45032
45032
|
return e << 1 ^ jx & -(e >> 7);
|
|
45033
45033
|
}
|
|
45034
45034
|
function m0(e, t) {
|
|
45035
45035
|
let n = 0;
|
|
45036
45036
|
for (; t > 0; t >>= 1)
|
|
45037
|
-
n ^= e & -(t & 1), e =
|
|
45037
|
+
n ^= e & -(t & 1), e = Yd(e);
|
|
45038
45038
|
return n;
|
|
45039
45039
|
}
|
|
45040
45040
|
const Ax = /* @__PURE__ */ (() => {
|
|
45041
45041
|
const e = new Uint8Array(256);
|
|
45042
|
-
for (let n = 0, o = 1; n < 256; n++, o ^=
|
|
45042
|
+
for (let n = 0, o = 1; n < 256; n++, o ^= Yd(o))
|
|
45043
45043
|
e[n] = o;
|
|
45044
45044
|
const t = new Uint8Array(256);
|
|
45045
45045
|
t[0] = 99;
|
|
@@ -45048,11 +45048,11 @@ const Ax = /* @__PURE__ */ (() => {
|
|
|
45048
45048
|
o |= o << 8, t[e[n]] = (o ^ o >> 4 ^ o >> 5 ^ o >> 6 ^ o >> 7 ^ 99) & 255;
|
|
45049
45049
|
}
|
|
45050
45050
|
return yr(e), t;
|
|
45051
|
-
})(), Nx = (e) => e << 24 | e >>> 8,
|
|
45051
|
+
})(), Nx = (e) => e << 24 | e >>> 8, hu = (e) => e << 8 | e >>> 24;
|
|
45052
45052
|
function Tx(e, t) {
|
|
45053
45053
|
if (e.length !== 256)
|
|
45054
45054
|
throw new Error("Wrong sbox length");
|
|
45055
|
-
const n = new Uint32Array(256).map((f, c) => t(e[c])), o = n.map(
|
|
45055
|
+
const n = new Uint32Array(256).map((f, c) => t(e[c])), o = n.map(hu), r = o.map(hu), s = r.map(hu), a = new Uint32Array(256 * 256), i = new Uint32Array(256 * 256), l = new Uint16Array(256 * 256);
|
|
45056
45056
|
for (let f = 0; f < 256; f++)
|
|
45057
45057
|
for (let c = 0; c < 256; c++) {
|
|
45058
45058
|
const d = f * 256 + c;
|
|
@@ -45062,7 +45062,7 @@ function Tx(e, t) {
|
|
|
45062
45062
|
}
|
|
45063
45063
|
const fg = /* @__PURE__ */ Tx(Ax, (e) => m0(e, 3) << 24 | e << 16 | e << 8 | m0(e, 2)), Lx = /* @__PURE__ */ (() => {
|
|
45064
45064
|
const e = new Uint8Array(16);
|
|
45065
|
-
for (let t = 0, n = 1; t < 16; t++, n =
|
|
45065
|
+
for (let t = 0, n = 1; t < 16; t++, n = Yd(n))
|
|
45066
45066
|
e[t] = n;
|
|
45067
45067
|
return e;
|
|
45068
45068
|
})();
|
|
@@ -45071,8 +45071,8 @@ function Mx(e) {
|
|
|
45071
45071
|
const t = e.length;
|
|
45072
45072
|
Dx(e);
|
|
45073
45073
|
const { sbox2: n } = fg, o = [];
|
|
45074
|
-
(
|
|
45075
|
-
const r =
|
|
45074
|
+
(!$d || !Ai(e)) && o.push(e = Ni(e));
|
|
45075
|
+
const r = Wd(Wr(e)), s = r.length, a = (l) => ii(n, l, l, l, l), i = new Uint32Array(t + 28);
|
|
45076
45076
|
i.set(r);
|
|
45077
45077
|
for (let l = s; l < i.length; l++) {
|
|
45078
45078
|
let f = i[l - 1];
|
|
@@ -45099,15 +45099,15 @@ function p0(e, t, n, o, r) {
|
|
|
45099
45099
|
return { s0: c, s1: d, s2: h, s3: p };
|
|
45100
45100
|
}
|
|
45101
45101
|
function Dl(e, t, n, o, r) {
|
|
45102
|
-
Bn(n,
|
|
45102
|
+
Bn(n, vf, "nonce"), Bn(o), r = kx(o.length, r);
|
|
45103
45103
|
const s = n, a = Wr(s), i = _c(s), l = Wr(o), f = Wr(r), c = t ? 0 : 12, d = o.length;
|
|
45104
45104
|
let h = i.getUint32(c, t), { s0: p, s1: m, s2: g, s3: w } = p0(e, rn(a[0]), rn(a[1]), rn(a[2]), rn(a[3]));
|
|
45105
45105
|
for (let b = 0; b + 4 <= l.length; b += 4)
|
|
45106
45106
|
f[b + 0] = l[b + 0] ^ rn(p), f[b + 1] = l[b + 1] ^ rn(m), f[b + 2] = l[b + 2] ^ rn(g), f[b + 3] = l[b + 3] ^ rn(w), h = h + 1 >>> 0, i.setUint32(c, h, t), { s0: p, s1: m, s2: g, s3: w } = p0(e, rn(a[0]), rn(a[1]), rn(a[2]), rn(a[3]));
|
|
45107
|
-
const E =
|
|
45107
|
+
const E = vf * Math.floor(l.length / Ix);
|
|
45108
45108
|
if (E < d) {
|
|
45109
45109
|
const b = new Uint32Array([p, m, g, w]);
|
|
45110
|
-
|
|
45110
|
+
Wd(b);
|
|
45111
45111
|
const v = yx(b);
|
|
45112
45112
|
for (let y = E, k = 0; y < d; y++, k++)
|
|
45113
45113
|
r[y] = o[y] ^ v[k];
|
|
@@ -45185,7 +45185,7 @@ function Ti(e, t, n = "") {
|
|
|
45185
45185
|
}
|
|
45186
45186
|
return e;
|
|
45187
45187
|
}
|
|
45188
|
-
function
|
|
45188
|
+
function Kd(e) {
|
|
45189
45189
|
if (typeof e != "function" || typeof e.create != "function")
|
|
45190
45190
|
throw new TypeError("Hash must wrapped by utils.createHasher");
|
|
45191
45191
|
if (Ea(e.outputLen), Ea(e.blockLen), e.outputLen < 1)
|
|
@@ -45209,7 +45209,7 @@ function Li(...e) {
|
|
|
45209
45209
|
for (let t = 0; t < e.length; t++)
|
|
45210
45210
|
e[t].fill(0);
|
|
45211
45211
|
}
|
|
45212
|
-
function
|
|
45212
|
+
function mu(e) {
|
|
45213
45213
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
45214
45214
|
}
|
|
45215
45215
|
function Co(e, t) {
|
|
@@ -45242,7 +45242,7 @@ class g0 {
|
|
|
45242
45242
|
Ae(this, "canXOF", !1);
|
|
45243
45243
|
Ae(this, "finished", !1);
|
|
45244
45244
|
Ae(this, "destroyed", !1);
|
|
45245
|
-
if (
|
|
45245
|
+
if (Kd(t), Ti(n, void 0, "key"), this.iHash = t.create(), typeof this.iHash.update != "function")
|
|
45246
45246
|
throw new Error("Expected instance of class which extends utils.Hash");
|
|
45247
45247
|
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
45248
45248
|
const o = this.blockLen, r = new Uint8Array(o);
|
|
@@ -45283,11 +45283,11 @@ const mg = /* @__PURE__ */ (() => {
|
|
|
45283
45283
|
return e.create = (t, n) => new g0(t, n), e;
|
|
45284
45284
|
})();
|
|
45285
45285
|
function zx(e, t, n) {
|
|
45286
|
-
return
|
|
45286
|
+
return Kd(e), n === void 0 && (n = new Uint8Array(e.outputLen)), mg(e, n, t);
|
|
45287
45287
|
}
|
|
45288
|
-
const
|
|
45288
|
+
const pu = /* @__PURE__ */ Uint8Array.of(0), y0 = /* @__PURE__ */ Uint8Array.of();
|
|
45289
45289
|
function Vx(e, t, n, o = 32) {
|
|
45290
|
-
|
|
45290
|
+
Kd(e), Ea(o, "length"), Ti(t, void 0, "prk");
|
|
45291
45291
|
const r = e.outputLen;
|
|
45292
45292
|
if (t.length < r)
|
|
45293
45293
|
throw new Error('"prk" must be at least HashLen octets');
|
|
@@ -45297,8 +45297,8 @@ function Vx(e, t, n, o = 32) {
|
|
|
45297
45297
|
n === void 0 ? n = y0 : Ti(n, void 0, "info");
|
|
45298
45298
|
const a = new Uint8Array(s * r), i = mg.create(e, t), l = i._cloneInto(), f = new Uint8Array(i.outputLen);
|
|
45299
45299
|
for (let c = 0; c < s; c++)
|
|
45300
|
-
|
|
45301
|
-
return i.destroy(), l.destroy(), Li(f,
|
|
45300
|
+
pu[0] = c + 1, l.update(c === 0 ? y0 : f).update(n).update(pu).digestInto(f), a.set(f, r * c), i._cloneInto(l);
|
|
45301
|
+
return i.destroy(), l.destroy(), Li(f, pu), a.slice(0, o);
|
|
45302
45302
|
}
|
|
45303
45303
|
const $x = (e, t, n, o, r) => Vx(e, zx(e, t, n), o, r);
|
|
45304
45304
|
function Wx(e, t, n) {
|
|
@@ -45321,7 +45321,7 @@ class Kx {
|
|
|
45321
45321
|
Ae(this, "length", 0);
|
|
45322
45322
|
Ae(this, "pos", 0);
|
|
45323
45323
|
Ae(this, "destroyed", !1);
|
|
45324
|
-
this.blockLen = t, this.outputLen = n, this.padOffset = o, this.isLE = r, this.buffer = new Uint8Array(t), this.view =
|
|
45324
|
+
this.blockLen = t, this.outputLen = n, this.padOffset = o, this.isLE = r, this.buffer = new Uint8Array(t), this.view = mu(this.buffer);
|
|
45325
45325
|
}
|
|
45326
45326
|
update(t) {
|
|
45327
45327
|
Ra(this), Ti(t);
|
|
@@ -45329,7 +45329,7 @@ class Kx {
|
|
|
45329
45329
|
for (let a = 0; a < s; ) {
|
|
45330
45330
|
const i = Math.min(r - this.pos, s - a);
|
|
45331
45331
|
if (i === r) {
|
|
45332
|
-
const l =
|
|
45332
|
+
const l = mu(t);
|
|
45333
45333
|
for (; r <= s - a; a += r)
|
|
45334
45334
|
this.process(l, a);
|
|
45335
45335
|
continue;
|
|
@@ -45346,7 +45346,7 @@ class Kx {
|
|
|
45346
45346
|
for (let d = a; d < r; d++)
|
|
45347
45347
|
n[d] = 0;
|
|
45348
45348
|
o.setBigUint64(r - 8, BigInt(this.length * 8), s), this.process(o, 0);
|
|
45349
|
-
const i =
|
|
45349
|
+
const i = mu(t), l = this.outputLen;
|
|
45350
45350
|
if (l % 4)
|
|
45351
45351
|
throw new Error("_sha2: outputLen must be aligned to 32bit");
|
|
45352
45352
|
const f = l / 4, c = this.get();
|
|
@@ -45962,7 +45962,7 @@ function rS(e, t, n) {
|
|
|
45962
45962
|
return null;
|
|
45963
45963
|
}
|
|
45964
45964
|
}
|
|
45965
|
-
function
|
|
45965
|
+
function gu(e, t) {
|
|
45966
45966
|
switch (e) {
|
|
45967
45967
|
case "idle":
|
|
45968
45968
|
return { status: "idle" };
|
|
@@ -46044,7 +46044,7 @@ class sS {
|
|
|
46044
46044
|
return this._status;
|
|
46045
46045
|
}
|
|
46046
46046
|
get collabState() {
|
|
46047
|
-
return
|
|
46047
|
+
return gu(this._status, this._context);
|
|
46048
46048
|
}
|
|
46049
46049
|
// ─── State machine core ───
|
|
46050
46050
|
send(t) {
|
|
@@ -46056,7 +46056,7 @@ class sS {
|
|
|
46056
46056
|
), !1;
|
|
46057
46057
|
const o = this._status;
|
|
46058
46058
|
this.runExitActions(o, n.status), this._status = n.status, this._context = { ...this._context, ...n.context }, this.runEntryActions(n.status, o);
|
|
46059
|
-
const r =
|
|
46059
|
+
const r = gu(this._status, this._context);
|
|
46060
46060
|
return (a = (s = this.callbacksRef) == null ? void 0 : s.onStateChange) == null || a.call(s, r), this.onCollabStateChange(r), !0;
|
|
46061
46061
|
}
|
|
46062
46062
|
runExitActions(t, n) {
|
|
@@ -46166,7 +46166,7 @@ class sS {
|
|
|
46166
46166
|
forceCleanup() {
|
|
46167
46167
|
var n;
|
|
46168
46168
|
this.flushUpdates(), this._awareness && $o(this._awareness, [this.ydoc.clientID], "cleanup"), this.cleanupAwareness(), (n = this.socketClient) == null || n.disconnect(), this.resetInternalState(), this._status = "idle", this._context = { ...or };
|
|
46169
|
-
const t =
|
|
46169
|
+
const t = gu(this._status, this._context);
|
|
46170
46170
|
this.onCollabStateChange(t);
|
|
46171
46171
|
}
|
|
46172
46172
|
// ─── Internal methods ───
|
|
@@ -46721,7 +46721,7 @@ const iS = { status: "idle" }, lS = (e) => {
|
|
|
46721
46721
|
const W = o.session;
|
|
46722
46722
|
v.setLocalStateField("user", {
|
|
46723
46723
|
name: W.username,
|
|
46724
|
-
color:
|
|
46724
|
+
color: Iu(W.isEns, W.color),
|
|
46725
46725
|
isEns: W.isEns ?? !1
|
|
46726
46726
|
});
|
|
46727
46727
|
}, [v, d]);
|
|
@@ -46739,7 +46739,7 @@ const iS = { status: "idle" }, lS = (e) => {
|
|
|
46739
46739
|
const S = v.getLocalState();
|
|
46740
46740
|
v.setLocalStateField("user", {
|
|
46741
46741
|
...(S == null ? void 0 : S.user) ?? {},
|
|
46742
|
-
color:
|
|
46742
|
+
color: Iu(W.isEns),
|
|
46743
46743
|
isEns: !0
|
|
46744
46744
|
});
|
|
46745
46745
|
}, [v, d, q]), {
|
|
@@ -46830,8 +46830,8 @@ function qS(e) {
|
|
|
46830
46830
|
var t = zS(e);
|
|
46831
46831
|
return t == WS || t == YS || t == $S || t == KS;
|
|
46832
46832
|
}
|
|
46833
|
-
var wg = qS, ZS = To, GS = ZS["__core-js_shared__"], XS = GS,
|
|
46834
|
-
var e = /[^.]+$/.exec(
|
|
46833
|
+
var wg = qS, ZS = To, GS = ZS["__core-js_shared__"], XS = GS, yu = XS, v0 = function() {
|
|
46834
|
+
var e = /[^.]+$/.exec(yu && yu.keys && yu.keys.IE_PROTO || "");
|
|
46835
46835
|
return e ? "Symbol(src)_1." + e : "";
|
|
46836
46836
|
}();
|
|
46837
46837
|
function QS(e) {
|
|
@@ -46869,7 +46869,7 @@ function bE(e, t) {
|
|
|
46869
46869
|
var n = vE(e, t);
|
|
46870
46870
|
return wE(n) ? n : void 0;
|
|
46871
46871
|
}
|
|
46872
|
-
var Os = bE, CE = Os, kE = To, _E = CE(kE, "Map"),
|
|
46872
|
+
var Os = bE, CE = Os, kE = To, _E = CE(kE, "Map"), qd = _E, xE = Os, SE = xE(Object, "create"), Ec = SE, b0 = Ec;
|
|
46873
46873
|
function EE() {
|
|
46874
46874
|
this.__data__ = b0 ? b0(null) : {}, this.size = 0;
|
|
46875
46875
|
}
|
|
@@ -46910,7 +46910,7 @@ Hs.prototype.delete = YE;
|
|
|
46910
46910
|
Hs.prototype.get = KE;
|
|
46911
46911
|
Hs.prototype.has = qE;
|
|
46912
46912
|
Hs.prototype.set = ZE;
|
|
46913
|
-
var GE = Hs, C0 = GE, XE = Sc, QE =
|
|
46913
|
+
var GE = Hs, C0 = GE, XE = Sc, QE = qd;
|
|
46914
46914
|
function JE() {
|
|
46915
46915
|
this.size = 0, this.__data__ = {
|
|
46916
46916
|
hash: new C0(),
|
|
@@ -46959,7 +46959,7 @@ Fs.prototype.delete = wR;
|
|
|
46959
46959
|
Fs.prototype.get = vR;
|
|
46960
46960
|
Fs.prototype.has = bR;
|
|
46961
46961
|
Fs.prototype.set = CR;
|
|
46962
|
-
var bg = Fs, kR = Sc, _R =
|
|
46962
|
+
var bg = Fs, kR = Sc, _R = qd, xR = bg, SR = 200;
|
|
46963
46963
|
function ER(e, t) {
|
|
46964
46964
|
var n = this.__data__;
|
|
46965
46965
|
if (n instanceof kR) {
|
|
@@ -47055,7 +47055,7 @@ function sI(e) {
|
|
|
47055
47055
|
n[++t] = o;
|
|
47056
47056
|
}), n;
|
|
47057
47057
|
}
|
|
47058
|
-
var iI = sI, k0 =
|
|
47058
|
+
var iI = sI, k0 = Sd, _0 = nI, lI = yg, aI = Cg, cI = rI, uI = iI, fI = 1, dI = 2, hI = "[object Boolean]", mI = "[object Date]", pI = "[object Error]", gI = "[object Map]", yI = "[object Number]", wI = "[object RegExp]", vI = "[object Set]", bI = "[object String]", CI = "[object Symbol]", kI = "[object ArrayBuffer]", _I = "[object DataView]", x0 = k0 ? k0.prototype : void 0, wu = x0 ? x0.valueOf : void 0;
|
|
47059
47059
|
function xI(e, t, n, o, r, s, a) {
|
|
47060
47060
|
switch (n) {
|
|
47061
47061
|
case _I:
|
|
@@ -47086,8 +47086,8 @@ function xI(e, t, n, o, r, s, a) {
|
|
|
47086
47086
|
var c = aI(i(e), i(t), o, r, s, a);
|
|
47087
47087
|
return a.delete(e), c;
|
|
47088
47088
|
case CI:
|
|
47089
|
-
if (
|
|
47090
|
-
return
|
|
47089
|
+
if (wu)
|
|
47090
|
+
return wu.call(e) == wu.call(t);
|
|
47091
47091
|
}
|
|
47092
47092
|
return !1;
|
|
47093
47093
|
}
|
|
@@ -47097,7 +47097,7 @@ function EI(e, t) {
|
|
|
47097
47097
|
e[r + n] = t[n];
|
|
47098
47098
|
return e;
|
|
47099
47099
|
}
|
|
47100
|
-
var RI = EI, II = Array.isArray,
|
|
47100
|
+
var RI = EI, II = Array.isArray, Zd = II, jI = RI, DI = Zd;
|
|
47101
47101
|
function AI(e, t, n) {
|
|
47102
47102
|
var o = t(e);
|
|
47103
47103
|
return DI(e) ? o : jI(o, n(e));
|
|
@@ -47175,7 +47175,7 @@ Da.exports;
|
|
|
47175
47175
|
}();
|
|
47176
47176
|
e.exports = i;
|
|
47177
47177
|
})(Da, Da.exports);
|
|
47178
|
-
var Bj = Da.exports, Uj = Hj, zj = Pj, R0 = Bj, I0 = R0 && R0.isTypedArray, Vj = I0 ? zj(I0) : Uj, Sg = Vj, $j = $I, Wj = ej, Yj =
|
|
47178
|
+
var Bj = Da.exports, Uj = Hj, zj = Pj, R0 = Bj, I0 = R0 && R0.isTypedArray, Vj = I0 ? zj(I0) : Uj, Sg = Vj, $j = $I, Wj = ej, Yj = Zd, Kj = _g, qj = ij, Zj = Sg, Gj = Object.prototype, Xj = Gj.hasOwnProperty;
|
|
47179
47179
|
function Qj(e, t) {
|
|
47180
47180
|
var n = Yj(e), o = !n && Wj(e), r = !n && !o && Kj(e), s = !n && !o && !r && Zj(e), a = n || o || r || s, i = a ? $j(e.length, String) : [], l = i.length;
|
|
47181
47181
|
for (var f in e)
|
|
@@ -47250,8 +47250,8 @@ function AD(e, t, n, o, r, s) {
|
|
|
47250
47250
|
}
|
|
47251
47251
|
return s.delete(e), s.delete(t), g;
|
|
47252
47252
|
}
|
|
47253
|
-
var ND = AD, TD = Os, LD = To, MD = TD(LD, "DataView"), OD = MD, HD = Os, FD = To, PD = HD(FD, "Promise"), BD = PD, UD = Os, zD = To, VD = UD(zD, "Set"), $D = VD, WD = Os, YD = To, KD = WD(YD, "WeakMap"), qD = KD,
|
|
47254
|
-
(
|
|
47253
|
+
var ND = AD, TD = Os, LD = To, MD = TD(LD, "DataView"), OD = MD, HD = Os, FD = To, PD = HD(FD, "Promise"), BD = PD, UD = Os, zD = To, VD = UD(zD, "Set"), $D = VD, WD = Os, YD = To, KD = WD(YD, "WeakMap"), qD = KD, bf = OD, Cf = qd, kf = BD, _f = $D, xf = qD, Eg = Gi, Bs = vg, D0 = "[object Map]", ZD = "[object Object]", A0 = "[object Promise]", N0 = "[object Set]", T0 = "[object WeakMap]", L0 = "[object DataView]", GD = Bs(bf), XD = Bs(Cf), QD = Bs(kf), JD = Bs(_f), eA = Bs(xf), Tr = Eg;
|
|
47254
|
+
(bf && Tr(new bf(new ArrayBuffer(1))) != L0 || Cf && Tr(new Cf()) != D0 || kf && Tr(kf.resolve()) != A0 || _f && Tr(new _f()) != N0 || xf && Tr(new xf()) != T0) && (Tr = function(e) {
|
|
47255
47255
|
var t = Eg(e), n = t == ZD ? e.constructor : void 0, o = n ? Bs(n) : "";
|
|
47256
47256
|
if (o)
|
|
47257
47257
|
switch (o) {
|
|
@@ -47268,7 +47268,7 @@ var ND = AD, TD = Os, LD = To, MD = TD(LD, "DataView"), OD = MD, HD = Os, FD = T
|
|
|
47268
47268
|
}
|
|
47269
47269
|
return t;
|
|
47270
47270
|
});
|
|
47271
|
-
var tA = Tr,
|
|
47271
|
+
var tA = Tr, vu = LR, nA = Cg, oA = SI, rA = ND, M0 = tA, O0 = Zd, H0 = _g, sA = Sg, iA = 1, F0 = "[object Arguments]", P0 = "[object Array]", Nl = "[object Object]", lA = Object.prototype, B0 = lA.hasOwnProperty;
|
|
47272
47272
|
function aA(e, t, n, o, r, s) {
|
|
47273
47273
|
var a = O0(e), i = O0(t), l = a ? P0 : M0(e), f = i ? P0 : M0(t);
|
|
47274
47274
|
l = l == F0 ? Nl : l, f = f == F0 ? Nl : f;
|
|
@@ -47279,15 +47279,15 @@ function aA(e, t, n, o, r, s) {
|
|
|
47279
47279
|
a = !0, c = !1;
|
|
47280
47280
|
}
|
|
47281
47281
|
if (h && !c)
|
|
47282
|
-
return s || (s = new
|
|
47282
|
+
return s || (s = new vu()), a || sA(e) ? nA(e, t, n, o, r, s) : oA(e, t, l, n, o, r, s);
|
|
47283
47283
|
if (!(n & iA)) {
|
|
47284
47284
|
var p = c && B0.call(e, "__wrapped__"), m = d && B0.call(t, "__wrapped__");
|
|
47285
47285
|
if (p || m) {
|
|
47286
47286
|
var g = p ? e.value() : e, w = m ? t.value() : t;
|
|
47287
|
-
return s || (s = new
|
|
47287
|
+
return s || (s = new vu()), r(g, w, n, o, s);
|
|
47288
47288
|
}
|
|
47289
47289
|
}
|
|
47290
|
-
return h ? (s || (s = new
|
|
47290
|
+
return h ? (s || (s = new vu()), rA(e, t, n, o, r, s)) : !1;
|
|
47291
47291
|
}
|
|
47292
47292
|
var cA = aA, uA = cA, U0 = Xi;
|
|
47293
47293
|
function Rg(e, t, n, o, r) {
|
|
@@ -47298,7 +47298,7 @@ function hA(e, t) {
|
|
|
47298
47298
|
return dA(e, t);
|
|
47299
47299
|
}
|
|
47300
47300
|
var mA = hA;
|
|
47301
|
-
const
|
|
47301
|
+
const Ic = /* @__PURE__ */ Oi(mA), pA = ["coingecko"];
|
|
47302
47302
|
function gA(e) {
|
|
47303
47303
|
const t = e.match(/"([^"]*)"/g);
|
|
47304
47304
|
return t && t.length > 0 ? t[0].replace(/"/g, "") : null;
|
|
@@ -47314,7 +47314,7 @@ function Mi(e) {
|
|
|
47314
47314
|
return wA(e);
|
|
47315
47315
|
}
|
|
47316
47316
|
}
|
|
47317
|
-
function
|
|
47317
|
+
function Sf(e) {
|
|
47318
47318
|
try {
|
|
47319
47319
|
return Array.isArray(e);
|
|
47320
47320
|
} catch {
|
|
@@ -47325,7 +47325,7 @@ function wA(e) {
|
|
|
47325
47325
|
const t = /* @__PURE__ */ new WeakMap(), n = (o) => {
|
|
47326
47326
|
if (o === null || typeof o != "object") return o;
|
|
47327
47327
|
if (t.has(o)) return t.get(o);
|
|
47328
|
-
if (
|
|
47328
|
+
if (Sf(o)) {
|
|
47329
47329
|
const a = [];
|
|
47330
47330
|
t.set(o, a);
|
|
47331
47331
|
let i = 0;
|
|
@@ -47389,7 +47389,7 @@ function ko(e, t, n) {
|
|
|
47389
47389
|
e.set(t, Mi(o));
|
|
47390
47390
|
}
|
|
47391
47391
|
}
|
|
47392
|
-
const
|
|
47392
|
+
const jc = (e, t, n, o) => {
|
|
47393
47393
|
if (!e || !n.length) return;
|
|
47394
47394
|
const r = e.getArray(t);
|
|
47395
47395
|
e.transact(() => {
|
|
@@ -47449,7 +47449,7 @@ const Ic = (e, t, n, o) => {
|
|
|
47449
47449
|
m.delete(E);
|
|
47450
47450
|
}), d === "delete") return;
|
|
47451
47451
|
const g = Ig(c) || {};
|
|
47452
|
-
g && typeof g == "object" && !
|
|
47452
|
+
g && typeof g == "object" && !Sf(g) && Object.entries(g).forEach(([w, E]) => {
|
|
47453
47453
|
ko(m, w, E);
|
|
47454
47454
|
});
|
|
47455
47455
|
return;
|
|
@@ -47457,7 +47457,7 @@ const Ic = (e, t, n, o) => {
|
|
|
47457
47457
|
if (l.length === 1 && l[0] === "luckysheet_conditionformat_save") {
|
|
47458
47458
|
let m = h.get("luckysheet_conditionformat_save");
|
|
47459
47459
|
if (m instanceof He.Array || (m = new He.Array(), h.set("luckysheet_conditionformat_save", m)), m.delete(0, m.length), d === "delete") return;
|
|
47460
|
-
const g = jg(c), w =
|
|
47460
|
+
const g = jg(c), w = Sf(g) ? g : [g];
|
|
47461
47461
|
try {
|
|
47462
47462
|
m.insert(0, w);
|
|
47463
47463
|
} catch {
|
|
@@ -47810,7 +47810,7 @@ const EA = (e) => {
|
|
|
47810
47810
|
if (!_A(e))
|
|
47811
47811
|
return;
|
|
47812
47812
|
const n = (c = (f = e.sheetEditorRef.current) == null ? void 0 : f.getWorkbookContext()) == null ? void 0 : c.currentSheetId;
|
|
47813
|
-
|
|
47813
|
+
jc(
|
|
47814
47814
|
// @ts-ignore
|
|
47815
47815
|
e.ydocRef.current,
|
|
47816
47816
|
// @ts-ignore
|
|
@@ -47899,7 +47899,7 @@ const EA = (e) => {
|
|
|
47899
47899
|
formulaResponseUiSync: Vi
|
|
47900
47900
|
});
|
|
47901
47901
|
}
|
|
47902
|
-
},
|
|
47902
|
+
}, bu = "LIVE_QUERY_ERROR", OA = (e, t, n = !1, o = 2e4) => {
|
|
47903
47903
|
const r = je({}), s = (h, p) => {
|
|
47904
47904
|
if (r.current[h] || (r.current[h] = /* @__PURE__ */ new Map()), r.current[h].set(p.data.id, p), !e.current)
|
|
47905
47905
|
throw new Error("Cannot update live query list. Ref is undefined");
|
|
@@ -47938,7 +47938,7 @@ const EA = (e) => {
|
|
|
47938
47938
|
sheetEditorRef: e
|
|
47939
47939
|
});
|
|
47940
47940
|
if (Ng(S)) {
|
|
47941
|
-
S.type =
|
|
47941
|
+
S.type = bu, t == null || t({ data: S });
|
|
47942
47942
|
return;
|
|
47943
47943
|
}
|
|
47944
47944
|
const D = S, I = D[0];
|
|
@@ -47982,7 +47982,7 @@ const EA = (e) => {
|
|
|
47982
47982
|
data: {
|
|
47983
47983
|
message: (k == null ? void 0 : k.message) || "Live query failed",
|
|
47984
47984
|
functionName: "COINGECKO",
|
|
47985
|
-
type:
|
|
47985
|
+
type: bu
|
|
47986
47986
|
}
|
|
47987
47987
|
};
|
|
47988
47988
|
t == null || t(C);
|
|
@@ -48008,7 +48008,7 @@ const EA = (e) => {
|
|
|
48008
48008
|
data: {
|
|
48009
48009
|
message: (p == null ? void 0 : p.message) || "Live query failed",
|
|
48010
48010
|
functionName: "COINGECKO",
|
|
48011
|
-
type:
|
|
48011
|
+
type: bu
|
|
48012
48012
|
}
|
|
48013
48013
|
});
|
|
48014
48014
|
} finally {
|
|
@@ -48023,7 +48023,7 @@ const EA = (e) => {
|
|
|
48023
48023
|
return () => clearInterval(h);
|
|
48024
48024
|
}, [n, o]), { handleLiveQuery: a, initialiseLiveQueryData: i };
|
|
48025
48025
|
};
|
|
48026
|
-
function
|
|
48026
|
+
function Ef(e) {
|
|
48027
48027
|
const t = {};
|
|
48028
48028
|
return e.forEach((n) => {
|
|
48029
48029
|
if (typeof (n == null ? void 0 : n.r) == "number" && typeof (n == null ? void 0 : n.c) == "number") {
|
|
@@ -48035,7 +48035,7 @@ function Sf(e) {
|
|
|
48035
48035
|
const V0 = (e) => {
|
|
48036
48036
|
typeof window > "u" || (window.__DSHEET_MIGRATION__ = { isMigrated: e });
|
|
48037
48037
|
};
|
|
48038
|
-
function
|
|
48038
|
+
function Cu(e, t) {
|
|
48039
48039
|
let n = !1;
|
|
48040
48040
|
return t.forEach((o) => {
|
|
48041
48041
|
o instanceof He.Map || (n = !0);
|
|
@@ -48051,14 +48051,14 @@ function bu(e, t) {
|
|
|
48051
48051
|
return;
|
|
48052
48052
|
}
|
|
48053
48053
|
if (a === "celldata" && Array.isArray(i)) {
|
|
48054
|
-
const l = new He.Map(), f =
|
|
48054
|
+
const l = new He.Map(), f = Ef(i);
|
|
48055
48055
|
Object.entries(f).forEach(([c, d]) => {
|
|
48056
48056
|
l.set(c, d);
|
|
48057
48057
|
}), s.set("celldata", l);
|
|
48058
48058
|
return;
|
|
48059
48059
|
}
|
|
48060
48060
|
if (a === "calcChain" && Array.isArray(i)) {
|
|
48061
|
-
const l = new He.Map(), f =
|
|
48061
|
+
const l = new He.Map(), f = Ef(i);
|
|
48062
48062
|
Object.entries(f).forEach(([c, d]) => {
|
|
48063
48063
|
l.set(c, d);
|
|
48064
48064
|
}), s.set("calcChain", l);
|
|
@@ -48131,7 +48131,7 @@ function Tg(e) {
|
|
|
48131
48131
|
const t = new He.Map();
|
|
48132
48132
|
return Object.entries(e).forEach(([n, o]) => {
|
|
48133
48133
|
if (n === "celldata" && Array.isArray(o)) {
|
|
48134
|
-
const r = new He.Map(), s =
|
|
48134
|
+
const r = new He.Map(), s = Ef(o);
|
|
48135
48135
|
Object.entries(s).forEach(([a, i]) => {
|
|
48136
48136
|
r.set(a, i);
|
|
48137
48137
|
}), t.set("celldata", r);
|
|
@@ -48180,7 +48180,7 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48180
48180
|
const X = new He.Doc();
|
|
48181
48181
|
He.applyUpdate(X, L);
|
|
48182
48182
|
const oe = [...X.share.keys()][0], T = e.current.getArray(oe);
|
|
48183
|
-
|
|
48183
|
+
Cu(e.current, T);
|
|
48184
48184
|
const j = xo(
|
|
48185
48185
|
// @ts-ignore
|
|
48186
48186
|
T
|
|
@@ -48216,12 +48216,12 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48216
48216
|
);
|
|
48217
48217
|
(G = oe.data) == null || G.forEach((ee, K) => {
|
|
48218
48218
|
ee == null || ee.forEach((ae, pe) => {
|
|
48219
|
-
ae && (U(K, pe) ? ae.ps = m ?
|
|
48219
|
+
ae && (U(K, pe) ? ae.ps = m ? Mc : void 0 : ae.ps = void 0);
|
|
48220
48220
|
});
|
|
48221
48221
|
}), !oe.data && oe.celldata && oe.celldata.forEach((ee) => {
|
|
48222
48222
|
if (!(ee != null && ee.v)) return;
|
|
48223
48223
|
const K = U(ee.r, ee.c);
|
|
48224
|
-
ee.v.ps = K && m ?
|
|
48224
|
+
ee.v.ps = K && m ? Mc : void 0;
|
|
48225
48225
|
});
|
|
48226
48226
|
});
|
|
48227
48227
|
})), n.current === null && i === "synced") {
|
|
@@ -48237,7 +48237,7 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48237
48237
|
...N,
|
|
48238
48238
|
v: {
|
|
48239
48239
|
...N.v,
|
|
48240
|
-
ps: G && m ?
|
|
48240
|
+
ps: G && m ? Mc : void 0
|
|
48241
48241
|
}
|
|
48242
48242
|
} : N;
|
|
48243
48243
|
});
|
|
@@ -48263,7 +48263,7 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48263
48263
|
if (!(!g || !e.current || !t) && !x.current)
|
|
48264
48264
|
try {
|
|
48265
48265
|
const L = e.current.getArray(t);
|
|
48266
|
-
|
|
48266
|
+
Cu(e.current, L);
|
|
48267
48267
|
const A = xo(L);
|
|
48268
48268
|
k.current = A, D(A);
|
|
48269
48269
|
const B = {};
|
|
@@ -48385,7 +48385,7 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48385
48385
|
if (re.length > 0 && re.every((ce) => Q.has(ce))) {
|
|
48386
48386
|
const ce = le.get("id"), Ce = (ye = (fe = (ne = (ge = n.current) == null ? void 0 : ge.getWorkbookContext) == null ? void 0 : ne.call(ge)) == null ? void 0 : fe.luckysheetfile) == null ? void 0 : ye.find((_e) => _e.id === ce);
|
|
48387
48387
|
if (Ce && re.every(
|
|
48388
|
-
(ke) =>
|
|
48388
|
+
(ke) => Ic(le.get(ke), Ce[ke])
|
|
48389
48389
|
))
|
|
48390
48390
|
continue;
|
|
48391
48391
|
G = !0;
|
|
@@ -48556,7 +48556,7 @@ const HA = (e, t, n, o, r, s = !1, a, i, l, f, c, d = !1, h, p, m, g, w = !1) =>
|
|
|
48556
48556
|
if (!e.current || !t) return !1;
|
|
48557
48557
|
try {
|
|
48558
48558
|
const A = e.current.getArray(t);
|
|
48559
|
-
|
|
48559
|
+
Cu(e.current, A);
|
|
48560
48560
|
const B = xo(A);
|
|
48561
48561
|
return I(800), k.current = B, O(B), D(B), x.current = !0, y(!0), o && o((M) => M + 1), !0;
|
|
48562
48562
|
} catch (A) {
|
|
@@ -49743,7 +49743,7 @@ const Lg = Bg(void 0), BA = ({
|
|
|
49743
49743
|
sheetId: v.cell.sheetId,
|
|
49744
49744
|
username: v.user.name ?? "Anonymous",
|
|
49745
49745
|
userId: String(y),
|
|
49746
|
-
color:
|
|
49746
|
+
color: Iu(k, v.user.color, y),
|
|
49747
49747
|
isEns: k,
|
|
49748
49748
|
selection: { r: v.cell.r, c: v.cell.c }
|
|
49749
49749
|
});
|
|
@@ -49811,14 +49811,12 @@ function Og(e, t, n) {
|
|
|
49811
49811
|
function qA(e, t) {
|
|
49812
49812
|
const n = {}, o = {}, r = [], s = new Set(Object.keys(e)), a = new Set(Object.keys(t));
|
|
49813
49813
|
for (const i of a) {
|
|
49814
|
-
const l = t[i]
|
|
49815
|
-
if (!
|
|
49814
|
+
const l = t[i];
|
|
49815
|
+
if (!s.has(i)) {
|
|
49816
49816
|
n[i] = l;
|
|
49817
49817
|
continue;
|
|
49818
49818
|
}
|
|
49819
|
-
|
|
49820
|
-
l[c] !== f[c] && (n[i] = l);
|
|
49821
|
-
});
|
|
49819
|
+
Ic(l, e[i]) || (n[i] = l);
|
|
49822
49820
|
}
|
|
49823
49821
|
for (const i of s)
|
|
49824
49822
|
a.has(i) || (o[i] = e[i]);
|
|
@@ -49867,11 +49865,7 @@ const Er = ({
|
|
|
49867
49865
|
changes: n,
|
|
49868
49866
|
handleContentPortal: o
|
|
49869
49867
|
}) => {
|
|
49870
|
-
n.length && (
|
|
49871
|
-
paths: n.map(
|
|
49872
|
-
(r) => `${r.path.join(".")}${r.key ? `[${r.key}]` : ""}:${r.type}`
|
|
49873
|
-
)
|
|
49874
|
-
}), Ic(e, t, n, o));
|
|
49868
|
+
n.length && jc(e, t, n, o);
|
|
49875
49869
|
}, ZA = ({
|
|
49876
49870
|
sheetEditorRef: e,
|
|
49877
49871
|
ydocRef: t,
|
|
@@ -50041,11 +50035,7 @@ const Er = ({
|
|
|
50041
50035
|
oldData: a || {},
|
|
50042
50036
|
newData: s || {}
|
|
50043
50037
|
});
|
|
50044
|
-
|
|
50045
|
-
old: JSON.stringify(a),
|
|
50046
|
-
new: JSON.stringify(s),
|
|
50047
|
-
changes: i.length
|
|
50048
|
-
}), Rr({
|
|
50038
|
+
Rr({
|
|
50049
50039
|
ydoc: r.ydoc,
|
|
50050
50040
|
dsheetId: n,
|
|
50051
50041
|
changes: i,
|
|
@@ -50065,11 +50055,7 @@ const Er = ({
|
|
|
50065
50055
|
});
|
|
50066
50056
|
if (!r) return;
|
|
50067
50057
|
const s = ((f = (l = e.current) == null ? void 0 : l.getSheet()) == null ? void 0 : f.filter) || {}, a = r.oldSheet.filter || {};
|
|
50068
|
-
if (
|
|
50069
|
-
console.log("[echo-debug] filter WRITE", {
|
|
50070
|
-
old: JSON.stringify(a),
|
|
50071
|
-
new: JSON.stringify(s)
|
|
50072
|
-
});
|
|
50058
|
+
if (Ic(a || {}, s || {})) return;
|
|
50073
50059
|
const i = [
|
|
50074
50060
|
{
|
|
50075
50061
|
sheetId: r.currentSheetId,
|
|
@@ -50351,7 +50337,7 @@ const Er = ({
|
|
|
50351
50337
|
}, w.readAsText(h);
|
|
50352
50338
|
});
|
|
50353
50339
|
}, q0 = async (e, t, n, o) => {
|
|
50354
|
-
const { handleExportToXLSX: r } = await import("./xlsx-export-impl-
|
|
50340
|
+
const { handleExportToXLSX: r } = await import("./xlsx-export-impl-eggxo-I_.js");
|
|
50355
50341
|
return r(e, t, n, o);
|
|
50356
50342
|
}, rN = (e) => {
|
|
50357
50343
|
var n;
|
|
@@ -50426,7 +50412,7 @@ const Er = ({
|
|
|
50426
50412
|
const [a, i] = Ie(!1);
|
|
50427
50413
|
return { handleXLSXUpload: Ee(
|
|
50428
50414
|
async (f, c, d) => {
|
|
50429
|
-
const { runXlsxFileUpload: h } = await import("./use-xlsx-import-impl-
|
|
50415
|
+
const { runXlsxFileUpload: h } = await import("./use-xlsx-import-impl-Chz-Tz4o.js");
|
|
50430
50416
|
return h(
|
|
50431
50417
|
{
|
|
50432
50418
|
sheetEditorRef: e,
|
|
@@ -50559,7 +50545,7 @@ const Er = ({
|
|
|
50559
50545
|
}), t) : (typeof n == "object" && Object.entries(n).forEach(([o, r]) => {
|
|
50560
50546
|
t.set(o, r);
|
|
50561
50547
|
}), t) : t;
|
|
50562
|
-
},
|
|
50548
|
+
}, Dc = (e, t) => {
|
|
50563
50549
|
var n, o;
|
|
50564
50550
|
try {
|
|
50565
50551
|
return (o = (n = e == null ? void 0 : e.current) == null ? void 0 : n.getSheet) == null ? void 0 : o.call(n);
|
|
@@ -50574,7 +50560,7 @@ const Er = ({
|
|
|
50574
50560
|
dsheetId: n
|
|
50575
50561
|
}) => {
|
|
50576
50562
|
var s;
|
|
50577
|
-
const o =
|
|
50563
|
+
const o = Dc(
|
|
50578
50564
|
e,
|
|
50579
50565
|
"getCurrentYdocSheet"
|
|
50580
50566
|
), r = (s = t == null ? void 0 : t.current) == null ? void 0 : s.getArray(n);
|
|
@@ -50583,17 +50569,13 @@ const Er = ({
|
|
|
50583
50569
|
o == null ? void 0 : o.id
|
|
50584
50570
|
);
|
|
50585
50571
|
}, is = (e, t) => {
|
|
50586
|
-
const { sheetEditorRef: n, handleOnChangePortalUpdate: o } = e, r =
|
|
50572
|
+
const { sheetEditorRef: n, handleOnChangePortalUpdate: o } = e, r = Dc(
|
|
50587
50573
|
n,
|
|
50588
50574
|
"syncCurrentSheetField"
|
|
50589
50575
|
), s = uN(e);
|
|
50590
50576
|
if (!r || !s) return;
|
|
50591
50577
|
const a = It(s, t), i = r[t];
|
|
50592
|
-
(typeof i == "object" && i !== null || typeof a == "object" && a !== null ? !
|
|
50593
|
-
field: t,
|
|
50594
|
-
old: JSON.stringify(a),
|
|
50595
|
-
new: JSON.stringify(i)
|
|
50596
|
-
}), Es(s, t, i), o());
|
|
50578
|
+
(typeof i == "object" && i !== null || typeof a == "object" && a !== null ? !Ic(a, i) : a !== i) && (Es(s, t, i), o());
|
|
50597
50579
|
}, fN = ({
|
|
50598
50580
|
sheetEditorRef: e,
|
|
50599
50581
|
ydocRef: t,
|
|
@@ -50733,7 +50715,7 @@ const Er = ({
|
|
|
50733
50715
|
handleOnChangePortalUpdate: o
|
|
50734
50716
|
}) => () => {
|
|
50735
50717
|
var c;
|
|
50736
|
-
const r =
|
|
50718
|
+
const r = Dc(
|
|
50737
50719
|
e,
|
|
50738
50720
|
"createAfterColRowChangesHandler"
|
|
50739
50721
|
), s = (c = t == null ? void 0 : t.current) == null ? void 0 : c.getArray(n), a = s == null ? void 0 : s.toArray(), i = tl(
|
|
@@ -50770,7 +50752,7 @@ const Er = ({
|
|
|
50770
50752
|
handleOnChangePortalUpdate: o
|
|
50771
50753
|
}, r) => {
|
|
50772
50754
|
var d, h, p, m, g, w, E;
|
|
50773
|
-
const s = (h = (d = e.current) == null ? void 0 : d.getWorkbookContext) == null ? void 0 : h.call(d), a =
|
|
50755
|
+
const s = (h = (d = e.current) == null ? void 0 : d.getWorkbookContext) == null ? void 0 : h.call(d), a = Dc(e, "updateAllCell");
|
|
50774
50756
|
if (!(((m = (p = s == null ? void 0 : s.currentSheetId) == null ? void 0 : p.toString) == null ? void 0 : m.call(p)) || ((w = (g = a == null ? void 0 : a.id) == null ? void 0 : g.toString) == null ? void 0 : w.call(g)))) return;
|
|
50775
50757
|
const l = a;
|
|
50776
50758
|
if (!l) return;
|
|
@@ -50793,7 +50775,7 @@ const Er = ({
|
|
|
50793
50775
|
type: "update"
|
|
50794
50776
|
});
|
|
50795
50777
|
}
|
|
50796
|
-
|
|
50778
|
+
jc(
|
|
50797
50779
|
// @ts-ignore Y.Doc present at runtime
|
|
50798
50780
|
t.current,
|
|
50799
50781
|
n,
|
|
@@ -51047,7 +51029,7 @@ const yN = ({
|
|
|
51047
51029
|
});
|
|
51048
51030
|
},
|
|
51049
51031
|
updateCellYdoc: (ge) => {
|
|
51050
|
-
|
|
51032
|
+
jc(
|
|
51051
51033
|
x.current,
|
|
51052
51034
|
g,
|
|
51053
51035
|
ge,
|
|
@@ -51603,24 +51585,24 @@ export {
|
|
|
51603
51585
|
E4 as b,
|
|
51604
51586
|
aC as c,
|
|
51605
51587
|
sc as d,
|
|
51606
|
-
|
|
51588
|
+
rd as e,
|
|
51607
51589
|
fa as f,
|
|
51608
51590
|
Z0 as g,
|
|
51609
51591
|
K0 as h,
|
|
51610
51592
|
ON as i,
|
|
51611
51593
|
G0 as j,
|
|
51612
51594
|
q0 as k,
|
|
51613
|
-
|
|
51595
|
+
Tu as l,
|
|
51614
51596
|
Tg as m,
|
|
51615
51597
|
bp as n,
|
|
51616
51598
|
Ja as o,
|
|
51617
51599
|
Lr as p,
|
|
51618
|
-
|
|
51600
|
+
vd as q,
|
|
51619
51601
|
xp as r,
|
|
51620
51602
|
Sp as s,
|
|
51621
51603
|
Cp as t,
|
|
51622
51604
|
la as u,
|
|
51623
|
-
|
|
51605
|
+
ed as v,
|
|
51624
51606
|
Rp as w,
|
|
51625
51607
|
bn as x,
|
|
51626
51608
|
xo as y,
|