@algorisys/yappydraw 0.8.293 → 0.8.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/chunks/{canva-ai-B5NJGMGr.js → canva-ai-DqccAnxC.js} +1 -1
- package/chunks/{choice-dialog-state-Cw0WShhc.js → choice-dialog-state-10-yA9qy.js} +1 -1
- package/chunks/{custgeom-BeeylhzV.js → custgeom-gp_HWEYw.js} +13 -10
- package/chunks/{design-generator-BSZ2XUOE.js → design-generator-DIyJ4Dr0.js} +1 -1
- package/chunks/{drawing-engine-DfASJ_gK.js → drawing-engine-nqE0zI8L.js} +1 -1
- package/chunks/{drawings-store-cl-M93Eh.js → drawings-store-BFtMld-q.js} +1 -1
- package/chunks/{ds-operations-CXoS_Obn.js → ds-operations-40JYI4lM.js} +1 -1
- package/chunks/{export-game-BTjE-uv-.js → export-game-5Kek7Bol.js} +1 -1
- package/chunks/{from-yappy-hUcG5auS.js → from-yappy-ChRzxzZ9.js} +98 -88
- package/chunks/{game-runtime-33Ly0Axb.js → game-runtime--zmzKmmo.js} +37 -37
- package/chunks/{import-Dk___UKU.js → import-DGbhv-Je.js} +571 -507
- package/chunks/{index-OCtbNe3Y.js → index-v2rH-W8-.js} +40108 -39488
- package/chunks/{lucide-solid-Btzt68l9.js → lucide-solid-BHWkJbay.js} +1 -1
- package/chunks/markdown-to-slides-siI6fZd3.js +122 -0
- package/chunks/{morph-animator-CWLzpuUc.js → morph-animator-klLNQx0a.js} +1 -1
- package/chunks/{onboarding-tour-eLES7UJM.js → onboarding-tour-CV0e3oyB.js} +1 -1
- package/chunks/{pdf-vector-C1l03NEO.js → pdf-vector-DLxGyE10.js} +1 -1
- package/chunks/{search-tbh5OqVp.js → search-53sGgwDp.js} +2 -2
- package/chunks/{slide-generator-CZfB2tSO.js → slide-generator-BttJgv2N.js} +1 -1
- package/chunks/{turntable-ai-CeD-w_eE.js → turntable-ai-7udakZBz.js} +1 -1
- package/chunks/write-CIGfHqn4.js +254 -0
- package/package.json +1 -1
- package/yappy.js +1 -1
- package/chunks/markdown-to-slides-CNpwNPE8.js +0 -96
- package/chunks/write-BUtbdS9L.js +0 -212
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { r as L, X as x, N as v, z as ie, e as S, E as $, a as ee, p as F, b as ce, c as de, R as o, f as me } from "./custgeom-gp_HWEYw.js";
|
|
2
|
+
const D = 914400, R = 51206400, b = `xmlns:a="${v.a}" xmlns:r="${v.r}" xmlns:p="${v.p}"`, f = {
|
|
3
|
+
presentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",
|
|
4
|
+
slide: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
|
5
|
+
slideLayout: "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",
|
|
6
|
+
slideMaster: "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",
|
|
7
|
+
theme: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
8
|
+
presProps: "application/vnd.openxmlformats-officedocument.presentationml.presProps+xml",
|
|
9
|
+
viewProps: "application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml",
|
|
10
|
+
tableStyles: "application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml",
|
|
11
|
+
notesMaster: "application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml",
|
|
12
|
+
notesSlide: "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",
|
|
13
|
+
core: "application/vnd.openxmlformats-package.core-properties+xml",
|
|
14
|
+
app: "application/vnd.openxmlformats-officedocument.extended-properties+xml"
|
|
15
|
+
}, he = {
|
|
16
|
+
png: "image/png",
|
|
17
|
+
jpeg: "image/jpeg",
|
|
18
|
+
gif: "image/gif",
|
|
19
|
+
svg: "image/svg+xml",
|
|
20
|
+
bmp: "image/bmp",
|
|
21
|
+
tiff: "image/tiff",
|
|
22
|
+
webp: "image/webp",
|
|
23
|
+
emf: "image/x-emf",
|
|
24
|
+
wmf: "image/x-wmf"
|
|
25
|
+
}, q = (e) => {
|
|
26
|
+
const t = String(e || "").replace("#", "").toLowerCase();
|
|
27
|
+
return /^[0-9a-f]{6}$/.test(t) ? t.toUpperCase() : "000000";
|
|
28
|
+
}, k = (e) => {
|
|
29
|
+
const t = e.alpha;
|
|
30
|
+
return t !== void 0 && t < 1 ? `<a:srgbClr val="${q(e.hex)}"><a:alpha val="${F(t)}"/></a:srgbClr>` : `<a:srgbClr val="${q(e.hex)}"/>`;
|
|
31
|
+
}, Z = (e) => {
|
|
32
|
+
const t = [...e].sort((a, l) => a.pos - l.pos);
|
|
33
|
+
return "<a:gsLst>" + (t.length === 1 ? [{ ...t[0], pos: 0 }, { ...t[0], pos: 1 }] : t).map((a) => `<a:gs pos="${F(a.pos)}">${k(a.color)}</a:gs>`).join("") + "</a:gsLst>";
|
|
34
|
+
};
|
|
35
|
+
function te(e) {
|
|
36
|
+
if (!e || e.kind === "none") return "<a:noFill/>";
|
|
37
|
+
switch (e.kind) {
|
|
38
|
+
case "solid":
|
|
39
|
+
return `<a:solidFill>${k(e.color)}</a:solidFill>`;
|
|
40
|
+
case "linear":
|
|
41
|
+
return e.stops.length === 0 ? "<a:noFill/>" : `<a:gradFill rotWithShape="1">${Z(e.stops)}<a:lin ang="${ee(e.angle)}" scaled="${e.scaled ? 1 : 0}"/></a:gradFill>`;
|
|
42
|
+
case "radial":
|
|
43
|
+
return e.stops.length === 0 ? "<a:noFill/>" : `<a:gradFill rotWithShape="1">${Z(e.stops)}<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill>`;
|
|
44
|
+
case "image":
|
|
45
|
+
return "<a:noFill/>";
|
|
46
|
+
// import-only paint; the exporter never produces it
|
|
47
|
+
case "pattern":
|
|
48
|
+
return `<a:pattFill prst="${S(e.preset)}"><a:fgClr>${k(e.color)}</a:fgClr><a:bgClr>${e.bg ? k(e.bg) : '<a:srgbClr val="FFFFFF"><a:alpha val="0"/></a:srgbClr>'}</a:bgClr></a:pattFill>`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function ae(e, t) {
|
|
52
|
+
if (!e || !(e.width > 0)) return "<a:ln><a:noFill/></a:ln>";
|
|
53
|
+
let a = `<a:ln w="${Math.max(0, Math.min(20116800, Math.round(e.width * t * $)))}"${e.cap ? ` cap="${e.cap}"` : ""}><a:solidFill>${k(e.color)}</a:solidFill>`;
|
|
54
|
+
e.dash && (a += `<a:prstDash val="${S(e.dash)}"/>`), e.join === "round" ? a += "<a:round/>" : e.join === "bevel" ? a += "<a:bevel/>" : e.join === "miter" && (a += '<a:miter lim="800000"/>');
|
|
55
|
+
const l = (r, p) => p ? `<a:${r} type="${p.type}" w="${p.size ?? "med"}" len="${p.size ?? "med"}"/>` : "";
|
|
56
|
+
return a += l("headEnd", e.head) + l("tailEnd", e.tail), a + "</a:ln>";
|
|
57
|
+
}
|
|
58
|
+
function O(e, t, s = "a:rPr") {
|
|
59
|
+
const a = ['lang="en-US"'];
|
|
60
|
+
e.size && a.push(`sz="${me(e.size * t)}"`), e.bold !== void 0 && a.push(`b="${e.bold ? 1 : 0}"`), e.italic !== void 0 && a.push(`i="${e.italic ? 1 : 0}"`), e.underline && a.push('u="sng"'), e.strike && a.push('strike="sngStrike"'), a.push('dirty="0"');
|
|
61
|
+
let l = "";
|
|
62
|
+
if (e.color && (l += `<a:solidFill>${k(e.color)}</a:solidFill>`), e.font) {
|
|
63
|
+
const r = S(e.font);
|
|
64
|
+
l += `<a:latin typeface="${r}"/><a:ea typeface="${r}"/><a:cs typeface="${r}"/>`;
|
|
65
|
+
}
|
|
66
|
+
return l ? `<${s} ${a.join(" ")}>${l}</${s}>` : `<${s} ${a.join(" ")}/>`;
|
|
67
|
+
}
|
|
68
|
+
const fe = 20, $e = /* @__PURE__ */ new Set(["•", "–", "—", "-", "»", "›", ">", "*", "+", "·"]), xe = /^(alphaLc|alphaUc|arabic|romanLc|romanUc)(ParenBoth|ParenR|Period|Plain)$/;
|
|
69
|
+
function ue(e, t, s) {
|
|
70
|
+
const a = Math.max(0, Math.min(8, e.level ?? 0)), l = [];
|
|
71
|
+
e.align && l.push(`algn="${e.align}"`);
|
|
72
|
+
let r = "";
|
|
73
|
+
t.lineSpacing && Math.abs(t.lineSpacing - 1) > 1e-3 && (r += `<a:lnSpc><a:spcPct val="${Math.round(Math.max(0.1, Math.min(13.2, t.lineSpacing)) * 1e5)}"/></a:lnSpc>`);
|
|
74
|
+
const p = (c, h) => h && h > 0 ? `<a:${c}><a:spcPts val="${Math.round(Math.min(1584, h * s * 0.75) * 100)}"/></a:${c}>` : "";
|
|
75
|
+
if (r += p("spcBef", e.spaceBefore) + p("spcAft", e.spaceAfter), e.bullet) {
|
|
76
|
+
const c = fe * s * $, h = e.marL !== void 0 ? e.marL * s * $ : c * (a + 1), P = e.indent !== void 0 ? e.indent * s * $ : -c, M = (g, w) => Math.round(Math.max(w, Math.min(51206400, g)));
|
|
77
|
+
if (l.push(`marL="${M(h, 0)}" indent="${M(P, -51206400)}"`), a && l.push(`lvl="${a}"`), e.bulletColor && (r += `<a:buClr>${k(e.bulletColor)}</a:buClr>`), e.bulletScale && Math.abs(e.bulletScale - 1) > 1e-3 && (r += `<a:buSzPct val="${Math.round(Math.max(0.25, Math.min(4, e.bulletScale)) * 1e5)}"/>`), e.bullet === "num") {
|
|
78
|
+
const g = e.numType && xe.test(e.numType) ? e.numType : "arabicPeriod", w = e.startAt && e.startAt > 1 ? ` startAt="${Math.min(32767, Math.round(e.startAt))}"` : "";
|
|
79
|
+
r += `<a:buFont typeface="+mj-lt"/><a:buAutoNum type="${g}"${w}/>`;
|
|
80
|
+
} else {
|
|
81
|
+
const g = e.bulletChar || "•";
|
|
82
|
+
r += `<a:buFont typeface="${$e.has(g) ? "Arial" : "Segoe UI Symbol"}"/><a:buChar char="${S(g)}"/>`;
|
|
83
|
+
}
|
|
84
|
+
} else
|
|
85
|
+
a && l.push(`lvl="${a}"`), r += "<a:buNone/>";
|
|
86
|
+
const d = `<a:pPr${l.length ? " " + l.join(" ") : ""}>${r}</a:pPr>`, m = t.defaults ?? {};
|
|
87
|
+
let n = "";
|
|
88
|
+
for (const c of e.runs) {
|
|
89
|
+
const h = { ...m, ...ge(c) };
|
|
90
|
+
if (c.br) {
|
|
91
|
+
n += `<a:br>${O(h, s)}</a:br>`;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
c.text && (n += `<a:r>${O(h, s)}<a:t>${S(c.text)}</a:t></a:r>`);
|
|
95
|
+
}
|
|
96
|
+
const u = e.endSize ?? m.size;
|
|
97
|
+
return `<a:p>${d}${n}${O({ ...m, size: u }, s, "a:endParaRPr")}</a:p>`;
|
|
98
|
+
}
|
|
99
|
+
const ge = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0));
|
|
100
|
+
function ye(e, t, s = "p:txBody") {
|
|
101
|
+
if (!e) return "";
|
|
102
|
+
const a = (p) => Math.max(0, Math.round(p * t * $)), l = `<a:bodyPr wrap="${e.wrap ? "square" : "none"}" lIns="${a(e.insets.l)}" tIns="${a(e.insets.t)}" rIns="${a(e.insets.r)}" bIns="${a(e.insets.b)}" anchor="${e.anchor}" rtlCol="0"><a:noAutofit/></a:bodyPr>`, r = e.paragraphs.length ? e.paragraphs : [{ runs: [] }];
|
|
103
|
+
return `<${s}>${l}<a:lstStyle/>${r.map((p) => ue(p, e, t)).join("")}</${s}>`;
|
|
104
|
+
}
|
|
105
|
+
const se = (e, t, s) => e.kind === "preset" ? ce(e.prst, e.adj) : de(e.paths, t, s), Pe = { next: "nextslide", previous: "previousslide", first: "firstslide", last: "lastslide", end: "endshow" };
|
|
106
|
+
function Se(e, t) {
|
|
107
|
+
if (!e) return "";
|
|
108
|
+
const s = (l, r, p) => {
|
|
109
|
+
const d = t.rels.find((n) => n.type === l && n.target === r);
|
|
110
|
+
if (d) return d.id;
|
|
111
|
+
const m = `rId${t.rels.length + 1}`;
|
|
112
|
+
return t.rels.push({ id: m, type: l, target: r, external: p }), m;
|
|
113
|
+
};
|
|
114
|
+
if (e.kind === "url") return `<a:hlinkClick r:id="${s(o.hyperlink, e.url, !0)}"/>`;
|
|
115
|
+
if (e.kind === "action") return `<a:hlinkClick r:id="" action="ppaction://hlinkshowjump?jump=${Pe[e.action]}"/>`;
|
|
116
|
+
const a = t.slideNumber?.(e.key);
|
|
117
|
+
return a ? `<a:hlinkClick r:id="${s(o.slide, `slide${a}.xml`)}" action="ppaction://hlinksldjump"/>` : "";
|
|
118
|
+
}
|
|
119
|
+
const B = (e, t, s = "a:xfrm", a = !1) => {
|
|
120
|
+
const l = Math.round((e.x * t.s + t.dx) * $), r = Math.round((e.y * t.s + t.dy) * $), p = Math.max(0, Math.round(Math.abs(e.w) * t.s * $)), d = Math.max(0, Math.round(Math.abs(e.h) * t.s * $)), m = [
|
|
121
|
+
e.rot ? `rot="${ee(e.rot)}"` : "",
|
|
122
|
+
e.flipH ? 'flipH="1"' : "",
|
|
123
|
+
e.flipV ? 'flipV="1"' : ""
|
|
124
|
+
].filter(Boolean).join(" "), n = a ? `<a:chOff x="${l}" y="${r}"/><a:chExt cx="${p}" cy="${d}"/>` : "";
|
|
125
|
+
return `<${s}${m ? " " + m : ""}><a:off x="${l}" y="${r}"/><a:ext cx="${p}" cy="${d}"/>${n}</${s}>`;
|
|
126
|
+
}, j = (e, t, s) => {
|
|
127
|
+
const a = `<p:cNvPr id="${e.id}" name="${S(e.name)}"${s ? ` descr="${S(s)}"` : ""}`, l = Se(e.link, t);
|
|
128
|
+
return l ? `${a}>${l}</p:cNvPr>` : `${a}/>`;
|
|
129
|
+
};
|
|
130
|
+
function ve(e, t) {
|
|
131
|
+
const s = `<p:nvSpPr>${j(e, t)}<p:cNvSpPr${e.textBox ? ' txBox="1"' : ""}/><p:nvPr/></p:nvSpPr>`, a = `<p:spPr>${B(e, t)}${se(e.geom, e.w, e.h)}${te(e.fill)}${ae(e.line, t.s)}</p:spPr>`, l = e.text ? ye(e.text, t.s) : '<p:txBody><a:bodyPr rtlCol="0" anchor="ctr"/><a:lstStyle/><a:p><a:pPr algn="ctr"/><a:endParaRPr lang="en-US" dirty="0"/></a:p></p:txBody>';
|
|
132
|
+
return `<p:sp>${s}${a}${l}</p:sp>`;
|
|
133
|
+
}
|
|
134
|
+
function be(e, t) {
|
|
135
|
+
const s = (l, r) => r ? `<a:${l} id="${r.id}" idx="${r.idx}"/>` : "";
|
|
136
|
+
return `<p:cxnSp>${`<p:nvCxnSpPr>${j(e, t)}<p:cNvCxnSpPr>${s("stCxn", e.start)}${s("endCxn", e.end)}</p:cNvCxnSpPr><p:nvPr/></p:nvCxnSpPr>`}<p:spPr>${B(e, t)}${se(e.geom, e.w, e.h)}<a:noFill/>${ae(e.line, t.s)}</p:spPr></p:cxnSp>`;
|
|
137
|
+
}
|
|
138
|
+
function Me(e, t) {
|
|
139
|
+
const s = t.media(e.media), a = `<p:nvPicPr>${j(e, t, e.descr)}<p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr><p:nvPr/></p:nvPicPr>`, l = e.alpha !== void 0 && e.alpha < 1 ? `<a:alphaModFix amt="${F(e.alpha)}"/>` : "", r = e.crop, p = r ? `<a:srcRect l="${F(r.l)}" t="${F(r.t)}" r="${F(r.r)}" b="${F(r.b)}"/>` : "", d = `<p:blipFill><a:blip r:embed="${s}">${l}</a:blip>${p}<a:stretch><a:fillRect/></a:stretch></p:blipFill>`;
|
|
140
|
+
return `<p:pic>${a}${d}<p:spPr>${B(e, t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
|
|
141
|
+
}
|
|
142
|
+
function Ce(e, t) {
|
|
143
|
+
return `<p:grpSp>${`<p:nvGrpSpPr>${j(e, t)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>`}<p:grpSpPr>${B(e, t, "a:xfrm", !0)}</p:grpSpPr>${e.children.map((a) => le(a, t)).join("")}</p:grpSp>`;
|
|
144
|
+
}
|
|
145
|
+
function le(e, t) {
|
|
146
|
+
switch (e.kind) {
|
|
147
|
+
case "shape":
|
|
148
|
+
return ve(e, t);
|
|
149
|
+
case "connector":
|
|
150
|
+
return be(e, t);
|
|
151
|
+
case "picture":
|
|
152
|
+
return Me(e, t);
|
|
153
|
+
case "group":
|
|
154
|
+
return e.children.length ? Ce(e, t) : "";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const A = '<p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr>';
|
|
158
|
+
function Le(e) {
|
|
159
|
+
if (!e) return "";
|
|
160
|
+
const t = Math.max(0, Math.min(6e4, Math.round(e.durationMs))), s = t <= 600 ? "fast" : t <= 900 ? "med" : "slow", a = e.kind === "push" ? `<p:push dir="${e.dir ?? "l"}"/>` : e.kind === "zoom" ? `<p:zoom dir="${e.zoomIn === !1 ? "out" : "in"}"/>` : "<p:fade/>";
|
|
161
|
+
return `<mc:AlternateContent xmlns:mc="${v.mc}"><mc:Choice xmlns:p14="${v.p14}" Requires="p14"><p:transition spd="${s}" p14:dur="${t}">${a}</p:transition></mc:Choice><mc:Fallback><p:transition spd="${s}">${a}</p:transition></mc:Fallback></mc:AlternateContent>`;
|
|
162
|
+
}
|
|
163
|
+
function Fe(e, t) {
|
|
164
|
+
let s = "";
|
|
165
|
+
const a = e.background;
|
|
166
|
+
a && a.kind === "image" ? s = `<p:bg><p:bgPr><a:blipFill dpi="0" rotWithShape="1"><a:blip r:embed="${t.media(a.media)}"/><a:srcRect/><a:stretch><a:fillRect/></a:stretch></a:blipFill><a:effectLst/></p:bgPr></p:bg>` : a && a.kind !== "none" && (s = `<p:bg><p:bgPr>${te(a)}<a:effectLst/></p:bgPr></p:bg>`);
|
|
167
|
+
const l = e.items.map((p) => le(p, t)).join(""), r = e.name ? ` name="${S(e.name)}"` : "";
|
|
168
|
+
return x + `<p:sld ${b}><p:cSld${r}>${s}<p:spTree>${A}${l}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>${Le(e.transition)}</p:sld>`;
|
|
169
|
+
}
|
|
170
|
+
const _ = (e, t = "") => `<a:lvl1pPr marL="0" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">${t}<a:defRPr sz="${e}" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr>`, J = x + `<a:theme xmlns:a="${v.a}" name="Yappy"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="50000"/></a:schemeClr></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:shade val="80000"/></a:schemeClr></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/></a:schemeClr></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:shade val="90000"/></a:schemeClr></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`, ke = x + `<p:sldMaster ${b}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree>${A}</p:spTree></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle>${_(4400)}</p:titleStyle><p:bodyStyle>${_(2800)}</p:bodyStyle><p:otherStyle>${_(1800)}</p:otherStyle></p:txStyles></p:sldMaster>`, we = x + `<p:sldLayout ${b} type="blank" preserve="1"><p:cSld name="Blank"><p:spTree>${A}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`, K = 6858e3, Q = 9144e3, E = (e, t, s, a, l, r, p, d, m = "") => {
|
|
171
|
+
const n = `<a:xfrm><a:off x="${Math.round(K * l)}" y="${Math.round(Q * r)}"/><a:ext cx="${Math.round(K * p)}" cy="${Math.round(Q * d)}"/></a:xfrm>`, u = s === "sldImg", c = u ? "" : ' sz="quarter"', h = u ? `<p:spPr>${n}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/><a:ln w="12700"><a:solidFill><a:prstClr val="black"/></a:solidFill></a:ln></p:spPr>` : `<p:spPr>${n}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr>`, P = u ? '<a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/>' : '<a:spLocks noGrp="1"/>', M = u ? "" : `<p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"/><a:lstStyle/>${m || '<a:p><a:endParaRPr lang="en-US"/></a:p>'}</p:txBody>`;
|
|
172
|
+
return `<p:sp><p:nvSpPr><p:cNvPr id="${e}" name="${t}"/><p:cNvSpPr>${P}</p:cNvSpPr><p:nvPr><p:ph type="${s}"${c} idx="${a}"/></p:nvPr></p:nvSpPr>${h}${M}</p:sp>`;
|
|
173
|
+
}, Ie = Array.from({ length: 9 }, (e, t) => `<a:lvl${t + 1}pPr marL="${t * 457200}" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl${t + 1}pPr>`).join(""), Ee = x + `<p:notesMaster ${b}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree>${A}` + E(2, "Header Placeholder 1", "hdr", 0, 0, 0, 0.43, 0.05) + E(3, "Date Placeholder 2", "dt", 1, 0.57, 0, 0.43, 0.05) + E(4, "Slide Image Placeholder 3", "sldImg", 2, 0.125, 0.125, 0.75, 0.375) + E(5, "Notes Placeholder 4", "body", 3, 0.1, 0.53, 0.8, 0.36, '<a:p><a:pPr lvl="0"/><a:r><a:rPr lang="en-US"/><a:t>Click to edit Master text styles</a:t></a:r></a:p>') + E(6, "Footer Placeholder 5", "ftr", 4, 0, 0.95, 0.43, 0.05) + E(7, "Slide Number Placeholder 6", "sldNum", 5, 0.57, 0.95, 0.43, 0.05) + `</p:spTree></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:notesStyle>${Ie}</p:notesStyle></p:notesMaster>`;
|
|
174
|
+
function Te(e) {
|
|
175
|
+
const t = e.replace(/\r\n?/g, `
|
|
176
|
+
`).split(`
|
|
177
|
+
`).map((l) => l ? `<a:p><a:r><a:rPr lang="en-US" dirty="0"/><a:t>${S(l)}</a:t></a:r></a:p>` : '<a:p><a:endParaRPr lang="en-US" dirty="0"/></a:p>').join(""), s = '<p:sp><p:nvSpPr><p:cNvPr id="2" name="Slide Image Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldImg"/></p:nvPr></p:nvSpPr><p:spPr/></p:sp>', a = `<p:sp><p:nvSpPr><p:cNvPr id="3" name="Notes Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr/><p:txBody><a:bodyPr/><a:lstStyle/>${t}</p:txBody></p:sp>`;
|
|
178
|
+
return x + `<p:notes ${b}><p:cSld><p:spTree>${A}${s}${a}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:notes>`;
|
|
179
|
+
}
|
|
180
|
+
const Ne = x + `<p:presentationPr ${b}/>`, Re = x + `<p:viewPr ${b}><p:normalViewPr><p:restoredLeft sz="15620"/><p:restoredTop sz="94660"/></p:normalViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`, Ae = x + `<a:tblStyleLst xmlns:a="${v.a}" def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`, De = (e, t) => x + `<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${S(e)}</dc:title><dc:creator>YappyDraw</dc:creator><cp:lastModifiedBy>YappyDraw</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${t}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${t}</dcterms:modified></cp:coreProperties>`, _e = (e, t) => x + `<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>YappyDraw</Application><Slides>${e}</Slides><Notes>${t}</Notes><PresentationFormat>Custom</PresentationFormat></Properties>`;
|
|
181
|
+
function je(e, t = {}) {
|
|
182
|
+
const s = Math.max(1, e.width), a = Math.max(1, e.height), l = Math.max(s, a) * $, r = Math.min(s, a) * $, p = l > R ? R / l : r < D ? Math.min(D / r, R / l) : 1, d = Math.max(D, Math.min(R, Math.round(s * p * $))), m = Math.max(D, Math.min(R, Math.round(a * p * $))), n = /* @__PURE__ */ new Map(), u = [], c = /* @__PURE__ */ new Set();
|
|
183
|
+
let h = 0;
|
|
184
|
+
const P = e.slides.length ? e.slides : [{ items: [] }], M = /* @__PURE__ */ new Map();
|
|
185
|
+
P.forEach((i, N) => {
|
|
186
|
+
i.key && M.set(i.key, N + 1);
|
|
187
|
+
});
|
|
188
|
+
const g = [{ id: "rId1", type: o.slideMaster, target: "slideMasters/slideMaster1.xml" }], w = P.some((i) => !!i.notes?.trim());
|
|
189
|
+
let U = "";
|
|
190
|
+
P.forEach((i, N) => {
|
|
191
|
+
const y = N + 1, I = [{ id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" }], H = /* @__PURE__ */ new Map(), z = i.fit ?? { scale: 1, dx: 0, dy: 0 }, oe = {
|
|
192
|
+
s: z.scale * p,
|
|
193
|
+
dx: z.dx * p,
|
|
194
|
+
dy: z.dy * p,
|
|
195
|
+
rels: I,
|
|
196
|
+
slideNumber: (C) => M.get(C) ?? null,
|
|
197
|
+
media: (C) => {
|
|
198
|
+
const W = H.get(C);
|
|
199
|
+
if (W) return W;
|
|
200
|
+
h++;
|
|
201
|
+
const V = `image${h}.${C.ext}`;
|
|
202
|
+
n.set(`ppt/media/${V}`, C.bytes), c.add(C.ext);
|
|
203
|
+
const X = `rId${I.length + 1}`;
|
|
204
|
+
return I.push({ id: X, type: o.image, target: `../media/${V}` }), H.set(C, X), X;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
n.set(`ppt/slides/slide${y}.xml`, Fe(i, oe)), i.notes?.trim() && (I.push({ id: `rId${I.length + 1}`, type: o.notesSlide, target: `../notesSlides/notesSlide${y}.xml` }), n.set(`ppt/notesSlides/notesSlide${y}.xml`, Te(i.notes)), n.set(`ppt/notesSlides/_rels/notesSlide${y}.xml.rels`, L([
|
|
208
|
+
{ id: "rId1", type: o.notesMaster, target: "../notesMasters/notesMaster1.xml" },
|
|
209
|
+
{ id: "rId2", type: o.slide, target: `../slides/slide${y}.xml` }
|
|
210
|
+
])), u.push([`/ppt/notesSlides/notesSlide${y}.xml`, f.notesSlide])), n.set(`ppt/slides/_rels/slide${y}.xml.rels`, L(I)), u.push([`/ppt/slides/slide${y}.xml`, f.slide]);
|
|
211
|
+
const Y = `rId${y + 1}`;
|
|
212
|
+
g.push({ id: Y, type: o.slide, target: `slides/slide${y}.xml` }), U += `<p:sldId id="${255 + y}" r:id="${Y}"/>`;
|
|
213
|
+
});
|
|
214
|
+
const T = P.length + 2;
|
|
215
|
+
g.push(
|
|
216
|
+
{ id: `rId${T}`, type: o.theme, target: "theme/theme1.xml" },
|
|
217
|
+
{ id: `rId${T + 1}`, type: o.presProps, target: "presProps.xml" },
|
|
218
|
+
{ id: `rId${T + 2}`, type: o.viewProps, target: "viewProps.xml" },
|
|
219
|
+
{ id: `rId${T + 3}`, type: o.tableStyles, target: "tableStyles.xml" }
|
|
220
|
+
);
|
|
221
|
+
const G = `rId${T + 4}`;
|
|
222
|
+
w && (g.push({ id: G, type: o.notesMaster, target: "notesMasters/notesMaster1.xml" }), n.set("ppt/notesMasters/notesMaster1.xml", Ee), n.set("ppt/notesMasters/_rels/notesMaster1.xml.rels", L([
|
|
223
|
+
{ id: "rId1", type: o.theme, target: "../theme/theme2.xml" }
|
|
224
|
+
])), n.set("ppt/theme/theme2.xml", J), u.push(["/ppt/notesMasters/notesMaster1.xml", f.notesMaster], ["/ppt/theme/theme2.xml", f.theme]));
|
|
225
|
+
const re = x + `<p:presentation ${b} saveSubsetFonts="1"><p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst>` + (w ? `<p:notesMasterIdLst><p:notesMasterId r:id="${G}"/></p:notesMasterIdLst>` : "") + `<p:sldIdLst>${U}</p:sldIdLst><p:sldSz cx="${d}" cy="${m}"/><p:notesSz cx="6858000" cy="9144000"/><p:defaultTextStyle>${_(1800)}</p:defaultTextStyle></p:presentation>`;
|
|
226
|
+
n.set("ppt/presentation.xml", re), n.set("ppt/_rels/presentation.xml.rels", L(g)), n.set("ppt/slideMasters/slideMaster1.xml", ke), n.set("ppt/slideMasters/_rels/slideMaster1.xml.rels", L([
|
|
227
|
+
{ id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" },
|
|
228
|
+
{ id: "rId2", type: o.theme, target: "../theme/theme1.xml" }
|
|
229
|
+
])), n.set("ppt/slideLayouts/slideLayout1.xml", we), n.set("ppt/slideLayouts/_rels/slideLayout1.xml.rels", L([
|
|
230
|
+
{ id: "rId1", type: o.slideMaster, target: "../slideMasters/slideMaster1.xml" }
|
|
231
|
+
])), n.set("ppt/theme/theme1.xml", J), n.set("ppt/presProps.xml", Ne), n.set("ppt/viewProps.xml", Re), n.set("ppt/tableStyles.xml", Ae);
|
|
232
|
+
const ne = t.now ?? (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z");
|
|
233
|
+
n.set("docProps/core.xml", De(e.title || "YappyDraw presentation", ne)), n.set("docProps/app.xml", _e(P.length, P.filter((i) => !!i.notes?.trim()).length)), n.set("_rels/.rels", L([
|
|
234
|
+
{ id: "rId1", type: o.officeDocument, target: "ppt/presentation.xml" },
|
|
235
|
+
{ id: "rId2", type: o.coreProps, target: "docProps/core.xml" },
|
|
236
|
+
{ id: "rId3", type: o.extProps, target: "docProps/app.xml" }
|
|
237
|
+
])), u.push(
|
|
238
|
+
["/ppt/presentation.xml", f.presentation],
|
|
239
|
+
["/ppt/slideMasters/slideMaster1.xml", f.slideMaster],
|
|
240
|
+
["/ppt/slideLayouts/slideLayout1.xml", f.slideLayout],
|
|
241
|
+
["/ppt/theme/theme1.xml", f.theme],
|
|
242
|
+
["/ppt/presProps.xml", f.presProps],
|
|
243
|
+
["/ppt/viewProps.xml", f.viewProps],
|
|
244
|
+
["/ppt/tableStyles.xml", f.tableStyles],
|
|
245
|
+
["/docProps/core.xml", f.core],
|
|
246
|
+
["/docProps/app.xml", f.app]
|
|
247
|
+
);
|
|
248
|
+
const pe = x + `<Types xmlns="${v.ct}"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>` + [...c].map((i) => `<Default Extension="${i}" ContentType="${he[i]}"/>`).join("") + u.map(([i, N]) => `<Override PartName="${i}" ContentType="${N}"/>`).join("") + "</Types>";
|
|
249
|
+
return n.set("[Content_Types].xml", pe), ie(n);
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
je as buildPptx,
|
|
253
|
+
Te as notesXml
|
|
254
|
+
};
|
package/package.json
CHANGED
package/yappy.js
CHANGED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { F as _, G as w, H as C, P as M, I, J as L, K as x } from "./index-OCtbNe3Y.js";
|
|
2
|
-
function P(r, T) {
|
|
3
|
-
const o = M[T || "minimalist"] || M.minimalist, c = r.split(`
|
|
4
|
-
`), a = [];
|
|
5
|
-
let t = null, u = [];
|
|
6
|
-
const h = () => {
|
|
7
|
-
t && (u.length > 0 && !t.bullets?.length && !t.body && !t.quoteText && (t.body = u.join(`
|
|
8
|
-
`).trim()), u = [], a.push(t), t = null);
|
|
9
|
-
}, n = (e, s = "content") => {
|
|
10
|
-
h(), t = { title: e, type: s };
|
|
11
|
-
};
|
|
12
|
-
for (let e = 0; e < c.length; e++) {
|
|
13
|
-
const i = c[e].trim();
|
|
14
|
-
if (/^---+\s*$/.test(i)) {
|
|
15
|
-
h();
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
const l = i.match(/^#\s+(.+)$/);
|
|
19
|
-
if (l) {
|
|
20
|
-
a.length === 0 && !t ? n(l[1], "title") : n(l[1]);
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const m = i.match(/^##\s+(.+)$/);
|
|
24
|
-
if (m) {
|
|
25
|
-
n(m[1]);
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
const f = i.match(/^###\s+(.+)$/);
|
|
29
|
-
if (f) {
|
|
30
|
-
t ? u.push(f[1]) : n(f[1]);
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const y = i.match(/^>\s*(.+)$/);
|
|
34
|
-
if (y) {
|
|
35
|
-
const E = [y[1]];
|
|
36
|
-
for (; e + 1 < c.length && /^>\s*/.test(c[e + 1].trim()); )
|
|
37
|
-
e++, E.push(c[e].trim().replace(/^>\s*/, ""));
|
|
38
|
-
const k = E.join(" ").trim(), b = k.match(/^(.+?)\s*[—–-]{1,2}\s*(.+)$/);
|
|
39
|
-
t && t.type !== "title" && h(), t || (t = { title: "", type: "quote" }), b ? (t.type = "quote", t.quoteText = b[1].trim(), t.quoteAttribution = b[2].trim()) : (t.type = "quote", t.quoteText = k);
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const $ = i.match(/^[-*]\s+(.+)$/);
|
|
43
|
-
if ($) {
|
|
44
|
-
t || n(""), t.bullets || (t.bullets = []), t.bullets.push(d($[1]));
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
const q = i.match(/^\d+\.\s+(.+)$/);
|
|
48
|
-
if (q) {
|
|
49
|
-
t || n(""), t.bullets || (t.bullets = []), t.bullets.push(d(q[1]));
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
i !== "" && (t || n(""), u.push(d(i)));
|
|
53
|
-
}
|
|
54
|
-
h(), a.length === 0 && a.push({ title: "Untitled", type: "content", body: r.trim() });
|
|
55
|
-
const S = 2e3, p = [], g = [];
|
|
56
|
-
return a.forEach((e, s) => {
|
|
57
|
-
const i = s * S;
|
|
58
|
-
let l;
|
|
59
|
-
switch (e.type) {
|
|
60
|
-
case "title":
|
|
61
|
-
l = I(e.title, e.body || e.bullets?.[0], o);
|
|
62
|
-
break;
|
|
63
|
-
case "quote":
|
|
64
|
-
l = C(e.quoteText || "", e.quoteAttribution, o);
|
|
65
|
-
break;
|
|
66
|
-
case "closing":
|
|
67
|
-
l = w(e.title, e.body, o);
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
l = _(e.title, e.bullets, e.body, o);
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
const m = L(l, i, 0);
|
|
74
|
-
p.push(...m), g.push({
|
|
75
|
-
id: x("slide"),
|
|
76
|
-
name: e.title || `Slide ${s + 1}`,
|
|
77
|
-
spatialPosition: { x: i, y: 0 },
|
|
78
|
-
dimensions: { width: 1920, height: 1080 },
|
|
79
|
-
order: s,
|
|
80
|
-
backgroundColor: o.background
|
|
81
|
-
});
|
|
82
|
-
}), {
|
|
83
|
-
version: 4,
|
|
84
|
-
metadata: { name: "Markdown Import", docType: "slides" },
|
|
85
|
-
elements: p,
|
|
86
|
-
layers: [{ id: "default-layer", name: "Layer 1", visible: !0, locked: !1, opacity: 1, order: 0, backgroundColor: "transparent" }],
|
|
87
|
-
slides: g,
|
|
88
|
-
globalSettings: {}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function d(r) {
|
|
92
|
-
return r.replace(/\*\*(.+?)\*\*/g, "$1").replace(/__(.+?)__/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/_(.+?)_/g, "$1").replace(/`(.+?)`/g, "$1").replace(/\[(.+?)\]\(.+?\)/g, "$1").trim();
|
|
93
|
-
}
|
|
94
|
-
export {
|
|
95
|
-
P as parseMarkdownToSlides
|
|
96
|
-
};
|
package/chunks/write-BUtbdS9L.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { r as E, X as m, N as y, z as ae, e as $, E as c, a as V, p as P, b as le, c as se, f as re, R as o } from "./custgeom-BeeylhzV.js";
|
|
2
|
-
const k = 914400, I = 51206400, M = `xmlns:a="${y.a}" xmlns:r="${y.r}" xmlns:p="${y.p}"`, f = {
|
|
3
|
-
presentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",
|
|
4
|
-
slide: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
|
|
5
|
-
slideLayout: "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",
|
|
6
|
-
slideMaster: "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",
|
|
7
|
-
theme: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
8
|
-
presProps: "application/vnd.openxmlformats-officedocument.presentationml.presProps+xml",
|
|
9
|
-
viewProps: "application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml",
|
|
10
|
-
tableStyles: "application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml",
|
|
11
|
-
core: "application/vnd.openxmlformats-package.core-properties+xml",
|
|
12
|
-
app: "application/vnd.openxmlformats-officedocument.extended-properties+xml"
|
|
13
|
-
}, ne = {
|
|
14
|
-
png: "image/png",
|
|
15
|
-
jpeg: "image/jpeg",
|
|
16
|
-
gif: "image/gif",
|
|
17
|
-
svg: "image/svg+xml",
|
|
18
|
-
bmp: "image/bmp",
|
|
19
|
-
tiff: "image/tiff",
|
|
20
|
-
webp: "image/webp",
|
|
21
|
-
emf: "image/x-emf",
|
|
22
|
-
wmf: "image/x-wmf"
|
|
23
|
-
}, H = (e) => {
|
|
24
|
-
const t = String(e || "").replace("#", "").toLowerCase();
|
|
25
|
-
return /^[0-9a-f]{6}$/.test(t) ? t.toUpperCase() : "000000";
|
|
26
|
-
}, b = (e) => {
|
|
27
|
-
const t = e.alpha;
|
|
28
|
-
return t !== void 0 && t < 1 ? `<a:srgbClr val="${H(e.hex)}"><a:alpha val="${P(t)}"/></a:srgbClr>` : `<a:srgbClr val="${H(e.hex)}"/>`;
|
|
29
|
-
}, Y = (e) => {
|
|
30
|
-
const t = [...e].sort((a, r) => a.pos - r.pos);
|
|
31
|
-
return "<a:gsLst>" + (t.length === 1 ? [{ ...t[0], pos: 0 }, { ...t[0], pos: 1 }] : t).map((a) => `<a:gs pos="${P(a.pos)}">${b(a.color)}</a:gs>`).join("") + "</a:gsLst>";
|
|
32
|
-
};
|
|
33
|
-
function W(e) {
|
|
34
|
-
if (!e || e.kind === "none") return "<a:noFill/>";
|
|
35
|
-
switch (e.kind) {
|
|
36
|
-
case "solid":
|
|
37
|
-
return `<a:solidFill>${b(e.color)}</a:solidFill>`;
|
|
38
|
-
case "linear":
|
|
39
|
-
return e.stops.length === 0 ? "<a:noFill/>" : `<a:gradFill rotWithShape="1">${Y(e.stops)}<a:lin ang="${V(e.angle)}" scaled="${e.scaled ? 1 : 0}"/></a:gradFill>`;
|
|
40
|
-
case "radial":
|
|
41
|
-
return e.stops.length === 0 ? "<a:noFill/>" : `<a:gradFill rotWithShape="1">${Y(e.stops)}<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill>`;
|
|
42
|
-
case "image":
|
|
43
|
-
return "<a:noFill/>";
|
|
44
|
-
// import-only paint; the exporter never produces it
|
|
45
|
-
case "pattern":
|
|
46
|
-
return `<a:pattFill prst="${$(e.preset)}"><a:fgClr>${b(e.color)}</a:fgClr><a:bgClr>${e.bg ? b(e.bg) : '<a:srgbClr val="FFFFFF"><a:alpha val="0"/></a:srgbClr>'}</a:bgClr></a:pattFill>`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function q(e, t) {
|
|
50
|
-
if (!e || !(e.width > 0)) return "<a:ln><a:noFill/></a:ln>";
|
|
51
|
-
let a = `<a:ln w="${Math.max(0, Math.min(20116800, Math.round(e.width * t * c)))}"${e.cap ? ` cap="${e.cap}"` : ""}><a:solidFill>${b(e.color)}</a:solidFill>`;
|
|
52
|
-
e.dash && (a += `<a:prstDash val="${$(e.dash)}"/>`), e.join === "round" ? a += "<a:round/>" : e.join === "bevel" ? a += "<a:bevel/>" : e.join === "miter" && (a += '<a:miter lim="800000"/>');
|
|
53
|
-
const r = (s, n) => n ? `<a:${s} type="${n.type}" w="${n.size ?? "med"}" len="${n.size ?? "med"}"/>` : "";
|
|
54
|
-
return a += r("headEnd", e.head) + r("tailEnd", e.tail), a + "</a:ln>";
|
|
55
|
-
}
|
|
56
|
-
function z(e, t, l = "a:rPr") {
|
|
57
|
-
const a = ['lang="en-US"'];
|
|
58
|
-
e.size && a.push(`sz="${re(e.size * t)}"`), e.bold !== void 0 && a.push(`b="${e.bold ? 1 : 0}"`), e.italic !== void 0 && a.push(`i="${e.italic ? 1 : 0}"`), e.underline && a.push('u="sng"'), e.strike && a.push('strike="sngStrike"'), a.push('dirty="0"');
|
|
59
|
-
let r = "";
|
|
60
|
-
if (e.color && (r += `<a:solidFill>${b(e.color)}</a:solidFill>`), e.font) {
|
|
61
|
-
const s = $(e.font);
|
|
62
|
-
r += `<a:latin typeface="${s}"/><a:ea typeface="${s}"/><a:cs typeface="${s}"/>`;
|
|
63
|
-
}
|
|
64
|
-
return r ? `<${l} ${a.join(" ")}>${r}</${l}>` : `<${l} ${a.join(" ")}/>`;
|
|
65
|
-
}
|
|
66
|
-
const pe = 20, oe = /* @__PURE__ */ new Set(["•", "–", "—", "-", "»", "›", ">", "*", "+", "·"]), ie = /^(alphaLc|alphaUc|arabic|romanLc|romanUc)(ParenBoth|ParenR|Period|Plain)$/;
|
|
67
|
-
function ce(e, t, l) {
|
|
68
|
-
const a = Math.max(0, Math.min(8, e.level ?? 0)), r = [];
|
|
69
|
-
e.align && r.push(`algn="${e.align}"`);
|
|
70
|
-
let s = "";
|
|
71
|
-
t.lineSpacing && Math.abs(t.lineSpacing - 1) > 1e-3 && (s += `<a:lnSpc><a:spcPct val="${Math.round(Math.max(0.1, Math.min(13.2, t.lineSpacing)) * 1e5)}"/></a:lnSpc>`);
|
|
72
|
-
const n = (i, d) => d && d > 0 ? `<a:${i}><a:spcPts val="${Math.round(Math.min(1584, d * l * 0.75) * 100)}"/></a:${i}>` : "";
|
|
73
|
-
if (s += n("spcBef", e.spaceBefore) + n("spcAft", e.spaceAfter), e.bullet) {
|
|
74
|
-
const i = pe * l * c, d = e.marL !== void 0 ? e.marL * l * c : i * (a + 1), L = e.indent !== void 0 ? e.indent * l * c : -i, S = (h, g) => Math.round(Math.max(g, Math.min(51206400, h)));
|
|
75
|
-
if (r.push(`marL="${S(d, 0)}" indent="${S(L, -51206400)}"`), a && r.push(`lvl="${a}"`), e.bulletColor && (s += `<a:buClr>${b(e.bulletColor)}</a:buClr>`), e.bulletScale && Math.abs(e.bulletScale - 1) > 1e-3 && (s += `<a:buSzPct val="${Math.round(Math.max(0.25, Math.min(4, e.bulletScale)) * 1e5)}"/>`), e.bullet === "num") {
|
|
76
|
-
const h = e.numType && ie.test(e.numType) ? e.numType : "arabicPeriod", g = e.startAt && e.startAt > 1 ? ` startAt="${Math.min(32767, Math.round(e.startAt))}"` : "";
|
|
77
|
-
s += `<a:buFont typeface="+mj-lt"/><a:buAutoNum type="${h}"${g}/>`;
|
|
78
|
-
} else {
|
|
79
|
-
const h = e.bulletChar || "•";
|
|
80
|
-
s += `<a:buFont typeface="${oe.has(h) ? "Arial" : "Segoe UI Symbol"}"/><a:buChar char="${$(h)}"/>`;
|
|
81
|
-
}
|
|
82
|
-
} else
|
|
83
|
-
a && r.push(`lvl="${a}"`), s += "<a:buNone/>";
|
|
84
|
-
const x = `<a:pPr${r.length ? " " + r.join(" ") : ""}>${s}</a:pPr>`, u = t.defaults ?? {};
|
|
85
|
-
let p = "";
|
|
86
|
-
for (const i of e.runs) {
|
|
87
|
-
const d = { ...u, ...de(i) };
|
|
88
|
-
if (i.br) {
|
|
89
|
-
p += `<a:br>${z(d, l)}</a:br>`;
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
i.text && (p += `<a:r>${z(d, l)}<a:t>${$(i.text)}</a:t></a:r>`);
|
|
93
|
-
}
|
|
94
|
-
const F = e.endSize ?? u.size;
|
|
95
|
-
return `<a:p>${x}${p}${z({ ...u, size: F }, l, "a:endParaRPr")}</a:p>`;
|
|
96
|
-
}
|
|
97
|
-
const de = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0));
|
|
98
|
-
function me(e, t, l = "p:txBody") {
|
|
99
|
-
if (!e) return "";
|
|
100
|
-
const a = (n) => Math.max(0, Math.round(n * t * c)), r = `<a:bodyPr wrap="${e.wrap ? "square" : "none"}" lIns="${a(e.insets.l)}" tIns="${a(e.insets.t)}" rIns="${a(e.insets.r)}" bIns="${a(e.insets.b)}" anchor="${e.anchor}" rtlCol="0"><a:noAutofit/></a:bodyPr>`, s = e.paragraphs.length ? e.paragraphs : [{ runs: [] }];
|
|
101
|
-
return `<${l}>${r}<a:lstStyle/>${s.map((n) => ce(n, e, t)).join("")}</${l}>`;
|
|
102
|
-
}
|
|
103
|
-
const Z = (e, t, l) => e.kind === "preset" ? le(e.prst, e.adj) : se(e.paths, t, l), D = (e, t, l = "a:xfrm", a = !1) => {
|
|
104
|
-
const r = Math.round((e.x * t.s + t.dx) * c), s = Math.round((e.y * t.s + t.dy) * c), n = Math.max(0, Math.round(Math.abs(e.w) * t.s * c)), x = Math.max(0, Math.round(Math.abs(e.h) * t.s * c)), u = [
|
|
105
|
-
e.rot ? `rot="${V(e.rot)}"` : "",
|
|
106
|
-
e.flipH ? 'flipH="1"' : "",
|
|
107
|
-
e.flipV ? 'flipV="1"' : ""
|
|
108
|
-
].filter(Boolean).join(" "), p = a ? `<a:chOff x="${r}" y="${s}"/><a:chExt cx="${n}" cy="${x}"/>` : "";
|
|
109
|
-
return `<${l}${u ? " " + u : ""}><a:off x="${r}" y="${s}"/><a:ext cx="${n}" cy="${x}"/>${p}</${l}>`;
|
|
110
|
-
}, R = (e, t) => `<p:cNvPr id="${e.id}" name="${$(e.name)}"${t ? ` descr="${$(t)}"` : ""}/>`;
|
|
111
|
-
function fe(e, t) {
|
|
112
|
-
const l = `<p:nvSpPr>${R(e)}<p:cNvSpPr${e.textBox ? ' txBox="1"' : ""}/><p:nvPr/></p:nvSpPr>`, a = `<p:spPr>${D(e, t)}${Z(e.geom, e.w, e.h)}${W(e.fill)}${q(e.line, t.s)}</p:spPr>`, r = e.text ? me(e.text, t.s) : '<p:txBody><a:bodyPr rtlCol="0" anchor="ctr"/><a:lstStyle/><a:p><a:pPr algn="ctr"/><a:endParaRPr lang="en-US" dirty="0"/></a:p></p:txBody>';
|
|
113
|
-
return `<p:sp>${l}${a}${r}</p:sp>`;
|
|
114
|
-
}
|
|
115
|
-
function he(e, t) {
|
|
116
|
-
const l = (r, s) => s ? `<a:${r} id="${s.id}" idx="${s.idx}"/>` : "";
|
|
117
|
-
return `<p:cxnSp>${`<p:nvCxnSpPr>${R(e)}<p:cNvCxnSpPr>${l("stCxn", e.start)}${l("endCxn", e.end)}</p:cNvCxnSpPr><p:nvPr/></p:nvCxnSpPr>`}<p:spPr>${D(e, t)}${Z(e.geom, e.w, e.h)}<a:noFill/>${q(e.line, t.s)}</p:spPr></p:cxnSp>`;
|
|
118
|
-
}
|
|
119
|
-
function $e(e, t) {
|
|
120
|
-
const l = t.media(e.media), a = `<p:nvPicPr>${R(e, e.descr)}<p:cNvPicPr><a:picLocks noChangeAspect="1"/></p:cNvPicPr><p:nvPr/></p:nvPicPr>`, r = e.alpha !== void 0 && e.alpha < 1 ? `<a:alphaModFix amt="${P(e.alpha)}"/>` : "", s = e.crop, n = s ? `<a:srcRect l="${P(s.l)}" t="${P(s.t)}" r="${P(s.r)}" b="${P(s.b)}"/>` : "", x = `<p:blipFill><a:blip r:embed="${l}">${r}</a:blip>${n}<a:stretch><a:fillRect/></a:stretch></p:blipFill>`;
|
|
121
|
-
return `<p:pic>${a}${x}<p:spPr>${D(e, t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
|
|
122
|
-
}
|
|
123
|
-
function xe(e, t) {
|
|
124
|
-
return `<p:grpSp>${`<p:nvGrpSpPr>${R(e)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>`}<p:grpSpPr>${D(e, t, "a:xfrm", !0)}</p:grpSpPr>${e.children.map((a) => J(a, t)).join("")}</p:grpSp>`;
|
|
125
|
-
}
|
|
126
|
-
function J(e, t) {
|
|
127
|
-
switch (e.kind) {
|
|
128
|
-
case "shape":
|
|
129
|
-
return fe(e, t);
|
|
130
|
-
case "connector":
|
|
131
|
-
return he(e, t);
|
|
132
|
-
case "picture":
|
|
133
|
-
return $e(e, t);
|
|
134
|
-
case "group":
|
|
135
|
-
return e.children.length ? xe(e, t) : "";
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
const B = '<p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr>';
|
|
139
|
-
function ue(e) {
|
|
140
|
-
if (!e) return "";
|
|
141
|
-
const t = Math.max(0, Math.min(6e4, Math.round(e.durationMs))), l = t <= 600 ? "fast" : t <= 900 ? "med" : "slow", a = e.kind === "push" ? `<p:push dir="${e.dir ?? "l"}"/>` : e.kind === "zoom" ? `<p:zoom dir="${e.zoomIn === !1 ? "out" : "in"}"/>` : "<p:fade/>";
|
|
142
|
-
return `<mc:AlternateContent xmlns:mc="${y.mc}"><mc:Choice xmlns:p14="${y.p14}" Requires="p14"><p:transition spd="${l}" p14:dur="${t}">${a}</p:transition></mc:Choice><mc:Fallback><p:transition spd="${l}">${a}</p:transition></mc:Fallback></mc:AlternateContent>`;
|
|
143
|
-
}
|
|
144
|
-
function ge(e, t) {
|
|
145
|
-
let l = "";
|
|
146
|
-
const a = e.background;
|
|
147
|
-
a && a.kind === "image" ? l = `<p:bg><p:bgPr><a:blipFill dpi="0" rotWithShape="1"><a:blip r:embed="${t.media(a.media)}"/><a:srcRect/><a:stretch><a:fillRect/></a:stretch></a:blipFill><a:effectLst/></p:bgPr></p:bg>` : a && a.kind !== "none" && (l = `<p:bg><p:bgPr>${W(a)}<a:effectLst/></p:bgPr></p:bg>`);
|
|
148
|
-
const r = e.items.map((n) => J(n, t)).join(""), s = e.name ? ` name="${$(e.name)}"` : "";
|
|
149
|
-
return m + `<p:sld ${M}><p:cSld${s}>${l}<p:spTree>${B}${r}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>${ue(e.transition)}</p:sld>`;
|
|
150
|
-
}
|
|
151
|
-
const A = (e, t = "") => `<a:lvl1pPr marL="0" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">${t}<a:defRPr sz="${e}" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr>`, ye = m + `<a:theme xmlns:a="${y.a}" name="Yappy"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light"/><a:ea typeface=""/><a:cs typeface=""/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="50000"/></a:schemeClr></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:shade val="80000"/></a:schemeClr></a:solidFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/></a:schemeClr></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:shade val="90000"/></a:schemeClr></a:solidFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>`, ve = m + `<p:sldMaster ${M}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree>${B}</p:spTree></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle>${A(4400)}</p:titleStyle><p:bodyStyle>${A(2800)}</p:bodyStyle><p:otherStyle>${A(1800)}</p:otherStyle></p:txStyles></p:sldMaster>`, Pe = m + `<p:sldLayout ${M} type="blank" preserve="1"><p:cSld name="Blank"><p:spTree>${B}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`, be = m + `<p:presentationPr ${M}/>`, Se = m + `<p:viewPr ${M}><p:normalViewPr><p:restoredLeft sz="15620"/><p:restoredTop sz="94660"/></p:normalViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`, Ce = m + `<a:tblStyleLst xmlns:a="${y.a}" def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`, Me = (e, t) => m + `<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>${$(e)}</dc:title><dc:creator>YappyDraw</dc:creator><cp:lastModifiedBy>YappyDraw</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${t}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${t}</dcterms:modified></cp:coreProperties>`, Fe = (e) => m + `<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>YappyDraw</Application><Slides>${e}</Slides><PresentationFormat>Custom</PresentationFormat></Properties>`;
|
|
152
|
-
function we(e, t = {}) {
|
|
153
|
-
const l = Math.max(1, e.width), a = Math.max(1, e.height), r = Math.max(l, a) * c, s = Math.min(l, a) * c, n = r > I ? I / r : s < k ? Math.min(k / s, I / r) : 1, x = Math.max(k, Math.min(I, Math.round(l * n * c))), u = Math.max(k, Math.min(I, Math.round(a * n * c))), p = /* @__PURE__ */ new Map(), F = [], i = /* @__PURE__ */ new Set();
|
|
154
|
-
let d = 0;
|
|
155
|
-
const L = e.slides.length ? e.slides : [{ items: [] }], S = [{ id: "rId1", type: o.slideMaster, target: "slideMasters/slideMaster1.xml" }];
|
|
156
|
-
let h = "";
|
|
157
|
-
L.forEach((v, X) => {
|
|
158
|
-
const C = X + 1, T = [{ id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" }], N = /* @__PURE__ */ new Map(), _ = v.fit ?? { scale: 1, dx: 0, dy: 0 }, te = {
|
|
159
|
-
s: _.scale * n,
|
|
160
|
-
dx: _.dx * n,
|
|
161
|
-
dy: _.dy * n,
|
|
162
|
-
rels: T,
|
|
163
|
-
media: (w) => {
|
|
164
|
-
const U = N.get(w);
|
|
165
|
-
if (U) return U;
|
|
166
|
-
d++;
|
|
167
|
-
const G = `image${d}.${w.ext}`;
|
|
168
|
-
p.set(`ppt/media/${G}`, w.bytes), i.add(w.ext);
|
|
169
|
-
const j = `rId${T.length + 1}`;
|
|
170
|
-
return T.push({ id: j, type: o.image, target: `../media/${G}` }), N.set(w, j), j;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
p.set(`ppt/slides/slide${C}.xml`, ge(v, te)), p.set(`ppt/slides/_rels/slide${C}.xml.rels`, E(T)), F.push([`/ppt/slides/slide${C}.xml`, f.slide]);
|
|
174
|
-
const O = `rId${C + 1}`;
|
|
175
|
-
S.push({ id: O, type: o.slide, target: `slides/slide${C}.xml` }), h += `<p:sldId id="${255 + C}" r:id="${O}"/>`;
|
|
176
|
-
});
|
|
177
|
-
const g = L.length + 2;
|
|
178
|
-
S.push(
|
|
179
|
-
{ id: `rId${g}`, type: o.theme, target: "theme/theme1.xml" },
|
|
180
|
-
{ id: `rId${g + 1}`, type: o.presProps, target: "presProps.xml" },
|
|
181
|
-
{ id: `rId${g + 2}`, type: o.viewProps, target: "viewProps.xml" },
|
|
182
|
-
{ id: `rId${g + 3}`, type: o.tableStyles, target: "tableStyles.xml" }
|
|
183
|
-
);
|
|
184
|
-
const K = m + `<p:presentation ${M} saveSubsetFonts="1"><p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst><p:sldIdLst>${h}</p:sldIdLst><p:sldSz cx="${x}" cy="${u}"/><p:notesSz cx="6858000" cy="9144000"/><p:defaultTextStyle>${A(1800)}</p:defaultTextStyle></p:presentation>`;
|
|
185
|
-
p.set("ppt/presentation.xml", K), p.set("ppt/_rels/presentation.xml.rels", E(S)), p.set("ppt/slideMasters/slideMaster1.xml", ve), p.set("ppt/slideMasters/_rels/slideMaster1.xml.rels", E([
|
|
186
|
-
{ id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" },
|
|
187
|
-
{ id: "rId2", type: o.theme, target: "../theme/theme1.xml" }
|
|
188
|
-
])), p.set("ppt/slideLayouts/slideLayout1.xml", Pe), p.set("ppt/slideLayouts/_rels/slideLayout1.xml.rels", E([
|
|
189
|
-
{ id: "rId1", type: o.slideMaster, target: "../slideMasters/slideMaster1.xml" }
|
|
190
|
-
])), p.set("ppt/theme/theme1.xml", ye), p.set("ppt/presProps.xml", be), p.set("ppt/viewProps.xml", Se), p.set("ppt/tableStyles.xml", Ce);
|
|
191
|
-
const Q = t.now ?? (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z");
|
|
192
|
-
p.set("docProps/core.xml", Me(e.title || "YappyDraw presentation", Q)), p.set("docProps/app.xml", Fe(L.length)), p.set("_rels/.rels", E([
|
|
193
|
-
{ id: "rId1", type: o.officeDocument, target: "ppt/presentation.xml" },
|
|
194
|
-
{ id: "rId2", type: o.coreProps, target: "docProps/core.xml" },
|
|
195
|
-
{ id: "rId3", type: o.extProps, target: "docProps/app.xml" }
|
|
196
|
-
])), F.push(
|
|
197
|
-
["/ppt/presentation.xml", f.presentation],
|
|
198
|
-
["/ppt/slideMasters/slideMaster1.xml", f.slideMaster],
|
|
199
|
-
["/ppt/slideLayouts/slideLayout1.xml", f.slideLayout],
|
|
200
|
-
["/ppt/theme/theme1.xml", f.theme],
|
|
201
|
-
["/ppt/presProps.xml", f.presProps],
|
|
202
|
-
["/ppt/viewProps.xml", f.viewProps],
|
|
203
|
-
["/ppt/tableStyles.xml", f.tableStyles],
|
|
204
|
-
["/docProps/core.xml", f.core],
|
|
205
|
-
["/docProps/app.xml", f.app]
|
|
206
|
-
);
|
|
207
|
-
const ee = m + `<Types xmlns="${y.ct}"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>` + [...i].map((v) => `<Default Extension="${v}" ContentType="${ne[v]}"/>`).join("") + F.map(([v, X]) => `<Override PartName="${v}" ContentType="${X}"/>`).join("") + "</Types>";
|
|
208
|
-
return p.set("[Content_Types].xml", ee), ae(p);
|
|
209
|
-
}
|
|
210
|
-
export {
|
|
211
|
-
we as buildPptx
|
|
212
|
-
};
|