commspliant-html-editor 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/commspliant-html-editor.css +1 -1
- package/dist/components/MultiPageVisualSurface.d.ts.map +1 -1
- package/dist/components/RulerVisualFrame.d.ts.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.js +749 -751
- package/dist/modules/help/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -295,7 +295,7 @@ function Aw({ className: e }) {
|
|
|
295
295
|
}
|
|
296
296
|
);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Gp({ className: e }) {
|
|
299
299
|
return /* @__PURE__ */ a(
|
|
300
300
|
"svg",
|
|
301
301
|
{
|
|
@@ -409,7 +409,7 @@ function Rw({ className: e }) {
|
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function jp({ className: e }) {
|
|
413
413
|
return /* @__PURE__ */ C(
|
|
414
414
|
"svg",
|
|
415
415
|
{
|
|
@@ -976,7 +976,7 @@ function Ww({ className: e }) {
|
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Gw({ className: e }) {
|
|
980
980
|
return /* @__PURE__ */ C(
|
|
981
981
|
"svg",
|
|
982
982
|
{
|
|
@@ -1000,7 +1000,7 @@ function jw({ className: e }) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
);
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function jw({ className: e }) {
|
|
1004
1004
|
return /* @__PURE__ */ C(
|
|
1005
1005
|
"svg",
|
|
1006
1006
|
{
|
|
@@ -3409,7 +3409,7 @@ function BC(e) {
|
|
|
3409
3409
|
return e.replace(/"/g, '"').replace(/</g, "<").replace(/&/g, "&");
|
|
3410
3410
|
}
|
|
3411
3411
|
const FC = new RegExp(`<link\\b[^>]*\\b${zl}\\b[^>]*>`, "gi");
|
|
3412
|
-
function
|
|
3412
|
+
function ve(e) {
|
|
3413
3413
|
if (!e.includes(zl))
|
|
3414
3414
|
return { hrefs: [], body: e };
|
|
3415
3415
|
const t = [], n = e.replace(FC, (r) => {
|
|
@@ -3474,11 +3474,11 @@ function KC(e, t) {
|
|
|
3474
3474
|
return Ac(e, t, c), c;
|
|
3475
3475
|
}
|
|
3476
3476
|
function Ja(e, t, n = [], r) {
|
|
3477
|
-
const o =
|
|
3477
|
+
const o = ve(t).hrefs, i = n.filter((l) => l.css ? r != null && r.liveRoot ? OC(r.liveRoot, l.family) : KC(e, l.family) : !1).map((l) => l.css ?? "");
|
|
3478
3478
|
return Ol([...o, ...i]);
|
|
3479
3479
|
}
|
|
3480
3480
|
function wf(e, t = []) {
|
|
3481
|
-
const n =
|
|
3481
|
+
const n = ve(e).hrefs, r = t.map((o) => o.css ?? "");
|
|
3482
3482
|
return Ol([...n, ...r]);
|
|
3483
3483
|
}
|
|
3484
3484
|
function $C(e) {
|
|
@@ -3557,7 +3557,7 @@ function VC(e, t) {
|
|
|
3557
3557
|
function WC(e) {
|
|
3558
3558
|
return e != null;
|
|
3559
3559
|
}
|
|
3560
|
-
function
|
|
3560
|
+
function GC(e) {
|
|
3561
3561
|
const t = e.startContainer, n = e.startOffset;
|
|
3562
3562
|
if (t.nodeType !== Node.TEXT_NODE) return;
|
|
3563
3563
|
const r = t;
|
|
@@ -3565,7 +3565,7 @@ function jC(e) {
|
|
|
3565
3565
|
const o = r.splitText(n);
|
|
3566
3566
|
e.setStart(o, 0), e.collapse(!0);
|
|
3567
3567
|
}
|
|
3568
|
-
function
|
|
3568
|
+
function jC(e) {
|
|
3569
3569
|
var r, o, i;
|
|
3570
3570
|
let t = e.startContainer.nodeType === Node.TEXT_NODE && e.startOffset === 0 ? e.startContainer : e.startContainer.childNodes[e.startOffset] ?? e.startContainer.lastChild ?? e.startContainer;
|
|
3571
3571
|
if (e.startContainer.nodeType === Node.TEXT_NODE && e.startOffset > 0) {
|
|
@@ -3599,8 +3599,8 @@ function Jc(e, t) {
|
|
|
3599
3599
|
return t;
|
|
3600
3600
|
}
|
|
3601
3601
|
function qC(e, t) {
|
|
3602
|
-
|
|
3603
|
-
const n =
|
|
3602
|
+
GC(t);
|
|
3603
|
+
const n = jC(t);
|
|
3604
3604
|
return Jc(e, n);
|
|
3605
3605
|
}
|
|
3606
3606
|
function ZC(e, t, n) {
|
|
@@ -3625,12 +3625,12 @@ function Kl(e) {
|
|
|
3625
3625
|
function pt(e) {
|
|
3626
3626
|
return Math.round(e * 100) / 100;
|
|
3627
3627
|
}
|
|
3628
|
-
function
|
|
3628
|
+
function ke(e) {
|
|
3629
3629
|
const t = pt(e);
|
|
3630
3630
|
return Number.isInteger(t), String(t);
|
|
3631
3631
|
}
|
|
3632
3632
|
function $u(e, t) {
|
|
3633
|
-
return `${
|
|
3633
|
+
return `${ke(e)}${t}`;
|
|
3634
3634
|
}
|
|
3635
3635
|
function Uu(e) {
|
|
3636
3636
|
const t = e.trim();
|
|
@@ -3693,7 +3693,7 @@ function gg(e, t, n, r, o) {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
const Vu = "pt", nv = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(pt|px|em|rem|%)$/i, rv = /^[+-]?0(?:\.0+)?$/;
|
|
3695
3695
|
function ze(e) {
|
|
3696
|
-
return `${
|
|
3696
|
+
return `${ke(e.value)}${e.unit}`;
|
|
3697
3697
|
}
|
|
3698
3698
|
function It(e) {
|
|
3699
3699
|
const t = e.trim();
|
|
@@ -3961,14 +3961,14 @@ const Wu = /* @__PURE__ */ new Set([
|
|
|
3961
3961
|
"div",
|
|
3962
3962
|
"li",
|
|
3963
3963
|
"blockquote"
|
|
3964
|
-
]), yg = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tr", "td", "th"]),
|
|
3964
|
+
]), yg = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tr", "td", "th"]), Gu = /* @__PURE__ */ new Set([...yg, "ul", "ol", "li", "pre", "hr"]);
|
|
3965
3965
|
function Ke(e) {
|
|
3966
3966
|
return e.tagName.toLowerCase();
|
|
3967
3967
|
}
|
|
3968
3968
|
function $i(e) {
|
|
3969
3969
|
return e.nodeType === Node.TEXT_NODE ? e.parentElement : e instanceof Element ? e : e.parentElement;
|
|
3970
3970
|
}
|
|
3971
|
-
function
|
|
3971
|
+
function ju(e) {
|
|
3972
3972
|
return e instanceof HTMLElement && (Ke(e) === "ul" || Ke(e) === "ol");
|
|
3973
3973
|
}
|
|
3974
3974
|
function an(e) {
|
|
@@ -4057,12 +4057,12 @@ function Xn(e) {
|
|
|
4057
4057
|
function eu(e) {
|
|
4058
4058
|
if (e.nodeType === Node.TEXT_NODE || e.nodeType === Node.COMMENT_NODE || !(e instanceof Element)) return !0;
|
|
4059
4059
|
const t = Ke(e);
|
|
4060
|
-
return Wu.has(t) ||
|
|
4060
|
+
return Wu.has(t) || Gu.has(t) ? !1 : Mn(e) || t === "br" || t === "a" || t === "img" || t === "span";
|
|
4061
4061
|
}
|
|
4062
4062
|
function mv(e, t) {
|
|
4063
4063
|
let n = $i(t);
|
|
4064
4064
|
for (; n && n !== e; ) {
|
|
4065
|
-
if (
|
|
4065
|
+
if (Gu.has(Ke(n))) return !0;
|
|
4066
4066
|
n = n.parentElement;
|
|
4067
4067
|
}
|
|
4068
4068
|
return !1;
|
|
@@ -4102,7 +4102,7 @@ function hv(e, t) {
|
|
|
4102
4102
|
return l.appendChild(document.createElement("br")), n.appendChild(l), l;
|
|
4103
4103
|
}
|
|
4104
4104
|
const r = gv(n, e, t);
|
|
4105
|
-
if (!r || r instanceof HTMLElement && _t(r) || r instanceof Element &&
|
|
4105
|
+
if (!r || r instanceof HTMLElement && _t(r) || r instanceof Element && Gu.has(Ke(r)) || r instanceof HTMLElement && Wu.has(Ke(r)) || !eu(r)) return null;
|
|
4106
4106
|
const o = pv(n, r), i = document.createElement("p");
|
|
4107
4107
|
n.insertBefore(i, o[0]);
|
|
4108
4108
|
for (const l of o) i.appendChild(l);
|
|
@@ -4118,7 +4118,7 @@ function Qr(e) {
|
|
|
4118
4118
|
}
|
|
4119
4119
|
function Ro(e) {
|
|
4120
4120
|
const t = e.parentElement;
|
|
4121
|
-
return t &&
|
|
4121
|
+
return t && ju(t) ? t : null;
|
|
4122
4122
|
}
|
|
4123
4123
|
function wg(e) {
|
|
4124
4124
|
if (e.length === 0) return [];
|
|
@@ -4492,7 +4492,7 @@ function _g(e, t) {
|
|
|
4492
4492
|
return e === t ? !0 : !e || !t ? !1 : on(e.offsetX, t.offsetX) && on(e.offsetY, t.offsetY) && on(e.blur, t.blur) && on(e.spread, t.spread) && e.color === t.color && e.inset === t.inset;
|
|
4493
4493
|
}
|
|
4494
4494
|
function Fv(e) {
|
|
4495
|
-
return e.kind === "normal" ? "normal" : e.kind === "number" ?
|
|
4495
|
+
return e.kind === "normal" ? "normal" : e.kind === "number" ? ke(e.value) : ze({ value: e.value, unit: e.unit });
|
|
4496
4496
|
}
|
|
4497
4497
|
function Hv(e) {
|
|
4498
4498
|
const t = e.trim();
|
|
@@ -4514,7 +4514,7 @@ function Ng(e) {
|
|
|
4514
4514
|
return br(e / 100);
|
|
4515
4515
|
}
|
|
4516
4516
|
function Mg(e) {
|
|
4517
|
-
return
|
|
4517
|
+
return ke(br(e));
|
|
4518
4518
|
}
|
|
4519
4519
|
function zv(e) {
|
|
4520
4520
|
const t = e.trim();
|
|
@@ -4641,7 +4641,7 @@ function Eg(e) {
|
|
|
4641
4641
|
const t = Wv(e.style.borderStyle || e.style.borderTopStyle), n = Co(e, "border-width") ?? Co(e, "border-top-width"), r = e.style.borderColor || e.style.borderTopColor, o = r ? Ye(r) : null;
|
|
4642
4642
|
return { style: t, width: n, color: o };
|
|
4643
4643
|
}
|
|
4644
|
-
function
|
|
4644
|
+
function Gv(e, t) {
|
|
4645
4645
|
const n = Eg(e), r = t.style === "none" ? { style: "none", width: null, color: null } : {
|
|
4646
4646
|
style: t.style,
|
|
4647
4647
|
width: t.width ? Ar(t.width) : null,
|
|
@@ -4655,7 +4655,7 @@ function Lg(e) {
|
|
|
4655
4655
|
const n = t.split(/\s+/)[0];
|
|
4656
4656
|
return It(n);
|
|
4657
4657
|
}
|
|
4658
|
-
function
|
|
4658
|
+
function jv(e, t) {
|
|
4659
4659
|
const n = t ? Ar(t) : null, r = Lg(e);
|
|
4660
4660
|
return on(r, n) ? !1 : (n ? e.style.borderRadius = ze(n) : e.style.removeProperty("border-radius"), !0);
|
|
4661
4661
|
}
|
|
@@ -4709,7 +4709,7 @@ function Fo(e) {
|
|
|
4709
4709
|
}
|
|
4710
4710
|
function Ho(e, t) {
|
|
4711
4711
|
let n = !1;
|
|
4712
|
-
return !t.marginMixed && xf(e, "margin", t.margin, !1) && (n = !0), !t.paddingMixed && xf(e, "padding", t.padding, !0) && (n = !0), !t.lineHeightMixed && Zv(e, t.lineHeight) && (n = !0), !t.borderMixed &&
|
|
4712
|
+
return !t.marginMixed && xf(e, "margin", t.margin, !1) && (n = !0), !t.paddingMixed && xf(e, "padding", t.padding, !0) && (n = !0), !t.lineHeightMixed && Zv(e, t.lineHeight) && (n = !0), !t.borderMixed && Gv(e, t.border) && (n = !0), !t.radiusMixed && jv(e, t.borderRadius) && (n = !0), !t.shadowMixed && qv(e, t.boxShadow) && (n = !0), !t.backgroundMixed && Yv(e, t.backgroundColor) && (n = !0), !t.opacityMixed && Xv(e, t.opacity) && (n = !0), !t.breakInsideMixed && _v(e, t.breakInside) && (n = !0), !t.breakAfterMixed && Nv(e, t.breakAfter) && (n = !0), !t.breakBeforeMixed && Mv(e, t.breakBefore) && (n = !0), n && Ht(e), n;
|
|
4713
4713
|
}
|
|
4714
4714
|
function Jv(e) {
|
|
4715
4715
|
const t = eo(), n = Xn(e);
|
|
@@ -4865,7 +4865,7 @@ function mr() {
|
|
|
4865
4865
|
function ed(e) {
|
|
4866
4866
|
return new DOMParser().parseFromString(`<body>${e}</body>`, "text/html");
|
|
4867
4867
|
}
|
|
4868
|
-
function
|
|
4868
|
+
function Gg(e) {
|
|
4869
4869
|
return e.body.innerHTML.replace(/\s*data-page=""/g, " data-page");
|
|
4870
4870
|
}
|
|
4871
4871
|
function Li(e) {
|
|
@@ -4963,18 +4963,18 @@ function bn(e) {
|
|
|
4963
4963
|
const t = ed(e);
|
|
4964
4964
|
for (const n of t.querySelectorAll(`style[${Ei}]`))
|
|
4965
4965
|
n.remove();
|
|
4966
|
-
return
|
|
4966
|
+
return Gg(t);
|
|
4967
4967
|
}
|
|
4968
4968
|
function s1(e, t) {
|
|
4969
4969
|
const n = ed(e);
|
|
4970
4970
|
let r = n.querySelector(`style[${Ei}]`);
|
|
4971
|
-
return r || (r = n.createElement("style"), r.setAttribute(Ei, ""), n.body.insertBefore(r, n.body.firstChild)), r.textContent = t,
|
|
4971
|
+
return r || (r = n.createElement("style"), r.setAttribute(Ei, ""), n.body.insertBefore(r, n.body.firstChild)), r.textContent = t, Gg(n);
|
|
4972
4972
|
}
|
|
4973
4973
|
function yl(e, t) {
|
|
4974
4974
|
const n = l1(t);
|
|
4975
|
-
return n ? s1(e, n) :
|
|
4975
|
+
return n ? s1(e, n) : jg(e);
|
|
4976
4976
|
}
|
|
4977
|
-
function
|
|
4977
|
+
function jg(e) {
|
|
4978
4978
|
return bn(e);
|
|
4979
4979
|
}
|
|
4980
4980
|
function qg(e) {
|
|
@@ -5320,14 +5320,14 @@ function x1(e, t, n) {
|
|
|
5320
5320
|
const r = (t == null ? void 0 : t.style.getPropertyValue(n).trim()) ?? "";
|
|
5321
5321
|
r ? e.style.setProperty(n, r) : e.style.removeProperty(n);
|
|
5322
5322
|
}
|
|
5323
|
-
function
|
|
5323
|
+
function Gl(e) {
|
|
5324
5324
|
const t = St(e);
|
|
5325
5325
|
x1(e, t, "background-color");
|
|
5326
5326
|
for (const n of R1)
|
|
5327
5327
|
e.style.removeProperty(n);
|
|
5328
5328
|
}
|
|
5329
5329
|
const au = "<!-- wysiwyg-page-separator -->", Yr = "data-page-surface";
|
|
5330
|
-
function
|
|
5330
|
+
function Gr(e) {
|
|
5331
5331
|
const t = e.trim();
|
|
5332
5332
|
return t ? t.includes(au) ? e.split(au).map((n) => n.trim()) : [e] : [""];
|
|
5333
5333
|
}
|
|
@@ -5398,7 +5398,7 @@ function If(e) {
|
|
|
5398
5398
|
}
|
|
5399
5399
|
return null;
|
|
5400
5400
|
}
|
|
5401
|
-
const
|
|
5401
|
+
const Gt = "data-wysiwyg-img-id", su = "data-page-bg", _1 = /^data:image\/(?:jpeg|jpg|png|gif|webp|bmp|avif)(?:;charset=[^;,]+)?;base64,/i, cu = /background-image:\s*url\(\s*(["']?)(.+?)\1\s*\)/i;
|
|
5402
5402
|
function _f(e) {
|
|
5403
5403
|
return new DOMParser().parseFromString(`<body>${e}</body>`, "text/html");
|
|
5404
5404
|
}
|
|
@@ -5409,7 +5409,7 @@ function Nc(e) {
|
|
|
5409
5409
|
return _1.test(e.trim());
|
|
5410
5410
|
}
|
|
5411
5411
|
function Mf(e) {
|
|
5412
|
-
return e.includes("<img") || e.includes("IMG") || e.includes(su) || e.includes(
|
|
5412
|
+
return e.includes("<img") || e.includes("IMG") || e.includes(su) || e.includes(Gt);
|
|
5413
5413
|
}
|
|
5414
5414
|
function N1(e) {
|
|
5415
5415
|
var r;
|
|
@@ -5477,7 +5477,7 @@ function E1() {
|
|
|
5477
5477
|
function u(h, w) {
|
|
5478
5478
|
var y, A;
|
|
5479
5479
|
for (const P of h.querySelectorAll("img")) {
|
|
5480
|
-
const k = (y = P.getAttribute(
|
|
5480
|
+
const k = (y = P.getAttribute(Gt)) == null ? void 0 : y.trim(), S = ((A = P.getAttribute("src")) == null ? void 0 : A.trim()) ?? "";
|
|
5481
5481
|
if (w === "hydrate") {
|
|
5482
5482
|
const R = c(S, k);
|
|
5483
5483
|
if (!R) continue;
|
|
@@ -5491,14 +5491,14 @@ function E1() {
|
|
|
5491
5491
|
}
|
|
5492
5492
|
const N = l(S);
|
|
5493
5493
|
if (N) {
|
|
5494
|
-
P.setAttribute(
|
|
5494
|
+
P.setAttribute(Gt, N);
|
|
5495
5495
|
const R = o(N);
|
|
5496
5496
|
R && P.setAttribute("src", R);
|
|
5497
5497
|
continue;
|
|
5498
5498
|
}
|
|
5499
5499
|
if (!Nc(S)) continue;
|
|
5500
5500
|
const _ = n(S);
|
|
5501
|
-
P.setAttribute(
|
|
5501
|
+
P.setAttribute(Gt, _);
|
|
5502
5502
|
const I = o(_);
|
|
5503
5503
|
I && P.setAttribute("src", I);
|
|
5504
5504
|
}
|
|
@@ -5507,7 +5507,7 @@ function E1() {
|
|
|
5507
5507
|
var y;
|
|
5508
5508
|
for (const A of h.querySelectorAll(`[${su}]`)) {
|
|
5509
5509
|
if (!(A instanceof HTMLElement)) continue;
|
|
5510
|
-
const P = (y = A.getAttribute(
|
|
5510
|
+
const P = (y = A.getAttribute(Gt)) == null ? void 0 : y.trim(), k = A.getAttribute("style") ?? "", S = N1(k);
|
|
5511
5511
|
if (w === "hydrate") {
|
|
5512
5512
|
if (!S) continue;
|
|
5513
5513
|
const R = c(S, P);
|
|
@@ -5523,14 +5523,14 @@ function E1() {
|
|
|
5523
5523
|
}
|
|
5524
5524
|
const N = l(S);
|
|
5525
5525
|
if (N) {
|
|
5526
|
-
A.setAttribute(
|
|
5526
|
+
A.setAttribute(Gt, N);
|
|
5527
5527
|
const R = o(N);
|
|
5528
5528
|
R && A.setAttribute("style", tl(k, R));
|
|
5529
5529
|
continue;
|
|
5530
5530
|
}
|
|
5531
5531
|
if (!Nc(S)) continue;
|
|
5532
5532
|
const _ = n(S);
|
|
5533
|
-
A.setAttribute(
|
|
5533
|
+
A.setAttribute(Gt, _);
|
|
5534
5534
|
const I = o(_);
|
|
5535
5535
|
I && A.setAttribute("style", tl(k, I));
|
|
5536
5536
|
}
|
|
@@ -5547,9 +5547,9 @@ function E1() {
|
|
|
5547
5547
|
const y = _f(h);
|
|
5548
5548
|
m(y, "hydrate"), u(y, "hydrate");
|
|
5549
5549
|
for (const A of y.querySelectorAll("img"))
|
|
5550
|
-
A.removeAttribute(
|
|
5550
|
+
A.removeAttribute(Gt);
|
|
5551
5551
|
for (const A of y.querySelectorAll(`[${su}]`))
|
|
5552
|
-
A.removeAttribute(
|
|
5552
|
+
A.removeAttribute(Gt);
|
|
5553
5553
|
return Nf(y);
|
|
5554
5554
|
}
|
|
5555
5555
|
function b() {
|
|
@@ -5638,7 +5638,7 @@ const ch = 2 * 1024 * 1024, $1 = "image/jpeg,image/png,image/gif,image/webp,imag
|
|
|
5638
5638
|
"image/x-ms-bmp",
|
|
5639
5639
|
"image/avif"
|
|
5640
5640
|
]), V1 = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "bmp", "avif"]), uh = /^data:image\/(?:jpeg|jpg|png|gif|webp|bmp|avif)(?:;charset=[^;,]+)?;base64,/i, W1 = /^(javascript|vbscript|file|blob):/i;
|
|
5641
|
-
function
|
|
5641
|
+
function G1(e = {}) {
|
|
5642
5642
|
return {
|
|
5643
5643
|
src: "",
|
|
5644
5644
|
alt: "",
|
|
@@ -5658,11 +5658,11 @@ function Nn(e) {
|
|
|
5658
5658
|
}
|
|
5659
5659
|
return null;
|
|
5660
5660
|
}
|
|
5661
|
-
function
|
|
5661
|
+
function j1(e) {
|
|
5662
5662
|
return e.size > ch ? "tooLarge" : tk(e) ? null : "type";
|
|
5663
5663
|
}
|
|
5664
5664
|
function q1(e) {
|
|
5665
|
-
const t =
|
|
5665
|
+
const t = j1(e);
|
|
5666
5666
|
return t ? Promise.reject(new Error(t)) : Z1(e);
|
|
5667
5667
|
}
|
|
5668
5668
|
async function Z1(e) {
|
|
@@ -5694,7 +5694,7 @@ function X1(e) {
|
|
|
5694
5694
|
}
|
|
5695
5695
|
function J1(e, t, n) {
|
|
5696
5696
|
const r = dh(t, n);
|
|
5697
|
-
e.setAttribute("src", r.src.trim()), r.registryId ? e.setAttribute(
|
|
5697
|
+
e.setAttribute("src", r.src.trim()), r.registryId ? e.setAttribute(Gt, r.registryId) : e.removeAttribute(Gt);
|
|
5698
5698
|
const o = t.alt.trim(), i = t.title.trim();
|
|
5699
5699
|
o ? e.setAttribute("alt", o) : e.removeAttribute("alt"), i ? e.setAttribute("title", i) : e.removeAttribute("title"), e.style.maxWidth = "100%", e.style.height = "auto", Q1(e, t.css);
|
|
5700
5700
|
}
|
|
@@ -5717,7 +5717,7 @@ function dh(e, t) {
|
|
|
5717
5717
|
return o ? { ...e, src: o, registryId: r } : e;
|
|
5718
5718
|
}
|
|
5719
5719
|
function ek(e, t, n) {
|
|
5720
|
-
const r =
|
|
5720
|
+
const r = G1(t), o = n ? dh(r, n) : r;
|
|
5721
5721
|
if (o.registryId) {
|
|
5722
5722
|
const u = n == null ? void 0 : n.getDataUrl(o.registryId);
|
|
5723
5723
|
if (!u || Nn(u)) return !1;
|
|
@@ -5775,7 +5775,7 @@ function lk(e) {
|
|
|
5775
5775
|
return ik.has(e);
|
|
5776
5776
|
}
|
|
5777
5777
|
function Ur(e) {
|
|
5778
|
-
return `${
|
|
5778
|
+
return `${ke(e.value)}${e.unit}`;
|
|
5779
5779
|
}
|
|
5780
5780
|
function Cl(e) {
|
|
5781
5781
|
const t = e.trim();
|
|
@@ -5990,7 +5990,7 @@ function Sk(e) {
|
|
|
5990
5990
|
}
|
|
5991
5991
|
function Dk(e, t) {
|
|
5992
5992
|
const n = bh(e), r = t === null || t === 0 ? null : pt(t);
|
|
5993
|
-
return n === r ? !1 : r === null ? Sk(e.style.transform) ? (e.style.removeProperty("transform"), !0) : !1 : (e.style.transform = `rotate(${
|
|
5993
|
+
return n === r ? !1 : r === null ? Sk(e.style.transform) ? (e.style.removeProperty("transform"), !0) : !1 : (e.style.transform = `rotate(${ke(r)}deg)`, !0);
|
|
5994
5994
|
}
|
|
5995
5995
|
function Rk(e, t) {
|
|
5996
5996
|
const n = gk(t), r = e.getAttribute(cl) ?? "", o = e.getAttribute("onmouseover") ?? "";
|
|
@@ -6121,7 +6121,7 @@ function ud(e) {
|
|
|
6121
6121
|
let r = n.changed;
|
|
6122
6122
|
return vl(n.layer) && (r = !0), kl(n.layer) && (r = !0), Pl(e) && (r = !0), r;
|
|
6123
6123
|
}
|
|
6124
|
-
function
|
|
6124
|
+
function jl(e) {
|
|
6125
6125
|
const t = St(e);
|
|
6126
6126
|
if (!t) return !1;
|
|
6127
6127
|
let n = Wl(e);
|
|
@@ -6361,7 +6361,7 @@ body:has(> [data-page-bg]) > [data-page] {
|
|
|
6361
6361
|
border-top: 0 !important;
|
|
6362
6362
|
}
|
|
6363
6363
|
}
|
|
6364
|
-
`.trim(),
|
|
6364
|
+
`.trim(), Gk = `
|
|
6365
6365
|
body:has([data-page-bg]) {
|
|
6366
6366
|
padding: 0;
|
|
6367
6367
|
}
|
|
@@ -6386,7 +6386,7 @@ body:has([data-page-bg]) {
|
|
|
6386
6386
|
function Ah(e) {
|
|
6387
6387
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
6388
6388
|
}
|
|
6389
|
-
function
|
|
6389
|
+
function jk(e) {
|
|
6390
6390
|
return Ah(e).replace(/'/g, "'");
|
|
6391
6391
|
}
|
|
6392
6392
|
function Th(e) {
|
|
@@ -6404,13 +6404,13 @@ function Th(e) {
|
|
|
6404
6404
|
return r.join("") || n.body.innerHTML;
|
|
6405
6405
|
}
|
|
6406
6406
|
function qk(e, t = "Document") {
|
|
6407
|
-
const n =
|
|
6407
|
+
const n = Gr(e), r = n.map((h) => dd(h)), o = r.some((h) => h.hasBleed), i = [], l = [];
|
|
6408
6408
|
for (const h of r) {
|
|
6409
|
-
const w =
|
|
6409
|
+
const w = ve(h.html);
|
|
6410
6410
|
i.push(...w.hrefs), l.push(w.body);
|
|
6411
6411
|
}
|
|
6412
6412
|
const c = l.length <= 1 ? l[0] ?? "" : l.map((h, w) => `<div data-wysiwyg-print-page="" style="${w === l.length - 1 ? "display: block; break-inside: avoid; page-break-inside: avoid;" : "display: block; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid;"}">${h}</div>`).join(""), u = qg(n), m = o ? "@page { margin: 0 !important; }" : "", g = Sh(o), p = [u, m, g].filter(Boolean).join(`
|
|
6413
|
-
`), b = Array.from(new Set(i)).map((h) => `<link rel="stylesheet" href="${
|
|
6413
|
+
`), b = Array.from(new Set(i)).map((h) => `<link rel="stylesheet" href="${jk(h)}" />`).join(`
|
|
6414
6414
|
`);
|
|
6415
6415
|
return [
|
|
6416
6416
|
"<!DOCTYPE html>",
|
|
@@ -6430,10 +6430,10 @@ function qk(e, t = "Document") {
|
|
|
6430
6430
|
}
|
|
6431
6431
|
function Sh(e) {
|
|
6432
6432
|
return e ? `${Vf}
|
|
6433
|
-
${
|
|
6433
|
+
${Gk}` : Vf;
|
|
6434
6434
|
}
|
|
6435
6435
|
function mu(e, t, n = "") {
|
|
6436
|
-
const r = dd(t), { hrefs: o, body: i } =
|
|
6436
|
+
const r = dd(t), { hrefs: o, body: i } = ve(r.html), l = e.createElement("meta");
|
|
6437
6437
|
l.setAttribute("charset", "utf-8");
|
|
6438
6438
|
const c = e.createElement("title");
|
|
6439
6439
|
c.textContent = n;
|
|
@@ -6594,7 +6594,7 @@ function lP(e) {
|
|
|
6594
6594
|
if (!t) return;
|
|
6595
6595
|
const n = e.map(dd), r = n.some((g) => g.hasBleed), o = [], i = [];
|
|
6596
6596
|
for (const g of n) {
|
|
6597
|
-
const p =
|
|
6597
|
+
const p = ve(g.html);
|
|
6598
6598
|
o.push(...p.hrefs), i.push(p.body);
|
|
6599
6599
|
}
|
|
6600
6600
|
const l = i.map((g, p) => `<div data-wysiwyg-print-page="" style="${p === i.length - 1 ? "display: block; break-inside: avoid; page-break-inside: avoid;" : "display: block; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid;"}">${g}</div>`).join(""), c = qg(e), u = r ? "@page { margin: 0 !important; }" : "", m = [
|
|
@@ -6631,7 +6631,7 @@ function sP(e) {
|
|
|
6631
6631
|
},
|
|
6632
6632
|
print: () => {
|
|
6633
6633
|
if (e.isMultiPagesEnabled()) {
|
|
6634
|
-
lP(
|
|
6634
|
+
lP(Gr(e.getHtml()));
|
|
6635
6635
|
return;
|
|
6636
6636
|
}
|
|
6637
6637
|
aP(e.getHtml());
|
|
@@ -7283,7 +7283,7 @@ function Oh(e, t) {
|
|
|
7283
7283
|
}
|
|
7284
7284
|
return n;
|
|
7285
7285
|
}
|
|
7286
|
-
function
|
|
7286
|
+
function GP(e, t, n) {
|
|
7287
7287
|
const r = e[n] ?? t[n], o = { ...e, [n]: !r };
|
|
7288
7288
|
return o[n] === t[n] && delete o[n], o;
|
|
7289
7289
|
}
|
|
@@ -7377,7 +7377,7 @@ function Uh(e, t) {
|
|
|
7377
7377
|
wr(e).filter((n) => n !== "line-through")
|
|
7378
7378
|
);
|
|
7379
7379
|
}
|
|
7380
|
-
function
|
|
7380
|
+
function jP(e, t) {
|
|
7381
7381
|
if (t === "bold") {
|
|
7382
7382
|
e.style.fontWeight = "400";
|
|
7383
7383
|
return;
|
|
@@ -7522,7 +7522,7 @@ function QP(e, t, n) {
|
|
|
7522
7522
|
}
|
|
7523
7523
|
function e0(e, t, n) {
|
|
7524
7524
|
for (const r of ln)
|
|
7525
|
-
n[r] !== t[r] && (n[r] ? $h(e, r) :
|
|
7525
|
+
n[r] !== t[r] && (n[r] ? $h(e, r) : jP(e, r));
|
|
7526
7526
|
}
|
|
7527
7527
|
function t0(e, t, n, r, o, i, l) {
|
|
7528
7528
|
var k, S;
|
|
@@ -7540,7 +7540,7 @@ function t0(e, t, n, r, o, i, l) {
|
|
|
7540
7540
|
const P = document.createRange();
|
|
7541
7541
|
P.selectNodeContents(A), P.collapse(!1), c.removeAllRanges(), c.addRange(P);
|
|
7542
7542
|
}
|
|
7543
|
-
const
|
|
7543
|
+
const jr = ["p", "h1", "h2", "h3", "h4", "h5", "h6"], n0 = new Set(jr), Vh = /* @__PURE__ */ new Set([...jr, "div"]), Zl = /* @__PURE__ */ new Set([
|
|
7544
7544
|
"li",
|
|
7545
7545
|
"ul",
|
|
7546
7546
|
"ol",
|
|
@@ -7562,7 +7562,7 @@ function o0(e) {
|
|
|
7562
7562
|
function i0(e) {
|
|
7563
7563
|
return e instanceof Element && Zl.has(Ke(e));
|
|
7564
7564
|
}
|
|
7565
|
-
function
|
|
7565
|
+
function Gh(e) {
|
|
7566
7566
|
return e instanceof HTMLElement && !_t(e) && Vh.has(Ke(e));
|
|
7567
7567
|
}
|
|
7568
7568
|
function bu(e) {
|
|
@@ -7578,14 +7578,14 @@ function a0(e, t) {
|
|
|
7578
7578
|
}
|
|
7579
7579
|
return !1;
|
|
7580
7580
|
}
|
|
7581
|
-
function
|
|
7581
|
+
function jh(e, t) {
|
|
7582
7582
|
let n = $i(t);
|
|
7583
7583
|
for (; n && n !== e; ) {
|
|
7584
7584
|
if (lh(n, e)) {
|
|
7585
7585
|
n = n.parentElement;
|
|
7586
7586
|
continue;
|
|
7587
7587
|
}
|
|
7588
|
-
if (
|
|
7588
|
+
if (Gh(n)) return n;
|
|
7589
7589
|
if (Zl.has(Ke(n))) return null;
|
|
7590
7590
|
n = n.parentElement;
|
|
7591
7591
|
}
|
|
@@ -7594,7 +7594,7 @@ function Gh(e, t) {
|
|
|
7594
7594
|
function l0(e, t) {
|
|
7595
7595
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
7596
7596
|
for (const o of qu(t)) {
|
|
7597
|
-
const i =
|
|
7597
|
+
const i = jh(e, o);
|
|
7598
7598
|
i && !n.has(i) && (n.add(i), r.push(i));
|
|
7599
7599
|
}
|
|
7600
7600
|
return r;
|
|
@@ -7634,7 +7634,7 @@ function d0(e, t, n) {
|
|
|
7634
7634
|
return c.appendChild(document.createElement("br")), r.appendChild(c), !0;
|
|
7635
7635
|
}
|
|
7636
7636
|
const o = u0(r, e, t);
|
|
7637
|
-
if (!o || o instanceof HTMLElement && _t(o) || i0(o) ||
|
|
7637
|
+
if (!o || o instanceof HTMLElement && _t(o) || i0(o) || Gh(o) || !bu(o)) return !1;
|
|
7638
7638
|
const i = c0(r, o), l = document.createElement(n);
|
|
7639
7639
|
r.insertBefore(l, i[0]);
|
|
7640
7640
|
for (const c of i) l.appendChild(c);
|
|
@@ -7644,7 +7644,7 @@ function m0(e) {
|
|
|
7644
7644
|
const t = En(e);
|
|
7645
7645
|
if (!t) return r0();
|
|
7646
7646
|
const n = qu(t).map((o) => {
|
|
7647
|
-
const i =
|
|
7647
|
+
const i = jh(e, o);
|
|
7648
7648
|
return i ? o0(Ke(i)) : null;
|
|
7649
7649
|
}), r = n[0];
|
|
7650
7650
|
return n.every((o) => o === r) ? { tag: r ?? null, mixed: !1 } : { tag: null, mixed: !0 };
|
|
@@ -7676,7 +7676,7 @@ function qh(e) {
|
|
|
7676
7676
|
return n.every((o) => o === r) ? { type: r, mixed: !1 } : { type: null, mixed: !0 };
|
|
7677
7677
|
}
|
|
7678
7678
|
function p0(e, t, n) {
|
|
7679
|
-
const r = [...e.children].filter((o) =>
|
|
7679
|
+
const r = [...e.children].filter((o) => ju(o));
|
|
7680
7680
|
for (const o of r)
|
|
7681
7681
|
t.insertBefore(o, n);
|
|
7682
7682
|
}
|
|
@@ -7684,7 +7684,7 @@ function Zh(e) {
|
|
|
7684
7684
|
const t = Ro(e), n = document.createElement("p");
|
|
7685
7685
|
for (const m of [...e.attributes])
|
|
7686
7686
|
n.setAttribute(m.name, m.value);
|
|
7687
|
-
for (n.style.marginLeft = "", Ht(n); e.firstChild && !
|
|
7687
|
+
for (n.style.marginLeft = "", Ht(n); e.firstChild && !ju(e.firstChild); )
|
|
7688
7688
|
n.appendChild(e.firstChild);
|
|
7689
7689
|
const r = [];
|
|
7690
7690
|
let o = e.nextElementSibling;
|
|
@@ -7937,7 +7937,7 @@ function S0(e, t, n, r) {
|
|
|
7937
7937
|
}
|
|
7938
7938
|
return !0;
|
|
7939
7939
|
}
|
|
7940
|
-
const
|
|
7940
|
+
const Gf = 10, Po = 1, Ao = 50, D0 = "1px solid #000", R0 = "0.25em", x0 = /* @__PURE__ */ new Set(["td", "th"]);
|
|
7941
7941
|
function rb(e, t) {
|
|
7942
7942
|
return Number.isInteger(e) && Number.isInteger(t) && e >= Po && t >= Po && e <= Ao && t <= Ao;
|
|
7943
7943
|
}
|
|
@@ -8030,7 +8030,7 @@ function wu(e, t) {
|
|
|
8030
8030
|
const g = U0(u, o.colCount, c, i.originCol);
|
|
8031
8031
|
return zt(g || n), !0;
|
|
8032
8032
|
}
|
|
8033
|
-
function
|
|
8033
|
+
function jf(e, t) {
|
|
8034
8034
|
var m, g, p, b;
|
|
8035
8035
|
const n = Ln(e);
|
|
8036
8036
|
if (!n) return !1;
|
|
@@ -8070,7 +8070,7 @@ function M0(e) {
|
|
|
8070
8070
|
const u = o.originCol;
|
|
8071
8071
|
n.rows[i].remove();
|
|
8072
8072
|
const m = n.rows[Math.min(i, n.rows.length - 1)], g = Zt(n), p = (h = (b = g.slots[Math.min(i, g.rowCount - 1)]) == null ? void 0 : b[Math.min(u, Math.max(0, g.colCount - 1))]) == null ? void 0 : h.cell;
|
|
8073
|
-
return p ? zt(p) : m != null && m.cells[0] ? zt(m.cells[0]) :
|
|
8073
|
+
return p ? zt(p) : m != null && m.cells[0] ? zt(m.cells[0]) : j0(n), !0;
|
|
8074
8074
|
}
|
|
8075
8075
|
function E0(e) {
|
|
8076
8076
|
var m, g, p;
|
|
@@ -8246,9 +8246,9 @@ function W0(e, t) {
|
|
|
8246
8246
|
const n = t.parentElement;
|
|
8247
8247
|
if (!n || n === e) return;
|
|
8248
8248
|
const r = n.tagName.toLowerCase();
|
|
8249
|
-
r === "td" || r === "th" || (r === "p" || /^h[1-6]$/.test(r)) && ((o = n.parentNode) == null || o.insertBefore(t, n.nextSibling),
|
|
8249
|
+
r === "td" || r === "th" || (r === "p" || /^h[1-6]$/.test(r)) && ((o = n.parentNode) == null || o.insertBefore(t, n.nextSibling), G0(n) && n.remove());
|
|
8250
8250
|
}
|
|
8251
|
-
function
|
|
8251
|
+
function G0(e) {
|
|
8252
8252
|
var t;
|
|
8253
8253
|
return e.childNodes.length === 0 || e.childNodes.length === 1 && ((t = e.firstChild) == null ? void 0 : t.nodeName) === "BR" ? !0 : (e.textContent ?? "").trim().length === 0 && e.querySelector("img, table, ul, ol") === null;
|
|
8254
8254
|
}
|
|
@@ -8265,7 +8265,7 @@ function zt(e) {
|
|
|
8265
8265
|
const n = window.getSelection();
|
|
8266
8266
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
8267
8267
|
}
|
|
8268
|
-
function
|
|
8268
|
+
function j0(e) {
|
|
8269
8269
|
const t = document.createRange();
|
|
8270
8270
|
t.setStartAfter(e), t.collapse(!0);
|
|
8271
8271
|
const n = window.getSelection();
|
|
@@ -8587,17 +8587,17 @@ function Au(e, t) {
|
|
|
8587
8587
|
const n = En(e), r = n ? Do(e, n.startContainer, n.startOffset) : null, o = n ? Do(e, n.endContainer, n.endOffset) : null, i = St(e), l = id(e);
|
|
8588
8588
|
Ai(l);
|
|
8589
8589
|
const c = sA(l, t.font), u = Ho(l, cA(t)), m = Kk(l, t.backgroundImage);
|
|
8590
|
-
|
|
8590
|
+
Gl(e);
|
|
8591
8591
|
const g = ft(e.innerHTML), p = yl(e.innerHTML, t.atRule), b = bn(p);
|
|
8592
8592
|
b !== bn(e.innerHTML) && (e.innerHTML = b), Oo(e, p);
|
|
8593
8593
|
const h = JSON.stringify(g) !== JSON.stringify(t.atRule);
|
|
8594
|
-
r !== null && o !== null && Zu(e, Math.min(r, o), Math.max(r, o)),
|
|
8594
|
+
r !== null && o !== null && Zu(e, Math.min(r, o), Math.max(r, o)), jl(e);
|
|
8595
8595
|
const w = yl(e.innerHTML, t.atRule);
|
|
8596
8596
|
return { changed: !i || c || u || m || h, pageHtml: w };
|
|
8597
8597
|
}
|
|
8598
8598
|
function uA(e, t) {
|
|
8599
|
-
const n = t ?? e.innerHTML, r =
|
|
8600
|
-
return Li(n) ? (e.innerHTML = bn(r),
|
|
8599
|
+
const n = t ?? e.innerHTML, r = jg(n);
|
|
8600
|
+
return Li(n) ? (e.innerHTML = bn(r), Gl(e), Oo(e, r), { changed: !0, pageHtml: r }) : { changed: !1, pageHtml: r };
|
|
8601
8601
|
}
|
|
8602
8602
|
function dA(e) {
|
|
8603
8603
|
return new DOMParser().parseFromString(`<body>${e}</body>`, "text/html");
|
|
@@ -8697,7 +8697,7 @@ function Qf(e) {
|
|
|
8697
8697
|
}
|
|
8698
8698
|
function pi(e) {
|
|
8699
8699
|
if (!e.trim()) return e;
|
|
8700
|
-
const n =
|
|
8700
|
+
const n = Gr(e);
|
|
8701
8701
|
return n.length === 1 ? Qf(e) : rn(n.map(Qf));
|
|
8702
8702
|
}
|
|
8703
8703
|
const Cd = "data-hover-html", kA = "noopener noreferrer", PA = "var n=this._hoverBox;if(!n){n=document.createElement('div');n.style.cssText='position:absolute;z-index:2147483646;background:#fff;border:1px solid #c8c8c8;border-radius:4px;padding:0.35rem 0.5rem;color:#222;max-width:18rem';this._hoverBox=n}n.innerHTML=this.getAttribute('data-hover-html')||'';var r=this.getBoundingClientRect();n.style.left=r.left+window.scrollX+'px';n.style.top=r.bottom+4+window.scrollY+'px';document.body.appendChild(n)", AA = "this._hoverBox&&this._hoverBox.remove()", TA = /^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\(\s*\d+\s*,\s*\d+\s*,\s*\d+(?:\s*,\s*(?:0|0?\.\d+|1))?\s*\))$/;
|
|
@@ -8969,7 +8969,7 @@ function WA(e, t) {
|
|
|
8969
8969
|
if (t.elementId && n.id === t.elementId || t.src && n.getAttribute("src") === t.src) return n;
|
|
8970
8970
|
return null;
|
|
8971
8971
|
}
|
|
8972
|
-
function
|
|
8972
|
+
function GA(e, t, n) {
|
|
8973
8973
|
if (n.type !== "text") return !1;
|
|
8974
8974
|
if (n.start !== void 0 && n.end !== void 0) {
|
|
8975
8975
|
const l = rp(e, n.start, n.end);
|
|
@@ -8996,7 +8996,7 @@ function jA(e, t, n) {
|
|
|
8996
8996
|
}
|
|
8997
8997
|
return !1;
|
|
8998
8998
|
}
|
|
8999
|
-
function
|
|
8999
|
+
function jA(e, t) {
|
|
9000
9000
|
for (const n of t)
|
|
9001
9001
|
if (!e.querySelector(`[${Tt}="${n.id}"]`)) {
|
|
9002
9002
|
if (n.anchor.type === "image") {
|
|
@@ -9004,7 +9004,7 @@ function GA(e, t) {
|
|
|
9004
9004
|
o && wb(o, n.id);
|
|
9005
9005
|
continue;
|
|
9006
9006
|
}
|
|
9007
|
-
|
|
9007
|
+
GA(e, n.id, n.anchor);
|
|
9008
9008
|
}
|
|
9009
9009
|
}
|
|
9010
9010
|
function Cb(e, t) {
|
|
@@ -9315,7 +9315,7 @@ function lp(e, t) {
|
|
|
9315
9315
|
if (!r.includes("<")) return r;
|
|
9316
9316
|
const o = new DOMParser().parseFromString(`<body>${r}</body>`, "text/html");
|
|
9317
9317
|
for (const i of o.querySelectorAll("img"))
|
|
9318
|
-
i.removeAttribute(
|
|
9318
|
+
i.removeAttribute(Gt);
|
|
9319
9319
|
return o.body.innerHTML;
|
|
9320
9320
|
}
|
|
9321
9321
|
function Tb(e, t, n) {
|
|
@@ -9324,7 +9324,7 @@ function Tb(e, t, n) {
|
|
|
9324
9324
|
const TT = /^data:image\/(?:jpeg|jpg|png|gif|webp|bmp|avif)(?:;charset=[^;,]+)?;base64,/i;
|
|
9325
9325
|
function sp(e, t) {
|
|
9326
9326
|
var o, i;
|
|
9327
|
-
const n = (o = e.getAttribute(
|
|
9327
|
+
const n = (o = e.getAttribute(Gt)) == null ? void 0 : o.trim();
|
|
9328
9328
|
if (n && t) {
|
|
9329
9329
|
const l = t(n);
|
|
9330
9330
|
if (l) return `embedded:${l}`;
|
|
@@ -9540,18 +9540,18 @@ function VT(e, t) {
|
|
|
9540
9540
|
function WT(e, t) {
|
|
9541
9541
|
for (; ; ) {
|
|
9542
9542
|
const n = t.parentElement;
|
|
9543
|
-
if (!n || n === e || !
|
|
9543
|
+
if (!n || n === e || !GT(n)) return;
|
|
9544
9544
|
Pr(n, t), qt(n);
|
|
9545
9545
|
}
|
|
9546
9546
|
}
|
|
9547
|
-
function
|
|
9547
|
+
function GT(e) {
|
|
9548
9548
|
const t = Ke(e);
|
|
9549
9549
|
return Mn(e) || t === "a";
|
|
9550
9550
|
}
|
|
9551
9551
|
function dp(e) {
|
|
9552
|
-
|
|
9552
|
+
jT(e) && e.appendChild(document.createElement("br"));
|
|
9553
9553
|
}
|
|
9554
|
-
function
|
|
9554
|
+
function jT(e) {
|
|
9555
9555
|
var t;
|
|
9556
9556
|
return e.childNodes.length === 0 || e.childNodes.length === 1 && ((t = e.firstChild) == null ? void 0 : t.nodeName) === "BR" ? !0 : (e.textContent ?? "").trim().length === 0 && e.querySelector("img, table, ul, ol, hr") === null;
|
|
9557
9557
|
}
|
|
@@ -9925,7 +9925,7 @@ function $S() {
|
|
|
9925
9925
|
}), [L, H] = x({
|
|
9926
9926
|
open: !1,
|
|
9927
9927
|
existingIds: []
|
|
9928
|
-
}), [W,
|
|
9928
|
+
}), [W, G] = x({ open: !1 }), [T, K] = x({ open: !1 }), [j, X] = x({ open: !1 }), [ye, me] = x({
|
|
9929
9929
|
open: !1,
|
|
9930
9930
|
tab: "general",
|
|
9931
9931
|
value: fh(),
|
|
@@ -9936,7 +9936,7 @@ function $S() {
|
|
|
9936
9936
|
}), [B, oe] = x({
|
|
9937
9937
|
open: !1,
|
|
9938
9938
|
value: CS()
|
|
9939
|
-
}), [
|
|
9939
|
+
}), [Ae, ie] = x({
|
|
9940
9940
|
open: !1,
|
|
9941
9941
|
value: IS()
|
|
9942
9942
|
}), [Q, Oe] = x({
|
|
@@ -9971,10 +9971,10 @@ function $S() {
|
|
|
9971
9971
|
bookmarkDialog: L,
|
|
9972
9972
|
setBookmarkDialog: H,
|
|
9973
9973
|
imageDialog: W,
|
|
9974
|
-
setImageDialog:
|
|
9974
|
+
setImageDialog: G,
|
|
9975
9975
|
audioDialog: T,
|
|
9976
9976
|
setAudioDialog: K,
|
|
9977
|
-
youtubeDialog:
|
|
9977
|
+
youtubeDialog: j,
|
|
9978
9978
|
setYoutubeDialog: X,
|
|
9979
9979
|
imageProperties: ye,
|
|
9980
9980
|
setImageProperties: me,
|
|
@@ -9984,7 +9984,7 @@ function $S() {
|
|
|
9984
9984
|
setTableProperties: ce,
|
|
9985
9985
|
cellProperties: B,
|
|
9986
9986
|
setCellProperties: oe,
|
|
9987
|
-
rowProperties:
|
|
9987
|
+
rowProperties: Ae,
|
|
9988
9988
|
setRowProperties: ie,
|
|
9989
9989
|
helpDialog: Q,
|
|
9990
9990
|
setHelpDialog: Oe,
|
|
@@ -10145,14 +10145,14 @@ function WS(e) {
|
|
|
10145
10145
|
} catch {
|
|
10146
10146
|
}
|
|
10147
10147
|
}
|
|
10148
|
-
const Ob = "commspliant-html-editor.pageZoom",
|
|
10149
|
-
function
|
|
10150
|
-
return typeof e == "string" &&
|
|
10148
|
+
const Ob = "commspliant-html-editor.pageZoom", GS = /* @__PURE__ */ new Set(["fitWidth", "fitPage"]);
|
|
10149
|
+
function jS(e) {
|
|
10150
|
+
return typeof e == "string" && GS.has(e) || typeof e == "number" && yP.includes(e) ? e : null;
|
|
10151
10151
|
}
|
|
10152
10152
|
function qS() {
|
|
10153
10153
|
try {
|
|
10154
10154
|
const e = localStorage.getItem(Ob);
|
|
10155
|
-
return e ?
|
|
10155
|
+
return e ? jS(JSON.parse(e)) : null;
|
|
10156
10156
|
} catch {
|
|
10157
10157
|
return null;
|
|
10158
10158
|
}
|
|
@@ -10429,7 +10429,7 @@ function cD(e) {
|
|
|
10429
10429
|
return t;
|
|
10430
10430
|
}
|
|
10431
10431
|
function uD(e) {
|
|
10432
|
-
return e.allowedTagSet ?
|
|
10432
|
+
return e.allowedTagSet ? jr.filter((t) => e.allowedTagSet.has(t)) : [...jr];
|
|
10433
10433
|
}
|
|
10434
10434
|
function dD(e) {
|
|
10435
10435
|
const t = e.cssPropertyRules.get("font-family");
|
|
@@ -10458,7 +10458,7 @@ function fD(e) {
|
|
|
10458
10458
|
pageLayoutAllowed: Wb(e)
|
|
10459
10459
|
};
|
|
10460
10460
|
}
|
|
10461
|
-
function
|
|
10461
|
+
function Gb(e, t) {
|
|
10462
10462
|
const n = [];
|
|
10463
10463
|
let r = !1;
|
|
10464
10464
|
for (const o of e) {
|
|
@@ -10467,7 +10467,7 @@ function jb(e, t) {
|
|
|
10467
10467
|
continue;
|
|
10468
10468
|
}
|
|
10469
10469
|
if (qn(o)) {
|
|
10470
|
-
const i =
|
|
10470
|
+
const i = Gb(o.items, t);
|
|
10471
10471
|
if (i.length === 0) continue;
|
|
10472
10472
|
r && n.length > 0 && (n.push(Ie), r = !1), n.push({ submenu: o.submenu, items: i });
|
|
10473
10473
|
continue;
|
|
@@ -10480,7 +10480,7 @@ function pD(e, t) {
|
|
|
10480
10480
|
if (!t) return e;
|
|
10481
10481
|
const n = t.hiddenToolbarItemIds, r = e.menus.map((i) => ({
|
|
10482
10482
|
...i,
|
|
10483
|
-
items:
|
|
10483
|
+
items: Gb(i.items, n)
|
|
10484
10484
|
})).filter((i) => i.items.length > 0), o = e.iconGroups.map((i) => ({
|
|
10485
10485
|
...i,
|
|
10486
10486
|
items: i.items.filter((l) => !n.has(l))
|
|
@@ -10504,13 +10504,13 @@ function ts(e) {
|
|
|
10504
10504
|
}
|
|
10505
10505
|
return t.join(" > ");
|
|
10506
10506
|
}
|
|
10507
|
-
function
|
|
10507
|
+
function jt(e, t) {
|
|
10508
10508
|
e.push(t);
|
|
10509
10509
|
}
|
|
10510
10510
|
function hD(e, t, n, r) {
|
|
10511
10511
|
const o = e.tagName.toLowerCase(), i = ts(e);
|
|
10512
10512
|
if (t.disallowedTagSet.has(o)) {
|
|
10513
|
-
|
|
10513
|
+
jt(n, {
|
|
10514
10514
|
code: "disallowed-tag",
|
|
10515
10515
|
severity: "error",
|
|
10516
10516
|
messageKey: "capabilitiesViolationDisallowedTag",
|
|
@@ -10521,7 +10521,7 @@ function hD(e, t, n, r) {
|
|
|
10521
10521
|
});
|
|
10522
10522
|
return;
|
|
10523
10523
|
}
|
|
10524
|
-
t.globalRules.stripUnknownTags && t.allowedTagSet && !t.allowedTagSet.has(o) &&
|
|
10524
|
+
t.globalRules.stripUnknownTags && t.allowedTagSet && !t.allowedTagSet.has(o) && jt(n, {
|
|
10525
10525
|
code: "unknown-tag",
|
|
10526
10526
|
severity: "error",
|
|
10527
10527
|
messageKey: "capabilitiesViolationUnknownTag",
|
|
@@ -10531,7 +10531,7 @@ function hD(e, t, n, r) {
|
|
|
10531
10531
|
pageIndex: r
|
|
10532
10532
|
});
|
|
10533
10533
|
const l = t.tagRules.get(o);
|
|
10534
|
-
(l == null ? void 0 : l.status) === "restricted" &&
|
|
10534
|
+
(l == null ? void 0 : l.status) === "restricted" && jt(n, {
|
|
10535
10535
|
code: "restricted-tag",
|
|
10536
10536
|
severity: "warning",
|
|
10537
10537
|
messageKey: "capabilitiesViolationRestrictedTag",
|
|
@@ -10546,7 +10546,7 @@ function bD(e, t, n, r) {
|
|
|
10546
10546
|
if (i != null && i.requiredAttributes)
|
|
10547
10547
|
for (const [u, m] of Object.entries(i.requiredAttributes)) {
|
|
10548
10548
|
const g = e.getAttribute(u);
|
|
10549
|
-
(g === null || g !== m) &&
|
|
10549
|
+
(g === null || g !== m) && jt(n, {
|
|
10550
10550
|
code: "missing-required-attribute",
|
|
10551
10551
|
severity: "error",
|
|
10552
10552
|
messageKey: "capabilitiesViolationMissingRequiredAttribute",
|
|
@@ -10561,7 +10561,7 @@ function bD(e, t, n, r) {
|
|
|
10561
10561
|
const c = new Set(i.allowedAttributes);
|
|
10562
10562
|
for (const u of [...e.attributes]) {
|
|
10563
10563
|
const m = u.name.toLowerCase();
|
|
10564
|
-
m !== "style" && (c.has(m) ||
|
|
10564
|
+
m !== "style" && (c.has(m) || jt(n, {
|
|
10565
10565
|
code: "unknown-attribute",
|
|
10566
10566
|
severity: "error",
|
|
10567
10567
|
messageKey: "capabilitiesViolationUnknownAttribute",
|
|
@@ -10587,7 +10587,7 @@ function wD(e, t, n, r) {
|
|
|
10587
10587
|
if (!c) {
|
|
10588
10588
|
if (i != null && i.forcedCss)
|
|
10589
10589
|
for (const m of Object.keys(i.forcedCss))
|
|
10590
|
-
|
|
10590
|
+
jt(n, {
|
|
10591
10591
|
code: "missing-forced-css",
|
|
10592
10592
|
severity: "warning",
|
|
10593
10593
|
messageKey: "capabilitiesViolationMissingForcedCss",
|
|
@@ -10602,7 +10602,7 @@ function wD(e, t, n, r) {
|
|
|
10602
10602
|
const u = Vb(c);
|
|
10603
10603
|
if (i != null && i.disallowedCss)
|
|
10604
10604
|
for (const m of i.disallowedCss)
|
|
10605
|
-
u.has(m) &&
|
|
10605
|
+
u.has(m) && jt(n, {
|
|
10606
10606
|
code: "tag-disallowed-css",
|
|
10607
10607
|
severity: "error",
|
|
10608
10608
|
messageKey: "capabilitiesViolationTagDisallowedCss",
|
|
@@ -10615,7 +10615,7 @@ function wD(e, t, n, r) {
|
|
|
10615
10615
|
if (i != null && i.forcedCss)
|
|
10616
10616
|
for (const [m, g] of Object.entries(i.forcedCss)) {
|
|
10617
10617
|
const p = u.get(m);
|
|
10618
|
-
(!p || p.replace(/\s+/g, "").toLowerCase() !== g.replace(/\s+/g, "").toLowerCase()) &&
|
|
10618
|
+
(!p || p.replace(/\s+/g, "").toLowerCase() !== g.replace(/\s+/g, "").toLowerCase()) && jt(n, {
|
|
10619
10619
|
code: "missing-forced-css",
|
|
10620
10620
|
severity: "warning",
|
|
10621
10621
|
messageKey: "capabilitiesViolationMissingForcedCss",
|
|
@@ -10630,7 +10630,7 @@ function wD(e, t, n, r) {
|
|
|
10630
10630
|
const p = t.cssPropertyRules.get(m);
|
|
10631
10631
|
if (p) {
|
|
10632
10632
|
if (p.allowedOnTags && !p.allowedOnTags.includes(o)) {
|
|
10633
|
-
|
|
10633
|
+
jt(n, {
|
|
10634
10634
|
code: "css-wrong-tag",
|
|
10635
10635
|
severity: p.status === "disallowed" ? "error" : "warning",
|
|
10636
10636
|
messageKey: "capabilitiesViolationCssWrongTag",
|
|
@@ -10643,7 +10643,7 @@ function wD(e, t, n, r) {
|
|
|
10643
10643
|
continue;
|
|
10644
10644
|
}
|
|
10645
10645
|
if (p.status === "disallowed") {
|
|
10646
|
-
|
|
10646
|
+
jt(n, {
|
|
10647
10647
|
code: "css-disallowed",
|
|
10648
10648
|
severity: "error",
|
|
10649
10649
|
messageKey: "capabilitiesViolationCssDisallowed",
|
|
@@ -10656,7 +10656,7 @@ function wD(e, t, n, r) {
|
|
|
10656
10656
|
continue;
|
|
10657
10657
|
}
|
|
10658
10658
|
if (!yD(m, g, p)) {
|
|
10659
|
-
|
|
10659
|
+
jt(n, {
|
|
10660
10660
|
code: "css-value-not-allowed",
|
|
10661
10661
|
severity: "error",
|
|
10662
10662
|
messageKey: "capabilitiesViolationCssValueNotAllowed",
|
|
@@ -10668,7 +10668,7 @@ function wD(e, t, n, r) {
|
|
|
10668
10668
|
});
|
|
10669
10669
|
continue;
|
|
10670
10670
|
}
|
|
10671
|
-
(p.status === "restricted" || p.status === "allowed_with_degradation") &&
|
|
10671
|
+
(p.status === "restricted" || p.status === "allowed_with_degradation") && jt(n, {
|
|
10672
10672
|
code: "css-restricted",
|
|
10673
10673
|
severity: "warning",
|
|
10674
10674
|
messageKey: "capabilitiesViolationCssRestricted",
|
|
@@ -10692,7 +10692,7 @@ function CD(e, t, n, r) {
|
|
|
10692
10692
|
const c = l.getAttribute("width"), u = Vb(l.getAttribute("style") ?? ""), m = c ?? u.get("width") ?? u.get("max-width");
|
|
10693
10693
|
if (!m) continue;
|
|
10694
10694
|
const g = Number.parseInt(m, 10);
|
|
10695
|
-
Number.isFinite(g) && g > o &&
|
|
10695
|
+
Number.isFinite(g) && g > o && jt(n, {
|
|
10696
10696
|
code: "container-width-exceeded",
|
|
10697
10697
|
severity: "warning",
|
|
10698
10698
|
messageKey: "capabilitiesViolationContainerWidthExceeded",
|
|
@@ -10708,7 +10708,7 @@ function vD(e, t, n, r) {
|
|
|
10708
10708
|
for (const i of o)
|
|
10709
10709
|
i instanceof Element && (hD(i, t, n, r), bD(i, t, n, r), wD(i, t, n, r));
|
|
10710
10710
|
}
|
|
10711
|
-
function
|
|
10711
|
+
function jb(e) {
|
|
10712
10712
|
const t = e.filter((r) => r.severity === "error").length, n = e.filter((r) => r.severity === "warning").length;
|
|
10713
10713
|
return {
|
|
10714
10714
|
valid: t === 0,
|
|
@@ -10722,14 +10722,14 @@ function kD(e, t, n) {
|
|
|
10722
10722
|
if (!o)
|
|
10723
10723
|
return { valid: !0, errorCount: 0, warningCount: 0, violations: [] };
|
|
10724
10724
|
const i = new DOMParser().parseFromString(`<body>${o}</body>`, "text/html"), l = [];
|
|
10725
|
-
return vD(i.body, r, l, n == null ? void 0 : n.pageIndex), CD(i, r, l, n == null ? void 0 : n.pageIndex),
|
|
10725
|
+
return vD(i.body, r, l, n == null ? void 0 : n.pageIndex), CD(i, r, l, n == null ? void 0 : n.pageIndex), jb(l);
|
|
10726
10726
|
}
|
|
10727
10727
|
function kp(e, t) {
|
|
10728
10728
|
const n = [];
|
|
10729
10729
|
return e.forEach((r, o) => {
|
|
10730
10730
|
const i = kD(r, t, { pageIndex: o });
|
|
10731
10731
|
n.push(...i.violations);
|
|
10732
|
-
}),
|
|
10732
|
+
}), jb(n);
|
|
10733
10733
|
}
|
|
10734
10734
|
const qb = { en: Bo, es: ag };
|
|
10735
10735
|
function Zb(e, t) {
|
|
@@ -10751,7 +10751,7 @@ const TD = {
|
|
|
10751
10751
|
compatibilityCheck: {
|
|
10752
10752
|
id: "compatibilityCheck",
|
|
10753
10753
|
command: "openCompatibilityCheck",
|
|
10754
|
-
icon:
|
|
10754
|
+
icon: Gp,
|
|
10755
10755
|
labelKey: "commandCompatibilityCheck",
|
|
10756
10756
|
ariaKey: "commandCompatibilityCheckAria",
|
|
10757
10757
|
enabled: "isVisualMode"
|
|
@@ -10833,7 +10833,7 @@ function Pp({ violation: e }) {
|
|
|
10833
10833
|
r ? /* @__PURE__ */ a("span", { className: at.violationLocation, children: r }) : null
|
|
10834
10834
|
] });
|
|
10835
10835
|
}
|
|
10836
|
-
function
|
|
10836
|
+
function GD({ open: e, result: t, onClose: n }) {
|
|
10837
10837
|
const r = re(), o = te(), i = D(null);
|
|
10838
10838
|
if (Xe(i, {
|
|
10839
10839
|
open: e,
|
|
@@ -10882,7 +10882,7 @@ function jD({ open: e, result: t, onClose: n }) {
|
|
|
10882
10882
|
}
|
|
10883
10883
|
) }) });
|
|
10884
10884
|
}
|
|
10885
|
-
function
|
|
10885
|
+
function jD({ enabled: e, onHtml: t }) {
|
|
10886
10886
|
const [n, r] = x(!1), o = D(0), i = D(e), l = D(t);
|
|
10887
10887
|
i.current = e, l.current = t;
|
|
10888
10888
|
const c = M(() => {
|
|
@@ -11084,8 +11084,8 @@ function YD(e) {
|
|
|
11084
11084
|
return;
|
|
11085
11085
|
}
|
|
11086
11086
|
if (r[I] === R) return;
|
|
11087
|
-
const H = Date.now(), W = (L == null ? void 0 : L.coalesce) === !0,
|
|
11088
|
-
if (T[I] = R,
|
|
11087
|
+
const H = Date.now(), W = (L == null ? void 0 : L.coalesce) === !0, G = W && c && u === I && H - m < Yb, T = it(r);
|
|
11088
|
+
if (T[I] = R, G) {
|
|
11089
11089
|
r = T, m = H;
|
|
11090
11090
|
return;
|
|
11091
11091
|
}
|
|
@@ -11294,7 +11294,7 @@ function Ap(e, t, n, r) {
|
|
|
11294
11294
|
const o = Sd(e, t), i = o.filter((u) => u !== xn), l = i.indexOf(n), c = l + r;
|
|
11295
11295
|
return l < 0 || c < 0 || c >= i.length ? { groupOrder: o, hiddenItemIds: [...(e == null ? void 0 : e.hiddenItemIds) ?? []] } : Jb(e, t, n, i[c]);
|
|
11296
11296
|
}
|
|
11297
|
-
const nR = "_backdrop_11w4e_1", rR = "_dialog_11w4e_12", oR = "_header_11w4e_31", iR = "_body_11w4e_39", aR = "_group_11w4e_49", lR = "_groupDragging_11w4e_55", sR = "_groupDropTarget_11w4e_59", cR = "_groupHeader_11w4e_64", uR = "_groupTitle_11w4e_72", dR = "_dragHandle_11w4e_77", mR = "_moveButton_11w4e_78", fR = "_items_11w4e_119", pR = "_item_11w4e_119", gR = "_itemIcon_11w4e_135", hR = "_itemTitle_11w4e_144", bR = "_itemCheckbox_11w4e_151", yR = "_actions_11w4e_155", wR = "_action_11w4e_155", CR = "_spinnerWrap_11w4e_191", vR = "_spinner_11w4e_191",
|
|
11297
|
+
const nR = "_backdrop_11w4e_1", rR = "_dialog_11w4e_12", oR = "_header_11w4e_31", iR = "_body_11w4e_39", aR = "_group_11w4e_49", lR = "_groupDragging_11w4e_55", sR = "_groupDropTarget_11w4e_59", cR = "_groupHeader_11w4e_64", uR = "_groupTitle_11w4e_72", dR = "_dragHandle_11w4e_77", mR = "_moveButton_11w4e_78", fR = "_items_11w4e_119", pR = "_item_11w4e_119", gR = "_itemIcon_11w4e_135", hR = "_itemTitle_11w4e_144", bR = "_itemCheckbox_11w4e_151", yR = "_actions_11w4e_155", wR = "_action_11w4e_155", CR = "_spinnerWrap_11w4e_191", vR = "_spinner_11w4e_191", je = {
|
|
11298
11298
|
backdrop: nR,
|
|
11299
11299
|
dialog: rR,
|
|
11300
11300
|
header: oR,
|
|
@@ -11362,70 +11362,70 @@ function PR({
|
|
|
11362
11362
|
}, W = (T, K) => {
|
|
11363
11363
|
var X;
|
|
11364
11364
|
T.preventDefault();
|
|
11365
|
-
const
|
|
11366
|
-
y(null), P(null), !(!
|
|
11367
|
-
},
|
|
11365
|
+
const j = ((X = T.dataTransfer) == null ? void 0 : X.getData("text/plain")) || w;
|
|
11366
|
+
y(null), P(null), !(!j || j === K || I) && u(Jb(r, n, j, K));
|
|
11367
|
+
}, G = () => {
|
|
11368
11368
|
y(null), P(null);
|
|
11369
11369
|
};
|
|
11370
|
-
return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className:
|
|
11370
|
+
return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className: je.backdrop, role: "presentation", onMouseDown: g, children: /* @__PURE__ */ C(
|
|
11371
11371
|
"div",
|
|
11372
11372
|
{
|
|
11373
11373
|
ref: h,
|
|
11374
|
-
className:
|
|
11374
|
+
className: je.dialog,
|
|
11375
11375
|
role: "dialog",
|
|
11376
11376
|
"aria-modal": "true",
|
|
11377
11377
|
"aria-labelledby": b,
|
|
11378
11378
|
"aria-busy": o || i ? !0 : void 0,
|
|
11379
11379
|
onMouseDown: (T) => T.stopPropagation(),
|
|
11380
11380
|
children: [
|
|
11381
|
-
/* @__PURE__ */ a("h2", { className:
|
|
11382
|
-
/* @__PURE__ */ a("div", { className:
|
|
11381
|
+
/* @__PURE__ */ a("h2", { className: je.header, id: b, children: p("customizeToolbarDialogTitle") }),
|
|
11382
|
+
/* @__PURE__ */ a("div", { className: je.body, children: o ? /* @__PURE__ */ a(
|
|
11383
11383
|
"div",
|
|
11384
11384
|
{
|
|
11385
|
-
className:
|
|
11385
|
+
className: je.spinnerWrap,
|
|
11386
11386
|
role: "status",
|
|
11387
11387
|
"aria-live": "polite",
|
|
11388
11388
|
"aria-label": p("customizeToolbarDialogLoading"),
|
|
11389
|
-
children: /* @__PURE__ */ a("span", { className:
|
|
11389
|
+
children: /* @__PURE__ */ a("span", { className: je.spinner, "aria-hidden": "true" })
|
|
11390
11390
|
}
|
|
11391
11391
|
) : _.map((T) => {
|
|
11392
|
-
const K = t.groups[T.id],
|
|
11392
|
+
const K = t.groups[T.id], j = K ? Cr(p, K) : T.id, X = T.id === xn, ye = R.indexOf(T.id);
|
|
11393
11393
|
return /* @__PURE__ */ C(
|
|
11394
11394
|
"section",
|
|
11395
11395
|
{
|
|
11396
11396
|
className: [
|
|
11397
|
-
|
|
11398
|
-
w === T.id ?
|
|
11399
|
-
A === T.id ?
|
|
11397
|
+
je.group,
|
|
11398
|
+
w === T.id ? je.groupDragging : "",
|
|
11399
|
+
A === T.id ? je.groupDropTarget : ""
|
|
11400
11400
|
].filter(Boolean).join(" "),
|
|
11401
11401
|
"data-toolbar-customize-group": T.id,
|
|
11402
|
-
"aria-label":
|
|
11402
|
+
"aria-label": j,
|
|
11403
11403
|
onDragOver: (me) => H(me, T.id),
|
|
11404
11404
|
onDrop: (me) => W(me, T.id),
|
|
11405
11405
|
onDragLeave: () => {
|
|
11406
11406
|
A === T.id && P(null);
|
|
11407
11407
|
},
|
|
11408
11408
|
children: [
|
|
11409
|
-
/* @__PURE__ */ C("div", { className:
|
|
11409
|
+
/* @__PURE__ */ C("div", { className: je.groupHeader, children: [
|
|
11410
11410
|
/* @__PURE__ */ a(
|
|
11411
11411
|
"button",
|
|
11412
11412
|
{
|
|
11413
11413
|
type: "button",
|
|
11414
|
-
className:
|
|
11414
|
+
className: je.dragHandle,
|
|
11415
11415
|
draggable: !I && !X,
|
|
11416
11416
|
disabled: I || X,
|
|
11417
11417
|
"aria-label": p("customizeToolbarDragHandle"),
|
|
11418
11418
|
onDragStart: (me) => L(me, T.id),
|
|
11419
|
-
onDragEnd:
|
|
11419
|
+
onDragEnd: G,
|
|
11420
11420
|
children: /* @__PURE__ */ a(kR, {})
|
|
11421
11421
|
}
|
|
11422
11422
|
),
|
|
11423
|
-
/* @__PURE__ */ a("span", { className:
|
|
11423
|
+
/* @__PURE__ */ a("span", { className: je.groupTitle, children: j }),
|
|
11424
11424
|
/* @__PURE__ */ a(
|
|
11425
11425
|
"button",
|
|
11426
11426
|
{
|
|
11427
11427
|
type: "button",
|
|
11428
|
-
className:
|
|
11428
|
+
className: je.moveButton,
|
|
11429
11429
|
disabled: I || X || ye <= 0,
|
|
11430
11430
|
"aria-label": p("customizeToolbarMoveUp"),
|
|
11431
11431
|
onClick: () => u(Ap(r, n, T.id, -1)),
|
|
@@ -11436,7 +11436,7 @@ function PR({
|
|
|
11436
11436
|
"button",
|
|
11437
11437
|
{
|
|
11438
11438
|
type: "button",
|
|
11439
|
-
className:
|
|
11439
|
+
className: je.moveButton,
|
|
11440
11440
|
disabled: I || X || ye < 0 || ye >= R.length - 1,
|
|
11441
11441
|
"aria-label": p("customizeToolbarMoveDown"),
|
|
11442
11442
|
onClick: () => u(Ap(r, n, T.id, 1)),
|
|
@@ -11444,19 +11444,19 @@ function PR({
|
|
|
11444
11444
|
}
|
|
11445
11445
|
)
|
|
11446
11446
|
] }),
|
|
11447
|
-
/* @__PURE__ */ a("div", { className:
|
|
11447
|
+
/* @__PURE__ */ a("div", { className: je.items, children: T.items.map((me) => {
|
|
11448
11448
|
if (c && !c(me)) return null;
|
|
11449
11449
|
const q = t.items[me];
|
|
11450
11450
|
if (!q) return null;
|
|
11451
11451
|
const se = q.icon, be = Cr(p, q), ce = `${b}-${T.id}-${me}`, B = !S.has(me);
|
|
11452
|
-
return /* @__PURE__ */ C("label", { className:
|
|
11453
|
-
/* @__PURE__ */ a("span", { className:
|
|
11454
|
-
/* @__PURE__ */ a("span", { className:
|
|
11452
|
+
return /* @__PURE__ */ C("label", { className: je.item, htmlFor: ce, children: [
|
|
11453
|
+
/* @__PURE__ */ a("span", { className: je.itemIcon, "aria-hidden": "true", children: se ? /* @__PURE__ */ a(se, {}) : be.slice(0, 2) }),
|
|
11454
|
+
/* @__PURE__ */ a("span", { className: je.itemTitle, children: be }),
|
|
11455
11455
|
/* @__PURE__ */ a(
|
|
11456
11456
|
"input",
|
|
11457
11457
|
{
|
|
11458
11458
|
id: ce,
|
|
11459
|
-
className:
|
|
11459
|
+
className: je.itemCheckbox,
|
|
11460
11460
|
type: "checkbox",
|
|
11461
11461
|
checked: B,
|
|
11462
11462
|
disabled: I,
|
|
@@ -11473,13 +11473,13 @@ function PR({
|
|
|
11473
11473
|
T.id
|
|
11474
11474
|
);
|
|
11475
11475
|
}) }),
|
|
11476
|
-
/* @__PURE__ */ C("div", { className:
|
|
11477
|
-
/* @__PURE__ */ a("button", { type: "button", className:
|
|
11476
|
+
/* @__PURE__ */ C("div", { className: je.actions, children: [
|
|
11477
|
+
/* @__PURE__ */ a("button", { type: "button", className: je.action, disabled: I, onClick: m, children: p("customizeToolbarDialogReset") }),
|
|
11478
11478
|
/* @__PURE__ */ a(
|
|
11479
11479
|
"button",
|
|
11480
11480
|
{
|
|
11481
11481
|
type: "button",
|
|
11482
|
-
className:
|
|
11482
|
+
className: je.action,
|
|
11483
11483
|
"aria-label": p("customizeToolbarDialogCloseAria"),
|
|
11484
11484
|
onClick: g,
|
|
11485
11485
|
children: p("customizeToolbarDialogClose")
|
|
@@ -11593,7 +11593,7 @@ function Ko(e, t, n, {
|
|
|
11593
11593
|
};
|
|
11594
11594
|
}, [e, m, ...l]), c;
|
|
11595
11595
|
}
|
|
11596
|
-
const DR = "_toolbar_a9bu4_1", RR = "_menuBar_a9bu4_35", xR = "_menuBarDesktop_a9bu4_43", IR = "_brandMark_a9bu4_49", _R = "_brandMarkIcon_a9bu4_56", NR = "_menuBarCompact_a9bu4_68", MR = "_menuWrap_a9bu4_91", ER = "_menuButton_a9bu4_97", LR = "_iconButton_a9bu4_98", BR = "_menuItem_a9bu4_99", FR = "_hamburgerButton_a9bu4_144", HR = "_iconNav_a9bu4_151", zR = "_iconNavMain_a9bu4_162", OR = "_iconNavEnd_a9bu4_171", KR = "_iconGroup_a9bu4_187", $R = "_tooltipTrigger_a9bu4_281", UR = "_menu_a9bu4_35", VR = "_submenuWrap_a9bu4_311", WR = "_submenu_a9bu4_311",
|
|
11596
|
+
const DR = "_toolbar_a9bu4_1", RR = "_menuBar_a9bu4_35", xR = "_menuBarDesktop_a9bu4_43", IR = "_brandMark_a9bu4_49", _R = "_brandMarkIcon_a9bu4_56", NR = "_menuBarCompact_a9bu4_68", MR = "_menuWrap_a9bu4_91", ER = "_menuButton_a9bu4_97", LR = "_iconButton_a9bu4_98", BR = "_menuItem_a9bu4_99", FR = "_hamburgerButton_a9bu4_144", HR = "_iconNav_a9bu4_151", zR = "_iconNavMain_a9bu4_162", OR = "_iconNavEnd_a9bu4_171", KR = "_iconGroup_a9bu4_187", $R = "_tooltipTrigger_a9bu4_281", UR = "_menu_a9bu4_35", VR = "_submenuWrap_a9bu4_311", WR = "_submenu_a9bu4_311", GR = "_submenuTrigger_a9bu4_321", jR = "_menuOverlay_a9bu4_336", qR = "_menuOverlayHeader_a9bu4_348", ZR = "_menuOverlayTitle_a9bu4_358", YR = "_menuOverlayBody_a9bu4_364", XR = "_menuSeparator_a9bu4_415", JR = "_icon_a9bu4_98", QR = "_tooltip_a9bu4_281", ex = "_tooltipElevated_a9bu4_510", he = {
|
|
11597
11597
|
toolbar: DR,
|
|
11598
11598
|
menuBar: RR,
|
|
11599
11599
|
menuBarDesktop: xR,
|
|
@@ -11613,8 +11613,8 @@ const DR = "_toolbar_a9bu4_1", RR = "_menuBar_a9bu4_35", xR = "_menuBarDesktop_a
|
|
|
11613
11613
|
menu: UR,
|
|
11614
11614
|
submenuWrap: VR,
|
|
11615
11615
|
submenu: WR,
|
|
11616
|
-
submenuTrigger:
|
|
11617
|
-
menuOverlay:
|
|
11616
|
+
submenuTrigger: GR,
|
|
11617
|
+
menuOverlay: jR,
|
|
11618
11618
|
menuOverlayHeader: qR,
|
|
11619
11619
|
menuOverlayTitle: ZR,
|
|
11620
11620
|
menuOverlayBody: YR,
|
|
@@ -11841,28 +11841,28 @@ function Dd({
|
|
|
11841
11841
|
const oe = zc(B);
|
|
11842
11842
|
P(oe), S({ r: String(B.r), g: String(B.g), b: String(B.b) }), _(zr(B.r, B.g, B.b));
|
|
11843
11843
|
}, [b, l]);
|
|
11844
|
-
const W = (B, oe,
|
|
11845
|
-
B && (H.current = B),
|
|
11846
|
-
},
|
|
11844
|
+
const W = (B, oe, Ae) => {
|
|
11845
|
+
B && (H.current = B), Ae && B && rx(B), c(B), oe && (u == null || u(B));
|
|
11846
|
+
}, G = (B, oe, Ae) => {
|
|
11847
11847
|
const ie = zr(B.r, B.g, B.b);
|
|
11848
|
-
P(zc(B)), S({ r: String(B.r), g: String(B.g), b: String(B.b) }), _(ie), W(ie, oe,
|
|
11849
|
-
}, T = (B, oe,
|
|
11848
|
+
P(zc(B)), S({ r: String(B.r), g: String(B.g), b: String(B.b) }), _(ie), W(ie, oe, Ae);
|
|
11849
|
+
}, T = (B, oe, Ae) => {
|
|
11850
11850
|
const ie = Oc(B), Q = zr(ie.r, ie.g, ie.b);
|
|
11851
|
-
P(B), S({ r: String(ie.r), g: String(ie.g), b: String(ie.b) }), _(Q), W(Q, oe,
|
|
11851
|
+
P(B), S({ r: String(ie.r), g: String(ie.g), b: String(ie.b) }), _(Q), W(Q, oe, Ae);
|
|
11852
11852
|
}, K = (B) => {
|
|
11853
11853
|
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(B.key)) return;
|
|
11854
|
-
const
|
|
11854
|
+
const Ae = [...B.currentTarget.querySelectorAll("button")], ie = Ae.findIndex((st) => st === document.activeElement);
|
|
11855
11855
|
if (ie < 0) return;
|
|
11856
11856
|
B.preventDefault();
|
|
11857
|
-
const Q = B.key === "ArrowLeft" ? -1 : B.key === "ArrowRight" ? 1 : B.key === "ArrowUp" ? -Sp : Sp, Oe =
|
|
11857
|
+
const Q = B.key === "ArrowLeft" ? -1 : B.key === "ArrowRight" ? 1 : B.key === "ArrowUp" ? -Sp : Sp, Oe = Ae[Math.max(0, Math.min(Ae.length - 1, ie + Q))];
|
|
11858
11858
|
Oe == null || Oe.focus();
|
|
11859
|
-
},
|
|
11860
|
-
const
|
|
11861
|
-
if (!
|
|
11862
|
-
const ie =
|
|
11859
|
+
}, j = (B, oe) => {
|
|
11860
|
+
const Ae = L.current;
|
|
11861
|
+
if (!Ae || o) return;
|
|
11862
|
+
const ie = Ae.getBoundingClientRect(), Q = Math.max(0, Math.min(1, (B.clientX - ie.left) / ie.width)), Oe = Math.max(0, Math.min(1, 1 - (B.clientY - ie.top) / ie.height));
|
|
11863
11863
|
T({ h: A.h, s: Q, v: Oe }, oe, oe);
|
|
11864
11864
|
}, X = (B) => {
|
|
11865
|
-
o || (B.currentTarget.setPointerCapture(B.pointerId),
|
|
11865
|
+
o || (B.currentTarget.setPointerCapture(B.pointerId), j(B, !1));
|
|
11866
11866
|
}, ye = Oc({ h: A.h, s: 1, v: 1 }), me = zr(ye.r, ye.g, ye.b), q = Oc(A), se = zr(q.r, q.g, q.b), be = new Set(Dp), ce = I.filter((B) => !be.has(B));
|
|
11867
11867
|
return /* @__PURE__ */ C(
|
|
11868
11868
|
"div",
|
|
@@ -11898,7 +11898,7 @@ function Dd({
|
|
|
11898
11898
|
"aria-selected": i ? void 0 : oe,
|
|
11899
11899
|
disabled: o,
|
|
11900
11900
|
style: { backgroundColor: B },
|
|
11901
|
-
onMouseDown: (
|
|
11901
|
+
onMouseDown: (Ae) => Ae.preventDefault(),
|
|
11902
11902
|
onClick: () => W(B, !0, !1)
|
|
11903
11903
|
},
|
|
11904
11904
|
B
|
|
@@ -11945,10 +11945,10 @@ function Dd({
|
|
|
11945
11945
|
},
|
|
11946
11946
|
onPointerDown: X,
|
|
11947
11947
|
onPointerMove: (B) => {
|
|
11948
|
-
B.currentTarget.hasPointerCapture(B.pointerId) &&
|
|
11948
|
+
B.currentTarget.hasPointerCapture(B.pointerId) && j(B, !1);
|
|
11949
11949
|
},
|
|
11950
11950
|
onPointerUp: (B) => {
|
|
11951
|
-
|
|
11951
|
+
j(B, !0);
|
|
11952
11952
|
},
|
|
11953
11953
|
children: /* @__PURE__ */ a("span", { className: mt.svThumb, style: { left: `${A.s * 100}%`, top: `${(1 - A.v) * 100}%` } })
|
|
11954
11954
|
}
|
|
@@ -11977,7 +11977,7 @@ function Dd({
|
|
|
11977
11977
|
value: k[B],
|
|
11978
11978
|
disabled: o,
|
|
11979
11979
|
onChange: (oe) => {
|
|
11980
|
-
S((
|
|
11980
|
+
S((Ae) => ({ ...Ae, [B]: oe.target.value }));
|
|
11981
11981
|
},
|
|
11982
11982
|
onBlur: () => {
|
|
11983
11983
|
const oe = vx(k[B]);
|
|
@@ -11985,7 +11985,7 @@ function Dd({
|
|
|
11985
11985
|
S({ r: String(q.r), g: String(q.g), b: String(q.b) });
|
|
11986
11986
|
return;
|
|
11987
11987
|
}
|
|
11988
|
-
|
|
11988
|
+
G({ ...q, [B]: oe }, !0, !0);
|
|
11989
11989
|
},
|
|
11990
11990
|
onKeyDown: (oe) => {
|
|
11991
11991
|
oe.key === "Enter" && oe.currentTarget.blur();
|
|
@@ -12009,7 +12009,7 @@ function Dd({
|
|
|
12009
12009
|
return;
|
|
12010
12010
|
}
|
|
12011
12011
|
const oe = il(B);
|
|
12012
|
-
oe &&
|
|
12012
|
+
oe && G(oe, !0, !0);
|
|
12013
12013
|
},
|
|
12014
12014
|
onKeyDown: (B) => {
|
|
12015
12015
|
B.key === "Enter" && B.currentTarget.blur();
|
|
@@ -12027,7 +12027,7 @@ function Dd({
|
|
|
12027
12027
|
ix().then((B) => {
|
|
12028
12028
|
if (!B) return;
|
|
12029
12029
|
const oe = il(B);
|
|
12030
|
-
oe &&
|
|
12030
|
+
oe && G(oe, !0, !0);
|
|
12031
12031
|
});
|
|
12032
12032
|
},
|
|
12033
12033
|
children: m("colorPickFromScreen")
|
|
@@ -12123,7 +12123,7 @@ function Rx({ commands: e, queries: t, disabled: n }) {
|
|
|
12123
12123
|
return /* @__PURE__ */ a(
|
|
12124
12124
|
ty,
|
|
12125
12125
|
{
|
|
12126
|
-
icon:
|
|
12126
|
+
icon: jp,
|
|
12127
12127
|
value: t.getFontColor(),
|
|
12128
12128
|
mixed: t.isFontColorMixed(),
|
|
12129
12129
|
noneKey: "colorAutomatic",
|
|
@@ -12296,14 +12296,14 @@ function Ox({ commands: e, queries: t, disabled: n }) {
|
|
|
12296
12296
|
}
|
|
12297
12297
|
);
|
|
12298
12298
|
}
|
|
12299
|
-
const Kx = "_wrap_58i0x_1", $x = "_wrapToolbar_58i0x_9", Ux = "_field_58i0x_14", Vx = "_input_58i0x_22", Wx = "_toggle_58i0x_41",
|
|
12299
|
+
const Kx = "_wrap_58i0x_1", $x = "_wrapToolbar_58i0x_9", Ux = "_field_58i0x_14", Vx = "_input_58i0x_22", Wx = "_toggle_58i0x_41", Gx = "_chevron_58i0x_42", jx = "_unit_58i0x_80", qx = "_list_58i0x_110", Zx = "_option_58i0x_125", Qe = {
|
|
12300
12300
|
wrap: Kx,
|
|
12301
12301
|
wrapToolbar: $x,
|
|
12302
12302
|
field: Ux,
|
|
12303
12303
|
input: Vx,
|
|
12304
12304
|
toggle: Wx,
|
|
12305
|
-
chevron:
|
|
12306
|
-
unit:
|
|
12305
|
+
chevron: Gx,
|
|
12306
|
+
unit: jx,
|
|
12307
12307
|
list: qx,
|
|
12308
12308
|
option: Zx
|
|
12309
12309
|
}, Yx = {
|
|
@@ -12323,18 +12323,18 @@ function ry({
|
|
|
12323
12323
|
sizeInputId: l,
|
|
12324
12324
|
toolbar: c = !1
|
|
12325
12325
|
}) {
|
|
12326
|
-
const u = re(), m = te(), g = D(null), p = D(null), b = D(null), [h, w] = x(() => e === null ? "" :
|
|
12326
|
+
const u = re(), m = te(), g = D(null), p = D(null), b = D(null), [h, w] = x(() => e === null ? "" : ke(e)), [y, A] = x(!1), [P, k] = x(!1), S = Ko(P, p, b, {
|
|
12327
12327
|
matchAnchorWidth: !0,
|
|
12328
12328
|
minWidth: 72
|
|
12329
12329
|
});
|
|
12330
12330
|
Y(() => {
|
|
12331
|
-
y || w(e === null ? "" :
|
|
12331
|
+
y || w(e === null ? "" : ke(e));
|
|
12332
12332
|
}, [e, y]), Y(() => {
|
|
12333
12333
|
if (!P) return;
|
|
12334
12334
|
const L = (W) => {
|
|
12335
12335
|
var T, K;
|
|
12336
|
-
const
|
|
12337
|
-
(T = g.current) != null && T.contains(
|
|
12336
|
+
const G = W.target;
|
|
12337
|
+
(T = g.current) != null && T.contains(G) || (K = b.current) != null && K.contains(G) || k(!1);
|
|
12338
12338
|
}, H = (W) => {
|
|
12339
12339
|
W.key === "Escape" && (W.preventDefault(), W.stopPropagation(), k(!1));
|
|
12340
12340
|
};
|
|
@@ -12345,10 +12345,10 @@ function ry({
|
|
|
12345
12345
|
const N = (L) => {
|
|
12346
12346
|
const H = ev(L, t);
|
|
12347
12347
|
if (!H) {
|
|
12348
|
-
w(e === null ? "" :
|
|
12348
|
+
w(e === null ? "" : ke(e));
|
|
12349
12349
|
return;
|
|
12350
12350
|
}
|
|
12351
|
-
n(H.value, H.unit), w(
|
|
12351
|
+
n(H.value, H.unit), w(ke(H.value));
|
|
12352
12352
|
}, _ = YC[t], I = P ? /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(
|
|
12353
12353
|
"ul",
|
|
12354
12354
|
{
|
|
@@ -12366,9 +12366,9 @@ function ry({
|
|
|
12366
12366
|
"aria-selected": e === L,
|
|
12367
12367
|
onMouseDown: (H) => H.preventDefault(),
|
|
12368
12368
|
onClick: () => {
|
|
12369
|
-
n(L, t), w(
|
|
12369
|
+
n(L, t), w(ke(L)), k(!1);
|
|
12370
12370
|
},
|
|
12371
|
-
children:
|
|
12371
|
+
children: ke(L)
|
|
12372
12372
|
}
|
|
12373
12373
|
) }, L))
|
|
12374
12374
|
}
|
|
@@ -12489,7 +12489,7 @@ function Qx({
|
|
|
12489
12489
|
}
|
|
12490
12490
|
);
|
|
12491
12491
|
}
|
|
12492
|
-
const eI = "_wrap_1gtdc_1", tI = "_wrapToolbar_1gtdc_7", nI = "_field_1gtdc_12", rI = "_trigger_1gtdc_20", oI = "_chevron_1gtdc_46", iI = "_list_1gtdc_69", aI = "_option_1gtdc_84", lI = "_separator_1gtdc_113",
|
|
12492
|
+
const eI = "_wrap_1gtdc_1", tI = "_wrapToolbar_1gtdc_7", nI = "_field_1gtdc_12", rI = "_trigger_1gtdc_20", oI = "_chevron_1gtdc_46", iI = "_list_1gtdc_69", aI = "_option_1gtdc_84", lI = "_separator_1gtdc_113", jn = {
|
|
12493
12493
|
wrap: eI,
|
|
12494
12494
|
wrapToolbar: tI,
|
|
12495
12495
|
field: nI,
|
|
@@ -12498,7 +12498,7 @@ const eI = "_wrap_1gtdc_1", tI = "_wrapToolbar_1gtdc_7", nI = "_field_1gtdc_12",
|
|
|
12498
12498
|
list: iI,
|
|
12499
12499
|
option: aI,
|
|
12500
12500
|
separator: lI
|
|
12501
|
-
}, sI = "_backdrop_1p9zk_1", cI = "_dialog_1p9zk_12", uI = "_dialogWide_1p9zk_31", dI = "_header_1p9zk_35", mI = "_tabs_1p9zk_43", fI = "_tab_1p9zk_43", pI = "_body_1p9zk_76", gI = "_field_1p9zk_86", hI = "_label_1p9zk_92", bI = "_sizeRow_1p9zk_96", yI = "_fileRow_1p9zk_102", wI = "_fileName_1p9zk_108", CI = "_previewImage_1p9zk_115", vI = "_marks_1p9zk_125", kI = "_mark_1p9zk_125", PI = "_actions_1p9zk_140", AI = "_actionsSpread_1p9zk_148", TI = "_actionsEnd_1p9zk_152", SI = "_headerRow_1p9zk_157", DI = "_close_1p9zk_170", RI = "_nameSection_1p9zk_187", xI = "_nameInput_1p9zk_192", II = "_labelRow_1p9zk_209", _I = "_help_1p9zk_215", NI = "_textInput_1p9zk_233", MI = "_fullSelect_1p9zk_245", EI = "_error_1p9zk_249", LI = "_emptyHint_1p9zk_254", BI = "_action_1p9zk_140", FI = "_textarea_1p9zk_265", HI = "_actionDanger_1p9zk_279", zI = "_confirmBody_1p9zk_285", OI = "_nestedPanel_1p9zk_294", KI = "_spinnerWrap_1p9zk_309", $I = "_spinner_1p9zk_309", UI = "_actionPrimary_1p9zk_344", VI = "_iconButton_1p9zk_358", WI = "_select_1p9zk_359",
|
|
12501
|
+
}, sI = "_backdrop_1p9zk_1", cI = "_dialog_1p9zk_12", uI = "_dialogWide_1p9zk_31", dI = "_header_1p9zk_35", mI = "_tabs_1p9zk_43", fI = "_tab_1p9zk_43", pI = "_body_1p9zk_76", gI = "_field_1p9zk_86", hI = "_label_1p9zk_92", bI = "_sizeRow_1p9zk_96", yI = "_fileRow_1p9zk_102", wI = "_fileName_1p9zk_108", CI = "_previewImage_1p9zk_115", vI = "_marks_1p9zk_125", kI = "_mark_1p9zk_125", PI = "_actions_1p9zk_140", AI = "_actionsSpread_1p9zk_148", TI = "_actionsEnd_1p9zk_152", SI = "_headerRow_1p9zk_157", DI = "_close_1p9zk_170", RI = "_nameSection_1p9zk_187", xI = "_nameInput_1p9zk_192", II = "_labelRow_1p9zk_209", _I = "_help_1p9zk_215", NI = "_textInput_1p9zk_233", MI = "_fullSelect_1p9zk_245", EI = "_error_1p9zk_249", LI = "_emptyHint_1p9zk_254", BI = "_action_1p9zk_140", FI = "_textarea_1p9zk_265", HI = "_actionDanger_1p9zk_279", zI = "_confirmBody_1p9zk_285", OI = "_nestedPanel_1p9zk_294", KI = "_spinnerWrap_1p9zk_309", $I = "_spinner_1p9zk_309", UI = "_actionPrimary_1p9zk_344", VI = "_iconButton_1p9zk_358", WI = "_select_1p9zk_359", GI = "_lengthInput_1p9zk_360", jI = "_lengthUnit_1p9zk_361", qI = "_group_1p9zk_369", ZI = "_nestedGroup_1p9zk_379", YI = "_subLabel_1p9zk_389", XI = "_iconRow_1p9zk_393", JI = "_lengthField_1p9zk_425", QI = "_sideLabel_1p9zk_431", e_ = "_lengthRow_1p9zk_435", t_ = "_sideGrid_1p9zk_463", n_ = "_shadowGrid_1p9zk_464", f = {
|
|
12502
12502
|
backdrop: sI,
|
|
12503
12503
|
dialog: cI,
|
|
12504
12504
|
dialogWide: uI,
|
|
@@ -12537,8 +12537,8 @@ const eI = "_wrap_1gtdc_1", tI = "_wrapToolbar_1gtdc_7", nI = "_field_1gtdc_12",
|
|
|
12537
12537
|
actionPrimary: UI,
|
|
12538
12538
|
iconButton: VI,
|
|
12539
12539
|
select: WI,
|
|
12540
|
-
lengthInput:
|
|
12541
|
-
lengthUnit:
|
|
12540
|
+
lengthInput: GI,
|
|
12541
|
+
lengthUnit: jI,
|
|
12542
12542
|
group: qI,
|
|
12543
12543
|
nestedGroup: ZI,
|
|
12544
12544
|
subLabel: YI,
|
|
@@ -12584,7 +12584,7 @@ function oy({
|
|
|
12584
12584
|
onSelectCustom: p,
|
|
12585
12585
|
onAddNew: b
|
|
12586
12586
|
}) {
|
|
12587
|
-
const h = re(), w = Pd(), y = w ?
|
|
12587
|
+
const h = re(), w = Pd(), y = w ? jr.filter((S) => w.allowedParagraphTags.includes(S)) : jr, A = t ? null : e, P = c && y.length > 0, k = !!(r && c && b);
|
|
12588
12588
|
return r ? /* @__PURE__ */ C(He, { children: [
|
|
12589
12589
|
y.map((S) => /* @__PURE__ */ a(
|
|
12590
12590
|
"button",
|
|
@@ -12628,7 +12628,7 @@ function oy({
|
|
|
12628
12628
|
onMouseDown: (S) => S.preventDefault(),
|
|
12629
12629
|
onClick: () => b == null ? void 0 : b(),
|
|
12630
12630
|
children: [
|
|
12631
|
-
/* @__PURE__ */ a(
|
|
12631
|
+
/* @__PURE__ */ a(jw, { className: he.icon }),
|
|
12632
12632
|
h("styleAddNew")
|
|
12633
12633
|
]
|
|
12634
12634
|
}
|
|
@@ -12638,18 +12638,18 @@ function oy({
|
|
|
12638
12638
|
"ul",
|
|
12639
12639
|
{
|
|
12640
12640
|
ref: i,
|
|
12641
|
-
className:
|
|
12641
|
+
className: jn.list,
|
|
12642
12642
|
role: "listbox",
|
|
12643
12643
|
id: o,
|
|
12644
12644
|
style: l,
|
|
12645
12645
|
"aria-label": h("commandParagraphStyleAria"),
|
|
12646
12646
|
"aria-busy": P && m ? !0 : void 0,
|
|
12647
12647
|
children: [
|
|
12648
|
-
|
|
12648
|
+
jr.map((S) => /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */ a(
|
|
12649
12649
|
"button",
|
|
12650
12650
|
{
|
|
12651
12651
|
type: "button",
|
|
12652
|
-
className:
|
|
12652
|
+
className: jn.option,
|
|
12653
12653
|
role: "option",
|
|
12654
12654
|
"aria-selected": A === S,
|
|
12655
12655
|
disabled: n,
|
|
@@ -12659,13 +12659,13 @@ function oy({
|
|
|
12659
12659
|
children: h(_u[S])
|
|
12660
12660
|
}
|
|
12661
12661
|
) }, S)),
|
|
12662
|
-
P && (m || u.length > 0) ? /* @__PURE__ */ a("li", { role: "separator", className:
|
|
12662
|
+
P && (m || u.length > 0) ? /* @__PURE__ */ a("li", { role: "separator", className: jn.separator }) : null,
|
|
12663
12663
|
P && m ? /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */ a(xp, {}) }) : null,
|
|
12664
12664
|
P && !m ? u.map((S) => /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */ a(
|
|
12665
12665
|
"button",
|
|
12666
12666
|
{
|
|
12667
12667
|
type: "button",
|
|
12668
|
-
className:
|
|
12668
|
+
className: jn.option,
|
|
12669
12669
|
role: "option",
|
|
12670
12670
|
"aria-selected": !1,
|
|
12671
12671
|
disabled: n,
|
|
@@ -12696,13 +12696,13 @@ function o_({ commands: e, queries: t, disabled: n }) {
|
|
|
12696
12696
|
document.removeEventListener("pointerdown", S), document.removeEventListener("keydown", N, !0);
|
|
12697
12697
|
};
|
|
12698
12698
|
}, [u]);
|
|
12699
|
-
const k = /* @__PURE__ */ C("div", { className: `${
|
|
12700
|
-
/* @__PURE__ */ C("div", { className:
|
|
12699
|
+
const k = /* @__PURE__ */ C("div", { className: `${jn.wrap} ${jn.wrapToolbar}`, ref: i, children: [
|
|
12700
|
+
/* @__PURE__ */ C("div", { className: jn.field, ref: l, children: [
|
|
12701
12701
|
/* @__PURE__ */ a(
|
|
12702
12702
|
"button",
|
|
12703
12703
|
{
|
|
12704
12704
|
type: "button",
|
|
12705
|
-
className:
|
|
12705
|
+
className: jn.trigger,
|
|
12706
12706
|
disabled: g,
|
|
12707
12707
|
"aria-label": r("commandParagraphStyleAria"),
|
|
12708
12708
|
"aria-haspopup": "listbox",
|
|
@@ -12713,7 +12713,7 @@ function o_({ commands: e, queries: t, disabled: n }) {
|
|
|
12713
12713
|
children: h
|
|
12714
12714
|
}
|
|
12715
12715
|
),
|
|
12716
|
-
/* @__PURE__ */ a("span", { className:
|
|
12716
|
+
/* @__PURE__ */ a("span", { className: jn.chevron, "aria-hidden": "true" })
|
|
12717
12717
|
] }),
|
|
12718
12718
|
u ? /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(
|
|
12719
12719
|
oy,
|
|
@@ -12827,7 +12827,7 @@ const a_ = {
|
|
|
12827
12827
|
paragraphStyle: {
|
|
12828
12828
|
id: "paragraphStyle",
|
|
12829
12829
|
widget: o_,
|
|
12830
|
-
icon:
|
|
12830
|
+
icon: Gw,
|
|
12831
12831
|
labelKey: "commandParagraphStyle",
|
|
12832
12832
|
ariaKey: "commandParagraphStyleAria",
|
|
12833
12833
|
enabled: "isVisualMode"
|
|
@@ -12875,7 +12875,7 @@ const a_ = {
|
|
|
12875
12875
|
fontColor: {
|
|
12876
12876
|
id: "fontColor",
|
|
12877
12877
|
widget: Rx,
|
|
12878
|
-
icon:
|
|
12878
|
+
icon: jp,
|
|
12879
12879
|
labelKey: "commandFontColor",
|
|
12880
12880
|
ariaKey: "commandFontColorAria",
|
|
12881
12881
|
enabled: "isVisualMode"
|
|
@@ -14275,7 +14275,7 @@ function R_({
|
|
|
14275
14275
|
) : null;
|
|
14276
14276
|
});
|
|
14277
14277
|
return /* @__PURE__ */ C("div", { className: he.menuBar, ref: y, children: [
|
|
14278
|
-
/* @__PURE__ */ a(vr, { label: m("brandMarkAria"), children: /* @__PURE__ */ a("span", { className: he.brandMark, role: "img", "aria-label": m("brandMarkAria"), children: /* @__PURE__ */ a(
|
|
14278
|
+
/* @__PURE__ */ a(vr, { label: m("brandMarkAria"), children: /* @__PURE__ */ a("span", { className: he.brandMark, role: "img", "aria-label": m("brandMarkAria"), children: /* @__PURE__ */ a(Gp, { className: he.brandMarkIcon }) }) }),
|
|
14279
14279
|
/* @__PURE__ */ a(
|
|
14280
14280
|
"div",
|
|
14281
14281
|
{
|
|
@@ -14958,12 +14958,12 @@ function $_(e, t, n, r, o = !0, i = 1) {
|
|
|
14958
14958
|
return document.addEventListener("selectionchange", b), () => document.removeEventListener("selectionchange", b);
|
|
14959
14959
|
}, [e, o, r]), { pageGeometries: l, geometryForPage: g, indentState: u, refresh: p };
|
|
14960
14960
|
}
|
|
14961
|
-
const U_ = "_rulerRoot_j57vt_5", V_ = "_horizontalRulerGroup_j57vt_22", W_ = "_horizontalRulerTrack_j57vt_28",
|
|
14961
|
+
const U_ = "_rulerRoot_j57vt_5", V_ = "_horizontalRulerGroup_j57vt_22", W_ = "_horizontalRulerTrack_j57vt_28", G_ = "_horizontalRulerShelf_j57vt_42", j_ = "_horizontalInner_j57vt_51", q_ = "_dragEdgeLeft_j57vt_63", Z_ = "_dragEdgeRight_j57vt_73", Y_ = "_dragEdgeActive_j57vt_85", X_ = "_verticalRuler_j57vt_92", J_ = "_verticalInner_j57vt_102", Q_ = "_dragEdgeTop_j57vt_114", eN = "_dragEdgeBottom_j57vt_124", tN = "_dragEdgeActiveV_j57vt_136", nN = "_tickH_j57vt_143", rN = "_tickV_j57vt_152", oN = "_tickLabelH_j57vt_161", iN = "_tickLabelV_j57vt_175", aN = "_arrowIconWrapper_j57vt_192", lN = "_arrowDown_j57vt_203", sN = "_arrowGlyph_j57vt_211", cN = "_arrowActive_j57vt_220", uN = "_arrowUp_j57vt_225", dN = "_rulerTooltip_j57vt_249", Fe = {
|
|
14962
14962
|
rulerRoot: U_,
|
|
14963
14963
|
horizontalRulerGroup: V_,
|
|
14964
14964
|
horizontalRulerTrack: W_,
|
|
14965
|
-
horizontalRulerShelf:
|
|
14966
|
-
horizontalInner:
|
|
14965
|
+
horizontalRulerShelf: G_,
|
|
14966
|
+
horizontalInner: j_,
|
|
14967
14967
|
dragEdgeLeft: q_,
|
|
14968
14968
|
dragEdgeRight: Z_,
|
|
14969
14969
|
dragEdgeActive: Y_,
|
|
@@ -15035,10 +15035,10 @@ const mN = ({
|
|
|
15035
15035
|
}) => {
|
|
15036
15036
|
const c = re(), { activeTarget: u, dragPreview: m, startPointerDrag: g } = by(), p = (e == null ? void 0 : e.pageWidthPx) ?? 816, b = (e == null ? void 0 : e.marginsPx.left) ?? 96, h = (e == null ? void 0 : e.marginsPx.right) ?? 96, w = r > 0 ? r : 1, y = (m == null ? void 0 : m.marginLeft) ?? b, A = (m == null ? void 0 : m.marginRight) ?? h, P = (m == null ? void 0 : m.firstLineIndentPx) ?? t.firstLineIndentPx, k = (m == null ? void 0 : m.leftIndentPx) ?? t.leftIndentPx, S = (m == null ? void 0 : m.rightIndentPx) ?? t.rightIndentPx, N = Math.max(0, p - y - A), _ = !t.mixed, I = pe(() => Vg(p, y, n), [p, y, n]), R = M(
|
|
15037
15037
|
(T, K) => {
|
|
15038
|
-
const
|
|
15038
|
+
const j = Number.isFinite(K.clientX) ? K.clientX : 0;
|
|
15039
15039
|
g(T.type, K, {
|
|
15040
15040
|
updateDragState: (X, ye, me) => {
|
|
15041
|
-
const q = (X -
|
|
15041
|
+
const q = (X - j) / w;
|
|
15042
15042
|
let se = 0;
|
|
15043
15043
|
const be = {
|
|
15044
15044
|
target: T.type,
|
|
@@ -15067,8 +15067,8 @@ const mN = ({
|
|
|
15067
15067
|
const ce = -T.startLeftIndentPx, B = p - b - h - T.startLeftIndentPx - Di, oe = Math.max(
|
|
15068
15068
|
ce,
|
|
15069
15069
|
Math.min(B, T.startFirstLinePx + q)
|
|
15070
|
-
),
|
|
15071
|
-
be.firstLineIndentPx =
|
|
15070
|
+
), Ae = Kr(oe, n, me, 0);
|
|
15071
|
+
be.firstLineIndentPx = Ae, se = Ae;
|
|
15072
15072
|
} else if (T.type === "left-indent") {
|
|
15073
15073
|
const ce = Math.max(0, T.startLeftIndentPx + q), B = Kr(ce, n, me, 0);
|
|
15074
15074
|
be.leftIndentPx = B, be.firstLineIndentPx = T.startFirstLinePx, se = B;
|
|
@@ -15098,12 +15098,12 @@ const mN = ({
|
|
|
15098
15098
|
l,
|
|
15099
15099
|
g
|
|
15100
15100
|
]
|
|
15101
|
-
), L = y + k, H = L + P, W = p - A - S,
|
|
15101
|
+
), L = y + k, H = L + P, W = p - A - S, G = p * w;
|
|
15102
15102
|
return /* @__PURE__ */ C(
|
|
15103
15103
|
"div",
|
|
15104
15104
|
{
|
|
15105
15105
|
className: `${Fe.rulerRoot} ${Fe.horizontalRulerGroup}`,
|
|
15106
|
-
style: { width: `${
|
|
15106
|
+
style: { width: `${G}px` },
|
|
15107
15107
|
"data-testid": "horizontal-ruler",
|
|
15108
15108
|
children: [
|
|
15109
15109
|
/* @__PURE__ */ C("div", { className: Fe.horizontalRulerTrack, children: [
|
|
@@ -15246,14 +15246,14 @@ const mN = ({
|
|
|
15246
15246
|
const W = Math.max(
|
|
15247
15247
|
0,
|
|
15248
15248
|
Math.min(m - p - Di, k.startMarginPx + L)
|
|
15249
|
-
),
|
|
15250
|
-
H.marginTop =
|
|
15249
|
+
), G = Kr(W, t, R, 0);
|
|
15250
|
+
H.marginTop = G, H.measurementPx = G;
|
|
15251
15251
|
} else if (k.type === "margin-bottom") {
|
|
15252
15252
|
const W = Math.max(
|
|
15253
15253
|
0,
|
|
15254
15254
|
Math.min(m - g - Di, k.startMarginPx - L)
|
|
15255
|
-
),
|
|
15256
|
-
H.marginBottom =
|
|
15255
|
+
), G = Kr(W, t, R, 0);
|
|
15256
|
+
H.marginBottom = G, H.measurementPx = G;
|
|
15257
15257
|
}
|
|
15258
15258
|
return H;
|
|
15259
15259
|
},
|
|
@@ -15332,7 +15332,7 @@ const mN = ({
|
|
|
15332
15332
|
]
|
|
15333
15333
|
}
|
|
15334
15334
|
);
|
|
15335
|
-
}, pN = "
|
|
15335
|
+
}, pN = "_root_d9lon_1", gN = "_fullscreen_d9lon_36", hN = "_exitFullscreen_d9lon_48", bN = "_exitFullscreenIcon_d9lon_79", yN = "_menuChrome_d9lon_94", wN = "_body_d9lon_106", CN = "_iconChrome_d9lon_136", vN = "_workspace_d9lon_181", kN = "_workspacePageSized_d9lon_193", PN = "_workspaceWithRuler_d9lon_197", AN = "_pageCanvasViewport_d9lon_201", TN = "_multiPageRulerLayer_d9lon_211", SN = "_multiPageContainer_d9lon_234", DN = "_pageZoomContent_d9lon_244", RN = "_htmlFileDropOverlay_d9lon_262", xN = "_surface_d9lon_276", IN = "_visual_d9lon_283", _N = "_pageBlock_d9lon_350", NN = "_pageBlockFluid_d9lon_357", MN = "_pageSurfaceRulerGutter_d9lon_365", EN = "_pageSurface_d9lon_365", LN = "_htmlModeShell_d9lon_386", BN = "_html_d9lon_262", _e = {
|
|
15336
15336
|
root: pN,
|
|
15337
15337
|
fullscreen: gN,
|
|
15338
15338
|
exitFullscreen: hN,
|
|
@@ -15460,7 +15460,6 @@ function FN({
|
|
|
15460
15460
|
flexDirection: "column",
|
|
15461
15461
|
alignItems: e ? "center" : "stretch",
|
|
15462
15462
|
width: "100%",
|
|
15463
|
-
height: "100%",
|
|
15464
15463
|
minHeight: "100%",
|
|
15465
15464
|
position: "relative"
|
|
15466
15465
|
},
|
|
@@ -15527,16 +15526,16 @@ const HN = zi(function({
|
|
|
15527
15526
|
}) {
|
|
15528
15527
|
const I = D(null), R = D(null), L = D(""), H = D(!1), W = D(w);
|
|
15529
15528
|
W.current = w;
|
|
15530
|
-
const
|
|
15531
|
-
|
|
15529
|
+
const G = D(A);
|
|
15530
|
+
G.current = A, Re(() => {
|
|
15532
15531
|
const K = R.current;
|
|
15533
|
-
if (!K || !
|
|
15534
|
-
const
|
|
15532
|
+
if (!K || !G.current) return;
|
|
15533
|
+
const j = () => {
|
|
15535
15534
|
var ye;
|
|
15536
|
-
return (ye =
|
|
15535
|
+
return (ye = G.current) == null ? void 0 : ye.call(G, t, K.offsetHeight);
|
|
15537
15536
|
};
|
|
15538
|
-
if (
|
|
15539
|
-
const X = new ResizeObserver(
|
|
15537
|
+
if (j(), typeof ResizeObserver > "u") return;
|
|
15538
|
+
const X = new ResizeObserver(j);
|
|
15540
15539
|
return X.observe(K), () => X.disconnect();
|
|
15541
15540
|
}, [t, n, o, r]);
|
|
15542
15541
|
const T = M((K) => {
|
|
@@ -15577,19 +15576,19 @@ const HN = zi(function({
|
|
|
15577
15576
|
"aria-disabled": m || void 0,
|
|
15578
15577
|
"data-placeholder": t === 0 ? u : void 0,
|
|
15579
15578
|
onFocus: (K) => {
|
|
15580
|
-
const
|
|
15581
|
-
Bi(
|
|
15579
|
+
const j = K.currentTarget;
|
|
15580
|
+
Bi(j), xo(j), p(t);
|
|
15582
15581
|
},
|
|
15583
15582
|
onPointerDown: (K) => b(t, K),
|
|
15584
15583
|
onMouseUp: S,
|
|
15585
15584
|
onContextMenu: N,
|
|
15586
15585
|
onInput: (K) => {
|
|
15587
|
-
const
|
|
15588
|
-
H.current = !0, L.current =
|
|
15589
|
-
const { absorbedBlocks: X } = Bi(
|
|
15590
|
-
if (L.current =
|
|
15586
|
+
const j = K.currentTarget;
|
|
15587
|
+
H.current = !0, L.current = j.innerHTML;
|
|
15588
|
+
const { absorbedBlocks: X } = Bi(j);
|
|
15589
|
+
if (L.current = j.innerHTML, h(t, j.innerHTML), X.length > 0) {
|
|
15591
15590
|
const ye = X.length;
|
|
15592
|
-
requestAnimationFrame(() => ah(
|
|
15591
|
+
requestAnimationFrame(() => ah(j, ye));
|
|
15593
15592
|
}
|
|
15594
15593
|
_();
|
|
15595
15594
|
}
|
|
@@ -15628,10 +15627,10 @@ const ON = Eu(function({
|
|
|
15628
15627
|
onContextMenu: L,
|
|
15629
15628
|
pageLayoutEnabled: H = !0
|
|
15630
15629
|
}, W) {
|
|
15631
|
-
const
|
|
15630
|
+
const G = re(), T = D(null), K = D(n);
|
|
15632
15631
|
K.current = n;
|
|
15633
|
-
const
|
|
15634
|
-
|
|
15632
|
+
const j = D(S);
|
|
15633
|
+
j.current = S;
|
|
15635
15634
|
const X = D(c);
|
|
15636
15635
|
X.current = c;
|
|
15637
15636
|
const ye = D(u);
|
|
@@ -15644,7 +15643,7 @@ const ON = Eu(function({
|
|
|
15644
15643
|
se.current = A;
|
|
15645
15644
|
const be = D(P);
|
|
15646
15645
|
be.current = P;
|
|
15647
|
-
const ce = D(null), B = D([]), oe = D(B_()),
|
|
15646
|
+
const ce = D(null), B = D([]), oe = D(B_()), Ae = m, ie = M(() => K.current, []), Q = M(
|
|
15648
15647
|
(J) => oe.current.get(J, t[J] ?? ""),
|
|
15649
15648
|
[t]
|
|
15650
15649
|
), {
|
|
@@ -15669,7 +15668,7 @@ const ON = Eu(function({
|
|
|
15669
15668
|
), ee = r ? n : 0, ge = t[ee] ?? "", Se = M(
|
|
15670
15669
|
(J) => H && Hi(t[J] ?? ""),
|
|
15671
15670
|
[H, t]
|
|
15672
|
-
),
|
|
15671
|
+
), Ve = H && h && Hi(ge), cn = M(
|
|
15673
15672
|
(J) => {
|
|
15674
15673
|
ht(J), requestAnimationFrame(() => {
|
|
15675
15674
|
const ae = T.current;
|
|
@@ -15741,17 +15740,17 @@ const ON = Eu(function({
|
|
|
15741
15740
|
activatePageAt: Bn
|
|
15742
15741
|
}));
|
|
15743
15742
|
const Fn = M((J, ae, fe, De) => {
|
|
15744
|
-
const ot = bn(
|
|
15743
|
+
const ot = bn(ve(fe).body), vn = ae === document.activeElement;
|
|
15745
15744
|
if ((De != null && De.forceBodySync || !vn) && Il(ae, ot, {
|
|
15746
15745
|
resolveDataUrl: N,
|
|
15747
15746
|
hydrateEmbeddedImages: _
|
|
15748
15747
|
}), H) {
|
|
15749
15748
|
id(ae), Bi(ae);
|
|
15750
|
-
const ut =
|
|
15751
|
-
|
|
15749
|
+
const ut = jl(ae);
|
|
15750
|
+
Gl(ae), Oo(ae, fe);
|
|
15752
15751
|
const mn = St(ae);
|
|
15753
15752
|
if (mn && nh(ae, mn), ut) {
|
|
15754
|
-
const Jn = bn(
|
|
15753
|
+
const Jn = bn(ve(fe).body);
|
|
15755
15754
|
ae.innerHTML !== Jn && b1(Jn, ae) && X.current(J, ae.innerHTML);
|
|
15756
15755
|
}
|
|
15757
15756
|
}
|
|
@@ -15771,15 +15770,15 @@ const ON = Eu(function({
|
|
|
15771
15770
|
const Hn = et(J, ut);
|
|
15772
15771
|
Hn && Fn(ut, Hn, t[ut] ?? "", { forceBodySync: fe });
|
|
15773
15772
|
}
|
|
15774
|
-
ce.current = t, B.current = Oe, fe && (
|
|
15773
|
+
ce.current = t, B.current = Oe, fe && (Ae != null && Ae.current) && (Ae.current = !1);
|
|
15775
15774
|
const vn = requestAnimationFrame(yt);
|
|
15776
15775
|
return () => cancelAnimationFrame(vn);
|
|
15777
|
-
}, [n, t,
|
|
15776
|
+
}, [n, t, Ae, Fn, yt, Oe]), Re(() => {
|
|
15778
15777
|
const J = T.current;
|
|
15779
15778
|
if (!J) return;
|
|
15780
15779
|
const ae = (fe) => {
|
|
15781
15780
|
var De;
|
|
15782
|
-
(De =
|
|
15781
|
+
(De = j.current) == null || De.call(j, fe);
|
|
15783
15782
|
};
|
|
15784
15783
|
return J.addEventListener("beforeinput", ae), () => J.removeEventListener("beforeinput", ae);
|
|
15785
15784
|
}, []);
|
|
@@ -15800,16 +15799,16 @@ const ON = Eu(function({
|
|
|
15800
15799
|
), Sr = M((J, ae) => {
|
|
15801
15800
|
var fe;
|
|
15802
15801
|
(fe = se.current) == null || fe.call(se, J, ae);
|
|
15803
|
-
}, []),
|
|
15802
|
+
}, []), We = M((J, ae) => {
|
|
15804
15803
|
var fe;
|
|
15805
15804
|
(fe = be.current) == null || fe.call(be, J, ae);
|
|
15806
|
-
}, []), Ze =
|
|
15805
|
+
}, []), Ze = G("visualEditorAria"), Mt = pe(
|
|
15807
15806
|
() => Oe.map((J) => /* @__PURE__ */ a(
|
|
15808
15807
|
HN,
|
|
15809
15808
|
{
|
|
15810
15809
|
index: J,
|
|
15811
15810
|
pageHtml: t[J] ?? "",
|
|
15812
|
-
showVerticalRuler:
|
|
15811
|
+
showVerticalRuler: Ve && Se(J),
|
|
15813
15812
|
pageSized: Se(J),
|
|
15814
15813
|
geometry: Nt(J),
|
|
15815
15814
|
rulerUnit: w,
|
|
@@ -15821,10 +15820,10 @@ const ON = Eu(function({
|
|
|
15821
15820
|
onPointerDown: ct,
|
|
15822
15821
|
onPageChange: to,
|
|
15823
15822
|
onPageFlush: no,
|
|
15824
|
-
suppressPageFlushRef:
|
|
15823
|
+
suppressPageFlushRef: Ae,
|
|
15825
15824
|
onMeasured: rt,
|
|
15826
15825
|
onMarginChange: Sr,
|
|
15827
|
-
onMarginPreview:
|
|
15826
|
+
onMarginPreview: We,
|
|
15828
15827
|
onMouseUp: R,
|
|
15829
15828
|
onContextMenu: L,
|
|
15830
15829
|
onRulerRefresh: yt
|
|
@@ -15836,7 +15835,7 @@ const ON = Eu(function({
|
|
|
15836
15835
|
b,
|
|
15837
15836
|
Nt,
|
|
15838
15837
|
Sr,
|
|
15839
|
-
|
|
15838
|
+
We,
|
|
15840
15839
|
to,
|
|
15841
15840
|
no,
|
|
15842
15841
|
ct,
|
|
@@ -15848,7 +15847,7 @@ const ON = Eu(function({
|
|
|
15848
15847
|
p,
|
|
15849
15848
|
yt,
|
|
15850
15849
|
w,
|
|
15851
|
-
|
|
15850
|
+
Ve,
|
|
15852
15851
|
Oe,
|
|
15853
15852
|
Ze,
|
|
15854
15853
|
y
|
|
@@ -15860,9 +15859,8 @@ const ON = Eu(function({
|
|
|
15860
15859
|
style: {
|
|
15861
15860
|
display: "flex",
|
|
15862
15861
|
flexDirection: "column",
|
|
15863
|
-
alignItems:
|
|
15862
|
+
alignItems: Ve ? "center" : "stretch",
|
|
15864
15863
|
width: "100%",
|
|
15865
|
-
height: "100%",
|
|
15866
15864
|
minHeight: "100%",
|
|
15867
15865
|
position: "relative"
|
|
15868
15866
|
},
|
|
@@ -15870,7 +15868,7 @@ const ON = Eu(function({
|
|
|
15870
15868
|
/* @__PURE__ */ a(
|
|
15871
15869
|
wy,
|
|
15872
15870
|
{
|
|
15873
|
-
showRulers:
|
|
15871
|
+
showRulers: Ve,
|
|
15874
15872
|
geometry: Nt(ee),
|
|
15875
15873
|
indentState: Cn,
|
|
15876
15874
|
rulerUnit: w,
|
|
@@ -15899,9 +15897,9 @@ const ON = Eu(function({
|
|
|
15899
15897
|
style: {
|
|
15900
15898
|
display: "flex",
|
|
15901
15899
|
flexDirection: "column",
|
|
15902
|
-
alignItems:
|
|
15900
|
+
alignItems: Ve ? "center" : "stretch",
|
|
15903
15901
|
width: "100%",
|
|
15904
|
-
minHeight:
|
|
15902
|
+
minHeight: Ve ? void 0 : "100%",
|
|
15905
15903
|
position: "relative"
|
|
15906
15904
|
},
|
|
15907
15905
|
children: [
|
|
@@ -15954,10 +15952,10 @@ function Lp(e, t, n) {
|
|
|
15954
15952
|
}) && n(o);
|
|
15955
15953
|
};
|
|
15956
15954
|
}
|
|
15957
|
-
const WN = "_field_1knrr_1",
|
|
15955
|
+
const WN = "_field_1knrr_1", GN = "_label_1knrr_8", jN = "_button_1knrr_12", qN = "_swatch_1knrr_37", ZN = "_swatchEmpty_1knrr_44", gi = {
|
|
15958
15956
|
field: WN,
|
|
15959
|
-
label:
|
|
15960
|
-
button:
|
|
15957
|
+
label: GN,
|
|
15958
|
+
button: jN,
|
|
15961
15959
|
swatch: qN,
|
|
15962
15960
|
swatchEmpty: ZN
|
|
15963
15961
|
};
|
|
@@ -16240,9 +16238,9 @@ function lt({
|
|
|
16240
16238
|
inputId: i,
|
|
16241
16239
|
onChange: l
|
|
16242
16240
|
}) {
|
|
16243
|
-
const c = re(), u = te(), m = i ?? u, g = (t == null ? void 0 : t.unit) ?? Vu, [p, b] = x(() => t ?
|
|
16241
|
+
const c = re(), u = te(), m = i ?? u, g = (t == null ? void 0 : t.unit) ?? Vu, [p, b] = x(() => t ? ke(t.value) : ""), [h, w] = x(!1);
|
|
16244
16242
|
Y(() => {
|
|
16245
|
-
h || b(t ?
|
|
16243
|
+
h || b(t ? ke(t.value) : "");
|
|
16246
16244
|
}, [t, h]);
|
|
16247
16245
|
const y = (A) => {
|
|
16248
16246
|
const P = A.trim();
|
|
@@ -16252,10 +16250,10 @@ function lt({
|
|
|
16252
16250
|
}
|
|
16253
16251
|
const k = xi(P, g, r);
|
|
16254
16252
|
if (!k) {
|
|
16255
|
-
b(t ?
|
|
16253
|
+
b(t ? ke(t.value) : "");
|
|
16256
16254
|
return;
|
|
16257
16255
|
}
|
|
16258
|
-
l(k), b(
|
|
16256
|
+
l(k), b(ke(k.value));
|
|
16259
16257
|
};
|
|
16260
16258
|
return /* @__PURE__ */ C("div", { className: f.lengthField, children: [
|
|
16261
16259
|
/* @__PURE__ */ a("label", { className: f.sideLabel, htmlFor: m, children: e }),
|
|
@@ -16474,10 +16472,10 @@ function tM({
|
|
|
16474
16472
|
onChange: n
|
|
16475
16473
|
}) {
|
|
16476
16474
|
const r = re(), o = te(), i = e === null ? null : bl(e), [l, c] = x(
|
|
16477
|
-
() => i === null ? "" :
|
|
16475
|
+
() => i === null ? "" : ke(i)
|
|
16478
16476
|
), [u, m] = x(!1);
|
|
16479
16477
|
Y(() => {
|
|
16480
|
-
u || c(i === null ? "" :
|
|
16478
|
+
u || c(i === null ? "" : ke(i));
|
|
16481
16479
|
}, [i, u]);
|
|
16482
16480
|
const g = (p) => {
|
|
16483
16481
|
const b = p.trim();
|
|
@@ -16487,11 +16485,11 @@ function tM({
|
|
|
16487
16485
|
}
|
|
16488
16486
|
const h = Number(b.replace(",", "."));
|
|
16489
16487
|
if (!Number.isFinite(h)) {
|
|
16490
|
-
c(i === null ? "" :
|
|
16488
|
+
c(i === null ? "" : ke(i));
|
|
16491
16489
|
return;
|
|
16492
16490
|
}
|
|
16493
16491
|
const w = Ng(h);
|
|
16494
|
-
n(w), c(
|
|
16492
|
+
n(w), c(ke(bl(w)));
|
|
16495
16493
|
};
|
|
16496
16494
|
return /* @__PURE__ */ C("div", { className: f.field, children: [
|
|
16497
16495
|
/* @__PURE__ */ a("label", { className: f.label, htmlFor: o, children: r("paragraphDialogOpacity") }),
|
|
@@ -16530,18 +16528,18 @@ function Ll({
|
|
|
16530
16528
|
disabled: r,
|
|
16531
16529
|
onChange: o
|
|
16532
16530
|
}) {
|
|
16533
|
-
const i = re(), l = te(), c = te(), u = D(null), m = D(null), g = D(null), p = (n == null ? void 0 : n.unit) ?? rk, [b, h] = x(() => n ?
|
|
16531
|
+
const i = re(), l = te(), c = te(), u = D(null), m = D(null), g = D(null), p = (n == null ? void 0 : n.unit) ?? rk, [b, h] = x(() => n ? ke(n.value) : ""), [w, y] = x(!1), [A, P] = x(!1), k = Ko(A, m, g, {
|
|
16534
16532
|
matchAnchorWidth: !0,
|
|
16535
16533
|
minWidth: 72
|
|
16536
16534
|
});
|
|
16537
16535
|
Y(() => {
|
|
16538
|
-
w || h(n ?
|
|
16536
|
+
w || h(n ? ke(n.value) : "");
|
|
16539
16537
|
}, [n, w]), Y(() => {
|
|
16540
16538
|
if (!A) return;
|
|
16541
16539
|
const R = (H) => {
|
|
16542
|
-
var
|
|
16540
|
+
var G, T;
|
|
16543
16541
|
const W = H.target;
|
|
16544
|
-
(
|
|
16542
|
+
(G = u.current) != null && G.contains(W) || (T = g.current) != null && T.contains(W) || P(!1);
|
|
16545
16543
|
}, L = (H) => {
|
|
16546
16544
|
H.key === "Escape" && (H.preventDefault(), H.stopPropagation(), P(!1));
|
|
16547
16545
|
};
|
|
@@ -16557,10 +16555,10 @@ function Ll({
|
|
|
16557
16555
|
}
|
|
16558
16556
|
const H = Lf(L, p);
|
|
16559
16557
|
if (!H) {
|
|
16560
|
-
h(n ?
|
|
16558
|
+
h(n ? ke(n.value) : "");
|
|
16561
16559
|
return;
|
|
16562
16560
|
}
|
|
16563
|
-
o(H), h(
|
|
16561
|
+
o(H), h(ke(H.value));
|
|
16564
16562
|
}, N = ok[p], _ = (n == null ? void 0 : n.value) ?? null, I = A ? /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(
|
|
16565
16563
|
"ul",
|
|
16566
16564
|
{
|
|
@@ -16578,9 +16576,9 @@ function Ll({
|
|
|
16578
16576
|
"aria-selected": _ === R,
|
|
16579
16577
|
onMouseDown: (L) => L.preventDefault(),
|
|
16580
16578
|
onClick: () => {
|
|
16581
|
-
o({ value: R, unit: p }), h(
|
|
16579
|
+
o({ value: R, unit: p }), h(ke(R)), P(!1);
|
|
16582
16580
|
},
|
|
16583
|
-
children:
|
|
16581
|
+
children: ke(R)
|
|
16584
16582
|
}
|
|
16585
16583
|
) }, R))
|
|
16586
16584
|
}
|
|
@@ -16681,15 +16679,15 @@ function Ay({
|
|
|
16681
16679
|
}, [p]);
|
|
16682
16680
|
const I = b === "file" && e.startsWith("data:") ? e : b === "url" ? w : "", R = b === "custom" ? null : Nn(I), L = b === "custom" ? null : b === "file" && k ? oM[k] : R && (b === "file" || w.trim().length > 0) ? rM[R] : null, H = () => {
|
|
16683
16681
|
t || !n || i == null || i();
|
|
16684
|
-
}, W = (
|
|
16682
|
+
}, W = (G) => {
|
|
16685
16683
|
var K;
|
|
16686
|
-
const T = (K =
|
|
16684
|
+
const T = (K = G.target.files) == null ? void 0 : K[0];
|
|
16687
16685
|
T && (_(!0), S(null), q1(T).then(
|
|
16688
|
-
(
|
|
16689
|
-
P(T.name), h("file"), o(
|
|
16686
|
+
(j) => {
|
|
16687
|
+
P(T.name), h("file"), o(j), _(!1);
|
|
16690
16688
|
},
|
|
16691
|
-
(
|
|
16692
|
-
const X =
|
|
16689
|
+
(j) => {
|
|
16690
|
+
const X = j instanceof Error ? j.message : "";
|
|
16693
16691
|
P(""), h("file"), S(X === "tooLarge" || X === "type" ? X : "type"), _(!1), g.current && (g.current.value = "");
|
|
16694
16692
|
}
|
|
16695
16693
|
));
|
|
@@ -16754,8 +16752,8 @@ function Ay({
|
|
|
16754
16752
|
className: f.action,
|
|
16755
16753
|
disabled: t || N,
|
|
16756
16754
|
onClick: () => {
|
|
16757
|
-
var
|
|
16758
|
-
return (
|
|
16755
|
+
var G;
|
|
16756
|
+
return (G = g.current) == null ? void 0 : G.click();
|
|
16759
16757
|
},
|
|
16760
16758
|
children: c("imageDialogChooseFile")
|
|
16761
16759
|
}
|
|
@@ -16774,8 +16772,8 @@ function Ay({
|
|
|
16774
16772
|
disabled: t,
|
|
16775
16773
|
"aria-invalid": L !== null,
|
|
16776
16774
|
"aria-describedby": L ? m : void 0,
|
|
16777
|
-
onChange: (
|
|
16778
|
-
const T =
|
|
16775
|
+
onChange: (G) => {
|
|
16776
|
+
const T = G.target.value;
|
|
16779
16777
|
y(T), o(T.trim());
|
|
16780
16778
|
}
|
|
16781
16779
|
}
|
|
@@ -16972,16 +16970,16 @@ function _d({
|
|
|
16972
16970
|
onTabChange: g,
|
|
16973
16971
|
onChange: p
|
|
16974
16972
|
}) {
|
|
16975
|
-
var W,
|
|
16973
|
+
var W, G;
|
|
16976
16974
|
const b = re(), h = Pd(), w = /* @__PURE__ */ new Set([
|
|
16977
16975
|
...((W = h == null ? void 0 : h.hiddenDialogTabs) == null ? void 0 : W.paragraph) ?? [],
|
|
16978
|
-
...r ? ((
|
|
16976
|
+
...r ? ((G = h == null ? void 0 : h.hiddenDialogTabs) == null ? void 0 : G.page) ?? [] : []
|
|
16979
16977
|
]), A = (r ? bM().filter((T) => r.includes(T.id)) : vy).filter((T) => !w.has(T.id)), P = te(), k = te(), S = te(), N = te(), [_, I] = x(
|
|
16980
16978
|
() => Zn(t.margin, hi(t.margin.top))
|
|
16981
16979
|
), [R, L] = x(
|
|
16982
16980
|
() => Zn(t.padding, hi(t.padding.top))
|
|
16983
|
-
), H = (T, K,
|
|
16984
|
-
const ye = t[T], me = K ? hi(X) : { ...ye, [
|
|
16981
|
+
), H = (T, K, j, X) => {
|
|
16982
|
+
const ye = t[T], me = K ? hi(X) : { ...ye, [j]: X };
|
|
16985
16983
|
p({
|
|
16986
16984
|
...t,
|
|
16987
16985
|
[T]: me,
|
|
@@ -17007,14 +17005,14 @@ function _d({
|
|
|
17007
17005
|
/* @__PURE__ */ C("fieldset", { className: f.group, children: [
|
|
17008
17006
|
/* @__PURE__ */ a("legend", { className: f.label, children: b("paragraphDialogAlignment") }),
|
|
17009
17007
|
/* @__PURE__ */ a("div", { className: f.iconRow, role: "radiogroup", "aria-label": b("paragraphDialogAlignment"), children: sb.map((T) => {
|
|
17010
|
-
const K = cM[T],
|
|
17008
|
+
const K = cM[T], j = !t.alignMixed && t.align === T;
|
|
17011
17009
|
return /* @__PURE__ */ a(
|
|
17012
17010
|
"button",
|
|
17013
17011
|
{
|
|
17014
17012
|
type: "button",
|
|
17015
17013
|
className: f.iconButton,
|
|
17016
17014
|
role: "radio",
|
|
17017
|
-
"aria-checked":
|
|
17015
|
+
"aria-checked": j,
|
|
17018
17016
|
"aria-label": b(uM[T].aria),
|
|
17019
17017
|
disabled: n,
|
|
17020
17018
|
onClick: () => {
|
|
@@ -17320,10 +17318,10 @@ function yM({
|
|
|
17320
17318
|
onChange: n
|
|
17321
17319
|
}) {
|
|
17322
17320
|
const r = re(), o = te(), i = e === null ? null : bl(e), [l, c] = x(
|
|
17323
|
-
() => i === null ? "" :
|
|
17321
|
+
() => i === null ? "" : ke(i)
|
|
17324
17322
|
), [u, m] = x(!1);
|
|
17325
17323
|
Y(() => {
|
|
17326
|
-
u || c(i === null ? "" :
|
|
17324
|
+
u || c(i === null ? "" : ke(i));
|
|
17327
17325
|
}, [i, u]);
|
|
17328
17326
|
const g = (p) => {
|
|
17329
17327
|
const b = p.trim();
|
|
@@ -17333,11 +17331,11 @@ function yM({
|
|
|
17333
17331
|
}
|
|
17334
17332
|
const h = Number(b.replace(",", "."));
|
|
17335
17333
|
if (!Number.isFinite(h)) {
|
|
17336
|
-
c(i === null ? "" :
|
|
17334
|
+
c(i === null ? "" : ke(i));
|
|
17337
17335
|
return;
|
|
17338
17336
|
}
|
|
17339
17337
|
const w = Ng(h);
|
|
17340
|
-
n(w), c(
|
|
17338
|
+
n(w), c(ke(bl(w)));
|
|
17341
17339
|
};
|
|
17342
17340
|
return /* @__PURE__ */ C("div", { className: f.field, children: [
|
|
17343
17341
|
/* @__PURE__ */ a("label", { className: f.label, htmlFor: o, children: r("paragraphDialogOpacity") }),
|
|
@@ -17404,7 +17402,7 @@ function wM({
|
|
|
17404
17402
|
onChange: n
|
|
17405
17403
|
}) {
|
|
17406
17404
|
const r = re(), o = te(), i = CM(e), l = (e == null ? void 0 : e.kind) === "number" || (e == null ? void 0 : e.kind) === "length" ? e.value : null, [c, u] = x(
|
|
17407
|
-
() => l === null ? "" :
|
|
17405
|
+
() => l === null ? "" : ke(l)
|
|
17408
17406
|
), m = (e == null ? void 0 : e.kind) === "length" ? e.unit : Vu;
|
|
17409
17407
|
return /* @__PURE__ */ C("div", { className: f.field, children: [
|
|
17410
17408
|
/* @__PURE__ */ a("label", { className: f.label, htmlFor: o, children: r("paragraphDialogLineHeight") }),
|
|
@@ -17427,18 +17425,18 @@ function wM({
|
|
|
17427
17425
|
if (i === "number" || i === "empty") {
|
|
17428
17426
|
const b = Number(g.replace(",", "."));
|
|
17429
17427
|
if (!Number.isFinite(b) || b < 0) {
|
|
17430
|
-
u(l === null ? "" :
|
|
17428
|
+
u(l === null ? "" : ke(l));
|
|
17431
17429
|
return;
|
|
17432
17430
|
}
|
|
17433
|
-
n({ kind: "number", value: b }), u(
|
|
17431
|
+
n({ kind: "number", value: b }), u(ke(b));
|
|
17434
17432
|
return;
|
|
17435
17433
|
}
|
|
17436
17434
|
const p = xi(g, m, !1);
|
|
17437
17435
|
if (!p) {
|
|
17438
|
-
u(l === null ? "" :
|
|
17436
|
+
u(l === null ? "" : ke(l));
|
|
17439
17437
|
return;
|
|
17440
17438
|
}
|
|
17441
|
-
n({ kind: "length", value: p.value, unit: p.unit }), u(
|
|
17439
|
+
n({ kind: "length", value: p.value, unit: p.unit }), u(ke(p.value));
|
|
17442
17440
|
}
|
|
17443
17441
|
}
|
|
17444
17442
|
),
|
|
@@ -17461,11 +17459,11 @@ function wM({
|
|
|
17461
17459
|
}
|
|
17462
17460
|
if (p === "number") {
|
|
17463
17461
|
const y = Number((c || "1.5").replace(",", ".")), A = Number.isFinite(y) && y >= 0 ? y : 1.5;
|
|
17464
|
-
n({ kind: "number", value: A }), u(
|
|
17462
|
+
n({ kind: "number", value: A }), u(ke(A));
|
|
17465
17463
|
return;
|
|
17466
17464
|
}
|
|
17467
17465
|
const b = p, h = xi(c || "1", b, !1), w = (h == null ? void 0 : h.value) ?? 1;
|
|
17468
|
-
n({ kind: "length", value: w, unit: b }), u(
|
|
17466
|
+
n({ kind: "length", value: w, unit: b }), u(ke(w));
|
|
17469
17467
|
},
|
|
17470
17468
|
children: [
|
|
17471
17469
|
/* @__PURE__ */ a("option", { value: "empty" }),
|
|
@@ -17560,7 +17558,7 @@ const kM = ["auto", "A4", "letter", "legal", "custom"], PM = {
|
|
|
17560
17558
|
left: "paragraphDialogSideLeft"
|
|
17561
17559
|
};
|
|
17562
17560
|
function zp(e) {
|
|
17563
|
-
return e === null ? "" :
|
|
17561
|
+
return e === null ? "" : ke(e.value);
|
|
17564
17562
|
}
|
|
17565
17563
|
function TM({ value: e, disabled: t, onChange: n, onReset: r }) {
|
|
17566
17564
|
const o = re(), i = te(), [l, c] = x(!0), u = e ?? mr(), m = (g, p) => {
|
|
@@ -17712,7 +17710,7 @@ function Vc({
|
|
|
17712
17710
|
c(zp(t));
|
|
17713
17711
|
return;
|
|
17714
17712
|
}
|
|
17715
|
-
r(g), c(
|
|
17713
|
+
r(g), c(ke(g.value));
|
|
17716
17714
|
}
|
|
17717
17715
|
}
|
|
17718
17716
|
),
|
|
@@ -17774,7 +17772,7 @@ function xM({
|
|
|
17774
17772
|
}) {
|
|
17775
17773
|
const w = re(), y = te(), A = D(null), [P, k] = x("general"), [S, N] = x("spacing"), [_, I] = x(n.font), [R, L] = x(n.box), [H, W] = x(
|
|
17776
17774
|
n.backgroundImage
|
|
17777
|
-
), [
|
|
17775
|
+
), [G, T] = x(
|
|
17778
17776
|
n.atRule ?? mr()
|
|
17779
17777
|
);
|
|
17780
17778
|
if (Y(() => {
|
|
@@ -17784,7 +17782,7 @@ function xM({
|
|
|
17784
17782
|
onClose: h,
|
|
17785
17783
|
focusableSelector: 'button:not([disabled]):not([tabindex="-1"]), input:not([disabled]), select:not([disabled])'
|
|
17786
17784
|
}), !e) return null;
|
|
17787
|
-
const K = w("pageDialogTitle"),
|
|
17785
|
+
const K = w("pageDialogTitle"), j = t === "print" && !i ? "font" : t;
|
|
17788
17786
|
return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className: f.backdrop, role: "presentation", onMouseDown: h, children: /* @__PURE__ */ C(
|
|
17789
17787
|
"div",
|
|
17790
17788
|
{
|
|
@@ -17803,7 +17801,7 @@ function xM({
|
|
|
17803
17801
|
type: "button",
|
|
17804
17802
|
className: f.tab,
|
|
17805
17803
|
role: "tab",
|
|
17806
|
-
"aria-selected":
|
|
17804
|
+
"aria-selected": j === "font",
|
|
17807
17805
|
onClick: () => g("font"),
|
|
17808
17806
|
children: w("customStyleDialogTabFont")
|
|
17809
17807
|
}
|
|
@@ -17814,7 +17812,7 @@ function xM({
|
|
|
17814
17812
|
type: "button",
|
|
17815
17813
|
className: f.tab,
|
|
17816
17814
|
role: "tab",
|
|
17817
|
-
"aria-selected":
|
|
17815
|
+
"aria-selected": j === "paragraph",
|
|
17818
17816
|
onClick: () => g("paragraph"),
|
|
17819
17817
|
children: w("customStyleDialogTabParagraph")
|
|
17820
17818
|
}
|
|
@@ -17825,13 +17823,13 @@ function xM({
|
|
|
17825
17823
|
type: "button",
|
|
17826
17824
|
className: f.tab,
|
|
17827
17825
|
role: "tab",
|
|
17828
|
-
"aria-selected":
|
|
17826
|
+
"aria-selected": j === "print",
|
|
17829
17827
|
onClick: () => g("print"),
|
|
17830
17828
|
children: w("pageDialogTabPrint")
|
|
17831
17829
|
}
|
|
17832
17830
|
) : null
|
|
17833
17831
|
] }),
|
|
17834
|
-
|
|
17832
|
+
j === "font" ? /* @__PURE__ */ a("div", { className: f.nestedPanel, children: /* @__PURE__ */ a(
|
|
17835
17833
|
xd,
|
|
17836
17834
|
{
|
|
17837
17835
|
tab: P,
|
|
@@ -17841,7 +17839,7 @@ function xM({
|
|
|
17841
17839
|
onTabChange: k,
|
|
17842
17840
|
onChange: I
|
|
17843
17841
|
}
|
|
17844
|
-
) }) :
|
|
17842
|
+
) }) : j === "paragraph" ? /* @__PURE__ */ a("div", { className: f.nestedPanel, children: /* @__PURE__ */ a(
|
|
17845
17843
|
_d,
|
|
17846
17844
|
{
|
|
17847
17845
|
tab: S,
|
|
@@ -17862,7 +17860,7 @@ function xM({
|
|
|
17862
17860
|
) }) : /* @__PURE__ */ a("div", { className: f.nestedPanel, children: /* @__PURE__ */ a(
|
|
17863
17861
|
TM,
|
|
17864
17862
|
{
|
|
17865
|
-
value:
|
|
17863
|
+
value: G,
|
|
17866
17864
|
disabled: o,
|
|
17867
17865
|
onChange: T,
|
|
17868
17866
|
onReset: () => {
|
|
@@ -17882,7 +17880,7 @@ function xM({
|
|
|
17882
17880
|
font: _,
|
|
17883
17881
|
box: R,
|
|
17884
17882
|
backgroundImage: H,
|
|
17885
|
-
atRule: i ?
|
|
17883
|
+
atRule: i ? G : n.atRule ?? mr()
|
|
17886
17884
|
}),
|
|
17887
17885
|
children: w("fontDialogOk")
|
|
17888
17886
|
}
|
|
@@ -17996,19 +17994,19 @@ function MM({
|
|
|
17996
17994
|
onDelete: b,
|
|
17997
17995
|
onClose: h
|
|
17998
17996
|
}) {
|
|
17999
|
-
const w = re(), y = te(), A = te(), P = D(null), [k, S] = x(r), [N, _] = x(g), [I, R] = x("general"), [L, H] = x("general"), [W,
|
|
17997
|
+
const w = re(), y = te(), A = te(), P = D(null), [k, S] = x(r), [N, _] = x(g), [I, R] = x("general"), [L, H] = x("general"), [W, G] = x(() => Op(o)), [T, K] = x(
|
|
18000
17998
|
() => ku(i)
|
|
18001
|
-
), [
|
|
17999
|
+
), [j, X] = x(!1);
|
|
18002
18000
|
Y(() => {
|
|
18003
|
-
e && (S(r), _(g), R("general"), H("general"),
|
|
18001
|
+
e && (S(r), _(g), R("general"), H("general"), G(Op(o)), K(ku(i)), X(!1));
|
|
18004
18002
|
}, [e, r, o, i, g]);
|
|
18005
18003
|
const ye = M(() => {
|
|
18006
|
-
if (
|
|
18004
|
+
if (j) {
|
|
18007
18005
|
X(!1);
|
|
18008
18006
|
return;
|
|
18009
18007
|
}
|
|
18010
18008
|
h();
|
|
18011
|
-
}, [
|
|
18009
|
+
}, [j, h]);
|
|
18012
18010
|
if (Xe(P, {
|
|
18013
18011
|
open: e,
|
|
18014
18012
|
onClose: ye,
|
|
@@ -18047,7 +18045,7 @@ function MM({
|
|
|
18047
18045
|
}
|
|
18048
18046
|
)
|
|
18049
18047
|
] }),
|
|
18050
|
-
|
|
18048
|
+
j ? /* @__PURE__ */ C(He, { children: [
|
|
18051
18049
|
/* @__PURE__ */ a("div", { className: f.confirmBody, children: w("customStyleDialogDeleteConfirm") }),
|
|
18052
18050
|
/* @__PURE__ */ C("div", { className: f.actions, children: [
|
|
18053
18051
|
/* @__PURE__ */ a(
|
|
@@ -18119,7 +18117,7 @@ function MM({
|
|
|
18119
18117
|
fonts: m,
|
|
18120
18118
|
disabled: se,
|
|
18121
18119
|
onTabChange: R,
|
|
18122
|
-
onChange:
|
|
18120
|
+
onChange: G
|
|
18123
18121
|
}
|
|
18124
18122
|
) }) : /* @__PURE__ */ a("div", { className: f.nestedPanel, children: /* @__PURE__ */ a(
|
|
18125
18123
|
_d,
|
|
@@ -18356,11 +18354,11 @@ function zM({
|
|
|
18356
18354
|
if (Y(() => {
|
|
18357
18355
|
e && (w("file"), A(""), k(""), N(""), I(""), L(null), W(!1), b.current && (b.current.value = ""));
|
|
18358
18356
|
}, [e]), Xe(p, { open: e, onClose: i, escapeIgnoreSelectors: !1 }), !e) return null;
|
|
18359
|
-
const
|
|
18357
|
+
const G = h === "file" ? P : h === "url" ? y : "", T = h === "custom" ? null : kd(G), K = h === "custom" ? null : h === "file" && R ? HM[R] : T && (h === "file" || y.trim().length > 0) ? FM[T] : null, j = h !== "custom" && T === null && !(h === "file" && R) && !t && !H, X = () => {
|
|
18360
18358
|
t || !n || o == null || o();
|
|
18361
18359
|
}, ye = () => {
|
|
18362
|
-
|
|
18363
|
-
src:
|
|
18360
|
+
j && r({
|
|
18361
|
+
src: G.trim(),
|
|
18364
18362
|
title: _.trim()
|
|
18365
18363
|
});
|
|
18366
18364
|
}, me = (q) => {
|
|
@@ -18519,7 +18517,7 @@ function zM({
|
|
|
18519
18517
|
{
|
|
18520
18518
|
type: "button",
|
|
18521
18519
|
className: `${f.action} ${f.actionPrimary}`,
|
|
18522
|
-
disabled: !
|
|
18520
|
+
disabled: !j,
|
|
18523
18521
|
onClick: ye,
|
|
18524
18522
|
children: l("fontDialogOk")
|
|
18525
18523
|
}
|
|
@@ -18643,11 +18641,11 @@ const KM = [
|
|
|
18643
18641
|
left: "commandAlignLeftAria",
|
|
18644
18642
|
center: "commandAlignCenterAria",
|
|
18645
18643
|
right: "commandAlignRightAria"
|
|
18646
|
-
}, WM = ["width", "height", "lock"],
|
|
18644
|
+
}, WM = ["width", "height", "lock"], GM = {
|
|
18647
18645
|
width: "imagePropertiesSizeWidth",
|
|
18648
18646
|
height: "imagePropertiesSizeHeight",
|
|
18649
18647
|
lock: "imagePropertiesSizeLock"
|
|
18650
|
-
},
|
|
18648
|
+
}, jM = {
|
|
18651
18649
|
top: "paragraphDialogSideTop",
|
|
18652
18650
|
right: "paragraphDialogSideRight",
|
|
18653
18651
|
bottom: "paragraphDialogSideBottom",
|
|
@@ -18742,7 +18740,7 @@ function JM({
|
|
|
18742
18740
|
"aria-checked": t.sizeMode === y,
|
|
18743
18741
|
disabled: r,
|
|
18744
18742
|
onClick: () => w(y),
|
|
18745
|
-
children: l(
|
|
18743
|
+
children: l(GM[y])
|
|
18746
18744
|
},
|
|
18747
18745
|
y
|
|
18748
18746
|
)) }),
|
|
@@ -18810,7 +18808,7 @@ function JM({
|
|
|
18810
18808
|
/* @__PURE__ */ a("div", { className: f.sideGrid, children: (g ? ["top"] : gt).map((y) => /* @__PURE__ */ a(
|
|
18811
18809
|
lt,
|
|
18812
18810
|
{
|
|
18813
|
-
label: l(g ? "paragraphDialogMargin" :
|
|
18811
|
+
label: l(g ? "paragraphDialogMargin" : jM[y]),
|
|
18814
18812
|
value: t.margin[y],
|
|
18815
18813
|
disabled: r || b && (y === "left" || y === "right"),
|
|
18816
18814
|
allowNegative: !0,
|
|
@@ -18946,7 +18944,7 @@ function JM({
|
|
|
18946
18944
|
{
|
|
18947
18945
|
id: u,
|
|
18948
18946
|
className: f.lengthInput,
|
|
18949
|
-
value: t.rotateDeg === null ? "" :
|
|
18947
|
+
value: t.rotateDeg === null ? "" : ke(t.rotateDeg),
|
|
18950
18948
|
disabled: r,
|
|
18951
18949
|
inputMode: "decimal",
|
|
18952
18950
|
"aria-label": l("imagePropertiesRotation"),
|
|
@@ -19074,9 +19072,9 @@ function eE({
|
|
|
19074
19072
|
onApply: h,
|
|
19075
19073
|
onClose: w
|
|
19076
19074
|
}) {
|
|
19077
|
-
const y = re(), A = te(), P = te(), k = te(), S = te(), N = te(), _ = D(null), [I, R] = x(n), [L, H] = x(r), [W,
|
|
19075
|
+
const y = re(), A = te(), P = te(), k = te(), S = te(), N = te(), _ = D(null), [I, R] = x(n), [L, H] = x(r), [W, G] = x(o), [T, K] = x(i), [j, X] = x(l), [ye, me] = x(c), [q, se] = x(u), [be, ce] = x(g);
|
|
19078
19076
|
if (Y(() => {
|
|
19079
|
-
e && (R(n), H(r),
|
|
19077
|
+
e && (R(n), H(r), G(o), K(i), X(l), me(c), se(u), ce(g));
|
|
19080
19078
|
}, [
|
|
19081
19079
|
e,
|
|
19082
19080
|
n,
|
|
@@ -19096,13 +19094,13 @@ function eE({
|
|
|
19096
19094
|
title: L,
|
|
19097
19095
|
targetBlank: W,
|
|
19098
19096
|
textDecorationNone: T,
|
|
19099
|
-
hoverMode:
|
|
19097
|
+
hoverMode: j,
|
|
19100
19098
|
hoverColor: ye,
|
|
19101
19099
|
hoverHtml: q
|
|
19102
19100
|
}), oe = () => {
|
|
19103
19101
|
const ie = I.trim();
|
|
19104
19102
|
!ie || p || h({ ...B(), href: ie });
|
|
19105
|
-
},
|
|
19103
|
+
}, Ae = () => {
|
|
19106
19104
|
!be || p || h({ ...B(), href: `#${be}` });
|
|
19107
19105
|
};
|
|
19108
19106
|
return /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className: f.backdrop, role: "presentation", onMouseDown: w, children: /* @__PURE__ */ C(
|
|
@@ -19175,7 +19173,7 @@ function eE({
|
|
|
19175
19173
|
type: "checkbox",
|
|
19176
19174
|
checked: W,
|
|
19177
19175
|
disabled: p,
|
|
19178
|
-
onChange: (ie) =>
|
|
19176
|
+
onChange: (ie) => G(ie.target.checked)
|
|
19179
19177
|
}
|
|
19180
19178
|
),
|
|
19181
19179
|
y("linkDialogTargetBlank")
|
|
@@ -19217,7 +19215,7 @@ function eE({
|
|
|
19217
19215
|
{
|
|
19218
19216
|
type: "button",
|
|
19219
19217
|
className: f.action,
|
|
19220
|
-
"aria-pressed":
|
|
19218
|
+
"aria-pressed": j === "color",
|
|
19221
19219
|
disabled: p,
|
|
19222
19220
|
onClick: () => X("color"),
|
|
19223
19221
|
children: y("linkDialogHoverColor")
|
|
@@ -19228,14 +19226,14 @@ function eE({
|
|
|
19228
19226
|
{
|
|
19229
19227
|
type: "button",
|
|
19230
19228
|
className: f.action,
|
|
19231
|
-
"aria-pressed":
|
|
19229
|
+
"aria-pressed": j === "html",
|
|
19232
19230
|
disabled: p,
|
|
19233
19231
|
onClick: () => X("html"),
|
|
19234
19232
|
children: y("linkDialogHoverHtml")
|
|
19235
19233
|
}
|
|
19236
19234
|
)
|
|
19237
19235
|
] }),
|
|
19238
|
-
|
|
19236
|
+
j === "color" ? /* @__PURE__ */ a(
|
|
19239
19237
|
sn,
|
|
19240
19238
|
{
|
|
19241
19239
|
label: y("linkDialogHoverColorField"),
|
|
@@ -19267,7 +19265,7 @@ function eE({
|
|
|
19267
19265
|
type: "button",
|
|
19268
19266
|
className: f.action,
|
|
19269
19267
|
disabled: p || !be,
|
|
19270
|
-
onClick:
|
|
19268
|
+
onClick: Ae,
|
|
19271
19269
|
children: y("linkDialogSelect")
|
|
19272
19270
|
}
|
|
19273
19271
|
),
|
|
@@ -19442,19 +19440,19 @@ function lE({ open: e, disabled: t, onApply: n, onClose: r }) {
|
|
|
19442
19440
|
focusableSelector: 'button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([hidden]), select:not([disabled])'
|
|
19443
19441
|
}), !e) return null;
|
|
19444
19442
|
const N = rb(m, p) && !t, _ = (H, W) => {
|
|
19445
|
-
const
|
|
19446
|
-
g(
|
|
19443
|
+
const G = Math.min(Ao, Math.max(Po, H)), T = Math.min(Ao, Math.max(Po, W));
|
|
19444
|
+
g(G), b(T), w(String(G)), A(String(T));
|
|
19447
19445
|
}, I = (H, W) => {
|
|
19448
|
-
const
|
|
19449
|
-
if (!Number.isFinite(
|
|
19446
|
+
const G = Number.parseInt(H, 10);
|
|
19447
|
+
if (!Number.isFinite(G)) {
|
|
19450
19448
|
W === "rows" ? w(String(m)) : A(String(p));
|
|
19451
19449
|
return;
|
|
19452
19450
|
}
|
|
19453
|
-
k(!0), W === "rows" ? _(
|
|
19451
|
+
k(!0), W === "rows" ? _(G, p) : _(m, G);
|
|
19454
19452
|
}, R = (H, W) => {
|
|
19455
|
-
const
|
|
19456
|
-
if (W === "rows" ? w(
|
|
19457
|
-
const T = Number.parseInt(
|
|
19453
|
+
const G = H.replace(/\D/g, "");
|
|
19454
|
+
if (W === "rows" ? w(G) : A(G), G === "") return;
|
|
19455
|
+
const T = Number.parseInt(G, 10);
|
|
19458
19456
|
Number.isFinite(T) && (k(!0), W === "rows" ? _(T, p) : _(m, T));
|
|
19459
19457
|
}, L = (H) => {
|
|
19460
19458
|
(H.key === "e" || H.key === "E" || H.key === "+" || H.key === "-" || H.key === ".") && H.preventDefault();
|
|
@@ -19492,9 +19490,9 @@ function lE({ open: e, disabled: t, onApply: n, onClose: r }) {
|
|
|
19492
19490
|
onMouseLeave: () => {
|
|
19493
19491
|
},
|
|
19494
19492
|
children: Array.from(
|
|
19495
|
-
{ length:
|
|
19496
|
-
(H, W) => Array.from({ length:
|
|
19497
|
-
const K = W + 1,
|
|
19493
|
+
{ length: Gf },
|
|
19494
|
+
(H, W) => Array.from({ length: Gf }, (G, T) => {
|
|
19495
|
+
const K = W + 1, j = T + 1, X = K <= m && j <= p;
|
|
19498
19496
|
return /* @__PURE__ */ a(
|
|
19499
19497
|
"button",
|
|
19500
19498
|
{
|
|
@@ -19502,17 +19500,17 @@ function lE({ open: e, disabled: t, onApply: n, onClose: r }) {
|
|
|
19502
19500
|
className: yo.cell,
|
|
19503
19501
|
role: "gridcell",
|
|
19504
19502
|
"data-active": X ? "true" : void 0,
|
|
19505
|
-
"aria-label": `${K} × ${
|
|
19506
|
-
"aria-pressed": X && K === m &&
|
|
19503
|
+
"aria-label": `${K} × ${j}`,
|
|
19504
|
+
"aria-pressed": X && K === m && j === p,
|
|
19507
19505
|
disabled: t,
|
|
19508
19506
|
onMouseEnter: () => {
|
|
19509
|
-
P || _(K,
|
|
19507
|
+
P || _(K, j);
|
|
19510
19508
|
},
|
|
19511
19509
|
onClick: () => {
|
|
19512
|
-
k(!0), _(K,
|
|
19510
|
+
k(!0), _(K, j);
|
|
19513
19511
|
}
|
|
19514
19512
|
},
|
|
19515
|
-
`${K}-${
|
|
19513
|
+
`${K}-${j}`
|
|
19516
19514
|
);
|
|
19517
19515
|
})
|
|
19518
19516
|
)
|
|
@@ -19814,17 +19812,17 @@ const fE = ["left", "center", "right"], pE = {
|
|
|
19814
19812
|
function ll(e) {
|
|
19815
19813
|
return { top: e, right: e, bottom: e, left: e };
|
|
19816
19814
|
}
|
|
19817
|
-
function
|
|
19815
|
+
function Gc(e) {
|
|
19818
19816
|
for (const t of gt)
|
|
19819
19817
|
if (e[t]) return e[t];
|
|
19820
19818
|
return null;
|
|
19821
19819
|
}
|
|
19822
19820
|
function yE({ value: e, disabled: t, onChange: n }) {
|
|
19823
19821
|
const r = re(), o = te(), i = te(), l = te(), [c, u] = x(
|
|
19824
|
-
() => Zn(e.padding, ll(
|
|
19822
|
+
() => Zn(e.padding, ll(Gc(e.padding)))
|
|
19825
19823
|
);
|
|
19826
19824
|
return Y(() => {
|
|
19827
|
-
u(Zn(e.padding, ll(
|
|
19825
|
+
u(Zn(e.padding, ll(Gc(e.padding))));
|
|
19828
19826
|
}, [e.padding]), /* @__PURE__ */ C("div", { className: f.body, children: [
|
|
19829
19827
|
/* @__PURE__ */ a(
|
|
19830
19828
|
sn,
|
|
@@ -19857,7 +19855,7 @@ function yE({ value: e, disabled: t, onChange: n }) {
|
|
|
19857
19855
|
disabled: t,
|
|
19858
19856
|
onChange: () => {
|
|
19859
19857
|
const m = !c;
|
|
19860
|
-
u(m), m && n({ ...e, padding: ll(
|
|
19858
|
+
u(m), m && n({ ...e, padding: ll(Gc(e.padding)) });
|
|
19861
19859
|
}
|
|
19862
19860
|
}
|
|
19863
19861
|
),
|
|
@@ -20044,17 +20042,17 @@ const CE = {
|
|
|
20044
20042
|
function sl(e) {
|
|
20045
20043
|
return { top: e, right: e, bottom: e, left: e };
|
|
20046
20044
|
}
|
|
20047
|
-
function
|
|
20045
|
+
function jc(e) {
|
|
20048
20046
|
for (const t of gt)
|
|
20049
20047
|
if (e[t]) return e[t];
|
|
20050
20048
|
return null;
|
|
20051
20049
|
}
|
|
20052
20050
|
function kE({ value: e, disabled: t, onChange: n }) {
|
|
20053
20051
|
const r = re(), o = te(), [i, l] = x(
|
|
20054
|
-
() => Zn(e.padding, sl(
|
|
20052
|
+
() => Zn(e.padding, sl(jc(e.padding)))
|
|
20055
20053
|
);
|
|
20056
20054
|
return Y(() => {
|
|
20057
|
-
l(Zn(e.padding, sl(
|
|
20055
|
+
l(Zn(e.padding, sl(jc(e.padding))));
|
|
20058
20056
|
}, [e.padding]), /* @__PURE__ */ C("div", { className: f.body, children: [
|
|
20059
20057
|
/* @__PURE__ */ a(
|
|
20060
20058
|
sn,
|
|
@@ -20087,7 +20085,7 @@ function kE({ value: e, disabled: t, onChange: n }) {
|
|
|
20087
20085
|
disabled: t,
|
|
20088
20086
|
onChange: () => {
|
|
20089
20087
|
const c = !i;
|
|
20090
|
-
l(c), c && n({ ...e, padding: sl(
|
|
20088
|
+
l(c), c && n({ ...e, padding: sl(jc(e.padding)) });
|
|
20091
20089
|
}
|
|
20092
20090
|
}
|
|
20093
20091
|
),
|
|
@@ -20196,7 +20194,7 @@ function PE({
|
|
|
20196
20194
|
}
|
|
20197
20195
|
) }) }) : null;
|
|
20198
20196
|
}
|
|
20199
|
-
const AE = "_backdrop_9d3gw_1", TE = "_dialog_9d3gw_12", SE = "_headerRow_9d3gw_29", DE = "_header_9d3gw_29", RE = "_close_9d3gw_44", xE = "_body_9d3gw_66", IE = "_frame_9d3gw_75", _E = "_actions_9d3gw_83", NE = "_action_9d3gw_83",
|
|
20197
|
+
const AE = "_backdrop_9d3gw_1", TE = "_dialog_9d3gw_12", SE = "_headerRow_9d3gw_29", DE = "_header_9d3gw_29", RE = "_close_9d3gw_44", xE = "_body_9d3gw_66", IE = "_frame_9d3gw_75", _E = "_actions_9d3gw_83", NE = "_action_9d3gw_83", Gn = {
|
|
20200
20198
|
backdrop: AE,
|
|
20201
20199
|
dialog: TE,
|
|
20202
20200
|
headerRow: SE,
|
|
@@ -20208,11 +20206,11 @@ const AE = "_backdrop_9d3gw_1", TE = "_dialog_9d3gw_12", SE = "_headerRow_9d3gw_
|
|
|
20208
20206
|
action: NE
|
|
20209
20207
|
};
|
|
20210
20208
|
function ME(e) {
|
|
20211
|
-
const t =
|
|
20209
|
+
const t = Gr(e);
|
|
20212
20210
|
if (t.length <= 1) return e;
|
|
20213
20211
|
const n = [], r = [];
|
|
20214
20212
|
for (const i of t) {
|
|
20215
|
-
const l =
|
|
20213
|
+
const l = ve(i);
|
|
20216
20214
|
n.push(...l.hrefs), r.push(l.body);
|
|
20217
20215
|
}
|
|
20218
20216
|
const o = r.map((i, l) => `<div class="wysiwyg-preview-page" style="${l === r.length - 1 ? "display: block; break-inside: avoid; page-break-inside: avoid;" : "display: block; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid;"}">${i}</div>`).join("");
|
|
@@ -20233,34 +20231,34 @@ function EE({ open: e, html: t, onClose: n }) {
|
|
|
20233
20231
|
if (!e) return;
|
|
20234
20232
|
const u = (m = l.current) == null ? void 0 : m.contentDocument;
|
|
20235
20233
|
u && mu(u, c, r("previewDialogTitle"));
|
|
20236
|
-
}, [e, c, r]), e ? /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className:
|
|
20234
|
+
}, [e, c, r]), e ? /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a("div", { className: Gn.backdrop, role: "presentation", onMouseDown: n, children: /* @__PURE__ */ C(
|
|
20237
20235
|
"div",
|
|
20238
20236
|
{
|
|
20239
20237
|
ref: i,
|
|
20240
|
-
className:
|
|
20238
|
+
className: Gn.dialog,
|
|
20241
20239
|
role: "dialog",
|
|
20242
20240
|
"aria-modal": "true",
|
|
20243
20241
|
"aria-labelledby": o,
|
|
20244
20242
|
onMouseDown: (u) => u.stopPropagation(),
|
|
20245
20243
|
children: [
|
|
20246
|
-
/* @__PURE__ */ C("div", { className:
|
|
20247
|
-
/* @__PURE__ */ a("h2", { className:
|
|
20244
|
+
/* @__PURE__ */ C("div", { className: Gn.headerRow, children: [
|
|
20245
|
+
/* @__PURE__ */ a("h2", { className: Gn.header, id: o, children: r("previewDialogTitle") }),
|
|
20248
20246
|
/* @__PURE__ */ a(
|
|
20249
20247
|
"button",
|
|
20250
20248
|
{
|
|
20251
20249
|
type: "button",
|
|
20252
|
-
className:
|
|
20250
|
+
className: Gn.close,
|
|
20253
20251
|
"aria-label": r("previewDialogCloseAria"),
|
|
20254
20252
|
onClick: n,
|
|
20255
20253
|
children: /* @__PURE__ */ a(tt, {})
|
|
20256
20254
|
}
|
|
20257
20255
|
)
|
|
20258
20256
|
] }),
|
|
20259
|
-
/* @__PURE__ */ a("div", { className:
|
|
20257
|
+
/* @__PURE__ */ a("div", { className: Gn.body, children: /* @__PURE__ */ a(
|
|
20260
20258
|
"iframe",
|
|
20261
20259
|
{
|
|
20262
20260
|
ref: l,
|
|
20263
|
-
className:
|
|
20261
|
+
className: Gn.frame,
|
|
20264
20262
|
title: r("previewDialogTitle"),
|
|
20265
20263
|
sandbox: "allow-same-origin",
|
|
20266
20264
|
tabIndex: -1,
|
|
@@ -20271,12 +20269,12 @@ function EE({ open: e, html: t, onClose: n }) {
|
|
|
20271
20269
|
}
|
|
20272
20270
|
}
|
|
20273
20271
|
) }),
|
|
20274
|
-
/* @__PURE__ */ a("div", { className:
|
|
20272
|
+
/* @__PURE__ */ a("div", { className: Gn.actions, children: /* @__PURE__ */ a("button", { type: "button", className: Gn.action, onClick: n, children: r("previewDialogClose") }) })
|
|
20275
20273
|
]
|
|
20276
20274
|
}
|
|
20277
20275
|
) }) }) : null;
|
|
20278
20276
|
}
|
|
20279
|
-
const LE = "0.1.
|
|
20277
|
+
const LE = "0.1.1", BE = "_backdrop_72ox3_1", FE = "_dialog_72ox3_12", HE = "_headerRow_72ox3_30", zE = "_header_72ox3_30", OE = "_close_72ox3_46", KE = "_body_72ox3_68", $E = "_product_72ox3_76", UE = "_meta_72ox3_82", VE = "_description_72ox3_87", WE = "_website_72ox3_92", GE = "_cta_72ox3_97", jE = "_link_72ox3_102", qE = "_actions_72ox3_118", ZE = "_action_72ox3_118", Bt = {
|
|
20280
20278
|
backdrop: BE,
|
|
20281
20279
|
dialog: FE,
|
|
20282
20280
|
headerRow: HE,
|
|
@@ -20287,8 +20285,8 @@ const LE = "0.1.0", BE = "_backdrop_72ox3_1", FE = "_dialog_72ox3_12", HE = "_he
|
|
|
20287
20285
|
meta: UE,
|
|
20288
20286
|
description: VE,
|
|
20289
20287
|
website: WE,
|
|
20290
|
-
cta:
|
|
20291
|
-
link:
|
|
20288
|
+
cta: GE,
|
|
20289
|
+
link: jE,
|
|
20292
20290
|
actions: qE,
|
|
20293
20291
|
action: ZE
|
|
20294
20292
|
};
|
|
@@ -20531,10 +20529,10 @@ const kL = zi(function({
|
|
|
20531
20529
|
onHelpTopicChange: L,
|
|
20532
20530
|
aboutDialogOpen: H,
|
|
20533
20531
|
onAboutDialogClose: W,
|
|
20534
|
-
compatibilityPanelOpen:
|
|
20532
|
+
compatibilityPanelOpen: G = !1,
|
|
20535
20533
|
capabilitiesValidation: T = null,
|
|
20536
20534
|
onCompatibilityPanelClose: K,
|
|
20537
|
-
isToolbarItemAllowed:
|
|
20535
|
+
isToolbarItemAllowed: j,
|
|
20538
20536
|
fontDialog: X,
|
|
20539
20537
|
fontSizeState: ye,
|
|
20540
20538
|
markState: me,
|
|
@@ -20544,7 +20542,7 @@ const kL = zi(function({
|
|
|
20544
20542
|
fontFaces: ce,
|
|
20545
20543
|
onFontDialogTabChange: B,
|
|
20546
20544
|
onFontDialogClose: oe,
|
|
20547
|
-
onApplyFontProperties:
|
|
20545
|
+
onApplyFontProperties: Ae,
|
|
20548
20546
|
paragraphDialog: ie,
|
|
20549
20547
|
customBackgroundImagePicker: Q,
|
|
20550
20548
|
disableBuiltinBackgroundImageSources: Oe,
|
|
@@ -20558,7 +20556,7 @@ const kL = zi(function({
|
|
|
20558
20556
|
pageDialog: ee,
|
|
20559
20557
|
enablePageProperties: ge,
|
|
20560
20558
|
onPageCustomImagePick: Se,
|
|
20561
|
-
onPageDialogTabChange:
|
|
20559
|
+
onPageDialogTabChange: Ve,
|
|
20562
20560
|
onPageDialogClose: cn,
|
|
20563
20561
|
onApplyPageProperties: un,
|
|
20564
20562
|
onPageDialogResetAtRule: dn,
|
|
@@ -20570,7 +20568,7 @@ const kL = zi(function({
|
|
|
20570
20568
|
customStyleBusy: no,
|
|
20571
20569
|
onCustomStyleDialogClose: rt,
|
|
20572
20570
|
onCustomStyleSave: Sr,
|
|
20573
|
-
onCustomStyleDelete:
|
|
20571
|
+
onCustomStyleDelete: We,
|
|
20574
20572
|
linkDialog: Ze,
|
|
20575
20573
|
onLinkDialogTabChange: Mt,
|
|
20576
20574
|
onLinkDialogClose: J,
|
|
@@ -20591,14 +20589,14 @@ const kL = zi(function({
|
|
|
20591
20589
|
onAudioDialogCustomPick: Wi,
|
|
20592
20590
|
youtubeDialogOpen: rs,
|
|
20593
20591
|
onYoutubeDialogClose: kt,
|
|
20594
|
-
onApplyYoutube:
|
|
20592
|
+
onApplyYoutube: Gi,
|
|
20595
20593
|
onYoutubeDialogCustomPick: $t,
|
|
20596
20594
|
imageProperties: Pn,
|
|
20597
20595
|
onImagePropertiesTabChange: Qn,
|
|
20598
20596
|
onImagePropertiesClose: os,
|
|
20599
20597
|
onApplyImageProperties: $o,
|
|
20600
20598
|
tableDialogOpen: is,
|
|
20601
|
-
onTableDialogClose:
|
|
20599
|
+
onTableDialogClose: ji,
|
|
20602
20600
|
onApplyTable: er,
|
|
20603
20601
|
tableProperties: An,
|
|
20604
20602
|
onTablePropertiesClose: Uo,
|
|
@@ -20631,7 +20629,7 @@ const kL = zi(function({
|
|
|
20631
20629
|
loading: y,
|
|
20632
20630
|
busy: A,
|
|
20633
20631
|
disabled: g,
|
|
20634
|
-
isItemAllowed:
|
|
20632
|
+
isItemAllowed: j,
|
|
20635
20633
|
onChange: k,
|
|
20636
20634
|
onReset: S,
|
|
20637
20635
|
onClose: P
|
|
@@ -20655,8 +20653,8 @@ const kL = zi(function({
|
|
|
20655
20653
|
}
|
|
20656
20654
|
) : null,
|
|
20657
20655
|
H ? /* @__PURE__ */ a(YE, { open: !0, onClose: W }) : null,
|
|
20658
|
-
|
|
20659
|
-
|
|
20656
|
+
G ? /* @__PURE__ */ a(
|
|
20657
|
+
GD,
|
|
20660
20658
|
{
|
|
20661
20659
|
open: !0,
|
|
20662
20660
|
result: T,
|
|
@@ -20680,7 +20678,7 @@ const kL = zi(function({
|
|
|
20680
20678
|
fonts: ce,
|
|
20681
20679
|
disabled: g,
|
|
20682
20680
|
onTabChange: B,
|
|
20683
|
-
onApply:
|
|
20681
|
+
onApply: Ae,
|
|
20684
20682
|
onClose: oe
|
|
20685
20683
|
}
|
|
20686
20684
|
) : null,
|
|
@@ -20723,7 +20721,7 @@ const kL = zi(function({
|
|
|
20723
20721
|
customImagePicker: Q,
|
|
20724
20722
|
disableBuiltinBackgroundImageSources: Oe,
|
|
20725
20723
|
onCustomImagePick: Se,
|
|
20726
|
-
onTabChange:
|
|
20724
|
+
onTabChange: Ve,
|
|
20727
20725
|
onApply: un,
|
|
20728
20726
|
onResetAtRule: dn,
|
|
20729
20727
|
onClose: cn
|
|
@@ -20752,7 +20750,7 @@ const kL = zi(function({
|
|
|
20752
20750
|
busy: no,
|
|
20753
20751
|
disabled: g,
|
|
20754
20752
|
onSave: Sr,
|
|
20755
|
-
onDelete:
|
|
20753
|
+
onDelete: We,
|
|
20756
20754
|
onClose: rt
|
|
20757
20755
|
}
|
|
20758
20756
|
) : null,
|
|
@@ -20814,7 +20812,7 @@ const kL = zi(function({
|
|
|
20814
20812
|
open: !0,
|
|
20815
20813
|
disabled: g,
|
|
20816
20814
|
customVideoPicker: Jn,
|
|
20817
|
-
onApply:
|
|
20815
|
+
onApply: Gi,
|
|
20818
20816
|
onCustomPick: $t,
|
|
20819
20817
|
onClose: kt
|
|
20820
20818
|
}
|
|
@@ -20838,7 +20836,7 @@ const kL = zi(function({
|
|
|
20838
20836
|
open: !0,
|
|
20839
20837
|
disabled: g,
|
|
20840
20838
|
onApply: er,
|
|
20841
|
-
onClose:
|
|
20839
|
+
onClose: ji
|
|
20842
20840
|
}
|
|
20843
20841
|
) : null,
|
|
20844
20842
|
An.open ? /* @__PURE__ */ a(
|
|
@@ -20928,7 +20926,7 @@ function SL(e, t) {
|
|
|
20928
20926
|
const o = n.current, i = r.current, l = [];
|
|
20929
20927
|
for (let c = 0; c < e.length; c += 1) {
|
|
20930
20928
|
const u = e[c] ?? "";
|
|
20931
|
-
o[c] === u && i[c] !== void 0 ? l.push(i[c]) : l.push(
|
|
20929
|
+
o[c] === u && i[c] !== void 0 ? l.push(i[c]) : l.push(ve(u).body);
|
|
20932
20930
|
}
|
|
20933
20931
|
return n.current = e, r.current = l, l;
|
|
20934
20932
|
}, [e, t, e.length]);
|
|
@@ -21043,11 +21041,11 @@ const UL = Eu(
|
|
|
21043
21041
|
}
|
|
21044
21042
|
);
|
|
21045
21043
|
}
|
|
21046
|
-
), VL = "_shell_yvznc_1", WL = "_scrollButton_yvznc_10",
|
|
21044
|
+
), VL = "_shell_yvznc_1", WL = "_scrollButton_yvznc_10", GL = "_tabList_yvznc_48", jL = "_tab_yvznc_48", qL = "_tabActive_yvznc_86", wo = {
|
|
21047
21045
|
shell: VL,
|
|
21048
21046
|
scrollButton: WL,
|
|
21049
|
-
tabList:
|
|
21050
|
-
tab:
|
|
21047
|
+
tabList: GL,
|
|
21048
|
+
tab: jL,
|
|
21051
21049
|
tabActive: qL
|
|
21052
21050
|
}, ZL = 5, $p = 120;
|
|
21053
21051
|
function YL({ pageCount: e, activeIndex: t, onSelect: n }) {
|
|
@@ -21174,7 +21172,7 @@ const JL = Eu(
|
|
|
21174
21172
|
}, N) {
|
|
21175
21173
|
const _ = re(), I = D(null), R = D(!1), [L, H] = x(null), W = D(b);
|
|
21176
21174
|
W.current = b;
|
|
21177
|
-
const
|
|
21175
|
+
const G = n ?? t, T = S && l && Hi(G), { geometry: K, indentState: j, refresh: X } = XL(L, G, T), ye = (q) => {
|
|
21178
21176
|
I.current = q, H(q), typeof N == "function" ? N(q) : N && (N.current = q);
|
|
21179
21177
|
};
|
|
21180
21178
|
Re(() => {
|
|
@@ -21184,13 +21182,13 @@ const JL = Eu(
|
|
|
21184
21182
|
if (R.current = !1, ce || Il(q, se, {
|
|
21185
21183
|
resolveDataUrl: w,
|
|
21186
21184
|
hydrateEmbeddedImages: y
|
|
21187
|
-
}), S && (St(q) || Hi(
|
|
21188
|
-
id(q), Bi(q),
|
|
21185
|
+
}), S && (St(q) || Hi(G))) {
|
|
21186
|
+
id(q), Bi(q), jl(q);
|
|
21189
21187
|
const B = St(q);
|
|
21190
21188
|
B && nh(q, B);
|
|
21191
21189
|
}
|
|
21192
|
-
S && (
|
|
21193
|
-
}, [t,
|
|
21190
|
+
S && (Gl(q), Oo(q, G));
|
|
21191
|
+
}, [t, G, S, w, y]), Re(() => {
|
|
21194
21192
|
if (h)
|
|
21195
21193
|
return h.current = () => {
|
|
21196
21194
|
R.current = !0;
|
|
@@ -21240,7 +21238,7 @@ const JL = Eu(
|
|
|
21240
21238
|
{
|
|
21241
21239
|
showRulers: T,
|
|
21242
21240
|
geometry: K,
|
|
21243
|
-
indentState:
|
|
21241
|
+
indentState: j,
|
|
21244
21242
|
rulerUnit: c,
|
|
21245
21243
|
zoomScale: u,
|
|
21246
21244
|
onMarginChange: m,
|
|
@@ -21414,17 +21412,17 @@ function s2({
|
|
|
21414
21412
|
activeThreadId: L,
|
|
21415
21413
|
contextMenu: H,
|
|
21416
21414
|
commentThreads: W,
|
|
21417
|
-
commands:
|
|
21415
|
+
commands: G,
|
|
21418
21416
|
htmlFileDropDragging: T,
|
|
21419
21417
|
selectedImage: K,
|
|
21420
|
-
hiddenContextMenuCommands:
|
|
21418
|
+
hiddenContextMenuCommands: j,
|
|
21421
21419
|
pageLayoutEnabled: X = !0
|
|
21422
21420
|
}) {
|
|
21423
21421
|
const { htmlRef: ye, pagesRef: me, documentBridgeRef: q } = TL(), [se, be] = x(w), [ce, B] = dl({
|
|
21424
21422
|
value: g ? void 0 : b,
|
|
21425
21423
|
defaultValue: h,
|
|
21426
21424
|
onChange: r || g ? void 0 : P
|
|
21427
|
-
}), oe = g ? se : ce, [
|
|
21425
|
+
}), oe = g ? se : ce, [Ae, ie] = x(
|
|
21428
21426
|
() => r && (e.current.htmlModePageHtmlRef.current || y[0]) || ""
|
|
21429
21427
|
), Q = e.current;
|
|
21430
21428
|
Q.setHtmlModePageHtml = ie, g ? r || (ye.current = se) : ye.current = ce, r && (me.current = t.pages);
|
|
@@ -21466,15 +21464,15 @@ function s2({
|
|
|
21466
21464
|
const ee = (ge = e.current.multiPageVisualRef.current) == null ? void 0 : ge.getActivePageRoot();
|
|
21467
21465
|
ee instanceof HTMLDivElement && (e.current.visualRootRef.current = ee);
|
|
21468
21466
|
}, [r, i, nt.length, e]);
|
|
21469
|
-
const ht = pe(() => r ? nt[l ? i : 0] ?? "" :
|
|
21467
|
+
const ht = pe(() => r ? nt[l ? i : 0] ?? "" : ve(oe).body, [r, nt, i, l, oe]), bt = pe(
|
|
21470
21468
|
() => Zg(ft(ht)),
|
|
21471
21469
|
[ht]
|
|
21472
21470
|
);
|
|
21473
21471
|
Q.activePageHtmlRef.current = ht, Q.pageCanvasSizedRef.current = bt, Y(() => {
|
|
21474
21472
|
const ge = (st ? st.split(`
|
|
21475
21473
|
`) : []).map((Se) => {
|
|
21476
|
-
const
|
|
21477
|
-
return
|
|
21474
|
+
const Ve = document.createElement("link");
|
|
21475
|
+
return Ve.rel = "stylesheet", Ve.href = Se, Ve.setAttribute(zl, ""), document.head.append(Ve), Ve;
|
|
21478
21476
|
});
|
|
21479
21477
|
return () => {
|
|
21480
21478
|
for (const Se of ge) Se.remove();
|
|
@@ -21485,10 +21483,10 @@ function s2({
|
|
|
21485
21483
|
if (!L) return;
|
|
21486
21484
|
const ee = (ge) => {
|
|
21487
21485
|
var un;
|
|
21488
|
-
const Se = e.current,
|
|
21489
|
-
if ((un = Se.commentPanelRef.current) != null && un.contains(
|
|
21486
|
+
const Se = e.current, Ve = ge.target;
|
|
21487
|
+
if ((un = Se.commentPanelRef.current) != null && un.contains(Ve)) return;
|
|
21490
21488
|
const cn = Se.visualRootRef.current;
|
|
21491
|
-
cn && vb(cn,
|
|
21489
|
+
cn && vb(cn, Ve) || Se.setActiveThreadId(null);
|
|
21492
21490
|
};
|
|
21493
21491
|
return document.addEventListener("pointerdown", ee), () => document.removeEventListener("pointerdown", ee);
|
|
21494
21492
|
}, [L, e]), Y(() => {
|
|
@@ -21498,7 +21496,7 @@ function s2({
|
|
|
21498
21496
|
}, [r, n, t.pages, t.revision, i, Q]), Y(() => {
|
|
21499
21497
|
if (!S || n !== "visual") return;
|
|
21500
21498
|
const ee = e.current.visualRootRef.current;
|
|
21501
|
-
ee && (
|
|
21499
|
+
ee && (jA(ee, W), Cb(ee, N));
|
|
21502
21500
|
}, [S, n, W, N, oe, e]);
|
|
21503
21501
|
const Nt = n === "visual" && u && X && bt, Cn = pe(
|
|
21504
21502
|
() => L ? XA(W, L) : null,
|
|
@@ -21514,9 +21512,9 @@ function s2({
|
|
|
21514
21512
|
suppressPageFlushRef: Q.suppressPageFlushRef,
|
|
21515
21513
|
pendingInsertPageFocusRef: Q.pendingInsertPageFocusRef,
|
|
21516
21514
|
onActivePageIndexChange: (ee) => {
|
|
21517
|
-
var
|
|
21515
|
+
var Ve;
|
|
21518
21516
|
Q.activePageIndexRef.current = ee, Q.setActivePageIndex(ee);
|
|
21519
|
-
const ge = (
|
|
21517
|
+
const ge = (Ve = Q.multiPageVisualRef.current) == null ? void 0 : Ve.getContainer(), Se = ge ? et(ge, ee) : null;
|
|
21520
21518
|
Se instanceof HTMLDivElement && (Q.visualRootRef.current = Se);
|
|
21521
21519
|
},
|
|
21522
21520
|
onPageSelected: () => {
|
|
@@ -21526,7 +21524,7 @@ function s2({
|
|
|
21526
21524
|
const Se = me.current[ee] ?? "";
|
|
21527
21525
|
Q.recordPageVisualHtml(
|
|
21528
21526
|
ee,
|
|
21529
|
-
nn(ge,
|
|
21527
|
+
nn(ge, ve(Se).body),
|
|
21530
21528
|
!0
|
|
21531
21529
|
);
|
|
21532
21530
|
},
|
|
@@ -21534,7 +21532,7 @@ function s2({
|
|
|
21534
21532
|
const Se = me.current[ee] ?? "";
|
|
21535
21533
|
Q.recordPageVisualHtml(
|
|
21536
21534
|
ee,
|
|
21537
|
-
nn(ge,
|
|
21535
|
+
nn(ge, ve(Se).body),
|
|
21538
21536
|
!1
|
|
21539
21537
|
);
|
|
21540
21538
|
},
|
|
@@ -21563,7 +21561,7 @@ function s2({
|
|
|
21563
21561
|
JL,
|
|
21564
21562
|
{
|
|
21565
21563
|
ref: Q.visualRootRef,
|
|
21566
|
-
html:
|
|
21564
|
+
html: ve(oe).body,
|
|
21567
21565
|
pageHtml: oe,
|
|
21568
21566
|
rulerVisible: u,
|
|
21569
21567
|
rulerUnit: m,
|
|
@@ -21601,7 +21599,7 @@ function s2({
|
|
|
21601
21599
|
UL,
|
|
21602
21600
|
{
|
|
21603
21601
|
ref: Q.htmlAreaRef,
|
|
21604
|
-
html: r ?
|
|
21602
|
+
html: r ? Ae : oe,
|
|
21605
21603
|
onChange: (ee) => {
|
|
21606
21604
|
Q.htmlModePageHtmlRef.current = ee, ie(ee), Q.handleHtmlSurfaceChange(ee);
|
|
21607
21605
|
},
|
|
@@ -21665,8 +21663,8 @@ function s2({
|
|
|
21665
21663
|
canUnmergeCells: H.canUnmergeCells,
|
|
21666
21664
|
canDeletePage: H.canDeletePage,
|
|
21667
21665
|
canAddComment: H.canAddComment,
|
|
21668
|
-
hiddenCommands:
|
|
21669
|
-
commands:
|
|
21666
|
+
hiddenCommands: j,
|
|
21667
|
+
commands: G,
|
|
21670
21668
|
onClose: () => Q.setContextMenu((ee) => ({ ...ee, open: !1 }))
|
|
21671
21669
|
}
|
|
21672
21670
|
)
|
|
@@ -21701,10 +21699,10 @@ function y2({
|
|
|
21701
21699
|
menuVisible: L = !0,
|
|
21702
21700
|
toolbarVisible: H = !0,
|
|
21703
21701
|
allowedChrome: W,
|
|
21704
|
-
customActions:
|
|
21702
|
+
customActions: G,
|
|
21705
21703
|
customFonts: T,
|
|
21706
21704
|
transformHtml: K,
|
|
21707
|
-
sanitizeHtml:
|
|
21705
|
+
sanitizeHtml: j = !0,
|
|
21708
21706
|
loadCustomParagraphStyles: X,
|
|
21709
21707
|
onSaveCustomParagraphStyle: ye,
|
|
21710
21708
|
onDeleteCustomParagraphStyle: me,
|
|
@@ -21714,7 +21712,7 @@ function y2({
|
|
|
21714
21712
|
disableBuiltinBackgroundImageInsert: ce,
|
|
21715
21713
|
disableBuiltinBackgroundImageSources: B,
|
|
21716
21714
|
customAudioPicker: oe,
|
|
21717
|
-
disableBuiltinAudioInsert:
|
|
21715
|
+
disableBuiltinAudioInsert: Ae,
|
|
21718
21716
|
customVideoPicker: ie,
|
|
21719
21717
|
disableBuiltinVideoInsert: Q,
|
|
21720
21718
|
disableHtmlFileDrop: Oe = !1,
|
|
@@ -21728,7 +21726,7 @@ function y2({
|
|
|
21728
21726
|
optimizeEmbeddedImages: ee = !1,
|
|
21729
21727
|
enableMultiPages: ge = !1,
|
|
21730
21728
|
pages: Se,
|
|
21731
|
-
defaultPages:
|
|
21729
|
+
defaultPages: Ve,
|
|
21732
21730
|
onPagesChange: cn,
|
|
21733
21731
|
defaultRulerVisible: un = !0,
|
|
21734
21732
|
rulerUnit: dn = "in",
|
|
@@ -21742,8 +21740,8 @@ function y2({
|
|
|
21742
21740
|
onCapabilitiesValidation: Sr
|
|
21743
21741
|
}) {
|
|
21744
21742
|
var df;
|
|
21745
|
-
const
|
|
21746
|
-
|
|
21743
|
+
const We = !!(h || w), Ze = !!h, Mt = rt ? Wb(rt) : !0, J = ge ? Se !== void 0 : e !== void 0, ae = fr(
|
|
21744
|
+
Ve ?? (t.trim() ? [t] : [ur()])
|
|
21747
21745
|
);
|
|
21748
21746
|
let fe = ae;
|
|
21749
21747
|
!J && yt && Mt && (fe = ae.map(
|
|
@@ -21753,10 +21751,10 @@ function y2({
|
|
|
21753
21751
|
ee && De.current === null && (De.current = E1());
|
|
21754
21752
|
const ot = D(null);
|
|
21755
21753
|
ot.current === null && (ot.current = ee && De.current ? fe.map((s) => De.current.externalizeHtml(s)) : [...fe]);
|
|
21756
|
-
const vn = ge ? rn(ot.current) : ot.current[0] ?? "", ut =
|
|
21754
|
+
const vn = ge ? rn(ot.current) : ot.current[0] ?? "", ut = j ? pi(vn) : vn, mn = ge && Se !== void 0 ? rn(fr(Se)) : e, Jn = pe(() => {
|
|
21757
21755
|
if (mn !== void 0)
|
|
21758
|
-
return
|
|
21759
|
-
}, [mn,
|
|
21756
|
+
return j ? pi(mn) : mn;
|
|
21757
|
+
}, [mn, j]), Hn = D(n);
|
|
21760
21758
|
Hn.current = n;
|
|
21761
21759
|
const Ct = D(ee);
|
|
21762
21760
|
Ct.current = ee;
|
|
@@ -21777,11 +21775,11 @@ function y2({
|
|
|
21777
21775
|
[vt]
|
|
21778
21776
|
), [rs] = x(() => {
|
|
21779
21777
|
if (ee && e !== void 0 && !ge) {
|
|
21780
|
-
const s =
|
|
21778
|
+
const s = j ? pi(e) : e;
|
|
21781
21779
|
return De.current ? De.current.externalizeHtml(s) : s;
|
|
21782
21780
|
}
|
|
21783
21781
|
return ut;
|
|
21784
|
-
}), [kt,
|
|
21782
|
+
}), [kt, Gi] = dl({
|
|
21785
21783
|
value: l,
|
|
21786
21784
|
defaultValue: c,
|
|
21787
21785
|
onChange: u
|
|
@@ -21789,14 +21787,14 @@ function y2({
|
|
|
21789
21787
|
value: m,
|
|
21790
21788
|
defaultValue: g,
|
|
21791
21789
|
onChange: p
|
|
21792
|
-
}), [Qn, os] = x(Bn), [$o, is] = x(un),
|
|
21793
|
-
|
|
21790
|
+
}), [Qn, os] = x(Bn), [$o, is] = x(un), ji = D($o);
|
|
21791
|
+
ji.current = $o;
|
|
21794
21792
|
const [er, An] = x(null), [Uo, Dr] = dl({
|
|
21795
21793
|
value: ct,
|
|
21796
21794
|
defaultValue: to,
|
|
21797
21795
|
onChange: no
|
|
21798
|
-
}), O = D(null), Yt = D(null), qi = D(null), Rr = D(null), Dt = D(null), xr = D(!1), Zi = D(null), Et = D(null),
|
|
21799
|
-
|
|
21796
|
+
}), O = D(null), Yt = D(null), qi = D(null), Rr = D(null), Dt = D(null), xr = D(!1), Zi = D(null), Et = D(null), Pe = D(ge);
|
|
21797
|
+
Pe.current = ge;
|
|
21800
21798
|
const as = D(yt);
|
|
21801
21799
|
as.current = yt;
|
|
21802
21800
|
const Nd = D(Mt);
|
|
@@ -21805,8 +21803,8 @@ function y2({
|
|
|
21805
21803
|
tr.current = wt;
|
|
21806
21804
|
const Md = D(w);
|
|
21807
21805
|
Md.current = w;
|
|
21808
|
-
const Ed = D(
|
|
21809
|
-
Ed.current =
|
|
21806
|
+
const Ed = D(We);
|
|
21807
|
+
Ed.current = We;
|
|
21810
21808
|
const Yi = D(Qn);
|
|
21811
21809
|
Yi.current = Qn;
|
|
21812
21810
|
const Xi = D(Uo);
|
|
@@ -21830,9 +21828,9 @@ function y2({
|
|
|
21830
21828
|
ls.current = Se;
|
|
21831
21829
|
const Ld = pe(() => !ee || Se === void 0 ? Se : fr(Se).map((s) => {
|
|
21832
21830
|
var v;
|
|
21833
|
-
const d =
|
|
21831
|
+
const d = j ? pi(s) : s;
|
|
21834
21832
|
return ((v = De.current) == null ? void 0 : v.externalizeHtml(d)) ?? d;
|
|
21835
|
-
}), [ee, Se,
|
|
21833
|
+
}), [ee, Se, j]), Rt = US({
|
|
21836
21834
|
enabled: ge,
|
|
21837
21835
|
pagesProp: Ld,
|
|
21838
21836
|
defaultPages: ot.current ?? [ur()]
|
|
@@ -21853,16 +21851,16 @@ function y2({
|
|
|
21853
21851
|
z.current = kt;
|
|
21854
21852
|
const Kd = D($t);
|
|
21855
21853
|
Kd.current = $t;
|
|
21856
|
-
const Je = D(null), [, Ry] = x(0),
|
|
21857
|
-
|
|
21854
|
+
const Je = D(null), [, Ry] = x(0), Go = D(null);
|
|
21855
|
+
Go.current === null && (Go.current = uT(() => {
|
|
21858
21856
|
Ry((s) => s + 1);
|
|
21859
21857
|
}));
|
|
21860
21858
|
const ta = D(K);
|
|
21861
21859
|
ta.current = K;
|
|
21862
|
-
const $d = D(
|
|
21863
|
-
$d.current =
|
|
21864
|
-
const Jt = D({}), Vt = D(null), Qt = D(null), pn = D(null), gn = D(null), nr = D(null), Wt = D(null), [
|
|
21865
|
-
ds.current =
|
|
21860
|
+
const $d = D(j);
|
|
21861
|
+
$d.current = j;
|
|
21862
|
+
const Jt = D({}), Vt = D(null), Qt = D(null), pn = D(null), gn = D(null), nr = D(null), Wt = D(null), [jo, us] = x(gr), ds = D(jo);
|
|
21863
|
+
ds.current = jo;
|
|
21866
21864
|
const Kn = D(So), [qo, na] = x({
|
|
21867
21865
|
value: null,
|
|
21868
21866
|
unit: So,
|
|
@@ -21896,11 +21894,11 @@ function y2({
|
|
|
21896
21894
|
ys.current = Ud;
|
|
21897
21895
|
const [Vd, ws] = x({ type: null, mixed: !1 }), ti = D(Vd);
|
|
21898
21896
|
ti.current = Vd;
|
|
21899
|
-
const [Wd, Cs] = x(!1),
|
|
21900
|
-
|
|
21897
|
+
const [Wd, Cs] = x(!1), Gd = D(Wd);
|
|
21898
|
+
Gd.current = Wd;
|
|
21901
21899
|
const [oa, vs] = x(!1), ks = D(oa);
|
|
21902
21900
|
ks.current = oa;
|
|
21903
|
-
const [ia,
|
|
21901
|
+
const [ia, jd] = x(!1), aa = D(ia);
|
|
21904
21902
|
aa.current = ia;
|
|
21905
21903
|
const la = D(null), sa = D(null), [qd, Zd] = x(!1), Yd = D(qd);
|
|
21906
21904
|
Yd.current = qd;
|
|
@@ -21958,7 +21956,7 @@ function y2({
|
|
|
21958
21956
|
[rt]
|
|
21959
21957
|
), [or, ya] = x(() => ht ? nt : bp() ?? nt), [uo, wa] = x(() => Nt ? bt : yp() ?? bt), [li, Fy] = x(
|
|
21960
21958
|
() => qS() ?? "fitWidth"
|
|
21961
|
-
), [Vs, Hy] = x(1), [Ca, nm] = x([]), [va, Ws] = x(!1), [zy, ka] = x(!1), [Oy,
|
|
21959
|
+
), [Vs, Hy] = x(1), [Ca, nm] = x([]), [va, Ws] = x(!1), [zy, ka] = x(!1), [Oy, Gs] = x({
|
|
21962
21960
|
open: !1,
|
|
21963
21961
|
x: 0,
|
|
21964
21962
|
y: 0,
|
|
@@ -21968,8 +21966,8 @@ function y2({
|
|
|
21968
21966
|
canUnmergeCells: !1,
|
|
21969
21967
|
canDeletePage: !1,
|
|
21970
21968
|
canAddComment: !1
|
|
21971
|
-
}), [xt, mo] = x(null),
|
|
21972
|
-
|
|
21969
|
+
}), [xt, mo] = x(null), js = D(xt);
|
|
21970
|
+
js.current = xt;
|
|
21973
21971
|
const [Pa, rm] = x(!1), om = D(Pa);
|
|
21974
21972
|
om.current = Pa;
|
|
21975
21973
|
const [Aa, im] = x(!1), am = D(Aa);
|
|
@@ -22024,15 +22022,15 @@ function y2({
|
|
|
22024
22022
|
xa.current = Vs;
|
|
22025
22023
|
const Tm = D(se);
|
|
22026
22024
|
Tm.current = se;
|
|
22027
|
-
const Sm = D(
|
|
22028
|
-
Sm.current =
|
|
22025
|
+
const Sm = D(Ae);
|
|
22026
|
+
Sm.current = Ae;
|
|
22029
22027
|
const Dm = D(Q);
|
|
22030
22028
|
Dm.current = Q;
|
|
22031
22029
|
const Js = D(0), si = D(0), Rm = D(0), Ia = D(0), xm = D(0), _a = D(0), Im = D(0), fo = pe(() => cg(T), [T]), po = D(fo);
|
|
22032
22030
|
po.current = fo;
|
|
22033
22031
|
const Na = M(() => {
|
|
22034
22032
|
var s;
|
|
22035
|
-
if (
|
|
22033
|
+
if (Pe.current) {
|
|
22036
22034
|
const d = (s = Dt.current) == null ? void 0 : s.getActivePageRoot();
|
|
22037
22035
|
if (d instanceof HTMLElement) return d;
|
|
22038
22036
|
}
|
|
@@ -22047,7 +22045,7 @@ function y2({
|
|
|
22047
22045
|
const d = (v = Dt.current) == null ? void 0 : v.getActivePageIndex();
|
|
22048
22046
|
return typeof d == "number" ? d : Me.current;
|
|
22049
22047
|
}, []), ci = M(() => {
|
|
22050
|
-
if (
|
|
22048
|
+
if (Pe.current) {
|
|
22051
22049
|
const s = Dt.current;
|
|
22052
22050
|
if (!s) return null;
|
|
22053
22051
|
const d = Sn();
|
|
@@ -22058,7 +22056,7 @@ function y2({
|
|
|
22058
22056
|
}
|
|
22059
22057
|
return O.current;
|
|
22060
22058
|
}, [Sn]), go = M(() => {
|
|
22061
|
-
if (!
|
|
22059
|
+
if (!Pe.current) return de.current;
|
|
22062
22060
|
const s = Sn() ?? Me.current;
|
|
22063
22061
|
return Le.current[s] ?? "";
|
|
22064
22062
|
}, [Sn]);
|
|
@@ -22075,20 +22073,20 @@ function y2({
|
|
|
22075
22073
|
if (s) {
|
|
22076
22074
|
Qs.current = !0;
|
|
22077
22075
|
try {
|
|
22078
|
-
const d = getComputedStyle(s), v = parseFloat(d.paddingLeft) + parseFloat(d.paddingRight), E = parseFloat(d.paddingTop) + parseFloat(d.paddingBottom), F = Math.max(0, s.clientWidth - v),
|
|
22076
|
+
const d = getComputedStyle(s), v = parseFloat(d.paddingLeft) + parseFloat(d.paddingRight), E = parseFloat(d.paddingTop) + parseFloat(d.paddingBottom), F = Math.max(0, s.clientWidth - v), $ = Math.max(0, s.clientHeight - E);
|
|
22079
22077
|
let ne = 0, le = 0;
|
|
22080
22078
|
if (Od.current) {
|
|
22081
|
-
const
|
|
22082
|
-
|
|
22079
|
+
const Te = u1(ft(zd.current));
|
|
22080
|
+
Te && (ne = Te.width, le = Te.height);
|
|
22083
22081
|
} else {
|
|
22084
|
-
const
|
|
22085
|
-
ne = ((
|
|
22082
|
+
const Te = Na(), Ge = xa.current > 0 ? xa.current : 1;
|
|
22083
|
+
ne = ((Te == null ? void 0 : Te.offsetWidth) ?? 0) / Ge, le = $;
|
|
22086
22084
|
}
|
|
22087
|
-
ne <= 0 && (ne = F), le <= 0 && (le =
|
|
22085
|
+
ne <= 0 && (ne = F), le <= 0 && (le = $);
|
|
22088
22086
|
const Ce = vP(
|
|
22089
22087
|
Ra.current,
|
|
22090
22088
|
F,
|
|
22091
|
-
|
|
22089
|
+
$,
|
|
22092
22090
|
ne,
|
|
22093
22091
|
le
|
|
22094
22092
|
);
|
|
@@ -22257,62 +22255,62 @@ function y2({
|
|
|
22257
22255
|
vt
|
|
22258
22256
|
);
|
|
22259
22257
|
d != null && d.fullReplace && !F && Ct.current && ((Ce = De.current) == null || Ce.clear());
|
|
22260
|
-
const
|
|
22258
|
+
const $ = $e(E);
|
|
22261
22259
|
if (F)
|
|
22262
|
-
return de.current =
|
|
22263
|
-
|
|
22260
|
+
return de.current = $, { stored: $, stateUpdated: !1 };
|
|
22261
|
+
$ !== de.current && (Xt.current = !0);
|
|
22264
22262
|
const ne = io.current;
|
|
22265
|
-
if (
|
|
22266
|
-
const
|
|
22267
|
-
if (!
|
|
22268
|
-
return de.current =
|
|
22269
|
-
const
|
|
22270
|
-
return de.current =
|
|
22271
|
-
kn(
|
|
22263
|
+
if (Pe.current) {
|
|
22264
|
+
const Te = Rt;
|
|
22265
|
+
if (!Te)
|
|
22266
|
+
return de.current = $, { stored: $, stateUpdated: !1 };
|
|
22267
|
+
const Ge = Te.replacePages(Gr($));
|
|
22268
|
+
return de.current = Ge.joined, Le.current = Ge.pages, z.current === "html" && !Ct.current && (ne == null || ne.setHtml($)), oo(
|
|
22269
|
+
kn(Ge.pages),
|
|
22272
22270
|
Me.current
|
|
22273
|
-
), { stored:
|
|
22271
|
+
), { stored: $, stateUpdated: !0 };
|
|
22274
22272
|
}
|
|
22275
|
-
return Ct.current ? (de.current =
|
|
22273
|
+
return Ct.current ? (de.current = $, ne == null || ne.setStorageHtml($), Wi($), { stored: $, stateUpdated: !0 }) : (de.current = $, ne == null || ne.setHtml($), { stored: $, stateUpdated: !0 });
|
|
22276
22274
|
},
|
|
22277
22275
|
[$e, vt, kn, Wi, oo]
|
|
22278
22276
|
), en = M(
|
|
22279
22277
|
(s, d, v, E) => {
|
|
22280
22278
|
var le;
|
|
22281
|
-
const F = s.map((Ce) => $e(Ce)),
|
|
22282
|
-
if (
|
|
22283
|
-
const ne =
|
|
22279
|
+
const F = s.map((Ce) => $e(Ce)), $ = Rt;
|
|
22280
|
+
if (!$) return rn(F);
|
|
22281
|
+
const ne = $.setPages(F, { editedIndex: v });
|
|
22284
22282
|
if (!ne.changed)
|
|
22285
22283
|
return ne.joined;
|
|
22286
22284
|
if (Le.current = ne.pages, Xt.current = !0, de.current = ne.joined, ls.current === void 0 && z.current === "html" && !Ct.current && ((le = io.current) == null || le.setHtml(ne.joined)), oo(
|
|
22287
22285
|
kn(ne.pages),
|
|
22288
22286
|
Me.current
|
|
22289
22287
|
), !(E != null && E.skipHistory) && tn(ue)) {
|
|
22290
|
-
const { changedIndices: Ce, pages:
|
|
22288
|
+
const { changedIndices: Ce, pages: Te } = ne;
|
|
22291
22289
|
if (Ce.length === 1) {
|
|
22292
|
-
const
|
|
22293
|
-
ue.recordPageEdit(
|
|
22294
|
-
} else Ce.length > 1 ? ue.recordReplaceAll(
|
|
22290
|
+
const Ge = v ?? Ce[0];
|
|
22291
|
+
ue.recordPageEdit(Ge, Te[Ge] ?? "", { coalesce: d });
|
|
22292
|
+
} else Ce.length > 1 ? ue.recordReplaceAll(Te) : v !== void 0 ? ue.recordPageEdit(v, Te[v] ?? "", { coalesce: d }) : ue.recordReplaceAll(Te);
|
|
22295
22293
|
}
|
|
22296
22294
|
return Tn(), ne.joined;
|
|
22297
22295
|
},
|
|
22298
22296
|
[Tn, $e, kn, ue, Rt, oo]
|
|
22299
22297
|
), ar = M(
|
|
22300
22298
|
(s) => {
|
|
22301
|
-
var
|
|
22299
|
+
var $, ne;
|
|
22302
22300
|
if (z.current !== "visual") return;
|
|
22303
22301
|
const d = Ct.current ? (le) => {
|
|
22304
22302
|
var Ce;
|
|
22305
22303
|
return ((Ce = De.current) == null ? void 0 : Ce.getDataUrl(le)) ?? null;
|
|
22306
22304
|
} : void 0, v = Ct.current ? vt : void 0;
|
|
22307
|
-
if ((
|
|
22305
|
+
if (($ = Yt.current) == null || $.call(Yt), Pe.current) {
|
|
22308
22306
|
const le = (ne = Dt.current) == null ? void 0 : ne.getContainer();
|
|
22309
22307
|
if (!le) return;
|
|
22310
|
-
const Ce =
|
|
22311
|
-
for (let
|
|
22312
|
-
const
|
|
22313
|
-
if (!
|
|
22314
|
-
const
|
|
22315
|
-
Il(
|
|
22308
|
+
const Ce = Gr(s);
|
|
22309
|
+
for (let Te = 0; Te < Ce.length; Te += 1) {
|
|
22310
|
+
const Ge = et(le, Te);
|
|
22311
|
+
if (!Ge) continue;
|
|
22312
|
+
const Ue = bn(ve(Ce[Te] ?? "").body);
|
|
22313
|
+
Il(Ge, Ue, {
|
|
22316
22314
|
resolveDataUrl: d,
|
|
22317
22315
|
hydrateEmbeddedImages: v
|
|
22318
22316
|
});
|
|
@@ -22321,7 +22319,7 @@ function y2({
|
|
|
22321
22319
|
}
|
|
22322
22320
|
const E = O.current;
|
|
22323
22321
|
if (!E) return;
|
|
22324
|
-
const F = bn(
|
|
22322
|
+
const F = bn(ve(s).body);
|
|
22325
22323
|
Il(E, F, {
|
|
22326
22324
|
resolveDataUrl: d,
|
|
22327
22325
|
hydrateEmbeddedImages: v
|
|
@@ -22331,12 +22329,12 @@ function y2({
|
|
|
22331
22329
|
), Pt = M(
|
|
22332
22330
|
(s, d) => {
|
|
22333
22331
|
const { stored: v, stateUpdated: E } = ir(s, { fullReplace: !d });
|
|
22334
|
-
return !d && E && ar(v), tn(ue) ? ue.recordReplaceAll(
|
|
22332
|
+
return !d && E && ar(v), tn(ue) ? ue.recordReplaceAll(Gr(v)) : ue.record(v, { coalesce: d }), Tn(), v;
|
|
22335
22333
|
},
|
|
22336
22334
|
[Tn, ir, ue, ar]
|
|
22337
22335
|
), Uy = M(
|
|
22338
22336
|
(s) => {
|
|
22339
|
-
if (
|
|
22337
|
+
if (Pe.current) {
|
|
22340
22338
|
const d = Me.current, E = Le.current.slice();
|
|
22341
22339
|
E[d] = s, en(E, !1, d);
|
|
22342
22340
|
return;
|
|
@@ -22344,8 +22342,8 @@ function y2({
|
|
|
22344
22342
|
Pt(s, !1);
|
|
22345
22343
|
},
|
|
22346
22344
|
[en, Pt]
|
|
22347
|
-
), Lm =
|
|
22348
|
-
enabled: !
|
|
22345
|
+
), Lm = jD({
|
|
22346
|
+
enabled: !We && !Oe,
|
|
22349
22347
|
onHtml: Uy
|
|
22350
22348
|
}), xe = M(
|
|
22351
22349
|
(s, d) => {
|
|
@@ -22392,31 +22390,31 @@ function y2({
|
|
|
22392
22390
|
if (!v || !d) return [...E];
|
|
22393
22391
|
const F = Rt;
|
|
22394
22392
|
if (!F) return [...E];
|
|
22395
|
-
const
|
|
22393
|
+
const $ = F.dirtyPagesRef.current, ne = (s == null ? void 0 : s.allPages) === !0, le = Me.current;
|
|
22396
22394
|
let Ce = !1;
|
|
22397
|
-
const
|
|
22398
|
-
if (!(ne ||
|
|
22395
|
+
const Te = E.map((Ue, dt) => {
|
|
22396
|
+
if (!(ne || $.has(dt) || dt === le)) return Ue;
|
|
22399
22397
|
const Wn = et(v, dt);
|
|
22400
22398
|
let bo = null;
|
|
22401
|
-
if (Wn ? (
|
|
22402
|
-
const ff = bn(
|
|
22403
|
-
if (pf === ff) return
|
|
22399
|
+
if (Wn ? (jl(Wn), bo = Wn.innerHTML) : bo = d.flushPageHtml(dt), bo === null) {
|
|
22400
|
+
const ff = bn(ve(Ue).body), pf = $f(ff);
|
|
22401
|
+
if (pf === ff) return Ue;
|
|
22404
22402
|
const gf = Mr(
|
|
22405
|
-
nn(pf,
|
|
22406
|
-
|
|
22403
|
+
nn(pf, ve(Ue).body),
|
|
22404
|
+
Ue
|
|
22407
22405
|
);
|
|
22408
|
-
return gf !==
|
|
22406
|
+
return gf !== Ue && (Ce = !0), gf;
|
|
22409
22407
|
}
|
|
22410
|
-
const hw = nn(bo,
|
|
22411
|
-
return mf !==
|
|
22408
|
+
const hw = nn(bo, ve(Ue).body), mf = Mr(hw, Ue, Wn ?? void 0);
|
|
22409
|
+
return mf !== Ue && (Ce = !0), mf;
|
|
22412
22410
|
});
|
|
22413
22411
|
if (Ce) {
|
|
22414
|
-
const
|
|
22412
|
+
const Ue = Ct.current ? Te.map((Fr) => $e(Fr)) : Te, dt = F.setPages(Ue);
|
|
22415
22413
|
de.current = dt.joined;
|
|
22416
22414
|
}
|
|
22417
22415
|
F.markPagesClean();
|
|
22418
|
-
const
|
|
22419
|
-
return Ct.current ?
|
|
22416
|
+
const Ge = Ce ? F.pages : E;
|
|
22417
|
+
return Ct.current ? Ge.map((Ue) => $e(Ue)) : [...Ge];
|
|
22420
22418
|
},
|
|
22421
22419
|
[$e, Rt, Mr]
|
|
22422
22420
|
), Er = M(
|
|
@@ -22427,8 +22425,8 @@ function y2({
|
|
|
22427
22425
|
[en, Mr]
|
|
22428
22426
|
), Lr = M(
|
|
22429
22427
|
(s, d, v) => {
|
|
22430
|
-
const E = Le.current[s] ?? "", F =
|
|
22431
|
-
nn(
|
|
22428
|
+
const E = Le.current[s] ?? "", F = ve(d).body, $ = $f(F), ne = $ === F ? d : Mr(
|
|
22429
|
+
nn($, ve(E).body),
|
|
22432
22430
|
E
|
|
22433
22431
|
), le = lu(Le.current, s, ne);
|
|
22434
22432
|
le.changed && en(le.pages, v, s);
|
|
@@ -22436,25 +22434,25 @@ function y2({
|
|
|
22436
22434
|
[en, Mr]
|
|
22437
22435
|
), ui = M(
|
|
22438
22436
|
(s, d) => {
|
|
22439
|
-
const v =
|
|
22440
|
-
|
|
22437
|
+
const v = ve(s).body;
|
|
22438
|
+
Pe.current ? Er(Me.current, v, d) : xe(v, d);
|
|
22441
22439
|
},
|
|
22442
22440
|
[Er, xe]
|
|
22443
22441
|
), we = M(
|
|
22444
22442
|
(s, d, v) => {
|
|
22445
22443
|
var ne;
|
|
22446
|
-
const E = v ?
|
|
22447
|
-
if (!
|
|
22444
|
+
const E = v ? ve(v).body : s.innerHTML, F = (le) => v ? E : nn(E, ve(le).body);
|
|
22445
|
+
if (!Pe.current) {
|
|
22448
22446
|
xe(F(de.current), d);
|
|
22449
22447
|
return;
|
|
22450
22448
|
}
|
|
22451
|
-
const
|
|
22452
|
-
if (
|
|
22449
|
+
const $ = (ne = Dt.current) == null ? void 0 : ne.getContainer();
|
|
22450
|
+
if (!$) {
|
|
22453
22451
|
xe(F(de.current), d);
|
|
22454
22452
|
return;
|
|
22455
22453
|
}
|
|
22456
22454
|
for (let le = 0; le < Le.current.length; le += 1)
|
|
22457
|
-
if (et(
|
|
22455
|
+
if (et($, le) === s) {
|
|
22458
22456
|
Er(le, F(Le.current[le] ?? ""), d);
|
|
22459
22457
|
return;
|
|
22460
22458
|
}
|
|
@@ -22473,15 +22471,15 @@ function y2({
|
|
|
22473
22471
|
La
|
|
22474
22472
|
),
|
|
22475
22473
|
[La]
|
|
22476
|
-
),
|
|
22474
|
+
), Gy = pe(
|
|
22477
22475
|
() => $N(
|
|
22478
22476
|
() => O.current,
|
|
22479
22477
|
() => de.current,
|
|
22480
22478
|
Ba,
|
|
22481
|
-
(s) => xe(
|
|
22479
|
+
(s) => xe(ve(s).body, !1)
|
|
22482
22480
|
),
|
|
22483
22481
|
[Ba, xe]
|
|
22484
|
-
),
|
|
22482
|
+
), jy = pe(
|
|
22485
22483
|
() => Lp(
|
|
22486
22484
|
() => O.current,
|
|
22487
22485
|
dn ?? "in",
|
|
@@ -22508,7 +22506,7 @@ function y2({
|
|
|
22508
22506
|
},
|
|
22509
22507
|
(s) => Le.current[s] ?? "",
|
|
22510
22508
|
Ba,
|
|
22511
|
-
(s, d) => Er(s,
|
|
22509
|
+
(s, d) => Er(s, ve(d).body, !1)
|
|
22512
22510
|
),
|
|
22513
22511
|
[Ba, Er]
|
|
22514
22512
|
), Yy = pe(
|
|
@@ -22523,10 +22521,10 @@ function y2({
|
|
|
22523
22521
|
),
|
|
22524
22522
|
[dn, we]
|
|
22525
22523
|
), Fa = M(() => {
|
|
22526
|
-
const s =
|
|
22524
|
+
const s = Pe.current ? At() : [de.current];
|
|
22527
22525
|
return s[Me.current] ?? s[0] ?? "";
|
|
22528
22526
|
}, [At]), Br = M(() => {
|
|
22529
|
-
if (!
|
|
22527
|
+
if (!Pe.current) return [de.current];
|
|
22530
22528
|
if (z.current === "html") {
|
|
22531
22529
|
const s = Le.current.slice();
|
|
22532
22530
|
return s[Me.current] = zn.current, s;
|
|
@@ -22534,15 +22532,15 @@ function y2({
|
|
|
22534
22532
|
return At({ allPages: !0 });
|
|
22535
22533
|
}, [At]), Ha = M(
|
|
22536
22534
|
(s) => {
|
|
22537
|
-
if (!
|
|
22535
|
+
if (!Pe.current || z.current !== "visual" || !fn.current) return;
|
|
22538
22536
|
xr.current = !0;
|
|
22539
22537
|
const d = At(), v = Math.max(0, Math.min(s, d.length)), E = [...d], F = Nd.current && as.current ? Jf(
|
|
22540
22538
|
ur(),
|
|
22541
22539
|
as.current
|
|
22542
22540
|
) : ur();
|
|
22543
22541
|
E.splice(v, 0, F);
|
|
22544
|
-
const
|
|
22545
|
-
en(E, !1, void 0, { skipHistory: !0 }), tn(ue) && ue.recordInsertPage(v,
|
|
22542
|
+
const $ = E.map((ne) => $e(ne));
|
|
22543
|
+
en(E, !1, void 0, { skipHistory: !0 }), tn(ue) && ue.recordInsertPage(v, $), Me.current = v, Vo(v), Ir(!0), Zi.current = v;
|
|
22546
22544
|
},
|
|
22547
22545
|
[At, en, ue, $e]
|
|
22548
22546
|
), Fm = M(() => {
|
|
@@ -22552,7 +22550,7 @@ function y2({
|
|
|
22552
22550
|
const s = Sn();
|
|
22553
22551
|
s === null || !fn.current || Ha(s + 1);
|
|
22554
22552
|
}, [Ha, Sn]), zm = M(() => {
|
|
22555
|
-
if (!
|
|
22553
|
+
if (!Pe.current || z.current !== "visual" || !fn.current) return;
|
|
22556
22554
|
xr.current = !0;
|
|
22557
22555
|
const s = At();
|
|
22558
22556
|
if (s.length <= 1) {
|
|
@@ -22564,8 +22562,8 @@ function y2({
|
|
|
22564
22562
|
xr.current = !1;
|
|
22565
22563
|
return;
|
|
22566
22564
|
}
|
|
22567
|
-
const v = s[d] ?? "", E = s.filter((le, Ce) => Ce !== d), F = $e(v),
|
|
22568
|
-
en(E, !1, void 0, { skipHistory: !0 }), tn(ue) && ue.recordDeletePage(d, F,
|
|
22565
|
+
const v = s[d] ?? "", E = s.filter((le, Ce) => Ce !== d), F = $e(v), $ = E.map((le) => $e(le));
|
|
22566
|
+
en(E, !1, void 0, { skipHistory: !0 }), tn(ue) && ue.recordDeletePage(d, F, $);
|
|
22569
22567
|
const ne = Math.min(d, E.length - 1);
|
|
22570
22568
|
Me.current = ne, Vo(ne), Ir(!0);
|
|
22571
22569
|
}, [At, en, ue, Sn, $e]);
|
|
@@ -22587,7 +22585,7 @@ function y2({
|
|
|
22587
22585
|
},
|
|
22588
22586
|
[kn, ue, Rt, oo, ar]
|
|
22589
22587
|
), Oa = M(() => {
|
|
22590
|
-
if (z.current !== "visual" ||
|
|
22588
|
+
if (z.current !== "visual" || We) {
|
|
22591
22589
|
mo(null);
|
|
22592
22590
|
return;
|
|
22593
22591
|
}
|
|
@@ -22595,7 +22593,7 @@ function y2({
|
|
|
22595
22593
|
if (!s) return;
|
|
22596
22594
|
const d = pr(s);
|
|
22597
22595
|
mo((v) => d || (v && v.isConnected && s.contains(v) ? v : null));
|
|
22598
|
-
}, [
|
|
22596
|
+
}, [We]), Ka = M(() => {
|
|
22599
22597
|
if (tn(ue)) {
|
|
22600
22598
|
const d = ue.undo();
|
|
22601
22599
|
if (d === null) return;
|
|
@@ -22621,7 +22619,7 @@ function y2({
|
|
|
22621
22619
|
}
|
|
22622
22620
|
tn(ue) || ue.syncExternal(de.current);
|
|
22623
22621
|
}, [ge, ee, ue, Se]);
|
|
22624
|
-
const
|
|
22622
|
+
const U = M(() => {
|
|
22625
22623
|
Je.current = Rn({
|
|
22626
22624
|
mode: z.current,
|
|
22627
22625
|
visualEl: O.current,
|
|
@@ -22690,14 +22688,14 @@ function y2({
|
|
|
22690
22688
|
}
|
|
22691
22689
|
const d = cb(s);
|
|
22692
22690
|
bs(
|
|
22693
|
-
(
|
|
22691
|
+
($) => $.align === d.align && $.mixed === d.mixed ? $ : d
|
|
22694
22692
|
);
|
|
22695
22693
|
const v = qh(s);
|
|
22696
|
-
ws((
|
|
22694
|
+
ws(($) => $.type === v.type && $.mixed === v.mixed ? $ : v);
|
|
22697
22695
|
const E = k0(s);
|
|
22698
|
-
Cs((
|
|
22696
|
+
Cs(($) => $ === E ? $ : E);
|
|
22699
22697
|
const F = xA(s);
|
|
22700
|
-
Zd((
|
|
22698
|
+
Zd(($) => $ === F ? $ : F);
|
|
22701
22699
|
}, []), V = M(() => {
|
|
22702
22700
|
const s = O.current;
|
|
22703
22701
|
if (z.current !== "visual" || !s) {
|
|
@@ -22728,11 +22726,11 @@ function y2({
|
|
|
22728
22726
|
getHtml: () => z.current === "visual" && O.current ? O.current.innerHTML : de.current,
|
|
22729
22727
|
setHtml: (E) => {
|
|
22730
22728
|
if (z.current === "visual") {
|
|
22731
|
-
const F =
|
|
22729
|
+
const F = Pe.current ? Le.current[Me.current] ?? "" : de.current;
|
|
22732
22730
|
ui(
|
|
22733
22731
|
nn(
|
|
22734
|
-
|
|
22735
|
-
|
|
22732
|
+
ve(E).body,
|
|
22733
|
+
ve(F).body
|
|
22736
22734
|
),
|
|
22737
22735
|
!1
|
|
22738
22736
|
);
|
|
@@ -22747,7 +22745,7 @@ function y2({
|
|
|
22747
22745
|
[Pt, ui]
|
|
22748
22746
|
), Xy = M(
|
|
22749
22747
|
(s) => {
|
|
22750
|
-
if (!
|
|
22748
|
+
if (!Pe.current || s === Me.current) return;
|
|
22751
22749
|
lo.current && Lr(Me.current, zn.current, !0), lo.current = !1, Me.current = s, Vo(s);
|
|
22752
22750
|
const d = Le.current[s] ?? "";
|
|
22753
22751
|
zn.current = d;
|
|
@@ -22755,7 +22753,7 @@ function y2({
|
|
|
22755
22753
|
[Lr]
|
|
22756
22754
|
), Jy = M(
|
|
22757
22755
|
(s) => {
|
|
22758
|
-
if (lo.current = !0,
|
|
22756
|
+
if (lo.current = !0, Pe.current) {
|
|
22759
22757
|
if (Ct.current) {
|
|
22760
22758
|
const d = $e(s);
|
|
22761
22759
|
zn.current = d, Lr(Me.current, d, !0);
|
|
@@ -22770,13 +22768,13 @@ function y2({
|
|
|
22770
22768
|
(s) => {
|
|
22771
22769
|
var d;
|
|
22772
22770
|
if (z.current === "visual" && s === "html") {
|
|
22773
|
-
if (
|
|
22771
|
+
if (Pe.current) {
|
|
22774
22772
|
const v = At({ allPages: !0 }), E = Me.current, F = v[E] ?? v[0] ?? "";
|
|
22775
22773
|
zn.current = F, lo.current = !1, de.current = rn(v), ro();
|
|
22776
22774
|
} else if (O.current) {
|
|
22777
22775
|
const v = nn(
|
|
22778
22776
|
O.current.innerHTML,
|
|
22779
|
-
|
|
22777
|
+
ve(de.current).body
|
|
22780
22778
|
), E = mi(
|
|
22781
22779
|
v,
|
|
22782
22780
|
Ja(v, de.current, po.current, {
|
|
@@ -22784,14 +22782,14 @@ function y2({
|
|
|
22784
22782
|
})
|
|
22785
22783
|
);
|
|
22786
22784
|
if (Ct.current) {
|
|
22787
|
-
const F = $e(E),
|
|
22788
|
-
(d = io.current) == null || d.setStorageHtml(F), de.current = F, F !==
|
|
22785
|
+
const F = $e(E), $ = de.current;
|
|
22786
|
+
(d = io.current) == null || d.setStorageHtml(F), de.current = F, F !== $ && (Xt.current = !0, tn(ue) || ue.record(F, { coalesce: !0 }));
|
|
22789
22787
|
} else E !== de.current && Pt(E, !0);
|
|
22790
22788
|
}
|
|
22791
22789
|
}
|
|
22792
|
-
z.current === "html" && s === "visual" &&
|
|
22790
|
+
z.current === "html" && s === "visual" && Pe.current && (lo.current && Lr(Me.current, zn.current, !0), lo.current = !1), Gi(s), s !== "visual" && Ir(!1);
|
|
22793
22791
|
},
|
|
22794
|
-
[$e, ro, ue, Pt, Lr,
|
|
22792
|
+
[$e, ro, ue, Pt, Lr, Gi, At]
|
|
22795
22793
|
);
|
|
22796
22794
|
Y(() => {
|
|
22797
22795
|
if (!$t) return;
|
|
@@ -22815,24 +22813,24 @@ function y2({
|
|
|
22815
22813
|
var F;
|
|
22816
22814
|
On.current = null;
|
|
22817
22815
|
const E = O.current;
|
|
22818
|
-
if (!(!E || z.current !== "visual") && (
|
|
22819
|
-
const
|
|
22820
|
-
|
|
22816
|
+
if (!(!E || z.current !== "visual") && (U(), Om(), V(), mo(pr(E)), Dn(E), tr.current && Yi.current && !((F = qi.current) != null && F.contains(document.activeElement)))) {
|
|
22817
|
+
const $ = Je.current;
|
|
22818
|
+
$ && An(op(E, $));
|
|
22821
22819
|
}
|
|
22822
22820
|
}));
|
|
22823
22821
|
};
|
|
22824
22822
|
return document.addEventListener("selectionchange", s), () => {
|
|
22825
22823
|
document.removeEventListener("selectionchange", s), On.current !== null && (window.cancelAnimationFrame(On.current), On.current = null);
|
|
22826
22824
|
};
|
|
22827
|
-
}, [
|
|
22825
|
+
}, [U, Om, V, Dn]), Y(() => {
|
|
22828
22826
|
if (kt !== "html") return;
|
|
22829
22827
|
const s = Et.current;
|
|
22830
22828
|
if (!s) return;
|
|
22831
|
-
const d = () =>
|
|
22829
|
+
const d = () => U();
|
|
22832
22830
|
return s.addEventListener("select", d), s.addEventListener("keyup", d), s.addEventListener("mouseup", d), () => {
|
|
22833
22831
|
s.removeEventListener("select", d), s.removeEventListener("keyup", d), s.removeEventListener("mouseup", d);
|
|
22834
22832
|
};
|
|
22835
|
-
}, [kt,
|
|
22833
|
+
}, [kt, U]);
|
|
22836
22834
|
const Z = M((s) => {
|
|
22837
22835
|
const d = Rn({
|
|
22838
22836
|
mode: "visual",
|
|
@@ -22842,23 +22840,23 @@ function y2({
|
|
|
22842
22840
|
Je.current = E, s.focus();
|
|
22843
22841
|
const F = Ii(s, E);
|
|
22844
22842
|
if (F) {
|
|
22845
|
-
const
|
|
22843
|
+
const $ = window.getSelection();
|
|
22846
22844
|
try {
|
|
22847
|
-
|
|
22845
|
+
$ == null || $.removeAllRanges(), $ == null || $.addRange(F), Je.current = { ...E, visualRange: F };
|
|
22848
22846
|
} catch {
|
|
22849
22847
|
}
|
|
22850
22848
|
}
|
|
22851
22849
|
return Je.current ?? E;
|
|
22852
22850
|
}, []), Un = M(() => {
|
|
22853
|
-
la.current = null, sa.current = null,
|
|
22851
|
+
la.current = null, sa.current = null, jd(!1);
|
|
22854
22852
|
}, []), $m = M(() => {
|
|
22855
22853
|
if (!aa.current || !la.current || !sa.current || z.current !== "visual") return;
|
|
22856
22854
|
const s = O.current;
|
|
22857
22855
|
if (!s) return;
|
|
22858
|
-
|
|
22856
|
+
U();
|
|
22859
22857
|
const d = Je.current;
|
|
22860
|
-
!d || d.collapsed || aT(d, sa.current) || (Z(s), sT(s, la.current), we(s, !1),
|
|
22861
|
-
}, [
|
|
22858
|
+
!d || d.collapsed || aT(d, sa.current) || (Z(s), sT(s, la.current), we(s, !1), U(), V(), Un());
|
|
22859
|
+
}, [U, Z, xe, V, Un]), Um = M(() => {
|
|
22862
22860
|
if (z.current !== "visual") {
|
|
22863
22861
|
Un();
|
|
22864
22862
|
return;
|
|
@@ -22877,13 +22875,13 @@ function y2({
|
|
|
22877
22875
|
Un();
|
|
22878
22876
|
return;
|
|
22879
22877
|
}
|
|
22880
|
-
la.current = lT(s), sa.current = { ...d },
|
|
22881
|
-
}, [Un, Z,
|
|
22878
|
+
la.current = lT(s), sa.current = { ...d }, jd(!0), U();
|
|
22879
|
+
}, [Un, Z, U]), Qy = M(() => {
|
|
22882
22880
|
$m();
|
|
22883
22881
|
}, [$m]);
|
|
22884
22882
|
Y(() => {
|
|
22885
|
-
(kt !== "visual" ||
|
|
22886
|
-
}, [kt,
|
|
22883
|
+
(kt !== "visual" || We) && Un();
|
|
22884
|
+
}, [kt, We, Un]);
|
|
22887
22885
|
const ic = M(
|
|
22888
22886
|
(s, d) => {
|
|
22889
22887
|
if (z.current !== "visual") return;
|
|
@@ -22892,14 +22890,14 @@ function y2({
|
|
|
22892
22890
|
const E = d ?? Kn.current, F = Wr(s, E);
|
|
22893
22891
|
if (!F) return;
|
|
22894
22892
|
Kn.current = F.unit;
|
|
22895
|
-
const
|
|
22896
|
-
if (
|
|
22897
|
-
Vt.current = F, Wt.current = { start:
|
|
22893
|
+
const $ = Z(v);
|
|
22894
|
+
if ($.collapsed) {
|
|
22895
|
+
Vt.current = F, Wt.current = { start: $.start, end: $.end }, V();
|
|
22898
22896
|
return;
|
|
22899
22897
|
}
|
|
22900
|
-
Vt.current = null, fu(v, F.value, F.unit) && (we(v, !1),
|
|
22898
|
+
Vt.current = null, fu(v, F.value, F.unit) && (we(v, !1), U(), V());
|
|
22901
22899
|
},
|
|
22902
|
-
[Z, xe,
|
|
22900
|
+
[Z, xe, U, V]
|
|
22903
22901
|
), Vm = M(
|
|
22904
22902
|
(s) => {
|
|
22905
22903
|
if (z.current !== "visual") return;
|
|
@@ -22910,9 +22908,9 @@ function y2({
|
|
|
22910
22908
|
Qt.current = { value: s }, Wt.current = { start: v.start, end: v.end }, V();
|
|
22911
22909
|
return;
|
|
22912
22910
|
}
|
|
22913
|
-
Qt.current = null, Xc(d, s) && (we(d, !1),
|
|
22911
|
+
Qt.current = null, Xc(d, s) && (we(d, !1), U(), V());
|
|
22914
22912
|
},
|
|
22915
|
-
[Z, xe,
|
|
22913
|
+
[Z, xe, U, V]
|
|
22916
22914
|
), ac = M(
|
|
22917
22915
|
(s, d) => {
|
|
22918
22916
|
if (z.current !== "visual") return;
|
|
@@ -22923,9 +22921,9 @@ function y2({
|
|
|
22923
22921
|
F.current = { value: d }, Wt.current = { start: E.start, end: E.end }, V();
|
|
22924
22922
|
return;
|
|
22925
22923
|
}
|
|
22926
|
-
F.current = null, Pi(v, s, d) && (we(v, !1),
|
|
22924
|
+
F.current = null, Pi(v, s, d) && (we(v, !1), U(), V());
|
|
22927
22925
|
},
|
|
22928
|
-
[Z, xe,
|
|
22926
|
+
[Z, xe, U, V]
|
|
22929
22927
|
), lc = M(
|
|
22930
22928
|
(s) => {
|
|
22931
22929
|
if (z.current !== "visual") return;
|
|
@@ -22937,10 +22935,10 @@ function y2({
|
|
|
22937
22935
|
const ne = Wr(s.size, s.unit);
|
|
22938
22936
|
ne && (Vt.current = ne, Kn.current = ne.unit);
|
|
22939
22937
|
}
|
|
22940
|
-
const F = ko(d),
|
|
22938
|
+
const F = ko(d), $ = {};
|
|
22941
22939
|
for (const ne of ln)
|
|
22942
|
-
s.marks[ne] !== F[ne] && (
|
|
22943
|
-
Jt.current =
|
|
22940
|
+
s.marks[ne] !== F[ne] && ($[ne] = s.marks[ne]);
|
|
22941
|
+
Jt.current = $, s.fontColorMixed || (pn.current = { value: s.fontColor }), s.highlightColorMixed || (gn.current = { value: s.highlightColor }), s.fontFamilyMixed || (Qt.current = { value: s.fontFamily }), Wt.current = { start: v.start, end: v.end }, V();
|
|
22944
22942
|
return;
|
|
22945
22943
|
}
|
|
22946
22944
|
if (Jt.current = {}, Vt.current = null, Qt.current = null, pn.current = null, gn.current = null, Wt.current = null, s.size !== null) {
|
|
@@ -22950,9 +22948,9 @@ function y2({
|
|
|
22950
22948
|
const E = ko(d);
|
|
22951
22949
|
for (const F of ln)
|
|
22952
22950
|
s.marks[F] !== E[F] && hu(d, F);
|
|
22953
|
-
s.fontFamilyMixed || Xc(d, s.fontFamily), s.fontColorMixed || Pi(d, "color", s.fontColor), s.highlightColorMixed || Pi(d, "backgroundColor", s.highlightColor), we(d, !1),
|
|
22951
|
+
s.fontFamilyMixed || Xc(d, s.fontFamily), s.fontColorMixed || Pi(d, "color", s.fontColor), s.highlightColorMixed || Pi(d, "backgroundColor", s.highlightColor), we(d, !1), U(), V();
|
|
22954
22952
|
},
|
|
22955
|
-
[Z, xe,
|
|
22953
|
+
[Z, xe, U, V]
|
|
22956
22954
|
), sc = M(
|
|
22957
22955
|
(s, d) => {
|
|
22958
22956
|
if (z.current !== "visual") return;
|
|
@@ -22961,12 +22959,12 @@ function y2({
|
|
|
22961
22959
|
Z(v), co((F) => ({ ...F, open: !1 }));
|
|
22962
22960
|
let E = db(v, s);
|
|
22963
22961
|
if (d && X0(v, d) && (E = !0), !E) {
|
|
22964
|
-
|
|
22962
|
+
U(), V();
|
|
22965
22963
|
return;
|
|
22966
22964
|
}
|
|
22967
|
-
we(v, !1),
|
|
22965
|
+
we(v, !1), U(), V();
|
|
22968
22966
|
},
|
|
22969
|
-
[Z, xe,
|
|
22967
|
+
[Z, xe, U, V]
|
|
22970
22968
|
), Wm = M(
|
|
22971
22969
|
(s) => {
|
|
22972
22970
|
if (z.current !== "visual") return;
|
|
@@ -22974,7 +22972,7 @@ function y2({
|
|
|
22974
22972
|
if (!d) return;
|
|
22975
22973
|
const v = Z(d);
|
|
22976
22974
|
if (Rs((E) => ({ ...E, open: !1 })), !ql(s)) {
|
|
22977
|
-
|
|
22975
|
+
U(), V();
|
|
22978
22976
|
return;
|
|
22979
22977
|
}
|
|
22980
22978
|
if (v.collapsed) {
|
|
@@ -22982,156 +22980,156 @@ function y2({
|
|
|
22982
22980
|
return;
|
|
22983
22981
|
}
|
|
22984
22982
|
if (nr.current = null, !zh(d, s)) {
|
|
22985
|
-
|
|
22983
|
+
U(), V();
|
|
22986
22984
|
return;
|
|
22987
22985
|
}
|
|
22988
|
-
we(d, !1),
|
|
22986
|
+
we(d, !1), U(), V();
|
|
22989
22987
|
},
|
|
22990
|
-
[Z, xe,
|
|
22988
|
+
[Z, xe, U, V]
|
|
22991
22989
|
), cc = M(
|
|
22992
22990
|
(s) => {
|
|
22993
22991
|
if (z.current !== "visual") return;
|
|
22994
22992
|
const d = ci();
|
|
22995
22993
|
if (!d) return;
|
|
22996
|
-
Z(d), _r((
|
|
22997
|
-
const v = go(), E = JSON.stringify(s.atRule) !== JSON.stringify(ft(
|
|
22994
|
+
Z(d), _r(($) => ({ ...$, open: !1 }));
|
|
22995
|
+
const v = go(), E = JSON.stringify(s.atRule) !== JSON.stringify(ft(ve(v).body)), F = Au(d, s);
|
|
22998
22996
|
if (E && Oo(d, F.pageHtml), !F.changed && !E) {
|
|
22999
|
-
|
|
22997
|
+
U(), V();
|
|
23000
22998
|
return;
|
|
23001
22999
|
}
|
|
23002
|
-
we(d, !1, F.pageHtml),
|
|
23000
|
+
we(d, !1, F.pageHtml), U(), V();
|
|
23003
23001
|
},
|
|
23004
|
-
[Z, we,
|
|
23005
|
-
),
|
|
23002
|
+
[Z, we, U, V, ci, go]
|
|
23003
|
+
), Gm = M(
|
|
23006
23004
|
(s) => {
|
|
23007
23005
|
if (z.current !== "visual") return;
|
|
23008
23006
|
const d = O.current;
|
|
23009
23007
|
if (d) {
|
|
23010
23008
|
if (Z(d), fa((v) => ({ ...v, open: !1 })), !LA(d, s)) {
|
|
23011
|
-
|
|
23009
|
+
U(), V();
|
|
23012
23010
|
return;
|
|
23013
23011
|
}
|
|
23014
|
-
we(d, !1),
|
|
23012
|
+
we(d, !1), U(), V();
|
|
23015
23013
|
}
|
|
23016
23014
|
},
|
|
23017
|
-
[Z, xe,
|
|
23018
|
-
),
|
|
23015
|
+
[Z, xe, U, V]
|
|
23016
|
+
), jm = M(
|
|
23019
23017
|
(s) => {
|
|
23020
23018
|
if (z.current !== "visual") return;
|
|
23021
23019
|
const d = O.current;
|
|
23022
23020
|
if (d) {
|
|
23023
23021
|
if (Z(d), Ns((v) => ({ ...v, open: !1 })), !zA(d, s)) {
|
|
23024
|
-
|
|
23022
|
+
U(), V();
|
|
23025
23023
|
return;
|
|
23026
23024
|
}
|
|
23027
|
-
we(d, !1),
|
|
23025
|
+
we(d, !1), U(), V();
|
|
23028
23026
|
}
|
|
23029
23027
|
},
|
|
23030
|
-
[Z, xe,
|
|
23028
|
+
[Z, xe, U, V]
|
|
23031
23029
|
), Va = M(
|
|
23032
23030
|
(s) => {
|
|
23033
23031
|
if (z.current !== "visual") return;
|
|
23034
23032
|
const d = O.current;
|
|
23035
23033
|
if (d) {
|
|
23036
23034
|
if (Z(d), pa({ open: !1 }), !ek(d, s, De.current)) {
|
|
23037
|
-
|
|
23035
|
+
U(), V();
|
|
23038
23036
|
return;
|
|
23039
23037
|
}
|
|
23040
|
-
we(d, !1),
|
|
23038
|
+
we(d, !1), U(), V();
|
|
23041
23039
|
}
|
|
23042
23040
|
},
|
|
23043
|
-
[Z, xe,
|
|
23041
|
+
[Z, xe, U, V]
|
|
23044
23042
|
), Wa = M(
|
|
23045
23043
|
(s) => {
|
|
23046
23044
|
if (z.current !== "visual") return;
|
|
23047
23045
|
const d = O.current;
|
|
23048
23046
|
if (d) {
|
|
23049
23047
|
if (Z(d), ga({ open: !1 }), !kT(d, s)) {
|
|
23050
|
-
|
|
23048
|
+
U(), V();
|
|
23051
23049
|
return;
|
|
23052
23050
|
}
|
|
23053
|
-
we(d, !1),
|
|
23051
|
+
we(d, !1), U(), V();
|
|
23054
23052
|
}
|
|
23055
23053
|
},
|
|
23056
|
-
[Z, xe,
|
|
23054
|
+
[Z, xe, U, V]
|
|
23057
23055
|
), qm = M(
|
|
23058
23056
|
(s) => {
|
|
23059
23057
|
if (z.current !== "visual") return;
|
|
23060
23058
|
const d = O.current;
|
|
23061
23059
|
if (d) {
|
|
23062
23060
|
if (Z(d), ii({ open: !1 }), !zT(d, s)) {
|
|
23063
|
-
|
|
23061
|
+
U(), V();
|
|
23064
23062
|
return;
|
|
23065
23063
|
}
|
|
23066
|
-
we(d, !1),
|
|
23064
|
+
we(d, !1), U(), V();
|
|
23067
23065
|
}
|
|
23068
23066
|
},
|
|
23069
|
-
[Z, xe,
|
|
23067
|
+
[Z, xe, U, V]
|
|
23070
23068
|
), Zm = M(
|
|
23071
23069
|
(s) => {
|
|
23072
23070
|
if (z.current !== "visual") return;
|
|
23073
23071
|
const d = O.current;
|
|
23074
23072
|
if (d) {
|
|
23075
23073
|
if (Z(d), Es({ open: !1 }), !N0(d, s)) {
|
|
23076
|
-
|
|
23074
|
+
U(), V();
|
|
23077
23075
|
return;
|
|
23078
23076
|
}
|
|
23079
|
-
we(d, !1),
|
|
23077
|
+
we(d, !1), U(), V(), Dn(d);
|
|
23080
23078
|
}
|
|
23081
23079
|
},
|
|
23082
|
-
[Z, xe,
|
|
23080
|
+
[Z, xe, U, V, Dn]
|
|
23083
23081
|
), Ym = M(
|
|
23084
23082
|
(s) => {
|
|
23085
23083
|
if (z.current !== "visual") return;
|
|
23086
23084
|
const d = O.current;
|
|
23087
23085
|
if (d) {
|
|
23088
23086
|
if (Z(d), Bs((v) => ({ ...v, open: !1 })), !pS(d, s)) {
|
|
23089
|
-
|
|
23087
|
+
U(), V();
|
|
23090
23088
|
return;
|
|
23091
23089
|
}
|
|
23092
|
-
we(d, !1),
|
|
23090
|
+
we(d, !1), U(), V();
|
|
23093
23091
|
}
|
|
23094
23092
|
},
|
|
23095
|
-
[Z, xe,
|
|
23093
|
+
[Z, xe, U, V]
|
|
23096
23094
|
), Xm = M(
|
|
23097
23095
|
(s) => {
|
|
23098
23096
|
if (z.current !== "visual") return;
|
|
23099
23097
|
const d = O.current;
|
|
23100
23098
|
if (d) {
|
|
23101
23099
|
if (Z(d), Hs((v) => ({ ...v, open: !1 })), !AS(d, s)) {
|
|
23102
|
-
|
|
23100
|
+
U(), V();
|
|
23103
23101
|
return;
|
|
23104
23102
|
}
|
|
23105
|
-
we(d, !1),
|
|
23103
|
+
we(d, !1), U(), V(), Dn(d);
|
|
23106
23104
|
}
|
|
23107
23105
|
},
|
|
23108
|
-
[Z, xe,
|
|
23106
|
+
[Z, xe, U, V, Dn]
|
|
23109
23107
|
), Jm = M(
|
|
23110
23108
|
(s) => {
|
|
23111
23109
|
if (z.current !== "visual") return;
|
|
23112
23110
|
const d = O.current;
|
|
23113
23111
|
if (d) {
|
|
23114
23112
|
if (Z(d), Os((v) => ({ ...v, open: !1 })), !ES(d, s)) {
|
|
23115
|
-
|
|
23113
|
+
U(), V();
|
|
23116
23114
|
return;
|
|
23117
23115
|
}
|
|
23118
|
-
we(d, !1),
|
|
23116
|
+
we(d, !1), U(), V();
|
|
23119
23117
|
}
|
|
23120
23118
|
},
|
|
23121
|
-
[Z, xe,
|
|
23119
|
+
[Z, xe, U, V]
|
|
23122
23120
|
), Vn = M(
|
|
23123
23121
|
(s) => {
|
|
23124
23122
|
if (z.current !== "visual") return;
|
|
23125
23123
|
const d = O.current;
|
|
23126
23124
|
if (d) {
|
|
23127
23125
|
if (Z(d), !s(d)) {
|
|
23128
|
-
|
|
23126
|
+
U(), V();
|
|
23129
23127
|
return;
|
|
23130
23128
|
}
|
|
23131
|
-
we(d, !1),
|
|
23129
|
+
we(d, !1), U(), V(), Dn(d);
|
|
23132
23130
|
}
|
|
23133
23131
|
},
|
|
23134
|
-
[Z, xe,
|
|
23132
|
+
[Z, xe, U, V, Dn]
|
|
23135
23133
|
), uc = M(
|
|
23136
23134
|
(s) => {
|
|
23137
23135
|
Va({
|
|
@@ -23161,26 +23159,26 @@ function y2({
|
|
|
23161
23159
|
title: s.title ?? "",
|
|
23162
23160
|
css: s.css
|
|
23163
23161
|
})) {
|
|
23164
|
-
|
|
23162
|
+
U(), V();
|
|
23165
23163
|
return;
|
|
23166
23164
|
}
|
|
23167
|
-
we(d, !1),
|
|
23165
|
+
we(d, !1), U(), V();
|
|
23168
23166
|
}
|
|
23169
23167
|
},
|
|
23170
|
-
[Z, xe,
|
|
23168
|
+
[Z, xe, U, V]
|
|
23171
23169
|
), Qm = M(
|
|
23172
23170
|
(s) => {
|
|
23173
23171
|
if (z.current !== "visual") return;
|
|
23174
23172
|
const d = O.current;
|
|
23175
23173
|
if (d) {
|
|
23176
23174
|
if (Z(d), ha((v) => ({ ...v, open: !1 })), !bk(d, s)) {
|
|
23177
|
-
|
|
23175
|
+
U(), V();
|
|
23178
23176
|
return;
|
|
23179
23177
|
}
|
|
23180
|
-
we(d, !1),
|
|
23178
|
+
we(d, !1), U(), V();
|
|
23181
23179
|
}
|
|
23182
23180
|
},
|
|
23183
|
-
[Z, xe,
|
|
23181
|
+
[Z, xe, U, V]
|
|
23184
23182
|
), ew = M(
|
|
23185
23183
|
(s, d) => {
|
|
23186
23184
|
xt != null && xt.isConnected && cS(xt, s, d);
|
|
@@ -23188,13 +23186,13 @@ function y2({
|
|
|
23188
23186
|
[xt]
|
|
23189
23187
|
), tw = M(() => {
|
|
23190
23188
|
const s = O.current;
|
|
23191
|
-
!s || !(xt != null && xt.isConnected) || (we(s, !1), Mc(s, xt),
|
|
23192
|
-
}, [xt, xe,
|
|
23189
|
+
!s || !(xt != null && xt.isConnected) || (we(s, !1), Mc(s, xt), U(), V());
|
|
23190
|
+
}, [xt, xe, U, V]), Ga = M(() => {
|
|
23193
23191
|
if (z.current !== "visual" || !O.current)
|
|
23194
23192
|
return de.current;
|
|
23195
23193
|
const s = nn(
|
|
23196
23194
|
O.current.innerHTML,
|
|
23197
|
-
|
|
23195
|
+
ve(de.current).body
|
|
23198
23196
|
);
|
|
23199
23197
|
return mi(
|
|
23200
23198
|
s,
|
|
@@ -23202,31 +23200,31 @@ function y2({
|
|
|
23202
23200
|
liveRoot: O.current
|
|
23203
23201
|
})
|
|
23204
23202
|
);
|
|
23205
|
-
}, []),
|
|
23206
|
-
if (
|
|
23203
|
+
}, []), ja = M(() => {
|
|
23204
|
+
if (Pe.current) {
|
|
23207
23205
|
const s = rn(Br());
|
|
23208
23206
|
return de.current = s, vt(s);
|
|
23209
23207
|
}
|
|
23210
23208
|
if (Xt.current) {
|
|
23211
|
-
const s = z.current === "visual" ?
|
|
23209
|
+
const s = z.current === "visual" ? Ga() : de.current;
|
|
23212
23210
|
s !== de.current && (de.current = s);
|
|
23213
23211
|
}
|
|
23214
23212
|
return vt(de.current);
|
|
23215
|
-
}, [Br, vt,
|
|
23213
|
+
}, [Br, vt, Ga]), nw = D(-1), ef = M(() => {
|
|
23216
23214
|
if (!Xt.current && so.current)
|
|
23217
23215
|
return so.current;
|
|
23218
|
-
const s = Xt.current && z.current === "visual" ?
|
|
23216
|
+
const s = Xt.current && z.current === "visual" ? Ga() : de.current;
|
|
23219
23217
|
return s !== de.current && (de.current = s), so.current = s, Xt.current = !1, s;
|
|
23220
|
-
}, [
|
|
23218
|
+
}, [Ga]), tf = M(() => {
|
|
23221
23219
|
if (!Xt.current && so.current)
|
|
23222
23220
|
return so.current;
|
|
23223
23221
|
const s = At(), d = JSON.stringify(s);
|
|
23224
23222
|
return so.current = d, nw.current = Rt.revision, Xt.current = !1, d;
|
|
23225
|
-
}, [At, Rt.revision]), rw = M(() =>
|
|
23223
|
+
}, [At, Rt.revision]), rw = M(() => Pe.current ? tf() : ef(), [tf, ef]);
|
|
23226
23224
|
KS({
|
|
23227
23225
|
onAutoSave: r ? async (s) => {
|
|
23228
23226
|
Xt.current = !1;
|
|
23229
|
-
const d =
|
|
23227
|
+
const d = Pe.current ? kn(JSON.parse(s)) : vt(s);
|
|
23230
23228
|
return r(d);
|
|
23231
23229
|
} : void 0,
|
|
23232
23230
|
getHtml: rw
|
|
@@ -23249,11 +23247,11 @@ function y2({
|
|
|
23249
23247
|
}
|
|
23250
23248
|
}, [ge, $e, ue, ee, Rt, Se]), Y(() => () => {
|
|
23251
23249
|
var s;
|
|
23252
|
-
(s =
|
|
23250
|
+
(s = Go.current) == null || s.cancel();
|
|
23253
23251
|
}, []);
|
|
23254
23252
|
const Be = pe(
|
|
23255
23253
|
() => ({
|
|
23256
|
-
getHtml:
|
|
23254
|
+
getHtml: ja,
|
|
23257
23255
|
setHtml: (s) => {
|
|
23258
23256
|
Pt(s, !1);
|
|
23259
23257
|
},
|
|
@@ -23292,17 +23290,17 @@ function y2({
|
|
|
23292
23290
|
openCompatibilityCheck: () => {
|
|
23293
23291
|
var v;
|
|
23294
23292
|
if (!rt) return;
|
|
23295
|
-
const s =
|
|
23293
|
+
const s = Pe.current ? [...Le.current] : [de.current], d = kp(s, rt);
|
|
23296
23294
|
ba(d), (v = Nr.current) == null || v.call(Nr, d), tm(!0);
|
|
23297
23295
|
},
|
|
23298
23296
|
toggleReadAloud: () => {
|
|
23299
|
-
const s =
|
|
23297
|
+
const s = Go.current;
|
|
23300
23298
|
if (!s) return;
|
|
23301
23299
|
const d = Je.current ?? Rn({
|
|
23302
23300
|
mode: z.current,
|
|
23303
23301
|
visualEl: O.current,
|
|
23304
23302
|
htmlEl: Et.current
|
|
23305
|
-
}), v = ap(Qa(d),
|
|
23303
|
+
}), v = ap(Qa(d), ja());
|
|
23306
23304
|
v && s.toggle(v);
|
|
23307
23305
|
},
|
|
23308
23306
|
toggleRuler: () => {
|
|
@@ -23310,9 +23308,9 @@ function y2({
|
|
|
23310
23308
|
},
|
|
23311
23309
|
isReadingAloud: () => {
|
|
23312
23310
|
var s;
|
|
23313
|
-
return ((s =
|
|
23311
|
+
return ((s = Go.current) == null ? void 0 : s.isSpeaking()) ?? !1;
|
|
23314
23312
|
},
|
|
23315
|
-
isRulerVisible: () =>
|
|
23313
|
+
isRulerVisible: () => ji.current,
|
|
23316
23314
|
canReadAloud: () => {
|
|
23317
23315
|
if (!ul()) return !1;
|
|
23318
23316
|
const s = Je.current ?? Rn({
|
|
@@ -23320,7 +23318,7 @@ function y2({
|
|
|
23320
23318
|
visualEl: O.current,
|
|
23321
23319
|
htmlEl: Et.current
|
|
23322
23320
|
});
|
|
23323
|
-
return ap(Qa(s),
|
|
23321
|
+
return ap(Qa(s), ja()) !== null;
|
|
23324
23322
|
},
|
|
23325
23323
|
undo: Ka,
|
|
23326
23324
|
redo: $a,
|
|
@@ -23357,15 +23355,15 @@ function y2({
|
|
|
23357
23355
|
const v = Z(d);
|
|
23358
23356
|
if (v.collapsed) {
|
|
23359
23357
|
const E = ko(d);
|
|
23360
|
-
Jt.current =
|
|
23358
|
+
Jt.current = GP(Jt.current, E, s), Wt.current = { start: v.start, end: v.end }, V();
|
|
23361
23359
|
return;
|
|
23362
23360
|
}
|
|
23363
|
-
Jt.current = {}, Wt.current = null, hu(d, s) && (we(d, !1),
|
|
23361
|
+
Jt.current = {}, Wt.current = null, hu(d, s) && (we(d, !1), U(), V());
|
|
23364
23362
|
},
|
|
23365
23363
|
clearFormatting: () => {
|
|
23366
23364
|
if (z.current !== "visual") return;
|
|
23367
23365
|
const s = O.current;
|
|
23368
|
-
!s || Z(s).collapsed || (Jt.current = {}, Vt.current = null, Qt.current = null, pn.current = null, gn.current = null, nr.current = null, Wt.current = null, iT(s) && (we(s, !1),
|
|
23366
|
+
!s || Z(s).collapsed || (Jt.current = {}, Vt.current = null, Qt.current = null, pn.current = null, gn.current = null, nr.current = null, Wt.current = null, iT(s) && (we(s, !1), U(), V()));
|
|
23369
23367
|
},
|
|
23370
23368
|
toggleFormatBrush: Um,
|
|
23371
23369
|
isFormatBrushActive: () => aa.current,
|
|
@@ -23381,14 +23379,14 @@ function y2({
|
|
|
23381
23379
|
Kn.current = s, na((le) => ({ ...le, unit: s }));
|
|
23382
23380
|
return;
|
|
23383
23381
|
}
|
|
23384
|
-
const E = Z(d), F = MP(d, ((ne = E.visualRange) == null ? void 0 : ne.startContainer) ?? d),
|
|
23382
|
+
const E = Z(d), F = MP(d, ((ne = E.visualRange) == null ? void 0 : ne.startContainer) ?? d), $ = gg(
|
|
23385
23383
|
v.value,
|
|
23386
23384
|
v.unit,
|
|
23387
23385
|
s,
|
|
23388
23386
|
F.parentPx,
|
|
23389
23387
|
F.rootPx
|
|
23390
23388
|
);
|
|
23391
|
-
ic(
|
|
23389
|
+
ic($, s);
|
|
23392
23390
|
},
|
|
23393
23391
|
getFontSize: () => rr.current.value,
|
|
23394
23392
|
getFontSizeUnit: () => rr.current.unit,
|
|
@@ -23412,32 +23410,32 @@ function y2({
|
|
|
23412
23410
|
setParagraphStyle: (s) => {
|
|
23413
23411
|
if (z.current !== "visual") return;
|
|
23414
23412
|
const d = O.current;
|
|
23415
|
-
d && (Z(d), f0(d, s) && (we(d, !1),
|
|
23413
|
+
d && (Z(d), f0(d, s) && (we(d, !1), U(), V()));
|
|
23416
23414
|
},
|
|
23417
23415
|
getParagraphStyle: () => hs.current.tag,
|
|
23418
23416
|
isParagraphStyleMixed: () => hs.current.mixed,
|
|
23419
23417
|
setTextAlign: (s) => {
|
|
23420
23418
|
if (z.current !== "visual") return;
|
|
23421
23419
|
const d = O.current;
|
|
23422
|
-
d && (Z(d), ub(d, s) && (we(d, !1),
|
|
23420
|
+
d && (Z(d), ub(d, s) && (we(d, !1), U(), V()));
|
|
23423
23421
|
},
|
|
23424
23422
|
getTextAlign: () => ys.current.align,
|
|
23425
23423
|
isTextAlignMixed: () => ys.current.mixed,
|
|
23426
23424
|
indent: () => {
|
|
23427
23425
|
if (z.current !== "visual") return;
|
|
23428
23426
|
const s = O.current;
|
|
23429
|
-
s && (Z(s), P0(s) && (we(s, !1),
|
|
23427
|
+
s && (Z(s), P0(s) && (we(s, !1), U(), V()));
|
|
23430
23428
|
},
|
|
23431
23429
|
outdent: () => {
|
|
23432
23430
|
if (z.current !== "visual") return;
|
|
23433
23431
|
const s = O.current;
|
|
23434
|
-
s && (Z(s), A0(s) && (we(s, !1),
|
|
23432
|
+
s && (Z(s), A0(s) && (we(s, !1), U(), V()));
|
|
23435
23433
|
},
|
|
23436
|
-
canOutdent: () => z.current === "visual" &&
|
|
23434
|
+
canOutdent: () => z.current === "visual" && Gd.current,
|
|
23437
23435
|
toggleList: (s) => {
|
|
23438
23436
|
if (z.current !== "visual") return;
|
|
23439
23437
|
const d = O.current;
|
|
23440
|
-
d && (Z(d), h0(d, s) && (we(d, !1),
|
|
23438
|
+
d && (Z(d), h0(d, s) && (we(d, !1), U(), V()));
|
|
23441
23439
|
},
|
|
23442
23440
|
isBulletList: () => ti.current.type === "ul" && !ti.current.mixed,
|
|
23443
23441
|
isNumberedList: () => ti.current.type === "ol" && !ti.current.mixed,
|
|
@@ -23481,7 +23479,7 @@ function y2({
|
|
|
23481
23479
|
paragraphTab: d ?? "spacing",
|
|
23482
23480
|
value: {
|
|
23483
23481
|
...F,
|
|
23484
|
-
atRule: ft(
|
|
23482
|
+
atRule: ft(ve(E).body)
|
|
23485
23483
|
}
|
|
23486
23484
|
});
|
|
23487
23485
|
},
|
|
@@ -23495,14 +23493,14 @@ function y2({
|
|
|
23495
23493
|
const d = Ys.current;
|
|
23496
23494
|
if (Xs.current && d) {
|
|
23497
23495
|
d.onPick((F) => {
|
|
23498
|
-
const
|
|
23496
|
+
const $ = go(), ne = s ? Ci(s) : Si();
|
|
23499
23497
|
cc({
|
|
23500
23498
|
...ne,
|
|
23501
23499
|
backgroundImage: {
|
|
23502
23500
|
...ne.backgroundImage,
|
|
23503
23501
|
src: F.src
|
|
23504
23502
|
},
|
|
23505
|
-
atRule: ft(
|
|
23503
|
+
atRule: ft(ve($).body)
|
|
23506
23504
|
});
|
|
23507
23505
|
});
|
|
23508
23506
|
return;
|
|
@@ -23514,7 +23512,7 @@ function y2({
|
|
|
23514
23512
|
paragraphTab: "backgroundImage",
|
|
23515
23513
|
value: {
|
|
23516
23514
|
...E,
|
|
23517
|
-
atRule: ft(
|
|
23515
|
+
atRule: ft(ve(v).body)
|
|
23518
23516
|
}
|
|
23519
23517
|
});
|
|
23520
23518
|
},
|
|
@@ -23579,7 +23577,7 @@ function y2({
|
|
|
23579
23577
|
highlightColorMixed: !1
|
|
23580
23578
|
}), !d.paragraph)) return;
|
|
23581
23579
|
const v = O.current;
|
|
23582
|
-
!v || z.current !== "visual" || (Z(v), Z0(v, d.paragraph) && (we(v, !1),
|
|
23580
|
+
!v || z.current !== "visual" || (Z(v), Z0(v, d.paragraph) && (we(v, !1), U(), V()));
|
|
23583
23581
|
},
|
|
23584
23582
|
customParagraphStylesEnabled: () => qs.current,
|
|
23585
23583
|
getCustomParagraphStyles: () => Sa.current,
|
|
@@ -23588,7 +23586,7 @@ function y2({
|
|
|
23588
23586
|
if (z.current !== "visual") return;
|
|
23589
23587
|
const d = O.current;
|
|
23590
23588
|
d && Z(d);
|
|
23591
|
-
const v = d ? hb(d) : Xl(), E = d ? Tu(d) : [], F = (v == null ? void 0 : v.href) ?? "",
|
|
23589
|
+
const v = d ? hb(d) : Xl(), E = d ? Tu(d) : [], F = (v == null ? void 0 : v.href) ?? "", $ = F.startsWith("#") ? F.slice(1) : "", ne = E.some((le) => le.id === $) ? $ : "";
|
|
23592
23590
|
fa({
|
|
23593
23591
|
open: !0,
|
|
23594
23592
|
tab: s ?? "link",
|
|
@@ -23604,7 +23602,7 @@ function y2({
|
|
|
23604
23602
|
});
|
|
23605
23603
|
},
|
|
23606
23604
|
applyLink: (s) => {
|
|
23607
|
-
|
|
23605
|
+
Gm(s);
|
|
23608
23606
|
},
|
|
23609
23607
|
openBookmarkDialog: () => {
|
|
23610
23608
|
if (z.current !== "visual") return;
|
|
@@ -23615,7 +23613,7 @@ function y2({
|
|
|
23615
23613
|
});
|
|
23616
23614
|
},
|
|
23617
23615
|
applyBookmark: (s) => {
|
|
23618
|
-
|
|
23616
|
+
jm(s);
|
|
23619
23617
|
},
|
|
23620
23618
|
openImageDialog: () => {
|
|
23621
23619
|
if (z.current !== "visual") return;
|
|
@@ -23678,12 +23676,12 @@ function y2({
|
|
|
23678
23676
|
insertHorizontalRule: () => {
|
|
23679
23677
|
if (z.current !== "visual") return;
|
|
23680
23678
|
const s = O.current;
|
|
23681
|
-
s && (Z(s), JT(s) && (we(s, !1),
|
|
23679
|
+
s && (Z(s), JT(s) && (we(s, !1), U(), V()));
|
|
23682
23680
|
},
|
|
23683
23681
|
insertPageBreak: () => {
|
|
23684
23682
|
if (z.current !== "visual") return;
|
|
23685
23683
|
const s = O.current;
|
|
23686
|
-
s && (Z(s), rS(s) && (we(s, !1),
|
|
23684
|
+
s && (Z(s), rS(s) && (we(s, !1), U(), V()));
|
|
23687
23685
|
},
|
|
23688
23686
|
insertPageBefore: () => {
|
|
23689
23687
|
Fm();
|
|
@@ -23692,12 +23690,12 @@ function y2({
|
|
|
23692
23690
|
Hm();
|
|
23693
23691
|
},
|
|
23694
23692
|
deletePage: () => {
|
|
23695
|
-
!
|
|
23693
|
+
!Pe.current || z.current !== "visual" || fn.current && (Br().length <= 1 || Is(!0));
|
|
23696
23694
|
},
|
|
23697
|
-
isMultiPagesEnabled: () =>
|
|
23698
|
-
hasSelectedPage: () =>
|
|
23699
|
-
canDeletePage: () =>
|
|
23700
|
-
canInsertPageBackgroundImage: () => !(z.current !== "visual" ||
|
|
23695
|
+
isMultiPagesEnabled: () => Pe.current,
|
|
23696
|
+
hasSelectedPage: () => Pe.current && z.current === "visual" && fn.current,
|
|
23697
|
+
canDeletePage: () => Pe.current && z.current === "visual" && fn.current && Br().length > 1,
|
|
23698
|
+
canInsertPageBackgroundImage: () => !(z.current !== "visual" || Pe.current && !fn.current),
|
|
23701
23699
|
canInsertParagraphBackgroundImage: () => {
|
|
23702
23700
|
if (z.current !== "visual") return !1;
|
|
23703
23701
|
const s = O.current;
|
|
@@ -23756,10 +23754,10 @@ function y2({
|
|
|
23756
23754
|
Vn((s) => M0(s));
|
|
23757
23755
|
},
|
|
23758
23756
|
insertColumnAfter: () => {
|
|
23759
|
-
Vn((s) =>
|
|
23757
|
+
Vn((s) => jf(s, "after"));
|
|
23760
23758
|
},
|
|
23761
23759
|
insertColumnBefore: () => {
|
|
23762
|
-
Vn((s) =>
|
|
23760
|
+
Vn((s) => jf(s, "before"));
|
|
23763
23761
|
},
|
|
23764
23762
|
deleteColumn: () => {
|
|
23765
23763
|
Vn((s) => E0(s));
|
|
@@ -23773,7 +23771,7 @@ function y2({
|
|
|
23773
23771
|
cut: async () => {
|
|
23774
23772
|
if (z.current !== "visual") return;
|
|
23775
23773
|
const s = O.current;
|
|
23776
|
-
s && (Z(s), await eT(s) && (we(s, !1),
|
|
23774
|
+
s && (Z(s), await eT(s) && (we(s, !1), U(), V()));
|
|
23777
23775
|
},
|
|
23778
23776
|
copy: async () => {
|
|
23779
23777
|
if (z.current !== "visual") return;
|
|
@@ -23783,7 +23781,7 @@ function y2({
|
|
|
23783
23781
|
deleteSelection: () => {
|
|
23784
23782
|
if (z.current !== "visual") return;
|
|
23785
23783
|
const s = O.current;
|
|
23786
|
-
s && (Z(s), Pb(s) && (we(s, !1),
|
|
23784
|
+
s && (Z(s), Pb(s) && (we(s, !1), U(), V()));
|
|
23787
23785
|
},
|
|
23788
23786
|
addComment: () => {
|
|
23789
23787
|
if (!tr.current || h || z.current !== "visual") return;
|
|
@@ -23797,7 +23795,7 @@ function y2({
|
|
|
23797
23795
|
const E = UA(s, d);
|
|
23798
23796
|
if (!E) return;
|
|
23799
23797
|
const F = qA(E);
|
|
23800
|
-
VA(s, F.id, d) && (ip(s, F.id),
|
|
23798
|
+
VA(s, F.id, d) && (ip(s, F.id), U(), Bm(s, !1), Dr([...Xi.current, F]), An(F.id));
|
|
23801
23799
|
},
|
|
23802
23800
|
toggleCommentsVisible: () => {
|
|
23803
23801
|
os((s) => {
|
|
@@ -23806,17 +23804,17 @@ function y2({
|
|
|
23806
23804
|
});
|
|
23807
23805
|
},
|
|
23808
23806
|
areCommentsVisible: () => Yi.current,
|
|
23809
|
-
canAddComment: () => !tr.current || h || z.current !== "visual" ? !1 : ks.current ||
|
|
23807
|
+
canAddComment: () => !tr.current || h || z.current !== "visual" ? !1 : ks.current || js.current !== null,
|
|
23810
23808
|
isCommentsEnabled: () => tr.current,
|
|
23811
23809
|
getCommentThreads: () => Xi.current,
|
|
23812
23810
|
setCommentThreads: (s) => Dr(s),
|
|
23813
23811
|
openCommentThread: (s) => {
|
|
23814
23812
|
const d = O.current;
|
|
23815
|
-
!d || z.current !== "visual" || ip(d, s) && (
|
|
23813
|
+
!d || z.current !== "visual" || ip(d, s) && (U(), An(s));
|
|
23816
23814
|
},
|
|
23817
23815
|
isContentLocked: () => Ed.current,
|
|
23818
23816
|
isLink: () => Yd.current,
|
|
23819
|
-
isImageSelected: () => z.current === "visual" &&
|
|
23817
|
+
isImageSelected: () => z.current === "visual" && js.current !== null,
|
|
23820
23818
|
isInTable: () => z.current === "visual" && om.current,
|
|
23821
23819
|
canMergeCells: () => z.current === "visual" && am.current,
|
|
23822
23820
|
canUnmergeCells: () => z.current === "visual" && sm.current,
|
|
@@ -23827,12 +23825,12 @@ function y2({
|
|
|
23827
23825
|
onOpen: () => gm.current()
|
|
23828
23826
|
} : {}
|
|
23829
23827
|
}),
|
|
23830
|
-
[Pt, xe, we, Bm, Km, Pn, Nm, Mm, Em, di, Ka, $a,
|
|
23828
|
+
[Pt, xe, we, Bm, Km, Pn, Nm, Mm, Em, di, Ka, $a, U, V, Z, ic, Vm, ac, lc, Wm, sc, cc, Gm, jm, Va, Wa, qm, Qm, Zm, Ym, Xm, Jm, Vn, uc, dc, mc, ja, Fa, Br, Fm, Hm, zm, Um, o, i, h, Dr, Cn, rt]
|
|
23831
23829
|
), qa = M(() => {
|
|
23832
23830
|
var v;
|
|
23833
23831
|
if (!rt)
|
|
23834
23832
|
return ba(null), null;
|
|
23835
|
-
const s =
|
|
23833
|
+
const s = Pe.current ? [...Le.current] : [de.current], d = kp(s, rt);
|
|
23836
23834
|
return ba(d), (v = Nr.current) == null || v.call(Nr, d), d;
|
|
23837
23835
|
}, [rt]);
|
|
23838
23836
|
Y(() => {
|
|
@@ -23849,60 +23847,60 @@ function y2({
|
|
|
23849
23847
|
Y(() => {
|
|
23850
23848
|
const s = nf.current;
|
|
23851
23849
|
if (nf.current = Mt, !s || Mt) return;
|
|
23852
|
-
if (
|
|
23853
|
-
const F = At({ allPages: !0 }),
|
|
23854
|
-
|
|
23850
|
+
if (Pe.current) {
|
|
23851
|
+
const F = At({ allPages: !0 }), $ = F.map(Fc);
|
|
23852
|
+
$.some((ne, le) => ne !== F[le]) && en($, !1);
|
|
23855
23853
|
return;
|
|
23856
23854
|
}
|
|
23857
|
-
const d = de.current, v =
|
|
23855
|
+
const d = de.current, v = ve(d), E = Fc(v.body);
|
|
23858
23856
|
E !== v.body && ir(mi(E, v.hrefs), { fullReplace: !0 });
|
|
23859
23857
|
}, [Mt, At, en, ir]);
|
|
23860
23858
|
const fc = M(
|
|
23861
23859
|
(s, d, v, E) => {
|
|
23862
|
-
const { activePageIndexAtCapture: F, pageHtmlAtCapture:
|
|
23860
|
+
const { activePageIndexAtCapture: F, pageHtmlAtCapture: $, selectedHtmlAtCapture: ne } = E;
|
|
23863
23861
|
if (s.mode === "visual") {
|
|
23864
23862
|
let le = O.current;
|
|
23865
|
-
if (
|
|
23863
|
+
if (Pe.current) {
|
|
23866
23864
|
const Ce = Dt.current;
|
|
23867
23865
|
Ce == null || Ce.ensurePageMounted(F);
|
|
23868
|
-
const
|
|
23869
|
-
le =
|
|
23866
|
+
const Te = Ce == null ? void 0 : Ce.getContainer();
|
|
23867
|
+
le = Te ? et(Te, F) : le;
|
|
23870
23868
|
}
|
|
23871
23869
|
if (le) {
|
|
23872
23870
|
O.current = le;
|
|
23873
23871
|
const Ce = sv(le, s, ne);
|
|
23874
23872
|
if (Ce && !Ce.collapsed) {
|
|
23875
23873
|
cv(Ce, d, v);
|
|
23876
|
-
const
|
|
23874
|
+
const Ue = Pe.current ? $ ?? Le.current[F] ?? "" : de.current;
|
|
23877
23875
|
ui(
|
|
23878
23876
|
nn(
|
|
23879
|
-
|
|
23880
|
-
|
|
23877
|
+
ve(le.innerHTML).body,
|
|
23878
|
+
ve(Ue).body
|
|
23881
23879
|
),
|
|
23882
23880
|
!1
|
|
23883
23881
|
);
|
|
23884
23882
|
return;
|
|
23885
23883
|
}
|
|
23886
23884
|
le.focus({ preventScroll: !0 });
|
|
23887
|
-
const
|
|
23885
|
+
const Te = Ii(le, s), Ge = Te !== null ? { ...s, visualRange: Te.cloneRange() } : s;
|
|
23888
23886
|
Pf({
|
|
23889
|
-
snapshot:
|
|
23887
|
+
snapshot: Ge,
|
|
23890
23888
|
visualEl: le,
|
|
23891
23889
|
htmlEl: Et.current,
|
|
23892
23890
|
getHtml: () => z.current === "visual" && le ? le.innerHTML : de.current,
|
|
23893
|
-
setHtml: (
|
|
23891
|
+
setHtml: (Ue) => {
|
|
23894
23892
|
if (z.current === "visual") {
|
|
23895
|
-
const dt =
|
|
23893
|
+
const dt = Pe.current ? Le.current[F] ?? "" : de.current;
|
|
23896
23894
|
ui(
|
|
23897
23895
|
nn(
|
|
23898
|
-
|
|
23899
|
-
|
|
23896
|
+
ve(Ue).body,
|
|
23897
|
+
ve(dt).body
|
|
23900
23898
|
),
|
|
23901
23899
|
!1
|
|
23902
23900
|
);
|
|
23903
23901
|
return;
|
|
23904
23902
|
}
|
|
23905
|
-
Pt(
|
|
23903
|
+
Pt(Ue, !1);
|
|
23906
23904
|
},
|
|
23907
23905
|
content: d,
|
|
23908
23906
|
asHtml: v
|
|
@@ -23914,9 +23912,9 @@ function y2({
|
|
|
23914
23912
|
},
|
|
23915
23913
|
[di, ui, Pt]
|
|
23916
23914
|
), rf = M(() => {
|
|
23917
|
-
On.current !== null && (window.cancelAnimationFrame(On.current), On.current = null,
|
|
23918
|
-
}, [
|
|
23919
|
-
var
|
|
23915
|
+
On.current !== null && (window.cancelAnimationFrame(On.current), On.current = null, U()), Ua();
|
|
23916
|
+
}, [U, Ua]), of = M(() => {
|
|
23917
|
+
var Ge, Ue;
|
|
23920
23918
|
const s = iv({
|
|
23921
23919
|
stored: Je.current,
|
|
23922
23920
|
mode: z.current,
|
|
@@ -23924,22 +23922,22 @@ function y2({
|
|
|
23924
23922
|
htmlEl: Et.current
|
|
23925
23923
|
}), d = {
|
|
23926
23924
|
...s,
|
|
23927
|
-
visualRange: ((
|
|
23925
|
+
visualRange: ((Ge = s.visualRange) == null ? void 0 : Ge.cloneRange()) ?? null
|
|
23928
23926
|
};
|
|
23929
23927
|
Je.current = d;
|
|
23930
|
-
const v =
|
|
23928
|
+
const v = Pe.current ? Me.current : 0, E = s.mode === "visual" && Pe.current ? Fa() : null, F = ((Ue = O.current) == null ? void 0 : Ue.innerHTML) ?? "", $ = E ? bn(ve(E).body) : F, ne = (() => {
|
|
23931
23929
|
if (s.mode === "html") {
|
|
23932
23930
|
const Fr = Be.getHtml(), Wn = Math.min(s.start, s.end), bo = Math.max(s.start, s.end);
|
|
23933
23931
|
return Fr.slice(Wn, bo);
|
|
23934
23932
|
}
|
|
23935
23933
|
const dt = O.current;
|
|
23936
23934
|
return dt && uv(dt, d) || s.text;
|
|
23937
|
-
})(), le = s.mode === "visual" &&
|
|
23935
|
+
})(), le = s.mode === "visual" && Pe.current && !s.collapsed && ne ? av($, F, ne) : null, Ce = le && Pe.current ? {
|
|
23938
23936
|
pageIndex: v,
|
|
23939
23937
|
start: le.start,
|
|
23940
23938
|
end: le.end,
|
|
23941
|
-
pageBodyAtCapture:
|
|
23942
|
-
} : null,
|
|
23939
|
+
pageBodyAtCapture: $
|
|
23940
|
+
} : null, Te = {
|
|
23943
23941
|
activePageIndexAtCapture: v,
|
|
23944
23942
|
pageHtmlAtCapture: E,
|
|
23945
23943
|
selectedHtmlAtCapture: ne
|
|
@@ -23953,15 +23951,15 @@ function y2({
|
|
|
23953
23951
|
setHtml: (dt) => {
|
|
23954
23952
|
Pt(dt, !1);
|
|
23955
23953
|
},
|
|
23956
|
-
insertText: (dt) => fc(d, dt, !1,
|
|
23954
|
+
insertText: (dt) => fc(d, dt, !1, Te),
|
|
23957
23955
|
insertHtml: (dt, Fr) => {
|
|
23958
23956
|
const Wn = Fr === void 0;
|
|
23959
|
-
fc(d, Wn ? dt : Fr, Wn,
|
|
23957
|
+
fc(d, Wn ? dt : Fr, Wn, Te);
|
|
23960
23958
|
}
|
|
23961
23959
|
};
|
|
23962
23960
|
}, [fc, Be.getHtml, Fa, Pt]), { catalog: Za, layout: af } = pe(
|
|
23963
|
-
() => fC(
|
|
23964
|
-
[
|
|
23961
|
+
() => fC(G, g_, h_),
|
|
23962
|
+
[G]
|
|
23965
23963
|
), Ya = pe(
|
|
23966
23964
|
() => AR(af, W),
|
|
23967
23965
|
[af, W]
|
|
@@ -23996,19 +23994,19 @@ function y2({
|
|
|
23996
23994
|
), ho = pe(
|
|
23997
23995
|
() => ({
|
|
23998
23996
|
...RP(Be),
|
|
23999
|
-
...pC(
|
|
23997
|
+
...pC(G, of, rf)
|
|
24000
23998
|
}),
|
|
24001
|
-
[Be,
|
|
23999
|
+
[Be, G, of, rf]
|
|
24002
24000
|
), wc = pe(
|
|
24003
24001
|
() => xP(Be),
|
|
24004
|
-
[Be,
|
|
24002
|
+
[Be, jo, qo, Zo, Xo, Qo, ra, Ca, va, Da, fo, xt, Pa, Aa, Ta, oa, ia, or, uo, li, Wo, ss, $t]
|
|
24005
24003
|
);
|
|
24006
24004
|
Re(() => {
|
|
24007
24005
|
Ut.bump("history");
|
|
24008
24006
|
}, [ss, Ut]), Re(() => {
|
|
24009
24007
|
Ut.bump("marks");
|
|
24010
24008
|
}, [
|
|
24011
|
-
|
|
24009
|
+
jo,
|
|
24012
24010
|
qo,
|
|
24013
24011
|
Zo,
|
|
24014
24012
|
Xo,
|
|
@@ -24036,7 +24034,7 @@ function y2({
|
|
|
24036
24034
|
]);
|
|
24037
24035
|
const iw = M(
|
|
24038
24036
|
(s) => {
|
|
24039
|
-
if (
|
|
24037
|
+
if (We || s.inputType !== "insertText" && s.inputType !== "insertReplacementText" || !s.data || !WP(Jt.current) && !Vt.current && !WC(Qt.current) && !kv({
|
|
24040
24038
|
color: pn.current,
|
|
24041
24039
|
backgroundColor: gn.current
|
|
24042
24040
|
}) && !$P(nr.current))
|
|
@@ -24053,20 +24051,20 @@ function y2({
|
|
|
24053
24051
|
},
|
|
24054
24052
|
Qt.current,
|
|
24055
24053
|
nr.current
|
|
24056
|
-
), Jt.current = {}, Vt.current = null, Qt.current = null, pn.current = null, gn.current = null, nr.current = null, Wt.current = null, we(d, !0),
|
|
24054
|
+
), Jt.current = {}, Vt.current = null, Qt.current = null, pn.current = null, gn.current = null, nr.current = null, Wt.current = null, we(d, !0), U(), V());
|
|
24057
24055
|
},
|
|
24058
|
-
[
|
|
24056
|
+
[We, xe, U, V]
|
|
24059
24057
|
), aw = M(
|
|
24060
24058
|
(s) => {
|
|
24061
24059
|
var Ce;
|
|
24062
|
-
if (
|
|
24060
|
+
if (We || !xC(s, cm.current)) return;
|
|
24063
24061
|
s.preventDefault(), s.stopPropagation();
|
|
24064
24062
|
let d = O.current;
|
|
24065
|
-
if (
|
|
24066
|
-
const
|
|
24067
|
-
if (
|
|
24068
|
-
const
|
|
24069
|
-
|
|
24063
|
+
if (Pe.current) {
|
|
24064
|
+
const Te = s.currentTarget instanceof HTMLElement && s.currentTarget.hasAttribute(Yr) ? s.currentTarget : I1(s.target);
|
|
24065
|
+
if (Te instanceof HTMLElement) {
|
|
24066
|
+
const Ge = If(Te);
|
|
24067
|
+
Ge !== null && ((Ce = Dt.current) == null || Ce.activatePageAt(Ge), O.current = Te, d = Te, fn.current = !0, Ir(!0));
|
|
24070
24068
|
}
|
|
24071
24069
|
} else s.currentTarget instanceof HTMLDivElement && (O.current = s.currentTarget, d = s.currentTarget);
|
|
24072
24070
|
if (!d) return;
|
|
@@ -24077,19 +24075,19 @@ function y2({
|
|
|
24077
24075
|
inTable: Ot(d, s.target) !== null,
|
|
24078
24076
|
canMergeCells: qf(d),
|
|
24079
24077
|
canUnmergeCells: Zf(d)
|
|
24080
|
-
},
|
|
24081
|
-
canDeletePage:
|
|
24078
|
+
}, $ = {
|
|
24079
|
+
canDeletePage: Pe.current && fn.current && At().length > 1
|
|
24082
24080
|
}, ne = {
|
|
24083
24081
|
canAddComment: tr.current && !h
|
|
24084
24082
|
};
|
|
24085
24083
|
if (v) {
|
|
24086
|
-
Mc(d, v),
|
|
24084
|
+
Mc(d, v), U(), mo(v), Gs({
|
|
24087
24085
|
open: !0,
|
|
24088
24086
|
x: s.clientX,
|
|
24089
24087
|
y: s.clientY,
|
|
24090
24088
|
kind: "image",
|
|
24091
24089
|
...F,
|
|
24092
|
-
|
|
24090
|
+
...$,
|
|
24093
24091
|
...ne,
|
|
24094
24092
|
inTable: Ot(d, v) !== null
|
|
24095
24093
|
});
|
|
@@ -24100,17 +24098,17 @@ function y2({
|
|
|
24100
24098
|
visualEl: d,
|
|
24101
24099
|
htmlEl: Et.current
|
|
24102
24100
|
});
|
|
24103
|
-
Je.current = le,
|
|
24101
|
+
Je.current = le, Gs({
|
|
24104
24102
|
open: !0,
|
|
24105
24103
|
x: s.clientX,
|
|
24106
24104
|
y: s.clientY,
|
|
24107
24105
|
kind: le.collapsed ? "caret" : "text",
|
|
24108
24106
|
...F,
|
|
24109
|
-
|
|
24107
|
+
...$,
|
|
24110
24108
|
canAddComment: ne.canAddComment && !le.collapsed
|
|
24111
24109
|
});
|
|
24112
24110
|
},
|
|
24113
|
-
[
|
|
24111
|
+
[We, U, Z, At, h, Ir]
|
|
24114
24112
|
), lw = M(
|
|
24115
24113
|
(s) => {
|
|
24116
24114
|
if (cm.current = s.pointerType, h) return;
|
|
@@ -24124,18 +24122,18 @@ function y2({
|
|
|
24124
24122
|
return;
|
|
24125
24123
|
}
|
|
24126
24124
|
}
|
|
24127
|
-
if (
|
|
24125
|
+
if (We && !tr.current) return;
|
|
24128
24126
|
const v = uu(d, s.target);
|
|
24129
24127
|
if (!v) {
|
|
24130
24128
|
mo(null);
|
|
24131
24129
|
return;
|
|
24132
24130
|
}
|
|
24133
|
-
s.preventDefault(), Mc(d, v),
|
|
24131
|
+
s.preventDefault(), Mc(d, v), U(), mo(v);
|
|
24134
24132
|
},
|
|
24135
|
-
[h,
|
|
24133
|
+
[h, We, U]
|
|
24136
24134
|
), uf = M(
|
|
24137
24135
|
(s) => {
|
|
24138
|
-
if (
|
|
24136
|
+
if (We) return;
|
|
24139
24137
|
if (s.key === "Tab" && !s.ctrlKey && !s.metaKey && !s.altKey) {
|
|
24140
24138
|
if (z.current !== "visual") return;
|
|
24141
24139
|
const v = O.current;
|
|
@@ -24145,7 +24143,7 @@ function y2({
|
|
|
24145
24143
|
Z(v);
|
|
24146
24144
|
const F = L0(v, s.shiftKey);
|
|
24147
24145
|
if (!F) return;
|
|
24148
|
-
s.preventDefault(), typeof F == "object" && F.changed && we(v, !1),
|
|
24146
|
+
s.preventDefault(), typeof F == "object" && F.changed && we(v, !1), U(), V(), Dn(v);
|
|
24149
24147
|
return;
|
|
24150
24148
|
}
|
|
24151
24149
|
if (!(s.ctrlKey || s.metaKey)) return;
|
|
@@ -24180,7 +24178,7 @@ function y2({
|
|
|
24180
24178
|
}
|
|
24181
24179
|
d === "p" && !s.shiftKey && (s.preventDefault(), ho.print());
|
|
24182
24180
|
},
|
|
24183
|
-
[
|
|
24181
|
+
[We, Ka, $a, Be, ho, Z, xe, U, V, Dn]
|
|
24184
24182
|
), sw = M(
|
|
24185
24183
|
(s) => {
|
|
24186
24184
|
if (s.key === "F1") {
|
|
@@ -24222,7 +24220,7 @@ function y2({
|
|
|
24222
24220
|
setActivePageIndex: Vo,
|
|
24223
24221
|
setHasSelectedPage: Ir,
|
|
24224
24222
|
setActiveThreadId: An,
|
|
24225
|
-
setContextMenu:
|
|
24223
|
+
setContextMenu: Gs,
|
|
24226
24224
|
recordVisualInputHtml: Vy,
|
|
24227
24225
|
recordPageVisualHtml: Er,
|
|
24228
24226
|
handleVisualBeforeInput: iw,
|
|
@@ -24237,8 +24235,8 @@ function y2({
|
|
|
24237
24235
|
multiPageRulerMarginChange: Zy,
|
|
24238
24236
|
multiPageRulerIndentChange: Yy,
|
|
24239
24237
|
singlePageRulerMarginPreview: Wy,
|
|
24240
|
-
singlePageRulerMarginChange:
|
|
24241
|
-
singlePageRulerIndentChange:
|
|
24238
|
+
singlePageRulerMarginChange: Gy,
|
|
24239
|
+
singlePageRulerIndentChange: jy,
|
|
24242
24240
|
resolveEmbeddedImageDataUrl: ee ? ns : void 0,
|
|
24243
24241
|
hydrateExportHtml: vt,
|
|
24244
24242
|
postCommentMessage: ow,
|
|
@@ -24300,7 +24298,7 @@ function y2({
|
|
|
24300
24298
|
queryRevisions: Ut,
|
|
24301
24299
|
chromeDisabled: Ze,
|
|
24302
24300
|
chromeLock: yc,
|
|
24303
|
-
contentLocked:
|
|
24301
|
+
contentLocked: We,
|
|
24304
24302
|
customizeToolbarOpen: Ps,
|
|
24305
24303
|
baseCatalog: Za,
|
|
24306
24304
|
allowedLayout: Ya,
|
|
@@ -24323,7 +24321,7 @@ function y2({
|
|
|
24323
24321
|
onAboutDialogClose: () => em(!1),
|
|
24324
24322
|
fontDialog: ca,
|
|
24325
24323
|
fontSizeState: qo,
|
|
24326
|
-
markState:
|
|
24324
|
+
markState: jo,
|
|
24327
24325
|
fontFamilyState: Zo,
|
|
24328
24326
|
fontColorState: Xo,
|
|
24329
24327
|
highlightColorState: Qo,
|
|
@@ -24376,7 +24374,7 @@ function y2({
|
|
|
24376
24374
|
onPageDialogResetAtRule: () => {
|
|
24377
24375
|
const s = ci();
|
|
24378
24376
|
if (!s || z.current !== "visual") return;
|
|
24379
|
-
const d =
|
|
24377
|
+
const d = Pe.current ? go() : ve(de.current).body, v = uA(s, d);
|
|
24380
24378
|
v.changed && (we(s, !1, v.pageHtml), _r((E) => ({
|
|
24381
24379
|
...E,
|
|
24382
24380
|
value: {
|
|
@@ -24480,7 +24478,7 @@ function y2({
|
|
|
24480
24478
|
pageStore: Rt,
|
|
24481
24479
|
mode: kt,
|
|
24482
24480
|
enableMultiPages: ge,
|
|
24483
|
-
contentLocked:
|
|
24481
|
+
contentLocked: We,
|
|
24484
24482
|
activePageIndex: ao,
|
|
24485
24483
|
hasSelectedPage: Wo,
|
|
24486
24484
|
pageZoomScale: Vs,
|
|
@@ -24581,7 +24579,7 @@ export {
|
|
|
24581
24579
|
fD as resolveEditorCapabilities,
|
|
24582
24580
|
pi as sanitizeDocumentHtml,
|
|
24583
24581
|
Qf as sanitizePageHtml,
|
|
24584
|
-
|
|
24582
|
+
Gr as splitPagesFromHtml,
|
|
24585
24583
|
w2 as stripCommentAnchors,
|
|
24586
24584
|
kD as validateHtmlAgainstCapabilities,
|
|
24587
24585
|
kp as validatePagesAgainstCapabilities
|