@algorisys/yappydraw 0.8.294 → 0.8.296

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.
Files changed (30) hide show
  1. package/README.md +2 -2
  2. package/chunks/{canva-ai-DqccAnxC.js → canva-ai-CkUlVY-Y.js} +1 -1
  3. package/chunks/{choice-dialog-state-10-yA9qy.js → choice-dialog-state-BUFvjtpq.js} +1 -1
  4. package/chunks/{custgeom-gp_HWEYw.js → custgeom-DThQ1Qnp.js} +1 -1
  5. package/chunks/{design-generator-DIyJ4Dr0.js → design-generator-BlrBbMDM.js} +1 -1
  6. package/chunks/{drawing-engine-nqE0zI8L.js → drawing-engine-KJLwmUE-.js} +1 -1
  7. package/chunks/{drawings-store-BFtMld-q.js → drawings-store-CiDEeh5h.js} +1 -1
  8. package/chunks/{ds-operations-40JYI4lM.js → ds-operations-C27tW9qb.js} +1 -1
  9. package/chunks/{export-game-5Kek7Bol.js → export-game-Bcz0A67O.js} +1 -1
  10. package/chunks/{from-yappy-ChRzxzZ9.js → from-yappy-lL1q0m9y.js} +31 -20
  11. package/chunks/{game-runtime--zmzKmmo.js → game-runtime-RZ6Ygr7N.js} +5 -5
  12. package/chunks/import-DFZ1uZOp.js +1736 -0
  13. package/chunks/{index-v2rH-W8-.js → index-NbpsufU1.js} +24121 -23837
  14. package/chunks/{index.es-m_qpxIjM.js → index.es-yTIj1Pnc.js} +1 -1
  15. package/chunks/{jspdf.es.min-DGjtdWau.js → jspdf.es.min-DFBFqtMo.js} +2 -2
  16. package/chunks/{lucide-solid-BHWkJbay.js → lucide-solid-DL_MnmQm.js} +1 -1
  17. package/chunks/{markdown-to-slides-siI6fZd3.js → markdown-to-slides-D9CoIzTi.js} +1 -1
  18. package/chunks/{morph-animator-klLNQx0a.js → morph-animator-C_rDbafN.js} +1 -1
  19. package/chunks/{onboarding-tour-CV0e3oyB.js → onboarding-tour-B1fDeTqe.js} +1 -1
  20. package/chunks/{pdf-vector-DLxGyE10.js → pdf-vector-ByOSpRwK.js} +2 -2
  21. package/chunks/purify.es-B0KlbA1O.js +1520 -0
  22. package/chunks/{search-53sGgwDp.js → search-MWY5OrgG.js} +2 -2
  23. package/chunks/{slide-generator-BttJgv2N.js → slide-generator-8-amet_R.js} +1 -1
  24. package/chunks/{svg2pdf.es.min-B6z21zR3.js → svg2pdf.es.min-4O9RYeoT.js} +1 -1
  25. package/chunks/{turntable-ai-7udakZBz.js → turntable-ai-DgSAtAc8.js} +1 -1
  26. package/chunks/{write-CIGfHqn4.js → write-B1-j7TNq.js} +130 -119
  27. package/package.json +1 -1
  28. package/yappy.js +1 -1
  29. package/chunks/import-DGbhv-Je.js +0 -1699
  30. package/chunks/purify.es-C2Qa7b4C.js +0 -906
