pptx-react-viewer 1.1.39 → 1.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4675,7 +4675,7 @@ ${o.join(`
4675
4675
  `),s=o.flat().find(d=>d.text.trim().length>0),a=s?.style?{...s.style}:r;function l(d,p){if(p.length===0)return d.length>0?[{text:d,style:{...a}}]:[{text:"",style:{...a}}];let f=p[0].bulletInfo;if(d.length===0){let v=[{text:"",style:{...p[0].style}}];return f&&(v[0].bulletInfo=f),v}if(p.reduce((x,v)=>x+v.text.length,0)===0){let x=[{text:d,style:{...p[0].style}}];return f&&(x[0].bulletInfo=f),x}let m=[],g=0;for(let x=0;x<p.length;x++){let v=p[x],S=x===p.length-1,w=v.text.length;if(g>=d.length)break;let C;if(S?C=d.slice(g):C=d.slice(g,g+w),C.length>0){let T={text:C,style:{...v.style}};m.length===0&&f&&(T.bulletInfo=f),m.push(T);}g+=S?C.length:w;}if(m.length===0){let x={text:d,style:{...p[0].style}};return f&&(x.bulletInfo=f),[x]}return m}let c=[],u=o[o.length-1];for(let d=0;d<i.length;d++){if(d>0){let h=o[d-1]??[],m=h[0]?.style?{...h[0].style}:{...a};c.push({text:`
4676
4676
  `,style:m,isParagraphBreak:true});}let p=o[d]??u??[],f=l(i[d],p);c.push(...f);}return c.length>0?c:[{text:"",style:{...a}}]}var lGe=12,cGe=0,$re=5e4,uGe=16667;function A$(t){return Math.max(cGe,Math.min($re,Math.round(t)))}function HR(t){let e=t.shapeAdjustments?.adj;return typeof e=="number"&&Number.isFinite(e)?A$(e):uGe}function kC(t){let e=HR(t)/$re;return Math.min(Math.max(t.width,1),Math.max(t.height,1))*.5*e}function IC(t){if(!vn(t)||String(t.shapeType||"").toLowerCase()!=="roundrect")return null;let n=HR(t),r=kC(t),o=Math.max(t.width,lGe),i=5;return {key:"adj",left:Math.max(i,Math.min(o-i,Math.round(r))),top:-8,value:n,cursor:"ew-resize"}}var dGe=new Set(["javascript:","data:","vbscript:","mhtml:","x-]javascript:"]);function s0(t){if(!t||typeof t!="string")return false;let e=t.trim();if(e.length===0)return false;let r=e.toLowerCase().replace(/[\s​]/gu,"").replace(/‌/gu,"").replace(/‍/gu,"").split("\0").join("");for(let o of dGe)if(r.startsWith(o))return false;return true}function Bh(t){return s0(t)?typeof window>"u"?false:(window.open(t,"_blank","noopener,noreferrer"),true):(typeof console<"u"&&console.warn(`[pptx-viewer] Blocked attempt to open unsafe URL: ${t.slice(0,100)}`),false)}function zR(t){return !t||typeof t!="string"?false:t.toLowerCase().startsWith("ppaction://")}function R$(t){if(!zR(t))return null;let e,n=t.indexOf("?");if(n>=0){let r=t.slice(n+1),o=new URLSearchParams(r),i=o.get("slideIndex");if(i!==null){let l=parseInt(i,10);Number.isFinite(l)&&(e=l);}o.delete("slideIndex");let s=o.toString();return {action:s?`${t.slice(0,n)}?${s}`:t.slice(0,n),targetSlideIndex:e}}return {action:t,targetSlideIndex:e}}var k$="pptx:slides";var pGe=new Set(["id","type","x","y","width","height","rotation","flipHorizontal","flipVertical","hidden","opacity","text","name","altText","shapeType","placeholder","imagePath","imageData","svgContent","inkSvg","sourceSlideId","mediaType","mediaPath","linkedTxbxId","linkedTxbxSeq","promptText"]),IU={textStyle:"_ts",shapeStyle:"_ss",shapeAdjustments:"_sa",adjustmentHandles:"_ah",tableData:"_td",chartData:"_cd",smartArtData:"_smad",connectionStart:"_cs",connectionEnd:"_ce",animations:"_an",nativeAnimations:"_na",children:"_ch",paragraphIndents:"_pi",rawXml:"_rx",actionClick:"_ac",actionHover:"_av",locks:"_lk",imageEffects:"_ie",cropShape:"_cr",mediaBookmarks:"_mb",captionTracks:"_ct"},Fne=Object.fromEntries(Object.entries(IU).map(([t,e])=>[e,t])),Hre=new Set(["id","rId","sourceSlideId","layoutPath","layoutName","slideNumber","hidden","sectionName","sectionId","backgroundColor","backgroundImage","backgroundGradient","notes","backgroundShowAnimation","showMasterShapes","isDirty"]),zre={transition:"_tr",animations:"_an",nativeAnimations:"_na",rawTiming:"_rt",notesSegments:"_ns",comments:"_cm",warnings:"_wa",rawXml:"_rx",clrMapOverride:"_cm2",guides:"_gu",customerData:"_cu",activeXControls:"_ax"},fGe=Object.fromEntries(Object.entries(zre).map(([t,e])=>[e,t]));function hGe(t){let e={},n=t.style;return n&&typeof n=="object"&&Object.keys(n).length>0&&(e.s=JSON.stringify(n)),t.isParagraphBreak&&(e.pb="1"),t.isLineBreak&&(e.lb="1"),t.bulletInfo&&(e.bi=JSON.stringify(t.bulletInfo)),t.paragraphLevel!==void 0&&(e.pl=String(t.paragraphLevel)),t.endParaRunProperties&&(e.pr=JSON.stringify(t.endParaRunProperties)),typeof t.fieldType=="string"&&(e.ft=t.fieldType),typeof t.fieldGuid=="string"&&(e.fg=t.fieldGuid),(t.fieldGuidAttr==="uuid"||t.fieldGuidAttr==="id")&&(e.fga=t.fieldGuidAttr),t.fieldParagraphPropertiesXml&&(e.fp=JSON.stringify(t.fieldParagraphPropertiesXml)),t.equationXml&&(e.eq=JSON.stringify(t.equationXml)),typeof t.equationNumber=="string"&&(e.en=t.equationNumber),t.breakRunProperties&&(e.br=JSON.stringify(t.breakRunProperties)),typeof t.rubyText=="string"&&(e.rt=t.rubyText),typeof t.rubyAlignment=="string"&&(e.ra=t.rubyAlignment),t.rubyFontSize!==void 0&&(e.rfs=String(t.rubyFontSize)),t.rubyStyle&&(e.rs=JSON.stringify(t.rubyStyle)),e}function mGe(t,e){let n=0;for(let r of t){let o=r,i=hGe(o),s=Object.keys(i).length>0;o.isParagraphBreak===true||o.isLineBreak===true?(e.insert(n,`
4677
4677
  `,s?i:void 0),n+=1):typeof o.text=="string"&&o.text.length>0?(e.insert(n,o.text,s?i:void 0),n+=o.text.length):(e.insert(n,"\u200B",s?i:void 0),n+=1);}}function gGe(t){let e=t.toDelta(),n=[];for(let r of e){if(typeof r.insert!="string"||r.insert==="")continue;let o=r.attributes??{},i={text:"",style:{}};if(o.s)try{i.style=JSON.parse(o.s);}catch{i.style={};}if(o.pb==="1"&&(i.isParagraphBreak=true),o.lb==="1"&&(i.isLineBreak=true),o.bi)try{i.bulletInfo=JSON.parse(o.bi);}catch{}if(o.pl!==void 0&&(i.paragraphLevel=Number(o.pl)),o.pr)try{i.endParaRunProperties=JSON.parse(o.pr);}catch{}if(o.ft&&(i.fieldType=o.ft),o.fg&&(i.fieldGuid=o.fg),(o.fga==="uuid"||o.fga==="id")&&(i.fieldGuidAttr=o.fga),o.fp)try{i.fieldParagraphPropertiesXml=JSON.parse(o.fp);}catch{}if(o.eq)try{i.equationXml=JSON.parse(o.eq);}catch{}if(o.en&&(i.equationNumber=o.en),o.br)try{i.breakRunProperties=JSON.parse(o.br);}catch{}if(o.rt&&(i.rubyText=o.rt),o.ra&&(i.rubyAlignment=o.ra),o.rfs!==void 0&&(i.rubyFontSize=Number(o.rfs)),o.rs)try{i.rubyStyle=JSON.parse(o.rs);}catch{}r.insert!==`
4678
- `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function xGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(pGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();mGe(i,s),e.set("textBody",s);}}else IU[o]&&e.set(IU[o],JSON.stringify(i));}function yGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function bGe(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")yGe(n)&&(e.textSegments=gGe(n));else if(Fne[r])try{e[Fne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function vGe(t,e,n){let r=t;for(let i of Hre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(zre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();xGe(i,s,n),o.push([s]);}e.set("elements",o);}function SGe(t){let e={};for(let o of Hre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(fGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(bGe(n.get(o)));return e.elements=r,e}function Gre(t,e,n,r){e.transact(()=>{let o=e.getArray(k$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();vGe(i,s,n),o.push([s]);}},r);}function I$(t){let e=t.getArray(k$),n=[];for(let r=0;r<e.length;r++)n.push(SGe(e.get(r)));return n}function Vre(t,e){let n=t.getArray(k$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Bne=2,One=2;function NU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function qg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=NU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function DU(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...DU(n.children));return e}function Une(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function wGe(t,e){let n=[],r=Une(DU(t)),o=Une(DU(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:qg(s),kind:"removed",description:`Element removed: ${qg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:qg(s),kind:"added",description:`Element added: ${qg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Bne||Math.abs(s.y-a.y)>Bne)&&n.push({elementId:i,label:qg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>One||Math.abs(s.height-a.height)>One)&&n.push({elementId:i,label:qg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=NU(s),c=NU(a);l!==c&&n.push({elementId:i,label:qg(s),kind:"textChanged",description:"Text content changed"});}return n}function CGe(t,e){let n=wGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function TGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=CGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function N$(t,e){return TGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function EGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function gb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+gb(n),0)}function Wre(t){return t.children.length===0?1:1+Math.max(...t.children.map(Wre))}function PGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var $ne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Hne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function AGe(t,e,n){if(n&&n in $ne)return $ne[n];if(e&&e in Hne){let o=Hne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function Xre(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function RGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function kGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function IGe(t,e,n,r,o){let i=EGe(t);if(i.length===0)return Xre(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+gb(E),0),c=Math.max(...i.map(Wre)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=gb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=gb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=gb(O);}let C=0;for(let T of i)w(T,C,0),C+=gb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function NGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function DGe(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function LGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function OGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function jre(t,e,n,r,o,i,s){let a=PGe(t);switch(AGe(t,i,s)){case "list":return Xre(a,e,n,r,o);case "process":return RGe(a,e,n,r,o);case "cycle":return kGe(a,e,n,r,o);case "hierarchy":return IGe(t,e,n,r,o);case "matrix":return NGe(a,e,n,r,o);case "radial":return DGe(a,e,n,r,o);case "pyramid":return LGe(a,e,n,r,o);case "venn":return FGe(a,e,n,r,o);case "funnel":return BGe(a,e,n,r,o);case "target":return OGe(a,e,n,r,o)}}function UGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function $Ge(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function HGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function zGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function GGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function VGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function WGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function XGe(t){let[e,n,r]=WGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function zne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function jGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=zne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>zne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function YGe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function KGe(t){switch(t.family){case "cycle":case "radial":return jGe(t);case "hierarchy":return YGe(t);default:return t}}var qGe=.35,ZGe=.2;function JGe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??qGe;return Math.max(2,t*n)}function QGe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=$Ge(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=HGe(t.r),a=true;else {let m=zGe(t.points);if(m.length<3)return null;let g=VGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=JGe(p,r),h=f*(r.bevelRatio??ZGe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:XGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function Yre(t,e={}){let{width:n,height:r}=UGe(t.viewBox),o=[];for(let a of t.nodes){let l=QGe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=GGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?KGe(s):s}var NC=95,DC=100;function GR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function LC(t,e,n=90){return e<=0?0:GR(t/e*n)}function Kre(t,e){return e<=0?45:GR(45+t/e*45)}function Gb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function FC(t){return t instanceof DOMException&&t.name==="AbortError"}var tVe=".pptx,.ppsx,.pptm,.potx";function nVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??tVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function qre(t={}){let e=await nVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function Zre(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function Jre(t){return t<=0}function Qre(t,e){return t>=e-1}function hC(t){return String(t).padStart(2,"0")}function eoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function toe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${hC(r)}:${hC(o)}:${hC(i)}`:`${hC(o)}:${hC(i)}`}var rVe=120;function D$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function noe(t,e=rVe){return t>=e}function L$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function roe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function bC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function ooe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var ioe=Math.sqrt(65025*3);function soe(t){return Math.max(0,Math.min(100,t))/100*ioe}function aoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};ooe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var VR=12;function F$(t,e,n,r=VR,o=false){return new Promise((i,s)=>{let a=bC(e),l=bC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=soe(r);aoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var mC=new Map,oVe=64;function B$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function BC(t){return mC.get(t)}function O$(t,e){if(mC.size>=oVe){let n=mC.keys().next().value;n!==void 0&&mC.delete(n);}mC.set(t,e);}function loe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function U$(t,e,n){return new Promise((r,o)=>{let i=bC(e),s=bC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);loe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var gC=new Map,iVe=64;function $$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function WR(t){return gC.get(t)}function H$(t,e){if(gC.size>=iVe){let n=gC.keys().next().value;n!==void 0&&gC.delete(n);}gC.set(t,e);}var z$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var coe=50,uoe=100,doe=500,LU=10;function FU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function poe(t,e,n){return Math.min(Math.max(t,e),n)}function foe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=null,d=0,p=0,f=()=>{u!==null&&(clearTimeout(u),u=null);},h=v=>{v.touches.length===2?(a=true,i=FU(v.touches[0],v.touches[1]),s=e(),f(),v.preventDefault()):v.touches.length===1&&(l=v.touches[0].clientX,c=v.touches[0].clientY,d=v.touches[0].clientX,p=v.touches[0].clientY,f(),u=setTimeout(()=>{u=null,o.onLongPress?.(d,p);},doe));},m=v=>{if(v.touches.length===2&&a){v.preventDefault();let S=FU(v.touches[0],v.touches[1]);if(i>0){let w=S/i,C=poe(s*w,n,r);o.onPinchZoom?.(C);}}else if(v.touches.length===1){let S=v.touches[0].clientX-d,w=v.touches[0].clientY-p;(Math.abs(S)>LU||Math.abs(w)>LU)&&f();}},g=v=>{if(a){a=false,i=0;return}if(f(),v.changedTouches.length===1&&v.touches.length===0){let S=v.changedTouches[0].clientX,w=v.changedTouches[0].clientY,C=S-l,T=w-c;Math.abs(C)>=coe&&Math.abs(T)<uoe&&o.onSwipe?.(C>0?1:-1);}},x=()=>{a=false,i=0,f();};return {onTouchStart:h,onTouchMove:m,onTouchEnd:g,onTouchCancel:x,cancel:x}}var hoe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],G$="bar",uR={x:120,y:120,width:480,height:320},sVe=["Category 1","Category 2","Category 3"],aVe=[4,3,5];function moe(t=G$,e){return Jw(t,{categories:[...sVe],series:[{name:"Series 1",values:[...aVe]}],title:"Chart Title",hasLegend:true},{x:uR.x,y:uR.y,width:uR.width,height:uR.height})}function V$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];Gne(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),Gne(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=lVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=uVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function Gne(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function lVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=BU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=cVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function BU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...BU(t.slice(0,p),e-1),...BU(t.slice(p),e-1)]}function cVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function uVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},W$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var mb=4,dVe=.45,pVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function goe(t){return pVe[t]??{rows:3,columns:2}}function xoe(t,e){return t<=0?0:Math.ceil(t/e)}function yoe(t,e,n,r,o=eu){let i=goe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*dVe,d=(a-mb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+mb),width:u,height:d});}}else {let u=(s-mb*(i.columns-1))/i.columns,d=(a-mb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+mb),y:f*(d+mb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function XR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?W$:eu,i=xoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=yoe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function jR(t="portrait"){let e=t==="landscape"?W$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function YR(){return 8}var fVe=.48,hVe=6,Vne=16/9;function boe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*fVe,s=r,a=s/Vne;a>i&&(a=i,s=a*Vne);let l=(r-s)/2,c=(i-a)/2,u=i+hVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function KR(t){return t.map((e,n)=>boe(n,e))}function qR(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var Qg=612,sd=792,Rs=36,X$=2/3,r0=18,Vb=11,ZR=1.4,j$=.5,vC=9;function JR(t,e){let n=Qg-2*Rs,r=sd-2*Rs,o=r*X$,i=r-o-r0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-r0,f=Vb*ZR,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function QR(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ek(){let t=sd-2*Rs,e=vC+r0,n=t-e,r=Vb*ZR;return Math.floor(n/r)}function wb(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function gR(t,e){if(t.length===0)return "";let n=`BT /F1 ${Vb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${wb(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${wb(o)}) Tj `;}return n+=`ET
4678
+ `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function xGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(pGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();mGe(i,s),e.set("textBody",s);}}else IU[o]&&e.set(IU[o],JSON.stringify(i));}function yGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function bGe(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")yGe(n)&&(e.textSegments=gGe(n));else if(Fne[r])try{e[Fne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function vGe(t,e,n){let r=t;for(let i of Hre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(zre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();xGe(i,s,n),o.push([s]);}e.set("elements",o);}function SGe(t){let e={};for(let o of Hre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(fGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(bGe(n.get(o)));return e.elements=r,e}function Gre(t,e,n,r){e.transact(()=>{let o=e.getArray(k$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();vGe(i,s,n),o.push([s]);}},r);}function I$(t){let e=t.getArray(k$),n=[];for(let r=0;r<e.length;r++)n.push(SGe(e.get(r)));return n}function Vre(t,e){let n=t.getArray(k$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Bne=2,One=2;function NU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function qg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=NU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function DU(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...DU(n.children));return e}function Une(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function wGe(t,e){let n=[],r=Une(DU(t)),o=Une(DU(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:qg(s),kind:"removed",description:`Element removed: ${qg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:qg(s),kind:"added",description:`Element added: ${qg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Bne||Math.abs(s.y-a.y)>Bne)&&n.push({elementId:i,label:qg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>One||Math.abs(s.height-a.height)>One)&&n.push({elementId:i,label:qg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=NU(s),c=NU(a);l!==c&&n.push({elementId:i,label:qg(s),kind:"textChanged",description:"Text content changed"});}return n}function CGe(t,e){let n=wGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function TGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=CGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function N$(t,e){return TGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function EGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function gb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+gb(n),0)}function Wre(t){return t.children.length===0?1:1+Math.max(...t.children.map(Wre))}function PGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var $ne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Hne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function AGe(t,e,n){if(n&&n in $ne)return $ne[n];if(e&&e in Hne){let o=Hne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function Xre(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function RGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function kGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function IGe(t,e,n,r,o){let i=EGe(t);if(i.length===0)return Xre(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+gb(E),0),c=Math.max(...i.map(Wre)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=gb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=gb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=gb(O);}let C=0;for(let T of i)w(T,C,0),C+=gb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function NGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function DGe(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function LGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function OGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function jre(t,e,n,r,o,i,s){let a=PGe(t);switch(AGe(t,i,s)){case "list":return Xre(a,e,n,r,o);case "process":return RGe(a,e,n,r,o);case "cycle":return kGe(a,e,n,r,o);case "hierarchy":return IGe(t,e,n,r,o);case "matrix":return NGe(a,e,n,r,o);case "radial":return DGe(a,e,n,r,o);case "pyramid":return LGe(a,e,n,r,o);case "venn":return FGe(a,e,n,r,o);case "funnel":return BGe(a,e,n,r,o);case "target":return OGe(a,e,n,r,o)}}function UGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function $Ge(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function HGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function zGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function GGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function VGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function WGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function XGe(t){let[e,n,r]=WGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function zne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function jGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=zne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>zne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function YGe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function KGe(t){switch(t.family){case "cycle":case "radial":return jGe(t);case "hierarchy":return YGe(t);default:return t}}var qGe=.35,ZGe=.2;function JGe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??qGe;return Math.max(2,t*n)}function QGe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=$Ge(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=HGe(t.r),a=true;else {let m=zGe(t.points);if(m.length<3)return null;let g=VGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=JGe(p,r),h=f*(r.bevelRatio??ZGe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:XGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function Yre(t,e={}){let{width:n,height:r}=UGe(t.viewBox),o=[];for(let a of t.nodes){let l=QGe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=GGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?KGe(s):s}var NC=95,DC=100;function GR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function LC(t,e,n=90){return e<=0?0:GR(t/e*n)}function Kre(t,e){return e<=0?45:GR(45+t/e*45)}function Gb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function FC(t){return t instanceof DOMException&&t.name==="AbortError"}var tVe=".pptx,.ppsx,.pptm,.potx";function nVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??tVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function qre(t={}){let e=await nVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function Zre(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function Jre(t){return t<=0}function Qre(t,e){return t>=e-1}function hC(t){return String(t).padStart(2,"0")}function eoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function toe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${hC(r)}:${hC(o)}:${hC(i)}`:`${hC(o)}:${hC(i)}`}var rVe=120;function D$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function noe(t,e=rVe){return t>=e}function L$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function roe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function bC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function ooe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var ioe=Math.sqrt(65025*3);function soe(t){return Math.max(0,Math.min(100,t))/100*ioe}function aoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};ooe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var VR=12;function F$(t,e,n,r=VR,o=false){return new Promise((i,s)=>{let a=bC(e),l=bC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=soe(r);aoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var mC=new Map,oVe=64;function B$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function BC(t){return mC.get(t)}function O$(t,e){if(mC.size>=oVe){let n=mC.keys().next().value;n!==void 0&&mC.delete(n);}mC.set(t,e);}function loe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function U$(t,e,n){return new Promise((r,o)=>{let i=bC(e),s=bC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);loe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var gC=new Map,iVe=64;function $$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function WR(t){return gC.get(t)}function H$(t,e){if(gC.size>=iVe){let n=gC.keys().next().value;n!==void 0&&gC.delete(n);}gC.set(t,e);}var z$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var coe=50,uoe=100,doe=500,LU=10;function FU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function poe(t,e,n){return Math.min(Math.max(t,e),n)}function foe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=0,d=0,p=null,f=0,h=0,m=()=>{p!==null&&(clearTimeout(p),p=null);},g=w=>{w.touches.length===2?(a=true,i=FU(w.touches[0],w.touches[1]),s=e(),m(),w.preventDefault()):w.touches.length===1&&(l=w.touches[0].clientX,c=w.touches[0].clientY,u=l,d=c,f=w.touches[0].clientX,h=w.touches[0].clientY,m(),p=setTimeout(()=>{p=null,o.onLongPress?.(f,h);},doe));},x=w=>{if(w.touches.length===2&&a){w.preventDefault();let C=FU(w.touches[0],w.touches[1]);if(i>0){let T=C/i,E=poe(s*T,n,r);o.onPinchZoom?.(E);}}else if(w.touches.length===1){u=w.touches[0].clientX,d=w.touches[0].clientY;let C=w.touches[0].clientX-f,T=w.touches[0].clientY-h;(Math.abs(C)>LU||Math.abs(T)>LU)&&m();}},v=w=>{if(a){a=false,i=0;return}if(m(),w.touches.length===0){let C=w.changedTouches.length>=1?w.changedTouches[0].clientX:u,T=w.changedTouches.length>=1?w.changedTouches[0].clientY:d,E=C-l,M=T-c;Math.abs(E)>=coe&&Math.abs(M)<uoe&&o.onSwipe?.(E>0?1:-1);}},S=()=>{a=false,i=0,m();};return {onTouchStart:g,onTouchMove:x,onTouchEnd:v,onTouchCancel:S,cancel:S}}var hoe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],G$="bar",uR={x:120,y:120,width:480,height:320},sVe=["Category 1","Category 2","Category 3"],aVe=[4,3,5];function moe(t=G$,e){return Jw(t,{categories:[...sVe],series:[{name:"Series 1",values:[...aVe]}],title:"Chart Title",hasLegend:true},{x:uR.x,y:uR.y,width:uR.width,height:uR.height})}function V$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];Gne(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),Gne(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=lVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=uVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function Gne(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function lVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=BU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=cVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function BU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...BU(t.slice(0,p),e-1),...BU(t.slice(p),e-1)]}function cVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function uVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},W$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var mb=4,dVe=.45,pVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function goe(t){return pVe[t]??{rows:3,columns:2}}function xoe(t,e){return t<=0?0:Math.ceil(t/e)}function yoe(t,e,n,r,o=eu){let i=goe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*dVe,d=(a-mb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+mb),width:u,height:d});}}else {let u=(s-mb*(i.columns-1))/i.columns,d=(a-mb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+mb),y:f*(d+mb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function XR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?W$:eu,i=xoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=yoe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function jR(t="portrait"){let e=t==="landscape"?W$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function YR(){return 8}var fVe=.48,hVe=6,Vne=16/9;function boe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*fVe,s=r,a=s/Vne;a>i&&(a=i,s=a*Vne);let l=(r-s)/2,c=(i-a)/2,u=i+hVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function KR(t){return t.map((e,n)=>boe(n,e))}function qR(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var Qg=612,sd=792,Rs=36,X$=2/3,r0=18,Vb=11,ZR=1.4,j$=.5,vC=9;function JR(t,e){let n=Qg-2*Rs,r=sd-2*Rs,o=r*X$,i=r-o-r0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-r0,f=Vb*ZR,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function QR(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ek(){let t=sd-2*Rs,e=vC+r0,n=t-e,r=Vb*ZR;return Math.floor(n/r)}function wb(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function gR(t,e){if(t.length===0)return "";let n=`BT /F1 ${Vb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${wb(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${wb(o)}) Tj `;}return n+=`ET
4679
4679
  `,n}var mVe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function Y$(t){return t.replace(/[&<>"']/gu,e=>mVe[e]||e)}function tk(t,e,n,r={}){let{title:o="Print",orientation:i="landscape",colorFilter:s=""}=r,a=t.map((l,c)=>`<section class="print-slide-page" aria-label="Slide ${c+1}">
4680
4680
  ${l}
4681
4681
  </section>`).join(`
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
package/dist/index.mjs CHANGED
@@ -4675,7 +4675,7 @@ ${o.join(`
4675
4675
  `),s=o.flat().find(d=>d.text.trim().length>0),a=s?.style?{...s.style}:r;function l(d,p){if(p.length===0)return d.length>0?[{text:d,style:{...a}}]:[{text:"",style:{...a}}];let f=p[0].bulletInfo;if(d.length===0){let v=[{text:"",style:{...p[0].style}}];return f&&(v[0].bulletInfo=f),v}if(p.reduce((x,v)=>x+v.text.length,0)===0){let x=[{text:d,style:{...p[0].style}}];return f&&(x[0].bulletInfo=f),x}let m=[],g=0;for(let x=0;x<p.length;x++){let v=p[x],S=x===p.length-1,w=v.text.length;if(g>=d.length)break;let C;if(S?C=d.slice(g):C=d.slice(g,g+w),C.length>0){let T={text:C,style:{...v.style}};m.length===0&&f&&(T.bulletInfo=f),m.push(T);}g+=S?C.length:w;}if(m.length===0){let x={text:d,style:{...p[0].style}};return f&&(x.bulletInfo=f),[x]}return m}let c=[],u=o[o.length-1];for(let d=0;d<i.length;d++){if(d>0){let h=o[d-1]??[],m=h[0]?.style?{...h[0].style}:{...a};c.push({text:`
4676
4676
  `,style:m,isParagraphBreak:true});}let p=o[d]??u??[],f=l(i[d],p);c.push(...f);}return c.length>0?c:[{text:"",style:{...a}}]}var lGe=12,cGe=0,$re=5e4,uGe=16667;function A$(t){return Math.max(cGe,Math.min($re,Math.round(t)))}function HR(t){let e=t.shapeAdjustments?.adj;return typeof e=="number"&&Number.isFinite(e)?A$(e):uGe}function kC(t){let e=HR(t)/$re;return Math.min(Math.max(t.width,1),Math.max(t.height,1))*.5*e}function IC(t){if(!vn(t)||String(t.shapeType||"").toLowerCase()!=="roundrect")return null;let n=HR(t),r=kC(t),o=Math.max(t.width,lGe),i=5;return {key:"adj",left:Math.max(i,Math.min(o-i,Math.round(r))),top:-8,value:n,cursor:"ew-resize"}}var dGe=new Set(["javascript:","data:","vbscript:","mhtml:","x-]javascript:"]);function s0(t){if(!t||typeof t!="string")return false;let e=t.trim();if(e.length===0)return false;let r=e.toLowerCase().replace(/[\s​]/gu,"").replace(/‌/gu,"").replace(/‍/gu,"").split("\0").join("");for(let o of dGe)if(r.startsWith(o))return false;return true}function Bh(t){return s0(t)?typeof window>"u"?false:(window.open(t,"_blank","noopener,noreferrer"),true):(typeof console<"u"&&console.warn(`[pptx-viewer] Blocked attempt to open unsafe URL: ${t.slice(0,100)}`),false)}function zR(t){return !t||typeof t!="string"?false:t.toLowerCase().startsWith("ppaction://")}function R$(t){if(!zR(t))return null;let e,n=t.indexOf("?");if(n>=0){let r=t.slice(n+1),o=new URLSearchParams(r),i=o.get("slideIndex");if(i!==null){let l=parseInt(i,10);Number.isFinite(l)&&(e=l);}o.delete("slideIndex");let s=o.toString();return {action:s?`${t.slice(0,n)}?${s}`:t.slice(0,n),targetSlideIndex:e}}return {action:t,targetSlideIndex:e}}var k$="pptx:slides";var pGe=new Set(["id","type","x","y","width","height","rotation","flipHorizontal","flipVertical","hidden","opacity","text","name","altText","shapeType","placeholder","imagePath","imageData","svgContent","inkSvg","sourceSlideId","mediaType","mediaPath","linkedTxbxId","linkedTxbxSeq","promptText"]),IU={textStyle:"_ts",shapeStyle:"_ss",shapeAdjustments:"_sa",adjustmentHandles:"_ah",tableData:"_td",chartData:"_cd",smartArtData:"_smad",connectionStart:"_cs",connectionEnd:"_ce",animations:"_an",nativeAnimations:"_na",children:"_ch",paragraphIndents:"_pi",rawXml:"_rx",actionClick:"_ac",actionHover:"_av",locks:"_lk",imageEffects:"_ie",cropShape:"_cr",mediaBookmarks:"_mb",captionTracks:"_ct"},Fne=Object.fromEntries(Object.entries(IU).map(([t,e])=>[e,t])),Hre=new Set(["id","rId","sourceSlideId","layoutPath","layoutName","slideNumber","hidden","sectionName","sectionId","backgroundColor","backgroundImage","backgroundGradient","notes","backgroundShowAnimation","showMasterShapes","isDirty"]),zre={transition:"_tr",animations:"_an",nativeAnimations:"_na",rawTiming:"_rt",notesSegments:"_ns",comments:"_cm",warnings:"_wa",rawXml:"_rx",clrMapOverride:"_cm2",guides:"_gu",customerData:"_cu",activeXControls:"_ax"},fGe=Object.fromEntries(Object.entries(zre).map(([t,e])=>[e,t]));function hGe(t){let e={},n=t.style;return n&&typeof n=="object"&&Object.keys(n).length>0&&(e.s=JSON.stringify(n)),t.isParagraphBreak&&(e.pb="1"),t.isLineBreak&&(e.lb="1"),t.bulletInfo&&(e.bi=JSON.stringify(t.bulletInfo)),t.paragraphLevel!==void 0&&(e.pl=String(t.paragraphLevel)),t.endParaRunProperties&&(e.pr=JSON.stringify(t.endParaRunProperties)),typeof t.fieldType=="string"&&(e.ft=t.fieldType),typeof t.fieldGuid=="string"&&(e.fg=t.fieldGuid),(t.fieldGuidAttr==="uuid"||t.fieldGuidAttr==="id")&&(e.fga=t.fieldGuidAttr),t.fieldParagraphPropertiesXml&&(e.fp=JSON.stringify(t.fieldParagraphPropertiesXml)),t.equationXml&&(e.eq=JSON.stringify(t.equationXml)),typeof t.equationNumber=="string"&&(e.en=t.equationNumber),t.breakRunProperties&&(e.br=JSON.stringify(t.breakRunProperties)),typeof t.rubyText=="string"&&(e.rt=t.rubyText),typeof t.rubyAlignment=="string"&&(e.ra=t.rubyAlignment),t.rubyFontSize!==void 0&&(e.rfs=String(t.rubyFontSize)),t.rubyStyle&&(e.rs=JSON.stringify(t.rubyStyle)),e}function mGe(t,e){let n=0;for(let r of t){let o=r,i=hGe(o),s=Object.keys(i).length>0;o.isParagraphBreak===true||o.isLineBreak===true?(e.insert(n,`
4677
4677
  `,s?i:void 0),n+=1):typeof o.text=="string"&&o.text.length>0?(e.insert(n,o.text,s?i:void 0),n+=o.text.length):(e.insert(n,"\u200B",s?i:void 0),n+=1);}}function gGe(t){let e=t.toDelta(),n=[];for(let r of e){if(typeof r.insert!="string"||r.insert==="")continue;let o=r.attributes??{},i={text:"",style:{}};if(o.s)try{i.style=JSON.parse(o.s);}catch{i.style={};}if(o.pb==="1"&&(i.isParagraphBreak=true),o.lb==="1"&&(i.isLineBreak=true),o.bi)try{i.bulletInfo=JSON.parse(o.bi);}catch{}if(o.pl!==void 0&&(i.paragraphLevel=Number(o.pl)),o.pr)try{i.endParaRunProperties=JSON.parse(o.pr);}catch{}if(o.ft&&(i.fieldType=o.ft),o.fg&&(i.fieldGuid=o.fg),(o.fga==="uuid"||o.fga==="id")&&(i.fieldGuidAttr=o.fga),o.fp)try{i.fieldParagraphPropertiesXml=JSON.parse(o.fp);}catch{}if(o.eq)try{i.equationXml=JSON.parse(o.eq);}catch{}if(o.en&&(i.equationNumber=o.en),o.br)try{i.breakRunProperties=JSON.parse(o.br);}catch{}if(o.rt&&(i.rubyText=o.rt),o.ra&&(i.rubyAlignment=o.ra),o.rfs!==void 0&&(i.rubyFontSize=Number(o.rfs)),o.rs)try{i.rubyStyle=JSON.parse(o.rs);}catch{}r.insert!==`
4678
- `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function xGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(pGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();mGe(i,s),e.set("textBody",s);}}else IU[o]&&e.set(IU[o],JSON.stringify(i));}function yGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function bGe(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")yGe(n)&&(e.textSegments=gGe(n));else if(Fne[r])try{e[Fne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function vGe(t,e,n){let r=t;for(let i of Hre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(zre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();xGe(i,s,n),o.push([s]);}e.set("elements",o);}function SGe(t){let e={};for(let o of Hre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(fGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(bGe(n.get(o)));return e.elements=r,e}function Gre(t,e,n,r){e.transact(()=>{let o=e.getArray(k$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();vGe(i,s,n),o.push([s]);}},r);}function I$(t){let e=t.getArray(k$),n=[];for(let r=0;r<e.length;r++)n.push(SGe(e.get(r)));return n}function Vre(t,e){let n=t.getArray(k$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Bne=2,One=2;function NU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function qg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=NU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function DU(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...DU(n.children));return e}function Une(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function wGe(t,e){let n=[],r=Une(DU(t)),o=Une(DU(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:qg(s),kind:"removed",description:`Element removed: ${qg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:qg(s),kind:"added",description:`Element added: ${qg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Bne||Math.abs(s.y-a.y)>Bne)&&n.push({elementId:i,label:qg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>One||Math.abs(s.height-a.height)>One)&&n.push({elementId:i,label:qg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=NU(s),c=NU(a);l!==c&&n.push({elementId:i,label:qg(s),kind:"textChanged",description:"Text content changed"});}return n}function CGe(t,e){let n=wGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function TGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=CGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function N$(t,e){return TGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function EGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function gb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+gb(n),0)}function Wre(t){return t.children.length===0?1:1+Math.max(...t.children.map(Wre))}function PGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var $ne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Hne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function AGe(t,e,n){if(n&&n in $ne)return $ne[n];if(e&&e in Hne){let o=Hne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function Xre(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function RGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function kGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function IGe(t,e,n,r,o){let i=EGe(t);if(i.length===0)return Xre(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+gb(E),0),c=Math.max(...i.map(Wre)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=gb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=gb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=gb(O);}let C=0;for(let T of i)w(T,C,0),C+=gb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function NGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function DGe(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function LGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function OGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function jre(t,e,n,r,o,i,s){let a=PGe(t);switch(AGe(t,i,s)){case "list":return Xre(a,e,n,r,o);case "process":return RGe(a,e,n,r,o);case "cycle":return kGe(a,e,n,r,o);case "hierarchy":return IGe(t,e,n,r,o);case "matrix":return NGe(a,e,n,r,o);case "radial":return DGe(a,e,n,r,o);case "pyramid":return LGe(a,e,n,r,o);case "venn":return FGe(a,e,n,r,o);case "funnel":return BGe(a,e,n,r,o);case "target":return OGe(a,e,n,r,o)}}function UGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function $Ge(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function HGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function zGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function GGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function VGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function WGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function XGe(t){let[e,n,r]=WGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function zne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function jGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=zne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>zne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function YGe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function KGe(t){switch(t.family){case "cycle":case "radial":return jGe(t);case "hierarchy":return YGe(t);default:return t}}var qGe=.35,ZGe=.2;function JGe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??qGe;return Math.max(2,t*n)}function QGe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=$Ge(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=HGe(t.r),a=true;else {let m=zGe(t.points);if(m.length<3)return null;let g=VGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=JGe(p,r),h=f*(r.bevelRatio??ZGe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:XGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function Yre(t,e={}){let{width:n,height:r}=UGe(t.viewBox),o=[];for(let a of t.nodes){let l=QGe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=GGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?KGe(s):s}var NC=95,DC=100;function GR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function LC(t,e,n=90){return e<=0?0:GR(t/e*n)}function Kre(t,e){return e<=0?45:GR(45+t/e*45)}function Gb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function FC(t){return t instanceof DOMException&&t.name==="AbortError"}var tVe=".pptx,.ppsx,.pptm,.potx";function nVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??tVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function qre(t={}){let e=await nVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function Zre(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function Jre(t){return t<=0}function Qre(t,e){return t>=e-1}function hC(t){return String(t).padStart(2,"0")}function eoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function toe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${hC(r)}:${hC(o)}:${hC(i)}`:`${hC(o)}:${hC(i)}`}var rVe=120;function D$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function noe(t,e=rVe){return t>=e}function L$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function roe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function bC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function ooe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var ioe=Math.sqrt(65025*3);function soe(t){return Math.max(0,Math.min(100,t))/100*ioe}function aoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};ooe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var VR=12;function F$(t,e,n,r=VR,o=false){return new Promise((i,s)=>{let a=bC(e),l=bC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=soe(r);aoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var mC=new Map,oVe=64;function B$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function BC(t){return mC.get(t)}function O$(t,e){if(mC.size>=oVe){let n=mC.keys().next().value;n!==void 0&&mC.delete(n);}mC.set(t,e);}function loe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function U$(t,e,n){return new Promise((r,o)=>{let i=bC(e),s=bC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);loe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var gC=new Map,iVe=64;function $$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function WR(t){return gC.get(t)}function H$(t,e){if(gC.size>=iVe){let n=gC.keys().next().value;n!==void 0&&gC.delete(n);}gC.set(t,e);}var z$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var coe=50,uoe=100,doe=500,LU=10;function FU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function poe(t,e,n){return Math.min(Math.max(t,e),n)}function foe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=null,d=0,p=0,f=()=>{u!==null&&(clearTimeout(u),u=null);},h=v=>{v.touches.length===2?(a=true,i=FU(v.touches[0],v.touches[1]),s=e(),f(),v.preventDefault()):v.touches.length===1&&(l=v.touches[0].clientX,c=v.touches[0].clientY,d=v.touches[0].clientX,p=v.touches[0].clientY,f(),u=setTimeout(()=>{u=null,o.onLongPress?.(d,p);},doe));},m=v=>{if(v.touches.length===2&&a){v.preventDefault();let S=FU(v.touches[0],v.touches[1]);if(i>0){let w=S/i,C=poe(s*w,n,r);o.onPinchZoom?.(C);}}else if(v.touches.length===1){let S=v.touches[0].clientX-d,w=v.touches[0].clientY-p;(Math.abs(S)>LU||Math.abs(w)>LU)&&f();}},g=v=>{if(a){a=false,i=0;return}if(f(),v.changedTouches.length===1&&v.touches.length===0){let S=v.changedTouches[0].clientX,w=v.changedTouches[0].clientY,C=S-l,T=w-c;Math.abs(C)>=coe&&Math.abs(T)<uoe&&o.onSwipe?.(C>0?1:-1);}},x=()=>{a=false,i=0,f();};return {onTouchStart:h,onTouchMove:m,onTouchEnd:g,onTouchCancel:x,cancel:x}}var hoe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],G$="bar",uR={x:120,y:120,width:480,height:320},sVe=["Category 1","Category 2","Category 3"],aVe=[4,3,5];function moe(t=G$,e){return Jw(t,{categories:[...sVe],series:[{name:"Series 1",values:[...aVe]}],title:"Chart Title",hasLegend:true},{x:uR.x,y:uR.y,width:uR.width,height:uR.height})}function V$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];Gne(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),Gne(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=lVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=uVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function Gne(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function lVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=BU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=cVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function BU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...BU(t.slice(0,p),e-1),...BU(t.slice(p),e-1)]}function cVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function uVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},W$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var mb=4,dVe=.45,pVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function goe(t){return pVe[t]??{rows:3,columns:2}}function xoe(t,e){return t<=0?0:Math.ceil(t/e)}function yoe(t,e,n,r,o=eu){let i=goe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*dVe,d=(a-mb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+mb),width:u,height:d});}}else {let u=(s-mb*(i.columns-1))/i.columns,d=(a-mb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+mb),y:f*(d+mb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function XR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?W$:eu,i=xoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=yoe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function jR(t="portrait"){let e=t==="landscape"?W$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function YR(){return 8}var fVe=.48,hVe=6,Vne=16/9;function boe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*fVe,s=r,a=s/Vne;a>i&&(a=i,s=a*Vne);let l=(r-s)/2,c=(i-a)/2,u=i+hVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function KR(t){return t.map((e,n)=>boe(n,e))}function qR(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var Qg=612,sd=792,Rs=36,X$=2/3,r0=18,Vb=11,ZR=1.4,j$=.5,vC=9;function JR(t,e){let n=Qg-2*Rs,r=sd-2*Rs,o=r*X$,i=r-o-r0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-r0,f=Vb*ZR,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function QR(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ek(){let t=sd-2*Rs,e=vC+r0,n=t-e,r=Vb*ZR;return Math.floor(n/r)}function wb(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function gR(t,e){if(t.length===0)return "";let n=`BT /F1 ${Vb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${wb(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${wb(o)}) Tj `;}return n+=`ET
4678
+ `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function xGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(pGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();mGe(i,s),e.set("textBody",s);}}else IU[o]&&e.set(IU[o],JSON.stringify(i));}function yGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function bGe(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")yGe(n)&&(e.textSegments=gGe(n));else if(Fne[r])try{e[Fne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function vGe(t,e,n){let r=t;for(let i of Hre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(zre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();xGe(i,s,n),o.push([s]);}e.set("elements",o);}function SGe(t){let e={};for(let o of Hre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(fGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(bGe(n.get(o)));return e.elements=r,e}function Gre(t,e,n,r){e.transact(()=>{let o=e.getArray(k$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();vGe(i,s,n),o.push([s]);}},r);}function I$(t){let e=t.getArray(k$),n=[];for(let r=0;r<e.length;r++)n.push(SGe(e.get(r)));return n}function Vre(t,e){let n=t.getArray(k$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Bne=2,One=2;function NU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function qg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=NU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function DU(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...DU(n.children));return e}function Une(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function wGe(t,e){let n=[],r=Une(DU(t)),o=Une(DU(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:qg(s),kind:"removed",description:`Element removed: ${qg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:qg(s),kind:"added",description:`Element added: ${qg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Bne||Math.abs(s.y-a.y)>Bne)&&n.push({elementId:i,label:qg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>One||Math.abs(s.height-a.height)>One)&&n.push({elementId:i,label:qg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=NU(s),c=NU(a);l!==c&&n.push({elementId:i,label:qg(s),kind:"textChanged",description:"Text content changed"});}return n}function CGe(t,e){let n=wGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function TGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=CGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function N$(t,e){return TGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function EGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function gb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+gb(n),0)}function Wre(t){return t.children.length===0?1:1+Math.max(...t.children.map(Wre))}function PGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var $ne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Hne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function AGe(t,e,n){if(n&&n in $ne)return $ne[n];if(e&&e in Hne){let o=Hne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function Xre(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function RGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function kGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function IGe(t,e,n,r,o){let i=EGe(t);if(i.length===0)return Xre(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+gb(E),0),c=Math.max(...i.map(Wre)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=gb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=gb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=gb(O);}let C=0;for(let T of i)w(T,C,0),C+=gb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function NGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function DGe(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function LGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function OGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function jre(t,e,n,r,o,i,s){let a=PGe(t);switch(AGe(t,i,s)){case "list":return Xre(a,e,n,r,o);case "process":return RGe(a,e,n,r,o);case "cycle":return kGe(a,e,n,r,o);case "hierarchy":return IGe(t,e,n,r,o);case "matrix":return NGe(a,e,n,r,o);case "radial":return DGe(a,e,n,r,o);case "pyramid":return LGe(a,e,n,r,o);case "venn":return FGe(a,e,n,r,o);case "funnel":return BGe(a,e,n,r,o);case "target":return OGe(a,e,n,r,o)}}function UGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function $Ge(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function HGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function zGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function GGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function VGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function WGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function XGe(t){let[e,n,r]=WGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function zne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function jGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=zne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>zne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function YGe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function KGe(t){switch(t.family){case "cycle":case "radial":return jGe(t);case "hierarchy":return YGe(t);default:return t}}var qGe=.35,ZGe=.2;function JGe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??qGe;return Math.max(2,t*n)}function QGe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=$Ge(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=HGe(t.r),a=true;else {let m=zGe(t.points);if(m.length<3)return null;let g=VGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=JGe(p,r),h=f*(r.bevelRatio??ZGe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:XGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function Yre(t,e={}){let{width:n,height:r}=UGe(t.viewBox),o=[];for(let a of t.nodes){let l=QGe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=GGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?KGe(s):s}var NC=95,DC=100;function GR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function LC(t,e,n=90){return e<=0?0:GR(t/e*n)}function Kre(t,e){return e<=0?45:GR(45+t/e*45)}function Gb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function FC(t){return t instanceof DOMException&&t.name==="AbortError"}var tVe=".pptx,.ppsx,.pptm,.potx";function nVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??tVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function qre(t={}){let e=await nVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function Zre(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function Jre(t){return t<=0}function Qre(t,e){return t>=e-1}function hC(t){return String(t).padStart(2,"0")}function eoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function toe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${hC(r)}:${hC(o)}:${hC(i)}`:`${hC(o)}:${hC(i)}`}var rVe=120;function D$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function noe(t,e=rVe){return t>=e}function L$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function roe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function bC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function ooe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var ioe=Math.sqrt(65025*3);function soe(t){return Math.max(0,Math.min(100,t))/100*ioe}function aoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};ooe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var VR=12;function F$(t,e,n,r=VR,o=false){return new Promise((i,s)=>{let a=bC(e),l=bC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=soe(r);aoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var mC=new Map,oVe=64;function B$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function BC(t){return mC.get(t)}function O$(t,e){if(mC.size>=oVe){let n=mC.keys().next().value;n!==void 0&&mC.delete(n);}mC.set(t,e);}function loe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function U$(t,e,n){return new Promise((r,o)=>{let i=bC(e),s=bC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);loe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var gC=new Map,iVe=64;function $$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function WR(t){return gC.get(t)}function H$(t,e){if(gC.size>=iVe){let n=gC.keys().next().value;n!==void 0&&gC.delete(n);}gC.set(t,e);}var z$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var coe=50,uoe=100,doe=500,LU=10;function FU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function poe(t,e,n){return Math.min(Math.max(t,e),n)}function foe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=0,d=0,p=null,f=0,h=0,m=()=>{p!==null&&(clearTimeout(p),p=null);},g=w=>{w.touches.length===2?(a=true,i=FU(w.touches[0],w.touches[1]),s=e(),m(),w.preventDefault()):w.touches.length===1&&(l=w.touches[0].clientX,c=w.touches[0].clientY,u=l,d=c,f=w.touches[0].clientX,h=w.touches[0].clientY,m(),p=setTimeout(()=>{p=null,o.onLongPress?.(f,h);},doe));},x=w=>{if(w.touches.length===2&&a){w.preventDefault();let C=FU(w.touches[0],w.touches[1]);if(i>0){let T=C/i,E=poe(s*T,n,r);o.onPinchZoom?.(E);}}else if(w.touches.length===1){u=w.touches[0].clientX,d=w.touches[0].clientY;let C=w.touches[0].clientX-f,T=w.touches[0].clientY-h;(Math.abs(C)>LU||Math.abs(T)>LU)&&m();}},v=w=>{if(a){a=false,i=0;return}if(m(),w.touches.length===0){let C=w.changedTouches.length>=1?w.changedTouches[0].clientX:u,T=w.changedTouches.length>=1?w.changedTouches[0].clientY:d,E=C-l,M=T-c;Math.abs(E)>=coe&&Math.abs(M)<uoe&&o.onSwipe?.(E>0?1:-1);}},S=()=>{a=false,i=0,m();};return {onTouchStart:g,onTouchMove:x,onTouchEnd:v,onTouchCancel:S,cancel:S}}var hoe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],G$="bar",uR={x:120,y:120,width:480,height:320},sVe=["Category 1","Category 2","Category 3"],aVe=[4,3,5];function moe(t=G$,e){return Jw(t,{categories:[...sVe],series:[{name:"Series 1",values:[...aVe]}],title:"Chart Title",hasLegend:true},{x:uR.x,y:uR.y,width:uR.width,height:uR.height})}function V$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];Gne(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),Gne(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=lVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=uVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function Gne(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function lVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=BU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=cVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function BU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...BU(t.slice(0,p),e-1),...BU(t.slice(p),e-1)]}function cVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function uVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},W$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var mb=4,dVe=.45,pVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function goe(t){return pVe[t]??{rows:3,columns:2}}function xoe(t,e){return t<=0?0:Math.ceil(t/e)}function yoe(t,e,n,r,o=eu){let i=goe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*dVe,d=(a-mb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+mb),width:u,height:d});}}else {let u=(s-mb*(i.columns-1))/i.columns,d=(a-mb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+mb),y:f*(d+mb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function XR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?W$:eu,i=xoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=yoe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function jR(t="portrait"){let e=t==="landscape"?W$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function YR(){return 8}var fVe=.48,hVe=6,Vne=16/9;function boe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*fVe,s=r,a=s/Vne;a>i&&(a=i,s=a*Vne);let l=(r-s)/2,c=(i-a)/2,u=i+hVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function KR(t){return t.map((e,n)=>boe(n,e))}function qR(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var Qg=612,sd=792,Rs=36,X$=2/3,r0=18,Vb=11,ZR=1.4,j$=.5,vC=9;function JR(t,e){let n=Qg-2*Rs,r=sd-2*Rs,o=r*X$,i=r-o-r0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-r0,f=Vb*ZR,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function QR(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ek(){let t=sd-2*Rs,e=vC+r0,n=t-e,r=Vb*ZR;return Math.floor(n/r)}function wb(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function gR(t,e){if(t.length===0)return "";let n=`BT /F1 ${Vb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${wb(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${wb(o)}) Tj `;}return n+=`ET
4679
4679
  `,n}var mVe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function Y$(t){return t.replace(/[&<>"']/gu,e=>mVe[e]||e)}function tk(t,e,n,r={}){let{title:o="Print",orientation:i="landscape",colorFilter:s=""}=r,a=t.map((l,c)=>`<section class="print-slide-page" aria-label="Slide ${c+1}">
4680
4680
  ${l}
4681
4681
  </section>`).join(`
package/dist/index.mjs.br CHANGED
Binary file
package/dist/index.mjs.gz CHANGED
Binary file
@@ -4675,7 +4675,7 @@ ${o.join(`
4675
4675
  `),s=o.flat().find(d=>d.text.trim().length>0),a=s?.style?{...s.style}:r;function l(d,p){if(p.length===0)return d.length>0?[{text:d,style:{...a}}]:[{text:"",style:{...a}}];let f=p[0].bulletInfo;if(d.length===0){let v=[{text:"",style:{...p[0].style}}];return f&&(v[0].bulletInfo=f),v}if(p.reduce((x,v)=>x+v.text.length,0)===0){let x=[{text:d,style:{...p[0].style}}];return f&&(x[0].bulletInfo=f),x}let m=[],g=0;for(let x=0;x<p.length;x++){let v=p[x],S=x===p.length-1,w=v.text.length;if(g>=d.length)break;let C;if(S?C=d.slice(g):C=d.slice(g,g+w),C.length>0){let T={text:C,style:{...v.style}};m.length===0&&f&&(T.bulletInfo=f),m.push(T);}g+=S?C.length:w;}if(m.length===0){let x={text:d,style:{...p[0].style}};return f&&(x.bulletInfo=f),[x]}return m}let c=[],u=o[o.length-1];for(let d=0;d<i.length;d++){if(d>0){let h=o[d-1]??[],m=h[0]?.style?{...h[0].style}:{...a};c.push({text:`
4676
4676
  `,style:m,isParagraphBreak:true});}let p=o[d]??u??[],f=l(i[d],p);c.push(...f);}return c.length>0?c:[{text:"",style:{...a}}]}var hGe=12,mGe=0,qre=5e4,gGe=16667;function F$(t){return Math.max(mGe,Math.min(qre,Math.round(t)))}function XR(t){let e=t.shapeAdjustments?.adj;return typeof e=="number"&&Number.isFinite(e)?F$(e):gGe}function RC(t){let e=XR(t)/qre;return Math.min(Math.max(t.width,1),Math.max(t.height,1))*.5*e}function kC(t){if(!vn(t)||String(t.shapeType||"").toLowerCase()!=="roundrect")return null;let n=XR(t),r=RC(t),o=Math.max(t.width,hGe),i=5;return {key:"adj",left:Math.max(i,Math.min(o-i,Math.round(r))),top:-8,value:n,cursor:"ew-resize"}}var xGe=new Set(["javascript:","data:","vbscript:","mhtml:","x-]javascript:"]);function a0(t){if(!t||typeof t!="string")return false;let e=t.trim();if(e.length===0)return false;let r=e.toLowerCase().replace(/[\s​]/gu,"").replace(/‌/gu,"").replace(/‍/gu,"").split("\0").join("");for(let o of xGe)if(r.startsWith(o))return false;return true}function Bh(t){return a0(t)?typeof window>"u"?false:(window.open(t,"_blank","noopener,noreferrer"),true):(typeof console<"u"&&console.warn(`[pptx-viewer] Blocked attempt to open unsafe URL: ${t.slice(0,100)}`),false)}function jR(t){return !t||typeof t!="string"?false:t.toLowerCase().startsWith("ppaction://")}function B$(t){if(!jR(t))return null;let e,n=t.indexOf("?");if(n>=0){let r=t.slice(n+1),o=new URLSearchParams(r),i=o.get("slideIndex");if(i!==null){let l=parseInt(i,10);Number.isFinite(l)&&(e=l);}o.delete("slideIndex");let s=o.toString();return {action:s?`${t.slice(0,n)}?${s}`:t.slice(0,n),targetSlideIndex:e}}return {action:t,targetSlideIndex:e}}var O$="pptx:slides";var yGe=new Set(["id","type","x","y","width","height","rotation","flipHorizontal","flipVertical","hidden","opacity","text","name","altText","shapeType","placeholder","imagePath","imageData","svgContent","inkSvg","sourceSlideId","mediaType","mediaPath","linkedTxbxId","linkedTxbxSeq","promptText"]),OU={textStyle:"_ts",shapeStyle:"_ss",shapeAdjustments:"_sa",adjustmentHandles:"_ah",tableData:"_td",chartData:"_cd",smartArtData:"_smad",connectionStart:"_cs",connectionEnd:"_ce",animations:"_an",nativeAnimations:"_na",children:"_ch",paragraphIndents:"_pi",rawXml:"_rx",actionClick:"_ac",actionHover:"_av",locks:"_lk",imageEffects:"_ie",cropShape:"_cr",mediaBookmarks:"_mb",captionTracks:"_ct"},jne=Object.fromEntries(Object.entries(OU).map(([t,e])=>[e,t])),Zre=new Set(["id","rId","sourceSlideId","layoutPath","layoutName","slideNumber","hidden","sectionName","sectionId","backgroundColor","backgroundImage","backgroundGradient","notes","backgroundShowAnimation","showMasterShapes","isDirty"]),Jre={transition:"_tr",animations:"_an",nativeAnimations:"_na",rawTiming:"_rt",notesSegments:"_ns",comments:"_cm",warnings:"_wa",rawXml:"_rx",clrMapOverride:"_cm2",guides:"_gu",customerData:"_cu",activeXControls:"_ax"},bGe=Object.fromEntries(Object.entries(Jre).map(([t,e])=>[e,t]));function vGe(t){let e={},n=t.style;return n&&typeof n=="object"&&Object.keys(n).length>0&&(e.s=JSON.stringify(n)),t.isParagraphBreak&&(e.pb="1"),t.isLineBreak&&(e.lb="1"),t.bulletInfo&&(e.bi=JSON.stringify(t.bulletInfo)),t.paragraphLevel!==void 0&&(e.pl=String(t.paragraphLevel)),t.endParaRunProperties&&(e.pr=JSON.stringify(t.endParaRunProperties)),typeof t.fieldType=="string"&&(e.ft=t.fieldType),typeof t.fieldGuid=="string"&&(e.fg=t.fieldGuid),(t.fieldGuidAttr==="uuid"||t.fieldGuidAttr==="id")&&(e.fga=t.fieldGuidAttr),t.fieldParagraphPropertiesXml&&(e.fp=JSON.stringify(t.fieldParagraphPropertiesXml)),t.equationXml&&(e.eq=JSON.stringify(t.equationXml)),typeof t.equationNumber=="string"&&(e.en=t.equationNumber),t.breakRunProperties&&(e.br=JSON.stringify(t.breakRunProperties)),typeof t.rubyText=="string"&&(e.rt=t.rubyText),typeof t.rubyAlignment=="string"&&(e.ra=t.rubyAlignment),t.rubyFontSize!==void 0&&(e.rfs=String(t.rubyFontSize)),t.rubyStyle&&(e.rs=JSON.stringify(t.rubyStyle)),e}function SGe(t,e){let n=0;for(let r of t){let o=r,i=vGe(o),s=Object.keys(i).length>0;o.isParagraphBreak===true||o.isLineBreak===true?(e.insert(n,`
4677
4677
  `,s?i:void 0),n+=1):typeof o.text=="string"&&o.text.length>0?(e.insert(n,o.text,s?i:void 0),n+=o.text.length):(e.insert(n,"\u200B",s?i:void 0),n+=1);}}function wGe(t){let e=t.toDelta(),n=[];for(let r of e){if(typeof r.insert!="string"||r.insert==="")continue;let o=r.attributes??{},i={text:"",style:{}};if(o.s)try{i.style=JSON.parse(o.s);}catch{i.style={};}if(o.pb==="1"&&(i.isParagraphBreak=true),o.lb==="1"&&(i.isLineBreak=true),o.bi)try{i.bulletInfo=JSON.parse(o.bi);}catch{}if(o.pl!==void 0&&(i.paragraphLevel=Number(o.pl)),o.pr)try{i.endParaRunProperties=JSON.parse(o.pr);}catch{}if(o.ft&&(i.fieldType=o.ft),o.fg&&(i.fieldGuid=o.fg),(o.fga==="uuid"||o.fga==="id")&&(i.fieldGuidAttr=o.fga),o.fp)try{i.fieldParagraphPropertiesXml=JSON.parse(o.fp);}catch{}if(o.eq)try{i.equationXml=JSON.parse(o.eq);}catch{}if(o.en&&(i.equationNumber=o.en),o.br)try{i.breakRunProperties=JSON.parse(o.br);}catch{}if(o.rt&&(i.rubyText=o.rt),o.ra&&(i.rubyAlignment=o.ra),o.rfs!==void 0&&(i.rubyFontSize=Number(o.rfs)),o.rs)try{i.rubyStyle=JSON.parse(o.rs);}catch{}r.insert!==`
4678
- `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function CGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(yGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();SGe(i,s),e.set("textBody",s);}}else OU[o]&&e.set(OU[o],JSON.stringify(i));}function TGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function _Ge(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")TGe(n)&&(e.textSegments=wGe(n));else if(jne[r])try{e[jne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function MGe(t,e,n){let r=t;for(let i of Zre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(Jre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();CGe(i,s,n),o.push([s]);}e.set("elements",o);}function EGe(t){let e={};for(let o of Zre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(bGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(_Ge(n.get(o)));return e.elements=r,e}function Qre(t,e,n,r){e.transact(()=>{let o=e.getArray(O$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();MGe(i,s,n),o.push([s]);}},r);}function U$(t){let e=t.getArray(O$),n=[];for(let r=0;r<e.length;r++)n.push(EGe(e.get(r)));return n}function eoe(t,e){let n=t.getArray(O$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Yne=2,Kne=2;function UU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function Zg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=UU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function $U(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...$U(n.children));return e}function qne(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function PGe(t,e){let n=[],r=qne($U(t)),o=qne($U(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:Zg(s),kind:"removed",description:`Element removed: ${Zg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:Zg(s),kind:"added",description:`Element added: ${Zg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Yne||Math.abs(s.y-a.y)>Yne)&&n.push({elementId:i,label:Zg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>Kne||Math.abs(s.height-a.height)>Kne)&&n.push({elementId:i,label:Zg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=UU(s),c=UU(a);l!==c&&n.push({elementId:i,label:Zg(s),kind:"textChanged",description:"Text content changed"});}return n}function AGe(t,e){let n=PGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function RGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=AGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function $$(t,e){return RGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function NGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function bb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+bb(n),0)}function toe(t){return t.children.length===0?1:1+Math.max(...t.children.map(toe))}function DGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var Zne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Jne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function LGe(t,e,n){if(n&&n in Zne)return Zne[n];if(e&&e in Jne){let o=Jne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function noe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function OGe(t,e,n,r,o){let i=NGe(t);if(i.length===0)return noe(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+bb(E),0),c=Math.max(...i.map(toe)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=bb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=bb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=bb(O);}let C=0;for(let T of i)w(T,C,0),C+=bb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function UGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function $Ge(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function HGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function zGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function GGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function VGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function roe(t,e,n,r,o,i,s){let a=DGe(t);switch(LGe(t,i,s)){case "list":return noe(a,e,n,r,o);case "process":return FGe(a,e,n,r,o);case "cycle":return BGe(a,e,n,r,o);case "hierarchy":return OGe(t,e,n,r,o);case "matrix":return UGe(a,e,n,r,o);case "radial":return $Ge(a,e,n,r,o);case "pyramid":return HGe(a,e,n,r,o);case "venn":return zGe(a,e,n,r,o);case "funnel":return GGe(a,e,n,r,o);case "target":return VGe(a,e,n,r,o)}}function WGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function XGe(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function jGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function YGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function KGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function qGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function ZGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function JGe(t){let[e,n,r]=ZGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function Qne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function QGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=Qne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>Qne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function eVe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function tVe(t){switch(t.family){case "cycle":case "radial":return QGe(t);case "hierarchy":return eVe(t);default:return t}}var nVe=.35,rVe=.2;function oVe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??nVe;return Math.max(2,t*n)}function iVe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=XGe(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=jGe(t.r),a=true;else {let m=YGe(t.points);if(m.length<3)return null;let g=qGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=oVe(p,r),h=f*(r.bevelRatio??rVe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:JGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function ooe(t,e={}){let{width:n,height:r}=WGe(t.viewBox),o=[];for(let a of t.nodes){let l=iVe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=KGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?tVe(s):s}var IC=95,NC=100;function YR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function DC(t,e,n=90){return e<=0?0:YR(t/e*n)}function ioe(t,e){return e<=0?45:YR(45+t/e*45)}function Xb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function LC(t){return t instanceof DOMException&&t.name==="AbortError"}var aVe=".pptx,.ppsx,.pptm,.potx";function lVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??aVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function soe(t={}){let e=await lVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function aoe(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function loe(t){return t<=0}function coe(t,e){return t>=e-1}function gC(t){return String(t).padStart(2,"0")}function uoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function doe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${gC(r)}:${gC(o)}:${gC(i)}`:`${gC(o)}:${gC(i)}`}var cVe=120;function H$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function poe(t,e=cVe){return t>=e}function z$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function foe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function SC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function hoe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var moe=Math.sqrt(65025*3);function goe(t){return Math.max(0,Math.min(100,t))/100*moe}function xoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};hoe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var KR=12;function G$(t,e,n,r=KR,o=false){return new Promise((i,s)=>{let a=SC(e),l=SC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=goe(r);xoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var xC=new Map,uVe=64;function V$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function FC(t){return xC.get(t)}function W$(t,e){if(xC.size>=uVe){let n=xC.keys().next().value;n!==void 0&&xC.delete(n);}xC.set(t,e);}function yoe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function X$(t,e,n){return new Promise((r,o)=>{let i=SC(e),s=SC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);yoe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var yC=new Map,dVe=64;function j$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function qR(t){return yC.get(t)}function Y$(t,e){if(yC.size>=dVe){let n=yC.keys().next().value;n!==void 0&&yC.delete(n);}yC.set(t,e);}var K$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var boe=50,voe=100,Soe=500,HU=10;function zU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function woe(t,e,n){return Math.min(Math.max(t,e),n)}function Coe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=null,d=0,p=0,f=()=>{u!==null&&(clearTimeout(u),u=null);},h=v=>{v.touches.length===2?(a=true,i=zU(v.touches[0],v.touches[1]),s=e(),f(),v.preventDefault()):v.touches.length===1&&(l=v.touches[0].clientX,c=v.touches[0].clientY,d=v.touches[0].clientX,p=v.touches[0].clientY,f(),u=setTimeout(()=>{u=null,o.onLongPress?.(d,p);},Soe));},m=v=>{if(v.touches.length===2&&a){v.preventDefault();let S=zU(v.touches[0],v.touches[1]);if(i>0){let w=S/i,C=woe(s*w,n,r);o.onPinchZoom?.(C);}}else if(v.touches.length===1){let S=v.touches[0].clientX-d,w=v.touches[0].clientY-p;(Math.abs(S)>HU||Math.abs(w)>HU)&&f();}},g=v=>{if(a){a=false,i=0;return}if(f(),v.changedTouches.length===1&&v.touches.length===0){let S=v.changedTouches[0].clientX,w=v.changedTouches[0].clientY,C=S-l,T=w-c;Math.abs(C)>=boe&&Math.abs(T)<voe&&o.onSwipe?.(C>0?1:-1);}},x=()=>{a=false,i=0,f();};return {onTouchStart:h,onTouchMove:m,onTouchEnd:g,onTouchCancel:x,cancel:x}}var Toe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],q$="bar",hR={x:120,y:120,width:480,height:320},pVe=["Category 1","Category 2","Category 3"],fVe=[4,3,5];function _oe(t=q$,e){return Qw(t,{categories:[...pVe],series:[{name:"Series 1",values:[...fVe]}],title:"Chart Title",hasLegend:true},{x:hR.x,y:hR.y,width:hR.width,height:hR.height})}function Z$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];ere(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),ere(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=hVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=gVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function ere(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function hVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=GU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=mVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function GU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...GU(t.slice(0,p),e-1),...GU(t.slice(p),e-1)]}function mVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function gVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},J$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var yb=4,xVe=.45,yVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function Moe(t){return yVe[t]??{rows:3,columns:2}}function Eoe(t,e){return t<=0?0:Math.ceil(t/e)}function Poe(t,e,n,r,o=eu){let i=Moe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*xVe,d=(a-yb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+yb),width:u,height:d});}}else {let u=(s-yb*(i.columns-1))/i.columns,d=(a-yb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+yb),y:f*(d+yb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function ZR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?J$:eu,i=Eoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=Poe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function JR(t="portrait"){let e=t==="landscape"?J$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function QR(){return 8}var bVe=.48,vVe=6,tre=16/9;function Aoe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*bVe,s=r,a=s/tre;a>i&&(a=i,s=a*tre);let l=(r-s)/2,c=(i-a)/2,u=i+vVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function ek(t){return t.map((e,n)=>Aoe(n,e))}function tk(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var e0=612,sd=792,Rs=36,Q$=2/3,o0=18,jb=11,nk=1.4,e6=.5,wC=9;function rk(t,e){let n=e0-2*Rs,r=sd-2*Rs,o=r*Q$,i=r-o-o0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-o0,f=jb*nk,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function ok(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ik(){let t=sd-2*Rs,e=wC+o0,n=t-e,r=jb*nk;return Math.floor(n/r)}function _b(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function vR(t,e){if(t.length===0)return "";let n=`BT /F1 ${jb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${_b(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${_b(o)}) Tj `;}return n+=`ET
4678
+ `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function CGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(yGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();SGe(i,s),e.set("textBody",s);}}else OU[o]&&e.set(OU[o],JSON.stringify(i));}function TGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function _Ge(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")TGe(n)&&(e.textSegments=wGe(n));else if(jne[r])try{e[jne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function MGe(t,e,n){let r=t;for(let i of Zre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(Jre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();CGe(i,s,n),o.push([s]);}e.set("elements",o);}function EGe(t){let e={};for(let o of Zre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(bGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(_Ge(n.get(o)));return e.elements=r,e}function Qre(t,e,n,r){e.transact(()=>{let o=e.getArray(O$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();MGe(i,s,n),o.push([s]);}},r);}function U$(t){let e=t.getArray(O$),n=[];for(let r=0;r<e.length;r++)n.push(EGe(e.get(r)));return n}function eoe(t,e){let n=t.getArray(O$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Yne=2,Kne=2;function UU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function Zg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=UU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function $U(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...$U(n.children));return e}function qne(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function PGe(t,e){let n=[],r=qne($U(t)),o=qne($U(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:Zg(s),kind:"removed",description:`Element removed: ${Zg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:Zg(s),kind:"added",description:`Element added: ${Zg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Yne||Math.abs(s.y-a.y)>Yne)&&n.push({elementId:i,label:Zg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>Kne||Math.abs(s.height-a.height)>Kne)&&n.push({elementId:i,label:Zg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=UU(s),c=UU(a);l!==c&&n.push({elementId:i,label:Zg(s),kind:"textChanged",description:"Text content changed"});}return n}function AGe(t,e){let n=PGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function RGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=AGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function $$(t,e){return RGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function NGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function bb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+bb(n),0)}function toe(t){return t.children.length===0?1:1+Math.max(...t.children.map(toe))}function DGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var Zne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Jne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function LGe(t,e,n){if(n&&n in Zne)return Zne[n];if(e&&e in Jne){let o=Jne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function noe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function OGe(t,e,n,r,o){let i=NGe(t);if(i.length===0)return noe(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+bb(E),0),c=Math.max(...i.map(toe)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=bb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=bb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=bb(O);}let C=0;for(let T of i)w(T,C,0),C+=bb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function UGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function $Ge(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function HGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function zGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function GGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function VGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function roe(t,e,n,r,o,i,s){let a=DGe(t);switch(LGe(t,i,s)){case "list":return noe(a,e,n,r,o);case "process":return FGe(a,e,n,r,o);case "cycle":return BGe(a,e,n,r,o);case "hierarchy":return OGe(t,e,n,r,o);case "matrix":return UGe(a,e,n,r,o);case "radial":return $Ge(a,e,n,r,o);case "pyramid":return HGe(a,e,n,r,o);case "venn":return zGe(a,e,n,r,o);case "funnel":return GGe(a,e,n,r,o);case "target":return VGe(a,e,n,r,o)}}function WGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function XGe(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function jGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function YGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function KGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function qGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function ZGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function JGe(t){let[e,n,r]=ZGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function Qne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function QGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=Qne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>Qne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function eVe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function tVe(t){switch(t.family){case "cycle":case "radial":return QGe(t);case "hierarchy":return eVe(t);default:return t}}var nVe=.35,rVe=.2;function oVe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??nVe;return Math.max(2,t*n)}function iVe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=XGe(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=jGe(t.r),a=true;else {let m=YGe(t.points);if(m.length<3)return null;let g=qGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=oVe(p,r),h=f*(r.bevelRatio??rVe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:JGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function ooe(t,e={}){let{width:n,height:r}=WGe(t.viewBox),o=[];for(let a of t.nodes){let l=iVe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=KGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?tVe(s):s}var IC=95,NC=100;function YR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function DC(t,e,n=90){return e<=0?0:YR(t/e*n)}function ioe(t,e){return e<=0?45:YR(45+t/e*45)}function Xb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function LC(t){return t instanceof DOMException&&t.name==="AbortError"}var aVe=".pptx,.ppsx,.pptm,.potx";function lVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??aVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function soe(t={}){let e=await lVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function aoe(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function loe(t){return t<=0}function coe(t,e){return t>=e-1}function gC(t){return String(t).padStart(2,"0")}function uoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function doe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${gC(r)}:${gC(o)}:${gC(i)}`:`${gC(o)}:${gC(i)}`}var cVe=120;function H$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function poe(t,e=cVe){return t>=e}function z$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function foe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function SC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function hoe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var moe=Math.sqrt(65025*3);function goe(t){return Math.max(0,Math.min(100,t))/100*moe}function xoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};hoe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var KR=12;function G$(t,e,n,r=KR,o=false){return new Promise((i,s)=>{let a=SC(e),l=SC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=goe(r);xoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var xC=new Map,uVe=64;function V$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function FC(t){return xC.get(t)}function W$(t,e){if(xC.size>=uVe){let n=xC.keys().next().value;n!==void 0&&xC.delete(n);}xC.set(t,e);}function yoe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function X$(t,e,n){return new Promise((r,o)=>{let i=SC(e),s=SC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);yoe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var yC=new Map,dVe=64;function j$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function qR(t){return yC.get(t)}function Y$(t,e){if(yC.size>=dVe){let n=yC.keys().next().value;n!==void 0&&yC.delete(n);}yC.set(t,e);}var K$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var boe=50,voe=100,Soe=500,HU=10;function zU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function woe(t,e,n){return Math.min(Math.max(t,e),n)}function Coe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=0,d=0,p=null,f=0,h=0,m=()=>{p!==null&&(clearTimeout(p),p=null);},g=w=>{w.touches.length===2?(a=true,i=zU(w.touches[0],w.touches[1]),s=e(),m(),w.preventDefault()):w.touches.length===1&&(l=w.touches[0].clientX,c=w.touches[0].clientY,u=l,d=c,f=w.touches[0].clientX,h=w.touches[0].clientY,m(),p=setTimeout(()=>{p=null,o.onLongPress?.(f,h);},Soe));},x=w=>{if(w.touches.length===2&&a){w.preventDefault();let C=zU(w.touches[0],w.touches[1]);if(i>0){let T=C/i,E=woe(s*T,n,r);o.onPinchZoom?.(E);}}else if(w.touches.length===1){u=w.touches[0].clientX,d=w.touches[0].clientY;let C=w.touches[0].clientX-f,T=w.touches[0].clientY-h;(Math.abs(C)>HU||Math.abs(T)>HU)&&m();}},v=w=>{if(a){a=false,i=0;return}if(m(),w.touches.length===0){let C=w.changedTouches.length>=1?w.changedTouches[0].clientX:u,T=w.changedTouches.length>=1?w.changedTouches[0].clientY:d,E=C-l,M=T-c;Math.abs(E)>=boe&&Math.abs(M)<voe&&o.onSwipe?.(E>0?1:-1);}},S=()=>{a=false,i=0,m();};return {onTouchStart:g,onTouchMove:x,onTouchEnd:v,onTouchCancel:S,cancel:S}}var Toe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],q$="bar",hR={x:120,y:120,width:480,height:320},pVe=["Category 1","Category 2","Category 3"],fVe=[4,3,5];function _oe(t=q$,e){return Qw(t,{categories:[...pVe],series:[{name:"Series 1",values:[...fVe]}],title:"Chart Title",hasLegend:true},{x:hR.x,y:hR.y,width:hR.width,height:hR.height})}function Z$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];ere(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),ere(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=hVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=gVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function ere(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function hVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=GU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=mVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function GU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...GU(t.slice(0,p),e-1),...GU(t.slice(p),e-1)]}function mVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function gVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},J$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var yb=4,xVe=.45,yVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function Moe(t){return yVe[t]??{rows:3,columns:2}}function Eoe(t,e){return t<=0?0:Math.ceil(t/e)}function Poe(t,e,n,r,o=eu){let i=Moe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*xVe,d=(a-yb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+yb),width:u,height:d});}}else {let u=(s-yb*(i.columns-1))/i.columns,d=(a-yb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+yb),y:f*(d+yb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function ZR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?J$:eu,i=Eoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=Poe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function JR(t="portrait"){let e=t==="landscape"?J$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function QR(){return 8}var bVe=.48,vVe=6,tre=16/9;function Aoe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*bVe,s=r,a=s/tre;a>i&&(a=i,s=a*tre);let l=(r-s)/2,c=(i-a)/2,u=i+vVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function ek(t){return t.map((e,n)=>Aoe(n,e))}function tk(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var e0=612,sd=792,Rs=36,Q$=2/3,o0=18,jb=11,nk=1.4,e6=.5,wC=9;function rk(t,e){let n=e0-2*Rs,r=sd-2*Rs,o=r*Q$,i=r-o-o0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-o0,f=jb*nk,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function ok(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ik(){let t=sd-2*Rs,e=wC+o0,n=t-e,r=jb*nk;return Math.floor(n/r)}function _b(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function vR(t,e){if(t.length===0)return "";let n=`BT /F1 ${jb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${_b(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${_b(o)}) Tj `;}return n+=`ET
4679
4679
  `,n}var SVe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function t6(t){return t.replace(/[&<>"']/gu,e=>SVe[e]||e)}function sk(t,e,n,r={}){let{title:o="Print",orientation:i="landscape",colorFilter:s=""}=r,a=t.map((l,c)=>`<section class="print-slide-page" aria-label="Slide ${c+1}">
4680
4680
  ${l}
4681
4681
  </section>`).join(`
Binary file
Binary file
@@ -4675,7 +4675,7 @@ ${o.join(`
4675
4675
  `),s=o.flat().find(d=>d.text.trim().length>0),a=s?.style?{...s.style}:r;function l(d,p){if(p.length===0)return d.length>0?[{text:d,style:{...a}}]:[{text:"",style:{...a}}];let f=p[0].bulletInfo;if(d.length===0){let v=[{text:"",style:{...p[0].style}}];return f&&(v[0].bulletInfo=f),v}if(p.reduce((x,v)=>x+v.text.length,0)===0){let x=[{text:d,style:{...p[0].style}}];return f&&(x[0].bulletInfo=f),x}let m=[],g=0;for(let x=0;x<p.length;x++){let v=p[x],S=x===p.length-1,w=v.text.length;if(g>=d.length)break;let C;if(S?C=d.slice(g):C=d.slice(g,g+w),C.length>0){let T={text:C,style:{...v.style}};m.length===0&&f&&(T.bulletInfo=f),m.push(T);}g+=S?C.length:w;}if(m.length===0){let x={text:d,style:{...p[0].style}};return f&&(x.bulletInfo=f),[x]}return m}let c=[],u=o[o.length-1];for(let d=0;d<i.length;d++){if(d>0){let h=o[d-1]??[],m=h[0]?.style?{...h[0].style}:{...a};c.push({text:`
4676
4676
  `,style:m,isParagraphBreak:true});}let p=o[d]??u??[],f=l(i[d],p);c.push(...f);}return c.length>0?c:[{text:"",style:{...a}}]}var hGe=12,mGe=0,qre=5e4,gGe=16667;function F$(t){return Math.max(mGe,Math.min(qre,Math.round(t)))}function XR(t){let e=t.shapeAdjustments?.adj;return typeof e=="number"&&Number.isFinite(e)?F$(e):gGe}function RC(t){let e=XR(t)/qre;return Math.min(Math.max(t.width,1),Math.max(t.height,1))*.5*e}function kC(t){if(!vn(t)||String(t.shapeType||"").toLowerCase()!=="roundrect")return null;let n=XR(t),r=RC(t),o=Math.max(t.width,hGe),i=5;return {key:"adj",left:Math.max(i,Math.min(o-i,Math.round(r))),top:-8,value:n,cursor:"ew-resize"}}var xGe=new Set(["javascript:","data:","vbscript:","mhtml:","x-]javascript:"]);function a0(t){if(!t||typeof t!="string")return false;let e=t.trim();if(e.length===0)return false;let r=e.toLowerCase().replace(/[\s​]/gu,"").replace(/‌/gu,"").replace(/‍/gu,"").split("\0").join("");for(let o of xGe)if(r.startsWith(o))return false;return true}function Bh(t){return a0(t)?typeof window>"u"?false:(window.open(t,"_blank","noopener,noreferrer"),true):(typeof console<"u"&&console.warn(`[pptx-viewer] Blocked attempt to open unsafe URL: ${t.slice(0,100)}`),false)}function jR(t){return !t||typeof t!="string"?false:t.toLowerCase().startsWith("ppaction://")}function B$(t){if(!jR(t))return null;let e,n=t.indexOf("?");if(n>=0){let r=t.slice(n+1),o=new URLSearchParams(r),i=o.get("slideIndex");if(i!==null){let l=parseInt(i,10);Number.isFinite(l)&&(e=l);}o.delete("slideIndex");let s=o.toString();return {action:s?`${t.slice(0,n)}?${s}`:t.slice(0,n),targetSlideIndex:e}}return {action:t,targetSlideIndex:e}}var O$="pptx:slides";var yGe=new Set(["id","type","x","y","width","height","rotation","flipHorizontal","flipVertical","hidden","opacity","text","name","altText","shapeType","placeholder","imagePath","imageData","svgContent","inkSvg","sourceSlideId","mediaType","mediaPath","linkedTxbxId","linkedTxbxSeq","promptText"]),OU={textStyle:"_ts",shapeStyle:"_ss",shapeAdjustments:"_sa",adjustmentHandles:"_ah",tableData:"_td",chartData:"_cd",smartArtData:"_smad",connectionStart:"_cs",connectionEnd:"_ce",animations:"_an",nativeAnimations:"_na",children:"_ch",paragraphIndents:"_pi",rawXml:"_rx",actionClick:"_ac",actionHover:"_av",locks:"_lk",imageEffects:"_ie",cropShape:"_cr",mediaBookmarks:"_mb",captionTracks:"_ct"},jne=Object.fromEntries(Object.entries(OU).map(([t,e])=>[e,t])),Zre=new Set(["id","rId","sourceSlideId","layoutPath","layoutName","slideNumber","hidden","sectionName","sectionId","backgroundColor","backgroundImage","backgroundGradient","notes","backgroundShowAnimation","showMasterShapes","isDirty"]),Jre={transition:"_tr",animations:"_an",nativeAnimations:"_na",rawTiming:"_rt",notesSegments:"_ns",comments:"_cm",warnings:"_wa",rawXml:"_rx",clrMapOverride:"_cm2",guides:"_gu",customerData:"_cu",activeXControls:"_ax"},bGe=Object.fromEntries(Object.entries(Jre).map(([t,e])=>[e,t]));function vGe(t){let e={},n=t.style;return n&&typeof n=="object"&&Object.keys(n).length>0&&(e.s=JSON.stringify(n)),t.isParagraphBreak&&(e.pb="1"),t.isLineBreak&&(e.lb="1"),t.bulletInfo&&(e.bi=JSON.stringify(t.bulletInfo)),t.paragraphLevel!==void 0&&(e.pl=String(t.paragraphLevel)),t.endParaRunProperties&&(e.pr=JSON.stringify(t.endParaRunProperties)),typeof t.fieldType=="string"&&(e.ft=t.fieldType),typeof t.fieldGuid=="string"&&(e.fg=t.fieldGuid),(t.fieldGuidAttr==="uuid"||t.fieldGuidAttr==="id")&&(e.fga=t.fieldGuidAttr),t.fieldParagraphPropertiesXml&&(e.fp=JSON.stringify(t.fieldParagraphPropertiesXml)),t.equationXml&&(e.eq=JSON.stringify(t.equationXml)),typeof t.equationNumber=="string"&&(e.en=t.equationNumber),t.breakRunProperties&&(e.br=JSON.stringify(t.breakRunProperties)),typeof t.rubyText=="string"&&(e.rt=t.rubyText),typeof t.rubyAlignment=="string"&&(e.ra=t.rubyAlignment),t.rubyFontSize!==void 0&&(e.rfs=String(t.rubyFontSize)),t.rubyStyle&&(e.rs=JSON.stringify(t.rubyStyle)),e}function SGe(t,e){let n=0;for(let r of t){let o=r,i=vGe(o),s=Object.keys(i).length>0;o.isParagraphBreak===true||o.isLineBreak===true?(e.insert(n,`
4677
4677
  `,s?i:void 0),n+=1):typeof o.text=="string"&&o.text.length>0?(e.insert(n,o.text,s?i:void 0),n+=o.text.length):(e.insert(n,"\u200B",s?i:void 0),n+=1);}}function wGe(t){let e=t.toDelta(),n=[];for(let r of e){if(typeof r.insert!="string"||r.insert==="")continue;let o=r.attributes??{},i={text:"",style:{}};if(o.s)try{i.style=JSON.parse(o.s);}catch{i.style={};}if(o.pb==="1"&&(i.isParagraphBreak=true),o.lb==="1"&&(i.isLineBreak=true),o.bi)try{i.bulletInfo=JSON.parse(o.bi);}catch{}if(o.pl!==void 0&&(i.paragraphLevel=Number(o.pl)),o.pr)try{i.endParaRunProperties=JSON.parse(o.pr);}catch{}if(o.ft&&(i.fieldType=o.ft),o.fg&&(i.fieldGuid=o.fg),(o.fga==="uuid"||o.fga==="id")&&(i.fieldGuidAttr=o.fga),o.fp)try{i.fieldParagraphPropertiesXml=JSON.parse(o.fp);}catch{}if(o.eq)try{i.equationXml=JSON.parse(o.eq);}catch{}if(o.en&&(i.equationNumber=o.en),o.br)try{i.breakRunProperties=JSON.parse(o.br);}catch{}if(o.rt&&(i.rubyText=o.rt),o.ra&&(i.rubyAlignment=o.ra),o.rfs!==void 0&&(i.rubyFontSize=Number(o.rfs)),o.rs)try{i.rubyStyle=JSON.parse(o.rs);}catch{}r.insert!==`
4678
- `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function CGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(yGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();SGe(i,s),e.set("textBody",s);}}else OU[o]&&e.set(OU[o],JSON.stringify(i));}function TGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function _Ge(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")TGe(n)&&(e.textSegments=wGe(n));else if(jne[r])try{e[jne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function MGe(t,e,n){let r=t;for(let i of Zre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(Jre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();CGe(i,s,n),o.push([s]);}e.set("elements",o);}function EGe(t){let e={};for(let o of Zre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(bGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(_Ge(n.get(o)));return e.elements=r,e}function Qre(t,e,n,r){e.transact(()=>{let o=e.getArray(O$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();MGe(i,s,n),o.push([s]);}},r);}function U$(t){let e=t.getArray(O$),n=[];for(let r=0;r<e.length;r++)n.push(EGe(e.get(r)));return n}function eoe(t,e){let n=t.getArray(O$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Yne=2,Kne=2;function UU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function Zg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=UU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function $U(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...$U(n.children));return e}function qne(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function PGe(t,e){let n=[],r=qne($U(t)),o=qne($U(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:Zg(s),kind:"removed",description:`Element removed: ${Zg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:Zg(s),kind:"added",description:`Element added: ${Zg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Yne||Math.abs(s.y-a.y)>Yne)&&n.push({elementId:i,label:Zg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>Kne||Math.abs(s.height-a.height)>Kne)&&n.push({elementId:i,label:Zg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=UU(s),c=UU(a);l!==c&&n.push({elementId:i,label:Zg(s),kind:"textChanged",description:"Text content changed"});}return n}function AGe(t,e){let n=PGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function RGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=AGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function $$(t,e){return RGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function NGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function bb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+bb(n),0)}function toe(t){return t.children.length===0?1:1+Math.max(...t.children.map(toe))}function DGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var Zne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Jne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function LGe(t,e,n){if(n&&n in Zne)return Zne[n];if(e&&e in Jne){let o=Jne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function noe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function OGe(t,e,n,r,o){let i=NGe(t);if(i.length===0)return noe(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+bb(E),0),c=Math.max(...i.map(toe)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=bb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=bb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=bb(O);}let C=0;for(let T of i)w(T,C,0),C+=bb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function UGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function $Ge(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function HGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function zGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function GGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function VGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function roe(t,e,n,r,o,i,s){let a=DGe(t);switch(LGe(t,i,s)){case "list":return noe(a,e,n,r,o);case "process":return FGe(a,e,n,r,o);case "cycle":return BGe(a,e,n,r,o);case "hierarchy":return OGe(t,e,n,r,o);case "matrix":return UGe(a,e,n,r,o);case "radial":return $Ge(a,e,n,r,o);case "pyramid":return HGe(a,e,n,r,o);case "venn":return zGe(a,e,n,r,o);case "funnel":return GGe(a,e,n,r,o);case "target":return VGe(a,e,n,r,o)}}function WGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function XGe(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function jGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function YGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function KGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function qGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function ZGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function JGe(t){let[e,n,r]=ZGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function Qne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function QGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=Qne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>Qne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function eVe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function tVe(t){switch(t.family){case "cycle":case "radial":return QGe(t);case "hierarchy":return eVe(t);default:return t}}var nVe=.35,rVe=.2;function oVe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??nVe;return Math.max(2,t*n)}function iVe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=XGe(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=jGe(t.r),a=true;else {let m=YGe(t.points);if(m.length<3)return null;let g=qGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=oVe(p,r),h=f*(r.bevelRatio??rVe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:JGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function ooe(t,e={}){let{width:n,height:r}=WGe(t.viewBox),o=[];for(let a of t.nodes){let l=iVe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=KGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?tVe(s):s}var IC=95,NC=100;function YR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function DC(t,e,n=90){return e<=0?0:YR(t/e*n)}function ioe(t,e){return e<=0?45:YR(45+t/e*45)}function Xb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function LC(t){return t instanceof DOMException&&t.name==="AbortError"}var aVe=".pptx,.ppsx,.pptm,.potx";function lVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??aVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function soe(t={}){let e=await lVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function aoe(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function loe(t){return t<=0}function coe(t,e){return t>=e-1}function gC(t){return String(t).padStart(2,"0")}function uoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function doe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${gC(r)}:${gC(o)}:${gC(i)}`:`${gC(o)}:${gC(i)}`}var cVe=120;function H$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function poe(t,e=cVe){return t>=e}function z$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function foe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function SC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function hoe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var moe=Math.sqrt(65025*3);function goe(t){return Math.max(0,Math.min(100,t))/100*moe}function xoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};hoe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var KR=12;function G$(t,e,n,r=KR,o=false){return new Promise((i,s)=>{let a=SC(e),l=SC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=goe(r);xoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var xC=new Map,uVe=64;function V$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function FC(t){return xC.get(t)}function W$(t,e){if(xC.size>=uVe){let n=xC.keys().next().value;n!==void 0&&xC.delete(n);}xC.set(t,e);}function yoe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function X$(t,e,n){return new Promise((r,o)=>{let i=SC(e),s=SC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);yoe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var yC=new Map,dVe=64;function j$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function qR(t){return yC.get(t)}function Y$(t,e){if(yC.size>=dVe){let n=yC.keys().next().value;n!==void 0&&yC.delete(n);}yC.set(t,e);}var K$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var boe=50,voe=100,Soe=500,HU=10;function zU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function woe(t,e,n){return Math.min(Math.max(t,e),n)}function Coe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=null,d=0,p=0,f=()=>{u!==null&&(clearTimeout(u),u=null);},h=v=>{v.touches.length===2?(a=true,i=zU(v.touches[0],v.touches[1]),s=e(),f(),v.preventDefault()):v.touches.length===1&&(l=v.touches[0].clientX,c=v.touches[0].clientY,d=v.touches[0].clientX,p=v.touches[0].clientY,f(),u=setTimeout(()=>{u=null,o.onLongPress?.(d,p);},Soe));},m=v=>{if(v.touches.length===2&&a){v.preventDefault();let S=zU(v.touches[0],v.touches[1]);if(i>0){let w=S/i,C=woe(s*w,n,r);o.onPinchZoom?.(C);}}else if(v.touches.length===1){let S=v.touches[0].clientX-d,w=v.touches[0].clientY-p;(Math.abs(S)>HU||Math.abs(w)>HU)&&f();}},g=v=>{if(a){a=false,i=0;return}if(f(),v.changedTouches.length===1&&v.touches.length===0){let S=v.changedTouches[0].clientX,w=v.changedTouches[0].clientY,C=S-l,T=w-c;Math.abs(C)>=boe&&Math.abs(T)<voe&&o.onSwipe?.(C>0?1:-1);}},x=()=>{a=false,i=0,f();};return {onTouchStart:h,onTouchMove:m,onTouchEnd:g,onTouchCancel:x,cancel:x}}var Toe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],q$="bar",hR={x:120,y:120,width:480,height:320},pVe=["Category 1","Category 2","Category 3"],fVe=[4,3,5];function _oe(t=q$,e){return Qw(t,{categories:[...pVe],series:[{name:"Series 1",values:[...fVe]}],title:"Chart Title",hasLegend:true},{x:hR.x,y:hR.y,width:hR.width,height:hR.height})}function Z$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];ere(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),ere(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=hVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=gVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function ere(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function hVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=GU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=mVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function GU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...GU(t.slice(0,p),e-1),...GU(t.slice(p),e-1)]}function mVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function gVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},J$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var yb=4,xVe=.45,yVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function Moe(t){return yVe[t]??{rows:3,columns:2}}function Eoe(t,e){return t<=0?0:Math.ceil(t/e)}function Poe(t,e,n,r,o=eu){let i=Moe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*xVe,d=(a-yb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+yb),width:u,height:d});}}else {let u=(s-yb*(i.columns-1))/i.columns,d=(a-yb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+yb),y:f*(d+yb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function ZR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?J$:eu,i=Eoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=Poe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function JR(t="portrait"){let e=t==="landscape"?J$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function QR(){return 8}var bVe=.48,vVe=6,tre=16/9;function Aoe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*bVe,s=r,a=s/tre;a>i&&(a=i,s=a*tre);let l=(r-s)/2,c=(i-a)/2,u=i+vVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function ek(t){return t.map((e,n)=>Aoe(n,e))}function tk(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var e0=612,sd=792,Rs=36,Q$=2/3,o0=18,jb=11,nk=1.4,e6=.5,wC=9;function rk(t,e){let n=e0-2*Rs,r=sd-2*Rs,o=r*Q$,i=r-o-o0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-o0,f=jb*nk,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function ok(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ik(){let t=sd-2*Rs,e=wC+o0,n=t-e,r=jb*nk;return Math.floor(n/r)}function _b(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function vR(t,e){if(t.length===0)return "";let n=`BT /F1 ${jb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${_b(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${_b(o)}) Tj `;}return n+=`ET
4678
+ `&&r.insert!=="\u200B"&&(i.text=r.insert),n.push(i);}return n}function CGe(t,e,n){let r=t;for(let[o,i]of Object.entries(r))if(i!==void 0)if(yGe.has(o))e.set(o,i);else if(o==="textSegments"){if(Array.isArray(i)){let s=n.createText();SGe(i,s),e.set("textBody",s);}}else OU[o]&&e.set(OU[o],JSON.stringify(i));}function TGe(t){return typeof t=="object"&&t!==null&&typeof t.toDelta=="function"}function _Ge(t){let e={};return t.forEach((n,r)=>{if(r==="textBody")TGe(n)&&(e.textSegments=wGe(n));else if(jne[r])try{e[jne[r]]=JSON.parse(n);}catch{}else e[r]=n;}),e}function MGe(t,e,n){let r=t;for(let i of Zre)r[i]!==void 0&&e.set(i,r[i]);for(let[i,s]of Object.entries(Jre))r[i]!==void 0&&e.set(s,JSON.stringify(r[i]));let o=n.createArray();for(let i of t.elements){let s=n.createMap();CGe(i,s,n),o.push([s]);}e.set("elements",o);}function EGe(t){let e={};for(let o of Zre){let i=t.get(o);i!==void 0&&(e[o]=i);}for(let[o,i]of Object.entries(bGe)){let s=t.get(o);if(s!==void 0)try{e[i]=JSON.parse(s);}catch{}}let n=t.get("elements"),r=[];if(n)for(let o=0;o<n.length;o++)r.push(_Ge(n.get(o)));return e.elements=r,e}function Qre(t,e,n,r){e.transact(()=>{let o=e.getArray(O$);o.length>0&&o.delete(0,o.length);for(let i of t){let s=n.createMap();MGe(i,s,n),o.push([s]);}},r);}function U$(t){let e=t.getArray(O$),n=[];for(let r=0;r<e.length;r++)n.push(EGe(e.get(r)));return n}function eoe(t,e){let n=t.getArray(O$);return n.observeDeep(e),()=>n.unobserveDeep(e)}var Yne=2,Kne=2;function UU(t){return Qe(t)?t.textSegments&&t.textSegments.length>0?t.textSegments.map(e=>e.text).join(""):t.text??"":""}function Zg(t){let e=t.type.charAt(0).toUpperCase()+t.type.slice(1),n=UU(t);if(n.length>0){let r=n.length>30?`${n.slice(0,30)}...`:n;return `${e}: "${r}"`}return `${e} (${t.id})`}function $U(t){let e=[];for(let n of t)e.push(n),n.type==="group"&&n.children&&e.push(...$U(n.children));return e}function qne(t){let e=new Map;for(let n of t)e.set(n.id,n);return e}function PGe(t,e){let n=[],r=qne($U(t)),o=qne($U(e));for(let[i,s]of r)o.has(i)||n.push({elementId:i,label:Zg(s),kind:"removed",description:`Element removed: ${Zg(s)}`});for(let[i,s]of o)r.has(i)||n.push({elementId:i,label:Zg(s),kind:"added",description:`Element added: ${Zg(s)}`});for(let[i,s]of r){let a=o.get(i);if(!a)continue;(Math.abs(s.x-a.x)>Yne||Math.abs(s.y-a.y)>Yne)&&n.push({elementId:i,label:Zg(s),kind:"moved",description:`Moved from (${Math.round(s.x)}, ${Math.round(s.y)}) to (${Math.round(a.x)}, ${Math.round(a.y)})`}),(Math.abs(s.width-a.width)>Kne||Math.abs(s.height-a.height)>Kne)&&n.push({elementId:i,label:Zg(s),kind:"resized",description:`Resized from ${Math.round(s.width)}x${Math.round(s.height)} to ${Math.round(a.width)}x${Math.round(a.height)}`});let l=UU(s),c=UU(a);l!==c&&n.push({elementId:i,label:Zg(s),kind:"textChanged",description:"Text content changed"});}return n}function AGe(t,e){let n=PGe(t.elements,e.elements);return t.backgroundColor!==e.backgroundColor&&n.push({elementId:"__background__",label:"Background",kind:"textChanged",description:`Background changed from ${t.backgroundColor??"default"} to ${e.backgroundColor??"default"}`}),(t.notes??"")!==(e.notes??"")&&n.push({elementId:"__notes__",label:"Speaker Notes",kind:"textChanged",description:"Speaker notes changed"}),n}function RGe(t,e){let n=[],r=Math.max(t.length,e.length),o=0,i=0,s=0,a=0;for(let l=0;l<r;l++){let c=t[l],u=e[l];if(c&&!u)n.push({status:"removed",baseIndex:l,compareIndex:-1,baseSlide:c,changes:[]}),i++;else if(!c&&u)n.push({status:"added",baseIndex:-1,compareIndex:l,compareSlide:u,changes:[]}),o++;else if(c&&u){let d=AGe(c,u);d.length>0?(n.push({status:"changed",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:d}),s++):(n.push({status:"unchanged",baseIndex:l,compareIndex:l,baseSlide:c,compareSlide:u,changes:[]}),a++);}}return {diffs:n,baseSlideCount:t.length,compareSlideCount:e.length,addedCount:o,removedCount:i,changedCount:s,unchangedCount:a}}function $$(t,e){return RGe(t.slides,e.slides)}function nc(t,e){return e[t%e.length]}function ld(t,e,n){let r=n==="intense"?1:n==="moderate"?.92:.85;return e<=1?r:r-t/(e-1)*.15}function pd(t){if(t==="intense")return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";if(t==="moderate")return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"}function Oh(t){return t==="intense"?2:t==="moderate"?1.5:0}function rc(t,e){return t.length<=e?t:`${t.slice(0,e-1)}\u2026`}function nu(t,e,n,r){let i=e/Math.max(1,t.length*.6),s=n*.5;return Math.max(6,Math.min(r,i,s))}function Uh(t){return t>0?"rgba(255,255,255,0.3)":"none"}function NGe(t){if(t.some(o=>o.children!==void 0&&o.children.length>0)){let o=a=>({node:a,children:(a.children??[]).map(o)}),i=new Set(t.map(a=>a.id));return t.filter(a=>!a.parentId||!i.has(a.parentId)).map(o)}let n=new Map;for(let o of t)n.set(o.id,{node:o,children:[]});let r=[];for(let o of t){let i=n.get(o.id);o.parentId&&n.has(o.parentId)?n.get(o.parentId).children.push(i):r.push(i);}return r}function bb(t){return t.children.length===0?1:t.children.reduce((e,n)=>e+bb(n),0)}function toe(t){return t.children.length===0?1:1+Math.max(...t.children.map(toe))}function DGe(t){let e=[],n=r=>{e.push(r);for(let o of r.children??[])n(o);};for(let r of t)n(r);return e}var Zne={basicBlockList:"list",alternatingHexagons:"list",horizontalBulletList:"list",stackedList:"list",tableList:"list",trapezoidList:"list",verticalBlockList:"list",groupedList:"list",pyramidList:"list",basicChevronProcess:"process",continuousBlockProcess:"process",segmentedProcess:"process",upwardArrow:"process",basicTimeline:"process",bendingProcess:"process",stepDownProcess:"process",alternatingFlow:"process",descendingProcess:"process",accentProcess:"process",verticalChevronList:"process",horizontalPictureList:"process",pictureAccentList:"process",basicCycle:"cycle",basicPie:"cycle",basicRadial:"radial",convergingRadial:"radial",basicTarget:"radial",interlockingGears:"radial",hierarchy:"hierarchy",basicMatrix:"matrix",basicPyramid:"pyramid",invertedPyramid:"pyramid",basicVenn:"venn",linearVenn:"venn",basicFunnel:"funnel"},Jne={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"radial",matrix:"matrix",pyramid:"pyramid",funnel:"funnel",target:"target",venn:"venn",timeline:"process",chevron:"process",bending:"process",gear:"radial"};function LGe(t,e,n){if(n&&n in Zne)return Zne[n];if(e&&e in Jne){let o=Jne[e];if(o)return o}return t.some(o=>o.children&&o.children.length>0)?"hierarchy":"list"}function noe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Math.min(6,u*.15),f=Oh(r),h=Uh(f);return {nodes:t.map((g,x)=>{let v=a+x*(u+l),S=nu(g.text,d*.9,u,12);return {kind:"rect",key:`${o}-list-${g.id}-${x}`,x:a,y:v,width:d,height:u,rx:p,fill:nc(x,n),stroke:h,strokeWidth:f,opacity:ld(x,t.length,r),text:rc(g.text,40),fontSize:S,textX:a+d/2,textY:v+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"list"}}function FGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=4,c=Math.min(16,i*.04),u=i-a*2,d=t.length>0?(u-l*(t.length-1))/t.length:u,p=Math.min(s-a*2,s*.6),f=s/2,h=Oh(r),m=Uh(h);return {nodes:t.map((x,v)=>{let S=a+v*(d+l),w=p/2,C=v===0,T=v===t.length-1,E;C?E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`].join(" "):T?E=[`${S},${f-w}`,`${S+d},${f-w}`,`${S+d},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" "):E=[`${S},${f-w}`,`${S+d-c},${f-w}`,`${S+d},${f}`,`${S+d-c},${f+w}`,`${S},${f+w}`,`${S+c},${f}`].join(" ");let M=nu(x.text,d*.7,p,12);return {kind:"polygon",key:`${o}-process-${x.id}-${v}`,points:E,fill:nc(v,n),stroke:m,strokeWidth:h,opacity:ld(v,t.length,r),text:rc(x.text,25),fontSize:M,textX:S+d/2,textY:f}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"process"}}function BGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.min(i,s),l=i/2,c=s/2,u=a*.35,d=Math.max(a*.06,Math.min(a*.12,200/Math.max(1,t.length))),p=Oh(r),f=Uh(p),h=t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),T=(x+1)%t.length/t.length*Math.PI*2-Math.PI/2,E=l+u*Math.cos(T),M=c+u*Math.sin(T),P=(v+T)/2,R=x===t.length-1?(v+T+Math.PI*2)/2:P,k=u*.15,L=l+(u+k)*Math.cos(R),D=c+(u+k)*Math.sin(R);return {key:`${o}-cycle-conn-${x}`,d:`M${S},${w} Q${L},${D} ${E},${M}`}});return {nodes:t.map((g,x)=>{let v=x/t.length*Math.PI*2-Math.PI/2,S=l+u*Math.cos(v),w=c+u*Math.sin(v),C=nu(g.text,d*1.4,d*2,11);return {kind:"circle",key:`${o}-cycle-${g.id}-${x}`,cx:S,cy:w,r:d,fill:nc(x,n),stroke:f,strokeWidth:p,opacity:ld(x,t.length,r),text:rc(g.text,20),fontSize:C}}),connectors:h,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"cycle"}}function OGe(t,e,n,r,o){let i=NGe(t);if(i.length===0)return noe(t,e,n,r,o);let{width:s,height:a}=e,l=i.reduce((T,E)=>T+bb(E),0),c=Math.max(...i.map(toe)),u=s/Math.max(1,l),d=a/Math.max(1,c),p=Math.min(u*.8,140),f=Math.min(d*.4,36),h=Math.min(6,f*.15),m=Oh(r),g=Uh(m),x=[],v=[],S=0;function w(T,E,M){let P=bb(T),R=(E+P/2)*u,k=M*d+d/2,L=S++,D=nu(T.node.text,p*.9,f,11),U=E;for(let O of T.children){let H=bb(O),z=(U+H/2)*u,K=(M+1)*d+d/2,ee=k+f/2+(K-f/2-(k+f/2))/2;v.push({key:`${o}-hier-conn-${T.node.id}-${O.node.id}`,d:`M${R},${k+f/2} L${R},${ee} L${z},${ee} L${z},${K-f/2}`}),U+=H;}let N={kind:"rect",key:`${o}-hier-${T.node.id}-${L}`,x:R-p/2,y:k-f/2,width:p,height:f,rx:h,fill:nc(L,n),stroke:g,strokeWidth:m,opacity:ld(L,t.length,r),text:rc(T.node.text,40),fontSize:D,textX:R,textY:k};x.push(N);let B=E;for(let O of T.children)w(O,B,M+1),B+=bb(O);}let C=0;for(let T of i)w(T,C,0),C+=bb(T);return {nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${s} ${a}`,family:"hierarchy"}}function UGe(t,e,n,r,o){let{width:i,height:s}=e,a=Math.max(1,Math.ceil(Math.sqrt(t.length))),l=Math.max(1,Math.ceil(t.length/a)),c=8,u=6,d=i-c*2,p=s-c*2,f=(d-u*(a-1))/a,h=(p-u*(l-1))/l,m=Math.min(6,Math.min(f,h)*.1),g=Oh(r),x=Uh(g);return {nodes:t.map((S,w)=>{let C=w%a,T=Math.floor(w/a),E=c+C*(f+u),M=c+T*(h+u),P=nu(S.text,f*.85,h,12);return {kind:"rect",key:`${o}-matrix-${S.id}-${w}`,x:E,y:M,width:f,height:h,rx:m,fill:nc(w,n),stroke:x,strokeWidth:g,opacity:ld(w,t.length,r),text:rc(S.text,30),fontSize:P,textX:E+f/2,textY:M+h/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"matrix"}}function $Ge(t,e,n,r,o){let{width:i,height:s}=e,a=i/2,l=s/2,c=Math.min(i,s),u=Oh(r),d=Uh(u);if(t.length===0)return {nodes:[],connectors:[],shadowFilter:void 0,viewBox:`0 0 ${i} ${s}`,family:"radial"};let[p,...f]=t,h=c*.14,m=c*.35,g=Math.max(c*.06,Math.min(c*.1,180/Math.max(1,f.length))),x=[],v=[],S=nu(p.text,h*1.6,h*2,12);return x.push({kind:"circle",key:`${o}-radial-centre-0`,cx:a,cy:l,r:h,fill:nc(0,n),stroke:d,strokeWidth:u,opacity:ld(0,t.length,r),text:rc(p.text,20),fontSize:S}),f.forEach((w,C)=>{let T=C+1,E=C/Math.max(1,f.length)*Math.PI*2-Math.PI/2,M=a+m*Math.cos(E),P=l+m*Math.sin(E),R=nu(w.text,g*1.4,g*2,10),k=a+h*Math.cos(E),L=l+h*Math.sin(E);v.push({key:`${o}-radial-conn-${T}`,d:`M${k},${L} L${M},${P}`}),x.push({kind:"circle",key:`${o}-radial-${w.id}-${T}`,cx:M,cy:P,r:g,fill:nc(T,n),stroke:d,strokeWidth:u,opacity:ld(T,t.length,r),text:rc(w.text,20),fontSize:R});}),{nodes:x,connectors:v,shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"radial"}}function HGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=3,c=s-a*2,u=t.length>0?(c-l*(t.length-1))/t.length:c,d=i-a*2,p=Oh(r),f=Uh(p);return {nodes:t.map((m,g)=>{let x=.3+g/Math.max(t.length-1,1)*.7,v=g<t.length-1?.3+(g+1)/Math.max(t.length-1,1)*.7:1,S=d*x,w=d*v,C=a+g*(u+l),T=(i-S)/2,E=T+S,M=(i-w)/2,P=M+w,R=[`${T},${C}`,`${E},${C}`,`${P},${C+u}`,`${M},${C+u}`].join(" "),k=nu(m.text,S*.85,u,12);return {kind:"polygon",key:`${o}-pyramid-${m.id}-${g}`,points:R,fill:nc(g,n),stroke:f,strokeWidth:p,opacity:ld(g,t.length,r),text:rc(m.text,30),fontSize:k,textX:i/2,textY:C+u/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"pyramid"}}function zGe(t,e,n,r,o){let{width:i,height:s}=e,a=pd(r);if(t.length<=4){let h=i/2,m=s/2,g=Math.min(i,s)*.28,x=g*.55;return {nodes:t.map((S,w)=>{let C=w/Math.max(1,t.length)*Math.PI*2-Math.PI/2,T=h+x*Math.cos(C),E=m+x*Math.sin(C),M=nu(S.text,g*1.2,g*2,11);return {kind:"circle",key:`${o}-venn-${S.id}-${w}`,cx:T,cy:E,r:g,fill:nc(w,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(S.text,20),fontSize:M}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}let l=Math.min(s*.38,i/(t.length*.9)),c=l*.5,u=t.length*(l*2-c)+c,d=(i-u)/2+l,p=s/2;return {nodes:t.map((h,m)=>{let g=d+m*(l*2-c),x=nu(h.text,l*1.2,l*2,10);return {kind:"circle",key:`${o}-venn-${h.id}-${m}`,cx:g,cy:p,r:l,fill:nc(m,n),stroke:"none",strokeWidth:0,opacity:.35,text:rc(h.text,20),fontSize:x}}),connectors:[],shadowFilter:a,viewBox:`0 0 ${i} ${s}`,family:"venn"}}function GGe(t,e,n,r,o){let{width:i,height:s}=e,a=8,l=i-a*2,c=t.length>0?(s-a*2)/t.length:s-a*2,u=Oh(r),d=Uh(u);return {nodes:t.map((f,h)=>{let m=l*(1-h/Math.max(1,t.length)),g=l*(1-(h+1)/Math.max(1,t.length)),x=a+h*c,v=(i-m)/2,S=v+m,w=(i-g)/2,C=w+g,T=[`${v},${x}`,`${S},${x}`,`${C},${x+c}`,`${w},${x+c}`].join(" "),E=nu(f.text,m*.85,c,11);return {kind:"polygon",key:`${o}-funnel-${f.id}-${h}`,points:T,fill:nc(h,n),stroke:d,strokeWidth:u,opacity:ld(h,t.length,r),text:rc(f.text,30),fontSize:E,textX:i/2,textY:x+c/2}}),connectors:[],shadowFilter:pd(r),viewBox:`0 0 ${i} ${s}`,family:"funnel"}}function VGe(t,e,n,r,o){let{width:i,height:s}=e,a=i*.4,l=s/2,c=Math.min(a-8,l-8),u=pd(r);return {nodes:t.map((p,f)=>{let h=c*((t.length-f)/Math.max(1,t.length));return {kind:"circle",key:`${o}-target-${p.id}-${f}`,cx:a,cy:l,r:Math.max(h,4),fill:nc(f,n),stroke:"none",strokeWidth:0,opacity:ld(f,t.length,r),text:rc(p.text,30),fontSize:Math.max(7,Math.min(10,c/Math.max(1,t.length+1)))}}),connectors:[],shadowFilter:u,viewBox:`0 0 ${i} ${s}`,family:"target"}}function roe(t,e,n,r,o,i,s){let a=DGe(t);switch(LGe(t,i,s)){case "list":return noe(a,e,n,r,o);case "process":return FGe(a,e,n,r,o);case "cycle":return BGe(a,e,n,r,o);case "hierarchy":return OGe(t,e,n,r,o);case "matrix":return UGe(a,e,n,r,o);case "radial":return $Ge(a,e,n,r,o);case "pyramid":return HGe(a,e,n,r,o);case "venn":return zGe(a,e,n,r,o);case "funnel":return GGe(a,e,n,r,o);case "target":return VGe(a,e,n,r,o)}}function WGe(t){let e=t.trim().split(/\s+/u).map(Number),n=e[2],r=e[3];return {width:Number.isFinite(n)&&n>0?n:1,height:Number.isFinite(r)&&r>0?r:1}}function XGe(t,e,n,r=4){let o=t/2,i=e/2,s=Math.max(0,Math.min(n,o,i));if(s<=0)return [{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];let a=[],l=[{cx:o-s,cy:-i+s,start:-Math.PI/2},{cx:o-s,cy:i-s,start:0},{cx:-o+s,cy:i-s,start:Math.PI/2},{cx:-o+s,cy:-i+s,start:Math.PI}];for(let{cx:c,cy:u,start:d}of l)for(let p=0;p<=r;p++){let f=d+p/r*(Math.PI/2);a.push({x:c+Math.cos(f)*s,y:u+Math.sin(f)*s});}return a}function jGe(t,e=48){let n=[];for(let r=0;r<e;r++){let o=r/e*Math.PI*2;n.push({x:Math.cos(o)*t,y:Math.sin(o)*t});}return n}function YGe(t){let e=[];for(let n of t.trim().split(/\s+/u)){let[r,o]=n.split(","),i=Number(r),s=Number(o);Number.isFinite(i)&&Number.isFinite(s)&&e.push({x:i,y:s});}return e}function KGe(t){let e=[],n=t.match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/gu);if(!n)return e;let r=0,o="",i={x:0,y:0},s=()=>Number(n[r++]);for(;r<n.length;){let a=n[r];/[a-zA-Z]/u.test(a)&&(o=a,r++);let l=o===o.toLowerCase();switch(o.toUpperCase()){case "M":case "L":{let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "H":{let c=s();i={x:l?i.x+c:c,y:i.y},e.push(i);break}case "V":{let c=s();i={x:i.x,y:l?i.y+c:c},e.push(i);break}case "C":{s(),s(),s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}case "Q":{s(),s();let c=s(),u=s();i=l?{x:i.x+c,y:i.y+u}:{x:c,y:u},e.push(i);break}default:r++;}}return e}function qGe(t){if(t.length===0)return {cx:0,cy:0,width:0,height:0};let e=1/0,n=1/0,r=-1/0,o=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>r&&(r=i.x),i.y>o&&(o=i.y);return {cx:(e+r)/2,cy:(n+o)/2,width:r-e,height:o-n}}function ZGe(t){let e=t.trim().replace(/^#/u,"");return e.length===3&&(e=e.split("").map(n=>n+n).join("")),e.length!==6||/[^0-9a-fA-F]/u.test(e)?[128,128,128]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function JGe(t){let[e,n,r]=ZGe(t);return (.299*e+.587*n+.114*r)/255>.6?"#1a1a1a":"#ffffff"}function Qne(t,e){let n=Math.hypot(t,e),r=Math.atan2(t,e);return {pos:{x:n*Math.sin(r),y:0,z:n*Math.cos(r)},angle:r}}function QGe(t){let e=t.meshes.map(r=>{let{pos:o,angle:i}=Qne(r.position.x,r.position.y);return {...r,position:o,rotation:{x:0,y:i,z:0}}}),n=t.connectors.map(r=>({...r,points:r.points.map(o=>Qne(o.x,o.y).pos)}));return {...t,meshes:e,connectors:n}}function eVe(t){if(t.meshes.length===0)return t;let e=-1/0,n=1/0;for(let l of t.meshes)l.position.y>e&&(e=l.position.y),l.position.y<n&&(n=l.position.y);let r=e-n||1,o=Math.max(t.bounds.width,t.bounds.height)*.6,i=l=>-((e-l)/r)*o,s=t.meshes.map(l=>({...l,position:{x:l.position.x,y:l.position.y,z:i(l.position.y)}})),a=t.connectors.map(l=>({...l,points:l.points.map(c=>({x:c.x,y:c.y,z:i(c.y)}))}));return {...t,meshes:s,connectors:a}}function tVe(t){switch(t.family){case "cycle":case "radial":return QGe(t);case "hierarchy":return eVe(t);default:return t}}var nVe=.35,rVe=.2;function oVe(t,e){if(typeof e.depth=="number"&&e.depth>0)return e.depth;let n=e.depthRatio??nVe;return Math.max(2,t*n)}function iVe(t,e,n,r){let o=m=>m-e/2,i=m=>n/2-m,s,a=false,l,c,u,d;if(t.kind==="rect")l=t.x+t.width/2,c=t.y+t.height/2,u=t.width/2,d=t.height/2,s=XGe(t.width,t.height,t.rx),a=t.rx>0;else if(t.kind==="circle")l=t.cx,c=t.cy,u=t.r,d=t.r,s=jGe(t.r),a=true;else {let m=YGe(t.points);if(m.length<3)return null;let g=qGe(m);l=g.cx,c=g.cy,u=g.width/2,d=g.height/2,s=m.map(x=>({x:x.x-g.cx,y:g.cy-x.y}));}let p=Math.max(2,Math.min(u,d)*2),f=oVe(p,r),h=f*(r.bevelRatio??rVe);return {id:t.key,outline:s,rounded:a,depth:f,bevel:h,fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,position:{x:o(l),y:i(c),z:0},rotation:{x:0,y:0,z:0},text:t.text,textColor:JGe(t.fill),fontSize:t.fontSize,halfWidth:u,halfHeight:d}}function ooe(t,e={}){let{width:n,height:r}=WGe(t.viewBox),o=[];for(let a of t.nodes){let l=iVe(a,n,r,e);l&&o.push(l);}let i=[];for(let a of t.connectors){let l=KGe(a.d);l.length<2||i.push({id:a.key,points:l.map(c=>({x:c.x-n/2,y:r/2-c.y,z:0})),color:"#888888",width:1.5});}let s={meshes:o,connectors:i,bounds:{width:n,height:r},family:t.family,background:e.background};return e.spatial?tVe(s):s}var IC=95,NC=100;function YR(t){return Number.isNaN(t)?0:Math.min(100,Math.max(0,Math.round(t)))}function DC(t,e,n=90){return e<=0?0:YR(t/e*n)}function ioe(t,e){return e<=0?45:YR(45+t/e*45)}function Xb(t,e,n){return `${t} slide ${e+1} of ${n}...`}function LC(t){return t instanceof DOMException&&t.name==="AbortError"}var aVe=".pptx,.ppsx,.pptm,.potx";function lVe(t={}){return new Promise(e=>{if(typeof document>"u"){e(null);return}let n=document.createElement("input");n.type="file",n.accept=t.accept??aVe,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0";let r=false,o=s=>{r||(r=true,n.remove(),e(s));};n.addEventListener("change",()=>o(n.files?.[0]??null)),n.addEventListener("cancel",()=>o(null));let i=()=>{window.removeEventListener("focus",i),setTimeout(()=>o(null),300);};window.addEventListener("focus",i),document.body.appendChild(n),n.click();})}async function soe(t={}){let e=await lVe(t);return e?{file:e,buffer:await e.arrayBuffer()}:null}function aoe(t,e){return e<=0?"0 / 0":`${t+1} / ${e}`}function loe(t){return t<=0}function coe(t,e){return t>=e-1}function gC(t){return String(t).padStart(2,"0")}function uoe(t,e){if(t==null)return 0;let n=e-t;return n>0?n:0}function doe(t){let e=t>0?t:0,n=Math.floor(e/1e3),r=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return r>0?`${gC(r)}:${gC(o)}:${gC(i)}`:`${gC(o)}:${gC(i)}`}var cVe=120;function H$(t){let{layoutHeight:e,visualHeight:n,offsetTop:r}=t;if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(r)||e<=0||n<=0)return 0;let o=e-(n+r);return o<=0?0:Math.round(o)}function poe(t,e=cVe){return t>=e}function z$(t=typeof window<"u"?window:void 0){if(!t)return null;let e=t.visualViewport;return e?{layoutHeight:t.innerHeight,visualHeight:e.height,offsetTop:e.offsetTop}:null}function foe(t,e,n,r=16){let o=e-n;return t.bottom>o-r?t.bottom-(o-r):t.top<r?t.top-r:0}function SC(t){let e=t.replace(/^#/u,"");if(e.length!==6)return null;let n=parseInt(e,16);return Number.isFinite(n)?{r:n>>16&255,g:n>>8&255,b:n&255}:null}function hoe(t,e){let n=t.r-e.r,r=t.g-e.g,o=t.b-e.b;return Math.sqrt(n*n+r*r+o*o)}var moe=Math.sqrt(65025*3);function goe(t){return Math.max(0,Math.min(100,t))/100*moe}function xoe(t,e,n,r,o){let i=t.length;for(let s=0;s<i;s+=4){let a={r:t[s],g:t[s+1],b:t[s+2]};hoe(a,e)<=r&&(o?(t[s]=0,t[s+1]=0,t[s+2]=0,t[s+3]=0):(t[s]=n.r,t[s+1]=n.g,t[s+2]=n.b));}}var KR=12;function G$(t,e,n,r=KR,o=false){return new Promise((i,s)=>{let a=SC(e),l=SC(n);if(!a||!l){s(new Error(`Invalid hex colour: from="${e}" to="${n}"`));return}let c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let{naturalWidth:u,naturalHeight:d}=c;if(u===0||d===0){s(new Error("Image has zero dimensions"));return}let p=document.createElement("canvas");p.width=u,p.height=d;let f=p.getContext("2d");if(!f){s(new Error("Cannot create 2D canvas context"));return}f.drawImage(c,0,0);let h=f.getImageData(0,0,u,d),m=goe(r);xoe(h.data,a,l,m,o),f.putImageData(h,0,0),i({dataUrl:p.toDataURL("image/png"),width:u,height:d});},c.onerror=()=>{s(new Error("Failed to load image for colour change processing"));},c.src=t;})}var xC=new Map,uVe=64;function V$(t,e,n,r,o){return `${t.length>64?t.slice(0,64):t}|${e}|${n}|${r}|${o}`}function FC(t){return xC.get(t)}function W$(t,e){if(xC.size>=uVe){let n=xC.keys().next().value;n!==void 0&&xC.delete(n);}xC.set(t,e);}function yoe(t,e,n){let r=t.length;for(let o=0;o<r;o+=4){let s=(.2126*t[o]+.7152*t[o+1]+.0722*t[o+2])/255,a=1-s;t[o]=Math.round(e.r*a+n.r*s),t[o+1]=Math.round(e.g*a+n.g*s),t[o+2]=Math.round(e.b*a+n.b*s);}}function X$(t,e,n){return new Promise((r,o)=>{let i=SC(e),s=SC(n);if(!i||!s){o(new Error(`Invalid hex colour: shadow="${e}" highlight="${n}"`));return}let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let{naturalWidth:l,naturalHeight:c}=a;if(l===0||c===0){o(new Error("Image has zero dimensions"));return}let u=document.createElement("canvas");u.width=l,u.height=c;let d=u.getContext("2d");if(!d){o(new Error("Cannot create 2D canvas context"));return}d.drawImage(a,0,0);let p=d.getImageData(0,0,l,c);yoe(p.data,i,s),d.putImageData(p,0,0),r({dataUrl:u.toDataURL("image/png"),width:l,height:c});},a.onerror=()=>{o(new Error("Failed to load image for duotone processing"));},a.src=t;})}var yC=new Map,dVe=64;function j$(t,e,n){return `dt|${t.length>64?t.slice(0,64):t}|${e}|${n}`}function qR(t){return yC.get(t)}function Y$(t,e){if(yC.size>=dVe){let n=yC.keys().next().value;n!==void 0&&yC.delete(n);}yC.set(t,e);}var K$=[{labelKey:"pptx.image.duotonePresetNavyGold",shadow:"#000080",highlight:"#FFD700"},{labelKey:"pptx.image.duotonePresetTealWhite",shadow:"#004D4D",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetPurplePink",shadow:"#2D004B",highlight:"#FF69B4"},{labelKey:"pptx.image.duotonePresetBlueOrange",shadow:"#001F4D",highlight:"#FF8C00"},{labelKey:"pptx.image.duotonePresetGreenYellow",shadow:"#003300",highlight:"#CCFF00"},{labelKey:"pptx.image.duotonePresetRedCream",shadow:"#4D0000",highlight:"#FFFDD0"},{labelKey:"pptx.image.duotonePresetBlackWhite",shadow:"#000000",highlight:"#FFFFFF"},{labelKey:"pptx.image.duotonePresetSepiaWarm",shadow:"#3B2614",highlight:"#F5DEB3"}];var boe=50,voe=100,Soe=500,HU=10;function zU(t,e){let n=t.clientX-e.clientX,r=t.clientY-e.clientY;return Math.sqrt(n*n+r*r)}function woe(t,e,n){return Math.min(Math.max(t,e),n)}function Coe(t){let{getScale:e,minScale:n,maxScale:r,callbacks:o}=t,i=0,s=1,a=false,l=0,c=0,u=0,d=0,p=null,f=0,h=0,m=()=>{p!==null&&(clearTimeout(p),p=null);},g=w=>{w.touches.length===2?(a=true,i=zU(w.touches[0],w.touches[1]),s=e(),m(),w.preventDefault()):w.touches.length===1&&(l=w.touches[0].clientX,c=w.touches[0].clientY,u=l,d=c,f=w.touches[0].clientX,h=w.touches[0].clientY,m(),p=setTimeout(()=>{p=null,o.onLongPress?.(f,h);},Soe));},x=w=>{if(w.touches.length===2&&a){w.preventDefault();let C=zU(w.touches[0],w.touches[1]);if(i>0){let T=C/i,E=woe(s*T,n,r);o.onPinchZoom?.(E);}}else if(w.touches.length===1){u=w.touches[0].clientX,d=w.touches[0].clientY;let C=w.touches[0].clientX-f,T=w.touches[0].clientY-h;(Math.abs(C)>HU||Math.abs(T)>HU)&&m();}},v=w=>{if(a){a=false,i=0;return}if(m(),w.touches.length===0){let C=w.changedTouches.length>=1?w.changedTouches[0].clientX:u,T=w.changedTouches.length>=1?w.changedTouches[0].clientY:d,E=C-l,M=T-c;Math.abs(E)>=boe&&Math.abs(M)<voe&&o.onSwipe?.(E>0?1:-1);}},S=()=>{a=false,i=0,m();};return {onTouchStart:g,onTouchMove:x,onTouchEnd:v,onTouchCancel:S,cancel:S}}var Toe=[{type:"bar",label:"Bar"},{type:"line",label:"Line"},{type:"pie",label:"Pie"},{type:"doughnut",label:"Doughnut"},{type:"area",label:"Area"},{type:"scatter",label:"Scatter"}],q$="bar",hR={x:120,y:120,width:480,height:320},pVe=["Category 1","Category 2","Category 3"],fVe=[4,3,5];function _oe(t=q$,e){return Qw(t,{categories:[...pVe],series:[{name:"Series 1",values:[...fVe]}],title:"Chart Title",hasLegend:true},{x:hR.x,y:hR.y,width:hR.width,height:hR.height})}function Z$(t,e={}){if(t.length===0)throw new Error("[gif-encoder] encodeGif: frames array must not be empty");let n=typeof e=="number"?{delayCs:e}:e,{delayCs:r=200,loopCount:o=0}=n,i=t[0].width,s=t[0].height,a=[];ere(a,"GIF89a"),Ih(a,i),Ih(a,s),a.push(112),a.push(0),a.push(0),a.push(33,255,11),ere(a,"NETSCAPE2.0"),a.push(3,1),Ih(a,o),a.push(0);for(let l of t){let{palette:c,indexed:u}=hVe(l.imageData);a.push(33,249,4),a.push(0),Ih(a,r),a.push(0),a.push(0),a.push(44),Ih(a,0),Ih(a,0),Ih(a,i),Ih(a,s),a.push(135);for(let h=0;h<256;h++)a.push(c[h*3]??0),a.push(c[h*3+1]??0),a.push(c[h*3+2]??0);let d=8;a.push(d);let p=gVe(u,d),f=0;for(;f<p.length;){let h=Math.min(255,p.length-f);a.push(h);for(let m=0;m<h;m++)a.push(p[f+m]);f+=h;}a.push(0);}return a.push(59),new Uint8Array(a)}function Ih(t,e){t.push(e&255),t.push(e>>8&255);}function ere(t,e){for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));}function hVe(t){let e=t.data,n=t.width*t.height,r=Math.max(1,Math.floor(n/1e4)),o=[];for(let c=0;c<n;c+=r){let u=c*4;o.push([e[u],e[u+1],e[u+2]]);}let i=GU(o,8),s=new Uint8Array(768),a=[];for(let c=0;c<256;c++)if(c<i.length&&i[c].length>0){let u=0,d=0,p=0;for(let[x,v,S]of i[c])u+=x,d+=v,p+=S;let f=i[c].length,h=Math.round(u/f),m=Math.round(d/f),g=Math.round(p/f);s[c*3]=h,s[c*3+1]=m,s[c*3+2]=g,a.push([h,m,g]);}else a.push([0,0,0]);let l=new Uint8Array(n);for(let c=0;c<n;c++){let u=c*4;l[c]=mVe(a,e[u],e[u+1],e[u+2]);}return {palette:s,indexed:l}}function GU(t,e){if(e===0||t.length<=1)return [t];let n=255,r=0,o=255,i=0,s=255,a=0;for(let[f,h,m]of t)f<n&&(n=f),f>r&&(r=f),h<o&&(o=h),h>i&&(i=h),m<s&&(s=m),m>a&&(a=m);let l=r-n,c=i-o,u=a-s,d=0;c>=l&&c>=u?d=1:u>=l&&u>=c&&(d=2),t.sort((f,h)=>f[d]-h[d]);let p=Math.floor(t.length/2);return [...GU(t.slice(0,p),e-1),...GU(t.slice(p),e-1)]}function mVe(t,e,n,r){let o=0,i=1/0;for(let s=0;s<t.length;s++){let[a,l,c]=t[s],u=(e-a)**2+(n-l)**2+(r-c)**2;u<i&&(i=u,o=s);}return o}function gVe(t,e){let n=1<<e,r=n+1,o=[],i=e+1,s=r+1,a=4096,l=new Map,c=()=>{l.clear();for(let m=0;m<n;m++)l.set(String(m),m);i=e+1,s=r+1;},u=0,d=0,p=(m,g)=>{for(u|=m<<d,d+=g;d>=8;)o.push(u&255),u>>=8,d-=8;};c(),p(n,i);let f=String(t[0]);for(let m=1;m<t.length;m++){let g=`${f},${String(t[m])}`;if(l.has(g))f=g;else {let x=l.get(f);x!==void 0&&p(x,i),s<a?(l.set(g,s++),s>1<<i&&i<12&&i++):(p(n,i),c()),f=String(t[m]);}}let h=l.get(f);return h!==void 0&&p(h,i),p(r,i),d>0&&o.push(u&255),new Uint8Array(o)}var eu={width:210,height:297,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12},J$={width:297,height:210,marginTop:12,marginRight:12,marginBottom:12,marginLeft:12};var yb=4,xVe=.45,yVe={1:{rows:1,columns:1},2:{rows:2,columns:1},3:{rows:3,columns:1},4:{rows:2,columns:2},6:{rows:3,columns:2},9:{rows:3,columns:3}};function Moe(t){return yVe[t]??{rows:3,columns:2}}function Eoe(t,e){return t<=0?0:Math.ceil(t/e)}function Poe(t,e,n,r,o=eu){let i=Moe(e),s=o.width-o.marginLeft-o.marginRight,a=o.height-o.marginTop-o.marginBottom,l=e===3,c=[];if(l){let u=s*xVe,d=(a-yb*(i.rows-1))/i.rows;for(let p=0;p<i.rows;p++){let f=r+p;c.push({slideIndex:f<n?f:-1,row:p,col:0,x:0,y:p*(d+yb),width:u,height:d});}}else {let u=(s-yb*(i.columns-1))/i.columns,d=(a-yb*(i.rows-1))/i.rows,p=0;for(let f=0;f<i.rows;f++)for(let h=0;h<i.columns;h++){let m=r+p;c.push({slideIndex:m<n?m:-1,row:f,col:h,x:h*(u+yb),y:f*(d+yb),width:u,height:d}),p++;}}return {pageIndex:t,cells:c,hasNoteLines:l}}function ZR(t,e,n="portrait"){let r=t.length;if(r===0)return [];let o=n==="landscape"?J$:eu,i=Eoe(r,e),s=[];for(let a=0;a<i;a++){let l=a*e,c=Poe(a,e,r,l,o),u=c.cells.map(d=>({...d,slideIndex:d.slideIndex>=0&&d.slideIndex<r?t[d.slideIndex]:-1}));s.push({...c,cells:u});}return s}function JR(t="portrait"){let e=t==="landscape"?J$:eu;return {width:e.width-e.marginLeft-e.marginRight,height:e.height-e.marginTop-e.marginBottom}}function QR(){return 8}var bVe=.48,vVe=6,tre=16/9;function Aoe(t,e,n=eu){let r=n.width-n.marginLeft-n.marginRight,o=n.height-n.marginTop-n.marginBottom,i=o*bVe,s=r,a=s/tre;a>i&&(a=i,s=a*tre);let l=(r-s)/2,c=(i-a)/2,u=i+vVe,d=o-u;return {pageIndex:t,slideIndex:e,slideArea:{x:l,y:c,width:s,height:a},textArea:{x:0,y:u,width:r,height:Math.max(0,d)}}}function ek(t){return t.map((e,n)=>Aoe(n,e))}function tk(){return {width:eu.width-eu.marginLeft-eu.marginRight,height:eu.height-eu.marginTop-eu.marginBottom}}var e0=612,sd=792,Rs=36,Q$=2/3,o0=18,jb=11,nk=1.4,e6=.5,wC=9;function rk(t,e){let n=e0-2*Rs,r=sd-2*Rs,o=r*Q$,i=r-o-o0,s=Math.min(n/t,o/e),a=t*s,l=e*s,c=Rs+(n-a)/2,d=sd-Rs-l,p=d-o0,f=jb*nk,h=Math.floor(i/f);return {contentWidth:n,contentHeight:r,slideAreaHeight:o,notesAreaHeight:i,imageWidth:a,imageHeight:l,imageX:c,imageY:d,notesTextY:p,maxNotesLines:h}}function ok(t,e,n){if(!t||t.trim().length===0)return [];let r=n*.5,o=Math.floor(e/r);if(o<=0)return [];let i=[],s=t.split(/\r?\n/u);for(let a of s){if(a.trim().length===0){i.push("");continue}let l=a.split(/\s+/u),c="";for(let u of l)c.length===0?c=u:c.length+1+u.length<=o?c+=` ${u}`:(i.push(c),c=u);c.length>0&&i.push(c);}return i}function ik(){let t=sd-2*Rs,e=wC+o0,n=t-e,r=jb*nk;return Math.floor(n/r)}function _b(t){return t.replace(/\\/gu,"\\\\").replace(/\(/gu,"\\(").replace(/\)/gu,"\\)")}function vR(t,e){if(t.length===0)return "";let n=`BT /F1 ${jb} Tf 0 0 0 rg `;n+=`${Rs} ${e.toFixed(2)} Td `;for(let r=0;r<t.length;r++){let o=t[r];r===0?n+=`(${_b(o)}) Tj `:n+=`0 ${(-15.399999999999999).toFixed(2)} Td (${_b(o)}) Tj `;}return n+=`ET
4679
4679
  `,n}var SVe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function t6(t){return t.replace(/[&<>"']/gu,e=>SVe[e]||e)}function sk(t,e,n,r={}){let{title:o="Print",orientation:i="landscape",colorFilter:s=""}=r,a=t.map((l,c)=>`<section class="print-slide-page" aria-label="Slide ${c+1}">
4680
4680
  ${l}
4681
4681
  </section>`).join(`
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-react-viewer",
3
- "version": "1.1.39",
3
+ "version": "1.1.40",
4
4
  "description": "React PowerPoint viewer and editor component: render, edit, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "editor",