kakidash 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -2
- package/dist/kakidash.cjs +9 -7
- package/dist/kakidash.es.js +470 -438
- package/dist/kakidash.umd.js +9 -7
- package/package.json +1 -1
package/dist/kakidash.es.js
CHANGED
|
@@ -84,11 +84,11 @@ class gt {
|
|
|
84
84
|
imageSize;
|
|
85
85
|
icon;
|
|
86
86
|
presentation;
|
|
87
|
-
constructor(t, e, i = null, n = !1, r, s, o = !1, l, g,
|
|
87
|
+
constructor(t, e, i = null, n = !1, r, s, o = !1, l, g, w) {
|
|
88
88
|
this.id = t, this.topic = e, this.children = [], this.style = { fontSize: n ? "24px" : "16px" }, this.parentId = i, this.isRoot = n, this.image = r, this.imageSize = g, this.icon = l, this.presentation = {
|
|
89
89
|
isFolded: o,
|
|
90
90
|
layoutSide: s,
|
|
91
|
-
customWidth:
|
|
91
|
+
customWidth: w
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
addChild(t) {
|
|
@@ -206,9 +206,9 @@ class Ut {
|
|
|
206
206
|
for (; g.parentId; ) {
|
|
207
207
|
if (g.id === n.id) return !1;
|
|
208
208
|
if (!g.parentId) break;
|
|
209
|
-
const
|
|
210
|
-
if (!
|
|
211
|
-
g =
|
|
209
|
+
const w = this.mindMap.findNode(g.parentId);
|
|
210
|
+
if (!w) break;
|
|
211
|
+
g = w;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
if (n.parentId && n.parentId !== s.id) {
|
|
@@ -383,14 +383,24 @@ class Zt {
|
|
|
383
383
|
getClipboardNodes() {
|
|
384
384
|
return this.clipboard;
|
|
385
385
|
}
|
|
386
|
-
createPastedNodes(t) {
|
|
387
|
-
if (this.clipboard.length === 0) return [];
|
|
386
|
+
createPastedNodes(t, e) {
|
|
388
387
|
if (!this.mindMap.findNode(t)) return [];
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
388
|
+
let n = !1;
|
|
389
|
+
if (this.clipboard.length > 0 && e !== void 0) {
|
|
390
|
+
const s = this.clipboard.map((l) => l.topic).join(`
|
|
391
|
+
`), o = e.replace(/\r\n/g, `
|
|
392
|
+
`);
|
|
393
|
+
s === o && (n = !0);
|
|
394
|
+
} else this.clipboard.length > 0 && e === void 0 && (n = !0);
|
|
395
|
+
const r = [];
|
|
396
|
+
if (!n && e) {
|
|
397
|
+
const s = this.idGenerator.generate(), o = new gt(s, e);
|
|
398
|
+
r.push(o);
|
|
399
|
+
} else this.clipboard.length > 0 && this.clipboard.forEach((s) => {
|
|
400
|
+
const o = this.deepCloneNode(s);
|
|
401
|
+
this.regenerateIds(o), r.push(o);
|
|
402
|
+
});
|
|
403
|
+
return r;
|
|
394
404
|
}
|
|
395
405
|
deepCloneNode(t) {
|
|
396
406
|
const e = new gt(
|
|
@@ -792,7 +802,7 @@ class $t {
|
|
|
792
802
|
return i.styles?.connection?.color || "#ccc";
|
|
793
803
|
}
|
|
794
804
|
renderNodeElement(t, e, i, n, r, s, o, l) {
|
|
795
|
-
const g = t.isRoot,
|
|
805
|
+
const g = t.isRoot, w = ct.getInstance().getCurrentTheme(), u = document.createElement("div");
|
|
796
806
|
if (u.dataset.id = t.id, u.style.position = "absolute", u.style.left = `${e}px`, u.style.top = `${i}px`, t.image) {
|
|
797
807
|
const m = document.createElement("img");
|
|
798
808
|
m.src = t.image, t.imageSize ? t.imageSize.width > 150 ? (m.style.width = "150px", m.style.height = "auto") : (m.style.width = `${t.imageSize.width}px`, m.style.height = `${t.imageSize.height}px`) : (m.style.maxWidth = "150px", m.style.maxHeight = "150px"), m.style.display = "block", u.appendChild(m);
|
|
@@ -802,31 +812,31 @@ class $t {
|
|
|
802
812
|
}), u.style.padding = "5px";
|
|
803
813
|
} else {
|
|
804
814
|
if (u.style.display = "flex", u.style.alignItems = "center", u.style.justifyContent = t.isRoot ? "center" : "flex-start", t.icon) {
|
|
805
|
-
const
|
|
806
|
-
if (
|
|
815
|
+
const b = It[t.icon];
|
|
816
|
+
if (b) {
|
|
807
817
|
const _ = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
808
|
-
_.setAttribute("viewBox",
|
|
818
|
+
_.setAttribute("viewBox", b.viewBox), _.setAttribute("width", "20"), _.setAttribute("height", "20"), _.style.width = "20px", _.style.height = "20px", _.style.marginRight = "8px", _.style.flexShrink = "0", _.innerHTML = b.path, u.appendChild(_);
|
|
809
819
|
} else {
|
|
810
820
|
const _ = document.createElement("span");
|
|
811
821
|
_.textContent = t.icon, _.style.marginRight = "6px", _.style.fontSize = "1.2em", u.appendChild(_);
|
|
812
822
|
}
|
|
813
823
|
}
|
|
814
824
|
const m = document.createElement("span"), h = /(https?:\/\/[^\s]+)/g;
|
|
815
|
-
t.topic.split(h).forEach((
|
|
816
|
-
if (
|
|
825
|
+
t.topic.split(h).forEach((b) => {
|
|
826
|
+
if (b.match(h)) {
|
|
817
827
|
const _ = document.createElement("a");
|
|
818
|
-
_.href =
|
|
828
|
+
_.href = b, _.target = "_blank", _.rel = "noopener noreferrer", _.textContent = b, _.style.color = "#3498DB", _.style.textDecoration = "underline", _.style.cursor = "pointer", _.addEventListener("mousedown", (C) => C.stopPropagation()), _.addEventListener("click", (C) => C.stopPropagation()), m.appendChild(_);
|
|
819
829
|
} else
|
|
820
|
-
m.appendChild(document.createTextNode(
|
|
830
|
+
m.appendChild(document.createTextNode(b));
|
|
821
831
|
}), u.appendChild(m);
|
|
822
832
|
const f = t.presentation.customWidth ?? (this.maxWidth !== -1 ? this.maxWidth : void 0);
|
|
823
833
|
f !== void 0 ? (m.style.whiteSpace = "pre-wrap", m.style.wordWrap = "break-word", m.style.overflowWrap = "anywhere", m.style.minWidth = "0", u.style.maxWidth = `${f}px`, u.style.width = "max-content") : m.style.whiteSpace = "pre";
|
|
824
834
|
}
|
|
825
|
-
u.className = "mindmap-node", u.style.position = "absolute", u.style.touchAction = "none", u.style.padding = "8px 12px", t.image && (u.style.padding = "5px"),
|
|
835
|
+
u.className = "mindmap-node", u.style.position = "absolute", u.style.touchAction = "none", u.style.padding = "8px 12px", t.image && (u.style.padding = "5px"), w.name === "custom" ? t.isRoot ? u.style.color = "var(--mindmap-root-color, var(--vscode-editor-foreground, black))" : u.style.color = "var(--mindmap-child-color, var(--vscode-editor-foreground, black))" : t.isRoot ? u.style.color = "var(--mindmap-root-color)" : u.style.color = "var(--mindmap-child-color)";
|
|
826
836
|
const y = this.getThemeColor(t, l);
|
|
827
|
-
if (u.style.setProperty("--node-color", y),
|
|
837
|
+
if (u.style.setProperty("--node-color", y), w.name === "colorful")
|
|
828
838
|
t.isRoot ? u.style.border = "2px solid var(--vscode-editor-foreground, #333)" : u.style.border = `2px solid ${y}`;
|
|
829
|
-
else if (
|
|
839
|
+
else if (w.name === "custom")
|
|
830
840
|
if (t.isRoot) {
|
|
831
841
|
const m = "2px solid var(--vscode-editor-foreground, #333)";
|
|
832
842
|
u.style.border = `var(--mindmap-root-border, ${m})`;
|
|
@@ -834,14 +844,14 @@ class $t {
|
|
|
834
844
|
u.style.border = "var(--mindmap-child-border, 1px solid #ccc)";
|
|
835
845
|
else
|
|
836
846
|
t.isRoot ? u.style.border = "var(--mindmap-root-border)" : u.style.border = "var(--mindmap-child-border)";
|
|
837
|
-
if (u.style.borderRadius = "4px", t.isRoot && (u.style.fontSize = "1.2em", u.style.fontWeight = "bold",
|
|
847
|
+
if (u.style.borderRadius = "4px", t.isRoot && (u.style.fontSize = "1.2em", u.style.fontWeight = "bold", w.name !== "custom" && (u.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (u.style.color = t.style.color), t.style.fontSize && (u.style.fontSize = t.style.fontSize), t.style.fontWeight && (u.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (u.style.fontStyle = t.style.fontStyle), t.style.textDecoration && (u.style.textDecoration = t.style.textDecoration), t.style.background)
|
|
838
848
|
u.style.backgroundColor = t.style.background;
|
|
839
|
-
else if (
|
|
849
|
+
else if (w.name === "custom")
|
|
840
850
|
t.isRoot ? u.style.backgroundColor = "var(--mindmap-root-background, var(--vscode-editor-background, white))" : u.style.backgroundColor = "var(--mindmap-child-background, var(--vscode-editor-background, white))";
|
|
841
851
|
else if (t.isRoot)
|
|
842
852
|
u.style.backgroundColor = "var(--mindmap-root-background)";
|
|
843
853
|
else {
|
|
844
|
-
const m =
|
|
854
|
+
const m = w.name === "colorful" ? "var(--vscode-editor-background, white)" : "inherit";
|
|
845
855
|
u.style.backgroundColor = `var(--mindmap-child-background, ${m})`;
|
|
846
856
|
}
|
|
847
857
|
let c = e;
|
|
@@ -857,8 +867,8 @@ class $t {
|
|
|
857
867
|
const p = document.createElement("div");
|
|
858
868
|
p.className = "mindmap-toggle-btn", p.innerHTML = t.presentation.isFolded ? "+" : "-", p.style.position = "absolute", p.style.width = "16px", p.style.height = "16px", p.style.fontSize = "12px", p.style.lineHeight = "14px", p.style.textAlign = "center", p.style.borderRadius = "50%", p.style.border = "1px solid var(--vscode-widget-border, #999)", p.style.backgroundColor = "var(--vscode-editor-background, #fff)", p.style.color = "var(--vscode-editor-foreground, #000)", p.style.cursor = "pointer", p.style.zIndex = "11", p.style.userSelect = "none";
|
|
859
869
|
const f = 0;
|
|
860
|
-
p.style.left = `${h + f}px`, p.style.top = `${i}px`, p.style.transform = "translate(-50%, -50%)", p.addEventListener("click", (
|
|
861
|
-
|
|
870
|
+
p.style.left = `${h + f}px`, p.style.top = `${i}px`, p.style.transform = "translate(-50%, -50%)", p.addEventListener("click", (b) => {
|
|
871
|
+
b.stopPropagation(), this.options.onToggleFold?.(t.id);
|
|
862
872
|
}), this.nodeContainer.appendChild(p);
|
|
863
873
|
});
|
|
864
874
|
}
|
|
@@ -895,12 +905,12 @@ class $t {
|
|
|
895
905
|
i.style.setProperty("--node-color", o), s.name === "colorful" ? t.isRoot ? i.style.border = "2px solid var(--vscode-editor-foreground, #333)" : i.style.border = `2px solid ${o}` : s.name === "custom" ? t.isRoot ? i.style.border = "var(--mindmap-root-border, 2px solid #333)" : i.style.border = "var(--mindmap-child-border, 1px solid #ccc)" : t.isRoot ? i.style.border = "var(--mindmap-root-border)" : i.style.border = "var(--mindmap-child-border)", t.isRoot && (i.style.fontSize = "1.2em", i.style.fontWeight = "bold", s.name !== "custom" && (i.style.border = "2px solid var(--vscode-editor-foreground, #333)")), t.style.color && (i.style.color = t.style.color), t.style.fontSize && (i.style.fontSize = t.style.fontSize), t.style.fontWeight && (i.style.fontWeight = t.style.fontWeight), t.style.fontStyle && (i.style.fontStyle = t.style.fontStyle), t.style.textDecoration && (i.style.textDecoration = t.style.textDecoration), t.style.background && (i.style.backgroundColor = t.style.background), this.nodeContainer.appendChild(i);
|
|
896
906
|
const l = i.offsetWidth, g = i.offsetHeight;
|
|
897
907
|
this.nodeContainer.removeChild(i);
|
|
898
|
-
const
|
|
899
|
-
return this.measureCache.set(t.id,
|
|
908
|
+
const w = { width: l || 100, height: g || 40 };
|
|
909
|
+
return this.measureCache.set(t.id, w), w;
|
|
900
910
|
}
|
|
901
911
|
drawConnection(t, e, i, n, r = "#ccc", s = "default") {
|
|
902
|
-
const o = document.createElementNS("http://www.w3.org/2000/svg", "path"), l = t + (i - t) / 2, g = t + (i - t) / 2,
|
|
903
|
-
if (o.setAttribute("d",
|
|
912
|
+
const o = document.createElementNS("http://www.w3.org/2000/svg", "path"), l = t + (i - t) / 2, g = t + (i - t) / 2, w = `M ${t} ${e} C ${l} ${e}, ${g} ${n}, ${i} ${n}`;
|
|
913
|
+
if (o.setAttribute("d", w), s === "custom")
|
|
904
914
|
o.style.stroke = `var(--mindmap-connection-color, ${r})`;
|
|
905
915
|
else {
|
|
906
916
|
o.style.stroke = "var(--mindmap-connection-color, #ccc)";
|
|
@@ -1022,15 +1032,15 @@ class yt {
|
|
|
1022
1032
|
e.appendChild(s), e.appendChild(o), e.appendChild(l), t.appendChild(e);
|
|
1023
1033
|
const g = document.createElement("div");
|
|
1024
1034
|
g.style.display = "flex", g.style.gap = "4px", g.style.alignItems = "center", g.style.justifyContent = "space-between";
|
|
1025
|
-
const
|
|
1026
|
-
return
|
|
1035
|
+
const w = document.createElement("input");
|
|
1036
|
+
return w.type = "color", w.style.width = "24px", w.style.height = "24px", w.style.border = "1px solid #ccc", w.style.padding = "0", w.style.backgroundColor = "transparent", w.style.cursor = "pointer", w.style.appearance = "none", w.onchange = (u) => {
|
|
1027
1037
|
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u.target.value }), this.updateActivePaletteItem(u.target.value));
|
|
1028
1038
|
}, yt.PALETTE.forEach((u, y) => {
|
|
1029
1039
|
const c = document.createElement("div");
|
|
1030
1040
|
c.className = "color-swatch", c.dataset.color = u, c.textContent = (y + 1).toString(), c.style.width = "24px", c.style.height = "24px", c.style.backgroundColor = u, c.style.borderRadius = "4px", c.style.cursor = "pointer", c.style.border = "1px solid transparent", c.style.color = u === "#F1C40F" ? "black" : "white", c.style.fontSize = "12px", c.style.fontWeight = "bold", c.style.display = "flex", c.style.justifyContent = "center", c.style.alignItems = "center", c.onclick = () => {
|
|
1031
|
-
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u }),
|
|
1041
|
+
this.currentNodeId && this.onUpdate && (this.onUpdate(this.currentNodeId, { color: u }), w.value = u, this.updateActivePaletteItem(u));
|
|
1032
1042
|
}, g.appendChild(c);
|
|
1033
|
-
}), g.appendChild(
|
|
1043
|
+
}), g.appendChild(w), t.appendChild(g), t;
|
|
1034
1044
|
}
|
|
1035
1045
|
updateActivePaletteItem(t) {
|
|
1036
1046
|
this.editorEl.querySelectorAll(".color-swatch").forEach((i) => {
|
|
@@ -1401,7 +1411,9 @@ class Qt {
|
|
|
1401
1411
|
e.preventDefault(), this.commandBus.dispatch({ type: "copyNode", nodeId: i });
|
|
1402
1412
|
return;
|
|
1403
1413
|
case "paste":
|
|
1404
|
-
|
|
1414
|
+
if ((e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "v")
|
|
1415
|
+
return;
|
|
1416
|
+
e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i });
|
|
1405
1417
|
return;
|
|
1406
1418
|
case "navUp":
|
|
1407
1419
|
e.preventDefault(), this.commandBus.dispatch({
|
|
@@ -1590,6 +1602,9 @@ class ee {
|
|
|
1590
1602
|
draggedNodeId = null;
|
|
1591
1603
|
isReadOnly = !1;
|
|
1592
1604
|
ghostElement = null;
|
|
1605
|
+
isDragging = !1;
|
|
1606
|
+
startPosition = null;
|
|
1607
|
+
DRAG_THRESHOLD = 5;
|
|
1593
1608
|
cleanupFns = [];
|
|
1594
1609
|
constructor(t) {
|
|
1595
1610
|
this.commandBus = t.commandBus, this.container = t.container, this.injectDragStyles(), this.attachEvents();
|
|
@@ -1637,11 +1652,18 @@ class ee {
|
|
|
1637
1652
|
if (this.isReadOnly)
|
|
1638
1653
|
return;
|
|
1639
1654
|
const n = e.target.closest(".mindmap-node");
|
|
1640
|
-
n && n.dataset.id && (this.draggedNodeId = n.dataset.id,
|
|
1655
|
+
n && n.dataset.id && (this.draggedNodeId = n.dataset.id, this.startPosition = { x: e.clientX, y: e.clientY }, this.isDragging = !1, n.setPointerCapture(e.pointerId));
|
|
1641
1656
|
};
|
|
1642
1657
|
handlePointerMove = (t) => {
|
|
1643
1658
|
const e = t;
|
|
1644
1659
|
if (this.isReadOnly || !this.draggedNodeId) return;
|
|
1660
|
+
if (!this.isDragging && this.startPosition) {
|
|
1661
|
+
const r = e.clientX - this.startPosition.x, s = e.clientY - this.startPosition.y;
|
|
1662
|
+
if (Math.sqrt(r * r + s * s) >= this.DRAG_THRESHOLD)
|
|
1663
|
+
this.isDragging = !0, this.createGhostElement(e);
|
|
1664
|
+
else
|
|
1665
|
+
return;
|
|
1666
|
+
}
|
|
1645
1667
|
this.ghostElement && (this.ghostElement.style.left = `${e.clientX}px`, this.ghostElement.style.top = `${e.clientY}px`);
|
|
1646
1668
|
const i = document.elementFromPoint(e.clientX, e.clientY);
|
|
1647
1669
|
if (!i) return;
|
|
@@ -1660,17 +1682,17 @@ class ee {
|
|
|
1660
1682
|
n.hasPointerCapture && n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId);
|
|
1661
1683
|
}
|
|
1662
1684
|
let i = null;
|
|
1663
|
-
if (this.draggedNodeId) {
|
|
1685
|
+
if (this.draggedNodeId && this.isDragging) {
|
|
1664
1686
|
const n = document.elementFromPoint(e.clientX, e.clientY);
|
|
1665
1687
|
n && (i = n.closest(".mindmap-node"));
|
|
1666
1688
|
}
|
|
1667
1689
|
if (this.container.querySelectorAll(".mindmap-node").forEach((n) => {
|
|
1668
1690
|
n.classList.remove("drag-over-top", "drag-over-bottom", "drag-over-left", "drag-over-right");
|
|
1669
1691
|
}), this.isReadOnly) {
|
|
1670
|
-
this.draggedNodeId = null;
|
|
1692
|
+
this.draggedNodeId = null, this.isDragging = !1, this.startPosition = null;
|
|
1671
1693
|
return;
|
|
1672
1694
|
}
|
|
1673
|
-
if (i && i.dataset.id && this.draggedNodeId) {
|
|
1695
|
+
if (i && i.dataset.id && this.draggedNodeId && this.isDragging) {
|
|
1674
1696
|
const n = i.dataset.id;
|
|
1675
1697
|
if (this.draggedNodeId !== n) {
|
|
1676
1698
|
const r = this.getDropPosition(e, i);
|
|
@@ -1682,8 +1704,13 @@ class ee {
|
|
|
1682
1704
|
});
|
|
1683
1705
|
}
|
|
1684
1706
|
}
|
|
1685
|
-
this.draggedNodeId = null;
|
|
1707
|
+
this.draggedNodeId = null, this.isDragging = !1, this.startPosition = null;
|
|
1686
1708
|
};
|
|
1709
|
+
createGhostElement(t) {
|
|
1710
|
+
if (!this.draggedNodeId) return;
|
|
1711
|
+
const e = this.container.querySelector(`[data-id="${this.draggedNodeId}"]`);
|
|
1712
|
+
e && (this.ghostElement = e.cloneNode(!0), this.ghostElement.classList.add("kakidash-drag-ghost"), this.ghostElement.style.position = "fixed", this.ghostElement.style.pointerEvents = "none", this.ghostElement.style.opacity = "0.7", this.ghostElement.style.zIndex = "9999", this.ghostElement.style.margin = "0", this.ghostElement.style.left = `${t.clientX}px`, this.ghostElement.style.top = `${t.clientY}px`, this.ghostElement.style.transform = "translate(-50%, -50%)", document.body.appendChild(this.ghostElement));
|
|
1713
|
+
}
|
|
1687
1714
|
getDropPosition(t, e) {
|
|
1688
1715
|
const i = e.getBoundingClientRect(), n = t.clientX - i.left, r = t.clientY - i.top, s = i.width, o = i.height;
|
|
1689
1716
|
return r < o * 0.25 ? "top" : r > o * 0.75 ? "bottom" : n < s * 0.25 ? "left" : (n > s * 0.75, "right");
|
|
@@ -1704,8 +1731,8 @@ class ie {
|
|
|
1704
1731
|
const i = t.textContent || "", n = this.createEditTextarea(t, i);
|
|
1705
1732
|
let r = this.maxWidth;
|
|
1706
1733
|
if (t.style.maxWidth) {
|
|
1707
|
-
const
|
|
1708
|
-
isNaN(
|
|
1734
|
+
const w = parseInt(t.style.maxWidth, 10);
|
|
1735
|
+
isNaN(w) || (r = w);
|
|
1709
1736
|
}
|
|
1710
1737
|
this.applyTextareaStyles(n, t, r);
|
|
1711
1738
|
const s = t.style.outline, o = t.style.boxShadow;
|
|
@@ -1872,26 +1899,31 @@ class ne {
|
|
|
1872
1899
|
const n = e.clipboardData;
|
|
1873
1900
|
if (!n) return;
|
|
1874
1901
|
const r = n.items;
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
u.
|
|
1902
|
+
let s = !1;
|
|
1903
|
+
for (const o of Array.from(r))
|
|
1904
|
+
if (o.type.startsWith("image/")) {
|
|
1905
|
+
s = !0, e.preventDefault();
|
|
1906
|
+
const l = o.getAsFile();
|
|
1907
|
+
if (l) {
|
|
1908
|
+
const g = new FileReader();
|
|
1909
|
+
g.onload = (w) => {
|
|
1910
|
+
const u = w.target?.result, y = new Image();
|
|
1911
|
+
y.onload = () => {
|
|
1884
1912
|
this.commandBus.dispatch({
|
|
1885
1913
|
type: "pasteImage",
|
|
1886
1914
|
parentId: i,
|
|
1887
|
-
imageData:
|
|
1888
|
-
width:
|
|
1889
|
-
height:
|
|
1915
|
+
imageData: u,
|
|
1916
|
+
width: y.width,
|
|
1917
|
+
height: y.height
|
|
1890
1918
|
});
|
|
1891
|
-
},
|
|
1892
|
-
},
|
|
1919
|
+
}, y.src = u;
|
|
1920
|
+
}, g.readAsDataURL(l);
|
|
1893
1921
|
}
|
|
1894
1922
|
}
|
|
1923
|
+
if (!s) {
|
|
1924
|
+
const o = n.getData("text/plain");
|
|
1925
|
+
o ? (e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i, text: o })) : (e.preventDefault(), this.commandBus.dispatch({ type: "pasteNode", parentId: i }));
|
|
1926
|
+
}
|
|
1895
1927
|
}), this.commandBus.on(
|
|
1896
1928
|
"editNode",
|
|
1897
1929
|
(e) => {
|
|
@@ -1962,17 +1994,17 @@ class se {
|
|
|
1962
1994
|
}
|
|
1963
1995
|
calculateChildrenStack(t, e, i, n, r, s, o, l) {
|
|
1964
1996
|
const g = e.reduce((c, m) => c + this.getNodeHeight(m), 0);
|
|
1965
|
-
let
|
|
1997
|
+
let w = n - g / 2;
|
|
1966
1998
|
const u = 80;
|
|
1967
1999
|
let y = 0;
|
|
1968
2000
|
t.isRoot ? y = s === "right" ? i + o / 2 : i - o / 2 : s === "right" ? y = i + o : y = i - o, e.forEach((c) => {
|
|
1969
|
-
const m = this.getNodeHeight(c), h =
|
|
2001
|
+
const m = this.getNodeHeight(c), h = w + m / 2, p = s === "right" ? y + u : y - u, { width: f, height: b } = this.measureNode(c);
|
|
1970
2002
|
if (l.nodes.push({
|
|
1971
2003
|
nodeId: c.id,
|
|
1972
2004
|
x: p,
|
|
1973
2005
|
y: h,
|
|
1974
2006
|
width: f,
|
|
1975
|
-
height:
|
|
2007
|
+
height: b,
|
|
1976
2008
|
direction: s,
|
|
1977
2009
|
isRoot: !1
|
|
1978
2010
|
}), l.connections.push({
|
|
@@ -2004,7 +2036,7 @@ class se {
|
|
|
2004
2036
|
l
|
|
2005
2037
|
);
|
|
2006
2038
|
}
|
|
2007
|
-
|
|
2039
|
+
w += m;
|
|
2008
2040
|
});
|
|
2009
2041
|
}
|
|
2010
2042
|
getChildrenHeight(t) {
|
|
@@ -2282,8 +2314,8 @@ class ae {
|
|
|
2282
2314
|
f = i.getHelpIcon();
|
|
2283
2315
|
break;
|
|
2284
2316
|
}
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2317
|
+
const b = document.createElement("div");
|
|
2318
|
+
b.style.width = "24px", b.style.height = "24px", b.style.display = "flex", b.style.alignItems = "center", b.style.justifyContent = "center", b.style.color = "#555", b.innerHTML = f, p.appendChild(b);
|
|
2287
2319
|
const _ = document.createElement("td");
|
|
2288
2320
|
_.textContent = m.desc, _.style.padding = "8px", _.style.textAlign = "left", _.style.color = "#333", h.appendChild(p), h.appendChild(_), y.appendChild(h);
|
|
2289
2321
|
}), r.appendChild(y);
|
|
@@ -2361,9 +2393,9 @@ class ae {
|
|
|
2361
2393
|
}
|
|
2362
2394
|
].forEach((u) => {
|
|
2363
2395
|
const y = [];
|
|
2364
|
-
if (u.actions.forEach((
|
|
2396
|
+
if (u.actions.forEach((b) => {
|
|
2365
2397
|
let _ = "";
|
|
2366
|
-
const C =
|
|
2398
|
+
const C = b;
|
|
2367
2399
|
if (C.key)
|
|
2368
2400
|
_ = C.key;
|
|
2369
2401
|
else if (C.action && t[C.action]) {
|
|
@@ -2390,13 +2422,13 @@ class ae {
|
|
|
2390
2422
|
const p = document.createElement("th");
|
|
2391
2423
|
p.textContent = e === "ja" ? "キー" : "Key", p.style.textAlign = "center", p.style.padding = "8px 0", p.style.width = "40%", p.style.color = "#666";
|
|
2392
2424
|
const f = document.createElement("th");
|
|
2393
|
-
f.textContent = e === "ja" ? "説明" : "Description", f.style.textAlign = "center", f.style.padding = "8px 0", f.style.color = "#666", h.appendChild(p), h.appendChild(f), m.appendChild(h), y.forEach((
|
|
2425
|
+
f.textContent = e === "ja" ? "説明" : "Description", f.style.textAlign = "center", f.style.padding = "8px 0", f.style.color = "#666", h.appendChild(p), h.appendChild(f), m.appendChild(h), y.forEach((b) => {
|
|
2394
2426
|
const _ = document.createElement("tr");
|
|
2395
2427
|
_.style.borderBottom = "1px solid #f9f9f9";
|
|
2396
2428
|
const C = document.createElement("td");
|
|
2397
|
-
C.textContent =
|
|
2429
|
+
C.textContent = b.key, C.style.padding = "6px 0", C.style.fontWeight = "bold", C.style.color = "#555", C.style.minWidth = "180px", C.style.textAlign = "center";
|
|
2398
2430
|
const S = document.createElement("td");
|
|
2399
|
-
S.textContent =
|
|
2431
|
+
S.textContent = b.desc, S.style.padding = "6px 0", S.style.textAlign = "left", S.style.color = "#333", _.appendChild(C), _.appendChild(S), m.appendChild(_);
|
|
2400
2432
|
}), r.appendChild(m);
|
|
2401
2433
|
}), n.appendChild(r), document.body.appendChild(n), requestAnimationFrame(() => {
|
|
2402
2434
|
n.style.opacity = "1";
|
|
@@ -2404,11 +2436,11 @@ class ae {
|
|
|
2404
2436
|
const g = () => {
|
|
2405
2437
|
n.style.opacity = "0", setTimeout(() => {
|
|
2406
2438
|
document.body.contains(n) && document.body.removeChild(n);
|
|
2407
|
-
}, 200), document.removeEventListener("keydown",
|
|
2408
|
-
},
|
|
2439
|
+
}, 200), document.removeEventListener("keydown", w);
|
|
2440
|
+
}, w = (u) => {
|
|
2409
2441
|
u.key === "Escape" && g();
|
|
2410
2442
|
};
|
|
2411
|
-
document.addEventListener("keydown",
|
|
2443
|
+
document.addEventListener("keydown", w), n.addEventListener("click", (u) => {
|
|
2412
2444
|
u.target === n && g();
|
|
2413
2445
|
});
|
|
2414
2446
|
}
|
|
@@ -2458,7 +2490,7 @@ class de {
|
|
|
2458
2490
|
}
|
|
2459
2491
|
subscribeToCommands() {
|
|
2460
2492
|
const t = this.commandBus;
|
|
2461
|
-
t.on("addNode", (e) => this.addChildNode(e.parentId)), t.on("addSibling", (e) => this.addSiblingNode(e.nodeId, e.position)), t.on("deleteNode", (e) => this.removeNode(e.nodeId)), t.on("insertParent", (e) => this.insertParentNode(e.nodeId)), t.on("dropNode", (e) => this.moveNode(e.draggedId, e.targetId, e.position)), t.on("updateNode", (e) => this.updateNodeTopic(e.nodeId, e.topic)), t.on("navigate", (e) => this.navigateNode(e.nodeId, e.direction, e.extendSelection)), t.on("pan", (e) => this.panBoard(e.dx, e.dy)), t.on("zoom", (e) => this.zoomBoard(e.delta, e.x, e.y)), t.on("zoomReset", () => this.resetZoom()), t.on("copyNode", (e) => this.copyNode(e.nodeId)), t.on("pasteNode", (e) => this.pasteNode(e.parentId)), t.on("cutNode", (e) => this.cutNode(e.nodeId)), t.on("pasteImage", (e) => this.pasteImage(e.parentId, e.imageData, e.width, e.height)), t.on("undo", () => this.undo()), t.on("redo", () => this.redo()), t.on("styleAction", (e) => this.onStyleAction(e.nodeId, e.action)), t.on("toggleFold", (e) => this.toggleFold(e.nodeId)), t.on("toggleCommandPalette", () => this.toggleCommandPalette()), t.on("updateNodeWidth", (e) => this.updateNodeWidth(e.nodeId, e.increment)), t.on("setTheme", (e) => this.setTheme(e.theme)), t.on("setLayoutMode", (e) => this.setLayoutMode(e.mode)), t.on("editEnd", () => this.onEditEnd()), t.on("selectNode", (e) => {
|
|
2493
|
+
t.on("addNode", (e) => this.addChildNode(e.parentId)), t.on("addSibling", (e) => this.addSiblingNode(e.nodeId, e.position)), t.on("deleteNode", (e) => this.removeNode(e.nodeId)), t.on("insertParent", (e) => this.insertParentNode(e.nodeId)), t.on("dropNode", (e) => this.moveNode(e.draggedId, e.targetId, e.position)), t.on("updateNode", (e) => this.updateNodeTopic(e.nodeId, e.topic)), t.on("navigate", (e) => this.navigateNode(e.nodeId, e.direction, e.extendSelection)), t.on("pan", (e) => this.panBoard(e.dx, e.dy)), t.on("zoom", (e) => this.zoomBoard(e.delta, e.x, e.y)), t.on("zoomReset", () => this.resetZoom()), t.on("copyNode", (e) => this.copyNode(e.nodeId)), t.on("pasteNode", (e) => this.pasteNode(e.parentId, e.text)), t.on("cutNode", (e) => this.cutNode(e.nodeId)), t.on("pasteImage", (e) => this.pasteImage(e.parentId, e.imageData, e.width, e.height)), t.on("undo", () => this.undo()), t.on("redo", () => this.redo()), t.on("styleAction", (e) => this.onStyleAction(e.nodeId, e.action)), t.on("toggleFold", (e) => this.toggleFold(e.nodeId)), t.on("toggleCommandPalette", () => this.toggleCommandPalette()), t.on("updateNodeWidth", (e) => this.updateNodeWidth(e.nodeId, e.increment)), t.on("setTheme", (e) => this.setTheme(e.theme)), t.on("setLayoutMode", (e) => this.setLayoutMode(e.mode)), t.on("editEnd", () => this.onEditEnd()), t.on("selectNode", (e) => {
|
|
2462
2494
|
e.extendSelection && e.nodeId ? this.selectRangeTo(e.nodeId) : this.selectNode(e.nodeId);
|
|
2463
2495
|
});
|
|
2464
2496
|
}
|
|
@@ -2719,7 +2751,7 @@ class de {
|
|
|
2719
2751
|
if (s) {
|
|
2720
2752
|
const o = s.children.findIndex((g) => g.id === i.id), l = s.children.findIndex((g) => g.id === n.id);
|
|
2721
2753
|
if (o !== -1 && l !== -1) {
|
|
2722
|
-
const g = Math.min(o, l),
|
|
2754
|
+
const g = Math.min(o, l), w = Math.max(o, l), u = s.children.slice(g, w + 1).map((y) => y.id);
|
|
2723
2755
|
this.selectNodes(u), this.selectedNodeId = e, this.updateSelectionState();
|
|
2724
2756
|
return;
|
|
2725
2757
|
}
|
|
@@ -2732,10 +2764,10 @@ class de {
|
|
|
2732
2764
|
const e = this.getIdsToActOn(t);
|
|
2733
2765
|
e.length > 1 ? this.clipboardService.copyNodes(e) : this.clipboardService.copyNodes([t]);
|
|
2734
2766
|
}
|
|
2735
|
-
pasteNode(t) {
|
|
2736
|
-
this.saveState(), this.eventBus.emit("command", { name: "pasteNode", args: { parentId: t } });
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2767
|
+
pasteNode(t, e) {
|
|
2768
|
+
this.saveState(), this.eventBus.emit("command", { name: "pasteNode", args: { parentId: t, text: e } });
|
|
2769
|
+
const i = this.clipboardService.createPastedNodes(t, e), n = i.length > 0 ? i[0] : null;
|
|
2770
|
+
i.length > 0 && this.service.addExistingNodes(t, i), n && (this.render(), this.selectNode(n.id), this.eventBus.emit("node:add", { id: n.id, topic: n.topic }), this.eventBus.emit("model:change", void 0), setTimeout(() => this.ensureNodeVisible(n.id, !0), 0));
|
|
2739
2771
|
}
|
|
2740
2772
|
cutNode(t) {
|
|
2741
2773
|
this.saveState(), this.eventBus.emit("command", { name: "cutNode", args: { nodeId: t } });
|
|
@@ -2768,7 +2800,7 @@ class de {
|
|
|
2768
2800
|
e.index >= 0 && e.index < yt.PALETTE.length && (r = { color: yt.PALETTE[e.index] });
|
|
2769
2801
|
else if (e.type === "increaseSize" || e.type === "decreaseSize") {
|
|
2770
2802
|
const s = yt.FONT_SIZES, o = n.fontSize || "";
|
|
2771
|
-
let l = s.findIndex((
|
|
2803
|
+
let l = s.findIndex((w) => w.value === o);
|
|
2772
2804
|
l === -1 && (l = 0);
|
|
2773
2805
|
const g = e.type === "increaseSize" ? Math.min(s.length - 1, l + 1) : Math.max(0, l - 1);
|
|
2774
2806
|
g !== l && (r = { fontSize: s[g].value });
|
|
@@ -2843,11 +2875,11 @@ class le {
|
|
|
2843
2875
|
}
|
|
2844
2876
|
/** Zoom centered on a specific screen coordinate */
|
|
2845
2877
|
zoom(t, e, i) {
|
|
2846
|
-
const o = this.renderer.container.getBoundingClientRect(), l = e - o.left, g = i - o.top,
|
|
2878
|
+
const o = this.renderer.container.getBoundingClientRect(), l = e - o.left, g = i - o.top, w = Math.min(
|
|
2847
2879
|
Math.max(this.scale * (1 - t * 1e-3), 0.1),
|
|
2848
2880
|
5
|
|
2849
|
-
), u = l - (l - this.panX) * (
|
|
2850
|
-
this.panX = u, this.panY = y, this.targetPanX = u, this.targetPanY = y, this.scale =
|
|
2881
|
+
), u = l - (l - this.panX) * (w / this.scale), y = g - (g - this.panY) * (w / this.scale);
|
|
2882
|
+
this.panX = u, this.panY = y, this.targetPanX = u, this.targetPanY = y, this.scale = w, this.renderer.updateTransform(this.panX, this.panY, this.scale);
|
|
2851
2883
|
}
|
|
2852
2884
|
/** Reset zoom to 1.0 scale */
|
|
2853
2885
|
resetZoom() {
|
|
@@ -2869,12 +2901,12 @@ class le {
|
|
|
2869
2901
|
if (!n) return;
|
|
2870
2902
|
const r = n.getBoundingClientRect(), s = this.renderer.container.getBoundingClientRect(), o = 50;
|
|
2871
2903
|
let l = 0, g = 0;
|
|
2872
|
-
const
|
|
2873
|
-
if (e && (
|
|
2904
|
+
const w = r.left < s.left + o, u = r.right > s.right - o, y = r.top < s.top + o, c = r.bottom > s.bottom - o;
|
|
2905
|
+
if (e && (w || u || y || c)) {
|
|
2874
2906
|
const m = r.left + r.width / 2, h = r.top + r.height / 2, p = s.left + s.width / 2, f = s.top + s.height / 2;
|
|
2875
2907
|
l = p - m, g = f - h;
|
|
2876
2908
|
} else
|
|
2877
|
-
|
|
2909
|
+
w ? l = s.left + o - r.left : u && (l = s.right - o - r.right), y ? g = s.top + o - r.top : c && (g = s.bottom - o - r.bottom);
|
|
2878
2910
|
(l !== 0 || g !== 0) && (i ? (this.panX += l, this.panY += g, this.targetPanX = this.panX, this.targetPanY = this.panY, this.renderer.updateTransform(this.panX, this.panY, this.scale)) : this.pan(l, g));
|
|
2879
2911
|
}
|
|
2880
2912
|
/** Start the smooth animation loop for pan transitions */
|
|
@@ -2990,7 +3022,7 @@ class ce {
|
|
|
2990
3022
|
}
|
|
2991
3023
|
}
|
|
2992
3024
|
}
|
|
2993
|
-
class
|
|
3025
|
+
class At {
|
|
2994
3026
|
/**
|
|
2995
3027
|
* Generates an SVG string representation of the mind map content within the given container.
|
|
2996
3028
|
* @param container The element containing the mind map layers.
|
|
@@ -3019,12 +3051,12 @@ class Tt {
|
|
|
3019
3051
|
if (!i || !r)
|
|
3020
3052
|
throw new Error("Could not find mind map content layers.");
|
|
3021
3053
|
let s = 1 / 0, o = 1 / 0, l = -1 / 0, g = -1 / 0;
|
|
3022
|
-
const
|
|
3023
|
-
if (
|
|
3054
|
+
const w = r.children;
|
|
3055
|
+
if (w.length === 0)
|
|
3024
3056
|
s = 0, o = 0, l = 800, g = 600;
|
|
3025
3057
|
else
|
|
3026
|
-
for (let X = 0; X <
|
|
3027
|
-
const k =
|
|
3058
|
+
for (let X = 0; X < w.length; X++) {
|
|
3059
|
+
const k = w[X], D = parseFloat(k.style.left || "0"), d = parseFloat(k.style.top || "0"), R = k.offsetWidth, J = k.offsetHeight, W = d - J / 2, tt = d + J / 2;
|
|
3028
3060
|
D < s && (s = D), W < o && (o = W), D + R > l && (l = D + R), tt > g && (g = tt);
|
|
3029
3061
|
}
|
|
3030
3062
|
const u = 50;
|
|
@@ -3046,7 +3078,7 @@ class Tt {
|
|
|
3046
3078
|
const k = m.getPropertyValue(X).trim();
|
|
3047
3079
|
k && p.push(`${X}: ${k};`);
|
|
3048
3080
|
});
|
|
3049
|
-
const f = p.join(" "),
|
|
3081
|
+
const f = p.join(" "), b = m.fontFamily, _ = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3050
3082
|
_.setAttribute("xmlns", "http://www.w3.org/2000/svg"), _.setAttribute("width", y.toString()), _.setAttribute("height", c.toString()), _.setAttribute("viewBox", `0 0 ${y} ${c}`), _.style.cssText = f;
|
|
3051
3083
|
const C = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
3052
3084
|
C.setAttribute("x", "0"), C.setAttribute("y", "0"), C.setAttribute("width", y.toString()), C.setAttribute("height", c.toString()), C.setAttribute("fill", m.backgroundColor || "#ffffff"), _.appendChild(C);
|
|
@@ -3061,19 +3093,19 @@ class Tt {
|
|
|
3061
3093
|
const B = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
3062
3094
|
B.setAttribute("x", "0"), B.setAttribute("y", "0"), B.setAttribute("width", (l + u).toString()), B.setAttribute("height", (g + u).toString()), B.style.overflow = "visible";
|
|
3063
3095
|
const O = document.createElement("div");
|
|
3064
|
-
O.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), O.style.cssText = `position: relative; width: 100%; height: 100%; font-family: ${
|
|
3065
|
-
const
|
|
3066
|
-
for (let X = 0; X <
|
|
3067
|
-
const k =
|
|
3096
|
+
O.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), O.style.cssText = `position: relative; width: 100%; height: 100%; font-family: ${b}; ${f}`;
|
|
3097
|
+
const T = r.children;
|
|
3098
|
+
for (let X = 0; X < T.length; X++) {
|
|
3099
|
+
const k = T[X].cloneNode(!0);
|
|
3068
3100
|
O.appendChild(k);
|
|
3069
3101
|
}
|
|
3070
3102
|
return B.appendChild(O), S.appendChild(B), _.appendChild(S), new XMLSerializer().serializeToString(_);
|
|
3071
3103
|
}
|
|
3072
3104
|
}
|
|
3073
|
-
class
|
|
3105
|
+
class Tt {
|
|
3074
3106
|
async exportToSvg(t, e) {
|
|
3075
3107
|
try {
|
|
3076
|
-
const n = new
|
|
3108
|
+
const n = new At().generate(t), r = new Blob([n], { type: "image/svg+xml;charset=utf-8" });
|
|
3077
3109
|
await this.saveFile(
|
|
3078
3110
|
r,
|
|
3079
3111
|
"mindmap.svg",
|
|
@@ -3086,16 +3118,16 @@ class At {
|
|
|
3086
3118
|
}
|
|
3087
3119
|
async exportToPng(t, e) {
|
|
3088
3120
|
try {
|
|
3089
|
-
const n = new
|
|
3121
|
+
const n = new At().generate(t), s = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`;
|
|
3090
3122
|
await new Promise((o, l) => {
|
|
3091
3123
|
const g = new Image();
|
|
3092
3124
|
g.onload = () => {
|
|
3093
3125
|
try {
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3096
|
-
const u =
|
|
3126
|
+
const w = document.createElement("canvas");
|
|
3127
|
+
w.width = g.width, w.height = g.height;
|
|
3128
|
+
const u = w.getContext("2d");
|
|
3097
3129
|
if (!u) throw new Error("Could not get canvas context");
|
|
3098
|
-
u.drawImage(g, 0, 0),
|
|
3130
|
+
u.drawImage(g, 0, 0), w.toBlob((y) => {
|
|
3099
3131
|
y ? this.saveFile(
|
|
3100
3132
|
y,
|
|
3101
3133
|
"mindmap.png",
|
|
@@ -3103,8 +3135,8 @@ class At {
|
|
|
3103
3135
|
e
|
|
3104
3136
|
).then(() => o()).catch((c) => l(c instanceof Error ? c : new Error(String(c)))) : l(new Error("Failed to generate PNG blob."));
|
|
3105
3137
|
}, "image/png");
|
|
3106
|
-
} catch (
|
|
3107
|
-
l(
|
|
3138
|
+
} catch (w) {
|
|
3139
|
+
l(w instanceof Error ? w : new Error(String(w)));
|
|
3108
3140
|
}
|
|
3109
3141
|
}, g.onerror = () => {
|
|
3110
3142
|
l(new Error("Failed to load SVG for PNG conversion"));
|
|
@@ -3201,11 +3233,11 @@ function fe() {
|
|
|
3201
3233
|
Q.exports = e();
|
|
3202
3234
|
})(function() {
|
|
3203
3235
|
return (function e(i, n, r) {
|
|
3204
|
-
function s(g,
|
|
3236
|
+
function s(g, w) {
|
|
3205
3237
|
if (!n[g]) {
|
|
3206
3238
|
if (!i[g]) {
|
|
3207
3239
|
var u = typeof kt == "function" && kt;
|
|
3208
|
-
if (!
|
|
3240
|
+
if (!w && u) return u(g, !0);
|
|
3209
3241
|
if (o) return o(g, !0);
|
|
3210
3242
|
var y = new Error("Cannot find module '" + g + "'");
|
|
3211
3243
|
throw y.code = "MODULE_NOT_FOUND", y;
|
|
@@ -3223,30 +3255,30 @@ function fe() {
|
|
|
3223
3255
|
})({ 1: [function(e, i, n) {
|
|
3224
3256
|
var r = e("./utils"), s = e("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
3225
3257
|
n.encode = function(l) {
|
|
3226
|
-
for (var g,
|
|
3258
|
+
for (var g, w, u, y, c, m, h, p = [], f = 0, b = l.length, _ = b, C = r.getTypeOf(l) !== "string"; f < l.length; ) _ = b - f, u = C ? (g = l[f++], w = f < b ? l[f++] : 0, f < b ? l[f++] : 0) : (g = l.charCodeAt(f++), w = f < b ? l.charCodeAt(f++) : 0, f < b ? l.charCodeAt(f++) : 0), y = g >> 2, c = (3 & g) << 4 | w >> 4, m = 1 < _ ? (15 & w) << 2 | u >> 6 : 64, h = 2 < _ ? 63 & u : 64, p.push(o.charAt(y) + o.charAt(c) + o.charAt(m) + o.charAt(h));
|
|
3227
3259
|
return p.join("");
|
|
3228
3260
|
}, n.decode = function(l) {
|
|
3229
|
-
var g,
|
|
3261
|
+
var g, w, u, y, c, m, h = 0, p = 0, f = "data:";
|
|
3230
3262
|
if (l.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
3231
|
-
var
|
|
3263
|
+
var b, _ = 3 * (l = l.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
3232
3264
|
if (l.charAt(l.length - 1) === o.charAt(64) && _--, l.charAt(l.length - 2) === o.charAt(64) && _--, _ % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
3233
|
-
for (
|
|
3234
|
-
return
|
|
3265
|
+
for (b = s.uint8array ? new Uint8Array(0 | _) : new Array(0 | _); h < l.length; ) g = o.indexOf(l.charAt(h++)) << 2 | (y = o.indexOf(l.charAt(h++))) >> 4, w = (15 & y) << 4 | (c = o.indexOf(l.charAt(h++))) >> 2, u = (3 & c) << 6 | (m = o.indexOf(l.charAt(h++))), b[p++] = g, c !== 64 && (b[p++] = w), m !== 64 && (b[p++] = u);
|
|
3266
|
+
return b;
|
|
3235
3267
|
};
|
|
3236
3268
|
}, { "./support": 30, "./utils": 32 }], 2: [function(e, i, n) {
|
|
3237
3269
|
var r = e("./external"), s = e("./stream/DataWorker"), o = e("./stream/Crc32Probe"), l = e("./stream/DataLengthProbe");
|
|
3238
|
-
function g(
|
|
3239
|
-
this.compressedSize =
|
|
3270
|
+
function g(w, u, y, c, m) {
|
|
3271
|
+
this.compressedSize = w, this.uncompressedSize = u, this.crc32 = y, this.compression = c, this.compressedContent = m;
|
|
3240
3272
|
}
|
|
3241
3273
|
g.prototype = { getContentWorker: function() {
|
|
3242
|
-
var
|
|
3243
|
-
return
|
|
3274
|
+
var w = new s(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")), u = this;
|
|
3275
|
+
return w.on("end", function() {
|
|
3244
3276
|
if (this.streamInfo.data_length !== u.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
3245
|
-
}),
|
|
3277
|
+
}), w;
|
|
3246
3278
|
}, getCompressedWorker: function() {
|
|
3247
3279
|
return new s(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
3248
|
-
} }, g.createWorkerFrom = function(
|
|
3249
|
-
return
|
|
3280
|
+
} }, g.createWorkerFrom = function(w, u, y) {
|
|
3281
|
+
return w.pipe(new o()).pipe(new l("uncompressedSize")).pipe(u.compressWorker(y)).pipe(new l("compressedSize")).withStreamInfo("compression", u);
|
|
3250
3282
|
}, i.exports = g;
|
|
3251
3283
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e, i, n) {
|
|
3252
3284
|
var r = e("./stream/GenericWorker");
|
|
@@ -3259,21 +3291,21 @@ function fe() {
|
|
|
3259
3291
|
var r = e("./utils"), s = (function() {
|
|
3260
3292
|
for (var o, l = [], g = 0; g < 256; g++) {
|
|
3261
3293
|
o = g;
|
|
3262
|
-
for (var
|
|
3294
|
+
for (var w = 0; w < 8; w++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
|
|
3263
3295
|
l[g] = o;
|
|
3264
3296
|
}
|
|
3265
3297
|
return l;
|
|
3266
3298
|
})();
|
|
3267
3299
|
i.exports = function(o, l) {
|
|
3268
|
-
return o !== void 0 && o.length ? r.getTypeOf(o) !== "string" ? (function(g,
|
|
3300
|
+
return o !== void 0 && o.length ? r.getTypeOf(o) !== "string" ? (function(g, w, u, y) {
|
|
3269
3301
|
var c = s, m = y + u;
|
|
3270
3302
|
g ^= -1;
|
|
3271
|
-
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^
|
|
3303
|
+
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^ w[h])];
|
|
3272
3304
|
return -1 ^ g;
|
|
3273
|
-
})(0 | l, o, o.length, 0) : (function(g,
|
|
3305
|
+
})(0 | l, o, o.length, 0) : (function(g, w, u, y) {
|
|
3274
3306
|
var c = s, m = y + u;
|
|
3275
3307
|
g ^= -1;
|
|
3276
|
-
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^
|
|
3308
|
+
for (var h = y; h < m; h++) g = g >>> 8 ^ c[255 & (g ^ w.charCodeAt(h))];
|
|
3277
3309
|
return -1 ^ g;
|
|
3278
3310
|
})(0 | l, o, o.length, 0) : 0;
|
|
3279
3311
|
};
|
|
@@ -3284,25 +3316,25 @@ function fe() {
|
|
|
3284
3316
|
r = typeof Promise < "u" ? Promise : e("lie"), i.exports = { Promise: r };
|
|
3285
3317
|
}, { lie: 37 }], 7: [function(e, i, n) {
|
|
3286
3318
|
var r = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", s = e("pako"), o = e("./utils"), l = e("./stream/GenericWorker"), g = r ? "uint8array" : "array";
|
|
3287
|
-
function
|
|
3319
|
+
function w(u, y) {
|
|
3288
3320
|
l.call(this, "FlateWorker/" + u), this._pako = null, this._pakoAction = u, this._pakoOptions = y, this.meta = {};
|
|
3289
3321
|
}
|
|
3290
|
-
n.magic = "\b\0", o.inherits(
|
|
3322
|
+
n.magic = "\b\0", o.inherits(w, l), w.prototype.processChunk = function(u) {
|
|
3291
3323
|
this.meta = u.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(g, u.data), !1);
|
|
3292
|
-
},
|
|
3324
|
+
}, w.prototype.flush = function() {
|
|
3293
3325
|
l.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
3294
|
-
},
|
|
3326
|
+
}, w.prototype.cleanUp = function() {
|
|
3295
3327
|
l.prototype.cleanUp.call(this), this._pako = null;
|
|
3296
|
-
},
|
|
3328
|
+
}, w.prototype._createPako = function() {
|
|
3297
3329
|
this._pako = new s[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
3298
3330
|
var u = this;
|
|
3299
3331
|
this._pako.onData = function(y) {
|
|
3300
3332
|
u.push({ data: y, meta: u.meta });
|
|
3301
3333
|
};
|
|
3302
3334
|
}, n.compressWorker = function(u) {
|
|
3303
|
-
return new
|
|
3335
|
+
return new w("Deflate", u);
|
|
3304
3336
|
}, n.uncompressWorker = function() {
|
|
3305
|
-
return new
|
|
3337
|
+
return new w("Inflate", {});
|
|
3306
3338
|
};
|
|
3307
3339
|
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e, i, n) {
|
|
3308
3340
|
function r(c, m) {
|
|
@@ -3310,8 +3342,8 @@ function fe() {
|
|
|
3310
3342
|
for (h = 0; h < m; h++) p += String.fromCharCode(255 & c), c >>>= 8;
|
|
3311
3343
|
return p;
|
|
3312
3344
|
}
|
|
3313
|
-
function s(c, m, h, p, f,
|
|
3314
|
-
var _, C, S = c.file, z = c.compression, B =
|
|
3345
|
+
function s(c, m, h, p, f, b) {
|
|
3346
|
+
var _, C, S = c.file, z = c.compression, B = b !== g.utf8encode, O = o.transformTo("string", b(S.name)), T = o.transformTo("string", g.utf8encode(S.name)), H = S.comment, X = o.transformTo("string", b(H)), k = o.transformTo("string", g.utf8encode(H)), D = T.length !== S.name.length, d = k.length !== H.length, R = "", J = "", W = "", tt = S.dir, U = S.date, q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
3315
3347
|
m && !h || (q.crc32 = c.crc32, q.compressedSize = c.compressedSize, q.uncompressedSize = c.uncompressedSize);
|
|
3316
3348
|
var M = 0;
|
|
3317
3349
|
m && (M |= 8), B || !D && !d || (M |= 2048);
|
|
@@ -3321,12 +3353,12 @@ function fe() {
|
|
|
3321
3353
|
return K || (lt = st ? 16893 : 33204), (65535 & lt) << 16;
|
|
3322
3354
|
})(S.unixPermissions, tt)) : (V = 20, I |= (function(K) {
|
|
3323
3355
|
return 63 & (K || 0);
|
|
3324
|
-
})(S.dosPermissions)), _ = U.getUTCHours(), _ <<= 6, _ |= U.getUTCMinutes(), _ <<= 5, _ |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (J = r(1, 1) + r(
|
|
3356
|
+
})(S.dosPermissions)), _ = U.getUTCHours(), _ <<= 6, _ |= U.getUTCMinutes(), _ <<= 5, _ |= U.getUTCSeconds() / 2, C = U.getUTCFullYear() - 1980, C <<= 4, C |= U.getUTCMonth() + 1, C <<= 5, C |= U.getUTCDate(), D && (J = r(1, 1) + r(w(O), 4) + T, R += "up" + r(J.length, 2) + J), d && (W = r(1, 1) + r(w(X), 4) + k, R += "uc" + r(W.length, 2) + W);
|
|
3325
3357
|
var Y = "";
|
|
3326
3358
|
return Y += `
|
|
3327
3359
|
\0`, Y += r(M, 2), Y += z.magic, Y += r(_, 2), Y += r(C, 2), Y += r(q.crc32, 4), Y += r(q.compressedSize, 4), Y += r(q.uncompressedSize, 4), Y += r(O.length, 2), Y += r(R.length, 2), { fileRecord: u.LOCAL_FILE_HEADER + Y + O + R, dirRecord: u.CENTRAL_FILE_HEADER + r(V, 2) + Y + r(X.length, 2) + "\0\0\0\0" + r(I, 4) + r(p, 4) + O + R + X };
|
|
3328
3360
|
}
|
|
3329
|
-
var o = e("../utils"), l = e("../stream/GenericWorker"), g = e("../utf8"),
|
|
3361
|
+
var o = e("../utils"), l = e("../stream/GenericWorker"), g = e("../utf8"), w = e("../crc32"), u = e("../signature");
|
|
3330
3362
|
function y(c, m, h, p) {
|
|
3331
3363
|
l.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = m, this.zipPlatform = h, this.encodeFileName = p, this.streamFiles = c, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
3332
3364
|
}
|
|
@@ -3350,9 +3382,9 @@ function fe() {
|
|
|
3350
3382
|
this.currentFile = null;
|
|
3351
3383
|
}, y.prototype.flush = function() {
|
|
3352
3384
|
for (var c = this.bytesWritten, m = 0; m < this.dirRecords.length; m++) this.push({ data: this.dirRecords[m], meta: { percent: 100 } });
|
|
3353
|
-
var h = this.bytesWritten - c, p = (function(f,
|
|
3385
|
+
var h = this.bytesWritten - c, p = (function(f, b, _, C, S) {
|
|
3354
3386
|
var z = o.transformTo("string", S(C));
|
|
3355
|
-
return u.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(f, 2) + r(f, 2) + r(
|
|
3387
|
+
return u.CENTRAL_DIRECTORY_END + "\0\0\0\0" + r(f, 2) + r(f, 2) + r(b, 4) + r(_, 4) + r(z.length, 2) + z;
|
|
3356
3388
|
})(this.dirRecords.length, h, c, this.zipComment, this.encodeFileName);
|
|
3357
3389
|
this.push({ data: p, meta: { percent: 100 } });
|
|
3358
3390
|
}, y.prototype.prepareNextSource = function() {
|
|
@@ -3384,21 +3416,21 @@ function fe() {
|
|
|
3384
3416
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, i, n) {
|
|
3385
3417
|
var r = e("../compressions"), s = e("./ZipFileWorker");
|
|
3386
3418
|
n.generateWorker = function(o, l, g) {
|
|
3387
|
-
var
|
|
3419
|
+
var w = new s(l.streamFiles, g, l.platform, l.encodeFileName), u = 0;
|
|
3388
3420
|
try {
|
|
3389
3421
|
o.forEach(function(y, c) {
|
|
3390
3422
|
u++;
|
|
3391
|
-
var m = (function(
|
|
3392
|
-
var C =
|
|
3423
|
+
var m = (function(b, _) {
|
|
3424
|
+
var C = b || _, S = r[C];
|
|
3393
3425
|
if (!S) throw new Error(C + " is not a valid compression method !");
|
|
3394
3426
|
return S;
|
|
3395
3427
|
})(c.options.compression, l.compression), h = c.options.compressionOptions || l.compressionOptions || {}, p = c.dir, f = c.date;
|
|
3396
|
-
c._compressWorker(m, h).withStreamInfo("file", { name: y, dir: p, date: f, comment: c.comment || "", unixPermissions: c.unixPermissions, dosPermissions: c.dosPermissions }).pipe(
|
|
3397
|
-
}),
|
|
3428
|
+
c._compressWorker(m, h).withStreamInfo("file", { name: y, dir: p, date: f, comment: c.comment || "", unixPermissions: c.unixPermissions, dosPermissions: c.dosPermissions }).pipe(w);
|
|
3429
|
+
}), w.entriesCount = u;
|
|
3398
3430
|
} catch (y) {
|
|
3399
|
-
|
|
3431
|
+
w.error(y);
|
|
3400
3432
|
}
|
|
3401
|
-
return
|
|
3433
|
+
return w;
|
|
3402
3434
|
};
|
|
3403
3435
|
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e, i, n) {
|
|
3404
3436
|
function r() {
|
|
@@ -3414,7 +3446,7 @@ function fe() {
|
|
|
3414
3446
|
return new r().loadAsync(s, o);
|
|
3415
3447
|
}, r.external = e("./external"), i.exports = r;
|
|
3416
3448
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, i, n) {
|
|
3417
|
-
var r = e("./utils"), s = e("./external"), o = e("./utf8"), l = e("./zipEntries"), g = e("./stream/Crc32Probe"),
|
|
3449
|
+
var r = e("./utils"), s = e("./external"), o = e("./utf8"), l = e("./zipEntries"), g = e("./stream/Crc32Probe"), w = e("./nodejsUtils");
|
|
3418
3450
|
function u(y) {
|
|
3419
3451
|
return new s.Promise(function(c, m) {
|
|
3420
3452
|
var h = y.decompressed.getContentWorker().pipe(new g());
|
|
@@ -3427,16 +3459,16 @@ function fe() {
|
|
|
3427
3459
|
}
|
|
3428
3460
|
i.exports = function(y, c) {
|
|
3429
3461
|
var m = this;
|
|
3430
|
-
return c = r.extend(c || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }),
|
|
3462
|
+
return c = r.extend(c || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), w.isNode && w.isStream(y) ? s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : r.prepareContent("the loaded zip file", y, !0, c.optimizedBinaryString, c.base64).then(function(h) {
|
|
3431
3463
|
var p = new l(c);
|
|
3432
3464
|
return p.load(h), p;
|
|
3433
3465
|
}).then(function(h) {
|
|
3434
3466
|
var p = [s.Promise.resolve(h)], f = h.files;
|
|
3435
|
-
if (c.checkCRC32) for (var
|
|
3467
|
+
if (c.checkCRC32) for (var b = 0; b < f.length; b++) p.push(u(f[b]));
|
|
3436
3468
|
return s.Promise.all(p);
|
|
3437
3469
|
}).then(function(h) {
|
|
3438
|
-
for (var p = h.shift(), f = p.files,
|
|
3439
|
-
var _ = f[
|
|
3470
|
+
for (var p = h.shift(), f = p.files, b = 0; b < f.length; b++) {
|
|
3471
|
+
var _ = f[b], C = _.fileNameStr, S = r.resolve(_.fileNameStr);
|
|
3440
3472
|
m.file(S, _.decompressed, { binary: !0, optimizedBinaryString: !0, date: _.date, dir: _.dir, comment: _.fileCommentStr.length ? _.fileCommentStr : null, unixPermissions: _.unixPermissions, dosPermissions: _.dosPermissions, createFolders: c.createFolders }), _.dir || (m.file(S).unsafeOriginalName = C);
|
|
3441
3473
|
}
|
|
3442
3474
|
return p.zipComment.length && (m.comment = p.zipComment), m;
|
|
@@ -3449,10 +3481,10 @@ function fe() {
|
|
|
3449
3481
|
}
|
|
3450
3482
|
r.inherits(o, s), o.prototype._bindStream = function(l) {
|
|
3451
3483
|
var g = this;
|
|
3452
|
-
(this._stream = l).pause(), l.on("data", function(
|
|
3453
|
-
g.push({ data:
|
|
3454
|
-
}).on("error", function(
|
|
3455
|
-
g.isPaused ? this.generatedError =
|
|
3484
|
+
(this._stream = l).pause(), l.on("data", function(w) {
|
|
3485
|
+
g.push({ data: w, meta: { percent: 0 } });
|
|
3486
|
+
}).on("error", function(w) {
|
|
3487
|
+
g.isPaused ? this.generatedError = w : g.error(w);
|
|
3456
3488
|
}).on("end", function() {
|
|
3457
3489
|
g.isPaused ? g._upstreamEnded = !0 : g.end();
|
|
3458
3490
|
});
|
|
@@ -3465,13 +3497,13 @@ function fe() {
|
|
|
3465
3497
|
var r = e("readable-stream").Readable;
|
|
3466
3498
|
function s(o, l, g) {
|
|
3467
3499
|
r.call(this, l), this._helper = o;
|
|
3468
|
-
var
|
|
3500
|
+
var w = this;
|
|
3469
3501
|
o.on("data", function(u, y) {
|
|
3470
|
-
|
|
3502
|
+
w.push(u) || w._helper.pause(), g && g(y);
|
|
3471
3503
|
}).on("error", function(u) {
|
|
3472
|
-
|
|
3504
|
+
w.emit("error", u);
|
|
3473
3505
|
}).on("end", function() {
|
|
3474
|
-
|
|
3506
|
+
w.push(null);
|
|
3475
3507
|
});
|
|
3476
3508
|
}
|
|
3477
3509
|
e("../utils").inherits(s, r), s.prototype._read = function() {
|
|
@@ -3493,23 +3525,23 @@ function fe() {
|
|
|
3493
3525
|
} };
|
|
3494
3526
|
}, {}], 15: [function(e, i, n) {
|
|
3495
3527
|
function r(S, z, B) {
|
|
3496
|
-
var O,
|
|
3497
|
-
H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (S = f(S)), H.createFolders && (O = p(S)) &&
|
|
3498
|
-
var X =
|
|
3499
|
-
B && B.binary !== void 0 || (H.binary = !X), (z instanceof u && z.uncompressedSize === 0 || H.dir || !z || z.length === 0) && (H.base64 = !1, H.binary = !0, z = "", H.compression = "STORE",
|
|
3528
|
+
var O, T = o.getTypeOf(z), H = o.extend(B || {}, w);
|
|
3529
|
+
H.date = H.date || /* @__PURE__ */ new Date(), H.compression !== null && (H.compression = H.compression.toUpperCase()), typeof H.unixPermissions == "string" && (H.unixPermissions = parseInt(H.unixPermissions, 8)), H.unixPermissions && 16384 & H.unixPermissions && (H.dir = !0), H.dosPermissions && 16 & H.dosPermissions && (H.dir = !0), H.dir && (S = f(S)), H.createFolders && (O = p(S)) && b.call(this, O, !0);
|
|
3530
|
+
var X = T === "string" && H.binary === !1 && H.base64 === !1;
|
|
3531
|
+
B && B.binary !== void 0 || (H.binary = !X), (z instanceof u && z.uncompressedSize === 0 || H.dir || !z || z.length === 0) && (H.base64 = !1, H.binary = !0, z = "", H.compression = "STORE", T = "string");
|
|
3500
3532
|
var k = null;
|
|
3501
3533
|
k = z instanceof u || z instanceof l ? z : m.isNode && m.isStream(z) ? new h(S, z) : o.prepareContent(S, z, H.binary, H.optimizedBinaryString, H.base64);
|
|
3502
3534
|
var D = new y(S, k, H);
|
|
3503
3535
|
this.files[S] = D;
|
|
3504
3536
|
}
|
|
3505
|
-
var s = e("./utf8"), o = e("./utils"), l = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"),
|
|
3537
|
+
var s = e("./utf8"), o = e("./utils"), l = e("./stream/GenericWorker"), g = e("./stream/StreamHelper"), w = e("./defaults"), u = e("./compressedObject"), y = e("./zipObject"), c = e("./generate"), m = e("./nodejsUtils"), h = e("./nodejs/NodejsStreamInputAdapter"), p = function(S) {
|
|
3506
3538
|
S.slice(-1) === "/" && (S = S.substring(0, S.length - 1));
|
|
3507
3539
|
var z = S.lastIndexOf("/");
|
|
3508
3540
|
return 0 < z ? S.substring(0, z) : "";
|
|
3509
3541
|
}, f = function(S) {
|
|
3510
3542
|
return S.slice(-1) !== "/" && (S += "/"), S;
|
|
3511
|
-
},
|
|
3512
|
-
return z = z !== void 0 ? z :
|
|
3543
|
+
}, b = function(S, z) {
|
|
3544
|
+
return z = z !== void 0 ? z : w.createFolders, S = f(S), this.files[S] || r.call(this, S, null, { dir: !0, createFolders: z }), this.files[S];
|
|
3513
3545
|
};
|
|
3514
3546
|
function _(S) {
|
|
3515
3547
|
return Object.prototype.toString.call(S) === "[object RegExp]";
|
|
@@ -3532,20 +3564,20 @@ function fe() {
|
|
|
3532
3564
|
return !X.dir && O.test(H);
|
|
3533
3565
|
});
|
|
3534
3566
|
}
|
|
3535
|
-
var
|
|
3536
|
-
return
|
|
3567
|
+
var T = this.files[this.root + S];
|
|
3568
|
+
return T && !T.dir ? T : null;
|
|
3537
3569
|
}, folder: function(S) {
|
|
3538
3570
|
if (!S) return this;
|
|
3539
|
-
if (_(S)) return this.filter(function(
|
|
3540
|
-
return H.dir && S.test(
|
|
3571
|
+
if (_(S)) return this.filter(function(T, H) {
|
|
3572
|
+
return H.dir && S.test(T);
|
|
3541
3573
|
});
|
|
3542
|
-
var z = this.root + S, B =
|
|
3574
|
+
var z = this.root + S, B = b.call(this, z), O = this.clone();
|
|
3543
3575
|
return O.root = B.name, O;
|
|
3544
3576
|
}, remove: function(S) {
|
|
3545
3577
|
S = this.root + S;
|
|
3546
3578
|
var z = this.files[S];
|
|
3547
3579
|
if (z || (S.slice(-1) !== "/" && (S += "/"), z = this.files[S]), z && !z.dir) delete this.files[S];
|
|
3548
|
-
else for (var B = this.filter(function(
|
|
3580
|
+
else for (var B = this.filter(function(T, H) {
|
|
3549
3581
|
return H.name.slice(0, S.length) === S;
|
|
3550
3582
|
}), O = 0; O < B.length; O++) delete this.files[B[O].name];
|
|
3551
3583
|
return this;
|
|
@@ -3558,8 +3590,8 @@ function fe() {
|
|
|
3558
3590
|
o.checkSupport(B.type), B.platform !== "darwin" && B.platform !== "freebsd" && B.platform !== "linux" && B.platform !== "sunos" || (B.platform = "UNIX"), B.platform === "win32" && (B.platform = "DOS");
|
|
3559
3591
|
var O = B.comment || this.comment || "";
|
|
3560
3592
|
z = c.generateWorker(this, B, O);
|
|
3561
|
-
} catch (
|
|
3562
|
-
(z = new l("error")).error(
|
|
3593
|
+
} catch (T) {
|
|
3594
|
+
(z = new l("error")).error(T);
|
|
3563
3595
|
}
|
|
3564
3596
|
return new g(z, B.type || "string", B.mimeType);
|
|
3565
3597
|
}, generateAsync: function(S, z) {
|
|
@@ -3579,11 +3611,11 @@ function fe() {
|
|
|
3579
3611
|
e("../utils").inherits(s, r), s.prototype.byteAt = function(o) {
|
|
3580
3612
|
return this.data[this.zero + o];
|
|
3581
3613
|
}, s.prototype.lastIndexOfSignature = function(o) {
|
|
3582
|
-
for (var l = o.charCodeAt(0), g = o.charCodeAt(1),
|
|
3614
|
+
for (var l = o.charCodeAt(0), g = o.charCodeAt(1), w = o.charCodeAt(2), u = o.charCodeAt(3), y = this.length - 4; 0 <= y; --y) if (this.data[y] === l && this.data[y + 1] === g && this.data[y + 2] === w && this.data[y + 3] === u) return y - this.zero;
|
|
3583
3615
|
return -1;
|
|
3584
3616
|
}, s.prototype.readAndCheckSignature = function(o) {
|
|
3585
|
-
var l = o.charCodeAt(0), g = o.charCodeAt(1),
|
|
3586
|
-
return l === y[0] && g === y[1] &&
|
|
3617
|
+
var l = o.charCodeAt(0), g = o.charCodeAt(1), w = o.charCodeAt(2), u = o.charCodeAt(3), y = this.readData(4);
|
|
3618
|
+
return l === y[0] && g === y[1] && w === y[2] && u === y[3];
|
|
3587
3619
|
}, s.prototype.readData = function(o) {
|
|
3588
3620
|
if (this.checkOffset(o), o === 0) return [];
|
|
3589
3621
|
var l = this.data.slice(this.zero + this.index, this.zero + this.index + o);
|
|
@@ -3653,10 +3685,10 @@ function fe() {
|
|
|
3653
3685
|
return this.index += o, l;
|
|
3654
3686
|
}, i.exports = s;
|
|
3655
3687
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e, i, n) {
|
|
3656
|
-
var r = e("../utils"), s = e("../support"), o = e("./ArrayReader"), l = e("./StringReader"), g = e("./NodeBufferReader"),
|
|
3688
|
+
var r = e("../utils"), s = e("../support"), o = e("./ArrayReader"), l = e("./StringReader"), g = e("./NodeBufferReader"), w = e("./Uint8ArrayReader");
|
|
3657
3689
|
i.exports = function(u) {
|
|
3658
3690
|
var y = r.getTypeOf(u);
|
|
3659
|
-
return r.checkSupport(y), y !== "string" || s.uint8array ? y === "nodebuffer" ? new g(u) : s.uint8array ? new
|
|
3691
|
+
return r.checkSupport(y), y !== "string" || s.uint8array ? y === "nodebuffer" ? new g(u) : s.uint8array ? new w(r.transformTo("uint8array", u)) : new o(r.transformTo("array", u)) : new l(u);
|
|
3660
3692
|
};
|
|
3661
3693
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e, i, n) {
|
|
3662
3694
|
n.LOCAL_FILE_HEADER = "PK", n.CENTRAL_FILE_HEADER = "PK", n.CENTRAL_DIRECTORY_END = "PK", n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", n.ZIP64_CENTRAL_DIRECTORY_END = "PK", n.DATA_DESCRIPTOR = "PK\x07\b";
|
|
@@ -3693,10 +3725,10 @@ function fe() {
|
|
|
3693
3725
|
function o(l) {
|
|
3694
3726
|
s.call(this, "DataWorker");
|
|
3695
3727
|
var g = this;
|
|
3696
|
-
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(
|
|
3697
|
-
g.dataIsReady = !0, g.data =
|
|
3698
|
-
}, function(
|
|
3699
|
-
g.error(
|
|
3728
|
+
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(w) {
|
|
3729
|
+
g.dataIsReady = !0, g.data = w, g.max = w && w.length || 0, g.type = r.getTypeOf(w), g.isPaused || g._tickAndRepeat();
|
|
3730
|
+
}, function(w) {
|
|
3731
|
+
g.error(w);
|
|
3700
3732
|
});
|
|
3701
3733
|
}
|
|
3702
3734
|
r.inherits(o, s), o.prototype.cleanUp = function() {
|
|
@@ -3779,51 +3811,51 @@ function fe() {
|
|
|
3779
3811
|
return this.previous ? this.previous + " -> " + s : s;
|
|
3780
3812
|
} }, i.exports = r;
|
|
3781
3813
|
}, {}], 29: [function(e, i, n) {
|
|
3782
|
-
var r = e("../utils"), s = e("./ConvertWorker"), o = e("./GenericWorker"), l = e("../base64"), g = e("../support"),
|
|
3814
|
+
var r = e("../utils"), s = e("./ConvertWorker"), o = e("./GenericWorker"), l = e("../base64"), g = e("../support"), w = e("../external"), u = null;
|
|
3783
3815
|
if (g.nodestream) try {
|
|
3784
3816
|
u = e("../nodejs/NodejsStreamOutputAdapter");
|
|
3785
3817
|
} catch {
|
|
3786
3818
|
}
|
|
3787
3819
|
function y(m, h) {
|
|
3788
|
-
return new
|
|
3789
|
-
var
|
|
3820
|
+
return new w.Promise(function(p, f) {
|
|
3821
|
+
var b = [], _ = m._internalType, C = m._outputType, S = m._mimeType;
|
|
3790
3822
|
m.on("data", function(z, B) {
|
|
3791
|
-
|
|
3823
|
+
b.push(z), h && h(B);
|
|
3792
3824
|
}).on("error", function(z) {
|
|
3793
|
-
|
|
3825
|
+
b = [], f(z);
|
|
3794
3826
|
}).on("end", function() {
|
|
3795
3827
|
try {
|
|
3796
|
-
var z = (function(B, O,
|
|
3828
|
+
var z = (function(B, O, T) {
|
|
3797
3829
|
switch (B) {
|
|
3798
3830
|
case "blob":
|
|
3799
|
-
return r.newBlob(r.transformTo("arraybuffer", O),
|
|
3831
|
+
return r.newBlob(r.transformTo("arraybuffer", O), T);
|
|
3800
3832
|
case "base64":
|
|
3801
3833
|
return l.encode(O);
|
|
3802
3834
|
default:
|
|
3803
3835
|
return r.transformTo(B, O);
|
|
3804
3836
|
}
|
|
3805
3837
|
})(C, (function(B, O) {
|
|
3806
|
-
var
|
|
3807
|
-
for (
|
|
3838
|
+
var T, H = 0, X = null, k = 0;
|
|
3839
|
+
for (T = 0; T < O.length; T++) k += O[T].length;
|
|
3808
3840
|
switch (B) {
|
|
3809
3841
|
case "string":
|
|
3810
3842
|
return O.join("");
|
|
3811
3843
|
case "array":
|
|
3812
3844
|
return Array.prototype.concat.apply([], O);
|
|
3813
3845
|
case "uint8array":
|
|
3814
|
-
for (X = new Uint8Array(k),
|
|
3846
|
+
for (X = new Uint8Array(k), T = 0; T < O.length; T++) X.set(O[T], H), H += O[T].length;
|
|
3815
3847
|
return X;
|
|
3816
3848
|
case "nodebuffer":
|
|
3817
3849
|
return Buffer.concat(O);
|
|
3818
3850
|
default:
|
|
3819
3851
|
throw new Error("concat : unsupported type '" + B + "'");
|
|
3820
3852
|
}
|
|
3821
|
-
})(_,
|
|
3853
|
+
})(_, b), S);
|
|
3822
3854
|
p(z);
|
|
3823
3855
|
} catch (B) {
|
|
3824
3856
|
f(B);
|
|
3825
3857
|
}
|
|
3826
|
-
|
|
3858
|
+
b = [];
|
|
3827
3859
|
}).resume();
|
|
3828
3860
|
});
|
|
3829
3861
|
}
|
|
@@ -3839,8 +3871,8 @@ function fe() {
|
|
|
3839
3871
|
}
|
|
3840
3872
|
try {
|
|
3841
3873
|
this._internalType = f, this._outputType = h, this._mimeType = p, r.checkSupport(f), this._worker = m.pipe(new s(f)), m.lock();
|
|
3842
|
-
} catch (
|
|
3843
|
-
this._worker = new o("error"), this._worker.error(
|
|
3874
|
+
} catch (b) {
|
|
3875
|
+
this._worker = new o("error"), this._worker.error(b);
|
|
3844
3876
|
}
|
|
3845
3877
|
}
|
|
3846
3878
|
c.prototype = { accumulate: function(m) {
|
|
@@ -3881,7 +3913,7 @@ function fe() {
|
|
|
3881
3913
|
n.nodestream = !1;
|
|
3882
3914
|
}
|
|
3883
3915
|
}, { "readable-stream": 16 }], 31: [function(e, i, n) {
|
|
3884
|
-
for (var r = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), l = e("./stream/GenericWorker"), g = new Array(256),
|
|
3916
|
+
for (var r = e("./utils"), s = e("./support"), o = e("./nodejsUtils"), l = e("./stream/GenericWorker"), g = new Array(256), w = 0; w < 256; w++) g[w] = 252 <= w ? 6 : 248 <= w ? 5 : 240 <= w ? 4 : 224 <= w ? 3 : 192 <= w ? 2 : 1;
|
|
3885
3917
|
g[254] = g[254] = 1;
|
|
3886
3918
|
function u() {
|
|
3887
3919
|
l.call(this, "utf-8 decode"), this.leftOver = null;
|
|
@@ -3891,19 +3923,19 @@ function fe() {
|
|
|
3891
3923
|
}
|
|
3892
3924
|
n.utf8encode = function(c) {
|
|
3893
3925
|
return s.nodebuffer ? o.newBufferFrom(c, "utf-8") : (function(m) {
|
|
3894
|
-
var h, p, f,
|
|
3895
|
-
for (
|
|
3896
|
-
for (h = s.uint8array ? new Uint8Array(S) : new Array(S),
|
|
3926
|
+
var h, p, f, b, _, C = m.length, S = 0;
|
|
3927
|
+
for (b = 0; b < C; b++) (64512 & (p = m.charCodeAt(b))) == 55296 && b + 1 < C && (64512 & (f = m.charCodeAt(b + 1))) == 56320 && (p = 65536 + (p - 55296 << 10) + (f - 56320), b++), S += p < 128 ? 1 : p < 2048 ? 2 : p < 65536 ? 3 : 4;
|
|
3928
|
+
for (h = s.uint8array ? new Uint8Array(S) : new Array(S), b = _ = 0; _ < S; b++) (64512 & (p = m.charCodeAt(b))) == 55296 && b + 1 < C && (64512 & (f = m.charCodeAt(b + 1))) == 56320 && (p = 65536 + (p - 55296 << 10) + (f - 56320), b++), p < 128 ? h[_++] = p : (p < 2048 ? h[_++] = 192 | p >>> 6 : (p < 65536 ? h[_++] = 224 | p >>> 12 : (h[_++] = 240 | p >>> 18, h[_++] = 128 | p >>> 12 & 63), h[_++] = 128 | p >>> 6 & 63), h[_++] = 128 | 63 & p);
|
|
3897
3929
|
return h;
|
|
3898
3930
|
})(c);
|
|
3899
3931
|
}, n.utf8decode = function(c) {
|
|
3900
3932
|
return s.nodebuffer ? r.transformTo("nodebuffer", c).toString("utf-8") : (function(m) {
|
|
3901
|
-
var h, p, f,
|
|
3933
|
+
var h, p, f, b, _ = m.length, C = new Array(2 * _);
|
|
3902
3934
|
for (h = p = 0; h < _; ) if ((f = m[h++]) < 128) C[p++] = f;
|
|
3903
|
-
else if (4 < (
|
|
3935
|
+
else if (4 < (b = g[f])) C[p++] = 65533, h += b - 1;
|
|
3904
3936
|
else {
|
|
3905
|
-
for (f &=
|
|
3906
|
-
1 <
|
|
3937
|
+
for (f &= b === 2 ? 31 : b === 3 ? 15 : 7; 1 < b && h < _; ) f = f << 6 | 63 & m[h++], b--;
|
|
3938
|
+
1 < b ? C[p++] = 65533 : f < 65536 ? C[p++] = f : (f -= 65536, C[p++] = 55296 | f >> 10 & 1023, C[p++] = 56320 | 1023 & f);
|
|
3907
3939
|
}
|
|
3908
3940
|
return C.length !== p && (C.subarray ? C = C.subarray(0, p) : C.length = p), r.applyFromCharCode(C);
|
|
3909
3941
|
})(c = r.transformTo(s.uint8array ? "uint8array" : "array", c));
|
|
@@ -3916,10 +3948,10 @@ function fe() {
|
|
|
3916
3948
|
} else m = this.leftOver.concat(m);
|
|
3917
3949
|
this.leftOver = null;
|
|
3918
3950
|
}
|
|
3919
|
-
var p = (function(
|
|
3951
|
+
var p = (function(b, _) {
|
|
3920
3952
|
var C;
|
|
3921
|
-
for ((_ = _ ||
|
|
3922
|
-
return C < 0 || C === 0 ? _ : C + g[
|
|
3953
|
+
for ((_ = _ || b.length) > b.length && (_ = b.length), C = _ - 1; 0 <= C && (192 & b[C]) == 128; ) C--;
|
|
3954
|
+
return C < 0 || C === 0 ? _ : C + g[b[C]] > _ ? C : _;
|
|
3923
3955
|
})(m), f = m;
|
|
3924
3956
|
p !== m.length && (s.uint8array ? (f = m.subarray(0, p), this.leftOver = m.subarray(p, m.length)) : (f = m.slice(0, p), this.leftOver = m.slice(p, m.length))), this.push({ data: n.utf8decode(f), meta: c.meta });
|
|
3925
3957
|
}, u.prototype.flush = function() {
|
|
@@ -3932,7 +3964,7 @@ function fe() {
|
|
|
3932
3964
|
function g(h) {
|
|
3933
3965
|
return h;
|
|
3934
3966
|
}
|
|
3935
|
-
function
|
|
3967
|
+
function w(h, p) {
|
|
3936
3968
|
for (var f = 0; f < h.length; ++f) p[f] = 255 & h.charCodeAt(f);
|
|
3937
3969
|
return p;
|
|
3938
3970
|
}
|
|
@@ -3950,10 +3982,10 @@ function fe() {
|
|
|
3950
3982
|
}
|
|
3951
3983
|
};
|
|
3952
3984
|
var u = { stringifyByChunk: function(h, p, f) {
|
|
3953
|
-
var
|
|
3985
|
+
var b = [], _ = 0, C = h.length;
|
|
3954
3986
|
if (C <= f) return String.fromCharCode.apply(null, h);
|
|
3955
|
-
for (; _ < C; ) p === "array" || p === "nodebuffer" ?
|
|
3956
|
-
return
|
|
3987
|
+
for (; _ < C; ) p === "array" || p === "nodebuffer" ? b.push(String.fromCharCode.apply(null, h.slice(_, Math.min(_ + f, C)))) : b.push(String.fromCharCode.apply(null, h.subarray(_, Math.min(_ + f, C)))), _ += f;
|
|
3988
|
+
return b.join("");
|
|
3957
3989
|
}, stringifyByChar: function(h) {
|
|
3958
3990
|
for (var p = "", f = 0; f < h.length; f++) p += String.fromCharCode(h[f]);
|
|
3959
3991
|
return p;
|
|
@@ -3971,8 +4003,8 @@ function fe() {
|
|
|
3971
4003
|
}
|
|
3972
4004
|
})() } };
|
|
3973
4005
|
function y(h) {
|
|
3974
|
-
var p = 65536, f = n.getTypeOf(h),
|
|
3975
|
-
if (f === "uint8array" ?
|
|
4006
|
+
var p = 65536, f = n.getTypeOf(h), b = !0;
|
|
4007
|
+
if (f === "uint8array" ? b = u.applyCanBeUsed.uint8array : f === "nodebuffer" && (b = u.applyCanBeUsed.nodebuffer), b) for (; 1 < p; ) try {
|
|
3976
4008
|
return u.stringifyByChunk(h, f, p);
|
|
3977
4009
|
} catch {
|
|
3978
4010
|
p = Math.floor(p / 2);
|
|
@@ -3986,13 +4018,13 @@ function fe() {
|
|
|
3986
4018
|
n.applyFromCharCode = y;
|
|
3987
4019
|
var m = {};
|
|
3988
4020
|
m.string = { string: g, array: function(h) {
|
|
3989
|
-
return
|
|
4021
|
+
return w(h, new Array(h.length));
|
|
3990
4022
|
}, arraybuffer: function(h) {
|
|
3991
4023
|
return m.string.uint8array(h).buffer;
|
|
3992
4024
|
}, uint8array: function(h) {
|
|
3993
|
-
return
|
|
4025
|
+
return w(h, new Uint8Array(h.length));
|
|
3994
4026
|
}, nodebuffer: function(h) {
|
|
3995
|
-
return
|
|
4027
|
+
return w(h, o.allocBuffer(h.length));
|
|
3996
4028
|
} }, m.array = { string: y, array: g, arraybuffer: function(h) {
|
|
3997
4029
|
return new Uint8Array(h).buffer;
|
|
3998
4030
|
}, uint8array: function(h) {
|
|
@@ -4025,9 +4057,9 @@ function fe() {
|
|
|
4025
4057
|
var f = n.getTypeOf(p);
|
|
4026
4058
|
return m[f][h](p);
|
|
4027
4059
|
}, n.resolve = function(h) {
|
|
4028
|
-
for (var p = h.split("/"), f = [],
|
|
4029
|
-
var _ = p[
|
|
4030
|
-
_ === "." || _ === "" &&
|
|
4060
|
+
for (var p = h.split("/"), f = [], b = 0; b < p.length; b++) {
|
|
4061
|
+
var _ = p[b];
|
|
4062
|
+
_ === "." || _ === "" && b !== 0 && b !== p.length - 1 || (_ === ".." ? f.pop() : f.push(_));
|
|
4031
4063
|
}
|
|
4032
4064
|
return f.join("/");
|
|
4033
4065
|
}, n.getTypeOf = function(h) {
|
|
@@ -4035,9 +4067,9 @@ function fe() {
|
|
|
4035
4067
|
}, n.checkSupport = function(h) {
|
|
4036
4068
|
if (!r[h.toLowerCase()]) throw new Error(h + " is not supported by this platform");
|
|
4037
4069
|
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(h) {
|
|
4038
|
-
var p, f,
|
|
4039
|
-
for (f = 0; f < (h || "").length; f++)
|
|
4040
|
-
return
|
|
4070
|
+
var p, f, b = "";
|
|
4071
|
+
for (f = 0; f < (h || "").length; f++) b += "\\x" + ((p = h.charCodeAt(f)) < 16 ? "0" : "") + p.toString(16).toUpperCase();
|
|
4072
|
+
return b;
|
|
4041
4073
|
}, n.delay = function(h, p, f) {
|
|
4042
4074
|
setImmediate(function() {
|
|
4043
4075
|
h.apply(f || null, p || []);
|
|
@@ -4050,7 +4082,7 @@ function fe() {
|
|
|
4050
4082
|
var h, p, f = {};
|
|
4051
4083
|
for (h = 0; h < arguments.length; h++) for (p in arguments[h]) Object.prototype.hasOwnProperty.call(arguments[h], p) && f[p] === void 0 && (f[p] = arguments[h][p]);
|
|
4052
4084
|
return f;
|
|
4053
|
-
}, n.prepareContent = function(h, p, f,
|
|
4085
|
+
}, n.prepareContent = function(h, p, f, b, _) {
|
|
4054
4086
|
return l.Promise.resolve(p).then(function(C) {
|
|
4055
4087
|
return r.blob && (C instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(C)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(S, z) {
|
|
4056
4088
|
var B = new FileReader();
|
|
@@ -4062,17 +4094,17 @@ function fe() {
|
|
|
4062
4094
|
}) : C;
|
|
4063
4095
|
}).then(function(C) {
|
|
4064
4096
|
var S = n.getTypeOf(C);
|
|
4065
|
-
return S ? (S === "arraybuffer" ? C = n.transformTo("uint8array", C) : S === "string" && (_ ? C = s.decode(C) : f &&
|
|
4066
|
-
return
|
|
4097
|
+
return S ? (S === "arraybuffer" ? C = n.transformTo("uint8array", C) : S === "string" && (_ ? C = s.decode(C) : f && b !== !0 && (C = (function(z) {
|
|
4098
|
+
return w(z, r.uint8array ? new Uint8Array(z.length) : new Array(z.length));
|
|
4067
4099
|
})(C))), C) : l.Promise.reject(new Error("Can't read the data of '" + h + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
4068
4100
|
});
|
|
4069
4101
|
};
|
|
4070
4102
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e, i, n) {
|
|
4071
4103
|
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./signature"), l = e("./zipEntry"), g = e("./support");
|
|
4072
|
-
function
|
|
4104
|
+
function w(u) {
|
|
4073
4105
|
this.files = [], this.loadOptions = u;
|
|
4074
4106
|
}
|
|
4075
|
-
|
|
4107
|
+
w.prototype = { checkSignature: function(u) {
|
|
4076
4108
|
if (!this.reader.readAndCheckSignature(u)) {
|
|
4077
4109
|
this.reader.index -= 4;
|
|
4078
4110
|
var y = this.reader.readString(4);
|
|
@@ -4118,9 +4150,9 @@ function fe() {
|
|
|
4118
4150
|
this.reader = r(u);
|
|
4119
4151
|
}, load: function(u) {
|
|
4120
4152
|
this.prepareReader(u), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
4121
|
-
} }, i.exports =
|
|
4153
|
+
} }, i.exports = w;
|
|
4122
4154
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, i, n) {
|
|
4123
|
-
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./compressedObject"), l = e("./crc32"), g = e("./utf8"),
|
|
4155
|
+
var r = e("./reader/readerFor"), s = e("./utils"), o = e("./compressedObject"), l = e("./crc32"), g = e("./utf8"), w = e("./compressions"), u = e("./support");
|
|
4124
4156
|
function y(c, m) {
|
|
4125
4157
|
this.options = c, this.loadOptions = m;
|
|
4126
4158
|
}
|
|
@@ -4132,7 +4164,7 @@ function fe() {
|
|
|
4132
4164
|
var m, h;
|
|
4133
4165
|
if (c.skip(22), this.fileNameLength = c.readInt(2), h = c.readInt(2), this.fileName = c.readData(this.fileNameLength), c.skip(h), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
4134
4166
|
if ((m = (function(p) {
|
|
4135
|
-
for (var f in
|
|
4167
|
+
for (var f in w) if (Object.prototype.hasOwnProperty.call(w, f) && w[f].magic === p) return w[f];
|
|
4136
4168
|
return null;
|
|
4137
4169
|
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
|
|
4138
4170
|
this.decompressed = new o(this.compressedSize, this.uncompressedSize, this.crc32, m, c.readData(this.compressedSize));
|
|
@@ -4190,17 +4222,17 @@ function fe() {
|
|
|
4190
4222
|
function r(m, h, p) {
|
|
4191
4223
|
this.name = m, this.dir = p.dir, this.date = p.date, this.comment = p.comment, this.unixPermissions = p.unixPermissions, this.dosPermissions = p.dosPermissions, this._data = h, this._dataBinary = p.binary, this.options = { compression: p.compression, compressionOptions: p.compressionOptions };
|
|
4192
4224
|
}
|
|
4193
|
-
var s = e("./stream/StreamHelper"), o = e("./stream/DataWorker"), l = e("./utf8"), g = e("./compressedObject"),
|
|
4225
|
+
var s = e("./stream/StreamHelper"), o = e("./stream/DataWorker"), l = e("./utf8"), g = e("./compressedObject"), w = e("./stream/GenericWorker");
|
|
4194
4226
|
r.prototype = { internalStream: function(m) {
|
|
4195
4227
|
var h = null, p = "string";
|
|
4196
4228
|
try {
|
|
4197
4229
|
if (!m) throw new Error("No output type specified.");
|
|
4198
4230
|
var f = (p = m.toLowerCase()) === "string" || p === "text";
|
|
4199
4231
|
p !== "binarystring" && p !== "text" || (p = "string"), h = this._decompressWorker();
|
|
4200
|
-
var
|
|
4201
|
-
|
|
4232
|
+
var b = !this._dataBinary;
|
|
4233
|
+
b && !f && (h = h.pipe(new l.Utf8EncodeWorker())), !b && f && (h = h.pipe(new l.Utf8DecodeWorker()));
|
|
4202
4234
|
} catch (_) {
|
|
4203
|
-
(h = new
|
|
4235
|
+
(h = new w("error")).error(_);
|
|
4204
4236
|
}
|
|
4205
4237
|
return new s(h, p, "");
|
|
4206
4238
|
}, async: function(m, h) {
|
|
@@ -4212,7 +4244,7 @@ function fe() {
|
|
|
4212
4244
|
var p = this._decompressWorker();
|
|
4213
4245
|
return this._dataBinary || (p = p.pipe(new l.Utf8EncodeWorker())), g.createWorkerFrom(p, m, h);
|
|
4214
4246
|
}, _decompressWorker: function() {
|
|
4215
|
-
return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof
|
|
4247
|
+
return this._data instanceof g ? this._data.getContentWorker() : this._data instanceof w ? this._data : new o(this._data);
|
|
4216
4248
|
} };
|
|
4217
4249
|
for (var u = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], y = function() {
|
|
4218
4250
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -4222,8 +4254,8 @@ function fe() {
|
|
|
4222
4254
|
(function(r) {
|
|
4223
4255
|
var s, o, l = r.MutationObserver || r.WebKitMutationObserver;
|
|
4224
4256
|
if (l) {
|
|
4225
|
-
var g = 0,
|
|
4226
|
-
|
|
4257
|
+
var g = 0, w = new l(m), u = r.document.createTextNode("");
|
|
4258
|
+
w.observe(u, { characterData: !0 }), s = function() {
|
|
4227
4259
|
u.data = g = ++g % 2;
|
|
4228
4260
|
};
|
|
4229
4261
|
} else if (r.setImmediate || r.MessageChannel === void 0) s = "document" in r && "onreadystatechange" in r.document.createElement("script") ? function() {
|
|
@@ -4258,19 +4290,19 @@ function fe() {
|
|
|
4258
4290
|
var r = e("immediate");
|
|
4259
4291
|
function s() {
|
|
4260
4292
|
}
|
|
4261
|
-
var o = {}, l = ["REJECTED"], g = ["FULFILLED"],
|
|
4293
|
+
var o = {}, l = ["REJECTED"], g = ["FULFILLED"], w = ["PENDING"];
|
|
4262
4294
|
function u(f) {
|
|
4263
4295
|
if (typeof f != "function") throw new TypeError("resolver must be a function");
|
|
4264
|
-
this.state =
|
|
4296
|
+
this.state = w, this.queue = [], this.outcome = void 0, f !== s && h(this, f);
|
|
4265
4297
|
}
|
|
4266
|
-
function y(f,
|
|
4267
|
-
this.promise = f, typeof
|
|
4298
|
+
function y(f, b, _) {
|
|
4299
|
+
this.promise = f, typeof b == "function" && (this.onFulfilled = b, this.callFulfilled = this.otherCallFulfilled), typeof _ == "function" && (this.onRejected = _, this.callRejected = this.otherCallRejected);
|
|
4268
4300
|
}
|
|
4269
|
-
function c(f,
|
|
4301
|
+
function c(f, b, _) {
|
|
4270
4302
|
r(function() {
|
|
4271
4303
|
var C;
|
|
4272
4304
|
try {
|
|
4273
|
-
C =
|
|
4305
|
+
C = b(_);
|
|
4274
4306
|
} catch (S) {
|
|
4275
4307
|
return o.reject(f, S);
|
|
4276
4308
|
}
|
|
@@ -4278,12 +4310,12 @@ function fe() {
|
|
|
4278
4310
|
});
|
|
4279
4311
|
}
|
|
4280
4312
|
function m(f) {
|
|
4281
|
-
var
|
|
4282
|
-
if (f && (typeof f == "object" || typeof f == "function") && typeof
|
|
4283
|
-
|
|
4313
|
+
var b = f && f.then;
|
|
4314
|
+
if (f && (typeof f == "object" || typeof f == "function") && typeof b == "function") return function() {
|
|
4315
|
+
b.apply(f, arguments);
|
|
4284
4316
|
};
|
|
4285
4317
|
}
|
|
4286
|
-
function h(f,
|
|
4318
|
+
function h(f, b) {
|
|
4287
4319
|
var _ = !1;
|
|
4288
4320
|
function C(B) {
|
|
4289
4321
|
_ || (_ = !0, o.reject(f, B));
|
|
@@ -4292,14 +4324,14 @@ function fe() {
|
|
|
4292
4324
|
_ || (_ = !0, o.resolve(f, B));
|
|
4293
4325
|
}
|
|
4294
4326
|
var z = p(function() {
|
|
4295
|
-
|
|
4327
|
+
b(S, C);
|
|
4296
4328
|
});
|
|
4297
4329
|
z.status === "error" && C(z.value);
|
|
4298
4330
|
}
|
|
4299
|
-
function p(f,
|
|
4331
|
+
function p(f, b) {
|
|
4300
4332
|
var _ = {};
|
|
4301
4333
|
try {
|
|
4302
|
-
_.value = f(
|
|
4334
|
+
_.value = f(b), _.status = "success";
|
|
4303
4335
|
} catch (C) {
|
|
4304
4336
|
_.status = "error", _.value = C;
|
|
4305
4337
|
}
|
|
@@ -4307,22 +4339,22 @@ function fe() {
|
|
|
4307
4339
|
}
|
|
4308
4340
|
(i.exports = u).prototype.finally = function(f) {
|
|
4309
4341
|
if (typeof f != "function") return this;
|
|
4310
|
-
var
|
|
4342
|
+
var b = this.constructor;
|
|
4311
4343
|
return this.then(function(_) {
|
|
4312
|
-
return
|
|
4344
|
+
return b.resolve(f()).then(function() {
|
|
4313
4345
|
return _;
|
|
4314
4346
|
});
|
|
4315
4347
|
}, function(_) {
|
|
4316
|
-
return
|
|
4348
|
+
return b.resolve(f()).then(function() {
|
|
4317
4349
|
throw _;
|
|
4318
4350
|
});
|
|
4319
4351
|
});
|
|
4320
4352
|
}, u.prototype.catch = function(f) {
|
|
4321
4353
|
return this.then(null, f);
|
|
4322
|
-
}, u.prototype.then = function(f,
|
|
4323
|
-
if (typeof f != "function" && this.state === g || typeof
|
|
4354
|
+
}, u.prototype.then = function(f, b) {
|
|
4355
|
+
if (typeof f != "function" && this.state === g || typeof b != "function" && this.state === l) return this;
|
|
4324
4356
|
var _ = new this.constructor(s);
|
|
4325
|
-
return this.state !==
|
|
4357
|
+
return this.state !== w ? c(_, this.state === g ? f : b, this.outcome) : this.queue.push(new y(_, f, b)), _;
|
|
4326
4358
|
}, y.prototype.callFulfilled = function(f) {
|
|
4327
4359
|
o.resolve(this.promise, f);
|
|
4328
4360
|
}, y.prototype.otherCallFulfilled = function(f) {
|
|
@@ -4331,45 +4363,45 @@ function fe() {
|
|
|
4331
4363
|
o.reject(this.promise, f);
|
|
4332
4364
|
}, y.prototype.otherCallRejected = function(f) {
|
|
4333
4365
|
c(this.promise, this.onRejected, f);
|
|
4334
|
-
}, o.resolve = function(f,
|
|
4335
|
-
var _ = p(m,
|
|
4366
|
+
}, o.resolve = function(f, b) {
|
|
4367
|
+
var _ = p(m, b);
|
|
4336
4368
|
if (_.status === "error") return o.reject(f, _.value);
|
|
4337
4369
|
var C = _.value;
|
|
4338
4370
|
if (C) h(f, C);
|
|
4339
4371
|
else {
|
|
4340
|
-
f.state = g, f.outcome =
|
|
4341
|
-
for (var S = -1, z = f.queue.length; ++S < z; ) f.queue[S].callFulfilled(
|
|
4372
|
+
f.state = g, f.outcome = b;
|
|
4373
|
+
for (var S = -1, z = f.queue.length; ++S < z; ) f.queue[S].callFulfilled(b);
|
|
4342
4374
|
}
|
|
4343
4375
|
return f;
|
|
4344
|
-
}, o.reject = function(f,
|
|
4345
|
-
f.state = l, f.outcome =
|
|
4346
|
-
for (var _ = -1, C = f.queue.length; ++_ < C; ) f.queue[_].callRejected(
|
|
4376
|
+
}, o.reject = function(f, b) {
|
|
4377
|
+
f.state = l, f.outcome = b;
|
|
4378
|
+
for (var _ = -1, C = f.queue.length; ++_ < C; ) f.queue[_].callRejected(b);
|
|
4347
4379
|
return f;
|
|
4348
4380
|
}, u.resolve = function(f) {
|
|
4349
4381
|
return f instanceof this ? f : o.resolve(new this(s), f);
|
|
4350
4382
|
}, u.reject = function(f) {
|
|
4351
|
-
var
|
|
4352
|
-
return o.reject(
|
|
4383
|
+
var b = new this(s);
|
|
4384
|
+
return o.reject(b, f);
|
|
4353
4385
|
}, u.all = function(f) {
|
|
4354
|
-
var
|
|
4386
|
+
var b = this;
|
|
4355
4387
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4356
4388
|
var _ = f.length, C = !1;
|
|
4357
4389
|
if (!_) return this.resolve([]);
|
|
4358
|
-
for (var S = new Array(_), z = 0, B = -1, O = new this(s); ++B < _; )
|
|
4390
|
+
for (var S = new Array(_), z = 0, B = -1, O = new this(s); ++B < _; ) T(f[B], B);
|
|
4359
4391
|
return O;
|
|
4360
|
-
function
|
|
4361
|
-
|
|
4392
|
+
function T(H, X) {
|
|
4393
|
+
b.resolve(H).then(function(k) {
|
|
4362
4394
|
S[X] = k, ++z !== _ || C || (C = !0, o.resolve(O, S));
|
|
4363
4395
|
}, function(k) {
|
|
4364
4396
|
C || (C = !0, o.reject(O, k));
|
|
4365
4397
|
});
|
|
4366
4398
|
}
|
|
4367
4399
|
}, u.race = function(f) {
|
|
4368
|
-
var
|
|
4400
|
+
var b = this;
|
|
4369
4401
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4370
4402
|
var _ = f.length, C = !1;
|
|
4371
4403
|
if (!_) return this.resolve([]);
|
|
4372
|
-
for (var S = -1, z = new this(s); ++S < _; ) B = f[S],
|
|
4404
|
+
for (var S = -1, z = new this(s); ++S < _; ) B = f[S], b.resolve(B).then(function(O) {
|
|
4373
4405
|
C || (C = !0, o.resolve(z, O));
|
|
4374
4406
|
}, function(O) {
|
|
4375
4407
|
C || (C = !0, o.reject(z, O));
|
|
@@ -4381,29 +4413,29 @@ function fe() {
|
|
|
4381
4413
|
var r = {};
|
|
4382
4414
|
(0, e("./lib/utils/common").assign)(r, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), i.exports = r;
|
|
4383
4415
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, i, n) {
|
|
4384
|
-
var r = e("./zlib/deflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/messages"), g = e("./zlib/zstream"),
|
|
4416
|
+
var r = e("./zlib/deflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/messages"), g = e("./zlib/zstream"), w = Object.prototype.toString, u = 0, y = -1, c = 0, m = 8;
|
|
4385
4417
|
function h(f) {
|
|
4386
4418
|
if (!(this instanceof h)) return new h(f);
|
|
4387
4419
|
this.options = s.assign({ level: y, method: m, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c, to: "" }, f || {});
|
|
4388
|
-
var
|
|
4389
|
-
|
|
4390
|
-
var _ = r.deflateInit2(this.strm,
|
|
4420
|
+
var b = this.options;
|
|
4421
|
+
b.raw && 0 < b.windowBits ? b.windowBits = -b.windowBits : b.gzip && 0 < b.windowBits && b.windowBits < 16 && (b.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new g(), this.strm.avail_out = 0;
|
|
4422
|
+
var _ = r.deflateInit2(this.strm, b.level, b.method, b.windowBits, b.memLevel, b.strategy);
|
|
4391
4423
|
if (_ !== u) throw new Error(l[_]);
|
|
4392
|
-
if (
|
|
4424
|
+
if (b.header && r.deflateSetHeader(this.strm, b.header), b.dictionary) {
|
|
4393
4425
|
var C;
|
|
4394
|
-
if (C = typeof
|
|
4426
|
+
if (C = typeof b.dictionary == "string" ? o.string2buf(b.dictionary) : w.call(b.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(b.dictionary) : b.dictionary, (_ = r.deflateSetDictionary(this.strm, C)) !== u) throw new Error(l[_]);
|
|
4395
4427
|
this._dict_set = !0;
|
|
4396
4428
|
}
|
|
4397
4429
|
}
|
|
4398
|
-
function p(f,
|
|
4399
|
-
var _ = new h(
|
|
4430
|
+
function p(f, b) {
|
|
4431
|
+
var _ = new h(b);
|
|
4400
4432
|
if (_.push(f, !0), _.err) throw _.msg || l[_.err];
|
|
4401
4433
|
return _.result;
|
|
4402
4434
|
}
|
|
4403
|
-
h.prototype.push = function(f,
|
|
4435
|
+
h.prototype.push = function(f, b) {
|
|
4404
4436
|
var _, C, S = this.strm, z = this.options.chunkSize;
|
|
4405
4437
|
if (this.ended) return !1;
|
|
4406
|
-
C =
|
|
4438
|
+
C = b === ~~b ? b : b === !0 ? 4 : 0, typeof f == "string" ? S.input = o.string2buf(f) : w.call(f) === "[object ArrayBuffer]" ? S.input = new Uint8Array(f) : S.input = f, S.next_in = 0, S.avail_in = S.input.length;
|
|
4407
4439
|
do {
|
|
4408
4440
|
if (S.avail_out === 0 && (S.output = new s.Buf8(z), S.next_out = 0, S.avail_out = z), (_ = r.deflate(S, C)) !== 1 && _ !== u) return this.onEnd(_), !(this.ended = !0);
|
|
4409
4441
|
S.avail_out !== 0 && (S.avail_in !== 0 || C !== 4 && C !== 2) || (this.options.to === "string" ? this.onData(o.buf2binstring(s.shrinkBuf(S.output, S.next_out))) : this.onData(s.shrinkBuf(S.output, S.next_out)));
|
|
@@ -4413,18 +4445,18 @@ function fe() {
|
|
|
4413
4445
|
this.chunks.push(f);
|
|
4414
4446
|
}, h.prototype.onEnd = function(f) {
|
|
4415
4447
|
f === u && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = s.flattenChunks(this.chunks)), this.chunks = [], this.err = f, this.msg = this.strm.msg;
|
|
4416
|
-
}, n.Deflate = h, n.deflate = p, n.deflateRaw = function(f,
|
|
4417
|
-
return (
|
|
4418
|
-
}, n.gzip = function(f,
|
|
4419
|
-
return (
|
|
4448
|
+
}, n.Deflate = h, n.deflate = p, n.deflateRaw = function(f, b) {
|
|
4449
|
+
return (b = b || {}).raw = !0, p(f, b);
|
|
4450
|
+
}, n.gzip = function(f, b) {
|
|
4451
|
+
return (b = b || {}).gzip = !0, p(f, b);
|
|
4420
4452
|
};
|
|
4421
4453
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e, i, n) {
|
|
4422
|
-
var r = e("./zlib/inflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/constants"), g = e("./zlib/messages"),
|
|
4454
|
+
var r = e("./zlib/inflate"), s = e("./utils/common"), o = e("./utils/strings"), l = e("./zlib/constants"), g = e("./zlib/messages"), w = e("./zlib/zstream"), u = e("./zlib/gzheader"), y = Object.prototype.toString;
|
|
4423
4455
|
function c(h) {
|
|
4424
4456
|
if (!(this instanceof c)) return new c(h);
|
|
4425
4457
|
this.options = s.assign({ chunkSize: 16384, windowBits: 0, to: "" }, h || {});
|
|
4426
4458
|
var p = this.options;
|
|
4427
|
-
p.raw && 0 <= p.windowBits && p.windowBits < 16 && (p.windowBits = -p.windowBits, p.windowBits === 0 && (p.windowBits = -15)), !(0 <= p.windowBits && p.windowBits < 16) || h && h.windowBits || (p.windowBits += 32), 15 < p.windowBits && p.windowBits < 48 && (15 & p.windowBits) == 0 && (p.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new
|
|
4459
|
+
p.raw && 0 <= p.windowBits && p.windowBits < 16 && (p.windowBits = -p.windowBits, p.windowBits === 0 && (p.windowBits = -15)), !(0 <= p.windowBits && p.windowBits < 16) || h && h.windowBits || (p.windowBits += 32), 15 < p.windowBits && p.windowBits < 48 && (15 & p.windowBits) == 0 && (p.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new w(), this.strm.avail_out = 0;
|
|
4428
4460
|
var f = r.inflateInit2(this.strm, p.windowBits);
|
|
4429
4461
|
if (f !== l.Z_OK) throw new Error(g[f]);
|
|
4430
4462
|
this.header = new u(), r.inflateGetHeader(this.strm, this.header);
|
|
@@ -4435,14 +4467,14 @@ function fe() {
|
|
|
4435
4467
|
return f.result;
|
|
4436
4468
|
}
|
|
4437
4469
|
c.prototype.push = function(h, p) {
|
|
4438
|
-
var f,
|
|
4470
|
+
var f, b, _, C, S, z, B = this.strm, O = this.options.chunkSize, T = this.options.dictionary, H = !1;
|
|
4439
4471
|
if (this.ended) return !1;
|
|
4440
|
-
|
|
4472
|
+
b = p === ~~p ? p : p === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof h == "string" ? B.input = o.binstring2buf(h) : y.call(h) === "[object ArrayBuffer]" ? B.input = new Uint8Array(h) : B.input = h, B.next_in = 0, B.avail_in = B.input.length;
|
|
4441
4473
|
do {
|
|
4442
|
-
if (B.avail_out === 0 && (B.output = new s.Buf8(O), B.next_out = 0, B.avail_out = O), (f = r.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT &&
|
|
4443
|
-
B.next_out && (B.avail_out !== 0 && f !== l.Z_STREAM_END && (B.avail_in !== 0 ||
|
|
4474
|
+
if (B.avail_out === 0 && (B.output = new s.Buf8(O), B.next_out = 0, B.avail_out = O), (f = r.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && T && (z = typeof T == "string" ? o.string2buf(T) : y.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, f = r.inflateSetDictionary(this.strm, z)), f === l.Z_BUF_ERROR && H === !0 && (f = l.Z_OK, H = !1), f !== l.Z_STREAM_END && f !== l.Z_OK) return this.onEnd(f), !(this.ended = !0);
|
|
4475
|
+
B.next_out && (B.avail_out !== 0 && f !== l.Z_STREAM_END && (B.avail_in !== 0 || b !== l.Z_FINISH && b !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (_ = o.utf8border(B.output, B.next_out), C = B.next_out - _, S = o.buf2string(B.output, _), B.next_out = C, B.avail_out = O - C, C && s.arraySet(B.output, B.output, _, C, 0), this.onData(S)) : this.onData(s.shrinkBuf(B.output, B.next_out)))), B.avail_in === 0 && B.avail_out === 0 && (H = !0);
|
|
4444
4476
|
} while ((0 < B.avail_in || B.avail_out === 0) && f !== l.Z_STREAM_END);
|
|
4445
|
-
return f === l.Z_STREAM_END && (
|
|
4477
|
+
return f === l.Z_STREAM_END && (b = l.Z_FINISH), b === l.Z_FINISH ? (f = r.inflateEnd(this.strm), this.onEnd(f), this.ended = !0, f === l.Z_OK) : b !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(B.avail_out = 0));
|
|
4446
4478
|
}, c.prototype.onData = function(h) {
|
|
4447
4479
|
this.chunks.push(h);
|
|
4448
4480
|
}, c.prototype.onEnd = function(h) {
|
|
@@ -4454,26 +4486,26 @@ function fe() {
|
|
|
4454
4486
|
var r = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
4455
4487
|
n.assign = function(l) {
|
|
4456
4488
|
for (var g = Array.prototype.slice.call(arguments, 1); g.length; ) {
|
|
4457
|
-
var
|
|
4458
|
-
if (
|
|
4459
|
-
if (typeof
|
|
4460
|
-
for (var u in
|
|
4489
|
+
var w = g.shift();
|
|
4490
|
+
if (w) {
|
|
4491
|
+
if (typeof w != "object") throw new TypeError(w + "must be non-object");
|
|
4492
|
+
for (var u in w) w.hasOwnProperty(u) && (l[u] = w[u]);
|
|
4461
4493
|
}
|
|
4462
4494
|
}
|
|
4463
4495
|
return l;
|
|
4464
4496
|
}, n.shrinkBuf = function(l, g) {
|
|
4465
4497
|
return l.length === g ? l : l.subarray ? l.subarray(0, g) : (l.length = g, l);
|
|
4466
4498
|
};
|
|
4467
|
-
var s = { arraySet: function(l, g,
|
|
4468
|
-
if (g.subarray && l.subarray) l.set(g.subarray(
|
|
4469
|
-
else for (var c = 0; c < u; c++) l[y + c] = g[
|
|
4499
|
+
var s = { arraySet: function(l, g, w, u, y) {
|
|
4500
|
+
if (g.subarray && l.subarray) l.set(g.subarray(w, w + u), y);
|
|
4501
|
+
else for (var c = 0; c < u; c++) l[y + c] = g[w + c];
|
|
4470
4502
|
}, flattenChunks: function(l) {
|
|
4471
|
-
var g,
|
|
4472
|
-
for (g = u = 0,
|
|
4473
|
-
for (m = new Uint8Array(u), g = y = 0,
|
|
4503
|
+
var g, w, u, y, c, m;
|
|
4504
|
+
for (g = u = 0, w = l.length; g < w; g++) u += l[g].length;
|
|
4505
|
+
for (m = new Uint8Array(u), g = y = 0, w = l.length; g < w; g++) c = l[g], m.set(c, y), y += c.length;
|
|
4474
4506
|
return m;
|
|
4475
|
-
} }, o = { arraySet: function(l, g,
|
|
4476
|
-
for (var c = 0; c < u; c++) l[y + c] = g[
|
|
4507
|
+
} }, o = { arraySet: function(l, g, w, u, y) {
|
|
4508
|
+
for (var c = 0; c < u; c++) l[y + c] = g[w + c];
|
|
4477
4509
|
}, flattenChunks: function(l) {
|
|
4478
4510
|
return [].concat.apply([], l);
|
|
4479
4511
|
} };
|
|
@@ -4493,30 +4525,30 @@ function fe() {
|
|
|
4493
4525
|
o = !1;
|
|
4494
4526
|
}
|
|
4495
4527
|
for (var l = new r.Buf8(256), g = 0; g < 256; g++) l[g] = 252 <= g ? 6 : 248 <= g ? 5 : 240 <= g ? 4 : 224 <= g ? 3 : 192 <= g ? 2 : 1;
|
|
4496
|
-
function
|
|
4528
|
+
function w(u, y) {
|
|
4497
4529
|
if (y < 65537 && (u.subarray && o || !u.subarray && s)) return String.fromCharCode.apply(null, r.shrinkBuf(u, y));
|
|
4498
4530
|
for (var c = "", m = 0; m < y; m++) c += String.fromCharCode(u[m]);
|
|
4499
4531
|
return c;
|
|
4500
4532
|
}
|
|
4501
4533
|
l[254] = l[254] = 1, n.string2buf = function(u) {
|
|
4502
|
-
var y, c, m, h, p, f = u.length,
|
|
4503
|
-
for (h = 0; h < f; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++),
|
|
4504
|
-
for (y = new r.Buf8(
|
|
4534
|
+
var y, c, m, h, p, f = u.length, b = 0;
|
|
4535
|
+
for (h = 0; h < f; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++), b += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4;
|
|
4536
|
+
for (y = new r.Buf8(b), h = p = 0; p < b; h++) (64512 & (c = u.charCodeAt(h))) == 55296 && h + 1 < f && (64512 & (m = u.charCodeAt(h + 1))) == 56320 && (c = 65536 + (c - 55296 << 10) + (m - 56320), h++), c < 128 ? y[p++] = c : (c < 2048 ? y[p++] = 192 | c >>> 6 : (c < 65536 ? y[p++] = 224 | c >>> 12 : (y[p++] = 240 | c >>> 18, y[p++] = 128 | c >>> 12 & 63), y[p++] = 128 | c >>> 6 & 63), y[p++] = 128 | 63 & c);
|
|
4505
4537
|
return y;
|
|
4506
4538
|
}, n.buf2binstring = function(u) {
|
|
4507
|
-
return
|
|
4539
|
+
return w(u, u.length);
|
|
4508
4540
|
}, n.binstring2buf = function(u) {
|
|
4509
4541
|
for (var y = new r.Buf8(u.length), c = 0, m = y.length; c < m; c++) y[c] = u.charCodeAt(c);
|
|
4510
4542
|
return y;
|
|
4511
4543
|
}, n.buf2string = function(u, y) {
|
|
4512
|
-
var c, m, h, p, f = y || u.length,
|
|
4513
|
-
for (c = m = 0; c < f; ) if ((h = u[c++]) < 128)
|
|
4514
|
-
else if (4 < (p = l[h]))
|
|
4544
|
+
var c, m, h, p, f = y || u.length, b = new Array(2 * f);
|
|
4545
|
+
for (c = m = 0; c < f; ) if ((h = u[c++]) < 128) b[m++] = h;
|
|
4546
|
+
else if (4 < (p = l[h])) b[m++] = 65533, c += p - 1;
|
|
4515
4547
|
else {
|
|
4516
4548
|
for (h &= p === 2 ? 31 : p === 3 ? 15 : 7; 1 < p && c < f; ) h = h << 6 | 63 & u[c++], p--;
|
|
4517
|
-
1 < p ?
|
|
4549
|
+
1 < p ? b[m++] = 65533 : h < 65536 ? b[m++] = h : (h -= 65536, b[m++] = 55296 | h >> 10 & 1023, b[m++] = 56320 | 1023 & h);
|
|
4518
4550
|
}
|
|
4519
|
-
return b
|
|
4551
|
+
return w(b, m);
|
|
4520
4552
|
}, n.utf8border = function(u, y) {
|
|
4521
4553
|
var c;
|
|
4522
4554
|
for ((y = y || u.length) > u.length && (y = u.length), c = y - 1; 0 <= c && (192 & u[c]) == 128; ) c--;
|
|
@@ -4524,11 +4556,11 @@ function fe() {
|
|
|
4524
4556
|
};
|
|
4525
4557
|
}, { "./common": 41 }], 43: [function(e, i, n) {
|
|
4526
4558
|
i.exports = function(r, s, o, l) {
|
|
4527
|
-
for (var g = 65535 & r | 0,
|
|
4528
|
-
for (o -= u = 2e3 < o ? 2e3 : o;
|
|
4529
|
-
g %= 65521,
|
|
4559
|
+
for (var g = 65535 & r | 0, w = r >>> 16 & 65535 | 0, u = 0; o !== 0; ) {
|
|
4560
|
+
for (o -= u = 2e3 < o ? 2e3 : o; w = w + (g = g + s[l++] | 0) | 0, --u; ) ;
|
|
4561
|
+
g %= 65521, w %= 65521;
|
|
4530
4562
|
}
|
|
4531
|
-
return g |
|
|
4563
|
+
return g | w << 16 | 0;
|
|
4532
4564
|
};
|
|
4533
4565
|
}, {}], 44: [function(e, i, n) {
|
|
4534
4566
|
i.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
|
@@ -4542,15 +4574,15 @@ function fe() {
|
|
|
4542
4574
|
return o;
|
|
4543
4575
|
})();
|
|
4544
4576
|
i.exports = function(s, o, l, g) {
|
|
4545
|
-
var
|
|
4577
|
+
var w = r, u = g + l;
|
|
4546
4578
|
s ^= -1;
|
|
4547
|
-
for (var y = g; y < u; y++) s = s >>> 8 ^
|
|
4579
|
+
for (var y = g; y < u; y++) s = s >>> 8 ^ w[255 & (s ^ o[y])];
|
|
4548
4580
|
return -1 ^ s;
|
|
4549
4581
|
};
|
|
4550
4582
|
}, {}], 46: [function(e, i, n) {
|
|
4551
|
-
var r, s = e("../utils/common"), o = e("./trees"), l = e("./adler32"), g = e("./crc32"),
|
|
4583
|
+
var r, s = e("../utils/common"), o = e("./trees"), l = e("./adler32"), g = e("./crc32"), w = e("./messages"), u = 0, y = 4, c = 0, m = -2, h = -1, p = 4, f = 2, b = 8, _ = 9, C = 286, S = 30, z = 19, B = 2 * C + 1, O = 15, T = 3, H = 258, X = H + T + 1, k = 42, D = 113, d = 1, R = 2, J = 3, W = 4;
|
|
4552
4584
|
function tt(a, L) {
|
|
4553
|
-
return a.msg =
|
|
4585
|
+
return a.msg = w[L], L;
|
|
4554
4586
|
}
|
|
4555
4587
|
function U(a) {
|
|
4556
4588
|
return (a << 1) - (4 < a ? 9 : 0);
|
|
@@ -4559,8 +4591,8 @@ function fe() {
|
|
|
4559
4591
|
for (var L = a.length; 0 <= --L; ) a[L] = 0;
|
|
4560
4592
|
}
|
|
4561
4593
|
function M(a) {
|
|
4562
|
-
var L = a.state,
|
|
4563
|
-
|
|
4594
|
+
var L = a.state, A = L.pending;
|
|
4595
|
+
A > a.avail_out && (A = a.avail_out), A !== 0 && (s.arraySet(a.output, L.pending_buf, L.pending_out, A, a.next_out), a.next_out += A, L.pending_out += A, a.total_out += A, a.avail_out -= A, L.pending -= A, L.pending === 0 && (L.pending_out = 0));
|
|
4564
4596
|
}
|
|
4565
4597
|
function I(a, L) {
|
|
4566
4598
|
o._tr_flush_block(a, 0 <= a.block_start ? a.block_start : -1, a.strstart - a.block_start, L), a.block_start = a.strstart, M(a.strm);
|
|
@@ -4572,14 +4604,14 @@ function fe() {
|
|
|
4572
4604
|
a.pending_buf[a.pending++] = L >>> 8 & 255, a.pending_buf[a.pending++] = 255 & L;
|
|
4573
4605
|
}
|
|
4574
4606
|
function K(a, L) {
|
|
4575
|
-
var
|
|
4607
|
+
var A, x, v = a.max_chain_length, N = a.strstart, P = a.prev_length, F = a.nice_match, E = a.strstart > a.w_size - X ? a.strstart - (a.w_size - X) : 0, j = a.window, G = a.w_mask, Z = a.prev, $ = a.strstart + H, rt = j[N + P - 1], it = j[N + P];
|
|
4576
4608
|
a.prev_length >= a.good_match && (v >>= 2), F > a.lookahead && (F = a.lookahead);
|
|
4577
4609
|
do
|
|
4578
|
-
if (j[(
|
|
4579
|
-
N += 2,
|
|
4610
|
+
if (j[(A = L) + P] === it && j[A + P - 1] === rt && j[A] === j[N] && j[++A] === j[N + 1]) {
|
|
4611
|
+
N += 2, A++;
|
|
4580
4612
|
do
|
|
4581
4613
|
;
|
|
4582
|
-
while (j[++N] === j[++
|
|
4614
|
+
while (j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && j[++N] === j[++A] && N < $);
|
|
4583
4615
|
if (x = H - ($ - N), N = $ - H, P < x) {
|
|
4584
4616
|
if (a.match_start = L, F <= (P = x)) break;
|
|
4585
4617
|
rt = j[N + P - 1], it = j[N + P];
|
|
@@ -4589,52 +4621,52 @@ function fe() {
|
|
|
4589
4621
|
return P <= a.lookahead ? P : a.lookahead;
|
|
4590
4622
|
}
|
|
4591
4623
|
function st(a) {
|
|
4592
|
-
var L,
|
|
4624
|
+
var L, A, x, v, N, P, F, E, j, G, Z = a.w_size;
|
|
4593
4625
|
do {
|
|
4594
4626
|
if (v = a.window_size - a.lookahead - a.strstart, a.strstart >= Z + (Z - X)) {
|
|
4595
|
-
for (s.arraySet(a.window, a.window, Z, Z, 0), a.match_start -= Z, a.strstart -= Z, a.block_start -= Z, L =
|
|
4596
|
-
for (L =
|
|
4627
|
+
for (s.arraySet(a.window, a.window, Z, Z, 0), a.match_start -= Z, a.strstart -= Z, a.block_start -= Z, L = A = a.hash_size; x = a.head[--L], a.head[L] = Z <= x ? x - Z : 0, --A; ) ;
|
|
4628
|
+
for (L = A = Z; x = a.prev[--L], a.prev[L] = Z <= x ? x - Z : 0, --A; ) ;
|
|
4597
4629
|
v += Z;
|
|
4598
4630
|
}
|
|
4599
4631
|
if (a.strm.avail_in === 0) break;
|
|
4600
|
-
if (P = a.strm, F = a.window, E = a.strstart + a.lookahead, j = v, G = void 0, G = P.avail_in, j < G && (G = j),
|
|
4632
|
+
if (P = a.strm, F = a.window, E = a.strstart + a.lookahead, j = v, G = void 0, G = P.avail_in, j < G && (G = j), A = G === 0 ? 0 : (P.avail_in -= G, s.arraySet(F, P.input, P.next_in, G, E), P.state.wrap === 1 ? P.adler = l(P.adler, F, G, E) : P.state.wrap === 2 && (P.adler = g(P.adler, F, G, E)), P.next_in += G, P.total_in += G, G), a.lookahead += A, a.lookahead + a.insert >= T) for (N = a.strstart - a.insert, a.ins_h = a.window[N], a.ins_h = (a.ins_h << a.hash_shift ^ a.window[N + 1]) & a.hash_mask; a.insert && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[N + T - 1]) & a.hash_mask, a.prev[N & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = N, N++, a.insert--, !(a.lookahead + a.insert < T)); ) ;
|
|
4601
4633
|
} while (a.lookahead < X && a.strm.avail_in !== 0);
|
|
4602
4634
|
}
|
|
4603
4635
|
function lt(a, L) {
|
|
4604
|
-
for (var
|
|
4636
|
+
for (var A, x; ; ) {
|
|
4605
4637
|
if (a.lookahead < X) {
|
|
4606
4638
|
if (st(a), a.lookahead < X && L === u) return d;
|
|
4607
4639
|
if (a.lookahead === 0) break;
|
|
4608
4640
|
}
|
|
4609
|
-
if (
|
|
4610
|
-
for (a.match_length--; a.strstart++, a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart +
|
|
4641
|
+
if (A = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), A !== 0 && a.strstart - A <= a.w_size - X && (a.match_length = K(a, A)), a.match_length >= T) if (x = o._tr_tally(a, a.strstart - a.match_start, a.match_length - T), a.lookahead -= a.match_length, a.match_length <= a.max_lazy_match && a.lookahead >= T) {
|
|
4642
|
+
for (a.match_length--; a.strstart++, a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart, --a.match_length != 0; ) ;
|
|
4611
4643
|
a.strstart++;
|
|
4612
4644
|
} else a.strstart += a.match_length, a.match_length = 0, a.ins_h = a.window[a.strstart], a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + 1]) & a.hash_mask;
|
|
4613
4645
|
else x = o._tr_tally(a, 0, a.window[a.strstart]), a.lookahead--, a.strstart++;
|
|
4614
4646
|
if (x && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4615
4647
|
}
|
|
4616
|
-
return a.insert = a.strstart <
|
|
4648
|
+
return a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? d : R;
|
|
4617
4649
|
}
|
|
4618
4650
|
function et(a, L) {
|
|
4619
|
-
for (var
|
|
4651
|
+
for (var A, x, v; ; ) {
|
|
4620
4652
|
if (a.lookahead < X) {
|
|
4621
4653
|
if (st(a), a.lookahead < X && L === u) return d;
|
|
4622
4654
|
if (a.lookahead === 0) break;
|
|
4623
4655
|
}
|
|
4624
|
-
if (
|
|
4625
|
-
for (v = a.strstart + a.lookahead -
|
|
4626
|
-
if (a.match_available = 0, a.match_length =
|
|
4656
|
+
if (A = 0, a.lookahead >= T && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), a.prev_length = a.match_length, a.prev_match = a.match_start, a.match_length = T - 1, A !== 0 && a.prev_length < a.max_lazy_match && a.strstart - A <= a.w_size - X && (a.match_length = K(a, A), a.match_length <= 5 && (a.strategy === 1 || a.match_length === T && 4096 < a.strstart - a.match_start) && (a.match_length = T - 1)), a.prev_length >= T && a.match_length <= a.prev_length) {
|
|
4657
|
+
for (v = a.strstart + a.lookahead - T, x = o._tr_tally(a, a.strstart - 1 - a.prev_match, a.prev_length - T), a.lookahead -= a.prev_length - 1, a.prev_length -= 2; ++a.strstart <= v && (a.ins_h = (a.ins_h << a.hash_shift ^ a.window[a.strstart + T - 1]) & a.hash_mask, A = a.prev[a.strstart & a.w_mask] = a.head[a.ins_h], a.head[a.ins_h] = a.strstart), --a.prev_length != 0; ) ;
|
|
4658
|
+
if (a.match_available = 0, a.match_length = T - 1, a.strstart++, x && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4627
4659
|
} else if (a.match_available) {
|
|
4628
4660
|
if ((x = o._tr_tally(a, 0, a.window[a.strstart - 1])) && I(a, !1), a.strstart++, a.lookahead--, a.strm.avail_out === 0) return d;
|
|
4629
4661
|
} else a.match_available = 1, a.strstart++, a.lookahead--;
|
|
4630
4662
|
}
|
|
4631
|
-
return a.match_available && (x = o._tr_tally(a, 0, a.window[a.strstart - 1]), a.match_available = 0), a.insert = a.strstart <
|
|
4663
|
+
return a.match_available && (x = o._tr_tally(a, 0, a.window[a.strstart - 1]), a.match_available = 0), a.insert = a.strstart < T - 1 ? a.strstart : T - 1, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : a.last_lit && (I(a, !1), a.strm.avail_out === 0) ? d : R;
|
|
4632
4664
|
}
|
|
4633
|
-
function nt(a, L,
|
|
4634
|
-
this.good_length = a, this.max_lazy = L, this.nice_length =
|
|
4665
|
+
function nt(a, L, A, x, v) {
|
|
4666
|
+
this.good_length = a, this.max_lazy = L, this.nice_length = A, this.max_chain = x, this.func = v;
|
|
4635
4667
|
}
|
|
4636
4668
|
function dt() {
|
|
4637
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method =
|
|
4669
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = b, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new s.Buf16(2 * B), this.dyn_dtree = new s.Buf16(2 * (2 * S + 1)), this.bl_tree = new s.Buf16(2 * (2 * z + 1)), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new s.Buf16(O + 1), this.heap = new s.Buf16(2 * C + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new s.Buf16(2 * C + 1), q(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
4638
4670
|
}
|
|
4639
4671
|
function ot(a) {
|
|
4640
4672
|
var L;
|
|
@@ -4642,41 +4674,41 @@ function fe() {
|
|
|
4642
4674
|
}
|
|
4643
4675
|
function ft(a) {
|
|
4644
4676
|
var L = ot(a);
|
|
4645
|
-
return L === c && (function(
|
|
4646
|
-
|
|
4677
|
+
return L === c && (function(A) {
|
|
4678
|
+
A.window_size = 2 * A.w_size, q(A.head), A.max_lazy_match = r[A.level].max_lazy, A.good_match = r[A.level].good_length, A.nice_match = r[A.level].nice_length, A.max_chain_length = r[A.level].max_chain, A.strstart = 0, A.block_start = 0, A.lookahead = 0, A.insert = 0, A.match_length = A.prev_length = T - 1, A.match_available = 0, A.ins_h = 0;
|
|
4647
4679
|
})(a.state), L;
|
|
4648
4680
|
}
|
|
4649
|
-
function ut(a, L,
|
|
4681
|
+
function ut(a, L, A, x, v, N) {
|
|
4650
4682
|
if (!a) return m;
|
|
4651
4683
|
var P = 1;
|
|
4652
|
-
if (L === h && (L = 6), x < 0 ? (P = 0, x = -x) : 15 < x && (P = 2, x -= 16), v < 1 || _ < v ||
|
|
4684
|
+
if (L === h && (L = 6), x < 0 ? (P = 0, x = -x) : 15 < x && (P = 2, x -= 16), v < 1 || _ < v || A !== b || x < 8 || 15 < x || L < 0 || 9 < L || N < 0 || p < N) return tt(a, m);
|
|
4653
4685
|
x === 8 && (x = 9);
|
|
4654
4686
|
var F = new dt();
|
|
4655
|
-
return (a.state = F).strm = a, F.wrap = P, F.gzhead = null, F.w_bits = x, F.w_size = 1 << F.w_bits, F.w_mask = F.w_size - 1, F.hash_bits = v + 7, F.hash_size = 1 << F.hash_bits, F.hash_mask = F.hash_size - 1, F.hash_shift = ~~((F.hash_bits +
|
|
4687
|
+
return (a.state = F).strm = a, F.wrap = P, F.gzhead = null, F.w_bits = x, F.w_size = 1 << F.w_bits, F.w_mask = F.w_size - 1, F.hash_bits = v + 7, F.hash_size = 1 << F.hash_bits, F.hash_mask = F.hash_size - 1, F.hash_shift = ~~((F.hash_bits + T - 1) / T), F.window = new s.Buf8(2 * F.w_size), F.head = new s.Buf16(F.hash_size), F.prev = new s.Buf16(F.w_size), F.lit_bufsize = 1 << v + 6, F.pending_buf_size = 4 * F.lit_bufsize, F.pending_buf = new s.Buf8(F.pending_buf_size), F.d_buf = 1 * F.lit_bufsize, F.l_buf = 3 * F.lit_bufsize, F.level = L, F.strategy = N, F.method = A, ft(a);
|
|
4656
4688
|
}
|
|
4657
4689
|
r = [new nt(0, 0, 0, 0, function(a, L) {
|
|
4658
|
-
var
|
|
4659
|
-
for (
|
|
4690
|
+
var A = 65535;
|
|
4691
|
+
for (A > a.pending_buf_size - 5 && (A = a.pending_buf_size - 5); ; ) {
|
|
4660
4692
|
if (a.lookahead <= 1) {
|
|
4661
4693
|
if (st(a), a.lookahead === 0 && L === u) return d;
|
|
4662
4694
|
if (a.lookahead === 0) break;
|
|
4663
4695
|
}
|
|
4664
4696
|
a.strstart += a.lookahead, a.lookahead = 0;
|
|
4665
|
-
var x = a.block_start +
|
|
4697
|
+
var x = a.block_start + A;
|
|
4666
4698
|
if ((a.strstart === 0 || a.strstart >= x) && (a.lookahead = a.strstart - x, a.strstart = x, I(a, !1), a.strm.avail_out === 0) || a.strstart - a.block_start >= a.w_size - X && (I(a, !1), a.strm.avail_out === 0)) return d;
|
|
4667
4699
|
}
|
|
4668
4700
|
return a.insert = 0, L === y ? (I(a, !0), a.strm.avail_out === 0 ? J : W) : (a.strstart > a.block_start && (I(a, !1), a.strm.avail_out), d);
|
|
4669
4701
|
}), new nt(4, 4, 8, 4, lt), new nt(4, 5, 16, 8, lt), new nt(4, 6, 32, 32, lt), new nt(4, 4, 16, 16, et), new nt(8, 16, 32, 32, et), new nt(8, 16, 128, 128, et), new nt(8, 32, 128, 256, et), new nt(32, 128, 258, 1024, et), new nt(32, 258, 258, 4096, et)], n.deflateInit = function(a, L) {
|
|
4670
|
-
return ut(a, L,
|
|
4702
|
+
return ut(a, L, b, 15, 8, 0);
|
|
4671
4703
|
}, n.deflateInit2 = ut, n.deflateReset = ft, n.deflateResetKeep = ot, n.deflateSetHeader = function(a, L) {
|
|
4672
4704
|
return a && a.state ? a.state.wrap !== 2 ? m : (a.state.gzhead = L, c) : m;
|
|
4673
4705
|
}, n.deflate = function(a, L) {
|
|
4674
|
-
var
|
|
4706
|
+
var A, x, v, N;
|
|
4675
4707
|
if (!a || !a.state || 5 < L || L < 0) return a ? tt(a, m) : m;
|
|
4676
4708
|
if (x = a.state, !a.output || !a.input && a.avail_in !== 0 || x.status === 666 && L !== y) return tt(a, a.avail_out === 0 ? -5 : m);
|
|
4677
|
-
if (x.strm = a,
|
|
4709
|
+
if (x.strm = a, A = x.last_flush, x.last_flush = L, x.status === k) if (x.wrap === 2) a.adler = 0, V(x, 31), V(x, 139), V(x, 8), x.gzhead ? (V(x, (x.gzhead.text ? 1 : 0) + (x.gzhead.hcrc ? 2 : 0) + (x.gzhead.extra ? 4 : 0) + (x.gzhead.name ? 8 : 0) + (x.gzhead.comment ? 16 : 0)), V(x, 255 & x.gzhead.time), V(x, x.gzhead.time >> 8 & 255), V(x, x.gzhead.time >> 16 & 255), V(x, x.gzhead.time >> 24 & 255), V(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), V(x, 255 & x.gzhead.os), x.gzhead.extra && x.gzhead.extra.length && (V(x, 255 & x.gzhead.extra.length), V(x, x.gzhead.extra.length >> 8 & 255)), x.gzhead.hcrc && (a.adler = g(a.adler, x.pending_buf, x.pending, 0)), x.gzindex = 0, x.status = 69) : (V(x, 0), V(x, 0), V(x, 0), V(x, 0), V(x, 0), V(x, x.level === 9 ? 2 : 2 <= x.strategy || x.level < 2 ? 4 : 0), V(x, 3), x.status = D);
|
|
4678
4710
|
else {
|
|
4679
|
-
var P =
|
|
4711
|
+
var P = b + (x.w_bits - 8 << 4) << 8;
|
|
4680
4712
|
P |= (2 <= x.strategy || x.level < 2 ? 0 : x.level < 6 ? 1 : x.level === 6 ? 2 : 3) << 6, x.strstart !== 0 && (P |= 32), P += 31 - P % 31, x.status = D, Y(x, P), x.strstart !== 0 && (Y(x, a.adler >>> 16), Y(x, 65535 & a.adler)), a.adler = 1;
|
|
4681
4713
|
}
|
|
4682
4714
|
if (x.status === 69) if (x.gzhead.extra) {
|
|
@@ -4707,7 +4739,7 @@ function fe() {
|
|
|
4707
4739
|
} else x.status = 103;
|
|
4708
4740
|
if (x.status === 103 && (x.gzhead.hcrc ? (x.pending + 2 > x.pending_buf_size && M(a), x.pending + 2 <= x.pending_buf_size && (V(x, 255 & a.adler), V(x, a.adler >> 8 & 255), a.adler = 0, x.status = D)) : x.status = D), x.pending !== 0) {
|
|
4709
4741
|
if (M(a), a.avail_out === 0) return x.last_flush = -1, c;
|
|
4710
|
-
} else if (a.avail_in === 0 && U(L) <= U(
|
|
4742
|
+
} else if (a.avail_in === 0 && U(L) <= U(A) && L !== y) return tt(a, -5);
|
|
4711
4743
|
if (x.status === 666 && a.avail_in !== 0) return tt(a, -5);
|
|
4712
4744
|
if (a.avail_in !== 0 || x.lookahead !== 0 || L !== u && x.status !== 666) {
|
|
4713
4745
|
var F = x.strategy === 2 ? (function(E, j) {
|
|
@@ -4725,14 +4757,14 @@ function fe() {
|
|
|
4725
4757
|
if (st(E), E.lookahead <= H && j === u) return d;
|
|
4726
4758
|
if (E.lookahead === 0) break;
|
|
4727
4759
|
}
|
|
4728
|
-
if (E.match_length = 0, E.lookahead >=
|
|
4760
|
+
if (E.match_length = 0, E.lookahead >= T && 0 < E.strstart && (Z = it[$ = E.strstart - 1]) === it[++$] && Z === it[++$] && Z === it[++$]) {
|
|
4729
4761
|
rt = E.strstart + H;
|
|
4730
4762
|
do
|
|
4731
4763
|
;
|
|
4732
4764
|
while (Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && Z === it[++$] && $ < rt);
|
|
4733
4765
|
E.match_length = H - (rt - $), E.match_length > E.lookahead && (E.match_length = E.lookahead);
|
|
4734
4766
|
}
|
|
4735
|
-
if (E.match_length >=
|
|
4767
|
+
if (E.match_length >= T ? (G = o._tr_tally(E, 1, E.match_length - T), E.lookahead -= E.match_length, E.strstart += E.match_length, E.match_length = 0) : (G = o._tr_tally(E, 0, E.window[E.strstart]), E.lookahead--, E.strstart++), G && (I(E, !1), E.strm.avail_out === 0)) return d;
|
|
4736
4768
|
}
|
|
4737
4769
|
return E.insert = 0, j === y ? (I(E, !0), E.strm.avail_out === 0 ? J : W) : E.last_lit && (I(E, !1), E.strm.avail_out === 0) ? d : R;
|
|
4738
4770
|
})(x, L) : r[x.level].func(x, L);
|
|
@@ -4744,13 +4776,13 @@ function fe() {
|
|
|
4744
4776
|
var L;
|
|
4745
4777
|
return a && a.state ? (L = a.state.status) !== k && L !== 69 && L !== 73 && L !== 91 && L !== 103 && L !== D && L !== 666 ? tt(a, m) : (a.state = null, L === D ? tt(a, -3) : c) : m;
|
|
4746
4778
|
}, n.deflateSetDictionary = function(a, L) {
|
|
4747
|
-
var
|
|
4748
|
-
if (!a || !a.state || (N = (
|
|
4749
|
-
for (N === 1 && (a.adler = l(a.adler, L, G, 0)),
|
|
4750
|
-
for (x =
|
|
4751
|
-
|
|
4779
|
+
var A, x, v, N, P, F, E, j, G = L.length;
|
|
4780
|
+
if (!a || !a.state || (N = (A = a.state).wrap) === 2 || N === 1 && A.status !== k || A.lookahead) return m;
|
|
4781
|
+
for (N === 1 && (a.adler = l(a.adler, L, G, 0)), A.wrap = 0, G >= A.w_size && (N === 0 && (q(A.head), A.strstart = 0, A.block_start = 0, A.insert = 0), j = new s.Buf8(A.w_size), s.arraySet(j, L, G - A.w_size, A.w_size, 0), L = j, G = A.w_size), P = a.avail_in, F = a.next_in, E = a.input, a.avail_in = G, a.next_in = 0, a.input = L, st(A); A.lookahead >= T; ) {
|
|
4782
|
+
for (x = A.strstart, v = A.lookahead - (T - 1); A.ins_h = (A.ins_h << A.hash_shift ^ A.window[x + T - 1]) & A.hash_mask, A.prev[x & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = x, x++, --v; ) ;
|
|
4783
|
+
A.strstart = x, A.lookahead = T - 1, st(A);
|
|
4752
4784
|
}
|
|
4753
|
-
return
|
|
4785
|
+
return A.strstart += A.lookahead, A.block_start = A.strstart, A.insert = A.lookahead, A.lookahead = 0, A.match_length = A.prev_length = T - 1, A.match_available = 0, a.next_in = F, a.input = E, a.avail_in = P, A.wrap = N, c;
|
|
4754
4786
|
}, n.deflateInfo = "pako deflate (from Nodeca project)";
|
|
4755
4787
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, i, n) {
|
|
4756
4788
|
i.exports = function() {
|
|
@@ -4758,81 +4790,81 @@ function fe() {
|
|
|
4758
4790
|
};
|
|
4759
4791
|
}, {}], 48: [function(e, i, n) {
|
|
4760
4792
|
i.exports = function(r, s) {
|
|
4761
|
-
var o, l, g,
|
|
4762
|
-
o = r.state, l = r.next_in, d = r.input, g = l + (r.avail_in - 5),
|
|
4793
|
+
var o, l, g, w, u, y, c, m, h, p, f, b, _, C, S, z, B, O, T, H, X, k, D, d, R;
|
|
4794
|
+
o = r.state, l = r.next_in, d = r.input, g = l + (r.avail_in - 5), w = r.next_out, R = r.output, u = w - (s - r.avail_out), y = w + (r.avail_out - 257), c = o.dmax, m = o.wsize, h = o.whave, p = o.wnext, f = o.window, b = o.hold, _ = o.bits, C = o.lencode, S = o.distcode, z = (1 << o.lenbits) - 1, B = (1 << o.distbits) - 1;
|
|
4763
4795
|
t: do {
|
|
4764
|
-
_ < 15 && (
|
|
4796
|
+
_ < 15 && (b += d[l++] << _, _ += 8, b += d[l++] << _, _ += 8), O = C[b & z];
|
|
4765
4797
|
e: for (; ; ) {
|
|
4766
|
-
if (
|
|
4798
|
+
if (b >>>= T = O >>> 24, _ -= T, (T = O >>> 16 & 255) === 0) R[w++] = 65535 & O;
|
|
4767
4799
|
else {
|
|
4768
|
-
if (!(16 &
|
|
4769
|
-
if ((64 &
|
|
4770
|
-
O = C[(65535 & O) + (
|
|
4800
|
+
if (!(16 & T)) {
|
|
4801
|
+
if ((64 & T) == 0) {
|
|
4802
|
+
O = C[(65535 & O) + (b & (1 << T) - 1)];
|
|
4771
4803
|
continue e;
|
|
4772
4804
|
}
|
|
4773
|
-
if (32 &
|
|
4805
|
+
if (32 & T) {
|
|
4774
4806
|
o.mode = 12;
|
|
4775
4807
|
break t;
|
|
4776
4808
|
}
|
|
4777
4809
|
r.msg = "invalid literal/length code", o.mode = 30;
|
|
4778
4810
|
break t;
|
|
4779
4811
|
}
|
|
4780
|
-
H = 65535 & O, (
|
|
4812
|
+
H = 65535 & O, (T &= 15) && (_ < T && (b += d[l++] << _, _ += 8), H += b & (1 << T) - 1, b >>>= T, _ -= T), _ < 15 && (b += d[l++] << _, _ += 8, b += d[l++] << _, _ += 8), O = S[b & B];
|
|
4781
4813
|
i: for (; ; ) {
|
|
4782
|
-
if (
|
|
4783
|
-
if ((64 &
|
|
4784
|
-
O = S[(65535 & O) + (
|
|
4814
|
+
if (b >>>= T = O >>> 24, _ -= T, !(16 & (T = O >>> 16 & 255))) {
|
|
4815
|
+
if ((64 & T) == 0) {
|
|
4816
|
+
O = S[(65535 & O) + (b & (1 << T) - 1)];
|
|
4785
4817
|
continue i;
|
|
4786
4818
|
}
|
|
4787
4819
|
r.msg = "invalid distance code", o.mode = 30;
|
|
4788
4820
|
break t;
|
|
4789
4821
|
}
|
|
4790
|
-
if (X = 65535 & O, _ < (
|
|
4822
|
+
if (X = 65535 & O, _ < (T &= 15) && (b += d[l++] << _, (_ += 8) < T && (b += d[l++] << _, _ += 8)), c < (X += b & (1 << T) - 1)) {
|
|
4791
4823
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
4792
4824
|
break t;
|
|
4793
4825
|
}
|
|
4794
|
-
if (
|
|
4795
|
-
if (h < (
|
|
4826
|
+
if (b >>>= T, _ -= T, (T = w - u) < X) {
|
|
4827
|
+
if (h < (T = X - T) && o.sane) {
|
|
4796
4828
|
r.msg = "invalid distance too far back", o.mode = 30;
|
|
4797
4829
|
break t;
|
|
4798
4830
|
}
|
|
4799
4831
|
if (D = f, (k = 0) === p) {
|
|
4800
|
-
if (k += m -
|
|
4801
|
-
for (H -=
|
|
4802
|
-
k =
|
|
4832
|
+
if (k += m - T, T < H) {
|
|
4833
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4834
|
+
k = w - X, D = R;
|
|
4803
4835
|
}
|
|
4804
|
-
} else if (p <
|
|
4805
|
-
if (k += m + p -
|
|
4806
|
-
for (H -=
|
|
4836
|
+
} else if (p < T) {
|
|
4837
|
+
if (k += m + p - T, (T -= p) < H) {
|
|
4838
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4807
4839
|
if (k = 0, p < H) {
|
|
4808
|
-
for (H -=
|
|
4809
|
-
k =
|
|
4840
|
+
for (H -= T = p; R[w++] = f[k++], --T; ) ;
|
|
4841
|
+
k = w - X, D = R;
|
|
4810
4842
|
}
|
|
4811
4843
|
}
|
|
4812
|
-
} else if (k += p -
|
|
4813
|
-
for (H -=
|
|
4814
|
-
k =
|
|
4844
|
+
} else if (k += p - T, T < H) {
|
|
4845
|
+
for (H -= T; R[w++] = f[k++], --T; ) ;
|
|
4846
|
+
k = w - X, D = R;
|
|
4815
4847
|
}
|
|
4816
|
-
for (; 2 < H; ) R[
|
|
4817
|
-
H && (R[
|
|
4848
|
+
for (; 2 < H; ) R[w++] = D[k++], R[w++] = D[k++], R[w++] = D[k++], H -= 3;
|
|
4849
|
+
H && (R[w++] = D[k++], 1 < H && (R[w++] = D[k++]));
|
|
4818
4850
|
} else {
|
|
4819
|
-
for (k =
|
|
4820
|
-
H && (R[
|
|
4851
|
+
for (k = w - X; R[w++] = R[k++], R[w++] = R[k++], R[w++] = R[k++], 2 < (H -= 3); ) ;
|
|
4852
|
+
H && (R[w++] = R[k++], 1 < H && (R[w++] = R[k++]));
|
|
4821
4853
|
}
|
|
4822
4854
|
break;
|
|
4823
4855
|
}
|
|
4824
4856
|
}
|
|
4825
4857
|
break;
|
|
4826
4858
|
}
|
|
4827
|
-
} while (l < g &&
|
|
4828
|
-
l -= H = _ >> 3,
|
|
4859
|
+
} while (l < g && w < y);
|
|
4860
|
+
l -= H = _ >> 3, b &= (1 << (_ -= H << 3)) - 1, r.next_in = l, r.next_out = w, r.avail_in = l < g ? g - l + 5 : 5 - (l - g), r.avail_out = w < y ? y - w + 257 : 257 - (w - y), o.hold = b, o.bits = _;
|
|
4829
4861
|
};
|
|
4830
4862
|
}, {}], 49: [function(e, i, n) {
|
|
4831
|
-
var r = e("../utils/common"), s = e("./adler32"), o = e("./crc32"), l = e("./inffast"), g = e("./inftrees"),
|
|
4863
|
+
var r = e("../utils/common"), s = e("./adler32"), o = e("./crc32"), l = e("./inffast"), g = e("./inftrees"), w = 1, u = 2, y = 0, c = -2, m = 1, h = 852, p = 592;
|
|
4832
4864
|
function f(k) {
|
|
4833
4865
|
return (k >>> 24 & 255) + (k >>> 8 & 65280) + ((65280 & k) << 8) + ((255 & k) << 24);
|
|
4834
4866
|
}
|
|
4835
|
-
function
|
|
4867
|
+
function b() {
|
|
4836
4868
|
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new r.Buf16(320), this.work = new r.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
4837
4869
|
}
|
|
4838
4870
|
function _(k) {
|
|
@@ -4849,18 +4881,18 @@ function fe() {
|
|
|
4849
4881
|
}
|
|
4850
4882
|
function z(k, D) {
|
|
4851
4883
|
var d, R;
|
|
4852
|
-
return k ? (R = new
|
|
4884
|
+
return k ? (R = new b(), (k.state = R).window = null, (d = S(k, D)) !== y && (k.state = null), d) : c;
|
|
4853
4885
|
}
|
|
4854
|
-
var B, O,
|
|
4886
|
+
var B, O, T = !0;
|
|
4855
4887
|
function H(k) {
|
|
4856
|
-
if (
|
|
4888
|
+
if (T) {
|
|
4857
4889
|
var D;
|
|
4858
4890
|
for (B = new r.Buf32(512), O = new r.Buf32(32), D = 0; D < 144; ) k.lens[D++] = 8;
|
|
4859
4891
|
for (; D < 256; ) k.lens[D++] = 9;
|
|
4860
4892
|
for (; D < 280; ) k.lens[D++] = 7;
|
|
4861
4893
|
for (; D < 288; ) k.lens[D++] = 8;
|
|
4862
|
-
for (g(
|
|
4863
|
-
g(u, k.lens, 0, 32, O, 0, k.work, { bits: 5 }),
|
|
4894
|
+
for (g(w, k.lens, 0, 288, B, 0, k.work, { bits: 9 }), D = 0; D < 32; ) k.lens[D++] = 5;
|
|
4895
|
+
g(u, k.lens, 0, 32, O, 0, k.work, { bits: 5 }), T = !1;
|
|
4864
4896
|
}
|
|
4865
4897
|
k.lencode = B, k.lenbits = 9, k.distcode = O, k.distbits = 5;
|
|
4866
4898
|
}
|
|
@@ -4871,7 +4903,7 @@ function fe() {
|
|
|
4871
4903
|
n.inflateReset = C, n.inflateReset2 = S, n.inflateResetKeep = _, n.inflateInit = function(k) {
|
|
4872
4904
|
return z(k, 15);
|
|
4873
4905
|
}, n.inflateInit2 = z, n.inflate = function(k, D) {
|
|
4874
|
-
var d, R, J, W, tt, U, q, M, I, V, Y, K, st, lt, et, nt, dt, ot, ft, ut, a, L,
|
|
4906
|
+
var d, R, J, W, tt, U, q, M, I, V, Y, K, st, lt, et, nt, dt, ot, ft, ut, a, L, A, x, v = 0, N = new r.Buf8(4), P = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
4875
4907
|
if (!k || !k.state || !k.output || !k.input && k.avail_in !== 0) return c;
|
|
4876
4908
|
(d = k.state).mode === 12 && (d.mode = 13), tt = k.next_out, J = k.output, q = k.avail_out, W = k.next_in, R = k.input, U = k.avail_in, M = d.hold, I = d.bits, V = U, Y = q, L = y;
|
|
4877
4909
|
t: for (; ; ) switch (d.mode) {
|
|
@@ -5044,7 +5076,7 @@ function fe() {
|
|
|
5044
5076
|
d.lens[P[d.have++]] = 7 & M, M >>>= 3, I -= 3;
|
|
5045
5077
|
}
|
|
5046
5078
|
for (; d.have < 19; ) d.lens[P[d.have++]] = 0;
|
|
5047
|
-
if (d.lencode = d.lendyn, d.lenbits = 7,
|
|
5079
|
+
if (d.lencode = d.lendyn, d.lenbits = 7, A = { bits: d.lenbits }, L = g(0, d.lens, 0, 19, d.lencode, 0, d.work, A), d.lenbits = A.bits, L) {
|
|
5048
5080
|
k.msg = "invalid code lengths set", d.mode = 30;
|
|
5049
5081
|
break;
|
|
5050
5082
|
}
|
|
@@ -5092,11 +5124,11 @@ function fe() {
|
|
|
5092
5124
|
k.msg = "invalid code -- missing end-of-block", d.mode = 30;
|
|
5093
5125
|
break;
|
|
5094
5126
|
}
|
|
5095
|
-
if (d.lenbits = 9,
|
|
5127
|
+
if (d.lenbits = 9, A = { bits: d.lenbits }, L = g(w, d.lens, 0, d.nlen, d.lencode, 0, d.work, A), d.lenbits = A.bits, L) {
|
|
5096
5128
|
k.msg = "invalid literal/lengths set", d.mode = 30;
|
|
5097
5129
|
break;
|
|
5098
5130
|
}
|
|
5099
|
-
if (d.distbits = 6, d.distcode = d.distdyn,
|
|
5131
|
+
if (d.distbits = 6, d.distcode = d.distdyn, A = { bits: d.distbits }, L = g(u, d.lens, d.nlen, d.ndist, d.distcode, 0, d.work, A), d.distbits = A.bits, L) {
|
|
5100
5132
|
k.msg = "invalid distances set", d.mode = 30;
|
|
5101
5133
|
break;
|
|
5102
5134
|
}
|
|
@@ -5238,28 +5270,28 @@ function fe() {
|
|
|
5238
5270
|
}, n.inflateInfo = "pako inflate (from Nodeca project)";
|
|
5239
5271
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, i, n) {
|
|
5240
5272
|
var r = e("../utils/common"), s = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], l = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], g = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
5241
|
-
i.exports = function(
|
|
5242
|
-
var
|
|
5273
|
+
i.exports = function(w, u, y, c, m, h, p, f) {
|
|
5274
|
+
var b, _, C, S, z, B, O, T, H, X = f.bits, k = 0, D = 0, d = 0, R = 0, J = 0, W = 0, tt = 0, U = 0, q = 0, M = 0, I = null, V = 0, Y = new r.Buf16(16), K = new r.Buf16(16), st = null, lt = 0;
|
|
5243
5275
|
for (k = 0; k <= 15; k++) Y[k] = 0;
|
|
5244
5276
|
for (D = 0; D < c; D++) Y[u[y + D]]++;
|
|
5245
5277
|
for (J = X, R = 15; 1 <= R && Y[R] === 0; R--) ;
|
|
5246
5278
|
if (R < J && (J = R), R === 0) return m[h++] = 20971520, m[h++] = 20971520, f.bits = 1, 0;
|
|
5247
5279
|
for (d = 1; d < R && Y[d] === 0; d++) ;
|
|
5248
5280
|
for (J < d && (J = d), k = U = 1; k <= 15; k++) if (U <<= 1, (U -= Y[k]) < 0) return -1;
|
|
5249
|
-
if (0 < U && (
|
|
5281
|
+
if (0 < U && (w === 0 || R !== 1)) return -1;
|
|
5250
5282
|
for (K[1] = 0, k = 1; k < 15; k++) K[k + 1] = K[k] + Y[k];
|
|
5251
5283
|
for (D = 0; D < c; D++) u[y + D] !== 0 && (p[K[u[y + D]]++] = D);
|
|
5252
|
-
if (B =
|
|
5284
|
+
if (B = w === 0 ? (I = st = p, 19) : w === 1 ? (I = s, V -= 257, st = o, lt -= 257, 256) : (I = l, st = g, -1), k = d, z = h, tt = D = M = 0, C = -1, S = (q = 1 << (W = J)) - 1, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
5253
5285
|
for (; ; ) {
|
|
5254
|
-
for (O = k - tt, H = p[D] < B ? (
|
|
5255
|
-
for (
|
|
5256
|
-
if (
|
|
5286
|
+
for (O = k - tt, H = p[D] < B ? (T = 0, p[D]) : p[D] > B ? (T = st[lt + p[D]], I[V + p[D]]) : (T = 96, 0), b = 1 << k - tt, d = _ = 1 << W; m[z + (M >> tt) + (_ -= b)] = O << 24 | T << 16 | H | 0, _ !== 0; ) ;
|
|
5287
|
+
for (b = 1 << k - 1; M & b; ) b >>= 1;
|
|
5288
|
+
if (b !== 0 ? (M &= b - 1, M += b) : M = 0, D++, --Y[k] == 0) {
|
|
5257
5289
|
if (k === R) break;
|
|
5258
5290
|
k = u[y + p[D]];
|
|
5259
5291
|
}
|
|
5260
5292
|
if (J < k && (M & S) !== C) {
|
|
5261
5293
|
for (tt === 0 && (tt = J), z += d, U = 1 << (W = k - tt); W + tt < R && !((U -= Y[W + tt]) <= 0); ) W++, U <<= 1;
|
|
5262
|
-
if (q += 1 << W,
|
|
5294
|
+
if (q += 1 << W, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
5263
5295
|
m[C = M & S] = J << 24 | W << 16 | z - h | 0;
|
|
5264
5296
|
}
|
|
5265
5297
|
}
|
|
@@ -5272,7 +5304,7 @@ function fe() {
|
|
|
5272
5304
|
function l(v) {
|
|
5273
5305
|
for (var N = v.length; 0 <= --N; ) v[N] = 0;
|
|
5274
5306
|
}
|
|
5275
|
-
var g = 0,
|
|
5307
|
+
var g = 0, w = 29, u = 256, y = u + 1 + w, c = 30, m = 19, h = 2 * y + 1, p = 15, f = 16, b = 7, _ = 256, C = 16, S = 17, z = 18, B = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], O = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], H = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], X = new Array(2 * (y + 2));
|
|
5276
5308
|
l(X);
|
|
5277
5309
|
var k = new Array(2 * c);
|
|
5278
5310
|
l(k);
|
|
@@ -5280,7 +5312,7 @@ function fe() {
|
|
|
5280
5312
|
l(D);
|
|
5281
5313
|
var d = new Array(256);
|
|
5282
5314
|
l(d);
|
|
5283
|
-
var R = new Array(
|
|
5315
|
+
var R = new Array(w);
|
|
5284
5316
|
l(R);
|
|
5285
5317
|
var J, W, tt, U = new Array(c);
|
|
5286
5318
|
function q(v, N, P, F, E) {
|
|
@@ -5368,16 +5400,16 @@ function fe() {
|
|
|
5368
5400
|
}
|
|
5369
5401
|
}
|
|
5370
5402
|
l(U);
|
|
5371
|
-
var
|
|
5403
|
+
var A = !1;
|
|
5372
5404
|
function x(v, N, P, F) {
|
|
5373
5405
|
Y(v, (g << 1) + (F ? 1 : 0), 3), (function(E, j, G, Z) {
|
|
5374
5406
|
nt(E), V(E, G), V(E, ~G), r.arraySet(E.pending_buf, E.window, j, G, E.pending), E.pending += G;
|
|
5375
5407
|
})(v, N, P);
|
|
5376
5408
|
}
|
|
5377
5409
|
n._tr_init = function(v) {
|
|
5378
|
-
|
|
5410
|
+
A || ((function() {
|
|
5379
5411
|
var N, P, F, E, j, G = new Array(p + 1);
|
|
5380
|
-
for (E = F = 0; E <
|
|
5412
|
+
for (E = F = 0; E < w - 1; E++) for (R[E] = F, N = 0; N < 1 << B[E]; N++) d[F++] = E;
|
|
5381
5413
|
for (d[F - 1] = E, E = j = 0; E < 16; E++) for (U[E] = j, N = 0; N < 1 << O[E]; N++) D[j++] = E;
|
|
5382
5414
|
for (j >>= 7; E < c; E++) for (U[E] = j << 7, N = 0; N < 1 << O[E] - 7; N++) D[256 + j++] = E;
|
|
5383
5415
|
for (P = 0; P <= p; P++) G[P] = 0;
|
|
@@ -5386,8 +5418,8 @@ function fe() {
|
|
|
5386
5418
|
for (; N <= 279; ) X[2 * N + 1] = 7, N++, G[7]++;
|
|
5387
5419
|
for (; N <= 287; ) X[2 * N + 1] = 8, N++, G[8]++;
|
|
5388
5420
|
for (lt(X, y + 1, G), N = 0; N < c; N++) k[2 * N + 1] = 5, k[2 * N] = st(N, 5);
|
|
5389
|
-
J = new q(X, B, u + 1, y, p), W = new q(k, O, 0, c, p), tt = new q(new Array(0),
|
|
5390
|
-
})(),
|
|
5421
|
+
J = new q(X, B, u + 1, y, p), W = new q(k, O, 0, c, p), tt = new q(new Array(0), T, 0, m, b);
|
|
5422
|
+
})(), A = !0), v.l_desc = new M(v.dyn_ltree, J), v.d_desc = new M(v.dyn_dtree, W), v.bl_desc = new M(v.bl_tree, tt), v.bi_buf = 0, v.bi_valid = 0, et(v);
|
|
5391
5423
|
}, n._tr_stored_block = x, n._tr_flush_block = function(v, N, P, F) {
|
|
5392
5424
|
var E, j, G = 0;
|
|
5393
5425
|
0 < v.level ? (v.strm.data_type === 2 && (v.strm.data_type = (function(Z) {
|
|
@@ -5420,10 +5452,10 @@ function fe() {
|
|
|
5420
5452
|
(function(r) {
|
|
5421
5453
|
(function(s, o) {
|
|
5422
5454
|
if (!s.setImmediate) {
|
|
5423
|
-
var l, g,
|
|
5455
|
+
var l, g, w, u, y = 1, c = {}, m = !1, h = s.document, p = Object.getPrototypeOf && Object.getPrototypeOf(s);
|
|
5424
5456
|
p = p && p.setTimeout ? p : s, l = {}.toString.call(s.process) === "[object process]" ? function(C) {
|
|
5425
5457
|
process.nextTick(function() {
|
|
5426
|
-
|
|
5458
|
+
b(C);
|
|
5427
5459
|
});
|
|
5428
5460
|
} : (function() {
|
|
5429
5461
|
if (s.postMessage && !s.importScripts) {
|
|
@@ -5434,17 +5466,17 @@ function fe() {
|
|
|
5434
5466
|
}
|
|
5435
5467
|
})() ? (u = "setImmediate$" + Math.random() + "$", s.addEventListener ? s.addEventListener("message", _, !1) : s.attachEvent("onmessage", _), function(C) {
|
|
5436
5468
|
s.postMessage(u + C, "*");
|
|
5437
|
-
}) : s.MessageChannel ? ((
|
|
5438
|
-
|
|
5469
|
+
}) : s.MessageChannel ? ((w = new MessageChannel()).port1.onmessage = function(C) {
|
|
5470
|
+
b(C.data);
|
|
5439
5471
|
}, function(C) {
|
|
5440
|
-
|
|
5472
|
+
w.port2.postMessage(C);
|
|
5441
5473
|
}) : h && "onreadystatechange" in h.createElement("script") ? (g = h.documentElement, function(C) {
|
|
5442
5474
|
var S = h.createElement("script");
|
|
5443
5475
|
S.onreadystatechange = function() {
|
|
5444
|
-
|
|
5476
|
+
b(C), S.onreadystatechange = null, g.removeChild(S), S = null;
|
|
5445
5477
|
}, g.appendChild(S);
|
|
5446
5478
|
}) : function(C) {
|
|
5447
|
-
setTimeout(
|
|
5479
|
+
setTimeout(b, 0, C);
|
|
5448
5480
|
}, p.setImmediate = function(C) {
|
|
5449
5481
|
typeof C != "function" && (C = new Function("" + C));
|
|
5450
5482
|
for (var S = new Array(arguments.length - 1), z = 0; z < S.length; z++) S[z] = arguments[z + 1];
|
|
@@ -5455,8 +5487,8 @@ function fe() {
|
|
|
5455
5487
|
function f(C) {
|
|
5456
5488
|
delete c[C];
|
|
5457
5489
|
}
|
|
5458
|
-
function
|
|
5459
|
-
if (m) setTimeout(
|
|
5490
|
+
function b(C) {
|
|
5491
|
+
if (m) setTimeout(b, 0, C);
|
|
5460
5492
|
else {
|
|
5461
5493
|
var S = c[C];
|
|
5462
5494
|
if (S) {
|
|
@@ -5488,7 +5520,7 @@ function fe() {
|
|
|
5488
5520
|
}
|
|
5489
5521
|
}
|
|
5490
5522
|
function _(C) {
|
|
5491
|
-
C.source === s && typeof C.data == "string" && C.data.indexOf(u) === 0 &&
|
|
5523
|
+
C.source === s && typeof C.data == "string" && C.data.indexOf(u) === 0 && b(+C.data.slice(u.length));
|
|
5492
5524
|
}
|
|
5493
5525
|
})(typeof self > "u" ? r === void 0 ? this : r : self);
|
|
5494
5526
|
}).call(this, typeof St < "u" ? St : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -5538,9 +5570,9 @@ class Rt {
|
|
|
5538
5570
|
if (t.image && t.image.src && t.image.src.startsWith("xap:")) {
|
|
5539
5571
|
const o = t.image.src.substring(4), l = e.file(o);
|
|
5540
5572
|
if (l) {
|
|
5541
|
-
const g = await l.async("base64"),
|
|
5573
|
+
const g = await l.async("base64"), w = o.split(".").pop()?.toLowerCase();
|
|
5542
5574
|
let u = "image/png";
|
|
5543
|
-
|
|
5575
|
+
w === "jpg" || w === "jpeg" ? u = "image/jpeg" : w === "svg" ? u = "image/svg+xml" : w === "gif" && (u = "image/gif"), s = `data:${u};base64,${g}`;
|
|
5544
5576
|
}
|
|
5545
5577
|
}
|
|
5546
5578
|
if (t.title && s) {
|
|
@@ -5581,10 +5613,10 @@ class ge {
|
|
|
5581
5613
|
this.mindMap = t.mindMap, this.renderer = t.renderer, this.eventBus = t.eventBus, this.fileHandler = t.fileHandler;
|
|
5582
5614
|
}
|
|
5583
5615
|
async exportPng() {
|
|
5584
|
-
this.eventBus.emit("command", { name: "exportPng" }), await new
|
|
5616
|
+
this.eventBus.emit("command", { name: "exportPng" }), await new Tt().exportToPng(this.renderer.container, this.fileHandler);
|
|
5585
5617
|
}
|
|
5586
5618
|
async exportSvg() {
|
|
5587
|
-
this.eventBus.emit("command", { name: "exportSvg" }), await new
|
|
5619
|
+
this.eventBus.emit("command", { name: "exportSvg" }), await new Tt().exportToSvg(this.renderer.container, this.fileHandler);
|
|
5588
5620
|
}
|
|
5589
5621
|
async exportMarkdown() {
|
|
5590
5622
|
this.eventBus.emit("command", { name: "exportMarkdown" }), await new he().export(this.mindMap, this.fileHandler);
|
|
@@ -5751,7 +5783,7 @@ class be extends ve {
|
|
|
5751
5783
|
renderer: y,
|
|
5752
5784
|
eventBus: p,
|
|
5753
5785
|
fileHandler: e.fileHandler
|
|
5754
|
-
}),
|
|
5786
|
+
}), b = new ye({
|
|
5755
5787
|
mindMap: this.mindMap,
|
|
5756
5788
|
service: r,
|
|
5757
5789
|
renderer: y,
|
|
@@ -5769,7 +5801,7 @@ class be extends ve {
|
|
|
5769
5801
|
viewportService: m,
|
|
5770
5802
|
navigationService: h,
|
|
5771
5803
|
fileIOService: f,
|
|
5772
|
-
themeService:
|
|
5804
|
+
themeService: b,
|
|
5773
5805
|
commandBus: _,
|
|
5774
5806
|
locale: e.locale || c,
|
|
5775
5807
|
commandPaletteFeatures: e.disabledCommandPaletteFeatures
|
|
@@ -5996,7 +6028,7 @@ class be extends ve {
|
|
|
5996
6028
|
export {
|
|
5997
6029
|
be as Kakidash,
|
|
5998
6030
|
gt as Node,
|
|
5999
|
-
|
|
6031
|
+
At as SvgGenerator,
|
|
6000
6032
|
ve as TypedEventEmitter,
|
|
6001
6033
|
Rt as XMindImporter
|
|
6002
6034
|
};
|