ranui 0.1.9 → 0.1.10-alpha.2
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/_commonjs-dynamic-modules-DLbDWi6a.js +12 -0
- package/dist/arrow-down-D4qr4m33.js +30 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.js +7 -0
- package/dist/colorpicker.js +13 -0
- package/dist/{colz-746223ab.js → colz-CRDozfZA.js} +1 -5
- package/dist/content.js +6 -0
- package/dist/docx-CChZ5Ycr.js +3665 -0
- package/dist/global-DOOKQmNv.js +4 -0
- package/dist/icon.js +6 -0
- package/dist/iconShadowless.js +6 -0
- package/dist/image.js +4 -0
- package/dist/index-01Qfd9QI.js +207 -0
- package/dist/{index-2d16a084.js → index-B2yRe66F.js} +8 -10
- package/dist/{index-3cf72afd.js → index-B4bfIbdI.js} +9 -23
- package/dist/{index-458debf7.js → index-BF8tJ6rR.js} +7 -31
- package/dist/{index-7b8840f9.js → index-BHmWrPCW.js} +223 -1011
- package/dist/{index-e03d23e7.js → index-BpOERe9M.js} +1 -1
- package/dist/{index-e2e5d725.js → index-ByBbFhvo.js} +123 -323
- package/dist/index-C-p_Wpit.js +103 -0
- package/dist/{index-b7790662.js → index-C1x9Popy.js} +1 -1
- package/dist/index-C6wPL-2Y.js +298 -0
- package/dist/{index-1048a998.js → index-CFnsLnrb.js} +68 -19
- package/dist/{index-57492b9b.js → index-CSnBqUsQ.js} +48 -1
- package/dist/index-CWWI8SHO.js +206 -0
- package/dist/index-Cbp6LrE5.js +501 -0
- package/dist/index-CbyMC6Yz.js +59 -0
- package/dist/index-Cr9AYoGT.js +498 -0
- package/dist/index-DLB8VOy7.js +281 -0
- package/dist/index-DRWOSfdF.js +521 -0
- package/dist/{index-4443363f.js → index-DRi1ylHx.js} +29 -50
- package/dist/index-Dapt713u.js +65624 -0
- package/dist/{index-7216d6b0.js → index-DqtzBqPN.js} +11 -29
- package/dist/{index-1b73beee.js → index-DsIUhdNt.js} +55 -90
- package/dist/{index-01b17e26.js → index-Du-Biu-I.js} +1 -1
- package/dist/{index-0d5b9435.js → index-DytfjwBV.js} +2 -2
- package/dist/index.js +25 -19
- package/dist/info-circle-fill-CFeVMdci.js +4 -0
- package/dist/input.js +6 -0
- package/dist/inputShadowless.js +6 -0
- package/dist/jszip.min-DD9Dc6z4.js +2674 -0
- package/dist/loading.js +6 -0
- package/dist/message.js +5 -0
- package/dist/modal.js +4 -0
- package/dist/{components/option/index.js → option.js} +3 -6
- package/dist/{pdf-bdb7818a.js → pdf-DpNqCylD.js} +12 -4
- package/dist/player.js +8 -0
- package/dist/popover.js +6 -0
- package/dist/preview.js +7 -0
- package/dist/progress.js +7 -0
- package/dist/radar.js +6 -0
- package/dist/select.js +10 -0
- package/dist/selectShadowless.js +10 -0
- package/dist/shadowless/shadowless/index.js +14 -0
- package/dist/skeleton.js +4 -0
- package/dist/sprite-CH2zLtZy.js +141 -0
- package/dist/style.css +1 -1
- package/dist/tab.js +6 -0
- package/dist/tabpane.js +4 -0
- package/dist/tsconfig.json +29 -0
- package/dist/umd/index.umd.cjs +21 -32
- package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
- package/dist/umd/shadowless/style.css +1 -0
- package/dist/umd/style.css +1 -1
- package/dist/utils-74Icp-PI.js +541 -0
- package/package.json +54 -24
- package/readme.md +18 -14
- package/typings.d.ts +101 -0
- package/dist/build/config.d.ts +0 -3
- package/dist/build/config.es.d.ts +0 -2
- package/dist/build/config.umd.d.ts +0 -2
- package/dist/components/button/index.d.ts +0 -35
- package/dist/components/button/index.js +0 -8
- package/dist/components/form/index.d.ts +0 -2
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +0 -6
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/image/index.js +0 -4
- package/dist/components/input/index.d.ts +0 -185
- package/dist/components/input/index.js +0 -6
- package/dist/components/message/index.d.ts +0 -14
- package/dist/components/message/index.js +0 -4
- package/dist/components/modal/index.d.ts +0 -2
- package/dist/components/modal/index.js +0 -4
- package/dist/components/option/index.d.ts +0 -2
- package/dist/components/player/index.d.ts +0 -213
- package/dist/components/player/index.js +0 -12
- package/dist/components/preview/colz.d.ts +0 -72
- package/dist/components/preview/docx.d.ts +0 -8
- package/dist/components/preview/excel/excel.d.ts +0 -2
- package/dist/components/preview/excel/index.d.ts +0 -1
- package/dist/components/preview/excel/media.d.ts +0 -37
- package/dist/components/preview/index.d.ts +0 -6
- package/dist/components/preview/index.js +0 -8
- package/dist/components/preview/pdf.d.ts +0 -1
- package/dist/components/preview/pptx/index.d.ts +0 -16
- package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/components/preview/pptx/worker.d.ts +0 -1
- package/dist/components/progress/index.d.ts +0 -36
- package/dist/components/progress/index.js +0 -8
- package/dist/components/radar/index.d.ts +0 -2
- package/dist/components/radar/index.js +0 -7
- package/dist/components/scratch/index.d.ts +0 -19
- package/dist/components/select/index.d.ts +0 -105
- package/dist/components/select/index.js +0 -11
- package/dist/components/skeleton/index.d.ts +0 -2
- package/dist/components/skeleton/index.js +0 -4
- package/dist/components/tab/index.d.ts +0 -408
- package/dist/components/tab/index.js +0 -7
- package/dist/components/tabpane/index.d.ts +0 -352
- package/dist/components/tabpane/index.js +0 -4
- package/dist/docx-c5d02d8c.js +0 -21
- package/dist/index-73ce455b.js +0 -264
- package/dist/index-7913ec46.js +0 -239
- package/dist/index-c14450a9.js +0 -662
- package/dist/index.d.ts +0 -14
- package/dist/info-circle-fill-90ec9aa9.js +0 -14
- package/dist/playwright.config.d.ts +0 -9
- package/dist/plugins/auto-import-file.d.ts +0 -0
- package/dist/plugins/load-style.d.ts +0 -6
- package/dist/plugins/load-svg.d.ts +0 -9
- package/dist/tests/button.spec.d.ts +0 -1
- package/dist/umd/build/config.d.ts +0 -3
- package/dist/umd/build/config.es.d.ts +0 -2
- package/dist/umd/build/config.umd.d.ts +0 -2
- package/dist/umd/components/button/index.d.ts +0 -35
- package/dist/umd/components/form/index.d.ts +0 -2
- package/dist/umd/components/icon/index.d.ts +0 -2
- package/dist/umd/components/image/index.d.ts +0 -2
- package/dist/umd/components/input/index.d.ts +0 -185
- package/dist/umd/components/message/index.d.ts +0 -14
- package/dist/umd/components/modal/index.d.ts +0 -2
- package/dist/umd/components/option/index.d.ts +0 -2
- package/dist/umd/components/player/index.d.ts +0 -213
- package/dist/umd/components/preview/colz.d.ts +0 -72
- package/dist/umd/components/preview/docx.d.ts +0 -8
- package/dist/umd/components/preview/excel/excel.d.ts +0 -2
- package/dist/umd/components/preview/excel/index.d.ts +0 -1
- package/dist/umd/components/preview/excel/media.d.ts +0 -37
- package/dist/umd/components/preview/index.d.ts +0 -6
- package/dist/umd/components/preview/pdf.d.ts +0 -1
- package/dist/umd/components/preview/pptx/index.d.ts +0 -16
- package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
- package/dist/umd/components/progress/index.d.ts +0 -36
- package/dist/umd/components/radar/index.d.ts +0 -2
- package/dist/umd/components/scratch/index.d.ts +0 -19
- package/dist/umd/components/select/index.d.ts +0 -105
- package/dist/umd/components/skeleton/index.d.ts +0 -2
- package/dist/umd/components/tab/index.d.ts +0 -408
- package/dist/umd/components/tabpane/index.d.ts +0 -352
- package/dist/umd/index.d.ts +0 -14
- package/dist/umd/playwright.config.d.ts +0 -9
- package/dist/umd/plugins/auto-import-file.d.ts +0 -0
- package/dist/umd/plugins/load-style.d.ts +0 -6
- package/dist/umd/plugins/load-svg.d.ts +0 -9
- package/dist/umd/tests/button.spec.d.ts +0 -1
- package/dist/umd/utils/image.d.ts +0 -32
- package/dist/umd/utils/index.d.ts +0 -64
- package/dist/umd/utils/math.d.ts +0 -26
- package/dist/umd/utils/tween.d.ts +0 -21
- package/dist/umd/vite.config.d.ts +0 -6
- package/dist/utils/image.d.ts +0 -32
- package/dist/utils/index.d.ts +0 -64
- package/dist/utils/math.d.ts +0 -26
- package/dist/utils/tween.d.ts +0 -21
- package/dist/vendor-f71e6f68.js +0 -92126
- package/dist/vite.config.d.ts +0 -6
- /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
- /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
- /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
- /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
- /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
- /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
- /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
- /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
- /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
- /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
- /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
- /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
- /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
- /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
- /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
- /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
- /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
- /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
- /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
- /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
- /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
- /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
- /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as Color } from "./colz-746223ab.js";
|
|
1
|
+
import { C as Color } from "./colz-CRDozfZA.js";
|
|
3
2
|
window.E0DD32CBDCB63F = function E0DD32CBDCB63F() {
|
|
4
3
|
var d32 = {
|
|
5
4
|
version: "3.5.9"
|
|
@@ -3259,7 +3258,7 @@ window.E0DD32CBDCB63F = function E0DD32CBDCB63F() {
|
|
|
3259
3258
|
function d3_geo_sphericalEqual(a, b) {
|
|
3260
3259
|
return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;
|
|
3261
3260
|
}
|
|
3262
|
-
d32.geo.bounds = function() {
|
|
3261
|
+
d32.geo.bounds = /* @__PURE__ */ function() {
|
|
3263
3262
|
var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
|
|
3264
3263
|
var bound = {
|
|
3265
3264
|
point,
|
|
@@ -10555,7 +10554,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10555
10554
|
});
|
|
10556
10555
|
async function processPPTX(data) {
|
|
10557
10556
|
var _a;
|
|
10558
|
-
const
|
|
10557
|
+
const jsZip = await import("./jszip.min-DD9Dc6z4.js").then((n) => n.j);
|
|
10558
|
+
const zip = await jsZip.loadAsync(data);
|
|
10559
10559
|
const dateBefore = Date.now();
|
|
10560
10560
|
if (zip.file("docProps/thumbnail.jpeg")) {
|
|
10561
10561
|
const pptxThumbImg = await ((_a = zip.file("docProps/thumbnail.jpeg")) == null ? void 0 : _a.async("base64"));
|
|
@@ -10631,10 +10631,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10631
10631
|
};
|
|
10632
10632
|
}
|
|
10633
10633
|
async function loadTheme(zip) {
|
|
10634
|
-
const preResContent = await readXmlFile(
|
|
10635
|
-
zip,
|
|
10636
|
-
"ppt/_rels/presentation.xml.rels"
|
|
10637
|
-
);
|
|
10634
|
+
const preResContent = await readXmlFile(zip, "ppt/_rels/presentation.xml.rels");
|
|
10638
10635
|
const relationshipArray = preResContent["Relationships"]["Relationship"];
|
|
10639
10636
|
let themeURI;
|
|
10640
10637
|
if (relationshipArray.constructor === Array) {
|
|
@@ -10666,10 +10663,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10666
10663
|
for (let i = 0; i < RelationshipArray.length; i++) {
|
|
10667
10664
|
switch (RelationshipArray[i]["attrs"]["Type"]) {
|
|
10668
10665
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout":
|
|
10669
|
-
layoutFilename = RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10670
|
-
"../",
|
|
10671
|
-
"ppt/"
|
|
10672
|
-
);
|
|
10666
|
+
layoutFilename = RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/");
|
|
10673
10667
|
break;
|
|
10674
10668
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide":
|
|
10675
10669
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image":
|
|
@@ -10681,19 +10675,13 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10681
10675
|
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/",
|
|
10682
10676
|
""
|
|
10683
10677
|
),
|
|
10684
|
-
target: RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10685
|
-
"../",
|
|
10686
|
-
"ppt/"
|
|
10687
|
-
)
|
|
10678
|
+
target: RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/")
|
|
10688
10679
|
};
|
|
10689
10680
|
}
|
|
10690
10681
|
}
|
|
10691
10682
|
}
|
|
10692
10683
|
} else {
|
|
10693
|
-
layoutFilename = RelationshipArray["attrs"]["Target"].replace(
|
|
10694
|
-
"../",
|
|
10695
|
-
"ppt/"
|
|
10696
|
-
);
|
|
10684
|
+
layoutFilename = RelationshipArray["attrs"]["Target"].replace("../", "ppt/");
|
|
10697
10685
|
}
|
|
10698
10686
|
const slideLayoutContent = await readXmlFile(zip, layoutFilename);
|
|
10699
10687
|
const slideLayoutTables = indexNodes(slideLayoutContent);
|
|
@@ -10701,14 +10689,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10701
10689
|
if (sldLayoutClrOvr !== void 0) {
|
|
10702
10690
|
slideLayoutClrOvride = sldLayoutClrOvr["attrs"];
|
|
10703
10691
|
}
|
|
10704
|
-
const slideLayoutResFilename = layoutFilename.replace(
|
|
10705
|
-
|
|
10706
|
-
"slideLayouts/_rels/slideLayout"
|
|
10707
|
-
) + ".rels";
|
|
10708
|
-
const slideLayoutResContent = await readXmlFile(
|
|
10709
|
-
zip,
|
|
10710
|
-
slideLayoutResFilename
|
|
10711
|
-
);
|
|
10692
|
+
const slideLayoutResFilename = layoutFilename.replace("slideLayouts/slideLayout", "slideLayouts/_rels/slideLayout") + ".rels";
|
|
10693
|
+
const slideLayoutResContent = await readXmlFile(zip, slideLayoutResFilename);
|
|
10712
10694
|
RelationshipArray = slideLayoutResContent["Relationships"]["Relationship"];
|
|
10713
10695
|
let masterFilename = "";
|
|
10714
10696
|
const layoutResObj = {};
|
|
@@ -10716,10 +10698,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10716
10698
|
for (let i = 0; i < RelationshipArray.length; i++) {
|
|
10717
10699
|
switch (RelationshipArray[i]["attrs"]["Type"]) {
|
|
10718
10700
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster":
|
|
10719
|
-
masterFilename = RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10720
|
-
"../",
|
|
10721
|
-
"ppt/"
|
|
10722
|
-
);
|
|
10701
|
+
masterFilename = RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/");
|
|
10723
10702
|
break;
|
|
10724
10703
|
default:
|
|
10725
10704
|
layoutResObj[RelationshipArray[i]["attrs"]["Id"]] = {
|
|
@@ -10727,33 +10706,18 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10727
10706
|
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/",
|
|
10728
10707
|
""
|
|
10729
10708
|
),
|
|
10730
|
-
target: RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10731
|
-
"../",
|
|
10732
|
-
"ppt/"
|
|
10733
|
-
)
|
|
10709
|
+
target: RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/")
|
|
10734
10710
|
};
|
|
10735
10711
|
}
|
|
10736
10712
|
}
|
|
10737
10713
|
} else {
|
|
10738
|
-
masterFilename = RelationshipArray["attrs"]["Target"].replace(
|
|
10739
|
-
"../",
|
|
10740
|
-
"ppt/"
|
|
10741
|
-
);
|
|
10714
|
+
masterFilename = RelationshipArray["attrs"]["Target"].replace("../", "ppt/");
|
|
10742
10715
|
}
|
|
10743
10716
|
const slideMasterContent = await readXmlFile(zip, masterFilename);
|
|
10744
|
-
const slideMasterTextStyles = getTextByPathList(slideMasterContent, [
|
|
10745
|
-
"p:sldMaster",
|
|
10746
|
-
"p:txStyles"
|
|
10747
|
-
]);
|
|
10717
|
+
const slideMasterTextStyles = getTextByPathList(slideMasterContent, ["p:sldMaster", "p:txStyles"]);
|
|
10748
10718
|
const slideMasterTables = indexNodes(slideMasterContent);
|
|
10749
|
-
const slideMasterResFilename = masterFilename.replace(
|
|
10750
|
-
|
|
10751
|
-
"slideMasters/_rels/slideMaster"
|
|
10752
|
-
) + ".rels";
|
|
10753
|
-
const slideMasterResContent = await readXmlFile(
|
|
10754
|
-
zip,
|
|
10755
|
-
slideMasterResFilename
|
|
10756
|
-
);
|
|
10719
|
+
const slideMasterResFilename = masterFilename.replace("slideMasters/slideMaster", "slideMasters/_rels/slideMaster") + ".rels";
|
|
10720
|
+
const slideMasterResContent = await readXmlFile(zip, slideMasterResFilename);
|
|
10757
10721
|
RelationshipArray = slideMasterResContent["Relationships"]["Relationship"];
|
|
10758
10722
|
let themeFilename = "";
|
|
10759
10723
|
const masterResObj = {};
|
|
@@ -10761,10 +10725,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10761
10725
|
for (let i = 0; i < RelationshipArray.length; i++) {
|
|
10762
10726
|
switch (RelationshipArray[i]["attrs"]["Type"]) {
|
|
10763
10727
|
case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme":
|
|
10764
|
-
themeFilename = RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10765
|
-
"../",
|
|
10766
|
-
"ppt/"
|
|
10767
|
-
);
|
|
10728
|
+
themeFilename = RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/");
|
|
10768
10729
|
break;
|
|
10769
10730
|
default:
|
|
10770
10731
|
masterResObj[RelationshipArray[i]["attrs"]["Id"]] = {
|
|
@@ -10772,18 +10733,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10772
10733
|
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/",
|
|
10773
10734
|
""
|
|
10774
10735
|
),
|
|
10775
|
-
target: RelationshipArray[i]["attrs"]["Target"].replace(
|
|
10776
|
-
"../",
|
|
10777
|
-
"ppt/"
|
|
10778
|
-
)
|
|
10736
|
+
target: RelationshipArray[i]["attrs"]["Target"].replace("../", "ppt/")
|
|
10779
10737
|
};
|
|
10780
10738
|
}
|
|
10781
10739
|
}
|
|
10782
10740
|
} else {
|
|
10783
|
-
themeFilename = RelationshipArray["attrs"]["Target"].replace(
|
|
10784
|
-
"../",
|
|
10785
|
-
"ppt/"
|
|
10786
|
-
);
|
|
10741
|
+
themeFilename = RelationshipArray["attrs"]["Target"].replace("../", "ppt/");
|
|
10787
10742
|
}
|
|
10788
10743
|
if (themeFilename !== void 0) {
|
|
10789
10744
|
themeContent = await readXmlFile(zip, themeFilename);
|
|
@@ -10799,12 +10754,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10799
10754
|
layoutResObj,
|
|
10800
10755
|
masterResObj
|
|
10801
10756
|
};
|
|
10802
|
-
const bgColor = await getSlideBackgroundFill(
|
|
10803
|
-
slideContent,
|
|
10804
|
-
slideLayoutContent,
|
|
10805
|
-
slideMasterContent,
|
|
10806
|
-
warpObj
|
|
10807
|
-
);
|
|
10757
|
+
const bgColor = await getSlideBackgroundFill(slideContent, slideLayoutContent, slideMasterContent, warpObj);
|
|
10808
10758
|
const slideSizeWidth = Math.min(slideSize.width, document.body.clientWidth);
|
|
10809
10759
|
const base = slideSize.width / slideSizeWidth;
|
|
10810
10760
|
const slideSizeHeight = slideSize.height / base;
|
|
@@ -10812,11 +10762,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10812
10762
|
for (const nodeKey in nodes) {
|
|
10813
10763
|
if (nodes[nodeKey].constructor === Array) {
|
|
10814
10764
|
for (let i = 0; i < nodes[nodeKey].length; i++) {
|
|
10815
|
-
result += await processNodesInSlide(
|
|
10816
|
-
nodeKey,
|
|
10817
|
-
nodes[nodeKey][i],
|
|
10818
|
-
warpObj
|
|
10819
|
-
);
|
|
10765
|
+
result += await processNodesInSlide(nodeKey, nodes[nodeKey][i], warpObj);
|
|
10820
10766
|
}
|
|
10821
10767
|
} else {
|
|
10822
10768
|
result += await processNodesInSlide(nodeKey, nodes[nodeKey], warpObj);
|
|
@@ -10838,23 +10784,9 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10838
10784
|
if (targetNode.constructor === Array) {
|
|
10839
10785
|
for (let i = 0; i < targetNode.length; i++) {
|
|
10840
10786
|
const nvSpPrNode = targetNode[i]["p:nvSpPr"];
|
|
10841
|
-
const id = getTextByPathList(nvSpPrNode, [
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
"id"
|
|
10845
|
-
]);
|
|
10846
|
-
const idx = getTextByPathList(nvSpPrNode, [
|
|
10847
|
-
"p:nvPr",
|
|
10848
|
-
"p:ph",
|
|
10849
|
-
"attrs",
|
|
10850
|
-
"idx"
|
|
10851
|
-
]);
|
|
10852
|
-
const type = getTextByPathList(nvSpPrNode, [
|
|
10853
|
-
"p:nvPr",
|
|
10854
|
-
"p:ph",
|
|
10855
|
-
"attrs",
|
|
10856
|
-
"type"
|
|
10857
|
-
]);
|
|
10787
|
+
const id = getTextByPathList(nvSpPrNode, ["p:cNvPr", "attrs", "id"]);
|
|
10788
|
+
const idx = getTextByPathList(nvSpPrNode, ["p:nvPr", "p:ph", "attrs", "idx"]);
|
|
10789
|
+
const type = getTextByPathList(nvSpPrNode, ["p:nvPr", "p:ph", "attrs", "type"]);
|
|
10858
10790
|
if (id !== void 0) {
|
|
10859
10791
|
idTable[id] = targetNode[i];
|
|
10860
10792
|
}
|
|
@@ -10867,23 +10799,9 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10867
10799
|
}
|
|
10868
10800
|
} else {
|
|
10869
10801
|
const nvSpPrNode = targetNode["p:nvSpPr"];
|
|
10870
|
-
const id = getTextByPathList(nvSpPrNode, [
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
"id"
|
|
10874
|
-
]);
|
|
10875
|
-
const idx = getTextByPathList(nvSpPrNode, [
|
|
10876
|
-
"p:nvPr",
|
|
10877
|
-
"p:ph",
|
|
10878
|
-
"attrs",
|
|
10879
|
-
"idx"
|
|
10880
|
-
]);
|
|
10881
|
-
const type = getTextByPathList(nvSpPrNode, [
|
|
10882
|
-
"p:nvPr",
|
|
10883
|
-
"p:ph",
|
|
10884
|
-
"attrs",
|
|
10885
|
-
"type"
|
|
10886
|
-
]);
|
|
10802
|
+
const id = getTextByPathList(nvSpPrNode, ["p:cNvPr", "attrs", "id"]);
|
|
10803
|
+
const idx = getTextByPathList(nvSpPrNode, ["p:nvPr", "p:ph", "attrs", "idx"]);
|
|
10804
|
+
const type = getTextByPathList(nvSpPrNode, ["p:nvPr", "p:ph", "attrs", "type"]);
|
|
10887
10805
|
if (id !== void 0) {
|
|
10888
10806
|
idTable[id] = targetNode;
|
|
10889
10807
|
}
|
|
@@ -10934,11 +10852,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10934
10852
|
for (const nodeKey in node) {
|
|
10935
10853
|
if (node[nodeKey].constructor === Array) {
|
|
10936
10854
|
for (let i = 0; i < node[nodeKey].length; i++) {
|
|
10937
|
-
result += await processNodesInSlide(
|
|
10938
|
-
nodeKey,
|
|
10939
|
-
node[nodeKey][i],
|
|
10940
|
-
warpObj
|
|
10941
|
-
);
|
|
10855
|
+
result += await processNodesInSlide(nodeKey, node[nodeKey][i], warpObj);
|
|
10942
10856
|
}
|
|
10943
10857
|
} else {
|
|
10944
10858
|
result += await processNodesInSlide(nodeKey, node[nodeKey], warpObj);
|
|
@@ -10970,81 +10884,33 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
10970
10884
|
}
|
|
10971
10885
|
}
|
|
10972
10886
|
if (type === void 0) {
|
|
10973
|
-
type = getTextByPathList(slideLayoutSpNode, [
|
|
10974
|
-
"p:nvSpPr",
|
|
10975
|
-
"p:nvPr",
|
|
10976
|
-
"p:ph",
|
|
10977
|
-
"attrs",
|
|
10978
|
-
"type"
|
|
10979
|
-
]);
|
|
10887
|
+
type = getTextByPathList(slideLayoutSpNode, ["p:nvSpPr", "p:nvPr", "p:ph", "attrs", "type"]);
|
|
10980
10888
|
if (type === void 0) {
|
|
10981
|
-
type = getTextByPathList(slideMasterSpNode, [
|
|
10982
|
-
"p:nvSpPr",
|
|
10983
|
-
"p:nvPr",
|
|
10984
|
-
"p:ph",
|
|
10985
|
-
"attrs",
|
|
10986
|
-
"type"
|
|
10987
|
-
]);
|
|
10889
|
+
type = getTextByPathList(slideMasterSpNode, ["p:nvSpPr", "p:nvPr", "p:ph", "attrs", "type"]);
|
|
10988
10890
|
}
|
|
10989
10891
|
}
|
|
10990
|
-
return await genShape(
|
|
10991
|
-
node,
|
|
10992
|
-
slideLayoutSpNode,
|
|
10993
|
-
slideMasterSpNode,
|
|
10994
|
-
id,
|
|
10995
|
-
name,
|
|
10996
|
-
idx,
|
|
10997
|
-
type,
|
|
10998
|
-
order,
|
|
10999
|
-
warpObj
|
|
11000
|
-
);
|
|
10892
|
+
return await genShape(node, slideLayoutSpNode, slideMasterSpNode, id, name, idx, type, order, warpObj);
|
|
11001
10893
|
}
|
|
11002
10894
|
async function processCxnSpNode(node, warpObj) {
|
|
11003
10895
|
const id = node["p:nvCxnSpPr"]["p:cNvPr"]["attrs"]["id"];
|
|
11004
10896
|
const name = node["p:nvCxnSpPr"]["p:cNvPr"]["attrs"]["name"];
|
|
11005
10897
|
const order = node["attrs"]["order"];
|
|
11006
|
-
return await genShape(
|
|
11007
|
-
node,
|
|
11008
|
-
void 0,
|
|
11009
|
-
void 0,
|
|
11010
|
-
id,
|
|
11011
|
-
name,
|
|
11012
|
-
void 0,
|
|
11013
|
-
void 0,
|
|
11014
|
-
order,
|
|
11015
|
-
warpObj
|
|
11016
|
-
);
|
|
10898
|
+
return await genShape(node, void 0, void 0, id, name, void 0, void 0, order, warpObj);
|
|
11017
10899
|
}
|
|
11018
10900
|
async function genShape(node, slideLayoutSpNode, slideMasterSpNode, id, name, idx, type, order, warpObj) {
|
|
11019
10901
|
const xfrmList = ["p:spPr", "a:xfrm"];
|
|
11020
10902
|
const slideXfrmNode = getTextByPathList(node, xfrmList);
|
|
11021
|
-
const slideLayoutXfrmNode = getTextByPathList(
|
|
11022
|
-
|
|
11023
|
-
xfrmList
|
|
11024
|
-
);
|
|
11025
|
-
const slideMasterXfrmNode = getTextByPathList(
|
|
11026
|
-
slideMasterSpNode,
|
|
11027
|
-
xfrmList
|
|
11028
|
-
);
|
|
10903
|
+
const slideLayoutXfrmNode = getTextByPathList(slideLayoutSpNode, xfrmList);
|
|
10904
|
+
const slideMasterXfrmNode = getTextByPathList(slideMasterSpNode, xfrmList);
|
|
11029
10905
|
let result = "";
|
|
11030
10906
|
const shpId = getTextByPathList(node, ["attrs", "order"]);
|
|
11031
|
-
const shapType = getTextByPathList(node, [
|
|
11032
|
-
|
|
11033
|
-
"a:prstGeom",
|
|
11034
|
-
"attrs",
|
|
11035
|
-
"prst"
|
|
11036
|
-
]);
|
|
11037
|
-
const custShapType = getTextByPathList(node, [
|
|
11038
|
-
"p:spPr",
|
|
11039
|
-
"a:custGeom"
|
|
11040
|
-
]);
|
|
10907
|
+
const shapType = getTextByPathList(node, ["p:spPr", "a:prstGeom", "attrs", "prst"]);
|
|
10908
|
+
const custShapType = getTextByPathList(node, ["p:spPr", "a:custGeom"]);
|
|
11041
10909
|
let isFlipV = false;
|
|
11042
10910
|
if (getTextByPathList(slideXfrmNode, ["attrs", "flipV"]) === "1" || getTextByPathList(slideXfrmNode, ["attrs", "flipH"]) === "1") {
|
|
11043
10911
|
isFlipV = true;
|
|
11044
10912
|
}
|
|
11045
|
-
const rotate = angleToDegrees(
|
|
11046
|
-
getTextByPathList(slideXfrmNode, ["attrs", "rot"])
|
|
11047
|
-
);
|
|
10913
|
+
const rotate = angleToDegrees(getTextByPathList(slideXfrmNode, ["attrs", "rot"]));
|
|
11048
10914
|
let w = 0;
|
|
11049
10915
|
let h = 0;
|
|
11050
10916
|
let border = {};
|
|
@@ -11054,29 +10920,18 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11054
10920
|
let grndFillFlg = false;
|
|
11055
10921
|
let imgFillFlg = false;
|
|
11056
10922
|
if (shapType !== void 0 || custShapType !== void 0) {
|
|
11057
|
-
const ext = getTextByPathList(slideXfrmNode, [
|
|
11058
|
-
"a:ext",
|
|
11059
|
-
"attrs"
|
|
11060
|
-
]);
|
|
10923
|
+
const ext = getTextByPathList(slideXfrmNode, ["a:ext", "attrs"]);
|
|
11061
10924
|
w = parseInt(ext["cx"]) * 96 / 914400;
|
|
11062
10925
|
h = parseInt(ext["cy"]) * 96 / 914400;
|
|
11063
10926
|
result += "<svg class='drawing' _id='" + id + "' _idx='" + idx + "' _type='" + type + "' Name='" + name + "' style='" + getPosition(slideXfrmNode, void 0, void 0) + getSize(slideXfrmNode, void 0, void 0) + " z-index: " + order + ";transform: rotate(" + rotate + "deg);'>";
|
|
11064
10927
|
result += "<defs>";
|
|
11065
10928
|
fillColor = await getShapeFill(node, true, warpObj);
|
|
11066
|
-
const clrFillType = getFillType(
|
|
11067
|
-
getTextByPathList(node, ["p:spPr"])
|
|
11068
|
-
);
|
|
10929
|
+
const clrFillType = getFillType(getTextByPathList(node, ["p:spPr"]));
|
|
11069
10930
|
if (clrFillType === "GRADIENT_FILL") {
|
|
11070
10931
|
grndFillFlg = true;
|
|
11071
10932
|
const colorArray = fillColor.color;
|
|
11072
10933
|
const angl = fillColor.rot;
|
|
11073
|
-
const svgGrdnt = getSvgGradient(
|
|
11074
|
-
w.toString(),
|
|
11075
|
-
h.toString(),
|
|
11076
|
-
angl,
|
|
11077
|
-
colorArray,
|
|
11078
|
-
shpId
|
|
11079
|
-
);
|
|
10934
|
+
const svgGrdnt = getSvgGradient(w.toString(), h.toString(), angl, colorArray, shpId);
|
|
11080
10935
|
result += svgGrdnt;
|
|
11081
10936
|
} else if (clrFillType === "PIC_FILL") {
|
|
11082
10937
|
imgFillFlg = true;
|
|
@@ -11084,18 +10939,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11084
10939
|
result += svgBgImg;
|
|
11085
10940
|
}
|
|
11086
10941
|
border = getBorder(node, true);
|
|
11087
|
-
headEndNodeAttrs = getTextByPathList(node, [
|
|
11088
|
-
|
|
11089
|
-
"a:ln",
|
|
11090
|
-
"a:headEnd",
|
|
11091
|
-
"attrs"
|
|
11092
|
-
]);
|
|
11093
|
-
tailEndNodeAttrs = getTextByPathList(node, [
|
|
11094
|
-
"p:spPr",
|
|
11095
|
-
"a:ln",
|
|
11096
|
-
"a:tailEnd",
|
|
11097
|
-
"attrs"
|
|
11098
|
-
]);
|
|
10942
|
+
headEndNodeAttrs = getTextByPathList(node, ["p:spPr", "a:ln", "a:headEnd", "attrs"]);
|
|
10943
|
+
tailEndNodeAttrs = getTextByPathList(node, ["p:spPr", "a:ln", "a:tailEnd", "attrs"]);
|
|
11099
10944
|
if (headEndNodeAttrs !== void 0 && (headEndNodeAttrs["type"] === "triangle" || headEndNodeAttrs["type"] === "arrow") || tailEndNodeAttrs !== void 0 && (tailEndNodeAttrs["type"] === "triangle" || tailEndNodeAttrs["type"] === "arrow")) {
|
|
11100
10945
|
const triangleMarker = "<marker id='markerTriangle_" + shpId + "' viewBox='0 0 10 10' refX='1' refY='5' markerWidth='5' markerHeight='5' stroke='" + border.color + "' fill='" + border.color + "' orient='auto-start-reverse' markerUnits='strokeWidth'><path d='M 0 0 L 10 5 L 0 10 z' /></marker>";
|
|
11101
10946
|
result += triangleMarker;
|
|
@@ -11278,14 +11123,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11278
11123
|
break;
|
|
11279
11124
|
}
|
|
11280
11125
|
case "triangle": {
|
|
11281
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11282
|
-
"p:spPr",
|
|
11283
|
-
"a:prstGeom",
|
|
11284
|
-
"a:avLst",
|
|
11285
|
-
"a:gd",
|
|
11286
|
-
"attrs",
|
|
11287
|
-
"fmla"
|
|
11288
|
-
]);
|
|
11126
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11289
11127
|
let shapAdjstVal = 0.5;
|
|
11290
11128
|
if (shapAdjst !== void 0) {
|
|
11291
11129
|
shapAdjstVal = parseInt(shapAdjst.substr(4)) * 96 / 9144e3;
|
|
@@ -11298,14 +11136,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11298
11136
|
break;
|
|
11299
11137
|
}
|
|
11300
11138
|
case "trapezoid": {
|
|
11301
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11302
|
-
"p:spPr",
|
|
11303
|
-
"a:prstGeom",
|
|
11304
|
-
"a:avLst",
|
|
11305
|
-
"a:gd",
|
|
11306
|
-
"attrs",
|
|
11307
|
-
"fmla"
|
|
11308
|
-
]);
|
|
11139
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11309
11140
|
let adjstVal = 0.25;
|
|
11310
11141
|
const maxAdjConst = 0.7407;
|
|
11311
11142
|
if (shapAdjst !== void 0) {
|
|
@@ -11316,14 +11147,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11316
11147
|
break;
|
|
11317
11148
|
}
|
|
11318
11149
|
case "parallelogram": {
|
|
11319
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11320
|
-
"p:spPr",
|
|
11321
|
-
"a:prstGeom",
|
|
11322
|
-
"a:avLst",
|
|
11323
|
-
"a:gd",
|
|
11324
|
-
"attrs",
|
|
11325
|
-
"fmla"
|
|
11326
|
-
]);
|
|
11150
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11327
11151
|
let adjstVal = 0.25;
|
|
11328
11152
|
let maxAdjConst;
|
|
11329
11153
|
if (w > h) {
|
|
@@ -11343,19 +11167,11 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11343
11167
|
break;
|
|
11344
11168
|
}
|
|
11345
11169
|
case "hexagon": {
|
|
11346
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11347
|
-
"p:spPr",
|
|
11348
|
-
"a:prstGeom",
|
|
11349
|
-
"a:avLst",
|
|
11350
|
-
"a:gd"
|
|
11351
|
-
]) || [];
|
|
11170
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]) || [];
|
|
11352
11171
|
let shapAdjst;
|
|
11353
11172
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11354
11173
|
if (getTextByPathList(shapAdjstArray[i], ["attrs", "name"]) === "adj") {
|
|
11355
|
-
shapAdjst = getTextByPathList(shapAdjstArray[i], [
|
|
11356
|
-
"attrs",
|
|
11357
|
-
"fmla"
|
|
11358
|
-
]);
|
|
11174
|
+
shapAdjst = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11359
11175
|
}
|
|
11360
11176
|
}
|
|
11361
11177
|
let adjstVal = 0.25;
|
|
@@ -11372,14 +11188,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11372
11188
|
break;
|
|
11373
11189
|
}
|
|
11374
11190
|
case "octagon": {
|
|
11375
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11376
|
-
"p:spPr",
|
|
11377
|
-
"a:prstGeom",
|
|
11378
|
-
"a:avLst",
|
|
11379
|
-
"a:gd",
|
|
11380
|
-
"attrs",
|
|
11381
|
-
"fmla"
|
|
11382
|
-
]);
|
|
11191
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11383
11192
|
let adj1 = 0.25;
|
|
11384
11193
|
if (shapAdjst !== void 0) {
|
|
11385
11194
|
adj1 = parseInt(shapAdjst.substr(4)) / 1e5;
|
|
@@ -11397,14 +11206,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11397
11206
|
break;
|
|
11398
11207
|
}
|
|
11399
11208
|
case "bentConnector3": {
|
|
11400
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11401
|
-
"p:spPr",
|
|
11402
|
-
"a:prstGeom",
|
|
11403
|
-
"a:avLst",
|
|
11404
|
-
"a:gd",
|
|
11405
|
-
"attrs",
|
|
11406
|
-
"fmla"
|
|
11407
|
-
]);
|
|
11209
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11408
11210
|
let shapAdjstVal = 0.5;
|
|
11409
11211
|
if (shapAdjst !== void 0) {
|
|
11410
11212
|
shapAdjstVal = parseInt(shapAdjst.substr(4)) / 1e5;
|
|
@@ -11424,14 +11226,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11424
11226
|
break;
|
|
11425
11227
|
}
|
|
11426
11228
|
case "plus": {
|
|
11427
|
-
const shapAdjst = getTextByPathList(node, [
|
|
11428
|
-
"p:spPr",
|
|
11429
|
-
"a:prstGeom",
|
|
11430
|
-
"a:avLst",
|
|
11431
|
-
"a:gd",
|
|
11432
|
-
"attrs",
|
|
11433
|
-
"fmla"
|
|
11434
|
-
]);
|
|
11229
|
+
const shapAdjst = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd", "attrs", "fmla"]);
|
|
11435
11230
|
let adj1 = 0.25;
|
|
11436
11231
|
if (shapAdjst !== void 0) {
|
|
11437
11232
|
adj1 = parseInt(shapAdjst.substr(4)) / 1e5;
|
|
@@ -11463,12 +11258,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11463
11258
|
break;
|
|
11464
11259
|
}
|
|
11465
11260
|
case "rightArrow": {
|
|
11466
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11467
|
-
"p:spPr",
|
|
11468
|
-
"a:prstGeom",
|
|
11469
|
-
"a:avLst",
|
|
11470
|
-
"a:gd"
|
|
11471
|
-
]);
|
|
11261
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11472
11262
|
let sAdj1 = "";
|
|
11473
11263
|
let sAdj1Val = 0.5;
|
|
11474
11264
|
let sAdj2;
|
|
@@ -11476,21 +11266,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11476
11266
|
const maxSAdj2Const = w / h;
|
|
11477
11267
|
if (shapAdjstArray !== void 0) {
|
|
11478
11268
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11479
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11480
|
-
"attrs",
|
|
11481
|
-
"name"
|
|
11482
|
-
]);
|
|
11269
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11483
11270
|
if (sAdjName === "adj1") {
|
|
11484
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11485
|
-
"attrs",
|
|
11486
|
-
"fmla"
|
|
11487
|
-
]);
|
|
11271
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11488
11272
|
sAdj1Val = 0.5 - parseInt(sAdj1.substr(4)) / 2e5;
|
|
11489
11273
|
} else if (sAdjName === "adj2") {
|
|
11490
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11491
|
-
"attrs",
|
|
11492
|
-
"fmla"
|
|
11493
|
-
]);
|
|
11274
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11494
11275
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11495
11276
|
sAdj2Val = 1 - sAdj2Val2 / maxSAdj2Const;
|
|
11496
11277
|
}
|
|
@@ -11500,12 +11281,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11500
11281
|
break;
|
|
11501
11282
|
}
|
|
11502
11283
|
case "leftArrow": {
|
|
11503
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11504
|
-
"p:spPr",
|
|
11505
|
-
"a:prstGeom",
|
|
11506
|
-
"a:avLst",
|
|
11507
|
-
"a:gd"
|
|
11508
|
-
]);
|
|
11284
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11509
11285
|
let sAdj1;
|
|
11510
11286
|
let sAdj1Val = 0.5;
|
|
11511
11287
|
let sAdj2;
|
|
@@ -11513,21 +11289,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11513
11289
|
const maxSAdj2Const = w / h;
|
|
11514
11290
|
if (shapAdjstArray !== void 0) {
|
|
11515
11291
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11516
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11517
|
-
"attrs",
|
|
11518
|
-
"name"
|
|
11519
|
-
]);
|
|
11292
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11520
11293
|
if (sAdjName === "adj1") {
|
|
11521
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11522
|
-
"attrs",
|
|
11523
|
-
"fmla"
|
|
11524
|
-
]);
|
|
11294
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11525
11295
|
sAdj1Val = 0.5 - parseInt(sAdj1.substr(4)) / 2e5;
|
|
11526
11296
|
} else if (sAdjName === "adj2") {
|
|
11527
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11528
|
-
"attrs",
|
|
11529
|
-
"fmla"
|
|
11530
|
-
]);
|
|
11297
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11531
11298
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11532
11299
|
sAdj2Val = sAdj2Val2 / maxSAdj2Const;
|
|
11533
11300
|
}
|
|
@@ -11537,12 +11304,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11537
11304
|
break;
|
|
11538
11305
|
}
|
|
11539
11306
|
case "downArrow": {
|
|
11540
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11541
|
-
"p:spPr",
|
|
11542
|
-
"a:prstGeom",
|
|
11543
|
-
"a:avLst",
|
|
11544
|
-
"a:gd"
|
|
11545
|
-
]);
|
|
11307
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11546
11308
|
let sAdj1;
|
|
11547
11309
|
let sAdj1Val = 0.5;
|
|
11548
11310
|
let sAdj2;
|
|
@@ -11550,21 +11312,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11550
11312
|
const maxSAdj2Const = h / w;
|
|
11551
11313
|
if (shapAdjstArray !== void 0) {
|
|
11552
11314
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11553
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11554
|
-
"attrs",
|
|
11555
|
-
"name"
|
|
11556
|
-
]);
|
|
11315
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11557
11316
|
if (sAdjName === "adj1") {
|
|
11558
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11559
|
-
"attrs",
|
|
11560
|
-
"fmla"
|
|
11561
|
-
]);
|
|
11317
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11562
11318
|
sAdj1Val = parseInt(sAdj1.substr(4)) / 2e5;
|
|
11563
11319
|
} else if (sAdjName === "adj2") {
|
|
11564
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11565
|
-
"attrs",
|
|
11566
|
-
"fmla"
|
|
11567
|
-
]);
|
|
11320
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11568
11321
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11569
11322
|
sAdj2Val = sAdj2Val2 / maxSAdj2Const;
|
|
11570
11323
|
}
|
|
@@ -11574,12 +11327,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11574
11327
|
break;
|
|
11575
11328
|
}
|
|
11576
11329
|
case "upArrow": {
|
|
11577
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11578
|
-
"p:spPr",
|
|
11579
|
-
"a:prstGeom",
|
|
11580
|
-
"a:avLst",
|
|
11581
|
-
"a:gd"
|
|
11582
|
-
]);
|
|
11330
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11583
11331
|
let sAdj1;
|
|
11584
11332
|
let sAdj1Val = 0.5;
|
|
11585
11333
|
let sAdj2;
|
|
@@ -11587,21 +11335,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11587
11335
|
const maxSAdj2Const = h / w;
|
|
11588
11336
|
if (shapAdjstArray !== void 0) {
|
|
11589
11337
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11590
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11591
|
-
"attrs",
|
|
11592
|
-
"name"
|
|
11593
|
-
]);
|
|
11338
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11594
11339
|
if (sAdjName === "adj1") {
|
|
11595
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11596
|
-
"attrs",
|
|
11597
|
-
"fmla"
|
|
11598
|
-
]);
|
|
11340
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11599
11341
|
sAdj1Val = parseInt(sAdj1.substr(4)) / 2e5;
|
|
11600
11342
|
} else if (sAdjName === "adj2") {
|
|
11601
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11602
|
-
"attrs",
|
|
11603
|
-
"fmla"
|
|
11604
|
-
]);
|
|
11343
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11605
11344
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11606
11345
|
sAdj2Val = sAdj2Val2 / maxSAdj2Const;
|
|
11607
11346
|
}
|
|
@@ -11611,12 +11350,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11611
11350
|
break;
|
|
11612
11351
|
}
|
|
11613
11352
|
case "leftRightArrow": {
|
|
11614
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11615
|
-
"p:spPr",
|
|
11616
|
-
"a:prstGeom",
|
|
11617
|
-
"a:avLst",
|
|
11618
|
-
"a:gd"
|
|
11619
|
-
]);
|
|
11353
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11620
11354
|
let sAdj1;
|
|
11621
11355
|
let sAdj1Val = 0.5;
|
|
11622
11356
|
let sAdj2;
|
|
@@ -11624,21 +11358,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11624
11358
|
const maxSAdj2Const = w / h;
|
|
11625
11359
|
if (shapAdjstArray !== void 0) {
|
|
11626
11360
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11627
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11628
|
-
"attrs",
|
|
11629
|
-
"name"
|
|
11630
|
-
]);
|
|
11361
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11631
11362
|
if (sAdjName === "adj1") {
|
|
11632
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11633
|
-
"attrs",
|
|
11634
|
-
"fmla"
|
|
11635
|
-
]);
|
|
11363
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11636
11364
|
sAdj1Val = 0.5 - parseInt(sAdj1.substr(4)) / 2e5;
|
|
11637
11365
|
} else if (sAdjName === "adj2") {
|
|
11638
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11639
|
-
"attrs",
|
|
11640
|
-
"fmla"
|
|
11641
|
-
]);
|
|
11366
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11642
11367
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11643
11368
|
sAdj2Val = sAdj2Val2 / maxSAdj2Const;
|
|
11644
11369
|
}
|
|
@@ -11648,12 +11373,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11648
11373
|
break;
|
|
11649
11374
|
}
|
|
11650
11375
|
case "upDownArrow": {
|
|
11651
|
-
const shapAdjstArray = getTextByPathList(node, [
|
|
11652
|
-
"p:spPr",
|
|
11653
|
-
"a:prstGeom",
|
|
11654
|
-
"a:avLst",
|
|
11655
|
-
"a:gd"
|
|
11656
|
-
]);
|
|
11376
|
+
const shapAdjstArray = getTextByPathList(node, ["p:spPr", "a:prstGeom", "a:avLst", "a:gd"]);
|
|
11657
11377
|
let sAdj1;
|
|
11658
11378
|
let sAdj1Val = 0.5;
|
|
11659
11379
|
let sAdj2;
|
|
@@ -11661,21 +11381,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11661
11381
|
const maxSAdj2Const = h / w;
|
|
11662
11382
|
if (shapAdjstArray !== void 0) {
|
|
11663
11383
|
for (let i = 0; i < shapAdjstArray.length; i++) {
|
|
11664
|
-
const sAdjName = getTextByPathList(shapAdjstArray[i], [
|
|
11665
|
-
"attrs",
|
|
11666
|
-
"name"
|
|
11667
|
-
]);
|
|
11384
|
+
const sAdjName = getTextByPathList(shapAdjstArray[i], ["attrs", "name"]);
|
|
11668
11385
|
if (sAdjName === "adj1") {
|
|
11669
|
-
sAdj1 = getTextByPathList(shapAdjstArray[i], [
|
|
11670
|
-
"attrs",
|
|
11671
|
-
"fmla"
|
|
11672
|
-
]);
|
|
11386
|
+
sAdj1 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11673
11387
|
sAdj1Val = 0.5 - parseInt(sAdj1.substr(4)) / 2e5;
|
|
11674
11388
|
} else if (sAdjName === "adj2") {
|
|
11675
|
-
sAdj2 = getTextByPathList(shapAdjstArray[i], [
|
|
11676
|
-
"attrs",
|
|
11677
|
-
"fmla"
|
|
11678
|
-
]);
|
|
11389
|
+
sAdj2 = getTextByPathList(shapAdjstArray[i], ["attrs", "fmla"]);
|
|
11679
11390
|
const sAdj2Val2 = parseInt(sAdj2.substr(4)) / 1e5;
|
|
11680
11391
|
sAdj2Val = sAdj2Val2 / maxSAdj2Const;
|
|
11681
11392
|
}
|
|
@@ -11718,16 +11429,9 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11718
11429
|
}
|
|
11719
11430
|
result += "</div>";
|
|
11720
11431
|
} else if (custShapType !== void 0) {
|
|
11721
|
-
const pathLstNode = getTextByPathList(custShapType, [
|
|
11722
|
-
"a:pathLst"
|
|
11723
|
-
]);
|
|
11432
|
+
const pathLstNode = getTextByPathList(custShapType, ["a:pathLst"]);
|
|
11724
11433
|
const closeNode = getTextByPathList(pathLstNode, ["a:path", "a:close"]);
|
|
11725
|
-
const startPoint = getTextByPathList(pathLstNode, [
|
|
11726
|
-
"a:path",
|
|
11727
|
-
"a:moveTo",
|
|
11728
|
-
"a:pt",
|
|
11729
|
-
"attrs"
|
|
11730
|
-
]) || { x: "0", y: "0" };
|
|
11434
|
+
const startPoint = getTextByPathList(pathLstNode, ["a:path", "a:moveTo", "a:pt", "attrs"]) || { x: "0", y: "0" };
|
|
11731
11435
|
const spX = parseInt(startPoint["x"]) * 96 / 914400;
|
|
11732
11436
|
const spY = parseInt(startPoint["y"]) * 96 / 914400;
|
|
11733
11437
|
let d = "M" + spX + "," + spY;
|
|
@@ -11852,12 +11556,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11852
11556
|
}
|
|
11853
11557
|
async function processGraphicFrameNode(node, warpObj) {
|
|
11854
11558
|
let result = "";
|
|
11855
|
-
const graphicTypeUri = getTextByPathList(node, [
|
|
11856
|
-
"a:graphic",
|
|
11857
|
-
"a:graphicData",
|
|
11858
|
-
"attrs",
|
|
11859
|
-
"uri"
|
|
11860
|
-
]);
|
|
11559
|
+
const graphicTypeUri = getTextByPathList(node, ["a:graphic", "a:graphicData", "attrs", "uri"]);
|
|
11861
11560
|
switch (graphicTypeUri) {
|
|
11862
11561
|
case "http://schemas.openxmlformats.org/drawingml/2006/table":
|
|
11863
11562
|
result = await genTable(node, warpObj);
|
|
@@ -11883,98 +11582,38 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11883
11582
|
for (let i = 0; i < textBodyNode["a:p"].length; i++) {
|
|
11884
11583
|
pNode = textBodyNode["a:p"][i];
|
|
11885
11584
|
rNode = pNode["a:r"];
|
|
11886
|
-
text += "<div class='" + getHorizontalAlign(
|
|
11887
|
-
|
|
11888
|
-
slideLayoutSpNode || {},
|
|
11889
|
-
slideMasterSpNode || {},
|
|
11890
|
-
type,
|
|
11891
|
-
slideMasterTextStyles
|
|
11892
|
-
) + "'>";
|
|
11893
|
-
text += await genBuChar(
|
|
11894
|
-
pNode,
|
|
11895
|
-
slideLayoutSpNode,
|
|
11896
|
-
slideMasterSpNode,
|
|
11897
|
-
type,
|
|
11898
|
-
warpObj || {}
|
|
11899
|
-
);
|
|
11585
|
+
text += "<div class='" + getHorizontalAlign(pNode, slideLayoutSpNode || {}, slideMasterSpNode || {}, type, slideMasterTextStyles) + "'>";
|
|
11586
|
+
text += await genBuChar(pNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11900
11587
|
if (rNode === void 0) {
|
|
11901
|
-
text += genSpanElement(
|
|
11902
|
-
pNode,
|
|
11903
|
-
slideLayoutSpNode,
|
|
11904
|
-
slideMasterSpNode,
|
|
11905
|
-
type,
|
|
11906
|
-
warpObj || {}
|
|
11907
|
-
);
|
|
11588
|
+
text += genSpanElement(pNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11908
11589
|
} else if (rNode.constructor === Array) {
|
|
11909
11590
|
for (let j = 0; j < rNode.length; j++) {
|
|
11910
|
-
text += genSpanElement(
|
|
11911
|
-
rNode[j],
|
|
11912
|
-
slideLayoutSpNode,
|
|
11913
|
-
slideMasterSpNode,
|
|
11914
|
-
type,
|
|
11915
|
-
warpObj || {}
|
|
11916
|
-
);
|
|
11591
|
+
text += genSpanElement(rNode[j], slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11917
11592
|
if (pNode["a:br"] !== void 0) {
|
|
11918
11593
|
text += "<br>";
|
|
11919
11594
|
}
|
|
11920
11595
|
}
|
|
11921
11596
|
} else {
|
|
11922
|
-
text += genSpanElement(
|
|
11923
|
-
rNode,
|
|
11924
|
-
slideLayoutSpNode,
|
|
11925
|
-
slideMasterSpNode,
|
|
11926
|
-
type,
|
|
11927
|
-
warpObj || {}
|
|
11928
|
-
);
|
|
11597
|
+
text += genSpanElement(rNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11929
11598
|
}
|
|
11930
11599
|
text += "</div>";
|
|
11931
11600
|
}
|
|
11932
11601
|
} else {
|
|
11933
11602
|
pNode = textBodyNode["a:p"];
|
|
11934
11603
|
rNode = pNode["a:r"];
|
|
11935
|
-
text += "<div class='slide-prgrph " + getHorizontalAlign(
|
|
11936
|
-
|
|
11937
|
-
slideLayoutSpNode || {},
|
|
11938
|
-
slideMasterSpNode || {},
|
|
11939
|
-
type,
|
|
11940
|
-
slideMasterTextStyles
|
|
11941
|
-
) + "'>";
|
|
11942
|
-
text += await genBuChar(
|
|
11943
|
-
pNode,
|
|
11944
|
-
slideLayoutSpNode,
|
|
11945
|
-
slideMasterSpNode,
|
|
11946
|
-
type,
|
|
11947
|
-
warpObj
|
|
11948
|
-
);
|
|
11604
|
+
text += "<div class='slide-prgrph " + getHorizontalAlign(pNode, slideLayoutSpNode || {}, slideMasterSpNode || {}, type, slideMasterTextStyles) + "'>";
|
|
11605
|
+
text += await genBuChar(pNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj);
|
|
11949
11606
|
if (rNode === void 0) {
|
|
11950
|
-
text += genSpanElement(
|
|
11951
|
-
pNode,
|
|
11952
|
-
slideLayoutSpNode,
|
|
11953
|
-
slideMasterSpNode,
|
|
11954
|
-
type,
|
|
11955
|
-
warpObj || {}
|
|
11956
|
-
);
|
|
11607
|
+
text += genSpanElement(pNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11957
11608
|
} else if (rNode.constructor === Array) {
|
|
11958
11609
|
for (let j = 0; j < rNode.length; j++) {
|
|
11959
|
-
text += genSpanElement(
|
|
11960
|
-
rNode[j],
|
|
11961
|
-
slideLayoutSpNode,
|
|
11962
|
-
slideMasterSpNode,
|
|
11963
|
-
type,
|
|
11964
|
-
warpObj || {}
|
|
11965
|
-
);
|
|
11610
|
+
text += genSpanElement(rNode[j], slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11966
11611
|
if (pNode["a:br"] !== void 0) {
|
|
11967
11612
|
text += "<br>";
|
|
11968
11613
|
}
|
|
11969
11614
|
}
|
|
11970
11615
|
} else {
|
|
11971
|
-
text += genSpanElement(
|
|
11972
|
-
rNode,
|
|
11973
|
-
slideLayoutSpNode,
|
|
11974
|
-
slideMasterSpNode,
|
|
11975
|
-
type,
|
|
11976
|
-
warpObj || {}
|
|
11977
|
-
);
|
|
11616
|
+
text += genSpanElement(rNode, slideLayoutSpNode, slideMasterSpNode, type, warpObj || {});
|
|
11978
11617
|
}
|
|
11979
11618
|
text += "</div>";
|
|
11980
11619
|
}
|
|
@@ -11986,22 +11625,10 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
11986
11625
|
let dfltBultColor, dfltBultSize, bultColor, bultSize;
|
|
11987
11626
|
if (rNode !== void 0) {
|
|
11988
11627
|
dfltBultColor = getFontColor(rNode);
|
|
11989
|
-
dfltBultSize = getFontSize(
|
|
11990
|
-
rNode,
|
|
11991
|
-
slideLayoutSpNode,
|
|
11992
|
-
slideMasterSpNode,
|
|
11993
|
-
type,
|
|
11994
|
-
sldMstrTxtStyles
|
|
11995
|
-
);
|
|
11628
|
+
dfltBultSize = getFontSize(rNode, slideLayoutSpNode, slideMasterSpNode, type, sldMstrTxtStyles);
|
|
11996
11629
|
} else {
|
|
11997
11630
|
dfltBultColor = getFontColor(node);
|
|
11998
|
-
dfltBultSize = getFontSize(
|
|
11999
|
-
node,
|
|
12000
|
-
slideLayoutSpNode,
|
|
12001
|
-
slideMasterSpNode,
|
|
12002
|
-
type,
|
|
12003
|
-
sldMstrTxtStyles
|
|
12004
|
-
);
|
|
11631
|
+
dfltBultSize = getFontSize(node, slideLayoutSpNode, slideMasterSpNode, type, sldMstrTxtStyles);
|
|
12005
11632
|
}
|
|
12006
11633
|
let bullet = "";
|
|
12007
11634
|
const pPrNode = node["a:pPr"];
|
|
@@ -12044,25 +11671,14 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12044
11671
|
bultColor = "#" + defBultColor;
|
|
12045
11672
|
}
|
|
12046
11673
|
let buFontSize;
|
|
12047
|
-
buFontSize = getTextByPathList(pPrNode, [
|
|
12048
|
-
"a:buSzPts",
|
|
12049
|
-
"attrs",
|
|
12050
|
-
"val"
|
|
12051
|
-
]);
|
|
11674
|
+
buFontSize = getTextByPathList(pPrNode, ["a:buSzPts", "attrs", "val"]);
|
|
12052
11675
|
if (buFontSize !== void 0) {
|
|
12053
11676
|
bultSize = parseInt(buFontSize) / 100 + "pt";
|
|
12054
11677
|
} else {
|
|
12055
|
-
buFontSize = getTextByPathList(pPrNode, [
|
|
12056
|
-
"a:buSzPct",
|
|
12057
|
-
"attrs",
|
|
12058
|
-
"val"
|
|
12059
|
-
]);
|
|
11678
|
+
buFontSize = getTextByPathList(pPrNode, ["a:buSzPct", "attrs", "val"]);
|
|
12060
11679
|
if (buFontSize !== void 0) {
|
|
12061
11680
|
const prcnt = parseInt(buFontSize) / 1e5;
|
|
12062
|
-
const dfltBultSizeNoPt = dfltBultSize.substr(
|
|
12063
|
-
0,
|
|
12064
|
-
dfltBultSize.length - 2
|
|
12065
|
-
);
|
|
11681
|
+
const dfltBultSizeNoPt = dfltBultSize.substr(0, dfltBultSize.length - 2);
|
|
12066
11682
|
bultSize = prcnt * parseInt(dfltBultSizeNoPt) + "pt";
|
|
12067
11683
|
} else {
|
|
12068
11684
|
bultSize = dfltBultSize;
|
|
@@ -12128,11 +11744,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12128
11744
|
} else {
|
|
12129
11745
|
marginLeft = 0;
|
|
12130
11746
|
}
|
|
12131
|
-
const buPicId = getTextByPathList(buPic, [
|
|
12132
|
-
"a:blip",
|
|
12133
|
-
"attrs",
|
|
12134
|
-
"r:embed"
|
|
12135
|
-
]);
|
|
11747
|
+
const buPicId = getTextByPathList(buPic, ["a:blip", "attrs", "r:embed"]);
|
|
12136
11748
|
let buImg;
|
|
12137
11749
|
if (buPicId !== void 0) {
|
|
12138
11750
|
const imgPath = warpObj && warpObj["slideResObj"][buPicId]["target"];
|
|
@@ -12163,17 +11775,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12163
11775
|
text = " ";
|
|
12164
11776
|
}
|
|
12165
11777
|
}
|
|
12166
|
-
let styleText = "color:" + getFontColor(node) + ";font-size:" + getFontSize(
|
|
12167
|
-
|
|
12168
|
-
slideLayoutSpNode,
|
|
12169
|
-
slideMasterSpNode,
|
|
12170
|
-
type,
|
|
12171
|
-
slideMasterTextStyles
|
|
12172
|
-
) + ";font-family:" + getFontType(node, type) + ";font-weight:" + getFontBold(node) + ";font-style:" + getFontItalic(node) + ";text-decoration:" + getFontDecoration(node) + ";text-align:" + getTextHorizontalAlign(node) + ";vertical-align:" + getTextVerticalAlign(node) + ";";
|
|
12173
|
-
const highlight = getTextByPathList(node, [
|
|
12174
|
-
"a:rPr",
|
|
12175
|
-
"a:highlight"
|
|
12176
|
-
]);
|
|
11778
|
+
let styleText = "color:" + getFontColor(node) + ";font-size:" + getFontSize(node, slideLayoutSpNode, slideMasterSpNode, type, slideMasterTextStyles) + ";font-family:" + getFontType(node, type) + ";font-weight:" + getFontBold(node) + ";font-style:" + getFontItalic(node) + ";text-decoration:" + getFontDecoration(node) + ";text-align:" + getTextHorizontalAlign(node) + ";vertical-align:" + getTextVerticalAlign(node) + ";";
|
|
11779
|
+
const highlight = getTextByPathList(node, ["a:rPr", "a:highlight"]);
|
|
12177
11780
|
if (highlight !== void 0) {
|
|
12178
11781
|
styleText += "background-color:#" + getSolidFill(highlight) + ";";
|
|
12179
11782
|
styleText += "Opacity:" + getColorOpacity(highlight) + ";";
|
|
@@ -12188,12 +11791,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12188
11791
|
text: styleText
|
|
12189
11792
|
};
|
|
12190
11793
|
}
|
|
12191
|
-
const linkID = getTextByPathList(node, [
|
|
12192
|
-
"a:rPr",
|
|
12193
|
-
"a:hlinkClick",
|
|
12194
|
-
"attrs",
|
|
12195
|
-
"r:id"
|
|
12196
|
-
]);
|
|
11794
|
+
const linkID = getTextByPathList(node, ["a:rPr", "a:hlinkClick", "attrs", "r:id"]);
|
|
12197
11795
|
if (linkID !== void 0) {
|
|
12198
11796
|
const linkURL = warpObj["slideResObj"][linkID]["target"];
|
|
12199
11797
|
return "<span class='text-block " + cssName + "'><a href='" + linkURL + "' target='_blank'>" + text.replace(/\s/, " ") + "</a></span>";
|
|
@@ -12210,18 +11808,9 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12210
11808
|
}
|
|
12211
11809
|
async function genTable(node, warpObj) {
|
|
12212
11810
|
const order = node["attrs"]["order"];
|
|
12213
|
-
const tableNode = getTextByPathList(node, [
|
|
12214
|
-
"a:graphic",
|
|
12215
|
-
"a:graphicData",
|
|
12216
|
-
"a:tbl"
|
|
12217
|
-
]);
|
|
11811
|
+
const tableNode = getTextByPathList(node, ["a:graphic", "a:graphicData", "a:tbl"]);
|
|
12218
11812
|
const xfrmNode = getTextByPathList(node, ["p:xfrm"]);
|
|
12219
|
-
const getTblPr = getTextByPathList(node, [
|
|
12220
|
-
"a:graphic",
|
|
12221
|
-
"a:graphicData",
|
|
12222
|
-
"a:tbl",
|
|
12223
|
-
"a:tblPr"
|
|
12224
|
-
]);
|
|
11813
|
+
const getTblPr = getTextByPathList(node, ["a:graphic", "a:graphicData", "a:tbl", "a:tblPr"]);
|
|
12225
11814
|
const getColsGrid = getTextByPathList(node, [
|
|
12226
11815
|
"a:graphic",
|
|
12227
11816
|
"a:graphicData",
|
|
@@ -12271,19 +11860,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12271
11860
|
fillColor = getSolidFill(bgFillschemeClr);
|
|
12272
11861
|
colorOpacity = getColorOpacity(bgFillschemeClr);
|
|
12273
11862
|
}
|
|
12274
|
-
const borderStyl = getTextByPathList(thisTblStyle, [
|
|
12275
|
-
"a:firstRow",
|
|
12276
|
-
"a:tcStyle",
|
|
12277
|
-
"a:tcBdr"
|
|
12278
|
-
]);
|
|
11863
|
+
const borderStyl = getTextByPathList(thisTblStyle, ["a:firstRow", "a:tcStyle", "a:tcBdr"]);
|
|
12279
11864
|
if (borderStyl !== void 0) {
|
|
12280
11865
|
const rowBorders = getTableBorders(borderStyl);
|
|
12281
11866
|
rowsStyl += rowBorders;
|
|
12282
11867
|
}
|
|
12283
|
-
getTextByPathList(thisTblStyle, [
|
|
12284
|
-
"a:firstRow",
|
|
12285
|
-
"a:tcTxStyle"
|
|
12286
|
-
]);
|
|
11868
|
+
getTextByPathList(thisTblStyle, ["a:firstRow", "a:tcTxStyle"]);
|
|
12287
11869
|
}
|
|
12288
11870
|
rowsStyl += " background-color:#" + fillColor + "; opacity:" + colorOpacity + ";";
|
|
12289
11871
|
} else if (i > 0 && bandRowAttr !== void 0) {
|
|
@@ -12301,19 +11883,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12301
11883
|
fillColor = getSolidFill(bgFillschemeClr);
|
|
12302
11884
|
colorOpacity = getColorOpacity(bgFillschemeClr);
|
|
12303
11885
|
}
|
|
12304
|
-
const borderStyl = getTextByPathList(thisTblStyle, [
|
|
12305
|
-
"a:band2H",
|
|
12306
|
-
"a:tcStyle",
|
|
12307
|
-
"a:tcBdr"
|
|
12308
|
-
]);
|
|
11886
|
+
const borderStyl = getTextByPathList(thisTblStyle, ["a:band2H", "a:tcStyle", "a:tcBdr"]);
|
|
12309
11887
|
if (borderStyl !== void 0) {
|
|
12310
11888
|
const rowBorders = getTableBorders(borderStyl);
|
|
12311
11889
|
rowsStyl += rowBorders;
|
|
12312
11890
|
}
|
|
12313
|
-
getTextByPathList(thisTblStyle, [
|
|
12314
|
-
"a:band2H",
|
|
12315
|
-
"a:tcTxStyle"
|
|
12316
|
-
]);
|
|
11891
|
+
getTextByPathList(thisTblStyle, ["a:band2H", "a:tcTxStyle"]);
|
|
12317
11892
|
}
|
|
12318
11893
|
} else {
|
|
12319
11894
|
if (thisTblStyle["a:band1H"] !== void 0) {
|
|
@@ -12327,19 +11902,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12327
11902
|
fillColor = getSolidFill(bgFillschemeClr);
|
|
12328
11903
|
colorOpacity = getColorOpacity(bgFillschemeClr);
|
|
12329
11904
|
}
|
|
12330
|
-
const borderStyl = getTextByPathList(thisTblStyle, [
|
|
12331
|
-
"a:band1H",
|
|
12332
|
-
"a:tcStyle",
|
|
12333
|
-
"a:tcBdr"
|
|
12334
|
-
]);
|
|
11905
|
+
const borderStyl = getTextByPathList(thisTblStyle, ["a:band1H", "a:tcStyle", "a:tcBdr"]);
|
|
12335
11906
|
if (borderStyl !== void 0) {
|
|
12336
11907
|
const rowBorders = getTableBorders(borderStyl);
|
|
12337
11908
|
rowsStyl += rowBorders;
|
|
12338
11909
|
}
|
|
12339
|
-
getTextByPathList(thisTblStyle, [
|
|
12340
|
-
"a:band1H",
|
|
12341
|
-
"a:tcTxStyle"
|
|
12342
|
-
]);
|
|
11910
|
+
getTextByPathList(thisTblStyle, ["a:band1H", "a:tcTxStyle"]);
|
|
12343
11911
|
}
|
|
12344
11912
|
}
|
|
12345
11913
|
rowsStyl += " background-color:#" + fillColor + "; opacity:" + colorOpacity + ";";
|
|
@@ -12348,21 +11916,9 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12348
11916
|
const tcNodes = trNodes[i]["a:tc"];
|
|
12349
11917
|
if (tcNodes.constructor === Array) {
|
|
12350
11918
|
for (let j = 0; j < tcNodes.length; j++) {
|
|
12351
|
-
const text = await genTextBody(
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
void 0,
|
|
12355
|
-
void 0,
|
|
12356
|
-
warpObj
|
|
12357
|
-
);
|
|
12358
|
-
const rowSpan = getTextByPathList(tcNodes[j], [
|
|
12359
|
-
"attrs",
|
|
12360
|
-
"rowSpan"
|
|
12361
|
-
]);
|
|
12362
|
-
const colSpan = getTextByPathList(tcNodes[j], [
|
|
12363
|
-
"attrs",
|
|
12364
|
-
"gridSpan"
|
|
12365
|
-
]);
|
|
11919
|
+
const text = await genTextBody(tcNodes[j]["a:txBody"], void 0, void 0, void 0, warpObj);
|
|
11920
|
+
const rowSpan = getTextByPathList(tcNodes[j], ["attrs", "rowSpan"]);
|
|
11921
|
+
const colSpan = getTextByPathList(tcNodes[j], ["attrs", "gridSpan"]);
|
|
12366
11922
|
const vMerge = getTextByPathList(tcNodes[j], ["attrs", "vMerge"]);
|
|
12367
11923
|
const hMerge = getTextByPathList(tcNodes[j], ["attrs", "hMerge"]);
|
|
12368
11924
|
const colWidthParam = getColsGrid[j]["attrs"]["w"];
|
|
@@ -12486,11 +12042,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12486
12042
|
const rid = node["a:graphic"]["a:graphicData"]["c:chart"]["attrs"]["r:id"];
|
|
12487
12043
|
const refName = warpObj["slideResObj"][rid]["target"];
|
|
12488
12044
|
const content = await readXmlFile(warpObj["zip"], refName);
|
|
12489
|
-
const plotArea = getTextByPathList(content, [
|
|
12490
|
-
"c:chartSpace",
|
|
12491
|
-
"c:chart",
|
|
12492
|
-
"c:plotArea"
|
|
12493
|
-
]);
|
|
12045
|
+
const plotArea = getTextByPathList(content, ["c:chartSpace", "c:chart", "c:plotArea"]);
|
|
12494
12046
|
let chartData = null;
|
|
12495
12047
|
for (const key in plotArea) {
|
|
12496
12048
|
switch (key) {
|
|
@@ -12607,41 +12159,19 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12607
12159
|
function getHorizontalAlign(node, slideLayoutSpNode, slideMasterSpNode, type, slideMasterTextStyles) {
|
|
12608
12160
|
let algn = getTextByPathList(node, ["a:pPr", "attrs", "algn"]);
|
|
12609
12161
|
if (algn === void 0) {
|
|
12610
|
-
algn = getTextByPathList(slideLayoutSpNode, [
|
|
12611
|
-
"p:txBody",
|
|
12612
|
-
"a:p",
|
|
12613
|
-
"a:pPr",
|
|
12614
|
-
"attrs",
|
|
12615
|
-
"algn"
|
|
12616
|
-
]);
|
|
12162
|
+
algn = getTextByPathList(slideLayoutSpNode, ["p:txBody", "a:p", "a:pPr", "attrs", "algn"]);
|
|
12617
12163
|
if (algn === void 0) {
|
|
12618
|
-
algn = getTextByPathList(slideMasterSpNode, [
|
|
12619
|
-
"p:txBody",
|
|
12620
|
-
"a:p",
|
|
12621
|
-
"a:pPr",
|
|
12622
|
-
"attrs",
|
|
12623
|
-
"algn"
|
|
12624
|
-
]);
|
|
12164
|
+
algn = getTextByPathList(slideMasterSpNode, ["p:txBody", "a:p", "a:pPr", "attrs", "algn"]);
|
|
12625
12165
|
if (algn === void 0) {
|
|
12626
12166
|
switch (type) {
|
|
12627
12167
|
case "title":
|
|
12628
12168
|
case "subTitle":
|
|
12629
12169
|
case "ctrTitle": {
|
|
12630
|
-
algn = getTextByPathList(slideMasterTextStyles, [
|
|
12631
|
-
"p:titleStyle",
|
|
12632
|
-
"a:lvl1pPr",
|
|
12633
|
-
"attrs",
|
|
12634
|
-
"alng"
|
|
12635
|
-
]);
|
|
12170
|
+
algn = getTextByPathList(slideMasterTextStyles, ["p:titleStyle", "a:lvl1pPr", "attrs", "alng"]);
|
|
12636
12171
|
break;
|
|
12637
12172
|
}
|
|
12638
12173
|
default: {
|
|
12639
|
-
algn = getTextByPathList(slideMasterTextStyles, [
|
|
12640
|
-
"p:otherStyle",
|
|
12641
|
-
"a:lvl1pPr",
|
|
12642
|
-
"attrs",
|
|
12643
|
-
"alng"
|
|
12644
|
-
]);
|
|
12174
|
+
algn = getTextByPathList(slideMasterTextStyles, ["p:otherStyle", "a:lvl1pPr", "attrs", "alng"]);
|
|
12645
12175
|
}
|
|
12646
12176
|
}
|
|
12647
12177
|
}
|
|
@@ -12657,63 +12187,29 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12657
12187
|
return algn === "ctr" ? "h-mid" : algn === "r" ? "h-right" : "h-left";
|
|
12658
12188
|
}
|
|
12659
12189
|
function getVerticalAlign(node, slideLayoutSpNode, slideMasterSpNode, type, slideMasterTextStyles) {
|
|
12660
|
-
let anchor = getTextByPathList(node, [
|
|
12661
|
-
"p:txBody",
|
|
12662
|
-
"a:bodyPr",
|
|
12663
|
-
"attrs",
|
|
12664
|
-
"anchor"
|
|
12665
|
-
]);
|
|
12190
|
+
let anchor = getTextByPathList(node, ["p:txBody", "a:bodyPr", "attrs", "anchor"]);
|
|
12666
12191
|
if (anchor === void 0) {
|
|
12667
|
-
anchor = getTextByPathList(slideLayoutSpNode, [
|
|
12668
|
-
"p:txBody",
|
|
12669
|
-
"a:bodyPr",
|
|
12670
|
-
"attrs",
|
|
12671
|
-
"anchor"
|
|
12672
|
-
]);
|
|
12192
|
+
anchor = getTextByPathList(slideLayoutSpNode, ["p:txBody", "a:bodyPr", "attrs", "anchor"]);
|
|
12673
12193
|
if (anchor === void 0) {
|
|
12674
|
-
anchor = getTextByPathList(slideMasterSpNode, [
|
|
12675
|
-
"p:txBody",
|
|
12676
|
-
"a:bodyPr",
|
|
12677
|
-
"attrs",
|
|
12678
|
-
"anchor"
|
|
12679
|
-
]);
|
|
12194
|
+
anchor = getTextByPathList(slideMasterSpNode, ["p:txBody", "a:bodyPr", "attrs", "anchor"]);
|
|
12680
12195
|
}
|
|
12681
12196
|
}
|
|
12682
12197
|
return anchor === "ctr" ? "v-mid" : anchor === "b" ? "v-down" : "v-up";
|
|
12683
12198
|
}
|
|
12684
12199
|
function getFontType(node, type, slideMasterTextStyles) {
|
|
12685
|
-
let typeface = getTextByPathList(node, [
|
|
12686
|
-
"a:rPr",
|
|
12687
|
-
"a:latin",
|
|
12688
|
-
"attrs",
|
|
12689
|
-
"typeface"
|
|
12690
|
-
]);
|
|
12200
|
+
let typeface = getTextByPathList(node, ["a:rPr", "a:latin", "attrs", "typeface"]);
|
|
12691
12201
|
if (typeface === void 0) {
|
|
12692
|
-
const fontSchemeNode = getTextByPathList(
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12202
|
+
const fontSchemeNode = getTextByPathList(themeContent, [
|
|
12203
|
+
"a:theme",
|
|
12204
|
+
"a:themeElements",
|
|
12205
|
+
"a:fontScheme"
|
|
12206
|
+
]);
|
|
12696
12207
|
if (type === "title" || type === "subTitle" || type === "ctrTitle") {
|
|
12697
|
-
typeface = getTextByPathList(fontSchemeNode, [
|
|
12698
|
-
"a:majorFont",
|
|
12699
|
-
"a:latin",
|
|
12700
|
-
"attrs",
|
|
12701
|
-
"typeface"
|
|
12702
|
-
]);
|
|
12208
|
+
typeface = getTextByPathList(fontSchemeNode, ["a:majorFont", "a:latin", "attrs", "typeface"]);
|
|
12703
12209
|
} else if (type === "body") {
|
|
12704
|
-
typeface = getTextByPathList(fontSchemeNode, [
|
|
12705
|
-
"a:minorFont",
|
|
12706
|
-
"a:latin",
|
|
12707
|
-
"attrs",
|
|
12708
|
-
"typeface"
|
|
12709
|
-
]);
|
|
12210
|
+
typeface = getTextByPathList(fontSchemeNode, ["a:minorFont", "a:latin", "attrs", "typeface"]);
|
|
12710
12211
|
} else {
|
|
12711
|
-
typeface = getTextByPathList(fontSchemeNode, [
|
|
12712
|
-
"a:minorFont",
|
|
12713
|
-
"a:latin",
|
|
12714
|
-
"attrs",
|
|
12715
|
-
"typeface"
|
|
12716
|
-
]);
|
|
12212
|
+
typeface = getTextByPathList(fontSchemeNode, ["a:minorFont", "a:latin", "attrs", "typeface"]);
|
|
12717
12213
|
}
|
|
12718
12214
|
}
|
|
12719
12215
|
return typeface === void 0 ? "inherit" : typeface;
|
|
@@ -12831,11 +12327,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12831
12327
|
return align;
|
|
12832
12328
|
}
|
|
12833
12329
|
function getTextVerticalAlign(node, type, slideMasterTextStyles) {
|
|
12834
|
-
const baseline = getTextByPathList(node, [
|
|
12835
|
-
"a:rPr",
|
|
12836
|
-
"attrs",
|
|
12837
|
-
"baseline"
|
|
12838
|
-
]);
|
|
12330
|
+
const baseline = getTextByPathList(node, ["a:rPr", "attrs", "baseline"]);
|
|
12839
12331
|
return baseline === void 0 ? "baseline" : parseInt(baseline) / 1e3 + "%";
|
|
12840
12332
|
}
|
|
12841
12333
|
function getTableBorders(node) {
|
|
@@ -12889,11 +12381,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12889
12381
|
} else {
|
|
12890
12382
|
cssText += borderWidth + "pt ";
|
|
12891
12383
|
}
|
|
12892
|
-
const borderType = getTextByPathList(lineNode, [
|
|
12893
|
-
"a:prstDash",
|
|
12894
|
-
"attrs",
|
|
12895
|
-
"val"
|
|
12896
|
-
]);
|
|
12384
|
+
const borderType = getTextByPathList(lineNode, ["a:prstDash", "attrs", "val"]);
|
|
12897
12385
|
let strokeDasharray = "0";
|
|
12898
12386
|
switch (borderType) {
|
|
12899
12387
|
case "solid": {
|
|
@@ -12951,38 +12439,22 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
12951
12439
|
strokeDasharray = "0";
|
|
12952
12440
|
}
|
|
12953
12441
|
}
|
|
12954
|
-
let borderColor = getTextByPathList(lineNode, [
|
|
12955
|
-
"a:solidFill",
|
|
12956
|
-
"a:srgbClr",
|
|
12957
|
-
"attrs",
|
|
12958
|
-
"val"
|
|
12959
|
-
]);
|
|
12442
|
+
let borderColor = getTextByPathList(lineNode, ["a:solidFill", "a:srgbClr", "attrs", "val"]);
|
|
12960
12443
|
if (borderColor === void 0) {
|
|
12961
|
-
const schemeClrNode = getTextByPathList(lineNode, [
|
|
12962
|
-
"a:solidFill",
|
|
12963
|
-
"a:schemeClr"
|
|
12964
|
-
]);
|
|
12444
|
+
const schemeClrNode = getTextByPathList(lineNode, ["a:solidFill", "a:schemeClr"]);
|
|
12965
12445
|
if (schemeClrNode !== void 0) {
|
|
12966
12446
|
const schemeClr = "a:" + getTextByPathList(schemeClrNode, ["attrs", "val"]);
|
|
12967
12447
|
borderColor = getSchemeColorFromTheme(schemeClr, void 0);
|
|
12968
12448
|
}
|
|
12969
12449
|
}
|
|
12970
12450
|
if (borderColor === void 0) {
|
|
12971
|
-
const schemeClrNode = getTextByPathList(node, [
|
|
12972
|
-
"p:style",
|
|
12973
|
-
"a:lnRef",
|
|
12974
|
-
"a:schemeClr"
|
|
12975
|
-
]);
|
|
12451
|
+
const schemeClrNode = getTextByPathList(node, ["p:style", "a:lnRef", "a:schemeClr"]);
|
|
12976
12452
|
if (schemeClrNode !== void 0) {
|
|
12977
12453
|
const schemeClr = "a:" + getTextByPathList(schemeClrNode, ["attrs", "val"]);
|
|
12978
12454
|
borderColor = getSchemeColorFromTheme(schemeClr, void 0);
|
|
12979
12455
|
}
|
|
12980
12456
|
if (borderColor !== void 0) {
|
|
12981
|
-
let shade = getTextByPathList(schemeClrNode, [
|
|
12982
|
-
"a:shade",
|
|
12983
|
-
"attrs",
|
|
12984
|
-
"val"
|
|
12985
|
-
]);
|
|
12457
|
+
let shade = getTextByPathList(schemeClrNode, ["a:shade", "attrs", "val"]);
|
|
12986
12458
|
if (shade !== void 0) {
|
|
12987
12459
|
shade = (parseInt(shade) / 1e5).toString();
|
|
12988
12460
|
const color = new Color("#" + borderColor);
|
|
@@ -13013,18 +12485,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13013
12485
|
}
|
|
13014
12486
|
}
|
|
13015
12487
|
async function getSlideBackgroundFill(slideContent, slideLayoutContent, slideMasterContent, warpObj) {
|
|
13016
|
-
let bgPr = getTextByPathList(slideContent, [
|
|
13017
|
-
|
|
13018
|
-
"p:cSld",
|
|
13019
|
-
"p:bg",
|
|
13020
|
-
"p:bgPr"
|
|
13021
|
-
]);
|
|
13022
|
-
let bgRef = getTextByPathList(slideContent, [
|
|
13023
|
-
"p:sld",
|
|
13024
|
-
"p:cSld",
|
|
13025
|
-
"p:bg",
|
|
13026
|
-
"p:bgRef"
|
|
13027
|
-
]);
|
|
12488
|
+
let bgPr = getTextByPathList(slideContent, ["p:sld", "p:cSld", "p:bg", "p:bgPr"]);
|
|
12489
|
+
let bgRef = getTextByPathList(slideContent, ["p:sld", "p:cSld", "p:bg", "p:bgRef"]);
|
|
13028
12490
|
let bgcolor;
|
|
13029
12491
|
if (bgPr !== void 0) {
|
|
13030
12492
|
const bgFillTyp = getFillType(bgPr);
|
|
@@ -13042,33 +12504,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13042
12504
|
let loTint = "";
|
|
13043
12505
|
let loColor;
|
|
13044
12506
|
if (gsLst[i]["a:srgbClr"] !== void 0) {
|
|
13045
|
-
loColor = getTextByPathList(gsLst[i], [
|
|
13046
|
-
|
|
13047
|
-
"attrs",
|
|
13048
|
-
"val"
|
|
13049
|
-
]);
|
|
13050
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13051
|
-
"a:srgbClr",
|
|
13052
|
-
"a:tint",
|
|
13053
|
-
"attrs",
|
|
13054
|
-
"val"
|
|
13055
|
-
]);
|
|
12507
|
+
loColor = getTextByPathList(gsLst[i], ["a:srgbClr", "attrs", "val"]);
|
|
12508
|
+
loTint = getTextByPathList(gsLst[i], ["a:srgbClr", "a:tint", "attrs", "val"]);
|
|
13056
12509
|
} else if (gsLst[i]["a:schemeClr"] !== void 0) {
|
|
13057
|
-
const schemeClr = getTextByPathList(gsLst[i], [
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
"val"
|
|
13061
|
-
]);
|
|
13062
|
-
loColor = getSchemeColorFromTheme(
|
|
13063
|
-
"a:" + schemeClr,
|
|
13064
|
-
slideMasterContent
|
|
13065
|
-
);
|
|
13066
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13067
|
-
"a:schemeClr",
|
|
13068
|
-
"a:tint",
|
|
13069
|
-
"attrs",
|
|
13070
|
-
"val"
|
|
13071
|
-
]);
|
|
12510
|
+
const schemeClr = getTextByPathList(gsLst[i], ["a:schemeClr", "attrs", "val"]);
|
|
12511
|
+
loColor = getSchemeColorFromTheme("a:" + schemeClr, slideMasterContent);
|
|
12512
|
+
loTint = getTextByPathList(gsLst[i], ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
13072
12513
|
}
|
|
13073
12514
|
colorArray[i] = loColor;
|
|
13074
12515
|
tintArray[i] = loTint !== void 0 ? parseInt(loTint) / 1e5 : 1;
|
|
@@ -13087,32 +12528,17 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13087
12528
|
}
|
|
13088
12529
|
}
|
|
13089
12530
|
} else if (bgFillTyp === "PIC_FILL") {
|
|
13090
|
-
const picFillBase64 = await getPicFill(
|
|
13091
|
-
"slideBg",
|
|
13092
|
-
bgPr["a:blipFill"],
|
|
13093
|
-
warpObj
|
|
13094
|
-
);
|
|
12531
|
+
const picFillBase64 = await getPicFill("slideBg", bgPr["a:blipFill"], warpObj);
|
|
13095
12532
|
const ordr = bgPr["attrs"]["order"];
|
|
13096
12533
|
bgcolor = "background-image: url(" + picFillBase64 + "); z-index: " + ordr + ";";
|
|
13097
12534
|
}
|
|
13098
12535
|
} else if (bgRef !== void 0) {
|
|
13099
12536
|
let phClr = "";
|
|
13100
12537
|
if (bgRef["a:srgbClr"] !== void 0) {
|
|
13101
|
-
phClr = getTextByPathList(bgRef, [
|
|
13102
|
-
"a:srgbClr",
|
|
13103
|
-
"attrs",
|
|
13104
|
-
"val"
|
|
13105
|
-
]);
|
|
12538
|
+
phClr = getTextByPathList(bgRef, ["a:srgbClr", "attrs", "val"]);
|
|
13106
12539
|
} else if (bgRef["a:schemeClr"] !== void 0) {
|
|
13107
|
-
const schemeClr = getTextByPathList(bgRef, [
|
|
13108
|
-
|
|
13109
|
-
"attrs",
|
|
13110
|
-
"val"
|
|
13111
|
-
]);
|
|
13112
|
-
phClr = getSchemeColorFromTheme(
|
|
13113
|
-
"a:" + schemeClr,
|
|
13114
|
-
slideMasterContent
|
|
13115
|
-
);
|
|
12540
|
+
const schemeClr = getTextByPathList(bgRef, ["a:schemeClr", "attrs", "val"]);
|
|
12541
|
+
phClr = getSchemeColorFromTheme("a:" + schemeClr, slideMasterContent);
|
|
13116
12542
|
}
|
|
13117
12543
|
const idx = Number(bgRef["attrs"]["idx"]);
|
|
13118
12544
|
if (idx === 0 || idx === 1e3)
|
|
@@ -13156,12 +12582,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13156
12582
|
const gsLst = grdFill["a:gsLst"]["a:gs"];
|
|
13157
12583
|
const tintArray = [];
|
|
13158
12584
|
for (let i = 0; i < gsLst.length; i++) {
|
|
13159
|
-
const loTint = getTextByPathList(gsLst[i], [
|
|
13160
|
-
"a:schemeClr",
|
|
13161
|
-
"a:tint",
|
|
13162
|
-
"attrs",
|
|
13163
|
-
"val"
|
|
13164
|
-
]);
|
|
12585
|
+
const loTint = getTextByPathList(gsLst[i], ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
13165
12586
|
tintArray[i] = loTint !== void 0 ? parseInt(loTint) / 1e5 : 1;
|
|
13166
12587
|
}
|
|
13167
12588
|
const lin = grdFill["a:lin"];
|
|
@@ -13180,18 +12601,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13180
12601
|
}
|
|
13181
12602
|
}
|
|
13182
12603
|
} else {
|
|
13183
|
-
bgPr = getTextByPathList(slideLayoutContent, [
|
|
13184
|
-
|
|
13185
|
-
"p:cSld",
|
|
13186
|
-
"p:bg",
|
|
13187
|
-
"p:bgPr"
|
|
13188
|
-
]);
|
|
13189
|
-
bgRef = getTextByPathList(slideLayoutContent, [
|
|
13190
|
-
"p:sldLayout",
|
|
13191
|
-
"p:cSld",
|
|
13192
|
-
"p:bg",
|
|
13193
|
-
"p:bgRef"
|
|
13194
|
-
]);
|
|
12604
|
+
bgPr = getTextByPathList(slideLayoutContent, ["p:sldLayout", "p:cSld", "p:bg", "p:bgPr"]);
|
|
12605
|
+
bgRef = getTextByPathList(slideLayoutContent, ["p:sldLayout", "p:cSld", "p:bg", "p:bgRef"]);
|
|
13195
12606
|
if (bgPr !== void 0) {
|
|
13196
12607
|
const bgFillTyp = getFillType(bgPr);
|
|
13197
12608
|
if (bgFillTyp === "SOLID_FILL") {
|
|
@@ -13208,33 +12619,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13208
12619
|
let loTint = "";
|
|
13209
12620
|
let loColor;
|
|
13210
12621
|
if (gsLst[i]["a:srgbClr"] !== void 0) {
|
|
13211
|
-
loColor = getTextByPathList(gsLst[i], [
|
|
13212
|
-
|
|
13213
|
-
"attrs",
|
|
13214
|
-
"val"
|
|
13215
|
-
]);
|
|
13216
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13217
|
-
"a:srgbClr",
|
|
13218
|
-
"a:tint",
|
|
13219
|
-
"attrs",
|
|
13220
|
-
"val"
|
|
13221
|
-
]);
|
|
12622
|
+
loColor = getTextByPathList(gsLst[i], ["a:srgbClr", "attrs", "val"]);
|
|
12623
|
+
loTint = getTextByPathList(gsLst[i], ["a:srgbClr", "a:tint", "attrs", "val"]);
|
|
13222
12624
|
} else if (gsLst[i]["a:schemeClr"] !== void 0) {
|
|
13223
|
-
const schemeClr = getTextByPathList(gsLst[i], [
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
"val"
|
|
13227
|
-
]);
|
|
13228
|
-
loColor = getSchemeColorFromTheme(
|
|
13229
|
-
"a:" + schemeClr,
|
|
13230
|
-
slideMasterContent
|
|
13231
|
-
);
|
|
13232
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13233
|
-
"a:schemeClr",
|
|
13234
|
-
"a:tint",
|
|
13235
|
-
"attrs",
|
|
13236
|
-
"val"
|
|
13237
|
-
]);
|
|
12625
|
+
const schemeClr = getTextByPathList(gsLst[i], ["a:schemeClr", "attrs", "val"]);
|
|
12626
|
+
loColor = getSchemeColorFromTheme("a:" + schemeClr, slideMasterContent);
|
|
12627
|
+
loTint = getTextByPathList(gsLst[i], ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
13238
12628
|
}
|
|
13239
12629
|
colorArray[i] = loColor;
|
|
13240
12630
|
tintArray[i] = loTint !== void 0 ? parseInt(loTint) / 1e5 : 1;
|
|
@@ -13253,29 +12643,15 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13253
12643
|
}
|
|
13254
12644
|
}
|
|
13255
12645
|
} else if (bgFillTyp === "PIC_FILL") {
|
|
13256
|
-
const picFillBase64 = await getPicFill(
|
|
13257
|
-
"layoutBg",
|
|
13258
|
-
bgPr["a:blipFill"],
|
|
13259
|
-
warpObj
|
|
13260
|
-
);
|
|
12646
|
+
const picFillBase64 = await getPicFill("layoutBg", bgPr["a:blipFill"], warpObj);
|
|
13261
12647
|
const ordr = bgPr["attrs"]["order"];
|
|
13262
12648
|
bgcolor = "background-image: url(" + picFillBase64 + "); z-index: " + ordr + ";";
|
|
13263
12649
|
}
|
|
13264
12650
|
} else if (bgRef !== void 0) {
|
|
13265
12651
|
bgcolor = "background: red;";
|
|
13266
12652
|
} else {
|
|
13267
|
-
bgPr = getTextByPathList(slideMasterContent, [
|
|
13268
|
-
|
|
13269
|
-
"p:cSld",
|
|
13270
|
-
"p:bg",
|
|
13271
|
-
"p:bgPr"
|
|
13272
|
-
]);
|
|
13273
|
-
bgRef = getTextByPathList(slideMasterContent, [
|
|
13274
|
-
"p:sldMaster",
|
|
13275
|
-
"p:cSld",
|
|
13276
|
-
"p:bg",
|
|
13277
|
-
"p:bgRef"
|
|
13278
|
-
]);
|
|
12653
|
+
bgPr = getTextByPathList(slideMasterContent, ["p:sldMaster", "p:cSld", "p:bg", "p:bgPr"]);
|
|
12654
|
+
bgRef = getTextByPathList(slideMasterContent, ["p:sldMaster", "p:cSld", "p:bg", "p:bgRef"]);
|
|
13279
12655
|
if (bgPr !== void 0) {
|
|
13280
12656
|
const bgFillTyp = getFillType(bgPr);
|
|
13281
12657
|
if (bgFillTyp === "SOLID_FILL") {
|
|
@@ -13292,33 +12668,12 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13292
12668
|
let loTint = "";
|
|
13293
12669
|
let loColor;
|
|
13294
12670
|
if (gsLst[i]["a:srgbClr"] !== void 0) {
|
|
13295
|
-
loColor = getTextByPathList(gsLst[i], [
|
|
13296
|
-
|
|
13297
|
-
"attrs",
|
|
13298
|
-
"val"
|
|
13299
|
-
]);
|
|
13300
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13301
|
-
"a:srgbClr",
|
|
13302
|
-
"a:tint",
|
|
13303
|
-
"attrs",
|
|
13304
|
-
"val"
|
|
13305
|
-
]);
|
|
12671
|
+
loColor = getTextByPathList(gsLst[i], ["a:srgbClr", "attrs", "val"]);
|
|
12672
|
+
loTint = getTextByPathList(gsLst[i], ["a:srgbClr", "a:tint", "attrs", "val"]);
|
|
13306
12673
|
} else if (gsLst[i]["a:schemeClr"] !== void 0) {
|
|
13307
|
-
const schemeClr = getTextByPathList(gsLst[i], [
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
"val"
|
|
13311
|
-
]);
|
|
13312
|
-
loColor = getSchemeColorFromTheme(
|
|
13313
|
-
"a:" + schemeClr,
|
|
13314
|
-
slideMasterContent
|
|
13315
|
-
);
|
|
13316
|
-
loTint = getTextByPathList(gsLst[i], [
|
|
13317
|
-
"a:schemeClr",
|
|
13318
|
-
"a:tint",
|
|
13319
|
-
"attrs",
|
|
13320
|
-
"val"
|
|
13321
|
-
]);
|
|
12674
|
+
const schemeClr = getTextByPathList(gsLst[i], ["a:schemeClr", "attrs", "val"]);
|
|
12675
|
+
loColor = getSchemeColorFromTheme("a:" + schemeClr, slideMasterContent);
|
|
12676
|
+
loTint = getTextByPathList(gsLst[i], ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
13322
12677
|
}
|
|
13323
12678
|
colorArray[i] = loColor;
|
|
13324
12679
|
tintArray[i] = loTint !== void 0 ? parseInt(loTint) / 1e5 : 1;
|
|
@@ -13337,32 +12692,17 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13337
12692
|
}
|
|
13338
12693
|
}
|
|
13339
12694
|
} else if (bgFillTyp === "PIC_FILL") {
|
|
13340
|
-
const picFillBase64 = await getPicFill(
|
|
13341
|
-
"masterBg",
|
|
13342
|
-
bgPr["a:blipFill"],
|
|
13343
|
-
warpObj
|
|
13344
|
-
);
|
|
12695
|
+
const picFillBase64 = await getPicFill("masterBg", bgPr["a:blipFill"], warpObj);
|
|
13345
12696
|
const ordr = bgPr["attrs"]["order"];
|
|
13346
12697
|
bgcolor = "background-image: url(" + picFillBase64 + "); z-index: " + ordr + ";";
|
|
13347
12698
|
}
|
|
13348
12699
|
} else if (bgRef !== void 0) {
|
|
13349
12700
|
let phClr = "";
|
|
13350
12701
|
if (bgRef["a:srgbClr"] !== void 0) {
|
|
13351
|
-
phClr = getTextByPathList(bgRef, [
|
|
13352
|
-
"a:srgbClr",
|
|
13353
|
-
"attrs",
|
|
13354
|
-
"val"
|
|
13355
|
-
]);
|
|
12702
|
+
phClr = getTextByPathList(bgRef, ["a:srgbClr", "attrs", "val"]);
|
|
13356
12703
|
} else if (bgRef["a:schemeClr"] !== void 0) {
|
|
13357
|
-
const schemeClr = getTextByPathList(bgRef, [
|
|
13358
|
-
|
|
13359
|
-
"attrs",
|
|
13360
|
-
"val"
|
|
13361
|
-
]);
|
|
13362
|
-
phClr = getSchemeColorFromTheme(
|
|
13363
|
-
"a:" + schemeClr,
|
|
13364
|
-
slideMasterContent
|
|
13365
|
-
);
|
|
12704
|
+
const schemeClr = getTextByPathList(bgRef, ["a:schemeClr", "attrs", "val"]);
|
|
12705
|
+
phClr = getSchemeColorFromTheme("a:" + schemeClr, slideMasterContent);
|
|
13366
12706
|
}
|
|
13367
12707
|
const idx = Number(bgRef["attrs"]["idx"]);
|
|
13368
12708
|
if (idx === 0 || idx === 1e3)
|
|
@@ -13406,12 +12746,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13406
12746
|
const gsLst = grdFill["a:gsLst"]["a:gs"];
|
|
13407
12747
|
const tintArray = [];
|
|
13408
12748
|
for (let i = 0; i < gsLst.length; i++) {
|
|
13409
|
-
const loTint = getTextByPathList(gsLst[i], [
|
|
13410
|
-
"a:schemeClr",
|
|
13411
|
-
"a:tint",
|
|
13412
|
-
"attrs",
|
|
13413
|
-
"val"
|
|
13414
|
-
]);
|
|
12749
|
+
const loTint = getTextByPathList(gsLst[i], ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
13415
12750
|
tintArray[i] = loTint !== void 0 ? parseInt(loTint) / 1e5 : 1;
|
|
13416
12751
|
}
|
|
13417
12752
|
const lin = grdFill["a:lin"];
|
|
@@ -13443,9 +12778,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13443
12778
|
return arrByte[1] + "," + arrByte[2] + "," + arrByte[3];
|
|
13444
12779
|
}
|
|
13445
12780
|
async function getShapeFill(node, isSvgMode, warpObj) {
|
|
13446
|
-
const fillType = getFillType(
|
|
13447
|
-
getTextByPathList(node, ["p:spPr"])
|
|
13448
|
-
);
|
|
12781
|
+
const fillType = getFillType(getTextByPathList(node, ["p:spPr"]));
|
|
13449
12782
|
let fillColor;
|
|
13450
12783
|
if (fillType === "NO_FILL") {
|
|
13451
12784
|
return isSvgMode ? "none" : "background-color: initial;";
|
|
@@ -13531,22 +12864,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13531
12864
|
for (let i = 0; i < gsLst.length; i++) {
|
|
13532
12865
|
let loColor = getSolidFill(gsLst[i]);
|
|
13533
12866
|
if (gsLst[i]["a:srgbClr"] !== void 0) {
|
|
13534
|
-
let lumMod = parseInt(
|
|
13535
|
-
|
|
13536
|
-
"a:srgbClr",
|
|
13537
|
-
"a:lumMod",
|
|
13538
|
-
"attrs",
|
|
13539
|
-
"val"
|
|
13540
|
-
])
|
|
13541
|
-
) / 1e5;
|
|
13542
|
-
let lumOff = parseInt(
|
|
13543
|
-
getTextByPathList(node, [
|
|
13544
|
-
"a:srgbClr",
|
|
13545
|
-
"a:lumOff",
|
|
13546
|
-
"attrs",
|
|
13547
|
-
"val"
|
|
13548
|
-
])
|
|
13549
|
-
) / 1e5;
|
|
12867
|
+
let lumMod = parseInt(getTextByPathList(node, ["a:srgbClr", "a:lumMod", "attrs", "val"])) / 1e5;
|
|
12868
|
+
let lumOff = parseInt(getTextByPathList(node, ["a:srgbClr", "a:lumOff", "attrs", "val"])) / 1e5;
|
|
13550
12869
|
if (isNaN(lumMod)) {
|
|
13551
12870
|
lumMod = 1;
|
|
13552
12871
|
}
|
|
@@ -13555,22 +12874,8 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13555
12874
|
}
|
|
13556
12875
|
loColor = applyLumModify(loColor, lumMod, lumOff);
|
|
13557
12876
|
} else if (gsLst[i]["a:schemeClr"] !== void 0) {
|
|
13558
|
-
let lumMod = parseInt(
|
|
13559
|
-
|
|
13560
|
-
"a:schemeClr",
|
|
13561
|
-
"a:lumMod",
|
|
13562
|
-
"attrs",
|
|
13563
|
-
"val"
|
|
13564
|
-
])
|
|
13565
|
-
) / 1e5;
|
|
13566
|
-
let lumOff = parseInt(
|
|
13567
|
-
getTextByPathList(gsLst[i], [
|
|
13568
|
-
"a:schemeClr",
|
|
13569
|
-
"a:lumOff",
|
|
13570
|
-
"attrs",
|
|
13571
|
-
"val"
|
|
13572
|
-
])
|
|
13573
|
-
) / 1e5;
|
|
12877
|
+
let lumMod = parseInt(getTextByPathList(gsLst[i], ["a:schemeClr", "a:lumMod", "attrs", "val"])) / 1e5;
|
|
12878
|
+
let lumOff = parseInt(getTextByPathList(gsLst[i], ["a:schemeClr", "a:lumOff", "attrs", "val"])) / 1e5;
|
|
13574
12879
|
if (isNaN(lumMod)) {
|
|
13575
12880
|
lumMod = 1;
|
|
13576
12881
|
}
|
|
@@ -13625,11 +12930,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
13625
12930
|
if (node["a:srgbClr"] !== void 0) {
|
|
13626
12931
|
color = getTextByPathList(node, ["a:srgbClr", "attrs", "val"]);
|
|
13627
12932
|
} else if (node["a:schemeClr"] !== void 0) {
|
|
13628
|
-
const schemeClr = getTextByPathList(node, [
|
|
13629
|
-
"a:schemeClr",
|
|
13630
|
-
"attrs",
|
|
13631
|
-
"val"
|
|
13632
|
-
]);
|
|
12933
|
+
const schemeClr = getTextByPathList(node, ["a:schemeClr", "attrs", "val"]);
|
|
13633
12934
|
color = getSchemeColorFromTheme("a:" + schemeClr, void 0);
|
|
13634
12935
|
} else if (node["a:scrgbClr"] !== void 0) {
|
|
13635
12936
|
const defBultColorVals = node["a:scrgbClr"]["attrs"];
|
|
@@ -14008,62 +13309,32 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
14008
13309
|
}
|
|
14009
13310
|
let opcity = 1;
|
|
14010
13311
|
if (solidFill["a:srgbClr"] !== void 0) {
|
|
14011
|
-
const tint = getTextByPathList(solidFill, [
|
|
14012
|
-
"a:srgbClr",
|
|
14013
|
-
"a:tint",
|
|
14014
|
-
"attrs",
|
|
14015
|
-
"val"
|
|
14016
|
-
]);
|
|
13312
|
+
const tint = getTextByPathList(solidFill, ["a:srgbClr", "a:tint", "attrs", "val"]);
|
|
14017
13313
|
if (tint !== void 0) {
|
|
14018
13314
|
opcity = parseInt(tint) / 1e5;
|
|
14019
13315
|
}
|
|
14020
13316
|
} else if (solidFill["a:schemeClr"] !== void 0) {
|
|
14021
|
-
const tint = getTextByPathList(solidFill, [
|
|
14022
|
-
"a:schemeClr",
|
|
14023
|
-
"a:tint",
|
|
14024
|
-
"attrs",
|
|
14025
|
-
"val"
|
|
14026
|
-
]);
|
|
13317
|
+
const tint = getTextByPathList(solidFill, ["a:schemeClr", "a:tint", "attrs", "val"]);
|
|
14027
13318
|
if (tint !== void 0) {
|
|
14028
13319
|
opcity = parseInt(tint) / 1e5;
|
|
14029
13320
|
}
|
|
14030
13321
|
} else if (solidFill["a:scrgbClr"] !== void 0) {
|
|
14031
|
-
const tint = getTextByPathList(solidFill, [
|
|
14032
|
-
"a:scrgbClr",
|
|
14033
|
-
"a:tint",
|
|
14034
|
-
"attrs",
|
|
14035
|
-
"val"
|
|
14036
|
-
]);
|
|
13322
|
+
const tint = getTextByPathList(solidFill, ["a:scrgbClr", "a:tint", "attrs", "val"]);
|
|
14037
13323
|
if (tint !== void 0) {
|
|
14038
13324
|
opcity = parseInt(tint) / 1e5;
|
|
14039
13325
|
}
|
|
14040
13326
|
} else if (solidFill["a:prstClr"] !== void 0) {
|
|
14041
|
-
const tint = getTextByPathList(solidFill, [
|
|
14042
|
-
"a:prstClr",
|
|
14043
|
-
"a:tint",
|
|
14044
|
-
"attrs",
|
|
14045
|
-
"val"
|
|
14046
|
-
]);
|
|
13327
|
+
const tint = getTextByPathList(solidFill, ["a:prstClr", "a:tint", "attrs", "val"]);
|
|
14047
13328
|
if (tint !== void 0) {
|
|
14048
13329
|
opcity = parseInt(tint) / 1e5;
|
|
14049
13330
|
}
|
|
14050
13331
|
} else if (solidFill["a:hslClr"] !== void 0) {
|
|
14051
|
-
const tint = getTextByPathList(solidFill, [
|
|
14052
|
-
"a:hslClr",
|
|
14053
|
-
"a:tint",
|
|
14054
|
-
"attrs",
|
|
14055
|
-
"val"
|
|
14056
|
-
]);
|
|
13332
|
+
const tint = getTextByPathList(solidFill, ["a:hslClr", "a:tint", "attrs", "val"]);
|
|
14057
13333
|
if (tint !== void 0) {
|
|
14058
13334
|
opcity = parseInt(tint) / 1e5;
|
|
14059
13335
|
}
|
|
14060
13336
|
} else if (solidFill["a:sysClr"] !== void 0) {
|
|
14061
|
-
const tint = getTextByPathList(solidFill, [
|
|
14062
|
-
"a:sysClr",
|
|
14063
|
-
"a:tint",
|
|
14064
|
-
"attrs",
|
|
14065
|
-
"val"
|
|
14066
|
-
]);
|
|
13337
|
+
const tint = getTextByPathList(solidFill, ["a:sysClr", "a:tint", "attrs", "val"]);
|
|
14067
13338
|
if (tint !== void 0) {
|
|
14068
13339
|
opcity = parseInt(tint) / 1e5;
|
|
14069
13340
|
}
|
|
@@ -14072,11 +13343,7 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
14072
13343
|
}
|
|
14073
13344
|
function getSchemeColorFromTheme(schemeClr, sldMasterNode) {
|
|
14074
13345
|
if (slideLayoutClrOvride === "" || slideLayoutClrOvride === void 0) {
|
|
14075
|
-
slideLayoutClrOvride = getTextByPathList(sldMasterNode, [
|
|
14076
|
-
"p:sldMaster",
|
|
14077
|
-
"p:clrMap",
|
|
14078
|
-
"attrs"
|
|
14079
|
-
]) || {};
|
|
13346
|
+
slideLayoutClrOvride = getTextByPathList(sldMasterNode, ["p:sldMaster", "p:clrMap", "attrs"]) || {};
|
|
14080
13347
|
}
|
|
14081
13348
|
const schmClrName = schemeClr.substr(2);
|
|
14082
13349
|
switch (schmClrName) {
|
|
@@ -14125,66 +13392,42 @@ function processPptx(setOnMessage, postMessage2) {
|
|
|
14125
13392
|
);
|
|
14126
13393
|
dataMat.push(dataRow);
|
|
14127
13394
|
} else {
|
|
14128
|
-
eachElement(
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
"c:strRef",
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
"c:
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
function(innerNode2, index2) {
|
|
14149
|
-
rowNames[innerNode2["attrs"]["idx"]] = innerNode2["c:v"];
|
|
14150
|
-
return "";
|
|
14151
|
-
}
|
|
14152
|
-
);
|
|
14153
|
-
} else if (getTextByPathList(innerNode, [
|
|
14154
|
-
"c:cat",
|
|
14155
|
-
"c:numRef",
|
|
14156
|
-
"c:numCache",
|
|
14157
|
-
"c:pt"
|
|
14158
|
-
]) !== void 0) {
|
|
14159
|
-
eachElement(
|
|
14160
|
-
innerNode["c:cat"]["c:numRef"]["c:numCache"]["c:pt"],
|
|
14161
|
-
function(innerNode2, index2) {
|
|
14162
|
-
rowNames[innerNode2["attrs"]["idx"]] = innerNode2["c:v"];
|
|
14163
|
-
return "";
|
|
14164
|
-
}
|
|
14165
|
-
);
|
|
14166
|
-
}
|
|
14167
|
-
if (getTextByPathList(innerNode, [
|
|
14168
|
-
"c:val",
|
|
14169
|
-
"c:numRef",
|
|
14170
|
-
"c:numCache",
|
|
14171
|
-
"c:pt"
|
|
14172
|
-
]) !== void 0) {
|
|
14173
|
-
eachElement(
|
|
14174
|
-
innerNode["c:val"]["c:numRef"]["c:numCache"]["c:pt"],
|
|
14175
|
-
function(innerNode2, index2) {
|
|
14176
|
-
dataRow.push({
|
|
14177
|
-
x: innerNode2["attrs"]["idx"],
|
|
14178
|
-
y: parseFloat(innerNode2["c:v"])
|
|
14179
|
-
});
|
|
14180
|
-
return "";
|
|
14181
|
-
}
|
|
14182
|
-
);
|
|
14183
|
-
}
|
|
14184
|
-
dataMat.push({ key: colName, values: dataRow, xlabels: rowNames });
|
|
14185
|
-
return "";
|
|
13395
|
+
eachElement(serNode, function(innerNode, index) {
|
|
13396
|
+
const dataRow = [];
|
|
13397
|
+
const colName = getTextByPathList(innerNode, ["c:tx", "c:strRef", "c:strCache", "c:pt", "c:v"]) || index;
|
|
13398
|
+
const rowNames = {};
|
|
13399
|
+
if (getTextByPathList(innerNode, ["c:cat", "c:strRef", "c:strCache", "c:pt"]) !== void 0) {
|
|
13400
|
+
eachElement(
|
|
13401
|
+
innerNode["c:cat"]["c:strRef"]["c:strCache"]["c:pt"],
|
|
13402
|
+
function(innerNode2, index2) {
|
|
13403
|
+
rowNames[innerNode2["attrs"]["idx"]] = innerNode2["c:v"];
|
|
13404
|
+
return "";
|
|
13405
|
+
}
|
|
13406
|
+
);
|
|
13407
|
+
} else if (getTextByPathList(innerNode, ["c:cat", "c:numRef", "c:numCache", "c:pt"]) !== void 0) {
|
|
13408
|
+
eachElement(
|
|
13409
|
+
innerNode["c:cat"]["c:numRef"]["c:numCache"]["c:pt"],
|
|
13410
|
+
function(innerNode2, index2) {
|
|
13411
|
+
rowNames[innerNode2["attrs"]["idx"]] = innerNode2["c:v"];
|
|
13412
|
+
return "";
|
|
13413
|
+
}
|
|
13414
|
+
);
|
|
14186
13415
|
}
|
|
14187
|
-
|
|
13416
|
+
if (getTextByPathList(innerNode, ["c:val", "c:numRef", "c:numCache", "c:pt"]) !== void 0) {
|
|
13417
|
+
eachElement(
|
|
13418
|
+
innerNode["c:val"]["c:numRef"]["c:numCache"]["c:pt"],
|
|
13419
|
+
function(innerNode2, index2) {
|
|
13420
|
+
dataRow.push({
|
|
13421
|
+
x: innerNode2["attrs"]["idx"],
|
|
13422
|
+
y: parseFloat(innerNode2["c:v"])
|
|
13423
|
+
});
|
|
13424
|
+
return "";
|
|
13425
|
+
}
|
|
13426
|
+
);
|
|
13427
|
+
}
|
|
13428
|
+
dataMat.push({ key: colName, values: dataRow, xlabels: rowNames });
|
|
13429
|
+
return "";
|
|
13430
|
+
});
|
|
14188
13431
|
}
|
|
14189
13432
|
return dataMat;
|
|
14190
13433
|
}
|
|
@@ -16421,7 +15664,7 @@ dimple.storyboard = function(chart, categoryFields) {
|
|
|
16421
15664
|
this.onTick(this.getFrameValue());
|
|
16422
15665
|
}
|
|
16423
15666
|
this._animationTimer = setInterval(
|
|
16424
|
-
function(storyboard) {
|
|
15667
|
+
/* @__PURE__ */ function(storyboard) {
|
|
16425
15668
|
return function() {
|
|
16426
15669
|
storyboard._goToFrameIndex(storyboard._frame + 1);
|
|
16427
15670
|
if (storyboard.onTick !== null) {
|
|
@@ -18277,7 +17520,7 @@ const newSvg = (parentSelector, width, height) => {
|
|
|
18277
17520
|
};
|
|
18278
17521
|
const renderPptx = (options) => {
|
|
18279
17522
|
if (typeof window !== "undefined") {
|
|
18280
|
-
const { pptx, resultElement, thumbElement } = options;
|
|
17523
|
+
const { pptx, resultElement, thumbElement, onError, onLoad } = options;
|
|
18281
17524
|
const wrapper = document.createElement("div");
|
|
18282
17525
|
wrapper.setAttribute("class", "r-preview-pptx-main");
|
|
18283
17526
|
resultElement.innerHTML = "";
|
|
@@ -18296,10 +17539,7 @@ const renderPptx = (options) => {
|
|
|
18296
17539
|
break;
|
|
18297
17540
|
case "pptx-thumb":
|
|
18298
17541
|
if (thumbElement)
|
|
18299
|
-
thumbElement == null ? void 0 : thumbElement.setAttribute(
|
|
18300
|
-
"src",
|
|
18301
|
-
`data:image/jpeg;base64,${msg.data}`
|
|
18302
|
-
);
|
|
17542
|
+
thumbElement == null ? void 0 : thumbElement.setAttribute("src", `data:image/jpeg;base64,${msg.data}`);
|
|
18303
17543
|
break;
|
|
18304
17544
|
case "slideSize":
|
|
18305
17545
|
break;
|
|
@@ -18310,6 +17550,7 @@ const renderPptx = (options) => {
|
|
|
18310
17550
|
case "Done":
|
|
18311
17551
|
isDone = true;
|
|
18312
17552
|
processCharts(msg.data.charts);
|
|
17553
|
+
onLoad && onLoad({ success: true, data: msg });
|
|
18313
17554
|
resolve(msg.data.time);
|
|
18314
17555
|
break;
|
|
18315
17556
|
case "WARN":
|
|
@@ -18318,6 +17559,7 @@ const renderPptx = (options) => {
|
|
|
18318
17559
|
case "ERROR":
|
|
18319
17560
|
isDone = true;
|
|
18320
17561
|
console.error("PPTX processing error: ", msg.data);
|
|
17562
|
+
onError && onError({ success: false, data: msg });
|
|
18321
17563
|
reject(new Error(msg.data));
|
|
18322
17564
|
break;
|
|
18323
17565
|
}
|
|
@@ -18338,10 +17580,7 @@ const renderPptx = (options) => {
|
|
|
18338
17580
|
...Array.from(wrapper.children).filter((item) => item.nodeName === "section").map((s) => s.offsetWidth)
|
|
18339
17581
|
);
|
|
18340
17582
|
const wrapperWidth = wrapper.children[0].offsetWidth;
|
|
18341
|
-
wrapper.setAttribute(
|
|
18342
|
-
"style",
|
|
18343
|
-
`transform: scale(${wrapperWidth / slidesWidth}),transform-origin': 'top left'`
|
|
18344
|
-
);
|
|
17583
|
+
wrapper.setAttribute("style", `transform: scale(${wrapperWidth / slidesWidth}),transform-origin': 'top left'`);
|
|
18345
17584
|
};
|
|
18346
17585
|
resize();
|
|
18347
17586
|
window.addEventListener("resize", resize);
|
|
@@ -18377,11 +17616,7 @@ const renderPptx = (options) => {
|
|
|
18377
17616
|
let data = [];
|
|
18378
17617
|
switch (chartType) {
|
|
18379
17618
|
case "lineChart": {
|
|
18380
|
-
const {
|
|
18381
|
-
data: data_,
|
|
18382
|
-
xLabels,
|
|
18383
|
-
groupLabels
|
|
18384
|
-
} = convertChartData(chartData);
|
|
17619
|
+
const { data: data_, xLabels, groupLabels } = convertChartData(chartData);
|
|
18385
17620
|
data = data_;
|
|
18386
17621
|
const container = document.getElementById(chartID) || document.body;
|
|
18387
17622
|
const svg = container && newSvg(`#${chartID}`, container.style.width, container.style.height);
|
|
@@ -18398,18 +17633,10 @@ const renderPptx = (options) => {
|
|
|
18398
17633
|
break;
|
|
18399
17634
|
}
|
|
18400
17635
|
case "barChart": {
|
|
18401
|
-
const {
|
|
18402
|
-
data: data_,
|
|
18403
|
-
xLabels,
|
|
18404
|
-
groupLabels
|
|
18405
|
-
} = convertChartData(chartData);
|
|
17636
|
+
const { data: data_, xLabels, groupLabels } = convertChartData(chartData);
|
|
18406
17637
|
data = data_;
|
|
18407
17638
|
const container = document.getElementById(chartID) || document.body;
|
|
18408
|
-
const svg = newSvg(
|
|
18409
|
-
"#" + chartID,
|
|
18410
|
-
container.style.width,
|
|
18411
|
-
container.style.height
|
|
18412
|
-
);
|
|
17639
|
+
const svg = newSvg("#" + chartID, container.style.width, container.style.height);
|
|
18413
17640
|
const myChart = new dimple.chart(svg, data);
|
|
18414
17641
|
const xAxis = myChart.addCategoryAxis("x", ["name", "group"]);
|
|
18415
17642
|
xAxis.addOrderRule(xLabels);
|
|
@@ -18427,11 +17654,7 @@ const renderPptx = (options) => {
|
|
|
18427
17654
|
const { data: data_, groupLabels } = convertChartData(chartData);
|
|
18428
17655
|
data = data_;
|
|
18429
17656
|
const container = document.getElementById(chartID) || document.body;
|
|
18430
|
-
const svg = newSvg(
|
|
18431
|
-
`#${chartID}`,
|
|
18432
|
-
container.style.width,
|
|
18433
|
-
container.style.height
|
|
18434
|
-
);
|
|
17657
|
+
const svg = newSvg(`#${chartID}`, container.style.width, container.style.height);
|
|
18435
17658
|
const myChart = new dimple.chart(svg, data);
|
|
18436
17659
|
const pieAxis = myChart.addMeasureAxis("p", "value");
|
|
18437
17660
|
pieAxis.addOrderRule(groupLabels);
|
|
@@ -18441,18 +17664,10 @@ const renderPptx = (options) => {
|
|
|
18441
17664
|
break;
|
|
18442
17665
|
}
|
|
18443
17666
|
case "areaChart": {
|
|
18444
|
-
const {
|
|
18445
|
-
data: data_,
|
|
18446
|
-
xLabels,
|
|
18447
|
-
groupLabels
|
|
18448
|
-
} = convertChartData(chartData);
|
|
17667
|
+
const { data: data_, xLabels, groupLabels } = convertChartData(chartData);
|
|
18449
17668
|
data = data_;
|
|
18450
17669
|
const container = document.getElementById(chartID) || document.body;
|
|
18451
|
-
const svg = newSvg(
|
|
18452
|
-
"#" + chartID,
|
|
18453
|
-
container.style.width,
|
|
18454
|
-
container.style.height
|
|
18455
|
-
);
|
|
17670
|
+
const svg = newSvg("#" + chartID, container.style.width, container.style.height);
|
|
18456
17671
|
const myChart = new dimple.chart(svg, data);
|
|
18457
17672
|
const xAxis = myChart.addCategoryAxis("x", "name");
|
|
18458
17673
|
xAxis.addOrderRule(xLabels);
|
|
@@ -18497,10 +17712,7 @@ const renderPptx = (options) => {
|
|
|
18497
17712
|
function setNumericBullets(elem) {
|
|
18498
17713
|
const paragraphsArray = Array.from(elem);
|
|
18499
17714
|
for (let i = 0; i < paragraphsArray.length; i++) {
|
|
18500
|
-
const buSpan = findElementClass(
|
|
18501
|
-
paragraphsArray[i],
|
|
18502
|
-
"numeric-bullet-style"
|
|
18503
|
-
);
|
|
17715
|
+
const buSpan = findElementClass(paragraphsArray[i], "numeric-bullet-style");
|
|
18504
17716
|
if (buSpan.length > 0) {
|
|
18505
17717
|
let prevBultTyp = "";
|
|
18506
17718
|
let prevBultLvl = "";
|