@harbour-enterprises/superdoc 0.9.33 → 0.9.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{index-Bq_aNm9n.es.js → index-BR0d39LK.es.js} +2 -2
- package/dist/chunks/{index-B5GDfEJg.es.js → index-CFw3GWZb.es.js} +1 -1
- package/dist/chunks/{index--PIRPKWt.cjs → index-Da1nm1Nx.cjs} +1 -1
- package/dist/chunks/{index-DrgTIkvI.cjs → index-zi2PhUgG.cjs} +1 -1
- package/dist/chunks/{super-editor.es-y2QD_ueu.cjs → super-editor.es-BBj7vFp-.cjs} +32 -32
- package/dist/chunks/{super-editor.es-B8noCvT1.es.js → super-editor.es-CPySz799.es.js} +1889 -1889
- package/dist/chunks/{url-BDmRlERW.es.js → url-BBWjYHis.es.js} +1 -1
- package/dist/chunks/{url-C5DCBLAS.cjs → url-CsA0aP-j.cjs} +1 -1
- package/dist/chunks/{xml-js-DMX8C2aY.es.js → xml-js-BK8neRFY.es.js} +407 -411
- package/dist/chunks/{xml-js-DN6JJ8Mw.cjs → xml-js-Dl3GDIvM.cjs} +2 -2
- package/dist/super-editor/chunks/{converter-CdhiEvSA.js → converter-A8jhEHAV.js} +271 -271
- package/dist/super-editor/chunks/{docx-zipper-Cb4eXMOp.js → docx-zipper-ChOmGxQY.js} +1 -1
- package/dist/super-editor/chunks/{editor-Czx51mKu.js → editor-CPeWTjoI.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-BE-PZVKR.js → toolbar-DS4sA_rD.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +6 -6
- package/dist/superdoc.umd.js +344 -344
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -7854,7 +7854,7 @@ class Sr {
|
|
|
7854
7854
|
return this.excluded.indexOf(e) > -1;
|
|
7855
7855
|
}
|
|
7856
7856
|
}
|
|
7857
|
-
let
|
|
7857
|
+
let fp = class {
|
|
7858
7858
|
/**
|
|
7859
7859
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
7860
7860
|
*/
|
|
@@ -9312,7 +9312,7 @@ function Fi(r, e, t, n = t.contentMatch, i = !0) {
|
|
|
9312
9312
|
function of(r, e, t) {
|
|
9313
9313
|
return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
|
|
9314
9314
|
}
|
|
9315
|
-
function
|
|
9315
|
+
function mp(r) {
|
|
9316
9316
|
let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
|
|
9317
9317
|
for (let n = r.depth; ; --n) {
|
|
9318
9318
|
let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
|
|
@@ -9332,7 +9332,7 @@ function af(r, e, t) {
|
|
|
9332
9332
|
A || i.after(T + 1) < i.end(T) ? (A = !0, g = Z.from(i.node(T).copy(g)), S++) : f++;
|
|
9333
9333
|
r.step(new Je(u, f, o, a, new ue(c.append(g), h, S), c.size - h, !0));
|
|
9334
9334
|
}
|
|
9335
|
-
function
|
|
9335
|
+
function pp(r, e, t = null, n = r) {
|
|
9336
9336
|
let i = uf(r, e), s = i && lf(n, e);
|
|
9337
9337
|
return s ? i.map(ho).concat({ type: e, attrs: t }).concat(s.map(ho)) : null;
|
|
9338
9338
|
}
|
|
@@ -9422,7 +9422,7 @@ function mf(r, e, t, n, i) {
|
|
|
9422
9422
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
9423
9423
|
r.step(new Je(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new ue(Z.from(o), 0, 0), 1, !0));
|
|
9424
9424
|
}
|
|
9425
|
-
function
|
|
9425
|
+
function hp(r, e, t = 1, n) {
|
|
9426
9426
|
let i = r.resolve(e), s = i.depth - t, o = n && n[n.length - 1] || i.parent;
|
|
9427
9427
|
if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
|
|
9428
9428
|
return !1;
|
|
@@ -9448,7 +9448,7 @@ function pf(r, e, t = 1, n) {
|
|
|
9448
9448
|
}
|
|
9449
9449
|
r.step(new Ie(e, e, new ue(s.append(o), t, t), !0));
|
|
9450
9450
|
}
|
|
9451
|
-
function
|
|
9451
|
+
function gp(r, e) {
|
|
9452
9452
|
let t = r.resolve(e), n = t.index();
|
|
9453
9453
|
return za(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
|
|
9454
9454
|
}
|
|
@@ -9465,7 +9465,7 @@ function hf(r, e) {
|
|
|
9465
9465
|
function za(r, e) {
|
|
9466
9466
|
return !!(r && e && !r.isLeaf && hf(r, e));
|
|
9467
9467
|
}
|
|
9468
|
-
function
|
|
9468
|
+
function wp(r, e, t = -1) {
|
|
9469
9469
|
let n = r.resolve(e);
|
|
9470
9470
|
for (let i = n.depth; ; i--) {
|
|
9471
9471
|
let s, o, a = n.index(i);
|
|
@@ -9517,7 +9517,7 @@ function wf(r, e, t) {
|
|
|
9517
9517
|
}
|
|
9518
9518
|
return null;
|
|
9519
9519
|
}
|
|
9520
|
-
function
|
|
9520
|
+
function yp(r, e, t) {
|
|
9521
9521
|
let n = r.resolve(e);
|
|
9522
9522
|
if (!t.content.size)
|
|
9523
9523
|
return e;
|
|
@@ -10887,7 +10887,7 @@ function $a(r, e, t) {
|
|
|
10887
10887
|
}
|
|
10888
10888
|
return t;
|
|
10889
10889
|
}
|
|
10890
|
-
class
|
|
10890
|
+
class bp {
|
|
10891
10891
|
/**
|
|
10892
10892
|
Create a plugin.
|
|
10893
10893
|
*/
|
|
@@ -10905,7 +10905,7 @@ const si = /* @__PURE__ */ Object.create(null);
|
|
|
10905
10905
|
function Xa(r) {
|
|
10906
10906
|
return r in si ? r + "$" + ++si[r] : (si[r] = 0, r + "$");
|
|
10907
10907
|
}
|
|
10908
|
-
class
|
|
10908
|
+
class xp {
|
|
10909
10909
|
/**
|
|
10910
10910
|
Create a plugin key.
|
|
10911
10911
|
*/
|
|
@@ -10926,7 +10926,7 @@ class wp {
|
|
|
10926
10926
|
return e[this.key];
|
|
10927
10927
|
}
|
|
10928
10928
|
}
|
|
10929
|
-
const Ya = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`),
|
|
10929
|
+
const Ya = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Ap = (r) => Ya(r), Dp = Object.freeze({
|
|
10930
10930
|
RESOLVED: "resolved",
|
|
10931
10931
|
NEW: "new",
|
|
10932
10932
|
ADD: "add",
|
|
@@ -10939,7 +10939,7 @@ const Ya = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), yp = (r) =>
|
|
|
10939
10939
|
// Tracked changes
|
|
10940
10940
|
CHANGE_ACCEPTED: "change-accepted",
|
|
10941
10941
|
CHANGE_REJECTED: "change-rejected"
|
|
10942
|
-
}),
|
|
10942
|
+
}), Ep = {
|
|
10943
10943
|
mounted(r, e, t) {
|
|
10944
10944
|
const n = (i) => {
|
|
10945
10945
|
r.contains(i.target) || e.value(i);
|
|
@@ -10995,7 +10995,7 @@ function eu(r) {
|
|
|
10995
10995
|
if (r != null)
|
|
10996
10996
|
return Math.round(r * 6);
|
|
10997
10997
|
}
|
|
10998
|
-
const Nf = async (r) => await (await fetch(r)).arrayBuffer(),
|
|
10998
|
+
const Nf = async (r) => await (await fetch(r)).arrayBuffer(), vp = (r) => {
|
|
10999
10999
|
const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
|
|
11000
11000
|
return Array.from(n).map((i) => i.getAttribute("Extension"));
|
|
11001
11001
|
}, If = (r) => (/* @__PURE__ */ new Map([
|
|
@@ -12255,6 +12255,14 @@ const Lf = {
|
|
|
12255
12255
|
console.error("Error in carbonCopy", r, e);
|
|
12256
12256
|
return;
|
|
12257
12257
|
}
|
|
12258
|
+
}, Wf = {
|
|
12259
|
+
attributes: {
|
|
12260
|
+
"w:abstractNumId": "1"
|
|
12261
|
+
}
|
|
12262
|
+
}, Jf = {
|
|
12263
|
+
attributes: {
|
|
12264
|
+
"w:abstractNumId": "0"
|
|
12265
|
+
}
|
|
12258
12266
|
}, ru = {
|
|
12259
12267
|
declaration: {
|
|
12260
12268
|
attributes: {
|
|
@@ -13505,7 +13513,7 @@ function vo(r, e) {
|
|
|
13505
13513
|
u && (f = r.comments.find((S) => S.commentId === u || S.importedId === u));
|
|
13506
13514
|
const c = f?.isInternal || o.isInternal;
|
|
13507
13515
|
if (n === "external" && c || !!o.resolvedTime) return;
|
|
13508
|
-
let g =
|
|
13516
|
+
let g = Kf(e, a);
|
|
13509
13517
|
if (e === "End") {
|
|
13510
13518
|
const S = {
|
|
13511
13519
|
name: "w:r",
|
|
@@ -13515,21 +13523,21 @@ function vo(r, e) {
|
|
|
13515
13523
|
}
|
|
13516
13524
|
return g;
|
|
13517
13525
|
}
|
|
13518
|
-
const
|
|
13526
|
+
const Kf = (r, e) => ({
|
|
13519
13527
|
name: `w:commentRange${r}`,
|
|
13520
13528
|
attributes: {
|
|
13521
13529
|
"w:id": String(e)
|
|
13522
13530
|
}
|
|
13523
|
-
}),
|
|
13531
|
+
}), $f = (r) => ({
|
|
13524
13532
|
...r,
|
|
13525
13533
|
commentParaId: tu()
|
|
13526
|
-
}),
|
|
13534
|
+
}), Xf = (r, e, t) => {
|
|
13527
13535
|
const n = iu({ node: r.commentJSON }), i = {
|
|
13528
13536
|
"w:id": String(e),
|
|
13529
13537
|
"w:author": r.creatorName || r.importedAuthor?.name,
|
|
13530
13538
|
"w:email": r.creatorEmail || r.importedAuthor?.email,
|
|
13531
13539
|
"w:date": nu(r.createdTime),
|
|
13532
|
-
"w:initials":
|
|
13540
|
+
"w:initials": Yf(r.creatorName),
|
|
13533
13541
|
"w:done": r.resolvedTime ? "1" : "0",
|
|
13534
13542
|
"w15:paraId": r.commentParaId,
|
|
13535
13543
|
"custom:internalId": r.commentId || r.internalId,
|
|
@@ -13548,7 +13556,7 @@ const Wf = (r, e) => ({
|
|
|
13548
13556
|
attributes: i,
|
|
13549
13557
|
elements: [n]
|
|
13550
13558
|
};
|
|
13551
|
-
},
|
|
13559
|
+
}, Yf = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, nu = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), Qf = (r = [], e) => {
|
|
13552
13560
|
const t = je(e);
|
|
13553
13561
|
return r.forEach((n) => {
|
|
13554
13562
|
n.elements[0].elements.unshift(Mf);
|
|
@@ -13567,7 +13575,7 @@ const Wf = (r, e) => ({
|
|
|
13567
13575
|
"xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
|
13568
13576
|
};
|
|
13569
13577
|
}), t.elements[0].elements = r, t;
|
|
13570
|
-
},
|
|
13578
|
+
}, Zf = (r = [], e) => {
|
|
13571
13579
|
const t = je(e), n = r.map((i) => {
|
|
13572
13580
|
const s = {
|
|
13573
13581
|
"w15:paraId": i.commentParaId,
|
|
@@ -13584,7 +13592,7 @@ const Wf = (r, e) => ({
|
|
|
13584
13592
|
};
|
|
13585
13593
|
});
|
|
13586
13594
|
return t.elements[0].elements = n, t;
|
|
13587
|
-
},
|
|
13595
|
+
}, ed = (r = [], e, t) => {
|
|
13588
13596
|
const n = je(e), i = je(t);
|
|
13589
13597
|
return n.elements[0].elements = [], i.elements[0].elements = [], r.forEach((s) => {
|
|
13590
13598
|
const o = tu(), a = {
|
|
@@ -13609,13 +13617,13 @@ const Wf = (r, e) => ({
|
|
|
13609
13617
|
documentIdsUpdated: n,
|
|
13610
13618
|
extensibleUpdated: i
|
|
13611
13619
|
};
|
|
13612
|
-
},
|
|
13620
|
+
}, td = (r) => {
|
|
13613
13621
|
const e = je(r);
|
|
13614
13622
|
return e["word/comments.xml"] = xt.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = xt.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = xt.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = xt.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = xt.CONTENT_TYPES, e;
|
|
13615
|
-
},
|
|
13623
|
+
}, rd = (r) => {
|
|
13616
13624
|
const e = je(r);
|
|
13617
13625
|
return delete e["word/comments.xml"], delete e["word/commentsExtended.xml"], delete e["word/commentsExtensible.xml"], delete e["word/commentsIds.xml"], e;
|
|
13618
|
-
}, nr = (r) => ({ ...xt.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }),
|
|
13626
|
+
}, nr = (r) => ({ ...xt.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), nd = ({
|
|
13619
13627
|
convertedXml: r,
|
|
13620
13628
|
defs: e,
|
|
13621
13629
|
commentsWithParaIds: t,
|
|
@@ -13624,16 +13632,16 @@ const Wf = (r, e) => ({
|
|
|
13624
13632
|
}) => {
|
|
13625
13633
|
const s = [];
|
|
13626
13634
|
if (n === "clean")
|
|
13627
|
-
return { documentXml:
|
|
13628
|
-
const o =
|
|
13629
|
-
o["word/comments.xml"] =
|
|
13635
|
+
return { documentXml: rd(r), relationships: s };
|
|
13636
|
+
const o = td(r);
|
|
13637
|
+
o["word/comments.xml"] = Qf(
|
|
13630
13638
|
e,
|
|
13631
13639
|
o["word/comments.xml"]
|
|
13632
|
-
), s.push(nr("comments.xml")), o["word/commentsExtended.xml"] =
|
|
13640
|
+
), s.push(nr("comments.xml")), o["word/commentsExtended.xml"] = Zf(
|
|
13633
13641
|
t,
|
|
13634
13642
|
o["word/commentsExtended.xml"]
|
|
13635
13643
|
), s.push(nr("commentsExtended.xml"));
|
|
13636
|
-
const { documentIdsUpdated: a, extensibleUpdated: u } =
|
|
13644
|
+
const { documentIdsUpdated: a, extensibleUpdated: u } = ed(
|
|
13637
13645
|
t,
|
|
13638
13646
|
o["word/commentsIds.xml"],
|
|
13639
13647
|
o["word/commentsExtensible.xml"]
|
|
@@ -13642,7 +13650,7 @@ const Wf = (r, e) => ({
|
|
|
13642
13650
|
relationships: s,
|
|
13643
13651
|
documentXml: o
|
|
13644
13652
|
};
|
|
13645
|
-
},
|
|
13653
|
+
}, id = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], sd = (r, e, t, n) => {
|
|
13646
13654
|
let i = 0, s = !0;
|
|
13647
13655
|
const o = [], a = [], u = r.firstChild;
|
|
13648
13656
|
if (!u) return {};
|
|
@@ -13651,7 +13659,7 @@ const Wf = (r, e) => ({
|
|
|
13651
13659
|
for (let w = 0; w < A; w++, T++) {
|
|
13652
13660
|
const k = t === T ? n : B && B[w];
|
|
13653
13661
|
i += k || e, k || (s = !1);
|
|
13654
|
-
const [I, C] =
|
|
13662
|
+
const [I, C] = id(e, k);
|
|
13655
13663
|
o.push(["col", { style: `${I}: ${C}` }]), a.push(parseInt(C, 10));
|
|
13656
13664
|
}
|
|
13657
13665
|
}
|
|
@@ -13665,28 +13673,28 @@ const Wf = (r, e) => ({
|
|
|
13665
13673
|
};
|
|
13666
13674
|
function Pt(r) {
|
|
13667
13675
|
const { type: e } = r.node || {}, t = {
|
|
13668
|
-
doc:
|
|
13669
|
-
body:
|
|
13676
|
+
doc: ud,
|
|
13677
|
+
body: od,
|
|
13670
13678
|
paragraph: iu,
|
|
13671
|
-
text:
|
|
13679
|
+
text: ld,
|
|
13672
13680
|
bulletList: So,
|
|
13673
13681
|
orderedList: So,
|
|
13674
|
-
lineBreak:
|
|
13675
|
-
table:
|
|
13676
|
-
tableRow:
|
|
13677
|
-
tableCell:
|
|
13678
|
-
bookmarkStart:
|
|
13679
|
-
fieldAnnotation:
|
|
13680
|
-
tab:
|
|
13682
|
+
lineBreak: wd,
|
|
13683
|
+
table: yd,
|
|
13684
|
+
tableRow: vd,
|
|
13685
|
+
tableCell: Sd,
|
|
13686
|
+
bookmarkStart: Bd,
|
|
13687
|
+
fieldAnnotation: _d,
|
|
13688
|
+
tab: xd,
|
|
13681
13689
|
image: au,
|
|
13682
|
-
hardBreak:
|
|
13690
|
+
hardBreak: qd,
|
|
13683
13691
|
commentRangeStart: () => vo(r, "Start"),
|
|
13684
13692
|
commentRangeEnd: () => vo(r, "End"),
|
|
13685
13693
|
commentReference: () => null
|
|
13686
13694
|
};
|
|
13687
13695
|
return t[e] ? t[e](r) : (console.error("No translation function found for node type:", e), null);
|
|
13688
13696
|
}
|
|
13689
|
-
function
|
|
13697
|
+
function od(r) {
|
|
13690
13698
|
const e = r.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
|
|
13691
13699
|
if (r.converter) {
|
|
13692
13700
|
const n = r.converter.pageStyles.pageMargins, i = e.elements.find((o) => o.name === "w:pgMar"), { attributes: s } = i;
|
|
@@ -13704,7 +13712,7 @@ function iu(r) {
|
|
|
13704
13712
|
const e = Ot(r), t = e.find((s) => s.name === "htmlAnnotation");
|
|
13705
13713
|
if (e.length === 1 && t)
|
|
13706
13714
|
return t.elements;
|
|
13707
|
-
const n =
|
|
13715
|
+
const n = ad(r.node);
|
|
13708
13716
|
n && e.unshift(n);
|
|
13709
13717
|
let i = {};
|
|
13710
13718
|
return r.node.attrs?.rsidRDefault && (i["w:rsidRDefault"] = r.node.attrs.rsidRDefault), {
|
|
@@ -13713,7 +13721,7 @@ function iu(r) {
|
|
|
13713
13721
|
attributes: i
|
|
13714
13722
|
};
|
|
13715
13723
|
}
|
|
13716
|
-
function
|
|
13724
|
+
function ad(r) {
|
|
13717
13725
|
const { attrs: e = {} } = r, t = [], { styleId: n } = e;
|
|
13718
13726
|
n && t.push({ name: "w:pStyle", attributes: { "w:val": n } });
|
|
13719
13727
|
const { spacing: i, indent: s, textAlign: o, textIndent: a, marksAttrs: u, keepLines: f, keepNext: c } = e;
|
|
@@ -13765,7 +13773,7 @@ function sd(r) {
|
|
|
13765
13773
|
elements: t
|
|
13766
13774
|
} : null;
|
|
13767
13775
|
}
|
|
13768
|
-
function
|
|
13776
|
+
function ud(r) {
|
|
13769
13777
|
const e = {
|
|
13770
13778
|
type: "body",
|
|
13771
13779
|
content: r.node.content
|
|
@@ -13793,14 +13801,14 @@ function Fr(r, e) {
|
|
|
13793
13801
|
attributes: i
|
|
13794
13802
|
}, s);
|
|
13795
13803
|
}
|
|
13796
|
-
function
|
|
13804
|
+
function ld(r) {
|
|
13797
13805
|
const { node: e } = r, t = [yr, Ii];
|
|
13798
|
-
if (e.marks?.some((a) => t.includes(a.type))) return
|
|
13799
|
-
if (e.marks?.some((a) => a.type === "link")) return
|
|
13806
|
+
if (e.marks?.some((a) => t.includes(a.type))) return fd(r);
|
|
13807
|
+
if (e.marks?.some((a) => a.type === "link")) return dd(r);
|
|
13800
13808
|
const { text: s, marks: o = [] } = e;
|
|
13801
13809
|
return Fr(s, o);
|
|
13802
13810
|
}
|
|
13803
|
-
function
|
|
13811
|
+
function cd(r) {
|
|
13804
13812
|
const e = r.find((t) => t.type === Ri);
|
|
13805
13813
|
if (e)
|
|
13806
13814
|
return {
|
|
@@ -13815,8 +13823,8 @@ function ud(r) {
|
|
|
13815
13823
|
elements: e.attrs.before.map((n) => Br([n])).filter((n) => n !== void 0)
|
|
13816
13824
|
};
|
|
13817
13825
|
}
|
|
13818
|
-
function
|
|
13819
|
-
const { node: e } = r, t = e.marks, n = [yr, Ii, Ri], i = t.find((f) => n.includes(f.type)), s = i.type === yr, o =
|
|
13826
|
+
function fd(r) {
|
|
13827
|
+
const { node: e } = r, t = e.marks, n = [yr, Ii, Ri], i = t.find((f) => n.includes(f.type)), s = i.type === yr, o = cd(t);
|
|
13820
13828
|
e.marks = t.filter((f) => !n.includes(f.type)), o && e.marks.push(o);
|
|
13821
13829
|
const a = Pt({ ...r, node: e });
|
|
13822
13830
|
if (!s) {
|
|
@@ -13854,7 +13862,7 @@ function Br(r = []) {
|
|
|
13854
13862
|
return To(i);
|
|
13855
13863
|
}) : To(e));
|
|
13856
13864
|
}
|
|
13857
|
-
function
|
|
13865
|
+
function dd(r) {
|
|
13858
13866
|
const { node: e } = r, t = e.marks.find((a) => a.type === "link"), n = t.attrs.href;
|
|
13859
13867
|
let i = t.attrs.rId;
|
|
13860
13868
|
i || (i = ou(r, n)), e.marks = e.marks.filter((a) => a.type !== "link");
|
|
@@ -13894,9 +13902,9 @@ function Co(r, e) {
|
|
|
13894
13902
|
return r.relationships.push(n), t;
|
|
13895
13903
|
}
|
|
13896
13904
|
function So(r) {
|
|
13897
|
-
const { type: e } = r.node, t =
|
|
13905
|
+
const { type: e } = r.node, t = gd(r), n = [];
|
|
13898
13906
|
return t.forEach((i) => {
|
|
13899
|
-
const { level: s, listType: o, pPrs: a, content: u, attrs: f = {} } = i, g = (i.attrs.numId || i.listId) ??
|
|
13907
|
+
const { level: s, listType: o, pPrs: a, content: u, attrs: f = {} } = i, g = (i.attrs.numId || i.listId) ?? md(r, o), S = hd(s, g, a);
|
|
13900
13908
|
u.forEach((T, A) => {
|
|
13901
13909
|
const B = Object.assign({}, T);
|
|
13902
13910
|
B.attrs = {
|
|
@@ -13927,30 +13935,22 @@ function So(r) {
|
|
|
13927
13935
|
});
|
|
13928
13936
|
}), n;
|
|
13929
13937
|
}
|
|
13930
|
-
function
|
|
13931
|
-
const t = {
|
|
13932
|
-
...definition,
|
|
13933
|
-
attributes: {
|
|
13934
|
-
...definition.attributes,
|
|
13935
|
-
"w:abstractNumId": r
|
|
13936
|
-
}
|
|
13937
|
-
}, n = {
|
|
13938
|
+
function md(r, e) {
|
|
13939
|
+
const t = pd(r.converter.numbering?.definitions), n = e === "bullet" ? Jf : Wf, i = t, s = n.attributes["w:abstractNumId"], o = {
|
|
13938
13940
|
type: "element",
|
|
13939
13941
|
name: "w:num",
|
|
13940
13942
|
attributes: {
|
|
13941
|
-
"w:numId": String(
|
|
13943
|
+
"w:numId": String(i),
|
|
13942
13944
|
"w16cid:durableId": "485517411"
|
|
13943
13945
|
},
|
|
13944
13946
|
elements: [
|
|
13945
|
-
{ name: "w:abstractNumId", attributes: { "w:val": String(
|
|
13947
|
+
{ name: "w:abstractNumId", attributes: { "w:val": String(s) } }
|
|
13946
13948
|
]
|
|
13947
13949
|
};
|
|
13948
|
-
return
|
|
13949
|
-
newAbstractDef: t,
|
|
13950
|
-
newNumDef: n
|
|
13951
|
-
};
|
|
13950
|
+
return r.converter.numbering.definitions[i] = o, i;
|
|
13952
13951
|
}
|
|
13953
|
-
|
|
13952
|
+
const pd = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
|
|
13953
|
+
function hd(r, e, t = []) {
|
|
13954
13954
|
return {
|
|
13955
13955
|
name: "w:pPr",
|
|
13956
13956
|
type: "element",
|
|
@@ -13975,7 +13975,7 @@ function dd(r, e, t = []) {
|
|
|
13975
13975
|
]
|
|
13976
13976
|
};
|
|
13977
13977
|
}
|
|
13978
|
-
function
|
|
13978
|
+
function gd({ node: r }) {
|
|
13979
13979
|
const { content: e, attrs: t = {} } = r, { listId: n, syncId: i } = r.attrs || {}, s = r.attrs["list-style-type"], { attributes: o = {} } = t, a = o?.parentAttributes?.paragraphProperties?.elements?.filter((c) => c.name !== "w:numPr") || [], u = [];
|
|
13980
13980
|
function f(c, h = 0) {
|
|
13981
13981
|
!c || !c.length || c.forEach((g) => {
|
|
@@ -13996,22 +13996,22 @@ function md({ node: r }) {
|
|
|
13996
13996
|
}
|
|
13997
13997
|
return f(e), u;
|
|
13998
13998
|
}
|
|
13999
|
-
function
|
|
13999
|
+
function wd(r) {
|
|
14000
14000
|
const e = {}, { lineBreakType: t } = r.node?.attrs || {};
|
|
14001
14001
|
return t && (e["w:type"] = t), {
|
|
14002
14002
|
name: "w:br",
|
|
14003
14003
|
attributes: e
|
|
14004
14004
|
};
|
|
14005
14005
|
}
|
|
14006
|
-
function
|
|
14007
|
-
r.node =
|
|
14008
|
-
const e = Ot(r), t =
|
|
14006
|
+
function yd(r) {
|
|
14007
|
+
r.node = bd(r.node, r);
|
|
14008
|
+
const e = Ot(r), t = Ad(r.node), n = Ed(r.node, r);
|
|
14009
14009
|
return e.unshift(t), e.unshift(n), {
|
|
14010
14010
|
name: "w:tbl",
|
|
14011
14011
|
elements: e
|
|
14012
14012
|
};
|
|
14013
14013
|
}
|
|
14014
|
-
function
|
|
14014
|
+
function bd(r, { editorSchema: e }) {
|
|
14015
14015
|
const { content: t } = r;
|
|
14016
14016
|
for (let n = 0; n < t.length; n++) {
|
|
14017
14017
|
const i = t[n];
|
|
@@ -14047,13 +14047,13 @@ function gd(r, { editorSchema: e }) {
|
|
|
14047
14047
|
}
|
|
14048
14048
|
return r;
|
|
14049
14049
|
}
|
|
14050
|
-
function
|
|
14050
|
+
function xd(r) {
|
|
14051
14051
|
const { marks: e = [] } = r.node, t = Br(e);
|
|
14052
14052
|
return Pi({
|
|
14053
14053
|
name: "w:tab"
|
|
14054
14054
|
}, t);
|
|
14055
14055
|
}
|
|
14056
|
-
function
|
|
14056
|
+
function Ad(r) {
|
|
14057
14057
|
const e = [], { attrs: t } = r, { tableWidth: n, tableWidthType: i, tableStyleId: s, borders: o, tableIndent: a, tableLayout: u, tableCellSpacing: f } = t;
|
|
14058
14058
|
if (s) {
|
|
14059
14059
|
const c = {
|
|
@@ -14063,7 +14063,7 @@ function yd(r) {
|
|
|
14063
14063
|
e.push(c);
|
|
14064
14064
|
}
|
|
14065
14065
|
if (o) {
|
|
14066
|
-
const c =
|
|
14066
|
+
const c = Dd(r);
|
|
14067
14067
|
e.push(c);
|
|
14068
14068
|
}
|
|
14069
14069
|
if (a) {
|
|
@@ -14098,7 +14098,7 @@ function yd(r) {
|
|
|
14098
14098
|
elements: e
|
|
14099
14099
|
};
|
|
14100
14100
|
}
|
|
14101
|
-
function
|
|
14101
|
+
function Dd(r) {
|
|
14102
14102
|
const { borders: e } = r.attrs, t = [];
|
|
14103
14103
|
return e ? (["top", "bottom", "left", "right", "insideH", "insideV"].forEach((i) => {
|
|
14104
14104
|
const s = e[i];
|
|
@@ -14122,11 +14122,11 @@ function bd(r) {
|
|
|
14122
14122
|
elements: t
|
|
14123
14123
|
}) : void 0;
|
|
14124
14124
|
}
|
|
14125
|
-
function
|
|
14125
|
+
function Ed(r, e) {
|
|
14126
14126
|
const { editorSchema: t } = e;
|
|
14127
14127
|
let n = [];
|
|
14128
14128
|
try {
|
|
14129
|
-
const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } =
|
|
14129
|
+
const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = sd(
|
|
14130
14130
|
s,
|
|
14131
14131
|
o
|
|
14132
14132
|
);
|
|
@@ -14145,14 +14145,14 @@ function xd(r, e) {
|
|
|
14145
14145
|
elements: i
|
|
14146
14146
|
};
|
|
14147
14147
|
}
|
|
14148
|
-
function
|
|
14149
|
-
const e = Ot(r), t =
|
|
14148
|
+
function vd(r) {
|
|
14149
|
+
const e = Ot(r), t = Cd(r.node);
|
|
14150
14150
|
return t.elements.length && e.unshift(t), {
|
|
14151
14151
|
name: "w:tr",
|
|
14152
14152
|
elements: e
|
|
14153
14153
|
};
|
|
14154
14154
|
}
|
|
14155
|
-
function
|
|
14155
|
+
function Cd(r) {
|
|
14156
14156
|
const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
|
|
14157
14157
|
if (n) {
|
|
14158
14158
|
const s = { "w:val": Se(n) };
|
|
@@ -14168,17 +14168,17 @@ function Dd(r) {
|
|
|
14168
14168
|
elements: t
|
|
14169
14169
|
};
|
|
14170
14170
|
}
|
|
14171
|
-
function
|
|
14171
|
+
function Sd(r) {
|
|
14172
14172
|
const e = Ot({
|
|
14173
14173
|
...r,
|
|
14174
14174
|
tableCell: r.node
|
|
14175
|
-
}), t =
|
|
14175
|
+
}), t = Td(r.node);
|
|
14176
14176
|
return e.unshift(t), {
|
|
14177
14177
|
name: "w:tc",
|
|
14178
14178
|
elements: e
|
|
14179
14179
|
};
|
|
14180
14180
|
}
|
|
14181
|
-
function
|
|
14181
|
+
function Td(r) {
|
|
14182
14182
|
const e = [], { attrs: t } = r, { colwidth: n = [], cellWidthType: i = "dxa", background: s = {}, colspan: o, rowspan: a, widthUnit: u } = t, f = n.reduce((A, B) => A + B, 0), c = {
|
|
14183
14183
|
name: "w:tcW",
|
|
14184
14184
|
attributes: { "w:w": u === "px" ? Se(f) : Ft(f), "w:type": i }
|
|
@@ -14202,7 +14202,7 @@ function vd(r) {
|
|
|
14202
14202
|
if (g) {
|
|
14203
14203
|
const A = {
|
|
14204
14204
|
name: "w:tcMar",
|
|
14205
|
-
elements:
|
|
14205
|
+
elements: Fd(g)
|
|
14206
14206
|
};
|
|
14207
14207
|
e.push(A);
|
|
14208
14208
|
}
|
|
@@ -14254,11 +14254,11 @@ function vd(r) {
|
|
|
14254
14254
|
elements: e
|
|
14255
14255
|
};
|
|
14256
14256
|
}
|
|
14257
|
-
function
|
|
14257
|
+
function Fd(r) {
|
|
14258
14258
|
const e = [], { top: t, right: n, bottom: i, left: s } = r;
|
|
14259
14259
|
return t != null && e.push({ name: "w:top", attributes: { "w:w": Se(t) } }), n != null && e.push({ name: "w:right", attributes: { "w:w": Se(n) } }), i != null && e.push({ name: "w:bottom", attributes: { "w:w": Se(i) } }), s != null && e.push({ name: "w:left", attributes: { "w:w": Se(s) } }), e;
|
|
14260
14260
|
}
|
|
14261
|
-
function
|
|
14261
|
+
function Bd(r) {
|
|
14262
14262
|
const e = {
|
|
14263
14263
|
name: "w:bookmarkStart",
|
|
14264
14264
|
attributes: {
|
|
@@ -14314,7 +14314,7 @@ function To(r) {
|
|
|
14314
14314
|
}
|
|
14315
14315
|
return t;
|
|
14316
14316
|
}
|
|
14317
|
-
function
|
|
14317
|
+
function kd(r) {
|
|
14318
14318
|
if (!r) return {};
|
|
14319
14319
|
const e = r.split(";")[0].split("/")[1];
|
|
14320
14320
|
if (!r || e !== "png")
|
|
@@ -14328,7 +14328,7 @@ function Td(r) {
|
|
|
14328
14328
|
originalHeight: i.getInt32(20)
|
|
14329
14329
|
};
|
|
14330
14330
|
}
|
|
14331
|
-
function
|
|
14331
|
+
function Nd(r, e, t, n) {
|
|
14332
14332
|
let i = r, s = e, o = Math.min(t / r, n / e);
|
|
14333
14333
|
return i = Math.round(i * o), s = Math.round(s * o), { scaledWidth: i, scaledHeight: s };
|
|
14334
14334
|
}
|
|
@@ -14338,20 +14338,20 @@ function au(r, e) {
|
|
|
14338
14338
|
tableCell: i
|
|
14339
14339
|
} = r;
|
|
14340
14340
|
let s = t.rId;
|
|
14341
|
-
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } =
|
|
14341
|
+
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = kd(o);
|
|
14342
14342
|
let f = t.size ? {
|
|
14343
14343
|
w: qt(t.size.width),
|
|
14344
14344
|
h: qt(t.size.height)
|
|
14345
14345
|
} : e;
|
|
14346
14346
|
if (a && u) {
|
|
14347
|
-
const S = $e(f.w), T = $e(f.h), { scaledWidth: A, scaledHeight: B } =
|
|
14347
|
+
const S = $e(f.w), T = $e(f.h), { scaledWidth: A, scaledHeight: B } = Nd(a, u, S, T);
|
|
14348
14348
|
f = {
|
|
14349
14349
|
w: qt(A),
|
|
14350
14350
|
h: qt(B)
|
|
14351
14351
|
};
|
|
14352
14352
|
}
|
|
14353
14353
|
if (i) {
|
|
14354
|
-
const S = i.attrs.colwidth.reduce((I, C) => I + C, 0), T = i.attrs.cellMargins?.left || 8, A = i.attrs.cellMargins?.right || 8, B = qt(S - (T + A)), { width: w, height: k } =
|
|
14354
|
+
const S = i.attrs.colwidth.reduce((I, C) => I + C, 0), T = i.attrs.cellMargins?.left || 8, A = i.attrs.cellMargins?.right || 8, B = qt(S - (T + A)), { width: w, height: k } = Md(f.w, f.h, B);
|
|
14355
14355
|
w && k && (f = { w, h: k });
|
|
14356
14356
|
}
|
|
14357
14357
|
if (r.node.type === "image" && !s) {
|
|
@@ -14518,16 +14518,16 @@ function au(r, e) {
|
|
|
14518
14518
|
function uu(r) {
|
|
14519
14519
|
const {
|
|
14520
14520
|
node: { attrs: e = {}, marks: t = [] }
|
|
14521
|
-
} = r, n =
|
|
14521
|
+
} = r, n = Ld(e);
|
|
14522
14522
|
return Fr(e.displayLabel, [...t, ...n]);
|
|
14523
14523
|
}
|
|
14524
|
-
function
|
|
14524
|
+
function Id(r) {
|
|
14525
14525
|
const {
|
|
14526
14526
|
node: { attrs: e = {}, marks: t = [] }
|
|
14527
14527
|
} = r, n = kc.decode(e.displayLabel);
|
|
14528
14528
|
return Fr(n, t);
|
|
14529
14529
|
}
|
|
14530
|
-
function
|
|
14530
|
+
function Rd(r) {
|
|
14531
14531
|
const {
|
|
14532
14532
|
node: { attrs: e = {} }
|
|
14533
14533
|
} = r, n = new window.DOMParser().parseFromString(e.rawHtml, "text/html"), s = At.create({
|
|
@@ -14543,7 +14543,7 @@ function kd(r) {
|
|
|
14543
14543
|
function Fo(r, e) {
|
|
14544
14544
|
return au(r, e);
|
|
14545
14545
|
}
|
|
14546
|
-
function
|
|
14546
|
+
function Pd(r) {
|
|
14547
14547
|
const {
|
|
14548
14548
|
node: { attrs: e = {}, marks: t = [] }
|
|
14549
14549
|
} = r, n = ou(r, e.linkUrl), i = Fr(e.linkUrl, t);
|
|
@@ -14557,7 +14557,7 @@ function Nd(r) {
|
|
|
14557
14557
|
elements: [i]
|
|
14558
14558
|
};
|
|
14559
14559
|
}
|
|
14560
|
-
function
|
|
14560
|
+
function Od(r) {
|
|
14561
14561
|
const e = {
|
|
14562
14562
|
w: 4286250,
|
|
14563
14563
|
h: 4286250
|
|
@@ -14569,12 +14569,12 @@ function Id(r) {
|
|
|
14569
14569
|
text: uu,
|
|
14570
14570
|
image: (i) => Fo(i, e),
|
|
14571
14571
|
signature: (i) => Fo(i, t),
|
|
14572
|
-
checkbox:
|
|
14573
|
-
html:
|
|
14574
|
-
link:
|
|
14572
|
+
checkbox: Id,
|
|
14573
|
+
html: Rd,
|
|
14574
|
+
link: Pd
|
|
14575
14575
|
}[r];
|
|
14576
14576
|
}
|
|
14577
|
-
const
|
|
14577
|
+
const Ld = (r = {}) => {
|
|
14578
14578
|
const {
|
|
14579
14579
|
fontFamily: e,
|
|
14580
14580
|
fontSize: t,
|
|
@@ -14584,8 +14584,8 @@ const Rd = (r = {}) => {
|
|
|
14584
14584
|
} = r, o = [];
|
|
14585
14585
|
return e && o.push({ type: "fontFamily", attrs: { fontFamily: e } }), t && o.push({ type: "fontSize", attrs: { fontSize: t } }), n && o.push({ type: "bold", attrs: {} }), i && o.push({ type: "underline", attrs: {} }), s && o.push({ type: "italic", attrs: {} }), o;
|
|
14586
14586
|
};
|
|
14587
|
-
function
|
|
14588
|
-
const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i =
|
|
14587
|
+
function _d(r) {
|
|
14588
|
+
const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = Od(n.type);
|
|
14589
14589
|
if (!i) return {};
|
|
14590
14590
|
let s, o;
|
|
14591
14591
|
if (t)
|
|
@@ -14637,7 +14637,7 @@ function Pd(r) {
|
|
|
14637
14637
|
]
|
|
14638
14638
|
};
|
|
14639
14639
|
}
|
|
14640
|
-
function
|
|
14640
|
+
function qd() {
|
|
14641
14641
|
return {
|
|
14642
14642
|
name: "w:r",
|
|
14643
14643
|
elements: [{
|
|
@@ -14689,28 +14689,28 @@ nt = new WeakSet(), lu = function(e, t = falase) {
|
|
|
14689
14689
|
}
|
|
14690
14690
|
return a || u.push(`</${n}>`), u;
|
|
14691
14691
|
};
|
|
14692
|
-
function
|
|
14692
|
+
function Md(r, e, t) {
|
|
14693
14693
|
if (r > t) {
|
|
14694
14694
|
let n = t / r, i = Math.round(e * n);
|
|
14695
14695
|
return { width: t, height: i };
|
|
14696
14696
|
}
|
|
14697
14697
|
return { width: r, height: e };
|
|
14698
14698
|
}
|
|
14699
|
-
const
|
|
14699
|
+
const Ud = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', jd = (r) => JSON.parse(ya.xml2json(r, null, 2)), Hd = (r, e = Ud) => r["word/document.xml"] || jd(e), Vd = (r) => {
|
|
14700
14700
|
const { nodes: e } = r;
|
|
14701
14701
|
if (e.length === 0)
|
|
14702
14702
|
return { nodes: [], consumed: 0 };
|
|
14703
14703
|
const t = e[0];
|
|
14704
14704
|
switch (t.name) {
|
|
14705
14705
|
case "w:tbl":
|
|
14706
|
-
return { nodes: [
|
|
14706
|
+
return { nodes: [Gd(t, r)], consumed: 1 };
|
|
14707
14707
|
}
|
|
14708
14708
|
return { nodes: [], consumed: 0 };
|
|
14709
|
-
},
|
|
14709
|
+
}, zd = {
|
|
14710
14710
|
handlerName: "tableNodeHandler",
|
|
14711
|
-
handler:
|
|
14711
|
+
handler: Vd
|
|
14712
14712
|
};
|
|
14713
|
-
function
|
|
14713
|
+
function Gd(r, e) {
|
|
14714
14714
|
const { docx: t, nodeListHandler: n } = e, i = r.elements.find((F) => F.name === "w:tblPr"), o = i.elements.find((F) => F.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = fu(o), f = i.elements.find((F) => F.name === "w:tblStyle"), h = { tableStyleId: f?.attributes["w:val"] }, g = i?.elements.find((F) => F.name === "w:tblInd");
|
|
14715
14715
|
if (g) {
|
|
14716
14716
|
const { "w:w": F, "w:type": N } = g.attributes;
|
|
@@ -14735,7 +14735,7 @@ function Hd(r, e) {
|
|
|
14735
14735
|
h.borders = k;
|
|
14736
14736
|
const C = [];
|
|
14737
14737
|
return w.forEach((F) => {
|
|
14738
|
-
const N =
|
|
14738
|
+
const N = Kd(F, r, I, f, e);
|
|
14739
14739
|
N.content?.length && C.push(N);
|
|
14740
14740
|
}), {
|
|
14741
14741
|
type: "table",
|
|
@@ -14743,15 +14743,15 @@ function Hd(r, e) {
|
|
|
14743
14743
|
attrs: h
|
|
14744
14744
|
};
|
|
14745
14745
|
}
|
|
14746
|
-
function
|
|
14747
|
-
const { docx: u, nodeListHandler: f } = o, c = r.elements.find((ae) => ae.name === "w:tcPr"), h = c?.elements?.find((ae) => ae.name === "w:tcBorders"), g =
|
|
14746
|
+
function Wd(r, e, t, n, i = null, s, o, a) {
|
|
14747
|
+
const { docx: u, nodeListHandler: f } = o, c = r.elements.find((ae) => ae.name === "w:tcPr"), h = c?.elements?.find((ae) => ae.name === "w:tcBorders"), g = Jd(h, n), S = du(t), T = c?.elements?.find((ae) => ae.name === "w:tcW");
|
|
14748
14748
|
let A = T ? xe(T.attributes["w:w"]) : null;
|
|
14749
14749
|
const B = T?.attributes["w:type"];
|
|
14750
14750
|
!A && i && (A = i);
|
|
14751
14751
|
const w = ko(r), { attributes: k } = w || {}, C = {
|
|
14752
14752
|
color: c?.elements?.find((ae) => ae.name === "w:shd")?.attributes["w:fill"]
|
|
14753
14753
|
}, N = c?.elements?.find((ae) => ae.name === "w:gridSpan")?.attributes["w:val"], q = c?.elements?.find((ae) => ae.name === "w:tcMar"), D = c?.elements?.find((ae) => ae.name === "w:vAlign")?.attributes["w:val"] || "top", K = {}, oe = cu(s, u) || {};
|
|
14754
|
-
K.cellMargins =
|
|
14754
|
+
K.cellMargins = $d(q, oe);
|
|
14755
14755
|
const { fontSize: ee, fonts: Q = {} } = oe, ce = Q.ascii;
|
|
14756
14756
|
if (A) {
|
|
14757
14757
|
K.colwidth = [A], K.widthUnit = "px";
|
|
@@ -14797,7 +14797,7 @@ const ko = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
|
|
|
14797
14797
|
return Object.keys(i) ? (i.val = "none", i) : null;
|
|
14798
14798
|
}
|
|
14799
14799
|
return null;
|
|
14800
|
-
},
|
|
14800
|
+
}, Jd = (r, e) => {
|
|
14801
14801
|
if (!r) return null;
|
|
14802
14802
|
const t = {}, n = ir(r, "bottom", e);
|
|
14803
14803
|
n && (t.bottom = n);
|
|
@@ -14865,7 +14865,7 @@ function fu(r) {
|
|
|
14865
14865
|
rowBorders: t
|
|
14866
14866
|
};
|
|
14867
14867
|
}
|
|
14868
|
-
function
|
|
14868
|
+
function Kd(r, e, t, n, i) {
|
|
14869
14869
|
const s = {}, a = r.elements.find((T) => T.name === "w:trPr")?.elements?.find((T) => T.name === "w:trHeight"), u = a?.attributes["w:val"];
|
|
14870
14870
|
a?.attributes["w:hRule"];
|
|
14871
14871
|
const f = {};
|
|
@@ -14875,12 +14875,12 @@ function Gd(r, e, t, n, i) {
|
|
|
14875
14875
|
type: "tableRow",
|
|
14876
14876
|
content: h?.map((T, A) => {
|
|
14877
14877
|
const B = h.length > 1 ? c[A] : null;
|
|
14878
|
-
return
|
|
14878
|
+
return Wd(T, r, e, f, B, n, i, A);
|
|
14879
14879
|
}) || [],
|
|
14880
14880
|
attrs: s
|
|
14881
14881
|
};
|
|
14882
14882
|
}
|
|
14883
|
-
const
|
|
14883
|
+
const $d = (r, e) => {
|
|
14884
14884
|
const t = r?.elements?.find((B) => B.name === "w:left"), n = r?.elements?.find((B) => B.name === "w:right"), i = r?.elements?.find((B) => B.name === "w:top"), s = r?.elements?.find((B) => B.name === "w:bottom"), o = t?.attributes["w:w"], a = n?.attributes["w:w"], u = i?.attributes["w:w"], f = s?.attributes["w:w"], { cellMargins: c = {} } = e, {
|
|
14885
14885
|
marginLeft: h,
|
|
14886
14886
|
marginRight: g,
|
|
@@ -14893,7 +14893,7 @@ const Wd = (r, e) => {
|
|
|
14893
14893
|
top: xe(u ?? S),
|
|
14894
14894
|
bottom: xe(f ?? T)
|
|
14895
14895
|
};
|
|
14896
|
-
}, du = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : xe(t.attributes["w:w"])) || [],
|
|
14896
|
+
}, du = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : xe(t.attributes["w:w"])) || [], Xd = (r) => {
|
|
14897
14897
|
const { nodes: e, filename: t } = r;
|
|
14898
14898
|
if (e.length === 0 || e[0].name !== "w:drawing")
|
|
14899
14899
|
return { nodes: [], consumed: 0 };
|
|
@@ -14941,9 +14941,9 @@ function No(r, e, t) {
|
|
|
14941
14941
|
}
|
|
14942
14942
|
};
|
|
14943
14943
|
}
|
|
14944
|
-
const
|
|
14944
|
+
const Yd = {
|
|
14945
14945
|
handlerName: "drawingNodeHandler",
|
|
14946
|
-
handler:
|
|
14946
|
+
handler: Xd
|
|
14947
14947
|
};
|
|
14948
14948
|
function Bt(r, e = [], t = null) {
|
|
14949
14949
|
const n = [], i = /* @__PURE__ */ new Set();
|
|
@@ -14968,7 +14968,7 @@ function Bt(r, e = [], t = null) {
|
|
|
14968
14968
|
const { attributes: u = {} } = s, f = { type: a.type };
|
|
14969
14969
|
if (!(u["w:val"] == "0" || u["w:val"] === "none")) {
|
|
14970
14970
|
if (a.mark && (f.type = a.mark), Object.keys(u).length) {
|
|
14971
|
-
const c =
|
|
14971
|
+
const c = Zd(a.type, u, t);
|
|
14972
14972
|
if (c == null) return;
|
|
14973
14973
|
f.attrs = {}, f.attrs[a.property] = c;
|
|
14974
14974
|
}
|
|
@@ -14977,7 +14977,7 @@ function Bt(r, e = [], t = null) {
|
|
|
14977
14977
|
});
|
|
14978
14978
|
}), hi(n);
|
|
14979
14979
|
}
|
|
14980
|
-
function
|
|
14980
|
+
function Qd(r, e) {
|
|
14981
14981
|
const t = r.elements?.find((o) => o.name === "w:rPrChange");
|
|
14982
14982
|
if (!t)
|
|
14983
14983
|
return [];
|
|
@@ -14998,25 +14998,25 @@ function hi(r) {
|
|
|
14998
14998
|
});
|
|
14999
14999
|
}), [...t, { type: "textStyle", attrs: n }];
|
|
15000
15000
|
}
|
|
15001
|
-
function
|
|
15001
|
+
function Zd(r, e, t) {
|
|
15002
15002
|
r === "tabs" && (r = "textIndent");
|
|
15003
15003
|
const n = {
|
|
15004
15004
|
color: () => `#${e["w:val"]}`,
|
|
15005
15005
|
fontSize: () => `${e["w:val"] / 2}pt`,
|
|
15006
|
-
textIndent: () =>
|
|
15007
|
-
fontFamily: () =>
|
|
15008
|
-
lineHeight: () =>
|
|
15006
|
+
textIndent: () => tm(e),
|
|
15007
|
+
fontFamily: () => em(e, t),
|
|
15008
|
+
lineHeight: () => rm(e),
|
|
15009
15009
|
textAlign: () => e["w:val"],
|
|
15010
15010
|
link: () => e.href,
|
|
15011
15011
|
underline: () => e["w:val"],
|
|
15012
15012
|
bold: () => e?.["w:val"] || null,
|
|
15013
15013
|
italic: () => e?.["w:val"] || null,
|
|
15014
|
-
highlight: () =>
|
|
15014
|
+
highlight: () => nm(e)
|
|
15015
15015
|
};
|
|
15016
15016
|
if (r in n || console.debug("❗️❗️ No value mapper for:", r, "Attributes:", e), r in n)
|
|
15017
15017
|
return n[r], n[r]();
|
|
15018
15018
|
}
|
|
15019
|
-
function
|
|
15019
|
+
function em(r, e) {
|
|
15020
15020
|
const t = r["w:ascii"], n = r["w:asciiTheme"];
|
|
15021
15021
|
if (!e || !n) return t;
|
|
15022
15022
|
const i = e["word/theme/theme1.xml"];
|
|
@@ -15024,20 +15024,20 @@ function Yd(r, e) {
|
|
|
15024
15024
|
const { elements: s } = i, { elements: o } = s[0];
|
|
15025
15025
|
return o.find((g) => g.name === "a:themeElements").elements.find((g) => g.name === "a:fontScheme").elements.find((g) => g.name === "a:majorFont").elements.find((g) => g.name === "a:latin").attributes.typeface;
|
|
15026
15026
|
}
|
|
15027
|
-
function
|
|
15027
|
+
function tm(r) {
|
|
15028
15028
|
let e = r["w:left"];
|
|
15029
15029
|
return e ? `${qe(e)}in` : null;
|
|
15030
15030
|
}
|
|
15031
|
-
function
|
|
15031
|
+
function rm(r) {
|
|
15032
15032
|
let e = r["w:line"];
|
|
15033
15033
|
return !e || e === "0" ? null : `${ki(e)}`;
|
|
15034
15034
|
}
|
|
15035
|
-
function
|
|
15035
|
+
function nm(r) {
|
|
15036
15036
|
return r["w:fill"] ? `#${r["w:fill"]}` : Rf(r?.["w:val"]) ? `#${r["w:val"]}` : If(r?.["w:val"]) || null;
|
|
15037
15037
|
}
|
|
15038
15038
|
function Lt(r, e) {
|
|
15039
|
-
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } =
|
|
15040
|
-
return s.find((c) => c.name === "w:r") && (a.elements = a?.elements?.filter((c) => c.name !== "w:rPr")), u && u?.elements?.length && t.push(...Bt(u, n)), a && a.elements?.length && t.push(...Bt(a, n)), t.push(
|
|
15039
|
+
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = im(s);
|
|
15040
|
+
return s.find((c) => c.name === "w:r") && (a.elements = a?.elements?.filter((c) => c.name !== "w:rPr")), u && u?.elements?.length && t.push(...Bt(u, n)), a && a.elements?.length && t.push(...Bt(a, n)), t.push(...Qd(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((c) => {
|
|
15041
15041
|
const h = Object.keys(c.attrs ?? {})[0];
|
|
15042
15042
|
if (h) {
|
|
15043
15043
|
const g = c.attrs[h];
|
|
@@ -15045,7 +15045,7 @@ function Lt(r, e) {
|
|
|
15045
15045
|
}
|
|
15046
15046
|
}), { elements: o, attributes: i, marks: t, unknownMarks: n };
|
|
15047
15047
|
}
|
|
15048
|
-
function
|
|
15048
|
+
function im(r) {
|
|
15049
15049
|
const e = r.find((s) => s.name === "w:pPr"), t = r.find((s) => s.name === "w:rPr"), n = r.find((s) => s.name === "w:sectPr");
|
|
15050
15050
|
return {
|
|
15051
15051
|
nodes: r.filter((s) => s.name !== "w:pPr" && s.name !== "w:rPr" && s.name !== "w:sectPr"),
|
|
@@ -15057,11 +15057,11 @@ function tm(r) {
|
|
|
15057
15057
|
function lr(r) {
|
|
15058
15058
|
return Nt.allowedElements[r.name || r.type];
|
|
15059
15059
|
}
|
|
15060
|
-
const
|
|
15060
|
+
const sm = (r) => !!Nt.propertyTypes[r.name || r.type];
|
|
15061
15061
|
function mu(r) {
|
|
15062
15062
|
return r.filter((n) => n.name === "w:r").some((n) => n.elements.some((i) => i.name === "w:t"));
|
|
15063
15063
|
}
|
|
15064
|
-
const
|
|
15064
|
+
const om = (r) => {
|
|
15065
15065
|
const { nodes: e, nodeListHandler: t } = r;
|
|
15066
15066
|
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins"))
|
|
15067
15067
|
return { nodes: [], consumed: 0 };
|
|
@@ -15074,10 +15074,10 @@ const nm = (r) => {
|
|
|
15074
15074
|
return a.forEach((c) => {
|
|
15075
15075
|
c.marks === void 0 && (c.marks = []), c.marks.push({ type: u, attrs: f });
|
|
15076
15076
|
}), { nodes: a, consumed: 1 };
|
|
15077
|
-
},
|
|
15077
|
+
}, am = {
|
|
15078
15078
|
handlerName: "trackChangeNodeHandler",
|
|
15079
|
-
handler:
|
|
15080
|
-
},
|
|
15079
|
+
handler: om
|
|
15080
|
+
}, um = (r) => {
|
|
15081
15081
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
15082
15082
|
if (e.length === 0 || e[0].name !== "w:hyperlink")
|
|
15083
15083
|
return { nodes: [], consumed: 0 };
|
|
@@ -15096,31 +15096,31 @@ const nm = (r) => {
|
|
|
15096
15096
|
}
|
|
15097
15097
|
}
|
|
15098
15098
|
return { nodes: n.handler({ ...r, nodes: T }), consumed: 1 };
|
|
15099
|
-
},
|
|
15099
|
+
}, lm = {
|
|
15100
15100
|
handlerName: "hyperlinkNodeHandler",
|
|
15101
|
-
handler:
|
|
15102
|
-
},
|
|
15101
|
+
handler: um
|
|
15102
|
+
}, cm = (r) => {
|
|
15103
15103
|
const { nodes: e, nodeListHandler: t, parentStyleId: n, docx: i } = r;
|
|
15104
15104
|
if (e.length === 0 || e[0].name !== "w:r")
|
|
15105
15105
|
return { nodes: [], consumed: 0 };
|
|
15106
15106
|
const s = e[0], o = { ...r, nodes: s.elements };
|
|
15107
15107
|
let a = t.handler(o)?.filter((c) => c) || [];
|
|
15108
|
-
const u = s.elements?.some((c) => c.name === "w:rPr"), f =
|
|
15108
|
+
const u = s.elements?.some((c) => c.name === "w:rPr"), f = fm(i, n);
|
|
15109
15109
|
if (u) {
|
|
15110
15110
|
const { marks: c = [], attributes: h = {} } = Lt(s), g = c.find((T) => T.type === "textStyle"), S = g && Object.keys(g.attrs).length > 0;
|
|
15111
15111
|
f.marks && !S && c.push(...f.marks), s.marks && c.push(...s.marks), a = a.map((T) => ({ ...T, marks: hi(c), attributes: h }));
|
|
15112
15112
|
} else f.marks && (a = a.map((c) => ({ ...c, marks: hi(f.marks) })));
|
|
15113
15113
|
return { nodes: a, consumed: 1 };
|
|
15114
|
-
},
|
|
15114
|
+
}, fm = (r, e) => {
|
|
15115
15115
|
const t = r?.["word/styles.xml"];
|
|
15116
15116
|
if (!t)
|
|
15117
15117
|
return {};
|
|
15118
15118
|
const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
|
|
15119
15119
|
return i ? Lt(i) : {};
|
|
15120
|
-
},
|
|
15120
|
+
}, dm = {
|
|
15121
15121
|
handlerName: "runNodeHandler",
|
|
15122
|
-
handler:
|
|
15123
|
-
},
|
|
15122
|
+
handler: cm
|
|
15123
|
+
}, mm = (r) => {
|
|
15124
15124
|
const { nodes: e, insideTrackChange: t } = r;
|
|
15125
15125
|
if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
|
|
15126
15126
|
return { nodes: [], consumed: 0 };
|
|
@@ -15141,41 +15141,41 @@ const nm = (r) => {
|
|
|
15141
15141
|
],
|
|
15142
15142
|
consumed: 1
|
|
15143
15143
|
};
|
|
15144
|
-
},
|
|
15144
|
+
}, pm = {
|
|
15145
15145
|
handlerName: "textNodeHandler",
|
|
15146
|
-
handler:
|
|
15147
|
-
},
|
|
15148
|
-
function
|
|
15146
|
+
handler: mm
|
|
15147
|
+
}, hm = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
|
|
15148
|
+
function gm(r, e, t = { strict: !0 }) {
|
|
15149
15149
|
const n = Object.keys(e);
|
|
15150
|
-
return n.length ? n.every((i) => t.strict ? e[i] === r[i] :
|
|
15150
|
+
return n.length ? n.every((i) => t.strict ? e[i] === r[i] : hm(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
|
|
15151
15151
|
}
|
|
15152
15152
|
const pu = (r) => {
|
|
15153
15153
|
if (!r || !Array.isArray(r))
|
|
15154
15154
|
return r;
|
|
15155
15155
|
let e = [], t = null;
|
|
15156
15156
|
for (let n of r)
|
|
15157
|
-
n.type === "text" ? t &&
|
|
15157
|
+
n.type === "text" ? t && wm(t, n) ? t = {
|
|
15158
15158
|
...t,
|
|
15159
15159
|
text: t.text += n.text
|
|
15160
15160
|
} : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
|
|
15161
15161
|
return t && e.push(t), e;
|
|
15162
|
-
},
|
|
15162
|
+
}, wm = (r, e) => {
|
|
15163
15163
|
if (!r || !e) return !1;
|
|
15164
15164
|
let t = r.marks ?? [], n = e.marks ?? [];
|
|
15165
15165
|
if (t.length !== n.length)
|
|
15166
15166
|
return !1;
|
|
15167
15167
|
for (let i = 0; i < t.length; i++)
|
|
15168
|
-
if (t[i].type !== n[i].type || !
|
|
15168
|
+
if (t[i].type !== n[i].type || !ym(t[i].attrs, n[i].attrs))
|
|
15169
15169
|
return !1;
|
|
15170
15170
|
return !0;
|
|
15171
|
-
},
|
|
15171
|
+
}, ym = (r = {}, e = {}) => gm(r, e);
|
|
15172
15172
|
function hu(r, e, t) {
|
|
15173
15173
|
this.name = r, this.message = e || "", this.details = t;
|
|
15174
15174
|
const n = new Error(this.message);
|
|
15175
15175
|
this.stack = n.stack, n.name = this.name;
|
|
15176
15176
|
}
|
|
15177
15177
|
hu.prototype = Object.create(Error.prototype);
|
|
15178
|
-
const
|
|
15178
|
+
const bm = (r) => {
|
|
15179
15179
|
const { nodes: e, lists: t, docx: n } = r;
|
|
15180
15180
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15181
15181
|
return { nodes: [], consumed: 0 };
|
|
@@ -15194,9 +15194,9 @@ const gm = (r) => {
|
|
|
15194
15194
|
};
|
|
15195
15195
|
} else
|
|
15196
15196
|
return { nodes: [], consumed: 0, lists: t };
|
|
15197
|
-
},
|
|
15197
|
+
}, xm = {
|
|
15198
15198
|
handlerName: "listHandler",
|
|
15199
|
-
handler:
|
|
15199
|
+
handler: bm
|
|
15200
15200
|
};
|
|
15201
15201
|
function gu({
|
|
15202
15202
|
listItems: r,
|
|
@@ -15235,9 +15235,9 @@ function gu({
|
|
|
15235
15235
|
lvlText: Y,
|
|
15236
15236
|
lvlJc: de,
|
|
15237
15237
|
numId: J
|
|
15238
|
-
} =
|
|
15238
|
+
} = vm(N, n, u);
|
|
15239
15239
|
S = ee;
|
|
15240
|
-
const te = parseInt(Q), ie = i === te && J === s, L =
|
|
15240
|
+
const te = parseInt(Q), ie = i === te && J === s, L = Em({
|
|
15241
15241
|
firstListId: J,
|
|
15242
15242
|
secondListId: s,
|
|
15243
15243
|
level: te,
|
|
@@ -15358,7 +15358,7 @@ function Io(r, e, t) {
|
|
|
15358
15358
|
marks: t
|
|
15359
15359
|
};
|
|
15360
15360
|
}
|
|
15361
|
-
const
|
|
15361
|
+
const Am = [
|
|
15362
15362
|
"decimal",
|
|
15363
15363
|
// eg: 1, 2, 3, 4, 5, ...
|
|
15364
15364
|
"decimalZero",
|
|
@@ -15383,7 +15383,7 @@ const ym = [
|
|
|
15383
15383
|
// eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
|
|
15384
15384
|
"none"
|
|
15385
15385
|
// No bullet
|
|
15386
|
-
],
|
|
15386
|
+
], Dm = [
|
|
15387
15387
|
"bullet",
|
|
15388
15388
|
// A standard bullet point (•)
|
|
15389
15389
|
"square",
|
|
@@ -15392,7 +15392,7 @@ const ym = [
|
|
|
15392
15392
|
// Circle bullets (◦)
|
|
15393
15393
|
"disc"
|
|
15394
15394
|
// Disc bullets (●)
|
|
15395
|
-
],
|
|
15395
|
+
], Em = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
|
|
15396
15396
|
const { numFmt: s, lvlText: o, lvlJc: a } = br(r, t, n, i), {
|
|
15397
15397
|
numFmt: u,
|
|
15398
15398
|
lvlText: f,
|
|
@@ -15422,7 +15422,7 @@ const ym = [
|
|
|
15422
15422
|
}
|
|
15423
15423
|
const a = o.elements, u = a.filter((N) => N.name === "w:abstractNum"), h = a.filter((N) => N.name === "w:num").find((N) => N.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], g = u?.find(
|
|
15424
15424
|
(N) => N.attributes["w:abstractNumId"] === h
|
|
15425
|
-
), S =
|
|
15425
|
+
), S = Cm(g, e), A = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
|
|
15426
15426
|
if (A) {
|
|
15427
15427
|
const N = Ro(A, n);
|
|
15428
15428
|
return br(N.numId, e, null, n);
|
|
@@ -15430,7 +15430,7 @@ const ym = [
|
|
|
15430
15430
|
const B = S?.elements?.find((N) => N.name === "w:start")?.attributes["w:val"], w = S?.elements?.find((N) => N.name === "w:numFmt")?.attributes["w:val"], k = S?.elements?.find((N) => N.name === "w:lvlText").attributes["w:val"], I = S?.elements?.find((N) => N.name === "w:lvlJc").attributes["w:val"], C = S?.elements?.find((N) => N.name === "w:pPr"), F = S?.elements?.find((N) => N.name === "w:rPr");
|
|
15431
15431
|
return { start: B, numFmt: w, lvlText: k, lvlJc: I, pPr: C, rPr: F };
|
|
15432
15432
|
};
|
|
15433
|
-
function
|
|
15433
|
+
function vm(r, e, t) {
|
|
15434
15434
|
if (!r) return;
|
|
15435
15435
|
const { attributes: n } = r, { paragraphProperties: i = {} } = n, { elements: s = [] } = i, u = r.elements.find((D) => D.name === "w:pPr")?.elements?.find((D) => D.name === "w:pStyle")?.attributes["w:val"], f = kr({ node: r, styleId: u, docx: t });
|
|
15436
15436
|
if (!f) return {};
|
|
@@ -15443,10 +15443,10 @@ function Am(r, e, t) {
|
|
|
15443
15443
|
rPr: F
|
|
15444
15444
|
} = br(h, e, A, t);
|
|
15445
15445
|
let N, q;
|
|
15446
|
-
C && (N =
|
|
15446
|
+
C && (N = Sm(C)), F && (q = Tm(F));
|
|
15447
15447
|
let H;
|
|
15448
|
-
if (
|
|
15449
|
-
else if (
|
|
15448
|
+
if (Dm.includes(w?.toLowerCase())) H = "bulletList";
|
|
15449
|
+
else if (Am.includes(w)) H = "orderedList";
|
|
15450
15450
|
else
|
|
15451
15451
|
throw new hu("ListParsingError", `Unknown list type found during import: ${w}`, {
|
|
15452
15452
|
listOrderingType: w,
|
|
@@ -15460,10 +15460,10 @@ function Am(r, e, t) {
|
|
|
15460
15460
|
});
|
|
15461
15461
|
return { listType: H, listOrderingType: w, ilvl: S, numId: h, listrPrs: q, listpPrs: N, start: B, lvlText: k, lvlJc: I };
|
|
15462
15462
|
}
|
|
15463
|
-
function
|
|
15463
|
+
function Cm(r, e) {
|
|
15464
15464
|
return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
|
|
15465
15465
|
}
|
|
15466
|
-
function
|
|
15466
|
+
function Sm(r) {
|
|
15467
15467
|
const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
|
|
15468
15468
|
return e && e.forEach((i) => {
|
|
15469
15469
|
t.includes(i.name);
|
|
@@ -15473,7 +15473,7 @@ function Em(r) {
|
|
|
15473
15473
|
});
|
|
15474
15474
|
}), n;
|
|
15475
15475
|
}
|
|
15476
|
-
function
|
|
15476
|
+
function Tm(r) {
|
|
15477
15477
|
const { elements: e } = r, t = [
|
|
15478
15478
|
"w:rFonts",
|
|
15479
15479
|
"w:b",
|
|
@@ -15504,7 +15504,7 @@ function vm(r) {
|
|
|
15504
15504
|
});
|
|
15505
15505
|
}), n;
|
|
15506
15506
|
}
|
|
15507
|
-
const
|
|
15507
|
+
const Fm = (r) => {
|
|
15508
15508
|
const { nodes: e, docx: t, nodeListHandler: n, filename: i } = r;
|
|
15509
15509
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15510
15510
|
return { nodes: [], consumed: 0 };
|
|
@@ -15521,7 +15521,7 @@ const Cm = (r) => {
|
|
|
15521
15521
|
c.nodes.length === 1 && (o = c.nodes[0]);
|
|
15522
15522
|
const h = s.elements?.find((w) => w.name === "w:pPr"), g = h?.elements?.find((w) => w.name === "w:pStyle"), S = h?.elements?.find((w) => w.name === "w:rPr");
|
|
15523
15523
|
if (S && (o.attrs.marksAttrs = Bt(S, [])), g && (o.attrs.styleId = g.attributes["w:val"]), t) {
|
|
15524
|
-
const w =
|
|
15524
|
+
const w = Bm(s, t, o.attrs.styleId);
|
|
15525
15525
|
o.attrs.indent || (o.attrs.indent = {}), w.left && (o.attrs.indent.left = w.left), w.right && (o.attrs.indent.right = w.right), w.firstLine && (o.attrs.indent.firstLine = w.firstLine), w.hanging && (o.attrs.indent.hanging = w.hanging), w.textIndent && (o.attrs.textIndent = `${w.textIndent}in`);
|
|
15526
15526
|
}
|
|
15527
15527
|
const T = h?.elements?.find((w) => w.name === "w:jc");
|
|
@@ -15537,7 +15537,7 @@ const Cm = (r) => {
|
|
|
15537
15537
|
...o,
|
|
15538
15538
|
content: pu(o.content)
|
|
15539
15539
|
}), { nodes: o ? [o] : [], consumed: 1 };
|
|
15540
|
-
},
|
|
15540
|
+
}, Bm = (r, e, t = "") => {
|
|
15541
15541
|
const n = {
|
|
15542
15542
|
left: 0,
|
|
15543
15543
|
right: 0,
|
|
@@ -15579,11 +15579,11 @@ const Cm = (r) => {
|
|
|
15579
15579
|
spacing: B || T || A,
|
|
15580
15580
|
indent: I || w || k
|
|
15581
15581
|
};
|
|
15582
|
-
},
|
|
15582
|
+
}, km = {
|
|
15583
15583
|
handlerName: "paragraphNodeHandler",
|
|
15584
|
-
handler:
|
|
15584
|
+
handler: Fm
|
|
15585
15585
|
};
|
|
15586
|
-
function
|
|
15586
|
+
function Nm(r, e) {
|
|
15587
15587
|
const t = { lineSpaceBefore: null, lineSpaceAfter: null };
|
|
15588
15588
|
if (!r) return t;
|
|
15589
15589
|
const n = e["word/styles.xml"];
|
|
@@ -15693,7 +15693,7 @@ const Po = (r = []) => {
|
|
|
15693
15693
|
});
|
|
15694
15694
|
}
|
|
15695
15695
|
return e;
|
|
15696
|
-
},
|
|
15696
|
+
}, Im = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Rm = (r) => {
|
|
15697
15697
|
const { nodes: e } = r;
|
|
15698
15698
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
15699
15699
|
return { nodes: [], consumed: 0 };
|
|
@@ -15708,14 +15708,14 @@ const Po = (r = []) => {
|
|
|
15708
15708
|
consumed: 1
|
|
15709
15709
|
};
|
|
15710
15710
|
}, Oo = {
|
|
15711
|
-
"Table of Contents":
|
|
15712
|
-
},
|
|
15711
|
+
"Table of Contents": Im
|
|
15712
|
+
}, Pm = (r) => {
|
|
15713
15713
|
const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
|
|
15714
15714
|
if (e.length === 0 || e[0].name !== "w:sdt")
|
|
15715
15715
|
return { nodes: [], consumed: 0 };
|
|
15716
|
-
const s = e[0], o = s.elements.find((I) => I.name === "w:sdtPr"), a = s.elements.find((I) => I.name === "w:sdtContent"), { attrs: u, marks: f } =
|
|
15716
|
+
const s = e[0], o = s.elements.find((I) => I.name === "w:sdtPr"), a = s.elements.find((I) => I.name === "w:sdtContent"), { attrs: u, marks: f } = Om(a);
|
|
15717
15717
|
if (o?.elements.find((I) => I.name === "w:docPartObj"))
|
|
15718
|
-
return
|
|
15718
|
+
return Rm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
|
|
15719
15719
|
const h = o?.elements.find((I) => I.name === "w:alias"), g = o?.elements.find((I) => I.name === "w:tag"), S = o?.elements.find((I) => I.name === "w:fieldType")?.attributes["w:val"], T = o?.elements.find((I) => I.name === "w:fieldTypeShort")?.attributes["w:val"], A = o?.elements.find((I) => I.name === "w:fieldColor")?.attributes["w:val"], B = o?.elements.find((I) => I.name === "w:fieldMultipleImage")?.attributes["w:val"], w = {
|
|
15720
15720
|
type: T,
|
|
15721
15721
|
fieldId: g?.attributes["w:val"],
|
|
@@ -15739,7 +15739,7 @@ const Po = (r = []) => {
|
|
|
15739
15739
|
nodes: [k],
|
|
15740
15740
|
consumed: 1
|
|
15741
15741
|
};
|
|
15742
|
-
},
|
|
15742
|
+
}, Om = (r = {}) => {
|
|
15743
15743
|
const t = r.elements?.find((a) => a.name === "w:r")?.elements?.find((a) => a.name === "w:rPr");
|
|
15744
15744
|
if (!t) return {};
|
|
15745
15745
|
const i = Bt(t, []) || [], s = [];
|
|
@@ -15761,17 +15761,17 @@ const Po = (r = []) => {
|
|
|
15761
15761
|
attrs: o,
|
|
15762
15762
|
marks: i
|
|
15763
15763
|
};
|
|
15764
|
-
},
|
|
15764
|
+
}, Lm = {
|
|
15765
15765
|
handlerName: "annotationNodeHandler",
|
|
15766
|
-
handler:
|
|
15767
|
-
},
|
|
15766
|
+
handler: Pm
|
|
15767
|
+
}, _m = (r) => {
|
|
15768
15768
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
15769
15769
|
if (!e || e.length === 0)
|
|
15770
15770
|
return { nodes: [], consumed: 0 };
|
|
15771
15771
|
const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } = Lt(i);
|
|
15772
15772
|
if (s === "w:sdt")
|
|
15773
15773
|
return { nodes: [], consumed: 0 };
|
|
15774
|
-
if (
|
|
15774
|
+
if (sm(i))
|
|
15775
15775
|
return {
|
|
15776
15776
|
nodes: [{
|
|
15777
15777
|
type: lr(i),
|
|
@@ -15791,7 +15791,7 @@ const Po = (r = []) => {
|
|
|
15791
15791
|
consumed: 0,
|
|
15792
15792
|
unhandled: !0
|
|
15793
15793
|
};
|
|
15794
|
-
const f = [], c =
|
|
15794
|
+
const f = [], c = qm(i);
|
|
15795
15795
|
if (a && a.length) {
|
|
15796
15796
|
const g = a.map((A) => (A.marks || (A.marks = []), A.marks.push(...u), A)), S = { ...r, nodes: g, parentStyleId: c }, T = n.handler(S);
|
|
15797
15797
|
f.push(...T);
|
|
@@ -15802,13 +15802,13 @@ const Po = (r = []) => {
|
|
|
15802
15802
|
attrs: { ...o },
|
|
15803
15803
|
marks: []
|
|
15804
15804
|
}], consumed: 1 };
|
|
15805
|
-
},
|
|
15805
|
+
}, qm = (r) => {
|
|
15806
15806
|
const t = r.elements?.find((n) => n.name === "w:pPr")?.elements?.find((n) => n.name === "w:pStyle");
|
|
15807
15807
|
return t ? t.attributes["w:val"] : null;
|
|
15808
|
-
},
|
|
15808
|
+
}, Mm = {
|
|
15809
15809
|
handlerName: "standardNodeHandler",
|
|
15810
|
-
handler:
|
|
15811
|
-
},
|
|
15810
|
+
handler: _m
|
|
15811
|
+
}, Um = (r) => {
|
|
15812
15812
|
const { nodes: e } = r;
|
|
15813
15813
|
return e.length === 0 || e[0].name !== "w:br" ? { nodes: [], consumed: 0 } : {
|
|
15814
15814
|
nodes: [{
|
|
@@ -15816,10 +15816,10 @@ const Po = (r = []) => {
|
|
|
15816
15816
|
}],
|
|
15817
15817
|
consumed: 1
|
|
15818
15818
|
};
|
|
15819
|
-
},
|
|
15819
|
+
}, jm = {
|
|
15820
15820
|
handlerName: "lineBreakNodeHandler",
|
|
15821
|
-
handler:
|
|
15822
|
-
},
|
|
15821
|
+
handler: Um
|
|
15822
|
+
}, Hm = (r) => {
|
|
15823
15823
|
const { nodes: e, nodeListHandler: t } = r;
|
|
15824
15824
|
if (e.length === 0 || e[0].name !== "w:bookmarkStart")
|
|
15825
15825
|
return { nodes: [], consumed: 0 };
|
|
@@ -15830,26 +15830,26 @@ const Po = (r = []) => {
|
|
|
15830
15830
|
return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
|
|
15831
15831
|
const s = { ...r, nodes: [n] }, o = i(s);
|
|
15832
15832
|
return o.nodes.length === 1 && (o.nodes[0].attrs.name = n.attributes["w:name"], o.nodes[0].attrs.id = n.attributes["w:id"]), o;
|
|
15833
|
-
},
|
|
15833
|
+
}, Vm = {
|
|
15834
15834
|
handlerName: "bookmarkNodeHandler",
|
|
15835
|
-
handler:
|
|
15836
|
-
},
|
|
15835
|
+
handler: Hm
|
|
15836
|
+
}, zm = (r) => {
|
|
15837
15837
|
const { nodes: e } = r;
|
|
15838
15838
|
return e.length === 0 || e[0].name !== "sd:autoPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
|
|
15839
15839
|
type: "page-number"
|
|
15840
15840
|
}], consumed: 1 };
|
|
15841
|
-
},
|
|
15841
|
+
}, Gm = {
|
|
15842
15842
|
handlerName: "autoPageNumberHandler",
|
|
15843
|
-
handler:
|
|
15844
|
-
},
|
|
15843
|
+
handler: zm
|
|
15844
|
+
}, Wm = (r) => {
|
|
15845
15845
|
const { nodes: e } = r;
|
|
15846
15846
|
return e.length === 0 || e[0].name !== "sd:totalPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
|
|
15847
15847
|
type: "total-page-number"
|
|
15848
15848
|
}], consumed: 1 };
|
|
15849
|
-
},
|
|
15849
|
+
}, Jm = {
|
|
15850
15850
|
handlerName: "autoTotalPageCountEntity",
|
|
15851
|
-
handler:
|
|
15852
|
-
},
|
|
15851
|
+
handler: Wm
|
|
15852
|
+
}, Km = (r) => {
|
|
15853
15853
|
const { nodes: e } = r;
|
|
15854
15854
|
if (e.length === 0 || e[0].name !== "w:tab")
|
|
15855
15855
|
return { nodes: [], consumed: 0 };
|
|
@@ -15861,11 +15861,11 @@ const Po = (r = []) => {
|
|
|
15861
15861
|
},
|
|
15862
15862
|
content: []
|
|
15863
15863
|
}], consumed: 1 };
|
|
15864
|
-
},
|
|
15864
|
+
}, $m = {
|
|
15865
15865
|
handlerName: "tabNodeHandler",
|
|
15866
|
-
handler:
|
|
15866
|
+
handler: Km
|
|
15867
15867
|
};
|
|
15868
|
-
function
|
|
15868
|
+
function Xm({ docx: r }) {
|
|
15869
15869
|
const e = xr(), t = r["word/comments.xml"];
|
|
15870
15870
|
if (!t) return;
|
|
15871
15871
|
const { elements: n } = t;
|
|
@@ -15891,16 +15891,16 @@ function Jm({ docx: r }) {
|
|
|
15891
15891
|
trackedDeletedText: k
|
|
15892
15892
|
};
|
|
15893
15893
|
});
|
|
15894
|
-
return
|
|
15894
|
+
return Ym({ docx: r, comments: s });
|
|
15895
15895
|
}
|
|
15896
|
-
const
|
|
15896
|
+
const Ym = ({ docx: r, comments: e }) => {
|
|
15897
15897
|
const t = r["word/commentsExtended.xml"];
|
|
15898
15898
|
if (!t) return [];
|
|
15899
15899
|
const { elements: n } = t, { elements: i } = n[0], s = i.filter((o) => o.name === "w15:commentEx");
|
|
15900
15900
|
return e.map((o) => {
|
|
15901
15901
|
const a = s.find((g) => g.attributes["w15:paraId"] === o.paraId);
|
|
15902
15902
|
if (!a) return { ...o };
|
|
15903
|
-
const { isDone: u, paraIdParent: f } =
|
|
15903
|
+
const { isDone: u, paraIdParent: f } = Qm(a);
|
|
15904
15904
|
let c;
|
|
15905
15905
|
return f && (c = e.find((g) => g.paraId === f)), {
|
|
15906
15906
|
...o,
|
|
@@ -15908,11 +15908,11 @@ const Km = ({ docx: r, comments: e }) => {
|
|
|
15908
15908
|
parentCommentId: c?.commentId
|
|
15909
15909
|
};
|
|
15910
15910
|
});
|
|
15911
|
-
},
|
|
15911
|
+
}, Qm = (r) => {
|
|
15912
15912
|
const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
|
|
15913
15913
|
return { paraId: t, isDone: n, paraIdParent: i };
|
|
15914
|
-
},
|
|
15915
|
-
const n = je(
|
|
15914
|
+
}, Zm = (r, e, t) => {
|
|
15915
|
+
const n = je(Hd(r));
|
|
15916
15916
|
if (!n) return null;
|
|
15917
15917
|
if (e?.telemetry) {
|
|
15918
15918
|
const o = Object.keys(r).map((a) => {
|
|
@@ -15937,7 +15937,7 @@ const Km = ({ docx: r, comments: e }) => {
|
|
|
15937
15937
|
}
|
|
15938
15938
|
const i = xr(), s = n.elements[0].elements.find((o) => o.name === "w:body");
|
|
15939
15939
|
if (s) {
|
|
15940
|
-
const o = s, a = ["w:sectPr"], u = o.elements?.filter((S) => !a.includes(S.name)) ?? [], f =
|
|
15940
|
+
const o = s, a = ["w:sectPr"], u = o.elements?.filter((S) => !a.includes(S.name)) ?? [], f = Xm({ docx: r }), c = {}, g = {
|
|
15941
15941
|
type: "doc",
|
|
15942
15942
|
content: i.handler({
|
|
15943
15943
|
nodes: u,
|
|
@@ -15960,37 +15960,37 @@ const Km = ({ docx: r, comments: e }) => {
|
|
|
15960
15960
|
), {
|
|
15961
15961
|
pmDoc: g,
|
|
15962
15962
|
savedTagsToRestore: o,
|
|
15963
|
-
pageStyles:
|
|
15963
|
+
pageStyles: tp(o, r, e, t),
|
|
15964
15964
|
comments: f,
|
|
15965
|
-
linkedStyles:
|
|
15966
|
-
numbering:
|
|
15965
|
+
linkedStyles: rp(r),
|
|
15966
|
+
numbering: sp(r)
|
|
15967
15967
|
};
|
|
15968
15968
|
}
|
|
15969
15969
|
return null;
|
|
15970
15970
|
}, xr = () => {
|
|
15971
15971
|
const r = [
|
|
15972
|
+
dm,
|
|
15973
|
+
km,
|
|
15974
|
+
xm,
|
|
15975
|
+
pm,
|
|
15976
|
+
jm,
|
|
15977
|
+
Lm,
|
|
15978
|
+
Vm,
|
|
15972
15979
|
lm,
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
Kd,
|
|
15981
|
-
im,
|
|
15982
|
-
jd,
|
|
15983
|
-
Wm,
|
|
15984
|
-
Hm,
|
|
15985
|
-
zm,
|
|
15986
|
-
Lm
|
|
15980
|
+
Yd,
|
|
15981
|
+
am,
|
|
15982
|
+
zd,
|
|
15983
|
+
$m,
|
|
15984
|
+
Gm,
|
|
15985
|
+
Jm,
|
|
15986
|
+
Mm
|
|
15987
15987
|
//this should be the last one, bcs this parses everything!!!
|
|
15988
15988
|
];
|
|
15989
15989
|
return {
|
|
15990
|
-
handler:
|
|
15990
|
+
handler: ep(r),
|
|
15991
15991
|
handlerEntities: r
|
|
15992
15992
|
};
|
|
15993
|
-
},
|
|
15993
|
+
}, ep = (r) => {
|
|
15994
15994
|
const e = (n, i, s, o) => !n || i < 0 || i >= n.length ? {
|
|
15995
15995
|
elementIndex: i,
|
|
15996
15996
|
error: "index_out_of_bounds",
|
|
@@ -16075,7 +16075,7 @@ const Km = ({ docx: r, comments: e }) => {
|
|
|
16075
16075
|
};
|
|
16076
16076
|
return t;
|
|
16077
16077
|
};
|
|
16078
|
-
function
|
|
16078
|
+
function tp(r, e, t, n) {
|
|
16079
16079
|
const i = r.elements?.find((o) => o.name === "w:sectPr"), s = {};
|
|
16080
16080
|
return i?.elements?.forEach((o) => {
|
|
16081
16081
|
const { name: a, attributes: u } = o;
|
|
@@ -16113,9 +16113,9 @@ function Qm(r, e, t, n) {
|
|
|
16113
16113
|
case "w:titlePg":
|
|
16114
16114
|
t.headerIds.titlePg = !0;
|
|
16115
16115
|
}
|
|
16116
|
-
}),
|
|
16116
|
+
}), ip(e, t, n), s.alternateHeaders = op(e), s;
|
|
16117
16117
|
}
|
|
16118
|
-
function
|
|
16118
|
+
function rp(r) {
|
|
16119
16119
|
const e = r["word/styles.xml"];
|
|
16120
16120
|
if (!e) return [];
|
|
16121
16121
|
const { elements: t } = e.elements[0], n = t.filter((o) => o.name === "w:style");
|
|
@@ -16125,7 +16125,7 @@ function Zm(r) {
|
|
|
16125
16125
|
});
|
|
16126
16126
|
const s = [];
|
|
16127
16127
|
return n.forEach((o) => {
|
|
16128
|
-
const a = o.attributes["w:styleId"], u =
|
|
16128
|
+
const a = o.attributes["w:styleId"], u = Nm(a, r), f = {
|
|
16129
16129
|
id: o.attributes["w:styleId"],
|
|
16130
16130
|
type: o.attributes["w:type"],
|
|
16131
16131
|
definition: u,
|
|
@@ -16134,7 +16134,7 @@ function Zm(r) {
|
|
|
16134
16134
|
s.push(f);
|
|
16135
16135
|
}), s;
|
|
16136
16136
|
}
|
|
16137
|
-
function
|
|
16137
|
+
function np(r) {
|
|
16138
16138
|
if (!r) return null;
|
|
16139
16139
|
const e = je(r), { elements: t } = e.elements[0];
|
|
16140
16140
|
return Object.keys(Eo).forEach((n) => {
|
|
@@ -16144,7 +16144,7 @@ function ep(r) {
|
|
|
16144
16144
|
}
|
|
16145
16145
|
}), e;
|
|
16146
16146
|
}
|
|
16147
|
-
const
|
|
16147
|
+
const ip = (r, e, t) => {
|
|
16148
16148
|
const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), f = s.filter((g) => g.attributes.Type === a), h = (Du(r["word/document.xml"]) || []).flatMap((g) => g.elements);
|
|
16149
16149
|
u.forEach((g) => {
|
|
16150
16150
|
const { rId: S, referenceFile: T, currentFileName: A } = Lo(g, r), w = h.find((C) => C.name === "w:headerReference" && C.attributes["r:id"] === S)?.attributes["w:type"], k = xr(), I = k.handler({
|
|
@@ -16179,7 +16179,7 @@ const tp = (r, e, t) => {
|
|
|
16179
16179
|
currentFileName: n
|
|
16180
16180
|
};
|
|
16181
16181
|
};
|
|
16182
|
-
function
|
|
16182
|
+
function sp(r) {
|
|
16183
16183
|
let e = r["word/numbering.xml"];
|
|
16184
16184
|
(!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = ru);
|
|
16185
16185
|
const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
|
|
@@ -16196,7 +16196,7 @@ function rp(r) {
|
|
|
16196
16196
|
definitions: o
|
|
16197
16197
|
};
|
|
16198
16198
|
}
|
|
16199
|
-
const
|
|
16199
|
+
const op = (r) => {
|
|
16200
16200
|
const e = r["word/settings.xml"];
|
|
16201
16201
|
if (!e || !e.elements?.length) return !1;
|
|
16202
16202
|
const { elements: t = [] } = e.elements[0];
|
|
@@ -16210,7 +16210,7 @@ const dt = class dt {
|
|
|
16210
16210
|
}
|
|
16211
16211
|
parseFromXml() {
|
|
16212
16212
|
this.docx?.forEach((e) => {
|
|
16213
|
-
this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] =
|
|
16213
|
+
this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = np(this.convertedXml[e.name]));
|
|
16214
16214
|
}), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
|
|
16215
16215
|
}
|
|
16216
16216
|
parseXmlToJson(e) {
|
|
@@ -16229,7 +16229,7 @@ const dt = class dt {
|
|
|
16229
16229
|
return;
|
|
16230
16230
|
}
|
|
16231
16231
|
}
|
|
16232
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.9.
|
|
16232
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.9.34") {
|
|
16233
16233
|
const n = "docProps/custom.xml";
|
|
16234
16234
|
e[n] || (e[n] = Tu());
|
|
16235
16235
|
const i = e["docProps/custom.xml"];
|
|
@@ -16296,14 +16296,14 @@ const dt = class dt {
|
|
|
16296
16296
|
}
|
|
16297
16297
|
getSchema(e) {
|
|
16298
16298
|
this.getDocumentInternalId();
|
|
16299
|
-
const t =
|
|
16299
|
+
const t = Zm({ ...this.convertedXml, media: this.media }, this, e);
|
|
16300
16300
|
return t ? (this.savedTagsToRestore.push({ ...t.savedTagsToRestore }), this.pageStyles = t.pageStyles, this.numbering = t.numbering, this.comments = t.comments, this.linkedStyles = t.linkedStyles, t.pmDoc) : null;
|
|
16301
16301
|
}
|
|
16302
16302
|
schemaToXml(e, t = !1) {
|
|
16303
16303
|
return new Bo(this).schemaToXml(e, t);
|
|
16304
16304
|
}
|
|
16305
16305
|
async exportToDocx(e, t, n, i = !1, s, o = []) {
|
|
16306
|
-
const a = o.map((A) =>
|
|
16306
|
+
const a = o.map((A) => $f(A)), u = a.map((A, B) => Xf(A, B, a)), { result: f, params: c } = this.exportToXmlJson({
|
|
16307
16307
|
data: e,
|
|
16308
16308
|
editorSchema: t,
|
|
16309
16309
|
comments: o,
|
|
@@ -16325,7 +16325,7 @@ const dt = class dt {
|
|
|
16325
16325
|
});
|
|
16326
16326
|
S = { ...A }, T = B;
|
|
16327
16327
|
}
|
|
16328
|
-
return this.convertedXml = { ...this.convertedXml, ...S }, Ke(this, it, Cu).call(this, [...c.relationships, ...T]),
|
|
16328
|
+
return this.convertedXml = { ...this.convertedXml, ...S }, Ke(this, it, Cu).call(this, [...c.relationships, ...T]), ap(this.convertedXml), Ke(this, it, Eu).call(this, c), g;
|
|
16329
16329
|
}
|
|
16330
16330
|
exportToXmlJson({
|
|
16331
16331
|
data: e,
|
|
@@ -16363,7 +16363,7 @@ it = new WeakSet(), Eu = function(e) {
|
|
|
16363
16363
|
* Update comments files and relationships depending on export type
|
|
16364
16364
|
*/
|
|
16365
16365
|
vu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
16366
|
-
const { documentXml: i, relationships: s } =
|
|
16366
|
+
const { documentXml: i, relationships: s } = nd({
|
|
16367
16367
|
exportType: t,
|
|
16368
16368
|
convertedXml: this.convertedXml,
|
|
16369
16369
|
defs: e,
|
|
@@ -16435,7 +16435,7 @@ vu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
|
16435
16435
|
"w:tcPr": "tableCellProperties"
|
|
16436
16436
|
})), _t(dt, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
|
|
16437
16437
|
let Nt = dt;
|
|
16438
|
-
function
|
|
16438
|
+
function ap(r) {
|
|
16439
16439
|
const e = "docProps/custom.xml";
|
|
16440
16440
|
r[e] || (r[e] = Tu());
|
|
16441
16441
|
const n = r[e].elements.find((a) => a.name === "Properties");
|
|
@@ -16454,7 +16454,7 @@ function ip(r) {
|
|
|
16454
16454
|
function Tu() {
|
|
16455
16455
|
return _f;
|
|
16456
16456
|
}
|
|
16457
|
-
function Fu(r = 2, e = "0.9.
|
|
16457
|
+
function Fu(r = 2, e = "0.9.34") {
|
|
16458
16458
|
return {
|
|
16459
16459
|
type: "element",
|
|
16460
16460
|
name: "property",
|
|
@@ -16486,37 +16486,37 @@ export {
|
|
|
16486
16486
|
Z as F,
|
|
16487
16487
|
Nt as G,
|
|
16488
16488
|
At as H,
|
|
16489
|
-
|
|
16489
|
+
Ap as I,
|
|
16490
16490
|
Ya as J,
|
|
16491
|
-
|
|
16491
|
+
id as K,
|
|
16492
16492
|
Sf as L,
|
|
16493
16493
|
wr as M,
|
|
16494
16494
|
Ge as N,
|
|
16495
16495
|
Cf as O,
|
|
16496
|
-
|
|
16497
|
-
|
|
16496
|
+
xp as P,
|
|
16497
|
+
sd as Q,
|
|
16498
16498
|
Je as R,
|
|
16499
16499
|
ve as S,
|
|
16500
16500
|
tt as T,
|
|
16501
16501
|
We as U,
|
|
16502
16502
|
_o as V,
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16503
|
+
vp as W,
|
|
16504
|
+
Ep as X,
|
|
16505
|
+
bp as a,
|
|
16506
16506
|
ue as b,
|
|
16507
16507
|
gr as c,
|
|
16508
16508
|
ge as d,
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16509
|
+
yp as e,
|
|
16510
|
+
fp as f,
|
|
16511
|
+
hp as g,
|
|
16512
|
+
gp as h,
|
|
16513
|
+
hm as i,
|
|
16514
|
+
wp as j,
|
|
16515
16515
|
Ie as k,
|
|
16516
|
-
|
|
16516
|
+
mp as l,
|
|
16517
16517
|
Oc as m,
|
|
16518
|
-
|
|
16519
|
-
|
|
16518
|
+
pp as n,
|
|
16519
|
+
gm as o,
|
|
16520
16520
|
he as p,
|
|
16521
16521
|
Ii as q,
|
|
16522
16522
|
yf as r,
|
|
@@ -16525,7 +16525,7 @@ export {
|
|
|
16525
16525
|
tu as u,
|
|
16526
16526
|
ba as v,
|
|
16527
16527
|
Ri as w,
|
|
16528
|
-
|
|
16528
|
+
Dp as x,
|
|
16529
16529
|
ct as y,
|
|
16530
16530
|
et as z
|
|
16531
16531
|
};
|