@@ -1,5 +1,5 @@
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 = {
1
+ import { r as L, X as m, N as x, z as ie, e as v, E as u, a as ee, p as F, b as ce, c as de, R as o, f as me } from "./custgeom-DThQ1Qnp.js";
2
+ const D = 914400, A = 51206400, he = "http://schemas.microsoft.com/office/powerpoint/2015/09/main", b = `xmlns:a="${x.a}" xmlns:r="${x.r}" xmlns:p="${x.p}"`, $ = {
3
3
  presentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",
4
4
  slide: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml",
5
5
  slideLayout: "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",
@@ -12,7 +12,7 @@ const D = 914400, R = 51206400, b = `xmlns:a="${v.a}" xmlns:r="${v.r}" xmlns:p="
12
12
  notesSlide: "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml",
13
13
  core: "application/vnd.openxmlformats-package.core-properties+xml",
14
14
  app: "application/vnd.openxmlformats-officedocument.extended-properties+xml"
15
- }, he = {
15
+ }, fe = {
16
16
  png: "image/png",
17
17
  jpeg: "image/jpeg",
18
18
  gif: "image/gif",
@@ -45,210 +45,221 @@ function te(e) {
45
45
  return "<a:noFill/>";
46
46
  // import-only paint; the exporter never produces it
47
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>`;
48
+ return `<a:pattFill prst="${v(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
49
  }
50
50
  }
51
51
  function ae(e, t) {
52
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"}"/>` : "";
53
+ let a = `<a:ln w="${Math.max(0, Math.min(20116800, Math.round(e.width * t * u)))}"${e.cap ? ` cap="${e.cap}"` : ""}><a:solidFill>${k(e.color)}</a:solidFill>`;
54
+ e.dash && (a += `<a:prstDash val="${v(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 = (n, p) => p ? `<a:${n} type="${p.type}" w="${p.size ?? "med"}" len="${p.size ?? "med"}"/>` : "";
56
56
  return a += l("headEnd", e.head) + l("tailEnd", e.tail), a + "</a:ln>";
57
57
  }
58
- function O(e, t, s = "a:rPr") {
58
+ function X(e, t, s = "a:rPr") {
59
59
  const a = ['lang="en-US"'];
60
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
61
  let l = "";
62
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}"/>`;
63
+ const n = v(e.font);
64
+ l += `<a:latin typeface="${n}"/><a:ea typeface="${n}"/><a:cs typeface="${n}"/>`;
65
65
  }
66
66
  return l ? `<${s} ${a.join(" ")}>${l}</${s}>` : `<${s} ${a.join(" ")}/>`;
67
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) {
68
+ const $e = 20, xe = /* @__PURE__ */ new Set(["•", "–", "—", "-", "»", "›", ">", "*", "+", "·"]), ue = /^(alphaLc|alphaUc|arabic|romanLc|romanUc)(ParenBoth|ParenR|Period|Plain)$/;
69
+ function ge(e, t, s) {
70
70
  const a = Math.max(0, Math.min(8, e.level ?? 0)), l = [];
71
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}/>`;
72
+ let n = "";
73
+ t.lineSpacing && Math.abs(t.lineSpacing - 1) > 1e-3 && (n += `<a:lnSpc><a:spcPct val="${Math.round(Math.max(0.1, Math.min(13.2, t.lineSpacing)) * 1e5)}"/></a:lnSpc>`);
74
+ const p = (d, f) => f && f > 0 ? `<a:${d}><a:spcPts val="${Math.round(Math.min(1584, f * s * 0.75) * 100)}"/></a:${d}>` : "";
75
+ if (n += p("spcBef", e.spaceBefore) + p("spcAft", e.spaceAfter), e.bullet) {
76
+ const d = $e * s * u, f = e.marL !== void 0 ? e.marL * s * u : d * (a + 1), P = e.indent !== void 0 ? e.indent * s * u : -d, M = (y, w) => Math.round(Math.max(w, Math.min(51206400, y)));
77
+ if (l.push(`marL="${M(f, 0)}" indent="${M(P, -51206400)}"`), a && l.push(`lvl="${a}"`), e.bulletColor && (n += `<a:buClr>${k(e.bulletColor)}</a:buClr>`), e.bulletScale && Math.abs(e.bulletScale - 1) > 1e-3 && (n += `<a:buSzPct val="${Math.round(Math.max(0.25, Math.min(4, e.bulletScale)) * 1e5)}"/>`), e.bullet === "num") {
78
+ const y = e.numType && ue.test(e.numType) ? e.numType : "arabicPeriod", w = e.startAt && e.startAt > 1 ? ` startAt="${Math.min(32767, Math.round(e.startAt))}"` : "";
79
+ n += `<a:buFont typeface="+mj-lt"/><a:buAutoNum type="${y}"${w}/>`;
80
80
  } else {
81
- const g = e.bulletChar || "•";
82
- r += `<a:buFont typeface="${$e.has(g) ? "Arial" : "Segoe UI Symbol"}"/><a:buChar char="${S(g)}"/>`;
81
+ const y = e.bulletChar || "•";
82
+ n += `<a:buFont typeface="${xe.has(y) ? "Arial" : "Segoe UI Symbol"}"/><a:buChar char="${v(y)}"/>`;
83
83
  }
84
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>`;
85
+ a && l.push(`lvl="${a}"`), n += "<a:buNone/>";
86
+ const c = `<a:pPr${l.length ? " " + l.join(" ") : ""}>${n}</a:pPr>`, h = t.defaults ?? {};
87
+ let r = "";
88
+ for (const d of e.runs) {
89
+ const f = { ...h, ...Pe(d) };
90
+ if (d.br) {
91
+ r += `<a:br>${X(f, s)}</a:br>`;
92
92
  continue;
93
93
  }
94
- c.text && (n += `<a:r>${O(h, s)}<a:t>${S(c.text)}</a:t></a:r>`);
94
+ d.text && (r += `<a:r>${X(f, s)}<a:t>${v(d.text)}</a:t></a:r>`);
95
95
  }
96
- const u = e.endSize ?? m.size;
97
- return `<a:p>${d}${n}${O({ ...m, size: u }, s, "a:endParaRPr")}</a:p>`;
96
+ const g = e.endSize ?? h.size;
97
+ return `<a:p>${c}${r}${X({ ...h, size: g }, s, "a:endParaRPr")}</a:p>`;
98
98
  }
99
- const ge = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0));
99
+ const Pe = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0));
100
100
  function ye(e, t, s = "p:txBody") {
101
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}>`;
102
+ const a = (p) => Math.max(0, Math.round(p * t * u)), 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>`, n = e.paragraphs.length ? e.paragraphs : [{ runs: [] }];
103
+ return `<${s}>${l}<a:lstStyle/>${n.map((p) => ge(p, e, t)).join("")}</${s}>`;
104
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) {
105
+ const se = (e, t, s) => e.kind === "preset" ? ce(e.prst, e.adj) : de(e.paths, t, s), Se = { next: "nextslide", previous: "previousslide", first: "firstslide", last: "lastslide", end: "endshow" };
106
+ function ve(e, t) {
107
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;
108
+ const s = (l, n, p) => {
109
+ const c = t.rels.find((r) => r.type === l && r.target === n);
110
+ if (c) return c.id;
111
+ const h = `rId${t.rels.length + 1}`;
112
+ return t.rels.push({ id: h, type: l, target: n, external: p }), h;
113
113
  };
114
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]}"/>`;
115
+ if (e.kind === "action") return `<a:hlinkClick r:id="" action="ppaction://hlinkshowjump?jump=${Se[e.action]}"/>`;
116
116
  const a = t.slideNumber?.(e.key);
