@qwanyx/stack 0.2.107 → 0.2.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +12 -12
- package/dist/index.esm.js +140 -164
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5267,7 +5267,7 @@ function Qd() {
|
|
|
5267
5267
|
return X(A, Re, bt, Pe, ye, Te.current, Fe);
|
|
5268
5268
|
}
|
|
5269
5269
|
}
|
|
5270
|
-
var
|
|
5270
|
+
var ee = b.ReactCurrentOwner, ue = b.ReactDebugCurrentFrame;
|
|
5271
5271
|
function $(A) {
|
|
5272
5272
|
if (A) {
|
|
5273
5273
|
var q = A._owner, se = Se(A.type, A._source, q ? q.type : null);
|
|
@@ -5282,8 +5282,8 @@ function Qd() {
|
|
|
5282
5282
|
}
|
|
5283
5283
|
function De() {
|
|
5284
5284
|
{
|
|
5285
|
-
if (
|
|
5286
|
-
var A = F(
|
|
5285
|
+
if (ee.current) {
|
|
5286
|
+
var A = F(ee.current.type);
|
|
5287
5287
|
if (A)
|
|
5288
5288
|
return `
|
|
5289
5289
|
|
|
@@ -5318,7 +5318,7 @@ Check the top-level render call using <` + se + ">.");
|
|
|
5318
5318
|
return;
|
|
5319
5319
|
Ke[se] = !0;
|
|
5320
5320
|
var ye = "";
|
|
5321
|
-
A && A._owner && A._owner !==
|
|
5321
|
+
A && A._owner && A._owner !== ee.current && (ye = " It was passed a child from " + F(A._owner.type) + "."), $(A), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', se, ye), $(null);
|
|
5322
5322
|
}
|
|
5323
5323
|
}
|
|
5324
5324
|
function it(A, q) {
|
|
@@ -7251,7 +7251,7 @@ function P2({
|
|
|
7251
7251
|
}
|
|
7252
7252
|
const Je = le.uid;
|
|
7253
7253
|
if (Qe.shiftKey && R !== null) {
|
|
7254
|
-
const Ge = Math.min(R, ge), gt = Math.max(R, ge), X = E.slice(Ge, gt + 1).map((
|
|
7254
|
+
const Ge = Math.min(R, ge), gt = Math.max(R, ge), X = E.slice(Ge, gt + 1).map((ee) => ee.uid), N = new Set(X);
|
|
7255
7255
|
j(N), p == null || p(Array.from(N));
|
|
7256
7256
|
} else if (Qe.ctrlKey || Qe.metaKey)
|
|
7257
7257
|
j((Ge) => {
|
|
@@ -7739,7 +7739,7 @@ function Tu(r, e, t) {
|
|
|
7739
7739
|
const p = e[f], g = p.type, m = p.target, y = Gf(m, r, l, o);
|
|
7740
7740
|
if (!y) continue;
|
|
7741
7741
|
const [b, x] = y;
|
|
7742
|
-
if (g === "characterData") n &&
|
|
7742
|
+
if (g === "characterData") n && Z(x) && Vf(s, m, x) && Hf(m, x, r);
|
|
7743
7743
|
else if (g === "childList") {
|
|
7744
7744
|
u = !0;
|
|
7745
7745
|
const v = p.addedNodes;
|
|
@@ -7804,7 +7804,7 @@ function Ba(r, e) {
|
|
|
7804
7804
|
function ja(r) {
|
|
7805
7805
|
let e, t, n = r;
|
|
7806
7806
|
if (n.__text !== "" || !n.isSimpleText() || n.isUnmergeable()) {
|
|
7807
|
-
for (; (e = n.getPreviousSibling()) !== null &&
|
|
7807
|
+
for (; (e = n.getPreviousSibling()) !== null && Z(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
|
|
7808
7808
|
if (e.__text !== "") {
|
|
7809
7809
|
if (Na(e, n)) {
|
|
7810
7810
|
n = Ba(e, n);
|
|
@@ -7814,7 +7814,7 @@ function ja(r) {
|
|
|
7814
7814
|
}
|
|
7815
7815
|
e.remove();
|
|
7816
7816
|
}
|
|
7817
|
-
for (; (t = n.getNextSibling()) !== null &&
|
|
7817
|
+
for (; (t = n.getNextSibling()) !== null && Z(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
|
|
7818
7818
|
if (t.__text !== "") {
|
|
7819
7819
|
if (Na(n, t)) {
|
|
7820
7820
|
n = Ba(n, t);
|
|
@@ -7833,7 +7833,7 @@ function Ma(r) {
|
|
|
7833
7833
|
for (; r.type === "element"; ) {
|
|
7834
7834
|
const e = r.getNode(), t = r.offset;
|
|
7835
7835
|
let n, s;
|
|
7836
|
-
if (t === e.getChildrenSize() ? (n = e.getChildAtIndex(t - 1), s = !0) : (n = e.getChildAtIndex(t), s = !1),
|
|
7836
|
+
if (t === e.getChildrenSize() ? (n = e.getChildAtIndex(t - 1), s = !0) : (n = e.getChildAtIndex(t), s = !1), Z(n)) {
|
|
7837
7837
|
r.set(n.__key, s ? n.getTextContentSize() : 0, "text");
|
|
7838
7838
|
break;
|
|
7839
7839
|
}
|
|
@@ -7895,7 +7895,7 @@ function $s(r, e, t) {
|
|
|
7895
7895
|
return e === "subscript" ? s &= -65 : e === "superscript" && (s &= -33), s;
|
|
7896
7896
|
}
|
|
7897
7897
|
function Fu(r) {
|
|
7898
|
-
return
|
|
7898
|
+
return Z(r) || Mr(r) || He(r);
|
|
7899
7899
|
}
|
|
7900
7900
|
function Jf(r, e) {
|
|
7901
7901
|
if (e != null) return void (r.__key = e);
|
|
@@ -8042,7 +8042,7 @@ function Qo(r, e, t) {
|
|
|
8042
8042
|
if (s !== null) {
|
|
8043
8043
|
let l = Ou(s);
|
|
8044
8044
|
const a = on(s);
|
|
8045
|
-
if (l !== null &&
|
|
8045
|
+
if (l !== null && Z(a)) {
|
|
8046
8046
|
if (l === hi && t) {
|
|
8047
8047
|
const u = t.length;
|
|
8048
8048
|
l = t, i = u, o = u;
|
|
@@ -8089,7 +8089,7 @@ function Xf(r, e) {
|
|
|
8089
8089
|
const t = r.anchor.offset, n = e.getParentOrThrow(), s = e.isToken();
|
|
8090
8090
|
return t === 0 ? !e.canInsertTextBefore() || !n.canInsertTextBefore() && !e.isComposing() || s || function(i) {
|
|
8091
8091
|
const o = i.getPreviousSibling();
|
|
8092
|
-
return (
|
|
8092
|
+
return (Z(o) || z(o) && o.isInline()) && !o.canInsertTextAfter();
|
|
8093
8093
|
}(e) : t === e.getTextContentSize() && (!e.canInsertTextAfter() || !n.canInsertTextAfter() && !e.isComposing() || s);
|
|
8094
8094
|
}
|
|
8095
8095
|
function La(r) {
|
|
@@ -8274,7 +8274,7 @@ function Ws(r) {
|
|
|
8274
8274
|
function gr(r) {
|
|
8275
8275
|
if (He(r) && !r.isInline()) return !0;
|
|
8276
8276
|
if (!z(r) || er(r)) return !1;
|
|
8277
|
-
const e = r.getFirstChild(), t = e === null || Mr(e) ||
|
|
8277
|
+
const e = r.getFirstChild(), t = e === null || Mr(e) || Z(e) || e.isInline();
|
|
8278
8278
|
return !r.isInline() && r.canBeEmpty() !== !1 && t;
|
|
8279
8279
|
}
|
|
8280
8280
|
function bn(r, e) {
|
|
@@ -8364,7 +8364,7 @@ function Vs(r, e) {
|
|
|
8364
8364
|
(function(a, u, c) {
|
|
8365
8365
|
a[`__lexicalKey_${u._key}`] = c;
|
|
8366
8366
|
})(i, o, s), l.set(s, i);
|
|
8367
|
-
}(r, n, wt),
|
|
8367
|
+
}(r, n, wt), Z(t) ? n.setAttribute("data-lexical-text", "true") : He(t) && n.setAttribute("data-lexical-decorator", "true"), z(t)) {
|
|
8368
8368
|
const s = t.__indent, i = t.__size;
|
|
8369
8369
|
if (s !== 0 && Wu(n, s), i !== 0) {
|
|
8370
8370
|
const l = i - 1;
|
|
@@ -8380,7 +8380,7 @@ function Vs(r, e) {
|
|
|
8380
8380
|
if (He(t)) {
|
|
8381
8381
|
const i = t.decorate(wt, wr);
|
|
8382
8382
|
i !== null && Ku(r, i), n.contentEditable = "false";
|
|
8383
|
-
} else
|
|
8383
|
+
} else Z(t) && (t.isDirectionless() || (vt += s));
|
|
8384
8384
|
dt += s, ar += s;
|
|
8385
8385
|
}
|
|
8386
8386
|
return e !== null && e.insertChild(n), Xo(Wn, Un, xi, t, "created"), n;
|
|
@@ -8392,7 +8392,7 @@ function lo(r, e, t, n, s) {
|
|
|
8392
8392
|
for (; o <= n; ++o) {
|
|
8393
8393
|
Vs(r[o], s);
|
|
8394
8394
|
const l = Wt.get(r[o]);
|
|
8395
|
-
l !== null &&
|
|
8395
|
+
l !== null && Z(l) && (Kt === null && (Kt = l.getFormat()), zt === "" && (zt = l.getStyle()));
|
|
8396
8396
|
}
|
|
8397
8397
|
mi(e) && (dt += ur), s.element.__lexicalTextContent = dt, dt = i + dt;
|
|
8398
8398
|
}
|
|
@@ -8466,7 +8466,7 @@ function lh(r, e, t) {
|
|
|
8466
8466
|
Hs(f, null);
|
|
8467
8467
|
}
|
|
8468
8468
|
const g = Wt.get(p);
|
|
8469
|
-
|
|
8469
|
+
Z(g) && (Kt === null && (Kt = g.getFormat()), zt === "" && (zt = g.getStyle()));
|
|
8470
8470
|
} else {
|
|
8471
8471
|
const f = Gs(i, Pr), p = Gs(o, Wt);
|
|
8472
8472
|
if (f.length !== u && K(227), p.length !== c && K(228), u === 0) c !== 0 && lo(p, o, 0, c - 1, l);
|
|
@@ -8491,7 +8491,7 @@ function lh(r, e, t) {
|
|
|
8491
8491
|
else E = $i(uo(F)), Hs(F, v.element), M++;
|
|
8492
8492
|
}
|
|
8493
8493
|
const j = Wt.get(w);
|
|
8494
|
-
j !== null &&
|
|
8494
|
+
j !== null && Z(j) && (Kt === null && (Kt = j.getFormat()), zt === "" && (zt = j.getStyle()));
|
|
8495
8495
|
}
|
|
8496
8496
|
const T = M > C, B = S > D;
|
|
8497
8497
|
if (T && !B) {
|
|
@@ -8527,7 +8527,7 @@ function En(r, e) {
|
|
|
8527
8527
|
l !== void 0 && (vt += l);
|
|
8528
8528
|
} else {
|
|
8529
8529
|
const o = t.getTextContent();
|
|
8530
|
-
|
|
8530
|
+
Z(t) && !t.isDirectionless() && (vt += o), ar += o, dt += o;
|
|
8531
8531
|
}
|
|
8532
8532
|
return i;
|
|
8533
8533
|
}
|
|
@@ -8545,7 +8545,7 @@ function En(r, e) {
|
|
|
8545
8545
|
if (He(n)) {
|
|
8546
8546
|
const l = n.decorate(wt, wr);
|
|
8547
8547
|
l !== null && Ku(r, l);
|
|
8548
|
-
} else
|
|
8548
|
+
} else Z(n) && !n.isDirectionless() && (vt += o);
|
|
8549
8549
|
dt += o, ar += o;
|
|
8550
8550
|
}
|
|
8551
8551
|
if (!Hn && _t(n) && n.__cachedText !== ar) {
|
|
@@ -8675,7 +8675,7 @@ const ir = Object.freeze({}), co = 30, fo = [["keydown", function(r, e) {
|
|
|
8675
8675
|
const t = ce();
|
|
8676
8676
|
if (G(t) && !e.isComposing()) {
|
|
8677
8677
|
const n = t.anchor, s = t.anchor.getNode();
|
|
8678
|
-
pt(n.key), (r.timeStamp < Rn + co || n.type === "element" || !t.isCollapsed() || s.getFormat() !== t.format ||
|
|
8678
|
+
pt(n.key), (r.timeStamp < Rn + co || n.type === "element" || !t.isCollapsed() || s.getFormat() !== t.format || Z(s) && s.getStyle() !== t.style) && ae(e, en, Rf);
|
|
8679
8679
|
}
|
|
8680
8680
|
});
|
|
8681
8681
|
}], ["compositionend", function(r, e) {
|
|
@@ -8690,7 +8690,7 @@ const ir = Object.freeze({}), co = 30, fo = [["keydown", function(r, e) {
|
|
|
8690
8690
|
const i = t.anchor.getNode(), o = Lt(e._window);
|
|
8691
8691
|
if (o === null) return;
|
|
8692
8692
|
const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, u = l ? t.focus.offset : t.anchor.offset;
|
|
8693
|
-
Ls && !t.isCollapsed() &&
|
|
8693
|
+
Ls && !t.isCollapsed() && Z(i) && o.anchorNode !== null && i.getTextContent().slice(0, a) + n + i.getTextContent().slice(a + u) === Ou(o.anchorNode) || ae(e, en, n);
|
|
8694
8694
|
const c = n.length;
|
|
8695
8695
|
_r && c > 1 && r.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= c), fi || Jn || Io || !e.isComposing() || (Rn = 0, pt(null));
|
|
8696
8696
|
} else
|
|
@@ -8734,7 +8734,7 @@ Ls && fo.push(["beforeinput", (r, e) => function(t, n) {
|
|
|
8734
8734
|
});
|
|
8735
8735
|
}, co), G(o)) {
|
|
8736
8736
|
const g = o.anchor.getNode();
|
|
8737
|
-
g.markDirty(), o.format = g.getFormat(),
|
|
8737
|
+
g.markDirty(), o.format = g.getFormat(), Z(g) || K(142), o.style = g.getStyle();
|
|
8738
8738
|
}
|
|
8739
8739
|
} else {
|
|
8740
8740
|
pt(null), t.preventDefault();
|
|
@@ -8830,7 +8830,7 @@ const Ks = /* @__PURE__ */ new WeakMap();
|
|
|
8830
8830
|
let ho = !1, po = !1, Ln = !1, vn = !1, Ju = [0, "", 0, "root", 0];
|
|
8831
8831
|
function Xu(r, e, t, n, s) {
|
|
8832
8832
|
const i = r.anchor, o = r.focus, l = i.getNode(), a = nt(), u = Lt(a._window), c = u !== null ? u.anchorNode : null, d = i.key, f = a.getElementByKey(d), p = t.length;
|
|
8833
|
-
return d !== o.key || !
|
|
8833
|
+
return d !== o.key || !Z(l) || (!s && (!Ls || Qu < n + 50) || l.isDirty() && p < 2 || Iu(t)) && i.offset !== o.offset && !l.isComposing() || Ar(l) || l.isDirty() && p > 1 || (s || !Ls) && f !== null && !l.isComposing() && c !== Os(f) || u !== null && e !== null && (!e.collapsed || e.startContainer !== u.anchorNode || e.startOffset !== u.anchorOffset) || l.getFormat() !== r.format || l.getStyle() !== r.style || Xf(r, l);
|
|
8834
8834
|
}
|
|
8835
8835
|
function Wa(r, e) {
|
|
8836
8836
|
return r !== null && r.nodeValue !== null && r.nodeType === Cr && e !== 0 && e !== r.nodeValue.length;
|
|
@@ -8847,7 +8847,7 @@ function Ha(r, e, t) {
|
|
|
8847
8847
|
r.type === "Range" && r.anchorNode === r.focusNode && (l.dirty = !0);
|
|
8848
8848
|
const c = yi(e).event, d = c ? c.timeStamp : performance.now(), [f, p, g, m, y] = Ju, b = et(), x = e.isComposing() === !1 && b.getTextContent() === "";
|
|
8849
8849
|
if (d < y + 200 && a.offset === g && a.key === m) l.format = f, l.style = p;
|
|
8850
|
-
else if (a.type === "text")
|
|
8850
|
+
else if (a.type === "text") Z(u) || K(141), l.format = u.getFormat(), l.style = u.getStyle();
|
|
8851
8851
|
else if (a.type === "element" && !x) {
|
|
8852
8852
|
const v = a.getNode();
|
|
8853
8853
|
l.style = "", v instanceof fn && v.getChildrenSize() === 0 ? (l.format = v.getTextFormat(), l.style = v.getTextStyle()) : l.format = 0;
|
|
@@ -8857,7 +8857,7 @@ function Ha(r, e, t) {
|
|
|
8857
8857
|
let v = Ff, C = !1;
|
|
8858
8858
|
for (let D = 0; D < p; D++) {
|
|
8859
8859
|
const k = f[D], _ = k.getTextContentSize();
|
|
8860
|
-
if (
|
|
8860
|
+
if (Z(k) && _ !== 0 && !(D === 0 && k.__key === b && m === _ || D === p - 1 && k.__key === x && y === 0) && (C = !0, v &= k.getFormat(), v === 0)) break;
|
|
8861
8861
|
}
|
|
8862
8862
|
l.format = C ? v : 0;
|
|
8863
8863
|
}
|
|
@@ -8875,7 +8875,7 @@ function qi(r, e) {
|
|
|
8875
8875
|
if (pt(null), t !== null && e != null) {
|
|
8876
8876
|
if (e === "") {
|
|
8877
8877
|
const n = xt(t), s = Os(r.getElementByKey(t));
|
|
8878
|
-
return void (s !== null && s.nodeValue !== null &&
|
|
8878
|
+
return void (s !== null && s.nodeValue !== null && Z(n) && Jo(n, s.nodeValue, null, null, !0));
|
|
8879
8879
|
}
|
|
8880
8880
|
if (e[e.length - 1] === `
|
|
8881
8881
|
`) {
|
|
@@ -8983,7 +8983,7 @@ class bi {
|
|
|
8983
8983
|
const t = e || ce();
|
|
8984
8984
|
if (t == null) return !1;
|
|
8985
8985
|
const n = t.getNodes().some((s) => s.__key === this.__key);
|
|
8986
|
-
if (
|
|
8986
|
+
if (Z(this)) return n;
|
|
8987
8987
|
if (G(t) && t.anchor.type === "element" && t.focus.type === "element") {
|
|
8988
8988
|
if (t.isCollapsed()) return !1;
|
|
8989
8989
|
const s = this.getParent();
|
|
@@ -9241,7 +9241,7 @@ class bi {
|
|
|
9241
9241
|
const n = this.getPreviousSibling(), s = this.getParentOrThrow();
|
|
9242
9242
|
if (n === null) return s.select(0, 0);
|
|
9243
9243
|
if (z(n)) return n.select();
|
|
9244
|
-
if (!
|
|
9244
|
+
if (!Z(n)) {
|
|
9245
9245
|
const i = n.getIndexWithinParent() + 1;
|
|
9246
9246
|
return s.select(i, i);
|
|
9247
9247
|
}
|
|
@@ -9252,7 +9252,7 @@ class bi {
|
|
|
9252
9252
|
const n = this.getNextSibling(), s = this.getParentOrThrow();
|
|
9253
9253
|
if (n === null) return s.select();
|
|
9254
9254
|
if (z(n)) return n.select(0, 0);
|
|
9255
|
-
if (!
|
|
9255
|
+
if (!Z(n)) {
|
|
9256
9256
|
const i = n.getIndexWithinParent();
|
|
9257
9257
|
return s.select(i, i);
|
|
9258
9258
|
}
|
|
@@ -9684,12 +9684,12 @@ function pr(r) {
|
|
|
9684
9684
|
function ct(r = "") {
|
|
9685
9685
|
return rr(new dn(r));
|
|
9686
9686
|
}
|
|
9687
|
-
function
|
|
9687
|
+
function Z(r) {
|
|
9688
9688
|
return r instanceof dn;
|
|
9689
9689
|
}
|
|
9690
9690
|
function ra(r, e) {
|
|
9691
9691
|
const t = r.fontWeight, n = r.textDecoration.split(" "), s = t === "700" || t === "bold", i = n.includes("line-through"), o = r.fontStyle === "italic", l = n.includes("underline"), a = r.verticalAlign;
|
|
9692
|
-
return (u) => (
|
|
9692
|
+
return (u) => (Z(u) && (s && !u.hasFormat("bold") && u.toggleFormat("bold"), i && !u.hasFormat("strikethrough") && u.toggleFormat("strikethrough"), o && !u.hasFormat("italic") && u.toggleFormat("italic"), l && !u.hasFormat("underline") && u.toggleFormat("underline"), a !== "sub" || u.hasFormat("subscript") || u.toggleFormat("subscript"), a !== "super" || u.hasFormat("superscript") || u.toggleFormat("superscript"), e && !u.hasFormat(e) && u.toggleFormat(e)), u);
|
|
9693
9693
|
}
|
|
9694
9694
|
class rs extends dn {
|
|
9695
9695
|
static getType() {
|
|
@@ -9770,13 +9770,13 @@ function tr(r, e, t) {
|
|
|
9770
9770
|
}
|
|
9771
9771
|
function Hi(r, e) {
|
|
9772
9772
|
let t = e.__key, n = r.offset, s = "element";
|
|
9773
|
-
if (
|
|
9773
|
+
if (Z(e)) {
|
|
9774
9774
|
s = "text";
|
|
9775
9775
|
const i = e.getTextContentSize();
|
|
9776
9776
|
n > i && (n = i);
|
|
9777
9777
|
} else if (!z(e)) {
|
|
9778
9778
|
const i = e.getNextSibling();
|
|
9779
|
-
if (
|
|
9779
|
+
if (Z(i)) t = i.__key, n = 0, s = "text";
|
|
9780
9780
|
else {
|
|
9781
9781
|
const o = e.getParent();
|
|
9782
9782
|
o && (t = o.__key, n = e.getIndexWithinParent() + 1);
|
|
@@ -9787,7 +9787,7 @@ function Hi(r, e) {
|
|
|
9787
9787
|
function Ja(r, e) {
|
|
9788
9788
|
if (z(e)) {
|
|
9789
9789
|
const t = e.getLastDescendant();
|
|
9790
|
-
z(t) ||
|
|
9790
|
+
z(t) || Z(t) ? Hi(r, t) : Hi(r, e);
|
|
9791
9791
|
} else Hi(r, e);
|
|
9792
9792
|
}
|
|
9793
9793
|
function mr(r, e, t, n) {
|
|
@@ -9842,7 +9842,7 @@ class vi {
|
|
|
9842
9842
|
insertNodes(e) {
|
|
9843
9843
|
const t = this.getNodes(), n = t.length, s = t[n - 1];
|
|
9844
9844
|
let i;
|
|
9845
|
-
if (
|
|
9845
|
+
if (Z(s)) i = s.select();
|
|
9846
9846
|
else {
|
|
9847
9847
|
const o = s.getIndexWithinParent() + 1;
|
|
9848
9848
|
i = s.getParentOrThrow().select(o, o);
|
|
@@ -9915,7 +9915,7 @@ class Sr {
|
|
|
9915
9915
|
const f = e[d];
|
|
9916
9916
|
if (z(f) && !f.isInline()) c || (u += `
|
|
9917
9917
|
`), c = !f.isEmpty();
|
|
9918
|
-
else if (c = !1,
|
|
9918
|
+
else if (c = !1, Z(f)) {
|
|
9919
9919
|
let p = f.getTextContent();
|
|
9920
9920
|
f === t ? f === n ? s.type === "element" && i.type === "element" && i.offset !== s.offset || (p = l < a ? p.slice(l, a) : p.slice(a, l)) : p = o ? p.slice(l) : p.slice(a) : f === n && (p = o ? p.slice(0, a) : p.slice(0, l)), u += p;
|
|
9921
9921
|
} else !He(f) && !Mr(f) || f === n && this.isCollapsed() || (u += f.getTextContent());
|
|
@@ -9963,15 +9963,15 @@ class Sr {
|
|
|
9963
9963
|
let u = l.offset;
|
|
9964
9964
|
const c = this.getNodes(), d = c.length;
|
|
9965
9965
|
let f = c[0];
|
|
9966
|
-
|
|
9966
|
+
Z(f) || K(26);
|
|
9967
9967
|
const p = f.getTextContent().length, g = f.getParentOrThrow();
|
|
9968
9968
|
let m = c[d - 1];
|
|
9969
9969
|
if (d === 1 && l.type === "element" && (u = p, l.set(o.key, u, "text")), this.isCollapsed() && a === p && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
|
|
9970
9970
|
let y = f.getNextSibling();
|
|
9971
|
-
if (
|
|
9971
|
+
if (Z(y) && y.canInsertTextBefore() && !Ar(y) || (y = ct(), y.setFormat(s), y.setStyle(i), g.canInsertTextAfter() ? f.insertAfter(y) : g.insertAfter(y)), y.select(0, 0), f = y, e !== "") return void this.insertText(e);
|
|
9972
9972
|
} else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !g.canInsertTextBefore() && f.getPreviousSibling() === null)) {
|
|
9973
9973
|
let y = f.getPreviousSibling();
|
|
9974
|
-
if (
|
|
9974
|
+
if (Z(y) && !Ar(y) || (y = ct(), y.setFormat(s), g.canInsertTextBefore() ? f.insertBefore(y) : g.insertBefore(y)), y.select(), f = y, e !== "") return void this.insertText(e);
|
|
9975
9975
|
} else if (f.isSegmented() && a !== p) {
|
|
9976
9976
|
const y = ct(f.getTextContent());
|
|
9977
9977
|
y.setFormat(s), f.replace(y), f = y;
|
|
@@ -10010,7 +10010,7 @@ class Sr {
|
|
|
10010
10010
|
if (!b.is(x) && x.isInline()) do
|
|
10011
10011
|
v = x, x = x.getParentOrThrow();
|
|
10012
10012
|
while (x.isInline());
|
|
10013
|
-
if (l.type === "text" && (u !== 0 || m.getTextContent() === "") || l.type === "element" && m.getIndexWithinParent() < u) if (
|
|
10013
|
+
if (l.type === "text" && (u !== 0 || m.getTextContent() === "") || l.type === "element" && m.getIndexWithinParent() < u) if (Z(m) && !m.isToken() && u !== m.getTextContentSize()) {
|
|
10014
10014
|
if (m.isSegmented()) {
|
|
10015
10015
|
const E = ct(m.getTextContent());
|
|
10016
10016
|
m.replace(E), m = E;
|
|
@@ -10051,7 +10051,7 @@ class Sr {
|
|
|
10051
10051
|
const { anchor: e, focus: t } = this, n = this.getNodes(), s = this.isBackward() ? t : e, i = this.isBackward() ? e : t;
|
|
10052
10052
|
let o = s.getNode(), l = i.getNode();
|
|
10053
10053
|
const a = bn(o, gr), u = bn(l, gr);
|
|
10054
|
-
|
|
10054
|
+
Z(o) && o.isToken() && s.offset < o.getTextContentSize() && (s.offset = 0), i.offset > 0 && Z(l) && l.isToken() && (i.offset = l.getTextContentSize()), n.forEach((d) => {
|
|
10055
10055
|
Fn(o, d) || Fn(l, d) || d.getKey() === o.getKey() || d.getKey() === l.getKey() || d.remove();
|
|
10056
10056
|
});
|
|
10057
10057
|
const c = (d, f) => {
|
|
@@ -10061,20 +10061,20 @@ class Sr {
|
|
|
10061
10061
|
return p.setFormat(d.getFormat()), p.setStyle(d.getStyle()), d.replace(p);
|
|
10062
10062
|
}
|
|
10063
10063
|
};
|
|
10064
|
-
if (o === l &&
|
|
10064
|
+
if (o === l && Z(o)) {
|
|
10065
10065
|
const d = Math.abs(t.offset - e.offset);
|
|
10066
10066
|
return o.spliceText(s.offset, d, "", !0), void c(o, d);
|
|
10067
10067
|
}
|
|
10068
|
-
if (
|
|
10068
|
+
if (Z(o)) {
|
|
10069
10069
|
const d = o.getTextContentSize() - s.offset;
|
|
10070
10070
|
o.spliceText(s.offset, d, ""), o = c(o, d) || o;
|
|
10071
10071
|
}
|
|
10072
|
-
|
|
10072
|
+
Z(l) && (l.spliceText(0, i.offset, ""), l = c(l, i.offset) || l), o.isAttached() && Z(o) ? o.selectEnd() : l.isAttached() && Z(l) && l.selectStart(), z(a) && z(u) && a !== u && (a.append(...u.getChildren()), u.remove(), i.set(s.key, s.offset, s.type));
|
|
10073
10073
|
}
|
|
10074
10074
|
formatText(e, t = null) {
|
|
10075
10075
|
if (this.isCollapsed()) return this.toggleFormat(e), void pt(null);
|
|
10076
10076
|
const n = this.getNodes(), s = [];
|
|
10077
|
-
for (const C of n)
|
|
10077
|
+
for (const C of n) Z(C) && s.push(C);
|
|
10078
10078
|
const i = (C) => {
|
|
10079
10079
|
n.forEach((D) => {
|
|
10080
10080
|
if (an(D)) {
|
|
@@ -10136,7 +10136,7 @@ class Sr {
|
|
|
10136
10136
|
let y = null;
|
|
10137
10137
|
for (let b = 0; b < g.length; b++) {
|
|
10138
10138
|
const x = g[b], v = Mr(x);
|
|
10139
|
-
if (v || He(x) && x.isInline() || z(x) && x.isInline() ||
|
|
10139
|
+
if (v || He(x) && x.isInline() || z(x) && x.isInline() || Z(x) || x.isParentRequired()) {
|
|
10140
10140
|
if (y === null && (y = x.createParentElementNode(), m.append(y), v)) continue;
|
|
10141
10141
|
y !== null && y.append(x);
|
|
10142
10142
|
} else m.append(x), y = null;
|
|
@@ -10181,18 +10181,18 @@ class Sr {
|
|
|
10181
10181
|
const [a, u] = mo(this);
|
|
10182
10182
|
if (t === 0) return [];
|
|
10183
10183
|
if (t === 1) {
|
|
10184
|
-
if (
|
|
10184
|
+
if (Z(o) && !this.isCollapsed()) {
|
|
10185
10185
|
const d = a > u ? u : a, f = a > u ? a : u, p = o.splitText(d, f), g = d === 0 ? p[0] : p[1];
|
|
10186
10186
|
return g != null ? [g] : [];
|
|
10187
10187
|
}
|
|
10188
10188
|
return [o];
|
|
10189
10189
|
}
|
|
10190
10190
|
const c = s.isBefore(i);
|
|
10191
|
-
if (
|
|
10191
|
+
if (Z(o)) {
|
|
10192
10192
|
const d = c ? a : u;
|
|
10193
10193
|
d === o.getTextContentSize() ? e.shift() : d !== 0 && ([, o] = o.splitText(d), e[0] = o);
|
|
10194
10194
|
}
|
|
10195
|
-
if (
|
|
10195
|
+
if (Z(l)) {
|
|
10196
10196
|
const d = l.getTextContent().length, f = c ? u : a;
|
|
10197
10197
|
f === 0 ? e.pop() : f !== d && ([l] = l.splitText(f), e[n] = l);
|
|
10198
10198
|
}
|
|
@@ -10206,7 +10206,7 @@ class Sr {
|
|
|
10206
10206
|
return p.add(l.__key), void Zt(p);
|
|
10207
10207
|
}
|
|
10208
10208
|
const f = t ? l.getPreviousSibling() : l.getNextSibling();
|
|
10209
|
-
if (
|
|
10209
|
+
if (Z(f)) {
|
|
10210
10210
|
const p = f.__key, g = t ? f.getTextContent().length : 0;
|
|
10211
10211
|
return s.set(p, g, "text"), void (o && i.set(p, g, "text"));
|
|
10212
10212
|
}
|
|
@@ -10359,7 +10359,7 @@ function el(r, e, t, n) {
|
|
|
10359
10359
|
const f = u.parentNode;
|
|
10360
10360
|
r === f && e > Array.prototype.indexOf.call(f.children, u) && i--;
|
|
10361
10361
|
}
|
|
10362
|
-
if (s = Qr(c),
|
|
10362
|
+
if (s = Qr(c), Z(s)) i = Ra(s, o);
|
|
10363
10363
|
else {
|
|
10364
10364
|
let f = Qr(r);
|
|
10365
10365
|
if (f === null) return null;
|
|
@@ -10374,7 +10374,7 @@ function el(r, e, t, n) {
|
|
|
10374
10374
|
const y = o ? m.getLastDescendant() : m.getFirstDescendant();
|
|
10375
10375
|
y === null ? f = m : (m = y, f = z(m) ? m : m.getParentOrThrow()), i = 0;
|
|
10376
10376
|
}
|
|
10377
|
-
|
|
10377
|
+
Z(m) ? (s = m, f = null, i = Ra(m, o)) : m !== f && o && !d && (z(f) || K(216), i = Math.min(f.getChildrenSize(), i + 1));
|
|
10378
10378
|
} else {
|
|
10379
10379
|
const p = f.getIndexWithinParent();
|
|
10380
10380
|
i = e === 0 && He(f) && Qr(r) === f ? p : p + 1, f = f.getParentOrThrow();
|
|
@@ -10382,7 +10382,7 @@ function el(r, e, t, n) {
|
|
|
10382
10382
|
if (z(f)) return tr(f.__key, i, "element");
|
|
10383
10383
|
}
|
|
10384
10384
|
} else s = Qr(r);
|
|
10385
|
-
return
|
|
10385
|
+
return Z(s) ? tr(s.__key, i, "text") : null;
|
|
10386
10386
|
}
|
|
10387
10387
|
function tl(r, e, t) {
|
|
10388
10388
|
const n = r.offset, s = r.getNode();
|
|
@@ -10391,15 +10391,15 @@ function tl(r, e, t) {
|
|
|
10391
10391
|
if (e) {
|
|
10392
10392
|
if ((t || !e) && i === null && z(o) && o.isInline()) {
|
|
10393
10393
|
const l = o.getPreviousSibling();
|
|
10394
|
-
|
|
10394
|
+
Z(l) && (r.key = l.__key, r.offset = l.getTextContent().length);
|
|
10395
10395
|
}
|
|
10396
|
-
} else z(i) && !t && i.isInline() ? (r.key = i.__key, r.offset = i.getChildrenSize(), r.type = "element") :
|
|
10396
|
+
} else z(i) && !t && i.isInline() ? (r.key = i.__key, r.offset = i.getChildrenSize(), r.type = "element") : Z(i) && (r.key = i.__key, r.offset = i.getTextContent().length);
|
|
10397
10397
|
} else if (n === s.getTextContent().length) {
|
|
10398
10398
|
const i = s.getNextSibling(), o = s.getParent();
|
|
10399
10399
|
if (e && z(i) && i.isInline()) r.key = i.__key, r.offset = 0, r.type = "element";
|
|
10400
10400
|
else if ((t || e) && i === null && z(o) && o.isInline() && !o.canInsertTextAfter()) {
|
|
10401
10401
|
const l = o.getNextSibling();
|
|
10402
|
-
|
|
10402
|
+
Z(l) && (r.key = l.__key, r.offset = 0);
|
|
10403
10403
|
}
|
|
10404
10404
|
}
|
|
10405
10405
|
}
|
|
@@ -10487,21 +10487,21 @@ function nl(r) {
|
|
|
10487
10487
|
if (r.isCollapsed()) {
|
|
10488
10488
|
if (!z(i)) return;
|
|
10489
10489
|
const l = i.getChildrenSize(), a = t >= l, u = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
|
|
10490
|
-
if (
|
|
10490
|
+
if (Z(u)) {
|
|
10491
10491
|
let c = 0;
|
|
10492
10492
|
a && (c = u.getTextContentSize()), e.set(u.__key, c, "text"), n.set(u.__key, c, "text");
|
|
10493
10493
|
}
|
|
10494
10494
|
} else {
|
|
10495
10495
|
if (z(i)) {
|
|
10496
10496
|
const l = i.getChildrenSize(), a = t >= l, u = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
|
|
10497
|
-
if (
|
|
10497
|
+
if (Z(u)) {
|
|
10498
10498
|
let c = 0;
|
|
10499
10499
|
a && (c = u.getTextContentSize()), e.set(u.__key, c, "text");
|
|
10500
10500
|
}
|
|
10501
10501
|
}
|
|
10502
10502
|
if (z(o)) {
|
|
10503
10503
|
const l = o.getChildrenSize(), a = s >= l, u = a ? o.getChildAtIndex(l - 1) : o.getChildAtIndex(s);
|
|
10504
|
-
if (
|
|
10504
|
+
if (Z(u)) {
|
|
10505
10505
|
let c = 0;
|
|
10506
10506
|
a && (c = u.getTextContentSize()), n.set(u.__key, c, "text");
|
|
10507
10507
|
}
|
|
@@ -10510,7 +10510,7 @@ function nl(r) {
|
|
|
10510
10510
|
}
|
|
10511
10511
|
function Qs(r, e, t, n, s) {
|
|
10512
10512
|
let i = null, o = 0, l = null;
|
|
10513
|
-
n !== null ? (i = n.__key,
|
|
10513
|
+
n !== null ? (i = n.__key, Z(n) ? (o = n.getTextContentSize(), l = "text") : z(n) && (o = n.getChildrenSize(), l = "element")) : s !== null && (i = s.__key, Z(s) ? l = "text" : z(s) && (l = "element")), i !== null && l !== null ? r.set(i, o, l) : (o = e.getIndexWithinParent(), o === -1 && (o = t.getChildrenSize()), r.set(t.__key, o, "element"));
|
|
10514
10514
|
}
|
|
10515
10515
|
function sl(r, e, t, n, s) {
|
|
10516
10516
|
r.type === "text" ? (r.key = t, e || (r.offset += s)) : r.offset > n.getIndexWithinParent() && (r.offset -= 1);
|
|
@@ -10588,7 +10588,7 @@ function _h(r, e) {
|
|
|
10588
10588
|
const s = lt();
|
|
10589
10589
|
return et().append(s), s.select(), [et(), 0];
|
|
10590
10590
|
}
|
|
10591
|
-
if (
|
|
10591
|
+
if (Z(r)) {
|
|
10592
10592
|
const s = r.splitText(e);
|
|
10593
10593
|
if (s.length === 0) return [t, r.getIndexWithinParent()];
|
|
10594
10594
|
const i = e === 0 ? 0 : 1;
|
|
@@ -10830,7 +10830,7 @@ function fc(r, e, t) {
|
|
|
10830
10830
|
const v = x._dirtyLeaves, C = b._nodeMap;
|
|
10831
10831
|
for (const D of v) {
|
|
10832
10832
|
const k = C.get(D);
|
|
10833
|
-
|
|
10833
|
+
Z(k) && k.isAttached() && k.isSimpleText() && !k.isUnmergeable() && ja(k);
|
|
10834
10834
|
}
|
|
10835
10835
|
}(a, r) : function(b, x) {
|
|
10836
10836
|
const v = x._dirtyLeaves, C = x._dirtyElements, D = b._nodeMap, k = xr(), _ = /* @__PURE__ */ new Map();
|
|
@@ -10840,7 +10840,7 @@ function fc(r, e, t) {
|
|
|
10840
10840
|
x._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
10841
10841
|
for (const B of E) {
|
|
10842
10842
|
const F = D.get(B);
|
|
10843
|
-
|
|
10843
|
+
Z(F) && F.isAttached() && F.isSimpleText() && !F.isUnmergeable() && ja(F), F !== void 0 && al(F, k) && ol(x, F, _), v.add(B);
|
|
10844
10844
|
}
|
|
10845
10845
|
if (E = x._dirtyLeaves, M = E.size, M > 0) {
|
|
10846
10846
|
Ds++;
|
|
@@ -11033,7 +11033,7 @@ class hr extends bi {
|
|
|
11033
11033
|
const e = [];
|
|
11034
11034
|
let t = this.getFirstChild();
|
|
11035
11035
|
for (; t !== null; ) {
|
|
11036
|
-
if (
|
|
11036
|
+
if (Z(t) && e.push(t), z(t)) {
|
|
11037
11037
|
const n = t.getAllTextNodes();
|
|
11038
11038
|
e.push(...n);
|
|
11039
11039
|
}
|
|
@@ -11136,10 +11136,10 @@ class hr extends bi {
|
|
|
11136
11136
|
if (!this.canBeEmpty()) {
|
|
11137
11137
|
if (e === 0 && t === 0) {
|
|
11138
11138
|
const a = this.getFirstChild();
|
|
11139
|
-
if (
|
|
11139
|
+
if (Z(a) || z(a)) return a.select(0, 0);
|
|
11140
11140
|
} else if (!(e !== void 0 && e !== o || t !== void 0 && t !== o)) {
|
|
11141
11141
|
const a = this.getLastChild();
|
|
11142
|
-
if (
|
|
11142
|
+
if (Z(a) || z(a)) return a.select();
|
|
11143
11143
|
}
|
|
11144
11144
|
}
|
|
11145
11145
|
s === void 0 && (s = o), i === void 0 && (i = o);
|
|
@@ -11489,7 +11489,7 @@ class fn extends hr {
|
|
|
11489
11489
|
}
|
|
11490
11490
|
collapseAtStart() {
|
|
11491
11491
|
const e = this.getChildren();
|
|
11492
|
-
if (e.length === 0 ||
|
|
11492
|
+
if (e.length === 0 || Z(e[0]) && e[0].getTextContent().trim() === "") {
|
|
11493
11493
|
if (this.getNextSibling() !== null) return this.selectNext(), this.remove(), !0;
|
|
11494
11494
|
if (this.getPreviousSibling() !== null) return this.selectPrevious(), this.remove(), !0;
|
|
11495
11495
|
}
|
|
@@ -11838,7 +11838,7 @@ function Fh(r) {
|
|
|
11838
11838
|
const i = s.getChildren(), o = i.length;
|
|
11839
11839
|
for (let l = 0; l < o; l++) {
|
|
11840
11840
|
const a = i[n];
|
|
11841
|
-
if (!
|
|
11841
|
+
if (!Z(a)) return !1;
|
|
11842
11842
|
}
|
|
11843
11843
|
}
|
|
11844
11844
|
}
|
|
@@ -11930,7 +11930,7 @@ function hl(r, e, t) {
|
|
|
11930
11930
|
}
|
|
11931
11931
|
function pl(r) {
|
|
11932
11932
|
if (He(r) || !z(r) || er(r)) return !1;
|
|
11933
|
-
const e = r.getFirstChild(), t = e === null || Mr(e) ||
|
|
11933
|
+
const e = r.getFirstChild(), t = e === null || Mr(e) || Z(e) || e.isInline();
|
|
11934
11934
|
return !r.isInline() && r.canBeEmpty() !== !1 && t;
|
|
11935
11935
|
}
|
|
11936
11936
|
function Wh(r) {
|
|
@@ -12010,7 +12010,7 @@ function Yh(r) {
|
|
|
12010
12010
|
if (G(m)) {
|
|
12011
12011
|
const y = m.anchor;
|
|
12012
12012
|
let b = y.getNode(), x = 0, v = 0;
|
|
12013
|
-
if (
|
|
12013
|
+
if (Z(b) && u >= 0 && c >= 0 && (x = u, v = u + c, m.setTextNodeRange(b, x, b, v)), x === v && d === "" || (m.insertRawText(d), b = y.getNode()), Z(b)) {
|
|
12014
12014
|
x = f, v = f + p;
|
|
12015
12015
|
const C = b.getTextContentSize();
|
|
12016
12016
|
x = x > C ? C : x, v = v > C ? C : v, m.setTextNodeRange(b, x, b, v);
|
|
@@ -12060,7 +12060,7 @@ function Sc(r, e, t, n = null) {
|
|
|
12060
12060
|
let o = e;
|
|
12061
12061
|
if (n !== null) {
|
|
12062
12062
|
let p = ea(e);
|
|
12063
|
-
p =
|
|
12063
|
+
p = Z(p) && n !== null ? xc(n, p) : p, o = p;
|
|
12064
12064
|
}
|
|
12065
12065
|
const l = z(o) ? o.getChildren() : [], a = r._nodes.get(o.getType());
|
|
12066
12066
|
let u;
|
|
@@ -12183,7 +12183,7 @@ function Dc(r, e, t, n = []) {
|
|
|
12183
12183
|
let o = t;
|
|
12184
12184
|
if (e !== null) {
|
|
12185
12185
|
let u = ea(t);
|
|
12186
|
-
u =
|
|
12186
|
+
u = Z(u) && e !== null ? xc(e, u) : u, o = u;
|
|
12187
12187
|
}
|
|
12188
12188
|
const l = z(o) ? o.getChildren() : [], a = function(u) {
|
|
12189
12189
|
const c = u.exportJSON(), d = u.constructor;
|
|
@@ -12193,7 +12193,7 @@ function Dc(r, e, t, n = []) {
|
|
|
12193
12193
|
}
|
|
12194
12194
|
return c;
|
|
12195
12195
|
}(o);
|
|
12196
|
-
if (
|
|
12196
|
+
if (Z(o)) {
|
|
12197
12197
|
const u = o.__text;
|
|
12198
12198
|
u.length > 0 ? a.text = u : s = !1;
|
|
12199
12199
|
}
|
|
@@ -12218,7 +12218,7 @@ function tp(r) {
|
|
|
12218
12218
|
const e = [];
|
|
12219
12219
|
for (let t = 0; t < r.length; t++) {
|
|
12220
12220
|
const n = r[t], s = Ch(n);
|
|
12221
|
-
|
|
12221
|
+
Z(s) && Oh(s), e.push(s);
|
|
12222
12222
|
}
|
|
12223
12223
|
return e;
|
|
12224
12224
|
}
|
|
@@ -12569,7 +12569,7 @@ function dp(r) {
|
|
|
12569
12569
|
const { offset: i, node: o } = s, l = on(o);
|
|
12570
12570
|
if (l !== null) {
|
|
12571
12571
|
const a = bh();
|
|
12572
|
-
if (
|
|
12572
|
+
if (Z(l)) a.anchor.set(l.getKey(), i, "text"), a.focus.set(l.getKey(), i, "text");
|
|
12573
12573
|
else {
|
|
12574
12574
|
const c = l.getParentOrThrow().getKey(), d = l.getIndexWithinParent() + 1;
|
|
12575
12575
|
a.anchor.set(c, d, "element"), a.focus.set(c, d, "element");
|
|
@@ -12720,10 +12720,10 @@ function wp(r, e, t, n, s) {
|
|
|
12720
12720
|
if (l.length === 0) return Ot;
|
|
12721
12721
|
if (l.length > 1) {
|
|
12722
12722
|
const b = e._nodeMap, x = b.get(i.anchor.key), v = b.get(o.anchor.key);
|
|
12723
|
-
return x && v && !r._nodeMap.has(x.__key) &&
|
|
12723
|
+
return x && v && !r._nodeMap.has(x.__key) && Z(x) && x.__text.length === 1 && i.anchor.offset === 1 ? El : Ot;
|
|
12724
12724
|
}
|
|
12725
12725
|
const a = l[0], u = r._nodeMap.get(a.__key);
|
|
12726
|
-
if (!
|
|
12726
|
+
if (!Z(u) || !Z(a) || u.__mode !== a.__mode) return Ot;
|
|
12727
12727
|
const c = u.__text, d = a.__text;
|
|
12728
12728
|
if (c === d) return Ot;
|
|
12729
12729
|
const f = i.anchor, p = o.anchor;
|
|
@@ -12743,7 +12743,7 @@ function Cp(r, e) {
|
|
|
12743
12743
|
const m = i._selection;
|
|
12744
12744
|
return l.size > 0 || a.size > 0 ? g === !1 && d !== Ot && d === n && c < t + e && p || l.size === 1 && function(y, b, x) {
|
|
12745
12745
|
const v = b._nodeMap.get(y), C = x._nodeMap.get(y), D = b._selection, k = x._selection;
|
|
12746
|
-
return !(G(D) && G(k) && D.anchor.type === "element" && D.focus.type === "element" && k.anchor.type === "text" && k.focus.type === "text" || !
|
|
12746
|
+
return !(G(D) && G(k) && D.anchor.type === "element" && D.focus.type === "element" && k.anchor.type === "text" && k.focus.type === "text" || !Z(v) || !Z(C) || v.__parent !== C.__parent) && JSON.stringify(b.read(() => v.exportJSON())) === JSON.stringify(x.read(() => C.exportJSON()));
|
|
12747
12747
|
}(Array.from(l)[0], s, i) ? vs : bo : m !== null ? vs : vo;
|
|
12748
12748
|
})();
|
|
12749
12749
|
return t = c, n = d, f;
|
|
@@ -15339,9 +15339,9 @@ function q2({
|
|
|
15339
15339
|
const Ye = (N) => {
|
|
15340
15340
|
ne(N), O(!1), a == null || a(N);
|
|
15341
15341
|
}, H = be(null), [te, de] = L(!1), Ae = (N) => {
|
|
15342
|
-
const
|
|
15343
|
-
if (
|
|
15344
|
-
const ue = Array.from(
|
|
15342
|
+
const ee = N.target.files;
|
|
15343
|
+
if (ee) {
|
|
15344
|
+
const ue = Array.from(ee);
|
|
15345
15345
|
console.log("[MailComposer] Files selected:", ue.map(($) => ({ name: $.name, size: $.size, type: $.type }))), Y(($) => [...$, ...ue]);
|
|
15346
15346
|
}
|
|
15347
15347
|
H.current && (H.current.value = "");
|
|
@@ -15351,12 +15351,12 @@ function q2({
|
|
|
15351
15351
|
N.preventDefault(), N.stopPropagation(), de(!1);
|
|
15352
15352
|
}, St = (N) => {
|
|
15353
15353
|
if (N.preventDefault(), N.stopPropagation(), de(!1), N.dataTransfer.files && N.dataTransfer.files.length > 0) {
|
|
15354
|
-
const
|
|
15355
|
-
console.log("[MailComposer] Files dropped:",
|
|
15354
|
+
const ee = Array.from(N.dataTransfer.files);
|
|
15355
|
+
console.log("[MailComposer] Files dropped:", ee.map((ue) => ({ name: ue.name, size: ue.size, type: ue.type }))), Y((ue) => [...ue, ...ee]);
|
|
15356
15356
|
} else
|
|
15357
15357
|
console.log("[MailComposer] Drop event but no files:", N.dataTransfer.types);
|
|
15358
15358
|
}, le = (N) => N.type.startsWith("image/") ? "image" : N.type === "application/pdf" ? "picture_as_pdf" : N.type.includes("spreadsheet") || N.type.includes("excel") ? "table_chart" : N.type.includes("document") || N.type.includes("word") ? "description" : "attach_file", ge = (N) => {
|
|
15359
|
-
Y((
|
|
15359
|
+
Y((ee) => ee.filter((ue, $) => $ !== N));
|
|
15360
15360
|
}, Qe = (N) => N < 1024 ? `${N} B` : N < 1024 * 1024 ? `${(N / 1024).toFixed(1)} KB` : `${(N / (1024 * 1024)).toFixed(1)} MB`, Je = async () => {
|
|
15361
15361
|
if (!T.trim()) {
|
|
15362
15362
|
he("Recipient email is required");
|
|
@@ -15380,12 +15380,12 @@ function q2({
|
|
|
15380
15380
|
size: $.size
|
|
15381
15381
|
};
|
|
15382
15382
|
})
|
|
15383
|
-
),
|
|
15383
|
+
), ee = Q.replace(/>\n+</g, "><").replace(/<p class="[^"]*"><\/p>/g, "<br>").trim(), ue = {
|
|
15384
15384
|
to: T.trim(),
|
|
15385
15385
|
cc: F.trim() || void 0,
|
|
15386
15386
|
bcc: j.trim() || void 0,
|
|
15387
15387
|
subject: I.trim(),
|
|
15388
|
-
html:
|
|
15388
|
+
html: ee,
|
|
15389
15389
|
attachments: N,
|
|
15390
15390
|
inReplyTo: i == null ? void 0 : i.messageId
|
|
15391
15391
|
};
|
|
@@ -15414,14 +15414,14 @@ function q2({
|
|
|
15414
15414
|
color: S.textSecondary,
|
|
15415
15415
|
marginBottom: "4px",
|
|
15416
15416
|
textTransform: "uppercase"
|
|
15417
|
-
}, X = (N,
|
|
15417
|
+
}, X = (N, ee = !1) => ({
|
|
15418
15418
|
padding: "10px 20px",
|
|
15419
15419
|
fontSize: "14px",
|
|
15420
15420
|
fontWeight: 500,
|
|
15421
15421
|
border: "none",
|
|
15422
15422
|
borderRadius: "6px",
|
|
15423
|
-
cursor:
|
|
15424
|
-
opacity:
|
|
15423
|
+
cursor: ee ? "not-allowed" : "pointer",
|
|
15424
|
+
opacity: ee ? 0.6 : 1,
|
|
15425
15425
|
background: N ? S.buttonPrimary : S.buttonSecondary,
|
|
15426
15426
|
color: N ? "#ffffff" : S.text,
|
|
15427
15427
|
display: "flex",
|
|
@@ -15456,41 +15456,17 @@ function q2({
|
|
|
15456
15456
|
),
|
|
15457
15457
|
!b && /* @__PURE__ */ h.jsxs("div", { children: [
|
|
15458
15458
|
/* @__PURE__ */ h.jsx("label", { style: gt, children: "To" }),
|
|
15459
|
-
/* @__PURE__ */ h.
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
),
|
|
15471
|
-
M && /* @__PURE__ */ h.jsx(
|
|
15472
|
-
"button",
|
|
15473
|
-
{
|
|
15474
|
-
type: "button",
|
|
15475
|
-
onClick: async () => {
|
|
15476
|
-
const N = await M("to");
|
|
15477
|
-
N && B((Z) => Z ? `${Z}, ${N}` : N);
|
|
15478
|
-
},
|
|
15479
|
-
disabled: p || P,
|
|
15480
|
-
title: "Add from contacts",
|
|
15481
|
-
style: {
|
|
15482
|
-
padding: "8px 12px",
|
|
15483
|
-
border: `1px solid ${S.inputBorder}`,
|
|
15484
|
-
borderRadius: "6px",
|
|
15485
|
-
background: S.buttonSecondary,
|
|
15486
|
-
cursor: p || P ? "not-allowed" : "pointer",
|
|
15487
|
-
display: "flex",
|
|
15488
|
-
alignItems: "center"
|
|
15489
|
-
},
|
|
15490
|
-
children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: S.textSecondary }, children: "person_add" })
|
|
15491
|
-
}
|
|
15492
|
-
)
|
|
15493
|
-
] })
|
|
15459
|
+
/* @__PURE__ */ h.jsx(
|
|
15460
|
+
"input",
|
|
15461
|
+
{
|
|
15462
|
+
type: "email",
|
|
15463
|
+
value: T,
|
|
15464
|
+
onChange: (N) => B(N.target.value),
|
|
15465
|
+
placeholder: "recipient@example.com",
|
|
15466
|
+
disabled: p || P,
|
|
15467
|
+
style: Ge
|
|
15468
|
+
}
|
|
15469
|
+
)
|
|
15494
15470
|
] }),
|
|
15495
15471
|
!me && /* @__PURE__ */ h.jsx(
|
|
15496
15472
|
"button",
|
|
@@ -15531,7 +15507,7 @@ function q2({
|
|
|
15531
15507
|
type: "button",
|
|
15532
15508
|
onClick: async () => {
|
|
15533
15509
|
const N = await M("cc");
|
|
15534
|
-
N && w((
|
|
15510
|
+
N && w((ee) => ee ? `${ee}, ${N}` : N);
|
|
15535
15511
|
},
|
|
15536
15512
|
disabled: p || P,
|
|
15537
15513
|
title: "Add from contacts",
|
|
@@ -15569,7 +15545,7 @@ function q2({
|
|
|
15569
15545
|
type: "button",
|
|
15570
15546
|
onClick: async () => {
|
|
15571
15547
|
const N = await M("bcc");
|
|
15572
|
-
N && R((
|
|
15548
|
+
N && R((ee) => ee ? `${ee}, ${N}` : N);
|
|
15573
15549
|
},
|
|
15574
15550
|
disabled: p || P,
|
|
15575
15551
|
title: "Add from contacts",
|
|
@@ -15796,7 +15772,7 @@ function q2({
|
|
|
15796
15772
|
]
|
|
15797
15773
|
}
|
|
15798
15774
|
),
|
|
15799
|
-
/* @__PURE__ */ h.jsx("div", { style: { flex: 1, overflowY: "auto", padding: "4px 0" }, children: U.length > 0 ? /* @__PURE__ */ h.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: U.map((N,
|
|
15775
|
+
/* @__PURE__ */ h.jsx("div", { style: { flex: 1, overflowY: "auto", padding: "4px 0" }, children: U.length > 0 ? /* @__PURE__ */ h.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: U.map((N, ee) => /* @__PURE__ */ h.jsxs(
|
|
15800
15776
|
"div",
|
|
15801
15777
|
{
|
|
15802
15778
|
style: {
|
|
@@ -15823,7 +15799,7 @@ function q2({
|
|
|
15823
15799
|
"button",
|
|
15824
15800
|
{
|
|
15825
15801
|
type: "button",
|
|
15826
|
-
onClick: () => ge(
|
|
15802
|
+
onClick: () => ge(ee),
|
|
15827
15803
|
disabled: p || P,
|
|
15828
15804
|
title: "Remove attachment",
|
|
15829
15805
|
style: {
|
|
@@ -15840,7 +15816,7 @@ function q2({
|
|
|
15840
15816
|
)
|
|
15841
15817
|
]
|
|
15842
15818
|
},
|
|
15843
|
-
`${N.name}-${
|
|
15819
|
+
`${N.name}-${ee}`
|
|
15844
15820
|
)) }) : /* @__PURE__ */ h.jsx("div", { style: {
|
|
15845
15821
|
textAlign: "center",
|
|
15846
15822
|
padding: "40px 20px",
|
|
@@ -17294,17 +17270,17 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17294
17270
|
j.current = E;
|
|
17295
17271
|
}, [E]);
|
|
17296
17272
|
const R = be(null), I = be(null), W = be(null), Q = be(null), ne = be(null), U = be([]), Y = be(null), P = be(null), oe = be(null), fe = be(null), he = be(!1), me = be([]), we = be(null), pe = be(null), J = be([]), _e = be([]), ie = be("insert"), Ce = be(!1), Ee = be(0), Se = be(0), Oe = be(0), Le = (X) => {
|
|
17297
|
-
const N = Math.floor(X / 60),
|
|
17298
|
-
return `${N.toString().padStart(2, "0")}:${
|
|
17273
|
+
const N = Math.floor(X / 60), ee = Math.floor(X % 60);
|
|
17274
|
+
return `${N.toString().padStart(2, "0")}:${ee.toString().padStart(2, "0")}`;
|
|
17299
17275
|
}, Ve = async (X) => {
|
|
17300
|
-
const N = await X.arrayBuffer(),
|
|
17301
|
-
return await
|
|
17276
|
+
const N = await X.arrayBuffer(), ee = new AudioContext(), ue = await ee.decodeAudioData(N);
|
|
17277
|
+
return await ee.close(), ue;
|
|
17302
17278
|
}, V = (X) => {
|
|
17303
|
-
const N = X.numberOfChannels,
|
|
17279
|
+
const N = X.numberOfChannels, ee = X.sampleRate, ue = 1, $ = 16, ke = $ / 8, xe = N * ke, De = ee * xe, Ie = X.length * xe, Ke = new ArrayBuffer(44 + Ie), Ne = new DataView(Ke), Be = (Xe, We) => {
|
|
17304
17280
|
for (let mt = 0; mt < We.length; mt++)
|
|
17305
17281
|
Ne.setUint8(Xe + mt, We.charCodeAt(mt));
|
|
17306
17282
|
};
|
|
17307
|
-
Be(0, "RIFF"), Ne.setUint32(4, 36 + Ie, !0), Be(8, "WAVE"), Be(12, "fmt "), Ne.setUint32(16, 16, !0), Ne.setUint16(20, ue, !0), Ne.setUint16(22, N, !0), Ne.setUint32(24,
|
|
17283
|
+
Be(0, "RIFF"), Ne.setUint32(4, 36 + Ie, !0), Be(8, "WAVE"), Be(12, "fmt "), Ne.setUint32(16, 16, !0), Ne.setUint16(20, ue, !0), Ne.setUint16(22, N, !0), Ne.setUint32(24, ee, !0), Ne.setUint32(28, De, !0), Ne.setUint16(32, xe, !0), Ne.setUint16(34, $, !0), Be(36, "data"), Ne.setUint32(40, Ie, !0);
|
|
17308
17284
|
const it = [];
|
|
17309
17285
|
for (let Xe = 0; Xe < N; Xe++)
|
|
17310
17286
|
it.push(X.getChannelData(Xe));
|
|
@@ -17315,8 +17291,8 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17315
17291
|
Ne.setInt16(ut, yt, !0), ut += 2;
|
|
17316
17292
|
}
|
|
17317
17293
|
return new Blob([Ke], { type: "audio/wav" });
|
|
17318
|
-
}, O = async (X, N,
|
|
17319
|
-
const $ = new AudioContext(), ke = X.sampleRate, xe = Math.max(X.numberOfChannels, N.numberOfChannels), De = Math.min(
|
|
17294
|
+
}, O = async (X, N, ee, ue) => {
|
|
17295
|
+
const $ = new AudioContext(), ke = X.sampleRate, xe = Math.max(X.numberOfChannels, N.numberOfChannels), De = Math.min(ee, X.length), Ie = Math.max(0, X.length - ee), Ke = ue === "insert" ? De + N.length + Ie : De + N.length, Ne = $.createBuffer(xe, Ke, ke);
|
|
17320
17296
|
for (let Be = 0; Be < xe; Be++) {
|
|
17321
17297
|
const it = Ne.getChannelData(Be), ut = Be < X.numberOfChannels ? X.getChannelData(Be) : X.getChannelData(0);
|
|
17322
17298
|
for (let We = 0; We < De; We++)
|
|
@@ -17326,7 +17302,7 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17326
17302
|
it[De + We] = Xe[We];
|
|
17327
17303
|
if (ue === "insert")
|
|
17328
17304
|
for (let We = 0; We < Ie; We++)
|
|
17329
|
-
it[De + N.length + We] = ut[
|
|
17305
|
+
it[De + N.length + We] = ut[ee + We];
|
|
17330
17306
|
}
|
|
17331
17307
|
return await $.close(), Ne;
|
|
17332
17308
|
}, Ue = re(() => {
|
|
@@ -17334,7 +17310,7 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17334
17310
|
if (!X) return;
|
|
17335
17311
|
const N = X.getContext("2d");
|
|
17336
17312
|
if (!N) return;
|
|
17337
|
-
const
|
|
17313
|
+
const ee = X.getBoundingClientRect(), ue = ee.width, $ = ee.height, ke = me.current, xe = f || c || 1, De = a === "recording" ? c : y;
|
|
17338
17314
|
N.fillStyle = "#2d3b35", N.fillRect(0, 0, ue, $);
|
|
17339
17315
|
const Ie = 8, Ke = "rgba(0, 0, 0, 0.4)", Ne = N.createLinearGradient(0, 0, 0, Ie);
|
|
17340
17316
|
Ne.addColorStop(0, Ke), Ne.addColorStop(1, "transparent"), N.fillStyle = Ne, N.fillRect(0, 0, ue, Ie);
|
|
@@ -17366,11 +17342,11 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17366
17342
|
}, [a, y, c, f]), Ye = () => {
|
|
17367
17343
|
const X = ne.current;
|
|
17368
17344
|
if (!X || !he.current) return;
|
|
17369
|
-
const N = X.frequencyBinCount,
|
|
17370
|
-
X.getByteTimeDomainData(
|
|
17345
|
+
const N = X.frequencyBinCount, ee = new Uint8Array(N);
|
|
17346
|
+
X.getByteTimeDomainData(ee);
|
|
17371
17347
|
let ue = 0;
|
|
17372
17348
|
for (let xe = 0; xe < N; xe++) {
|
|
17373
|
-
const De = (
|
|
17349
|
+
const De = (ee[xe] - 128) / 128;
|
|
17374
17350
|
ue += De * De;
|
|
17375
17351
|
}
|
|
17376
17352
|
const $ = Math.sqrt(ue / N), ke = Math.min(1, $ * 3);
|
|
@@ -17382,8 +17358,8 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17382
17358
|
W.current = X;
|
|
17383
17359
|
const N = new AudioContext();
|
|
17384
17360
|
Q.current = N;
|
|
17385
|
-
const
|
|
17386
|
-
|
|
17361
|
+
const ee = N.createAnalyser();
|
|
17362
|
+
ee.fftSize = 2048, ne.current = ee, N.createMediaStreamSource(X).connect(ee);
|
|
17387
17363
|
const $ = new MediaRecorder(X);
|
|
17388
17364
|
I.current = $, U.current = [], $.ondataavailable = (ke) => {
|
|
17389
17365
|
ke.data.size > 0 && U.current.push(ke.data);
|
|
@@ -17438,11 +17414,11 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17438
17414
|
}, de = (X) => {
|
|
17439
17415
|
const N = R.current;
|
|
17440
17416
|
if (!N) return;
|
|
17441
|
-
const
|
|
17442
|
-
if (
|
|
17417
|
+
const ee = f || c;
|
|
17418
|
+
if (ee <= 0) return;
|
|
17443
17419
|
const ue = me.current;
|
|
17444
17420
|
if (ue.length === 0) return;
|
|
17445
|
-
const $ = N.getBoundingClientRect(), ke = X - Se.current, xe = 4, De = $.width / N.width, Ie = ue.length /
|
|
17421
|
+
const $ = N.getBoundingClientRect(), ke = X - Se.current, xe = 4, De = $.width / N.width, Ie = ue.length / ee * xe, Ke = -ke / (Ie * De), Ne = Oe.current + Ke, Be = Math.max(0, Math.min(Ne, ee));
|
|
17446
17422
|
oe.current && (oe.current.currentTime = Be), b(Be);
|
|
17447
17423
|
}, Ae = () => {
|
|
17448
17424
|
oe.current && (oe.current.currentTime = 0), b(0);
|
|
@@ -17462,7 +17438,7 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17462
17438
|
oe.current && (oe.current.pause(), m(!1)), ie.current = X, pe.current = await Ve(fe.current);
|
|
17463
17439
|
const N = f || c;
|
|
17464
17440
|
we.current = y;
|
|
17465
|
-
const
|
|
17441
|
+
const ee = N > 0 ? y / N : 0, ue = Math.floor(ee * me.current.length);
|
|
17466
17442
|
J.current = me.current.slice(0, ue), _e.current = me.current.slice(ue), me.current = [...J.current], H();
|
|
17467
17443
|
} catch {
|
|
17468
17444
|
v("Failed to prepare recording. Please try again.");
|
|
@@ -17478,10 +17454,10 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17478
17454
|
const X = R.current;
|
|
17479
17455
|
if (!X) return;
|
|
17480
17456
|
const N = () => {
|
|
17481
|
-
const
|
|
17482
|
-
X.width = ue.width *
|
|
17457
|
+
const ee = window.devicePixelRatio || 1, ue = X.getBoundingClientRect();
|
|
17458
|
+
X.width = ue.width * ee, X.height = ue.height * ee;
|
|
17483
17459
|
const $ = X.getContext("2d");
|
|
17484
|
-
$ && $.scale(
|
|
17460
|
+
$ && $.scale(ee, ee);
|
|
17485
17461
|
};
|
|
17486
17462
|
return N(), window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
|
|
17487
17463
|
}, []), ve(() => {
|
|
@@ -17490,7 +17466,7 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17490
17466
|
if (!X) return;
|
|
17491
17467
|
const N = X.getContext("2d");
|
|
17492
17468
|
if (!N) return;
|
|
17493
|
-
const
|
|
17469
|
+
const ee = X.getBoundingClientRect(), ue = ee.width, $ = ee.height;
|
|
17494
17470
|
N.fillStyle = "#2d3b35", N.fillRect(0, 0, ue, $);
|
|
17495
17471
|
const ke = 8, xe = "rgba(0, 0, 0, 0.4)", De = N.createLinearGradient(0, 0, 0, ke);
|
|
17496
17472
|
De.addColorStop(0, xe), De.addColorStop(1, "transparent"), N.fillStyle = De, N.fillRect(0, 0, ue, ke);
|
|
@@ -17513,12 +17489,12 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17513
17489
|
w.current = !0;
|
|
17514
17490
|
const N = S[0];
|
|
17515
17491
|
try {
|
|
17516
|
-
const
|
|
17517
|
-
|
|
17518
|
-
} catch (
|
|
17519
|
-
console.error("Transcription failed:",
|
|
17492
|
+
const ee = await t(N);
|
|
17493
|
+
ee && n && n(ee);
|
|
17494
|
+
} catch (ee) {
|
|
17495
|
+
console.error("Transcription failed:", ee);
|
|
17520
17496
|
} finally {
|
|
17521
|
-
T((
|
|
17497
|
+
T((ee) => ee.slice(1)), F((ee) => ({ ...ee, completed: ee.completed + 1 })), w.current = !1;
|
|
17522
17498
|
}
|
|
17523
17499
|
})();
|
|
17524
17500
|
}, [S, t, n]), ve(() => () => {
|
|
@@ -17527,13 +17503,13 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17527
17503
|
if (a === "editing" && g) {
|
|
17528
17504
|
let X;
|
|
17529
17505
|
const N = () => {
|
|
17530
|
-
const
|
|
17531
|
-
if (
|
|
17506
|
+
const ee = oe.current;
|
|
17507
|
+
if (ee && g) {
|
|
17532
17508
|
const ue = R.current;
|
|
17533
17509
|
if (ue) {
|
|
17534
17510
|
const $ = ue.getContext("2d");
|
|
17535
17511
|
if ($) {
|
|
17536
|
-
const ke = ue.getBoundingClientRect(), xe = ke.width, De = ke.height, Ie = me.current, Ke = f || c || 1, Ne =
|
|
17512
|
+
const ke = ue.getBoundingClientRect(), xe = ke.width, De = ke.height, Ie = me.current, Ke = f || c || 1, Ne = ee.currentTime;
|
|
17537
17513
|
$.fillStyle = "#2d3b35", $.fillRect(0, 0, xe, De);
|
|
17538
17514
|
const Be = 8, it = "rgba(0, 0, 0, 0.4)", ut = $.createLinearGradient(0, 0, 0, Be);
|
|
17539
17515
|
ut.addColorStop(0, it), ut.addColorStop(1, "transparent"), $.fillStyle = ut, $.fillRect(0, 0, xe, Be);
|
|
@@ -17602,10 +17578,10 @@ function Dg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
|
|
|
17602
17578
|
Ce.current = !0, Se.current = X.clientX, Oe.current = y;
|
|
17603
17579
|
const N = (ue) => {
|
|
17604
17580
|
Ce.current && de(ue.clientX);
|
|
17605
|
-
},
|
|
17606
|
-
Ce.current = !1, window.removeEventListener("mousemove", N), window.removeEventListener("mouseup",
|
|
17581
|
+
}, ee = () => {
|
|
17582
|
+
Ce.current = !1, window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", ee);
|
|
17607
17583
|
};
|
|
17608
|
-
window.addEventListener("mousemove", N), window.addEventListener("mouseup",
|
|
17584
|
+
window.addEventListener("mousemove", N), window.addEventListener("mouseup", ee);
|
|
17609
17585
|
}
|
|
17610
17586
|
}
|
|
17611
17587
|
}
|