@algorisys/yappydraw 0.8.293 → 0.8.295

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 (32) hide show
  1. package/README.md +2 -2
  2. package/chunks/{canva-ai-B5NJGMGr.js → canva-ai-kg789_jz.js} +1 -1
  3. package/chunks/{choice-dialog-state-Cw0WShhc.js → choice-dialog-state-ByeMPVwB.js} +1 -1
  4. package/chunks/{custgeom-BeeylhzV.js → custgeom-CEAI2znd.js} +13 -10
  5. package/chunks/{design-generator-BSZ2XUOE.js → design-generator-zF-F-iCB.js} +1 -1
  6. package/chunks/{drawing-engine-DfASJ_gK.js → drawing-engine-U5zBcwtj.js} +1 -1
  7. package/chunks/{drawings-store-cl-M93Eh.js → drawings-store-CZSZCNqP.js} +1 -1
  8. package/chunks/{ds-operations-CXoS_Obn.js → ds-operations-_c-HiYjk.js} +1 -1
  9. package/chunks/{export-game-BTjE-uv-.js → export-game-CgMvNkoa.js} +1 -1
  10. package/chunks/{from-yappy-hUcG5auS.js → from-yappy-Dd2p9P6N.js} +116 -97
  11. package/chunks/{game-runtime-33Ly0Axb.js → game-runtime-CH3yVPDc.js} +37 -37
  12. package/chunks/import-C3P7glRz.js +1726 -0
  13. package/chunks/{index-OCtbNe3Y.js → index-B_V19zDs.js} +20563 -19834
  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-Btzt68l9.js → lucide-solid-DfQVDBtM.js} +1 -1
  17. package/chunks/markdown-to-slides-B5OASdqg.js +122 -0
  18. package/chunks/{morph-animator-CWLzpuUc.js → morph-animator-b1aFWI5O.js} +1 -1
  19. package/chunks/{onboarding-tour-eLES7UJM.js → onboarding-tour-j-RhQYNM.js} +1 -1
  20. package/chunks/{pdf-vector-C1l03NEO.js → pdf-vector-CzrRoyPR.js} +2 -2
  21. package/chunks/purify.es-B0KlbA1O.js +1520 -0
  22. package/chunks/{search-tbh5OqVp.js → search-B7AUhYCm.js} +2 -2
  23. package/chunks/{slide-generator-CZfB2tSO.js → slide-generator-AO60zi1f.js} +1 -1
  24. package/chunks/{svg2pdf.es.min-B6z21zR3.js → svg2pdf.es.min-4O9RYeoT.js} +1 -1
  25. package/chunks/{turntable-ai-CeD-w_eE.js → turntable-ai-DddsPGTo.js} +1 -1
  26. package/chunks/write-uweO04Cm.js +265 -0
  27. package/package.json +1 -1
  28. package/yappy.js +1 -1
  29. package/chunks/import-Dk___UKU.js +0 -1635
  30. package/chunks/markdown-to-slides-CNpwNPE8.js +0 -96
  31. package/chunks/purify.es-C2Qa7b4C.js +0 -906
  32. package/chunks/write-BUtbdS9L.js +0 -212
@@ -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
- };