117
117
  return a ? `<a:hlinkClick r:id="${s(o.slide, `slide${a}.xml`)}" action="ppaction://hlinksldjump"/>` : "";
118
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 = [
119
+ const _ = (e, t, s = "a:xfrm", a = !1) => {
120
+ const l = Math.round((e.x * t.s + t.dx) * u), n = Math.round((e.y * t.s + t.dy) * u), p = Math.max(0, Math.round(Math.abs(e.w) * t.s * u)), c = Math.max(0, Math.round(Math.abs(e.h) * t.s * u)), h = [
121
121
  e.rot ? `rot="${ee(e.rot)}"` : "",
122
122
  e.flipH ? 'flipH="1"' : "",
123
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}>`;
124
+ ].filter(Boolean).join(" "), r = a ? `<a:chOff x="${l}" y="${n}"/><a:chExt cx="${p}" cy="${c}"/>` : "";
125
+ return `<${s}${h ? " " + h : ""}><a:off x="${l}" y="${n}"/><a:ext cx="${p}" cy="${c}"/>${r}</${s}>`;
126
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);
127
+ const a = `<p:cNvPr id="${e.id}" name="${v(e.name)}"${s ? ` descr="${v(s)}"` : ""}`, l = ve(e.link, t);
128
128
  return l ? `${a}>${l}</p:cNvPr>` : `${a}/>`;
129
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
130
  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>`;
131
+ const s = `<p:nvSpPr>${j(e, t)}<p:cNvSpPr${e.textBox ? ' txBox="1"' : ""}/><p:nvPr/></p:nvSpPr>`, a = `<p:spPr>${_(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>`;
137
133
  }
138
134
  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>`;
135
+ const s = (l, n) => n ? `<a:${l} id="${n.id}" idx="${n.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>${_(e, t)}${se(e.geom, e.w, e.h)}<a:noFill/>${ae(e.line, t.s)}</p:spPr></p:cxnSp>`;
141
137
  }
