@zettelgeist/cli 0.1.0
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/LICENSE +202 -0
- package/README.md +64 -0
- package/dist/bin.js +2211 -0
- package/dist/bin.js.map +7 -0
- package/dist/templates/export.html +27 -0
- package/dist/templates/skill/SKILL.md +220 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js +14 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js.map +7 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js +8884 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js.map +7 -0
- package/dist/viewer-bundle/base.css +248 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js +3777 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js.map +7 -0
- package/dist/viewer-bundle/board.css +370 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js +2596 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js.map +7 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js +68 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js.map +7 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js +67 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js.map +7 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js +112 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js.map +7 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js +1011 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js.map +7 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js +48 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js.map +7 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js +2048 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js +6957 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js.map +7 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js +122 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js.map +7 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js +133 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js.map +7 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js +5556 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js.map +7 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js +25 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js.map +7 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js +6397 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js.map +7 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js +125 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js.map +7 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js +44 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js.map +7 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js +51 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js.map +7 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js +96 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js +30297 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js +59 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js.map +7 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js +2042 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js.map +7 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js +20 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js.map +7 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js +101 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js.map +7 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js +34 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js.map +7 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js +25 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js.map +7 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js +171 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js.map +7 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js +61 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js +1050 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js +1994 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js.map +7 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js +25 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js.map +7 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js +2721 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js.map +7 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js +48 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js.map +7 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js +22 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js.map +7 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js +1663 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js.map +7 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js +172 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js.map +7 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js +48 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js.map +7 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js +93 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js.map +7 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js +1039 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js.map +7 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js +25029 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js.map +7 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js +682 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js.map +7 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js +987 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js +48 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js.map +7 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js +2044 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js +46 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js +46 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js.map +7 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js +5009 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js.map +7 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js +739 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js.map +7 -0
- package/dist/viewer-bundle/dark.css +13 -0
- package/dist/viewer-bundle/detail.css +539 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js +214 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js.map +7 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js +578 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js.map +7 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js +345 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js.map +7 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js +255 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js.map +7 -0
- package/dist/viewer-bundle/docs.css +88 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js +176 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js.map +7 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js +1349 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js.map +7 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js +2501 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js.map +7 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js +2654 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js.map +7 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js +14 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js.map +7 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js +1946 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js.map +7 -0
- package/dist/viewer-bundle/index.html +28 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js +14 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js.map +7 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js +59 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js.map +7 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js +1012 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js.map +7 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js +1303 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js.map +7 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js +1131 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js.map +7 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js +14318 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js.map +7 -0
- package/dist/viewer-bundle/light.css +15 -0
- package/dist/viewer-bundle/main.js +4816 -0
- package/dist/viewer-bundle/main.js.map +7 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js +1708 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js.map +7 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js +1277 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js.map +7 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js +14 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js.map +7 -0
- package/dist/viewer-bundle/pico.classless.min.css +4 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js +14 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js.map +7 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js +238 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js.map +7 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js +12 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js.map +7 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js +1409 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js.map +7 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js +14 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js.map +7 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js +68 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js.map +7 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js +1311 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js.map +7 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js +1263 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js.map +7 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js +4655 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js +495 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js +44 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js.map +7 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js +1646 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js.map +7 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js +14 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js.map +7 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js +14 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js.map +7 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js +2544 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js.map +7 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js +14 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js.map +7 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js +938 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js.map +7 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js +1952 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js.map +7 -0
- package/package.json +51 -0
|
@@ -0,0 +1,1011 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/roughjs@4.6.6/node_modules/roughjs/bundled/rough.esm.js
|
|
2
|
+
function t(t2, e2, s2) {
|
|
3
|
+
if (t2 && t2.length) {
|
|
4
|
+
const [n2, o2] = e2, a2 = Math.PI / 180 * s2, h2 = Math.cos(a2), r2 = Math.sin(a2);
|
|
5
|
+
for (const e3 of t2) {
|
|
6
|
+
const [t3, s3] = e3;
|
|
7
|
+
e3[0] = (t3 - n2) * h2 - (s3 - o2) * r2 + n2, e3[1] = (t3 - n2) * r2 + (s3 - o2) * h2 + o2;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function e(t2, e2) {
|
|
12
|
+
return t2[0] === e2[0] && t2[1] === e2[1];
|
|
13
|
+
}
|
|
14
|
+
function s(s2, n2, o2, a2 = 1) {
|
|
15
|
+
const h2 = o2, r2 = Math.max(n2, 0.1), i2 = s2[0] && s2[0][0] && "number" == typeof s2[0][0] ? [s2] : s2, c2 = [0, 0];
|
|
16
|
+
if (h2) for (const e2 of i2) t(e2, c2, h2);
|
|
17
|
+
const l2 = function(t2, s3, n3) {
|
|
18
|
+
const o3 = [];
|
|
19
|
+
for (const s4 of t2) {
|
|
20
|
+
const t3 = [...s4];
|
|
21
|
+
e(t3[0], t3[t3.length - 1]) || t3.push([t3[0][0], t3[0][1]]), t3.length > 2 && o3.push(t3);
|
|
22
|
+
}
|
|
23
|
+
const a3 = [];
|
|
24
|
+
s3 = Math.max(s3, 0.1);
|
|
25
|
+
const h3 = [];
|
|
26
|
+
for (const t3 of o3) for (let e2 = 0; e2 < t3.length - 1; e2++) {
|
|
27
|
+
const s4 = t3[e2], n4 = t3[e2 + 1];
|
|
28
|
+
if (s4[1] !== n4[1]) {
|
|
29
|
+
const t4 = Math.min(s4[1], n4[1]);
|
|
30
|
+
h3.push({ ymin: t4, ymax: Math.max(s4[1], n4[1]), x: t4 === s4[1] ? s4[0] : n4[0], islope: (n4[0] - s4[0]) / (n4[1] - s4[1]) });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (h3.sort((t3, e2) => t3.ymin < e2.ymin ? -1 : t3.ymin > e2.ymin ? 1 : t3.x < e2.x ? -1 : t3.x > e2.x ? 1 : t3.ymax === e2.ymax ? 0 : (t3.ymax - e2.ymax) / Math.abs(t3.ymax - e2.ymax)), !h3.length) return a3;
|
|
34
|
+
let r3 = [], i3 = h3[0].ymin, c3 = 0;
|
|
35
|
+
for (; r3.length || h3.length; ) {
|
|
36
|
+
if (h3.length) {
|
|
37
|
+
let t3 = -1;
|
|
38
|
+
for (let e2 = 0; e2 < h3.length && !(h3[e2].ymin > i3); e2++) t3 = e2;
|
|
39
|
+
h3.splice(0, t3 + 1).forEach((t4) => {
|
|
40
|
+
r3.push({ s: i3, edge: t4 });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (r3 = r3.filter((t3) => !(t3.edge.ymax <= i3)), r3.sort((t3, e2) => t3.edge.x === e2.edge.x ? 0 : (t3.edge.x - e2.edge.x) / Math.abs(t3.edge.x - e2.edge.x)), (1 !== n3 || c3 % s3 == 0) && r3.length > 1) for (let t3 = 0; t3 < r3.length; t3 += 2) {
|
|
44
|
+
const e2 = t3 + 1;
|
|
45
|
+
if (e2 >= r3.length) break;
|
|
46
|
+
const s4 = r3[t3].edge, n4 = r3[e2].edge;
|
|
47
|
+
a3.push([[Math.round(s4.x), i3], [Math.round(n4.x), i3]]);
|
|
48
|
+
}
|
|
49
|
+
i3 += n3, r3.forEach((t3) => {
|
|
50
|
+
t3.edge.x = t3.edge.x + n3 * t3.edge.islope;
|
|
51
|
+
}), c3++;
|
|
52
|
+
}
|
|
53
|
+
return a3;
|
|
54
|
+
}(i2, r2, a2);
|
|
55
|
+
if (h2) {
|
|
56
|
+
for (const e2 of i2) t(e2, c2, -h2);
|
|
57
|
+
!function(e2, s3, n3) {
|
|
58
|
+
const o3 = [];
|
|
59
|
+
e2.forEach((t2) => o3.push(...t2)), t(o3, s3, n3);
|
|
60
|
+
}(l2, c2, -h2);
|
|
61
|
+
}
|
|
62
|
+
return l2;
|
|
63
|
+
}
|
|
64
|
+
function n(t2, e2) {
|
|
65
|
+
var n2;
|
|
66
|
+
const o2 = e2.hachureAngle + 90;
|
|
67
|
+
let a2 = e2.hachureGap;
|
|
68
|
+
a2 < 0 && (a2 = 4 * e2.strokeWidth), a2 = Math.round(Math.max(a2, 0.1));
|
|
69
|
+
let h2 = 1;
|
|
70
|
+
return e2.roughness >= 1 && ((null === (n2 = e2.randomizer) || void 0 === n2 ? void 0 : n2.next()) || Math.random()) > 0.7 && (h2 = a2), s(t2, a2, o2, h2 || 1);
|
|
71
|
+
}
|
|
72
|
+
var o = class {
|
|
73
|
+
constructor(t2) {
|
|
74
|
+
this.helper = t2;
|
|
75
|
+
}
|
|
76
|
+
fillPolygons(t2, e2) {
|
|
77
|
+
return this._fillPolygons(t2, e2);
|
|
78
|
+
}
|
|
79
|
+
_fillPolygons(t2, e2) {
|
|
80
|
+
const s2 = n(t2, e2);
|
|
81
|
+
return { type: "fillSketch", ops: this.renderLines(s2, e2) };
|
|
82
|
+
}
|
|
83
|
+
renderLines(t2, e2) {
|
|
84
|
+
const s2 = [];
|
|
85
|
+
for (const n2 of t2) s2.push(...this.helper.doubleLineOps(n2[0][0], n2[0][1], n2[1][0], n2[1][1], e2));
|
|
86
|
+
return s2;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
function a(t2) {
|
|
90
|
+
const e2 = t2[0], s2 = t2[1];
|
|
91
|
+
return Math.sqrt(Math.pow(e2[0] - s2[0], 2) + Math.pow(e2[1] - s2[1], 2));
|
|
92
|
+
}
|
|
93
|
+
var h = class extends o {
|
|
94
|
+
fillPolygons(t2, e2) {
|
|
95
|
+
let s2 = e2.hachureGap;
|
|
96
|
+
s2 < 0 && (s2 = 4 * e2.strokeWidth), s2 = Math.max(s2, 0.1);
|
|
97
|
+
const o2 = n(t2, Object.assign({}, e2, { hachureGap: s2 })), h2 = Math.PI / 180 * e2.hachureAngle, r2 = [], i2 = 0.5 * s2 * Math.cos(h2), c2 = 0.5 * s2 * Math.sin(h2);
|
|
98
|
+
for (const [t3, e3] of o2) a([t3, e3]) && r2.push([[t3[0] - i2, t3[1] + c2], [...e3]], [[t3[0] + i2, t3[1] - c2], [...e3]]);
|
|
99
|
+
return { type: "fillSketch", ops: this.renderLines(r2, e2) };
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var r = class extends o {
|
|
103
|
+
fillPolygons(t2, e2) {
|
|
104
|
+
const s2 = this._fillPolygons(t2, e2), n2 = Object.assign({}, e2, { hachureAngle: e2.hachureAngle + 90 }), o2 = this._fillPolygons(t2, n2);
|
|
105
|
+
return s2.ops = s2.ops.concat(o2.ops), s2;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var i = class {
|
|
109
|
+
constructor(t2) {
|
|
110
|
+
this.helper = t2;
|
|
111
|
+
}
|
|
112
|
+
fillPolygons(t2, e2) {
|
|
113
|
+
const s2 = n(t2, e2 = Object.assign({}, e2, { hachureAngle: 0 }));
|
|
114
|
+
return this.dotsOnLines(s2, e2);
|
|
115
|
+
}
|
|
116
|
+
dotsOnLines(t2, e2) {
|
|
117
|
+
const s2 = [];
|
|
118
|
+
let n2 = e2.hachureGap;
|
|
119
|
+
n2 < 0 && (n2 = 4 * e2.strokeWidth), n2 = Math.max(n2, 0.1);
|
|
120
|
+
let o2 = e2.fillWeight;
|
|
121
|
+
o2 < 0 && (o2 = e2.strokeWidth / 2);
|
|
122
|
+
const h2 = n2 / 4;
|
|
123
|
+
for (const r2 of t2) {
|
|
124
|
+
const t3 = a(r2), i2 = t3 / n2, c2 = Math.ceil(i2) - 1, l2 = t3 - c2 * n2, u2 = (r2[0][0] + r2[1][0]) / 2 - n2 / 4, p2 = Math.min(r2[0][1], r2[1][1]);
|
|
125
|
+
for (let t4 = 0; t4 < c2; t4++) {
|
|
126
|
+
const a2 = p2 + l2 + t4 * n2, r3 = u2 - h2 + 2 * Math.random() * h2, i3 = a2 - h2 + 2 * Math.random() * h2, c3 = this.helper.ellipse(r3, i3, o2, o2, e2);
|
|
127
|
+
s2.push(...c3.ops);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return { type: "fillSketch", ops: s2 };
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var c = class {
|
|
134
|
+
constructor(t2) {
|
|
135
|
+
this.helper = t2;
|
|
136
|
+
}
|
|
137
|
+
fillPolygons(t2, e2) {
|
|
138
|
+
const s2 = n(t2, e2);
|
|
139
|
+
return { type: "fillSketch", ops: this.dashedLine(s2, e2) };
|
|
140
|
+
}
|
|
141
|
+
dashedLine(t2, e2) {
|
|
142
|
+
const s2 = e2.dashOffset < 0 ? e2.hachureGap < 0 ? 4 * e2.strokeWidth : e2.hachureGap : e2.dashOffset, n2 = e2.dashGap < 0 ? e2.hachureGap < 0 ? 4 * e2.strokeWidth : e2.hachureGap : e2.dashGap, o2 = [];
|
|
143
|
+
return t2.forEach((t3) => {
|
|
144
|
+
const h2 = a(t3), r2 = Math.floor(h2 / (s2 + n2)), i2 = (h2 + n2 - r2 * (s2 + n2)) / 2;
|
|
145
|
+
let c2 = t3[0], l2 = t3[1];
|
|
146
|
+
c2[0] > l2[0] && (c2 = t3[1], l2 = t3[0]);
|
|
147
|
+
const u2 = Math.atan((l2[1] - c2[1]) / (l2[0] - c2[0]));
|
|
148
|
+
for (let t4 = 0; t4 < r2; t4++) {
|
|
149
|
+
const a2 = t4 * (s2 + n2), h3 = a2 + s2, r3 = [c2[0] + a2 * Math.cos(u2) + i2 * Math.cos(u2), c2[1] + a2 * Math.sin(u2) + i2 * Math.sin(u2)], l3 = [c2[0] + h3 * Math.cos(u2) + i2 * Math.cos(u2), c2[1] + h3 * Math.sin(u2) + i2 * Math.sin(u2)];
|
|
150
|
+
o2.push(...this.helper.doubleLineOps(r3[0], r3[1], l3[0], l3[1], e2));
|
|
151
|
+
}
|
|
152
|
+
}), o2;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
var l = class {
|
|
156
|
+
constructor(t2) {
|
|
157
|
+
this.helper = t2;
|
|
158
|
+
}
|
|
159
|
+
fillPolygons(t2, e2) {
|
|
160
|
+
const s2 = e2.hachureGap < 0 ? 4 * e2.strokeWidth : e2.hachureGap, o2 = e2.zigzagOffset < 0 ? s2 : e2.zigzagOffset, a2 = n(t2, e2 = Object.assign({}, e2, { hachureGap: s2 + o2 }));
|
|
161
|
+
return { type: "fillSketch", ops: this.zigzagLines(a2, o2, e2) };
|
|
162
|
+
}
|
|
163
|
+
zigzagLines(t2, e2, s2) {
|
|
164
|
+
const n2 = [];
|
|
165
|
+
return t2.forEach((t3) => {
|
|
166
|
+
const o2 = a(t3), h2 = Math.round(o2 / (2 * e2));
|
|
167
|
+
let r2 = t3[0], i2 = t3[1];
|
|
168
|
+
r2[0] > i2[0] && (r2 = t3[1], i2 = t3[0]);
|
|
169
|
+
const c2 = Math.atan((i2[1] - r2[1]) / (i2[0] - r2[0]));
|
|
170
|
+
for (let t4 = 0; t4 < h2; t4++) {
|
|
171
|
+
const o3 = 2 * t4 * e2, a2 = 2 * (t4 + 1) * e2, h3 = Math.sqrt(2 * Math.pow(e2, 2)), i3 = [r2[0] + o3 * Math.cos(c2), r2[1] + o3 * Math.sin(c2)], l2 = [r2[0] + a2 * Math.cos(c2), r2[1] + a2 * Math.sin(c2)], u2 = [i3[0] + h3 * Math.cos(c2 + Math.PI / 4), i3[1] + h3 * Math.sin(c2 + Math.PI / 4)];
|
|
172
|
+
n2.push(...this.helper.doubleLineOps(i3[0], i3[1], u2[0], u2[1], s2), ...this.helper.doubleLineOps(u2[0], u2[1], l2[0], l2[1], s2));
|
|
173
|
+
}
|
|
174
|
+
}), n2;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
var u = {};
|
|
178
|
+
var p = class {
|
|
179
|
+
constructor(t2) {
|
|
180
|
+
this.seed = t2;
|
|
181
|
+
}
|
|
182
|
+
next() {
|
|
183
|
+
return this.seed ? (2 ** 31 - 1 & (this.seed = Math.imul(48271, this.seed))) / 2 ** 31 : Math.random();
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
var f = 0;
|
|
187
|
+
var d = 1;
|
|
188
|
+
var g = 2;
|
|
189
|
+
var M = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 };
|
|
190
|
+
function k(t2, e2) {
|
|
191
|
+
return t2.type === e2;
|
|
192
|
+
}
|
|
193
|
+
function b(t2) {
|
|
194
|
+
const e2 = [], s2 = function(t3) {
|
|
195
|
+
const e3 = new Array();
|
|
196
|
+
for (; "" !== t3; ) if (t3.match(/^([ \t\r\n,]+)/)) t3 = t3.substr(RegExp.$1.length);
|
|
197
|
+
else if (t3.match(/^([aAcChHlLmMqQsStTvVzZ])/)) e3[e3.length] = { type: f, text: RegExp.$1 }, t3 = t3.substr(RegExp.$1.length);
|
|
198
|
+
else {
|
|
199
|
+
if (!t3.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)) return [];
|
|
200
|
+
e3[e3.length] = { type: d, text: `${parseFloat(RegExp.$1)}` }, t3 = t3.substr(RegExp.$1.length);
|
|
201
|
+
}
|
|
202
|
+
return e3[e3.length] = { type: g, text: "" }, e3;
|
|
203
|
+
}(t2);
|
|
204
|
+
let n2 = "BOD", o2 = 0, a2 = s2[o2];
|
|
205
|
+
for (; !k(a2, g); ) {
|
|
206
|
+
let h2 = 0;
|
|
207
|
+
const r2 = [];
|
|
208
|
+
if ("BOD" === n2) {
|
|
209
|
+
if ("M" !== a2.text && "m" !== a2.text) return b("M0,0" + t2);
|
|
210
|
+
o2++, h2 = M[a2.text], n2 = a2.text;
|
|
211
|
+
} else k(a2, d) ? h2 = M[n2] : (o2++, h2 = M[a2.text], n2 = a2.text);
|
|
212
|
+
if (!(o2 + h2 < s2.length)) throw new Error("Path data ended short");
|
|
213
|
+
for (let t3 = o2; t3 < o2 + h2; t3++) {
|
|
214
|
+
const e3 = s2[t3];
|
|
215
|
+
if (!k(e3, d)) throw new Error("Param not a number: " + n2 + "," + e3.text);
|
|
216
|
+
r2[r2.length] = +e3.text;
|
|
217
|
+
}
|
|
218
|
+
if ("number" != typeof M[n2]) throw new Error("Bad segment: " + n2);
|
|
219
|
+
{
|
|
220
|
+
const t3 = { key: n2, data: r2 };
|
|
221
|
+
e2.push(t3), o2 += h2, a2 = s2[o2], "M" === n2 && (n2 = "L"), "m" === n2 && (n2 = "l");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return e2;
|
|
225
|
+
}
|
|
226
|
+
function y(t2) {
|
|
227
|
+
let e2 = 0, s2 = 0, n2 = 0, o2 = 0;
|
|
228
|
+
const a2 = [];
|
|
229
|
+
for (const { key: h2, data: r2 } of t2) switch (h2) {
|
|
230
|
+
case "M":
|
|
231
|
+
a2.push({ key: "M", data: [...r2] }), [e2, s2] = r2, [n2, o2] = r2;
|
|
232
|
+
break;
|
|
233
|
+
case "m":
|
|
234
|
+
e2 += r2[0], s2 += r2[1], a2.push({ key: "M", data: [e2, s2] }), n2 = e2, o2 = s2;
|
|
235
|
+
break;
|
|
236
|
+
case "L":
|
|
237
|
+
a2.push({ key: "L", data: [...r2] }), [e2, s2] = r2;
|
|
238
|
+
break;
|
|
239
|
+
case "l":
|
|
240
|
+
e2 += r2[0], s2 += r2[1], a2.push({ key: "L", data: [e2, s2] });
|
|
241
|
+
break;
|
|
242
|
+
case "C":
|
|
243
|
+
a2.push({ key: "C", data: [...r2] }), e2 = r2[4], s2 = r2[5];
|
|
244
|
+
break;
|
|
245
|
+
case "c": {
|
|
246
|
+
const t3 = r2.map((t4, n3) => n3 % 2 ? t4 + s2 : t4 + e2);
|
|
247
|
+
a2.push({ key: "C", data: t3 }), e2 = t3[4], s2 = t3[5];
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
case "Q":
|
|
251
|
+
a2.push({ key: "Q", data: [...r2] }), e2 = r2[2], s2 = r2[3];
|
|
252
|
+
break;
|
|
253
|
+
case "q": {
|
|
254
|
+
const t3 = r2.map((t4, n3) => n3 % 2 ? t4 + s2 : t4 + e2);
|
|
255
|
+
a2.push({ key: "Q", data: t3 }), e2 = t3[2], s2 = t3[3];
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
case "A":
|
|
259
|
+
a2.push({ key: "A", data: [...r2] }), e2 = r2[5], s2 = r2[6];
|
|
260
|
+
break;
|
|
261
|
+
case "a":
|
|
262
|
+
e2 += r2[5], s2 += r2[6], a2.push({ key: "A", data: [r2[0], r2[1], r2[2], r2[3], r2[4], e2, s2] });
|
|
263
|
+
break;
|
|
264
|
+
case "H":
|
|
265
|
+
a2.push({ key: "H", data: [...r2] }), e2 = r2[0];
|
|
266
|
+
break;
|
|
267
|
+
case "h":
|
|
268
|
+
e2 += r2[0], a2.push({ key: "H", data: [e2] });
|
|
269
|
+
break;
|
|
270
|
+
case "V":
|
|
271
|
+
a2.push({ key: "V", data: [...r2] }), s2 = r2[0];
|
|
272
|
+
break;
|
|
273
|
+
case "v":
|
|
274
|
+
s2 += r2[0], a2.push({ key: "V", data: [s2] });
|
|
275
|
+
break;
|
|
276
|
+
case "S":
|
|
277
|
+
a2.push({ key: "S", data: [...r2] }), e2 = r2[2], s2 = r2[3];
|
|
278
|
+
break;
|
|
279
|
+
case "s": {
|
|
280
|
+
const t3 = r2.map((t4, n3) => n3 % 2 ? t4 + s2 : t4 + e2);
|
|
281
|
+
a2.push({ key: "S", data: t3 }), e2 = t3[2], s2 = t3[3];
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
case "T":
|
|
285
|
+
a2.push({ key: "T", data: [...r2] }), e2 = r2[0], s2 = r2[1];
|
|
286
|
+
break;
|
|
287
|
+
case "t":
|
|
288
|
+
e2 += r2[0], s2 += r2[1], a2.push({ key: "T", data: [e2, s2] });
|
|
289
|
+
break;
|
|
290
|
+
case "Z":
|
|
291
|
+
case "z":
|
|
292
|
+
a2.push({ key: "Z", data: [] }), e2 = n2, s2 = o2;
|
|
293
|
+
}
|
|
294
|
+
return a2;
|
|
295
|
+
}
|
|
296
|
+
function m(t2) {
|
|
297
|
+
const e2 = [];
|
|
298
|
+
let s2 = "", n2 = 0, o2 = 0, a2 = 0, h2 = 0, r2 = 0, i2 = 0;
|
|
299
|
+
for (const { key: c2, data: l2 } of t2) {
|
|
300
|
+
switch (c2) {
|
|
301
|
+
case "M":
|
|
302
|
+
e2.push({ key: "M", data: [...l2] }), [n2, o2] = l2, [a2, h2] = l2;
|
|
303
|
+
break;
|
|
304
|
+
case "C":
|
|
305
|
+
e2.push({ key: "C", data: [...l2] }), n2 = l2[4], o2 = l2[5], r2 = l2[2], i2 = l2[3];
|
|
306
|
+
break;
|
|
307
|
+
case "L":
|
|
308
|
+
e2.push({ key: "L", data: [...l2] }), [n2, o2] = l2;
|
|
309
|
+
break;
|
|
310
|
+
case "H":
|
|
311
|
+
n2 = l2[0], e2.push({ key: "L", data: [n2, o2] });
|
|
312
|
+
break;
|
|
313
|
+
case "V":
|
|
314
|
+
o2 = l2[0], e2.push({ key: "L", data: [n2, o2] });
|
|
315
|
+
break;
|
|
316
|
+
case "S": {
|
|
317
|
+
let t3 = 0, a3 = 0;
|
|
318
|
+
"C" === s2 || "S" === s2 ? (t3 = n2 + (n2 - r2), a3 = o2 + (o2 - i2)) : (t3 = n2, a3 = o2), e2.push({ key: "C", data: [t3, a3, ...l2] }), r2 = l2[0], i2 = l2[1], n2 = l2[2], o2 = l2[3];
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
case "T": {
|
|
322
|
+
const [t3, a3] = l2;
|
|
323
|
+
let h3 = 0, c3 = 0;
|
|
324
|
+
"Q" === s2 || "T" === s2 ? (h3 = n2 + (n2 - r2), c3 = o2 + (o2 - i2)) : (h3 = n2, c3 = o2);
|
|
325
|
+
const u2 = n2 + 2 * (h3 - n2) / 3, p2 = o2 + 2 * (c3 - o2) / 3, f2 = t3 + 2 * (h3 - t3) / 3, d2 = a3 + 2 * (c3 - a3) / 3;
|
|
326
|
+
e2.push({ key: "C", data: [u2, p2, f2, d2, t3, a3] }), r2 = h3, i2 = c3, n2 = t3, o2 = a3;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
case "Q": {
|
|
330
|
+
const [t3, s3, a3, h3] = l2, c3 = n2 + 2 * (t3 - n2) / 3, u2 = o2 + 2 * (s3 - o2) / 3, p2 = a3 + 2 * (t3 - a3) / 3, f2 = h3 + 2 * (s3 - h3) / 3;
|
|
331
|
+
e2.push({ key: "C", data: [c3, u2, p2, f2, a3, h3] }), r2 = t3, i2 = s3, n2 = a3, o2 = h3;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
case "A": {
|
|
335
|
+
const t3 = Math.abs(l2[0]), s3 = Math.abs(l2[1]), a3 = l2[2], h3 = l2[3], r3 = l2[4], i3 = l2[5], c3 = l2[6];
|
|
336
|
+
if (0 === t3 || 0 === s3) e2.push({ key: "C", data: [n2, o2, i3, c3, i3, c3] }), n2 = i3, o2 = c3;
|
|
337
|
+
else if (n2 !== i3 || o2 !== c3) {
|
|
338
|
+
x(n2, o2, i3, c3, t3, s3, a3, h3, r3).forEach(function(t4) {
|
|
339
|
+
e2.push({ key: "C", data: t4 });
|
|
340
|
+
}), n2 = i3, o2 = c3;
|
|
341
|
+
}
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
case "Z":
|
|
345
|
+
e2.push({ key: "Z", data: [] }), n2 = a2, o2 = h2;
|
|
346
|
+
}
|
|
347
|
+
s2 = c2;
|
|
348
|
+
}
|
|
349
|
+
return e2;
|
|
350
|
+
}
|
|
351
|
+
function w(t2, e2, s2) {
|
|
352
|
+
return [t2 * Math.cos(s2) - e2 * Math.sin(s2), t2 * Math.sin(s2) + e2 * Math.cos(s2)];
|
|
353
|
+
}
|
|
354
|
+
function x(t2, e2, s2, n2, o2, a2, h2, r2, i2, c2) {
|
|
355
|
+
const l2 = (u2 = h2, Math.PI * u2 / 180);
|
|
356
|
+
var u2;
|
|
357
|
+
let p2 = [], f2 = 0, d2 = 0, g2 = 0, M2 = 0;
|
|
358
|
+
if (c2) [f2, d2, g2, M2] = c2;
|
|
359
|
+
else {
|
|
360
|
+
[t2, e2] = w(t2, e2, -l2), [s2, n2] = w(s2, n2, -l2);
|
|
361
|
+
const h3 = (t2 - s2) / 2, c3 = (e2 - n2) / 2;
|
|
362
|
+
let u3 = h3 * h3 / (o2 * o2) + c3 * c3 / (a2 * a2);
|
|
363
|
+
u3 > 1 && (u3 = Math.sqrt(u3), o2 *= u3, a2 *= u3);
|
|
364
|
+
const p3 = o2 * o2, k3 = a2 * a2, b3 = p3 * k3 - p3 * c3 * c3 - k3 * h3 * h3, y3 = p3 * c3 * c3 + k3 * h3 * h3, m3 = (r2 === i2 ? -1 : 1) * Math.sqrt(Math.abs(b3 / y3));
|
|
365
|
+
g2 = m3 * o2 * c3 / a2 + (t2 + s2) / 2, M2 = m3 * -a2 * h3 / o2 + (e2 + n2) / 2, f2 = Math.asin(parseFloat(((e2 - M2) / a2).toFixed(9))), d2 = Math.asin(parseFloat(((n2 - M2) / a2).toFixed(9))), t2 < g2 && (f2 = Math.PI - f2), s2 < g2 && (d2 = Math.PI - d2), f2 < 0 && (f2 = 2 * Math.PI + f2), d2 < 0 && (d2 = 2 * Math.PI + d2), i2 && f2 > d2 && (f2 -= 2 * Math.PI), !i2 && d2 > f2 && (d2 -= 2 * Math.PI);
|
|
366
|
+
}
|
|
367
|
+
let k2 = d2 - f2;
|
|
368
|
+
if (Math.abs(k2) > 120 * Math.PI / 180) {
|
|
369
|
+
const t3 = d2, e3 = s2, r3 = n2;
|
|
370
|
+
d2 = i2 && d2 > f2 ? f2 + 120 * Math.PI / 180 * 1 : f2 + 120 * Math.PI / 180 * -1, p2 = x(s2 = g2 + o2 * Math.cos(d2), n2 = M2 + a2 * Math.sin(d2), e3, r3, o2, a2, h2, 0, i2, [d2, t3, g2, M2]);
|
|
371
|
+
}
|
|
372
|
+
k2 = d2 - f2;
|
|
373
|
+
const b2 = Math.cos(f2), y2 = Math.sin(f2), m2 = Math.cos(d2), P2 = Math.sin(d2), v2 = Math.tan(k2 / 4), S2 = 4 / 3 * o2 * v2, O2 = 4 / 3 * a2 * v2, L2 = [t2, e2], T2 = [t2 + S2 * y2, e2 - O2 * b2], D2 = [s2 + S2 * P2, n2 - O2 * m2], A2 = [s2, n2];
|
|
374
|
+
if (T2[0] = 2 * L2[0] - T2[0], T2[1] = 2 * L2[1] - T2[1], c2) return [T2, D2, A2].concat(p2);
|
|
375
|
+
{
|
|
376
|
+
p2 = [T2, D2, A2].concat(p2);
|
|
377
|
+
const t3 = [];
|
|
378
|
+
for (let e3 = 0; e3 < p2.length; e3 += 3) {
|
|
379
|
+
const s3 = w(p2[e3][0], p2[e3][1], l2), n3 = w(p2[e3 + 1][0], p2[e3 + 1][1], l2), o3 = w(p2[e3 + 2][0], p2[e3 + 2][1], l2);
|
|
380
|
+
t3.push([s3[0], s3[1], n3[0], n3[1], o3[0], o3[1]]);
|
|
381
|
+
}
|
|
382
|
+
return t3;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
var P = { randOffset: function(t2, e2) {
|
|
386
|
+
return G(t2, e2);
|
|
387
|
+
}, randOffsetWithRange: function(t2, e2, s2) {
|
|
388
|
+
return E(t2, e2, s2);
|
|
389
|
+
}, ellipse: function(t2, e2, s2, n2, o2) {
|
|
390
|
+
const a2 = T(s2, n2, o2);
|
|
391
|
+
return D(t2, e2, o2, a2).opset;
|
|
392
|
+
}, doubleLineOps: function(t2, e2, s2, n2, o2) {
|
|
393
|
+
return $(t2, e2, s2, n2, o2, true);
|
|
394
|
+
} };
|
|
395
|
+
function v(t2, e2, s2, n2, o2) {
|
|
396
|
+
return { type: "path", ops: $(t2, e2, s2, n2, o2) };
|
|
397
|
+
}
|
|
398
|
+
function S(t2, e2, s2) {
|
|
399
|
+
const n2 = (t2 || []).length;
|
|
400
|
+
if (n2 > 2) {
|
|
401
|
+
const o2 = [];
|
|
402
|
+
for (let e3 = 0; e3 < n2 - 1; e3++) o2.push(...$(t2[e3][0], t2[e3][1], t2[e3 + 1][0], t2[e3 + 1][1], s2));
|
|
403
|
+
return e2 && o2.push(...$(t2[n2 - 1][0], t2[n2 - 1][1], t2[0][0], t2[0][1], s2)), { type: "path", ops: o2 };
|
|
404
|
+
}
|
|
405
|
+
return 2 === n2 ? v(t2[0][0], t2[0][1], t2[1][0], t2[1][1], s2) : { type: "path", ops: [] };
|
|
406
|
+
}
|
|
407
|
+
function O(t2, e2, s2, n2, o2) {
|
|
408
|
+
return function(t3, e3) {
|
|
409
|
+
return S(t3, true, e3);
|
|
410
|
+
}([[t2, e2], [t2 + s2, e2], [t2 + s2, e2 + n2], [t2, e2 + n2]], o2);
|
|
411
|
+
}
|
|
412
|
+
function L(t2, e2) {
|
|
413
|
+
if (t2.length) {
|
|
414
|
+
const s2 = "number" == typeof t2[0][0] ? [t2] : t2, n2 = j(s2[0], 1 * (1 + 0.2 * e2.roughness), e2), o2 = e2.disableMultiStroke ? [] : j(s2[0], 1.5 * (1 + 0.22 * e2.roughness), z(e2));
|
|
415
|
+
for (let t3 = 1; t3 < s2.length; t3++) {
|
|
416
|
+
const a2 = s2[t3];
|
|
417
|
+
if (a2.length) {
|
|
418
|
+
const t4 = j(a2, 1 * (1 + 0.2 * e2.roughness), e2), s3 = e2.disableMultiStroke ? [] : j(a2, 1.5 * (1 + 0.22 * e2.roughness), z(e2));
|
|
419
|
+
for (const e3 of t4) "move" !== e3.op && n2.push(e3);
|
|
420
|
+
for (const t5 of s3) "move" !== t5.op && o2.push(t5);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return { type: "path", ops: n2.concat(o2) };
|
|
424
|
+
}
|
|
425
|
+
return { type: "path", ops: [] };
|
|
426
|
+
}
|
|
427
|
+
function T(t2, e2, s2) {
|
|
428
|
+
const n2 = Math.sqrt(2 * Math.PI * Math.sqrt((Math.pow(t2 / 2, 2) + Math.pow(e2 / 2, 2)) / 2)), o2 = Math.ceil(Math.max(s2.curveStepCount, s2.curveStepCount / Math.sqrt(200) * n2)), a2 = 2 * Math.PI / o2;
|
|
429
|
+
let h2 = Math.abs(t2 / 2), r2 = Math.abs(e2 / 2);
|
|
430
|
+
const i2 = 1 - s2.curveFitting;
|
|
431
|
+
return h2 += G(h2 * i2, s2), r2 += G(r2 * i2, s2), { increment: a2, rx: h2, ry: r2 };
|
|
432
|
+
}
|
|
433
|
+
function D(t2, e2, s2, n2) {
|
|
434
|
+
const [o2, a2] = F(n2.increment, t2, e2, n2.rx, n2.ry, 1, n2.increment * E(0.1, E(0.4, 1, s2), s2), s2);
|
|
435
|
+
let h2 = q(o2, null, s2);
|
|
436
|
+
if (!s2.disableMultiStroke && 0 !== s2.roughness) {
|
|
437
|
+
const [o3] = F(n2.increment, t2, e2, n2.rx, n2.ry, 1.5, 0, s2), a3 = q(o3, null, s2);
|
|
438
|
+
h2 = h2.concat(a3);
|
|
439
|
+
}
|
|
440
|
+
return { estimatedPoints: a2, opset: { type: "path", ops: h2 } };
|
|
441
|
+
}
|
|
442
|
+
function A(t2, e2, s2, n2, o2, a2, h2, r2, i2) {
|
|
443
|
+
const c2 = t2, l2 = e2;
|
|
444
|
+
let u2 = Math.abs(s2 / 2), p2 = Math.abs(n2 / 2);
|
|
445
|
+
u2 += G(0.01 * u2, i2), p2 += G(0.01 * p2, i2);
|
|
446
|
+
let f2 = o2, d2 = a2;
|
|
447
|
+
for (; f2 < 0; ) f2 += 2 * Math.PI, d2 += 2 * Math.PI;
|
|
448
|
+
d2 - f2 > 2 * Math.PI && (f2 = 0, d2 = 2 * Math.PI);
|
|
449
|
+
const g2 = 2 * Math.PI / i2.curveStepCount, M2 = Math.min(g2 / 2, (d2 - f2) / 2), k2 = V(M2, c2, l2, u2, p2, f2, d2, 1, i2);
|
|
450
|
+
if (!i2.disableMultiStroke) {
|
|
451
|
+
const t3 = V(M2, c2, l2, u2, p2, f2, d2, 1.5, i2);
|
|
452
|
+
k2.push(...t3);
|
|
453
|
+
}
|
|
454
|
+
return h2 && (r2 ? k2.push(...$(c2, l2, c2 + u2 * Math.cos(f2), l2 + p2 * Math.sin(f2), i2), ...$(c2, l2, c2 + u2 * Math.cos(d2), l2 + p2 * Math.sin(d2), i2)) : k2.push({ op: "lineTo", data: [c2, l2] }, { op: "lineTo", data: [c2 + u2 * Math.cos(f2), l2 + p2 * Math.sin(f2)] })), { type: "path", ops: k2 };
|
|
455
|
+
}
|
|
456
|
+
function _(t2, e2) {
|
|
457
|
+
const s2 = m(y(b(t2))), n2 = [];
|
|
458
|
+
let o2 = [0, 0], a2 = [0, 0];
|
|
459
|
+
for (const { key: t3, data: h2 } of s2) switch (t3) {
|
|
460
|
+
case "M":
|
|
461
|
+
a2 = [h2[0], h2[1]], o2 = [h2[0], h2[1]];
|
|
462
|
+
break;
|
|
463
|
+
case "L":
|
|
464
|
+
n2.push(...$(a2[0], a2[1], h2[0], h2[1], e2)), a2 = [h2[0], h2[1]];
|
|
465
|
+
break;
|
|
466
|
+
case "C": {
|
|
467
|
+
const [t4, s3, o3, r2, i2, c2] = h2;
|
|
468
|
+
n2.push(...Z(t4, s3, o3, r2, i2, c2, a2, e2)), a2 = [i2, c2];
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
case "Z":
|
|
472
|
+
n2.push(...$(a2[0], a2[1], o2[0], o2[1], e2)), a2 = [o2[0], o2[1]];
|
|
473
|
+
}
|
|
474
|
+
return { type: "path", ops: n2 };
|
|
475
|
+
}
|
|
476
|
+
function I(t2, e2) {
|
|
477
|
+
const s2 = [];
|
|
478
|
+
for (const n2 of t2) if (n2.length) {
|
|
479
|
+
const t3 = e2.maxRandomnessOffset || 0, o2 = n2.length;
|
|
480
|
+
if (o2 > 2) {
|
|
481
|
+
s2.push({ op: "move", data: [n2[0][0] + G(t3, e2), n2[0][1] + G(t3, e2)] });
|
|
482
|
+
for (let a2 = 1; a2 < o2; a2++) s2.push({ op: "lineTo", data: [n2[a2][0] + G(t3, e2), n2[a2][1] + G(t3, e2)] });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return { type: "fillPath", ops: s2 };
|
|
486
|
+
}
|
|
487
|
+
function C(t2, e2) {
|
|
488
|
+
return function(t3, e3) {
|
|
489
|
+
let s2 = t3.fillStyle || "hachure";
|
|
490
|
+
if (!u[s2]) switch (s2) {
|
|
491
|
+
case "zigzag":
|
|
492
|
+
u[s2] || (u[s2] = new h(e3));
|
|
493
|
+
break;
|
|
494
|
+
case "cross-hatch":
|
|
495
|
+
u[s2] || (u[s2] = new r(e3));
|
|
496
|
+
break;
|
|
497
|
+
case "dots":
|
|
498
|
+
u[s2] || (u[s2] = new i(e3));
|
|
499
|
+
break;
|
|
500
|
+
case "dashed":
|
|
501
|
+
u[s2] || (u[s2] = new c(e3));
|
|
502
|
+
break;
|
|
503
|
+
case "zigzag-line":
|
|
504
|
+
u[s2] || (u[s2] = new l(e3));
|
|
505
|
+
break;
|
|
506
|
+
default:
|
|
507
|
+
s2 = "hachure", u[s2] || (u[s2] = new o(e3));
|
|
508
|
+
}
|
|
509
|
+
return u[s2];
|
|
510
|
+
}(e2, P).fillPolygons(t2, e2);
|
|
511
|
+
}
|
|
512
|
+
function z(t2) {
|
|
513
|
+
const e2 = Object.assign({}, t2);
|
|
514
|
+
return e2.randomizer = void 0, t2.seed && (e2.seed = t2.seed + 1), e2;
|
|
515
|
+
}
|
|
516
|
+
function W(t2) {
|
|
517
|
+
return t2.randomizer || (t2.randomizer = new p(t2.seed || 0)), t2.randomizer.next();
|
|
518
|
+
}
|
|
519
|
+
function E(t2, e2, s2, n2 = 1) {
|
|
520
|
+
return s2.roughness * n2 * (W(s2) * (e2 - t2) + t2);
|
|
521
|
+
}
|
|
522
|
+
function G(t2, e2, s2 = 1) {
|
|
523
|
+
return E(-t2, t2, e2, s2);
|
|
524
|
+
}
|
|
525
|
+
function $(t2, e2, s2, n2, o2, a2 = false) {
|
|
526
|
+
const h2 = a2 ? o2.disableMultiStrokeFill : o2.disableMultiStroke, r2 = R(t2, e2, s2, n2, o2, true, false);
|
|
527
|
+
if (h2) return r2;
|
|
528
|
+
const i2 = R(t2, e2, s2, n2, o2, true, true);
|
|
529
|
+
return r2.concat(i2);
|
|
530
|
+
}
|
|
531
|
+
function R(t2, e2, s2, n2, o2, a2, h2) {
|
|
532
|
+
const r2 = Math.pow(t2 - s2, 2) + Math.pow(e2 - n2, 2), i2 = Math.sqrt(r2);
|
|
533
|
+
let c2 = 1;
|
|
534
|
+
c2 = i2 < 200 ? 1 : i2 > 500 ? 0.4 : -16668e-7 * i2 + 1.233334;
|
|
535
|
+
let l2 = o2.maxRandomnessOffset || 0;
|
|
536
|
+
l2 * l2 * 100 > r2 && (l2 = i2 / 10);
|
|
537
|
+
const u2 = l2 / 2, p2 = 0.2 + 0.2 * W(o2);
|
|
538
|
+
let f2 = o2.bowing * o2.maxRandomnessOffset * (n2 - e2) / 200, d2 = o2.bowing * o2.maxRandomnessOffset * (t2 - s2) / 200;
|
|
539
|
+
f2 = G(f2, o2, c2), d2 = G(d2, o2, c2);
|
|
540
|
+
const g2 = [], M2 = () => G(u2, o2, c2), k2 = () => G(l2, o2, c2), b2 = o2.preserveVertices;
|
|
541
|
+
return a2 && (h2 ? g2.push({ op: "move", data: [t2 + (b2 ? 0 : M2()), e2 + (b2 ? 0 : M2())] }) : g2.push({ op: "move", data: [t2 + (b2 ? 0 : G(l2, o2, c2)), e2 + (b2 ? 0 : G(l2, o2, c2))] })), h2 ? g2.push({ op: "bcurveTo", data: [f2 + t2 + (s2 - t2) * p2 + M2(), d2 + e2 + (n2 - e2) * p2 + M2(), f2 + t2 + 2 * (s2 - t2) * p2 + M2(), d2 + e2 + 2 * (n2 - e2) * p2 + M2(), s2 + (b2 ? 0 : M2()), n2 + (b2 ? 0 : M2())] }) : g2.push({ op: "bcurveTo", data: [f2 + t2 + (s2 - t2) * p2 + k2(), d2 + e2 + (n2 - e2) * p2 + k2(), f2 + t2 + 2 * (s2 - t2) * p2 + k2(), d2 + e2 + 2 * (n2 - e2) * p2 + k2(), s2 + (b2 ? 0 : k2()), n2 + (b2 ? 0 : k2())] }), g2;
|
|
542
|
+
}
|
|
543
|
+
function j(t2, e2, s2) {
|
|
544
|
+
if (!t2.length) return [];
|
|
545
|
+
const n2 = [];
|
|
546
|
+
n2.push([t2[0][0] + G(e2, s2), t2[0][1] + G(e2, s2)]), n2.push([t2[0][0] + G(e2, s2), t2[0][1] + G(e2, s2)]);
|
|
547
|
+
for (let o2 = 1; o2 < t2.length; o2++) n2.push([t2[o2][0] + G(e2, s2), t2[o2][1] + G(e2, s2)]), o2 === t2.length - 1 && n2.push([t2[o2][0] + G(e2, s2), t2[o2][1] + G(e2, s2)]);
|
|
548
|
+
return q(n2, null, s2);
|
|
549
|
+
}
|
|
550
|
+
function q(t2, e2, s2) {
|
|
551
|
+
const n2 = t2.length, o2 = [];
|
|
552
|
+
if (n2 > 3) {
|
|
553
|
+
const a2 = [], h2 = 1 - s2.curveTightness;
|
|
554
|
+
o2.push({ op: "move", data: [t2[1][0], t2[1][1]] });
|
|
555
|
+
for (let e3 = 1; e3 + 2 < n2; e3++) {
|
|
556
|
+
const s3 = t2[e3];
|
|
557
|
+
a2[0] = [s3[0], s3[1]], a2[1] = [s3[0] + (h2 * t2[e3 + 1][0] - h2 * t2[e3 - 1][0]) / 6, s3[1] + (h2 * t2[e3 + 1][1] - h2 * t2[e3 - 1][1]) / 6], a2[2] = [t2[e3 + 1][0] + (h2 * t2[e3][0] - h2 * t2[e3 + 2][0]) / 6, t2[e3 + 1][1] + (h2 * t2[e3][1] - h2 * t2[e3 + 2][1]) / 6], a2[3] = [t2[e3 + 1][0], t2[e3 + 1][1]], o2.push({ op: "bcurveTo", data: [a2[1][0], a2[1][1], a2[2][0], a2[2][1], a2[3][0], a2[3][1]] });
|
|
558
|
+
}
|
|
559
|
+
if (e2 && 2 === e2.length) {
|
|
560
|
+
const t3 = s2.maxRandomnessOffset;
|
|
561
|
+
o2.push({ op: "lineTo", data: [e2[0] + G(t3, s2), e2[1] + G(t3, s2)] });
|
|
562
|
+
}
|
|
563
|
+
} else 3 === n2 ? (o2.push({ op: "move", data: [t2[1][0], t2[1][1]] }), o2.push({ op: "bcurveTo", data: [t2[1][0], t2[1][1], t2[2][0], t2[2][1], t2[2][0], t2[2][1]] })) : 2 === n2 && o2.push(...R(t2[0][0], t2[0][1], t2[1][0], t2[1][1], s2, true, true));
|
|
564
|
+
return o2;
|
|
565
|
+
}
|
|
566
|
+
function F(t2, e2, s2, n2, o2, a2, h2, r2) {
|
|
567
|
+
const i2 = [], c2 = [];
|
|
568
|
+
if (0 === r2.roughness) {
|
|
569
|
+
t2 /= 4, c2.push([e2 + n2 * Math.cos(-t2), s2 + o2 * Math.sin(-t2)]);
|
|
570
|
+
for (let a3 = 0; a3 <= 2 * Math.PI; a3 += t2) {
|
|
571
|
+
const t3 = [e2 + n2 * Math.cos(a3), s2 + o2 * Math.sin(a3)];
|
|
572
|
+
i2.push(t3), c2.push(t3);
|
|
573
|
+
}
|
|
574
|
+
c2.push([e2 + n2 * Math.cos(0), s2 + o2 * Math.sin(0)]), c2.push([e2 + n2 * Math.cos(t2), s2 + o2 * Math.sin(t2)]);
|
|
575
|
+
} else {
|
|
576
|
+
const l2 = G(0.5, r2) - Math.PI / 2;
|
|
577
|
+
c2.push([G(a2, r2) + e2 + 0.9 * n2 * Math.cos(l2 - t2), G(a2, r2) + s2 + 0.9 * o2 * Math.sin(l2 - t2)]);
|
|
578
|
+
const u2 = 2 * Math.PI + l2 - 0.01;
|
|
579
|
+
for (let h3 = l2; h3 < u2; h3 += t2) {
|
|
580
|
+
const t3 = [G(a2, r2) + e2 + n2 * Math.cos(h3), G(a2, r2) + s2 + o2 * Math.sin(h3)];
|
|
581
|
+
i2.push(t3), c2.push(t3);
|
|
582
|
+
}
|
|
583
|
+
c2.push([G(a2, r2) + e2 + n2 * Math.cos(l2 + 2 * Math.PI + 0.5 * h2), G(a2, r2) + s2 + o2 * Math.sin(l2 + 2 * Math.PI + 0.5 * h2)]), c2.push([G(a2, r2) + e2 + 0.98 * n2 * Math.cos(l2 + h2), G(a2, r2) + s2 + 0.98 * o2 * Math.sin(l2 + h2)]), c2.push([G(a2, r2) + e2 + 0.9 * n2 * Math.cos(l2 + 0.5 * h2), G(a2, r2) + s2 + 0.9 * o2 * Math.sin(l2 + 0.5 * h2)]);
|
|
584
|
+
}
|
|
585
|
+
return [c2, i2];
|
|
586
|
+
}
|
|
587
|
+
function V(t2, e2, s2, n2, o2, a2, h2, r2, i2) {
|
|
588
|
+
const c2 = a2 + G(0.1, i2), l2 = [];
|
|
589
|
+
l2.push([G(r2, i2) + e2 + 0.9 * n2 * Math.cos(c2 - t2), G(r2, i2) + s2 + 0.9 * o2 * Math.sin(c2 - t2)]);
|
|
590
|
+
for (let a3 = c2; a3 <= h2; a3 += t2) l2.push([G(r2, i2) + e2 + n2 * Math.cos(a3), G(r2, i2) + s2 + o2 * Math.sin(a3)]);
|
|
591
|
+
return l2.push([e2 + n2 * Math.cos(h2), s2 + o2 * Math.sin(h2)]), l2.push([e2 + n2 * Math.cos(h2), s2 + o2 * Math.sin(h2)]), q(l2, null, i2);
|
|
592
|
+
}
|
|
593
|
+
function Z(t2, e2, s2, n2, o2, a2, h2, r2) {
|
|
594
|
+
const i2 = [], c2 = [r2.maxRandomnessOffset || 1, (r2.maxRandomnessOffset || 1) + 0.3];
|
|
595
|
+
let l2 = [0, 0];
|
|
596
|
+
const u2 = r2.disableMultiStroke ? 1 : 2, p2 = r2.preserveVertices;
|
|
597
|
+
for (let f2 = 0; f2 < u2; f2++) 0 === f2 ? i2.push({ op: "move", data: [h2[0], h2[1]] }) : i2.push({ op: "move", data: [h2[0] + (p2 ? 0 : G(c2[0], r2)), h2[1] + (p2 ? 0 : G(c2[0], r2))] }), l2 = p2 ? [o2, a2] : [o2 + G(c2[f2], r2), a2 + G(c2[f2], r2)], i2.push({ op: "bcurveTo", data: [t2 + G(c2[f2], r2), e2 + G(c2[f2], r2), s2 + G(c2[f2], r2), n2 + G(c2[f2], r2), l2[0], l2[1]] });
|
|
598
|
+
return i2;
|
|
599
|
+
}
|
|
600
|
+
function Q(t2) {
|
|
601
|
+
return [...t2];
|
|
602
|
+
}
|
|
603
|
+
function H(t2, e2 = 0) {
|
|
604
|
+
const s2 = t2.length;
|
|
605
|
+
if (s2 < 3) throw new Error("A curve must have at least three points.");
|
|
606
|
+
const n2 = [];
|
|
607
|
+
if (3 === s2) n2.push(Q(t2[0]), Q(t2[1]), Q(t2[2]), Q(t2[2]));
|
|
608
|
+
else {
|
|
609
|
+
const s3 = [];
|
|
610
|
+
s3.push(t2[0], t2[0]);
|
|
611
|
+
for (let e3 = 1; e3 < t2.length; e3++) s3.push(t2[e3]), e3 === t2.length - 1 && s3.push(t2[e3]);
|
|
612
|
+
const o2 = [], a2 = 1 - e2;
|
|
613
|
+
n2.push(Q(s3[0]));
|
|
614
|
+
for (let t3 = 1; t3 + 2 < s3.length; t3++) {
|
|
615
|
+
const e3 = s3[t3];
|
|
616
|
+
o2[0] = [e3[0], e3[1]], o2[1] = [e3[0] + (a2 * s3[t3 + 1][0] - a2 * s3[t3 - 1][0]) / 6, e3[1] + (a2 * s3[t3 + 1][1] - a2 * s3[t3 - 1][1]) / 6], o2[2] = [s3[t3 + 1][0] + (a2 * s3[t3][0] - a2 * s3[t3 + 2][0]) / 6, s3[t3 + 1][1] + (a2 * s3[t3][1] - a2 * s3[t3 + 2][1]) / 6], o2[3] = [s3[t3 + 1][0], s3[t3 + 1][1]], n2.push(o2[1], o2[2], o2[3]);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return n2;
|
|
620
|
+
}
|
|
621
|
+
function N(t2, e2) {
|
|
622
|
+
return Math.pow(t2[0] - e2[0], 2) + Math.pow(t2[1] - e2[1], 2);
|
|
623
|
+
}
|
|
624
|
+
function B(t2, e2, s2) {
|
|
625
|
+
const n2 = N(e2, s2);
|
|
626
|
+
if (0 === n2) return N(t2, e2);
|
|
627
|
+
let o2 = ((t2[0] - e2[0]) * (s2[0] - e2[0]) + (t2[1] - e2[1]) * (s2[1] - e2[1])) / n2;
|
|
628
|
+
return o2 = Math.max(0, Math.min(1, o2)), N(t2, J(e2, s2, o2));
|
|
629
|
+
}
|
|
630
|
+
function J(t2, e2, s2) {
|
|
631
|
+
return [t2[0] + (e2[0] - t2[0]) * s2, t2[1] + (e2[1] - t2[1]) * s2];
|
|
632
|
+
}
|
|
633
|
+
function K(t2, e2, s2, n2) {
|
|
634
|
+
const o2 = n2 || [];
|
|
635
|
+
if (function(t3, e3) {
|
|
636
|
+
const s3 = t3[e3 + 0], n3 = t3[e3 + 1], o3 = t3[e3 + 2], a3 = t3[e3 + 3];
|
|
637
|
+
let h3 = 3 * n3[0] - 2 * s3[0] - a3[0];
|
|
638
|
+
h3 *= h3;
|
|
639
|
+
let r2 = 3 * n3[1] - 2 * s3[1] - a3[1];
|
|
640
|
+
r2 *= r2;
|
|
641
|
+
let i2 = 3 * o3[0] - 2 * a3[0] - s3[0];
|
|
642
|
+
i2 *= i2;
|
|
643
|
+
let c2 = 3 * o3[1] - 2 * a3[1] - s3[1];
|
|
644
|
+
return c2 *= c2, h3 < i2 && (h3 = i2), r2 < c2 && (r2 = c2), h3 + r2;
|
|
645
|
+
}(t2, e2) < s2) {
|
|
646
|
+
const s3 = t2[e2 + 0];
|
|
647
|
+
if (o2.length) {
|
|
648
|
+
(a2 = o2[o2.length - 1], h2 = s3, Math.sqrt(N(a2, h2))) > 1 && o2.push(s3);
|
|
649
|
+
} else o2.push(s3);
|
|
650
|
+
o2.push(t2[e2 + 3]);
|
|
651
|
+
} else {
|
|
652
|
+
const n3 = 0.5, a3 = t2[e2 + 0], h3 = t2[e2 + 1], r2 = t2[e2 + 2], i2 = t2[e2 + 3], c2 = J(a3, h3, n3), l2 = J(h3, r2, n3), u2 = J(r2, i2, n3), p2 = J(c2, l2, n3), f2 = J(l2, u2, n3), d2 = J(p2, f2, n3);
|
|
653
|
+
K([a3, c2, p2, d2], 0, s2, o2), K([d2, f2, u2, i2], 0, s2, o2);
|
|
654
|
+
}
|
|
655
|
+
var a2, h2;
|
|
656
|
+
return o2;
|
|
657
|
+
}
|
|
658
|
+
function U(t2, e2) {
|
|
659
|
+
return X(t2, 0, t2.length, e2);
|
|
660
|
+
}
|
|
661
|
+
function X(t2, e2, s2, n2, o2) {
|
|
662
|
+
const a2 = o2 || [], h2 = t2[e2], r2 = t2[s2 - 1];
|
|
663
|
+
let i2 = 0, c2 = 1;
|
|
664
|
+
for (let n3 = e2 + 1; n3 < s2 - 1; ++n3) {
|
|
665
|
+
const e3 = B(t2[n3], h2, r2);
|
|
666
|
+
e3 > i2 && (i2 = e3, c2 = n3);
|
|
667
|
+
}
|
|
668
|
+
return Math.sqrt(i2) > n2 ? (X(t2, e2, c2 + 1, n2, a2), X(t2, c2, s2, n2, a2)) : (a2.length || a2.push(h2), a2.push(r2)), a2;
|
|
669
|
+
}
|
|
670
|
+
function Y(t2, e2 = 0.15, s2) {
|
|
671
|
+
const n2 = [], o2 = (t2.length - 1) / 3;
|
|
672
|
+
for (let s3 = 0; s3 < o2; s3++) {
|
|
673
|
+
K(t2, 3 * s3, e2, n2);
|
|
674
|
+
}
|
|
675
|
+
return s2 && s2 > 0 ? X(n2, 0, n2.length, s2) : n2;
|
|
676
|
+
}
|
|
677
|
+
var tt = "none";
|
|
678
|
+
var et = class {
|
|
679
|
+
constructor(t2) {
|
|
680
|
+
this.defaultOptions = { maxRandomnessOffset: 2, roughness: 1, bowing: 1, stroke: "#000", strokeWidth: 1, curveTightness: 0, curveFitting: 0.95, curveStepCount: 9, fillStyle: "hachure", fillWeight: -1, hachureAngle: -41, hachureGap: -1, dashOffset: -1, dashGap: -1, zigzagOffset: -1, seed: 0, disableMultiStroke: false, disableMultiStrokeFill: false, preserveVertices: false, fillShapeRoughnessGain: 0.8 }, this.config = t2 || {}, this.config.options && (this.defaultOptions = this._o(this.config.options));
|
|
681
|
+
}
|
|
682
|
+
static newSeed() {
|
|
683
|
+
return Math.floor(Math.random() * 2 ** 31);
|
|
684
|
+
}
|
|
685
|
+
_o(t2) {
|
|
686
|
+
return t2 ? Object.assign({}, this.defaultOptions, t2) : this.defaultOptions;
|
|
687
|
+
}
|
|
688
|
+
_d(t2, e2, s2) {
|
|
689
|
+
return { shape: t2, sets: e2 || [], options: s2 || this.defaultOptions };
|
|
690
|
+
}
|
|
691
|
+
line(t2, e2, s2, n2, o2) {
|
|
692
|
+
const a2 = this._o(o2);
|
|
693
|
+
return this._d("line", [v(t2, e2, s2, n2, a2)], a2);
|
|
694
|
+
}
|
|
695
|
+
rectangle(t2, e2, s2, n2, o2) {
|
|
696
|
+
const a2 = this._o(o2), h2 = [], r2 = O(t2, e2, s2, n2, a2);
|
|
697
|
+
if (a2.fill) {
|
|
698
|
+
const o3 = [[t2, e2], [t2 + s2, e2], [t2 + s2, e2 + n2], [t2, e2 + n2]];
|
|
699
|
+
"solid" === a2.fillStyle ? h2.push(I([o3], a2)) : h2.push(C([o3], a2));
|
|
700
|
+
}
|
|
701
|
+
return a2.stroke !== tt && h2.push(r2), this._d("rectangle", h2, a2);
|
|
702
|
+
}
|
|
703
|
+
ellipse(t2, e2, s2, n2, o2) {
|
|
704
|
+
const a2 = this._o(o2), h2 = [], r2 = T(s2, n2, a2), i2 = D(t2, e2, a2, r2);
|
|
705
|
+
if (a2.fill) if ("solid" === a2.fillStyle) {
|
|
706
|
+
const s3 = D(t2, e2, a2, r2).opset;
|
|
707
|
+
s3.type = "fillPath", h2.push(s3);
|
|
708
|
+
} else h2.push(C([i2.estimatedPoints], a2));
|
|
709
|
+
return a2.stroke !== tt && h2.push(i2.opset), this._d("ellipse", h2, a2);
|
|
710
|
+
}
|
|
711
|
+
circle(t2, e2, s2, n2) {
|
|
712
|
+
const o2 = this.ellipse(t2, e2, s2, s2, n2);
|
|
713
|
+
return o2.shape = "circle", o2;
|
|
714
|
+
}
|
|
715
|
+
linearPath(t2, e2) {
|
|
716
|
+
const s2 = this._o(e2);
|
|
717
|
+
return this._d("linearPath", [S(t2, false, s2)], s2);
|
|
718
|
+
}
|
|
719
|
+
arc(t2, e2, s2, n2, o2, a2, h2 = false, r2) {
|
|
720
|
+
const i2 = this._o(r2), c2 = [], l2 = A(t2, e2, s2, n2, o2, a2, h2, true, i2);
|
|
721
|
+
if (h2 && i2.fill) if ("solid" === i2.fillStyle) {
|
|
722
|
+
const h3 = Object.assign({}, i2);
|
|
723
|
+
h3.disableMultiStroke = true;
|
|
724
|
+
const r3 = A(t2, e2, s2, n2, o2, a2, true, false, h3);
|
|
725
|
+
r3.type = "fillPath", c2.push(r3);
|
|
726
|
+
} else c2.push(function(t3, e3, s3, n3, o3, a3, h3) {
|
|
727
|
+
const r3 = t3, i3 = e3;
|
|
728
|
+
let c3 = Math.abs(s3 / 2), l3 = Math.abs(n3 / 2);
|
|
729
|
+
c3 += G(0.01 * c3, h3), l3 += G(0.01 * l3, h3);
|
|
730
|
+
let u2 = o3, p2 = a3;
|
|
731
|
+
for (; u2 < 0; ) u2 += 2 * Math.PI, p2 += 2 * Math.PI;
|
|
732
|
+
p2 - u2 > 2 * Math.PI && (u2 = 0, p2 = 2 * Math.PI);
|
|
733
|
+
const f2 = (p2 - u2) / h3.curveStepCount, d2 = [];
|
|
734
|
+
for (let t4 = u2; t4 <= p2; t4 += f2) d2.push([r3 + c3 * Math.cos(t4), i3 + l3 * Math.sin(t4)]);
|
|
735
|
+
return d2.push([r3 + c3 * Math.cos(p2), i3 + l3 * Math.sin(p2)]), d2.push([r3, i3]), C([d2], h3);
|
|
736
|
+
}(t2, e2, s2, n2, o2, a2, i2));
|
|
737
|
+
return i2.stroke !== tt && c2.push(l2), this._d("arc", c2, i2);
|
|
738
|
+
}
|
|
739
|
+
curve(t2, e2) {
|
|
740
|
+
const s2 = this._o(e2), n2 = [], o2 = L(t2, s2);
|
|
741
|
+
if (s2.fill && s2.fill !== tt) if ("solid" === s2.fillStyle) {
|
|
742
|
+
const e3 = L(t2, Object.assign(Object.assign({}, s2), { disableMultiStroke: true, roughness: s2.roughness ? s2.roughness + s2.fillShapeRoughnessGain : 0 }));
|
|
743
|
+
n2.push({ type: "fillPath", ops: this._mergedShape(e3.ops) });
|
|
744
|
+
} else {
|
|
745
|
+
const e3 = [], o3 = t2;
|
|
746
|
+
if (o3.length) {
|
|
747
|
+
const t3 = "number" == typeof o3[0][0] ? [o3] : o3;
|
|
748
|
+
for (const n3 of t3) n3.length < 3 ? e3.push(...n3) : 3 === n3.length ? e3.push(...Y(H([n3[0], n3[0], n3[1], n3[2]]), 10, (1 + s2.roughness) / 2)) : e3.push(...Y(H(n3), 10, (1 + s2.roughness) / 2));
|
|
749
|
+
}
|
|
750
|
+
e3.length && n2.push(C([e3], s2));
|
|
751
|
+
}
|
|
752
|
+
return s2.stroke !== tt && n2.push(o2), this._d("curve", n2, s2);
|
|
753
|
+
}
|
|
754
|
+
polygon(t2, e2) {
|
|
755
|
+
const s2 = this._o(e2), n2 = [], o2 = S(t2, true, s2);
|
|
756
|
+
return s2.fill && ("solid" === s2.fillStyle ? n2.push(I([t2], s2)) : n2.push(C([t2], s2))), s2.stroke !== tt && n2.push(o2), this._d("polygon", n2, s2);
|
|
757
|
+
}
|
|
758
|
+
path(t2, e2) {
|
|
759
|
+
const s2 = this._o(e2), n2 = [];
|
|
760
|
+
if (!t2) return this._d("path", n2, s2);
|
|
761
|
+
t2 = (t2 || "").replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(ss)/g", " ");
|
|
762
|
+
const o2 = s2.fill && "transparent" !== s2.fill && s2.fill !== tt, a2 = s2.stroke !== tt, h2 = !!(s2.simplification && s2.simplification < 1), r2 = function(t3, e3, s3) {
|
|
763
|
+
const n3 = m(y(b(t3))), o3 = [];
|
|
764
|
+
let a3 = [], h3 = [0, 0], r3 = [];
|
|
765
|
+
const i3 = () => {
|
|
766
|
+
r3.length >= 4 && a3.push(...Y(r3, e3)), r3 = [];
|
|
767
|
+
}, c2 = () => {
|
|
768
|
+
i3(), a3.length && (o3.push(a3), a3 = []);
|
|
769
|
+
};
|
|
770
|
+
for (const { key: t4, data: e4 } of n3) switch (t4) {
|
|
771
|
+
case "M":
|
|
772
|
+
c2(), h3 = [e4[0], e4[1]], a3.push(h3);
|
|
773
|
+
break;
|
|
774
|
+
case "L":
|
|
775
|
+
i3(), a3.push([e4[0], e4[1]]);
|
|
776
|
+
break;
|
|
777
|
+
case "C":
|
|
778
|
+
if (!r3.length) {
|
|
779
|
+
const t5 = a3.length ? a3[a3.length - 1] : h3;
|
|
780
|
+
r3.push([t5[0], t5[1]]);
|
|
781
|
+
}
|
|
782
|
+
r3.push([e4[0], e4[1]]), r3.push([e4[2], e4[3]]), r3.push([e4[4], e4[5]]);
|
|
783
|
+
break;
|
|
784
|
+
case "Z":
|
|
785
|
+
i3(), a3.push([h3[0], h3[1]]);
|
|
786
|
+
}
|
|
787
|
+
if (c2(), !s3) return o3;
|
|
788
|
+
const l2 = [];
|
|
789
|
+
for (const t4 of o3) {
|
|
790
|
+
const e4 = U(t4, s3);
|
|
791
|
+
e4.length && l2.push(e4);
|
|
792
|
+
}
|
|
793
|
+
return l2;
|
|
794
|
+
}(t2, 1, h2 ? 4 - 4 * (s2.simplification || 1) : (1 + s2.roughness) / 2), i2 = _(t2, s2);
|
|
795
|
+
if (o2) if ("solid" === s2.fillStyle) if (1 === r2.length) {
|
|
796
|
+
const e3 = _(t2, Object.assign(Object.assign({}, s2), { disableMultiStroke: true, roughness: s2.roughness ? s2.roughness + s2.fillShapeRoughnessGain : 0 }));
|
|
797
|
+
n2.push({ type: "fillPath", ops: this._mergedShape(e3.ops) });
|
|
798
|
+
} else n2.push(I(r2, s2));
|
|
799
|
+
else n2.push(C(r2, s2));
|
|
800
|
+
return a2 && (h2 ? r2.forEach((t3) => {
|
|
801
|
+
n2.push(S(t3, false, s2));
|
|
802
|
+
}) : n2.push(i2)), this._d("path", n2, s2);
|
|
803
|
+
}
|
|
804
|
+
opsToPath(t2, e2) {
|
|
805
|
+
let s2 = "";
|
|
806
|
+
for (const n2 of t2.ops) {
|
|
807
|
+
const t3 = "number" == typeof e2 && e2 >= 0 ? n2.data.map((t4) => +t4.toFixed(e2)) : n2.data;
|
|
808
|
+
switch (n2.op) {
|
|
809
|
+
case "move":
|
|
810
|
+
s2 += `M${t3[0]} ${t3[1]} `;
|
|
811
|
+
break;
|
|
812
|
+
case "bcurveTo":
|
|
813
|
+
s2 += `C${t3[0]} ${t3[1]}, ${t3[2]} ${t3[3]}, ${t3[4]} ${t3[5]} `;
|
|
814
|
+
break;
|
|
815
|
+
case "lineTo":
|
|
816
|
+
s2 += `L${t3[0]} ${t3[1]} `;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return s2.trim();
|
|
820
|
+
}
|
|
821
|
+
toPaths(t2) {
|
|
822
|
+
const e2 = t2.sets || [], s2 = t2.options || this.defaultOptions, n2 = [];
|
|
823
|
+
for (const t3 of e2) {
|
|
824
|
+
let e3 = null;
|
|
825
|
+
switch (t3.type) {
|
|
826
|
+
case "path":
|
|
827
|
+
e3 = { d: this.opsToPath(t3), stroke: s2.stroke, strokeWidth: s2.strokeWidth, fill: tt };
|
|
828
|
+
break;
|
|
829
|
+
case "fillPath":
|
|
830
|
+
e3 = { d: this.opsToPath(t3), stroke: tt, strokeWidth: 0, fill: s2.fill || tt };
|
|
831
|
+
break;
|
|
832
|
+
case "fillSketch":
|
|
833
|
+
e3 = this.fillSketch(t3, s2);
|
|
834
|
+
}
|
|
835
|
+
e3 && n2.push(e3);
|
|
836
|
+
}
|
|
837
|
+
return n2;
|
|
838
|
+
}
|
|
839
|
+
fillSketch(t2, e2) {
|
|
840
|
+
let s2 = e2.fillWeight;
|
|
841
|
+
return s2 < 0 && (s2 = e2.strokeWidth / 2), { d: this.opsToPath(t2), stroke: e2.fill || tt, strokeWidth: s2, fill: tt };
|
|
842
|
+
}
|
|
843
|
+
_mergedShape(t2) {
|
|
844
|
+
return t2.filter((t3, e2) => 0 === e2 || "move" !== t3.op);
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
var st = class {
|
|
848
|
+
constructor(t2, e2) {
|
|
849
|
+
this.canvas = t2, this.ctx = this.canvas.getContext("2d"), this.gen = new et(e2);
|
|
850
|
+
}
|
|
851
|
+
draw(t2) {
|
|
852
|
+
const e2 = t2.sets || [], s2 = t2.options || this.getDefaultOptions(), n2 = this.ctx, o2 = t2.options.fixedDecimalPlaceDigits;
|
|
853
|
+
for (const a2 of e2) switch (a2.type) {
|
|
854
|
+
case "path":
|
|
855
|
+
n2.save(), n2.strokeStyle = "none" === s2.stroke ? "transparent" : s2.stroke, n2.lineWidth = s2.strokeWidth, s2.strokeLineDash && n2.setLineDash(s2.strokeLineDash), s2.strokeLineDashOffset && (n2.lineDashOffset = s2.strokeLineDashOffset), this._drawToContext(n2, a2, o2), n2.restore();
|
|
856
|
+
break;
|
|
857
|
+
case "fillPath": {
|
|
858
|
+
n2.save(), n2.fillStyle = s2.fill || "";
|
|
859
|
+
const e3 = "curve" === t2.shape || "polygon" === t2.shape || "path" === t2.shape ? "evenodd" : "nonzero";
|
|
860
|
+
this._drawToContext(n2, a2, o2, e3), n2.restore();
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
case "fillSketch":
|
|
864
|
+
this.fillSketch(n2, a2, s2);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
fillSketch(t2, e2, s2) {
|
|
868
|
+
let n2 = s2.fillWeight;
|
|
869
|
+
n2 < 0 && (n2 = s2.strokeWidth / 2), t2.save(), s2.fillLineDash && t2.setLineDash(s2.fillLineDash), s2.fillLineDashOffset && (t2.lineDashOffset = s2.fillLineDashOffset), t2.strokeStyle = s2.fill || "", t2.lineWidth = n2, this._drawToContext(t2, e2, s2.fixedDecimalPlaceDigits), t2.restore();
|
|
870
|
+
}
|
|
871
|
+
_drawToContext(t2, e2, s2, n2 = "nonzero") {
|
|
872
|
+
t2.beginPath();
|
|
873
|
+
for (const n3 of e2.ops) {
|
|
874
|
+
const e3 = "number" == typeof s2 && s2 >= 0 ? n3.data.map((t3) => +t3.toFixed(s2)) : n3.data;
|
|
875
|
+
switch (n3.op) {
|
|
876
|
+
case "move":
|
|
877
|
+
t2.moveTo(e3[0], e3[1]);
|
|
878
|
+
break;
|
|
879
|
+
case "bcurveTo":
|
|
880
|
+
t2.bezierCurveTo(e3[0], e3[1], e3[2], e3[3], e3[4], e3[5]);
|
|
881
|
+
break;
|
|
882
|
+
case "lineTo":
|
|
883
|
+
t2.lineTo(e3[0], e3[1]);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
"fillPath" === e2.type ? t2.fill(n2) : t2.stroke();
|
|
887
|
+
}
|
|
888
|
+
get generator() {
|
|
889
|
+
return this.gen;
|
|
890
|
+
}
|
|
891
|
+
getDefaultOptions() {
|
|
892
|
+
return this.gen.defaultOptions;
|
|
893
|
+
}
|
|
894
|
+
line(t2, e2, s2, n2, o2) {
|
|
895
|
+
const a2 = this.gen.line(t2, e2, s2, n2, o2);
|
|
896
|
+
return this.draw(a2), a2;
|
|
897
|
+
}
|
|
898
|
+
rectangle(t2, e2, s2, n2, o2) {
|
|
899
|
+
const a2 = this.gen.rectangle(t2, e2, s2, n2, o2);
|
|
900
|
+
return this.draw(a2), a2;
|
|
901
|
+
}
|
|
902
|
+
ellipse(t2, e2, s2, n2, o2) {
|
|
903
|
+
const a2 = this.gen.ellipse(t2, e2, s2, n2, o2);
|
|
904
|
+
return this.draw(a2), a2;
|
|
905
|
+
}
|
|
906
|
+
circle(t2, e2, s2, n2) {
|
|
907
|
+
const o2 = this.gen.circle(t2, e2, s2, n2);
|
|
908
|
+
return this.draw(o2), o2;
|
|
909
|
+
}
|
|
910
|
+
linearPath(t2, e2) {
|
|
911
|
+
const s2 = this.gen.linearPath(t2, e2);
|
|
912
|
+
return this.draw(s2), s2;
|
|
913
|
+
}
|
|
914
|
+
polygon(t2, e2) {
|
|
915
|
+
const s2 = this.gen.polygon(t2, e2);
|
|
916
|
+
return this.draw(s2), s2;
|
|
917
|
+
}
|
|
918
|
+
arc(t2, e2, s2, n2, o2, a2, h2 = false, r2) {
|
|
919
|
+
const i2 = this.gen.arc(t2, e2, s2, n2, o2, a2, h2, r2);
|
|
920
|
+
return this.draw(i2), i2;
|
|
921
|
+
}
|
|
922
|
+
curve(t2, e2) {
|
|
923
|
+
const s2 = this.gen.curve(t2, e2);
|
|
924
|
+
return this.draw(s2), s2;
|
|
925
|
+
}
|
|
926
|
+
path(t2, e2) {
|
|
927
|
+
const s2 = this.gen.path(t2, e2);
|
|
928
|
+
return this.draw(s2), s2;
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
var nt = "http://www.w3.org/2000/svg";
|
|
932
|
+
var ot = class {
|
|
933
|
+
constructor(t2, e2) {
|
|
934
|
+
this.svg = t2, this.gen = new et(e2);
|
|
935
|
+
}
|
|
936
|
+
draw(t2) {
|
|
937
|
+
const e2 = t2.sets || [], s2 = t2.options || this.getDefaultOptions(), n2 = this.svg.ownerDocument || window.document, o2 = n2.createElementNS(nt, "g"), a2 = t2.options.fixedDecimalPlaceDigits;
|
|
938
|
+
for (const h2 of e2) {
|
|
939
|
+
let e3 = null;
|
|
940
|
+
switch (h2.type) {
|
|
941
|
+
case "path":
|
|
942
|
+
e3 = n2.createElementNS(nt, "path"), e3.setAttribute("d", this.opsToPath(h2, a2)), e3.setAttribute("stroke", s2.stroke), e3.setAttribute("stroke-width", s2.strokeWidth + ""), e3.setAttribute("fill", "none"), s2.strokeLineDash && e3.setAttribute("stroke-dasharray", s2.strokeLineDash.join(" ").trim()), s2.strokeLineDashOffset && e3.setAttribute("stroke-dashoffset", `${s2.strokeLineDashOffset}`);
|
|
943
|
+
break;
|
|
944
|
+
case "fillPath":
|
|
945
|
+
e3 = n2.createElementNS(nt, "path"), e3.setAttribute("d", this.opsToPath(h2, a2)), e3.setAttribute("stroke", "none"), e3.setAttribute("stroke-width", "0"), e3.setAttribute("fill", s2.fill || ""), "curve" !== t2.shape && "polygon" !== t2.shape || e3.setAttribute("fill-rule", "evenodd");
|
|
946
|
+
break;
|
|
947
|
+
case "fillSketch":
|
|
948
|
+
e3 = this.fillSketch(n2, h2, s2);
|
|
949
|
+
}
|
|
950
|
+
e3 && o2.appendChild(e3);
|
|
951
|
+
}
|
|
952
|
+
return o2;
|
|
953
|
+
}
|
|
954
|
+
fillSketch(t2, e2, s2) {
|
|
955
|
+
let n2 = s2.fillWeight;
|
|
956
|
+
n2 < 0 && (n2 = s2.strokeWidth / 2);
|
|
957
|
+
const o2 = t2.createElementNS(nt, "path");
|
|
958
|
+
return o2.setAttribute("d", this.opsToPath(e2, s2.fixedDecimalPlaceDigits)), o2.setAttribute("stroke", s2.fill || ""), o2.setAttribute("stroke-width", n2 + ""), o2.setAttribute("fill", "none"), s2.fillLineDash && o2.setAttribute("stroke-dasharray", s2.fillLineDash.join(" ").trim()), s2.fillLineDashOffset && o2.setAttribute("stroke-dashoffset", `${s2.fillLineDashOffset}`), o2;
|
|
959
|
+
}
|
|
960
|
+
get generator() {
|
|
961
|
+
return this.gen;
|
|
962
|
+
}
|
|
963
|
+
getDefaultOptions() {
|
|
964
|
+
return this.gen.defaultOptions;
|
|
965
|
+
}
|
|
966
|
+
opsToPath(t2, e2) {
|
|
967
|
+
return this.gen.opsToPath(t2, e2);
|
|
968
|
+
}
|
|
969
|
+
line(t2, e2, s2, n2, o2) {
|
|
970
|
+
const a2 = this.gen.line(t2, e2, s2, n2, o2);
|
|
971
|
+
return this.draw(a2);
|
|
972
|
+
}
|
|
973
|
+
rectangle(t2, e2, s2, n2, o2) {
|
|
974
|
+
const a2 = this.gen.rectangle(t2, e2, s2, n2, o2);
|
|
975
|
+
return this.draw(a2);
|
|
976
|
+
}
|
|
977
|
+
ellipse(t2, e2, s2, n2, o2) {
|
|
978
|
+
const a2 = this.gen.ellipse(t2, e2, s2, n2, o2);
|
|
979
|
+
return this.draw(a2);
|
|
980
|
+
}
|
|
981
|
+
circle(t2, e2, s2, n2) {
|
|
982
|
+
const o2 = this.gen.circle(t2, e2, s2, n2);
|
|
983
|
+
return this.draw(o2);
|
|
984
|
+
}
|
|
985
|
+
linearPath(t2, e2) {
|
|
986
|
+
const s2 = this.gen.linearPath(t2, e2);
|
|
987
|
+
return this.draw(s2);
|
|
988
|
+
}
|
|
989
|
+
polygon(t2, e2) {
|
|
990
|
+
const s2 = this.gen.polygon(t2, e2);
|
|
991
|
+
return this.draw(s2);
|
|
992
|
+
}
|
|
993
|
+
arc(t2, e2, s2, n2, o2, a2, h2 = false, r2) {
|
|
994
|
+
const i2 = this.gen.arc(t2, e2, s2, n2, o2, a2, h2, r2);
|
|
995
|
+
return this.draw(i2);
|
|
996
|
+
}
|
|
997
|
+
curve(t2, e2) {
|
|
998
|
+
const s2 = this.gen.curve(t2, e2);
|
|
999
|
+
return this.draw(s2);
|
|
1000
|
+
}
|
|
1001
|
+
path(t2, e2) {
|
|
1002
|
+
const s2 = this.gen.path(t2, e2);
|
|
1003
|
+
return this.draw(s2);
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
var at = { canvas: (t2, e2) => new st(t2, e2), svg: (t2, e2) => new ot(t2, e2), generator: (t2) => new et(t2), newSeed: () => et.newSeed() };
|
|
1007
|
+
|
|
1008
|
+
export {
|
|
1009
|
+
at
|
|
1010
|
+
};
|
|
1011
|
+
//# sourceMappingURL=chunk-6LYV7PBV.js.map
|