142
138
  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>`;
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)}"/>` : "", n = e.crop, p = n ? `<a:srcRect l="${F(n.l)}" t="${F(n.t)}" r="${F(n.r)}" b="${F(n.b)}"/>` : "", c = `<p:blipFill><a:blip r:embed="${s}">${l}</a:blip>${p}<a:stretch><a:fillRect/></a:stretch></p:blipFill>`;
140
+ return `<p:pic>${a}${c}<p:spPr>${_(e, t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`;
141
+ }
142
+ function Le(e, t) {
143
+ return `<p:grpSp>${`<p:nvGrpSpPr>${j(e, t)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr>`}<p:grpSpPr>${_(e, t, "a:xfrm", !0)}</p:grpSpPr>${e.children.map((a) => le(a, t)).join("")}</p:grpSp>`;
144
144
  }
145
145
  function le(e, t) {
146
146
  switch (e.kind) {
147
147
  case "shape":
148
- return ve(e, t);
149
- case "connector":
150
148
  return be(e, t);
151
- case "picture":
149
+ case "connector":
152
150
  return Me(e, t);
151
+ case "picture":
152
+ return Ce(e, t);
153
153
  case "group":
154
- return e.children.length ? Ce(e, t) : "";
154
+ return e.children.length ? Le(e, t) : "";
155
155
  }
156
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
- }
157
+ const R = '<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>';
163
158
  function Fe(e, t) {
159
+ const s = t && t > 0 ? ` advTm="${Math.round(t)}"` : "";
160
+ if (!e) return s ? `<mc:AlternateContent xmlns:mc="${x.mc}"><mc:Choice xmlns:p14="${x.p14}" Requires="p14"><p:transition spd="fast" p14:dur="0"${s}/></mc:Choice><mc:Fallback><p:transition spd="fast"${s}/></mc:Fallback></mc:AlternateContent>` : "";
161
+ const a = Math.max(0, Math.min(6e4, Math.round(e.durationMs))), l = a <= 600 ? "fast" : a <= 900 ? "med" : "slow", n = e.kind === "push" ? `<p:push dir="${e.dir ?? "l"}"/>` : e.kind === "zoom" ? `<p:zoom dir="${e.zoomIn === !1 ? "out" : "in"}"/>` : "<p:fade/>";
162
+ return e.kind === "morph" ? `<mc:AlternateContent xmlns:mc="${x.mc}"><mc:Choice xmlns:p159="${he}" xmlns:p14="${x.p14}" Requires="p159"><p:transition spd="${l}" p14:dur="${a}"${s}><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="${l}"${s}><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>` : `<mc:AlternateContent xmlns:mc="${x.mc}"><mc:Choice xmlns:p14="${x.p14}" Requires="p14"><p:transition spd="${l}" p14:dur="${a}"${s}>${n}</p:transition></mc:Choice><mc:Fallback><p:transition spd="${l}"${s}>${n}</p:transition></mc:Fallback></mc:AlternateContent>`;
163
+ }
164
+ function ke(e, t) {
164
165
  let s = "";
165
166
  const a = e.background;
166
167
  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) {
168
+ const l = e.items.map((c) => le(c, t)).join(""), n = e.name ? ` name="${v(e.name)}"` : "", p = e.hidden ? ' show="0"' : "";
169
+ return m + `<p:sld ${b}${p}><p:cSld${n}>${s}<p:spTree>${R}${l}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr>${Fe(e.transition, e.advanceAfterMs)}</p:sld>`;
170
+ }
171
+ const B = (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 = m + `<a:theme xmlns:a="${x.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>`, we = m + `<p:sldMaster ${b}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree>${R}</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>${B(4400)}</p:titleStyle><p:bodyStyle>${B(2800)}</p:bodyStyle><p:otherStyle>${B(1800)}</p:otherStyle></p:txStyles></p:sldMaster>`, Ie = m + `<p:sldLayout ${b} type="blank" preserve="1"><p:cSld name="Blank"><p:spTree>${R}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:sldLayout>`, K = 6858e3, Q = 9144e3, E = (e, t, s, a, l, n, p, c, h = "") => {
172
+ const r = `<a:xfrm><a:off x="${Math.round(K * l)}" y="${Math.round(Q * n)}"/><a:ext cx="${Math.round(K * p)}" cy="${Math.round(Q * c)}"/></a:xfrm>`, g = s === "sldImg", d = g ? "" : ' sz="quarter"', f = g ? `<p:spPr>${r}<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>${r}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr>`, P = g ? '<a:spLocks noGrp="1" noRot="1" noChangeAspect="1"/>' : '<a:spLocks noGrp="1"/>', M = g ? "" : `<p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"/><a:lstStyle/>${h || '<a:p><a:endParaRPr lang="en-US"/></a:p>'}</p:txBody>`;
173
+ return `<p:sp><p:nvSpPr><p:cNvPr id="${e}" name="${t}"/><p:cNvSpPr>${P}</p:cNvSpPr><p:nvPr><p:ph type="${s}"${d} idx="${a}"/></p:nvPr></p:nvSpPr>${f}${M}</p:sp>`;
174
+ }, Ee = 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(""), Te = m + `<p:notesMaster ${b}><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree>${R}` + 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>${Ee}</p:notesStyle></p:notesMaster>`;
175
+ function Ne(e) {
175
176
  const t = e.replace(/\r\n?/g, `
176
177
  `).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>`;
178
+ `).map((l) => l ? `<a:p><a:r><a:rPr lang="en-US" dirty="0"/><a:t>${v(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>`;
179
+ return m + `<p:notes ${b}><p:cSld><p:spTree>${R}${s}${a}</p:spTree></p:cSld><p:clrMapOvr><a:masterClrMapping/></p:clrMapOvr></p:notes>`;
180
+ }
181
+ const Ae = m + `<p:presentationPr ${b}/>`, Re = m + `<p:presentationPr ${b}><p:showPr loop="1" showNarration="1"><p:present/><p:sldAll/></p:showPr></p:presentationPr>`;
182
+ function De(e, t) {
183
+ if (!e.some((l) => l.section)) return "";
184
+ const s = [];
185
+ e.forEach((l, n) => {
186
+ (l.section || !s.length) && s.push({ name: l.section || "Default Section", ids: [] }), s[s.length - 1].ids.push(t(n));
187
+ });
188
+ const a = (l) => `{8F3A1C2E-5B7D-4E9A-9C11-${(l + 1).toString(16).toUpperCase().padStart(12, "0")}}`;
189
+ return `<p:extLst><p:ext uri="{521415D9-36F7-43E2-AB2F-B90AF26B5E84}"><p14:sectionLst xmlns:p14="${x.p14}">` + s.map((l, n) => `<p14:section name="${v(l.name)}" id="${a(n)}"><p14:sldIdLst>${l.ids.map((p) => `<p14:sldId id="${p}"/>`).join("")}</p14:sldIdLst></p14:section>`).join("") + "</p14:sectionLst></p:ext></p:extLst>";
179
190
  }
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;
191
+ const Be = m + `<p:viewPr ${b}><p:normalViewPr><p:restoredLeft sz="15620"/><p:restoredTop sz="94660"/></p:normalViewPr><p:gridSpacing cx="76200" cy="76200"/></p:viewPr>`, _e = m + `<a:tblStyleLst xmlns:a="${x.a}" def="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"/>`, je = (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>${v(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>`, Oe = (e, t) => 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><Notes>${t}</Notes><PresentationFormat>Custom</PresentationFormat></Properties>`;
192
+ function Xe(e, t = {}) {
193
+ const s = Math.max(1, e.width), a = Math.max(1, e.height), l = Math.max(s, a) * u, n = Math.min(s, a) * u, p = l > A ? A / l : n < D ? Math.min(D / n, A / l) : 1, c = Math.max(D, Math.min(A, Math.round(s * p * u))), h = Math.max(D, Math.min(A, Math.round(a * p * u))), r = /* @__PURE__ */ new Map(), g = [], d = /* @__PURE__ */ new Set();
194
+ let f = 0;
184
195
  const P = e.slides.length ? e.slides : [{ items: [] }], M = /* @__PURE__ */ new Map();
185
196
  P.forEach((i, N) => {
186
197
  i.key && M.set(i.key, N + 1);
187
198
  });
188
- const g = [{ id: "rId1", type: o.slideMaster, target: "slideMasters/slideMaster1.xml" }], w = P.some((i) => !!i.notes?.trim());
199
+ const y = [{ id: "rId1", type: o.slideMaster, target: "slideMasters/slideMaster1.xml" }], w = P.some((i) => !!i.notes?.trim());
189
200
  let U = "";
190
201
  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,
202
+ const S = N + 1, I = [{ id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" }], H = /* @__PURE__ */ new Map(), O = i.fit ?? { scale: 1, dx: 0, dy: 0 }, oe = {
203
+ s: O.scale * p,
204
+ dx: O.dx * p,
205
+ dy: O.dy * p,
195
206
  rels: I,
196
207
  slideNumber: (C) => M.get(C) ?? null,
197
208
  media: (C) => {
198
209
  const W = H.get(C);
199
210
  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;
211
+ f++;
212
+ const V = `image${f}.${C.ext}`;
213
+ r.set(`ppt/media/${V}`, C.bytes), d.add(C.ext);
214
+ const z = `rId${I.length + 1}`;
215
+ return I.push({ id: z, type: o.image, target: `../media/${V}` }), H.set(C, z), z;
205
216
  }
206
217
  };
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([
218
+ r.set(`ppt/slides/slide${S}.xml`, ke(i, oe)), i.notes?.trim() && (I.push({ id: `rId${I.length + 1}`, type: o.notesSlide, target: `../notesSlides/notesSlide${S}.xml` }), r.set(`ppt/notesSlides/notesSlide${S}.xml`, Ne(i.notes)), r.set(`ppt/notesSlides/_rels/notesSlide${S}.xml.rels`, L([
208
219
  { 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}"/>`;
220
+ { id: "rId2", type: o.slide, target: `../slides/slide${S}.xml` }
221
+ ])), g.push([`/ppt/notesSlides/notesSlide${S}.xml`, $.notesSlide])), r.set(`ppt/slides/_rels/slide${S}.xml.rels`, L(I)), g.push([`/ppt/slides/slide${S}.xml`, $.slide]);
222
+ const Y = `rId${S + 1}`;
223
+ y.push({ id: Y, type: o.slide, target: `slides/slide${S}.xml` }), U += `<p:sldId id="${255 + S}" r:id="${Y}"/>`;
213
224
  });
214
225
  const T = P.length + 2;
215
- g.push(
226
+ y.push(
216
227
  { id: `rId${T}`, type: o.theme, target: "theme/theme1.xml" },
217
228
  { id: `rId${T + 1}`, type: o.presProps, target: "presProps.xml" },
218
229
  { id: `rId${T + 2}`, type: o.viewProps, target: "viewProps.xml" },
219
230
  { id: `rId${T + 3}`, type: o.tableStyles, target: "tableStyles.xml" }
220
231
  );
221
232
  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([
233
+ w && (y.push({ id: G, type: o.notesMaster, target: "notesMasters/notesMaster1.xml" }), r.set("ppt/notesMasters/notesMaster1.xml", Te), r.set("ppt/notesMasters/_rels/notesMaster1.xml.rels", L([
223
234
  { 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([
235
+ ])), r.set("ppt/theme/theme2.xml", J), g.push(["/ppt/notesMasters/notesMaster1.xml", $.notesMaster], ["/ppt/theme/theme2.xml", $.theme]));
236
+ const ne = m + `<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="${c}" cy="${h}"/><p:notesSz cx="6858000" cy="9144000"/><p:defaultTextStyle>${B(1800)}</p:defaultTextStyle>${De(P, (i) => 256 + i)}</p:presentation>`;
237
+ r.set("ppt/presentation.xml", ne), r.set("ppt/_rels/presentation.xml.rels", L(y)), r.set("ppt/slideMasters/slideMaster1.xml", we), r.set("ppt/slideMasters/_rels/slideMaster1.xml.rels", L([
227
238
  { id: "rId1", type: o.slideLayout, target: "../slideLayouts/slideLayout1.xml" },
228
239
  { 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([
240
+ ])), r.set("ppt/slideLayouts/slideLayout1.xml", Ie), r.set("ppt/slideLayouts/_rels/slideLayout1.xml.rels", L([
230
241
  { 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([
242
+ ])), r.set("ppt/theme/theme1.xml", J), r.set("ppt/presProps.xml", e.loop ? Re : Ae), r.set("ppt/viewProps.xml", Be), r.set("ppt/tableStyles.xml", _e);
243
+ const re = t.now ?? (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d+Z$/, "Z");
244
+ r.set("docProps/core.xml", je(e.title || "YappyDraw presentation", re)), r.set("docProps/app.xml", Oe(P.length, P.filter((i) => !!i.notes?.trim()).length)), r.set("_rels/.rels", L([
234
245
  { id: "rId1", type: o.officeDocument, target: "ppt/presentation.xml" },
235
246
  { id: "rId2", type: o.coreProps, target: "docProps/core.xml" },
236
247
  { 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]
248
+ ])), g.push(
249
+ ["/ppt/presentation.xml", $.presentation],
250
+ ["/ppt/slideMasters/slideMaster1.xml", $.slideMaster],
251
+ ["/ppt/slideLayouts/slideLayout1.xml", $.slideLayout],
252
+ ["/ppt/theme/theme1.xml", $.theme],
253
+ ["/ppt/presProps.xml", $.presProps],
254
+ ["/ppt/viewProps.xml", $.viewProps],
255
+ ["/ppt/tableStyles.xml", $.tableStyles],
256
+ ["/docProps/core.xml", $.core],
257
+ ["/docProps/app.xml", $.app]
247
258
  );
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);
259
+ const pe = m + `<Types xmlns="${x.ct}"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>` + [...d].map((i) => `<Default Extension="${i}" ContentType="${fe[i]}"/>`).join("") + g.map(([i, N]) => `<Override PartName="${i}" ContentType="${N}"/>`).join("") + "</Types>";
260
+ return r.set("[Content_Types].xml", pe), ie(r);
250
261
  }
251
262
  export {
252
- je as buildPptx,
253
- Te as notesXml
263
+ Xe as buildPptx,
264
+ Ne as notesXml
254
265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algorisys/yappydraw",
3
- "version": "0.8.294",
3
+ "version": "0.8.296",
4
4
  "description": "The YappyDraw drawing API without the editor: hand-drawn and clean shapes, rendered to SVG in the browser.",
5
5
  "type": "module",
6
6
  "main": "./yappy.js",
package/yappy.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aN as o, aO as e, aP as r, aQ as t, aR as n, aS as p } from "./chunks/index-v2rH-W8-.js";
1
+ import { aN as o, aO as e, aP as r, aQ as t, aR as n, aS as p } from "./chunks/index-NbpsufU1.js";
2
2
  export {
3
3
  o as Yappy,
4
4
  e as clear,