pptx-vanilla-viewer 3.1.3 → 3.1.4
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/CHANGELOG.md +7 -0
- package/dist/{ai-panel-KXWYZOSL.js → ai-panel-7PU4CMQ7.js} +1 -1
- package/dist/{ai-panel-6UPEIZRQ.cjs → ai-panel-C4SCON57.cjs} +1 -1
- package/dist/{chunk-5EUPO66T.cjs → chunk-25O22VJ6.cjs} +1 -1
- package/dist/{chunk-HUVK4446.cjs → chunk-2ECL3ZRX.cjs} +8 -8
- package/dist/{chunk-LOVRF5ZU.js → chunk-Q5ABNAAJ.js} +1 -1
- package/dist/{chunk-TQB3NGMT.cjs → chunk-U3F2VVX6.cjs} +3 -3
- package/dist/{chunk-KP57SJDQ.js → chunk-V3JALNXR.js} +1 -1
- package/dist/{chunk-C2SYI3EW.js → chunk-ZOYAHQWM.js} +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/internals.cjs +1 -1
- package/dist/internals.js +1 -1
- package/package.json +1 -1
|
@@ -318,7 +318,7 @@ ${e}`:e,this.syncSegmentsFromNotes(),this}Add(t){return this.add(t)}set(t){let e
|
|
|
318
318
|
`);r.push(o.join("")),i<e.length-1&&r.push(`
|
|
319
319
|
`);}),r.join("").trim()}async extractSlideNotes(t){let e=this.slideRelsMap.get(t);if(!e)return {};let r;for(let[,b]of e.entries())if(b.includes("notesSlide")){r=this.resolveImagePath(t,b);break}if(!r)return {};let n=await this.zip.file(r)?.async("string");if(!n)return {};let o=this.parser.parse(n)?.["p:notes"],a=o?.["p:cSld"],s=a?.["p:spTree"];if(!s)return {};let l=this.ensureArray(s["p:sp"]),c=new Set(ZQt(l)),d=[],p=[],u=[];l.forEach((b,S)=>{let w=b?.["p:txBody"],C=c.has(b)?this.extractTextFromTxBody(w):"";if(C.length>0){d.push(C);let _=this.extractTextSegmentsFromTxBodyForRewrite(w,void 0);p.length>0&&_.length>0&&p.push({text:`
|
|
320
320
|
`,isParagraphBreak:true,style:{}}),p.push(..._);}try{let _=this.parseShape(b,`notes-shape-${S}`,r);_&&u.push(_);}catch{}});let f,g=o?.["p:clrMapOvr"]?.["a:overrideClrMapping"];if(g){let b={};for(let S of ["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"]){let w=g[`@_${S}`];w!=null&&(b[S]=String(w));}Object.keys(b).length>0&&(f=b);}let y=a?.["@_name"],x=y!=null?String(y):void 0,v=d.join(`
|
|
321
|
-
`).trim();return {notes:v.length>0?v:void 0,notesSegments:p.length>0?p:void 0,notesShapes:u.length>0?u:void 0,notesClrMapOverride:f,notesCSldName:x}}};}}),xht,Cue=T({"src/core/core/runtime/PptxHandlerRuntimePlaceholderStyles.ts"(){ge(),Pm(),Pt(),Tue(),xht=class extends yht{parsePlaceholderLevelStyle(t){if(!t)return null;let e={},r=String(t["@_algn"]??"").trim(),n=Ob(r.length>0?r:void 0);n!==void 0&&(e.alignment=n);let i=eI(t);i.paragraphMarginLeft!==void 0&&(e.marginLeft=i.paragraphMarginLeft),i.paragraphMarginRight!==void 0&&(e.marginRight=i.paragraphMarginRight),i.paragraphIndent!==void 0&&(e.indent=i.paragraphIndent);let o=rI(t);o!==void 0&&(e.rtl=o);let a=nI(t);a&&a.length>0&&(e.tabStops=a),Object.assign(e,iI(t));let s=t["a:lnSpc"];if(s){let h=this.parseLineSpacingMultiplier(s);if(h!==void 0)e.lineSpacing=h;else {let g=this.parseLineSpacingExactPt(s);g!==void 0&&(e.lineSpacingExactPt=g);}}let l=t["a:defRPr"],c=Number.parseInt(String(l?.["@_sz"]??""),10),d=Number.isFinite(c)?this.pointsToPixels(c/100):void 0,p=this.parseParagraphSpacingPx(t["a:spcBef"],d);p!==void 0&&(e.spaceBefore=p);let u=this.parseParagraphSpacingPx(t["a:spcAft"],d);return u!==void 0&&(e.spaceAfter=u),this.parsePlaceholderLevelBullet(t,e),l&&this.parsePlaceholderLevelRunDefaults(l,e),Object.keys(e).length>0?e:null}parsePlaceholderLevelBullet(t,e){let r=t["a:buChar"];r?.["@_char"]&&(e.bulletChar=String(r["@_char"]));let n=t["a:buAutoNum"];n?.["@_type"]&&(e.bulletAutoNumType=String(n["@_type"]));let i=t["a:buFont"];i?.["@_typeface"]&&(e.bulletFontFamily=String(i["@_typeface"]));let o=tI(t["a:buSzPct"]);o!==void 0&&(e.bulletSizePercent=o);let a=t["a:buClr"];if(a){let l=this.parseColor(a);l&&(e.bulletColor=l);let c=yr(a);c&&(e.bulletColorXml=c);}let s=t["a:buSzPts"];if(s?.["@_val"]!==void 0){let l=Number.parseInt(String(s["@_val"]),10);Number.isFinite(l)&&(e.bulletSizePts=l/100);}ps(t,"a:buNone")&&(e.bulletNone=true);}parsePlaceholderLevelRunDefaults(t,e){if(t["@_sz"]!==void 0){let o=Number.parseInt(String(t["@_sz"]),10);Number.isFinite(o)&&(e.fontSize=o/100*(96/72));}t["@_b"]!==void 0&&(e.bold=t["@_b"]==="1"),t["@_i"]!==void 0&&(e.italic=t["@_i"]==="1");let r=t["a:solidFill"],n=this.parseColor(r);n&&(e.color=n),r&&(e.colorChoiceXml=r);let i=t["a:latin"];if(i?.["@_typeface"]){let o=String(i["@_typeface"]),a=this.resolveThemeTypeface(o);e.fontFamily=a??o;}}};}}),vht,_ue=T({"src/core/core/runtime/PptxHandlerRuntimePlaceholderDefaults.ts"(){Cue(),vht=class nh extends xht{extractPlaceholderDefaultsFromShape(e){let n=e["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];if(!n)return null;let i=n["@_type"],o=n["@_idx"],s={type:i!==void 0?String(i).toLowerCase():"body"};if(o!==void 0){let p=Number.parseInt(String(o),10);Number.isFinite(p)&&(s.idx=p);}let l=e["p:txBody"],c=l?.["a:bodyPr"];if(c){let p=c["@_lIns"];if(p!==void 0){let x=Number.parseInt(String(p),10);Number.isFinite(x)&&(s.bodyInsetLeft=x/nh.EMU_PER_PX);}let u=c["@_tIns"];if(u!==void 0){let x=Number.parseInt(String(u),10);Number.isFinite(x)&&(s.bodyInsetTop=x/nh.EMU_PER_PX);}let f=c["@_rIns"];if(f!==void 0){let x=Number.parseInt(String(f),10);Number.isFinite(x)&&(s.bodyInsetRight=x/nh.EMU_PER_PX);}let h=c["@_bIns"];if(h!==void 0){let x=Number.parseInt(String(h),10);Number.isFinite(x)&&(s.bodyInsetBottom=x/nh.EMU_PER_PX);}let g=String(c["@_anchor"]||"").trim();if(g.length>0&&(s.textAnchor=g),c["a:spAutoFit"]!==void 0)s.autoFit=true,s.autoFitMode="shrink";else if(c["a:normAutofit"]!==void 0){s.autoFit=true,s.autoFitMode="normal";let x=parseInt(String(c["a:normAutofit"]?.["@_fontScale"]||""),10);Number.isFinite(x)&&x>0&&(s.autoFitFontScale=x/1e5);let v=parseInt(String(c["a:normAutofit"]?.["@_lnSpcReduction"]||""),10);Number.isFinite(v)&&v>0&&(s.autoFitLineSpacingReduction=v/1e5);}else c["a:noAutofit"]!==void 0&&(s.autoFit=false,s.autoFitMode="none");let y=String(c["@_wrap"]||"").trim().toLowerCase();(y==="none"||y==="square")&&(s.textWrap=y);}let d=l?.["a:lstStyle"];if(d){let p={};for(let f=1;f<=9;f++){let h=`a:lvl${f}pPr`,g=this.parsePlaceholderLevelStyle(d[h]);g&&(p[f-1]=g);}let u=this.parsePlaceholderLevelStyle(d["a:defPPr"]);u&&(p[-1]=u),Object.keys(p).length>0&&(s.levelStyles=p);}if(l){let p=this.ensureArray(l["a:p"]),u=[];for(let h of p){let g=this.ensureArray(h?.["a:r"]);for(let x of g){if(!x)continue;let v=x["a:t"];v!==void 0&&u.push(String(v));}h?.["a:t"]!==void 0&&u.push(String(h["a:t"]));let y=this.ensureArray(h?.["a:fld"]);for(let x of y){if(!x)continue;let v=x["a:t"];v!==void 0&&u.push(String(v));}}let f=u.join("").trim();f.length>0&&(s.promptText=f);}return s}};}});function Sx(t){if(!t)return;let e={};return t["@_hdr"]!==void 0&&(e.hasHeader=String(t["@_hdr"])!=="0"),t["@_ftr"]!==void 0&&(e.hasFooter=String(t["@_ftr"])!=="0"),t["@_dt"]!==void 0&&(e.hasDateTime=String(t["@_dt"])!=="0"),t["@_sldNum"]!==void 0&&(e.hasSlideNumber=String(t["@_sldNum"])!=="0"),Object.keys(e).length>0?e:void 0}var bht,Sht=T({"src/core/core/runtime/PptxHandlerRuntimeMasterElements.ts"(){iu(),Ps(),Pt(),_ue(),bht=class extends vht{parseTextListStyle(t){if(!t)return;let e={},r=this.parsePlaceholderLevelStyle(t["a:defPPr"]);r&&(e[-1]=r);for(let n=1;n<=9;n++){let i=this.parsePlaceholderLevelStyle(t[`a:lvl${n}pPr`]);i&&(e[n-1]=i);}return Object.keys(e).length>0?e:void 0}parseMasterTxStyles(t){let e=t?.["p:txStyles"];if(!e)return;let r=this.parseTextListStyle(e["p:titleStyle"]),n=this.parseTextListStyle(e["p:bodyStyle"]),i=this.parseTextListStyle(e["p:otherStyle"]);if(!r&&!n&&!i)return;let o={};return r&&(o.titleStyle=r),n&&(o.bodyStyle=n),i&&(o.otherStyle=i),o}async enrichSlideMastersWithTxStyles(t){for(let e of t)try{let r=this.masterXmlMap.get(e.path);if(!r){let a=await this.zip.file(e.path)?.async("string");if(!a)continue;r=this.parser.parse(a),this.masterXmlMap.set(e.path,r);}let n=r["p:sldMaster"];if(!n)continue;let i=this.parseMasterTxStyles(n);i&&(e.txStyles=i,this.masterTxStylesCache.set(e.path,i));let o=Sx(n["p:hf"]);o&&(e.headerFooter=o);}catch(r){console.warn("Failed to parse master txStyles:",r);}}parsePresentationDefaultTextStyle(){let e=this.presentationData?.["p:presentation"]?.["p:defaultTextStyle"];if(!e){this.presentationDefaultTextStyle=void 0;return}let r={};for(let i=1;i<=9;i++){let o=this.parsePlaceholderLevelStyle(e[`a:lvl${i}pPr`]);o&&(r[i-1]=o);}let n=this.parsePlaceholderLevelStyle(e["a:defPPr"]);n&&(r[-1]=n),this.presentationDefaultTextStyle=Object.keys(r).length>0?{type:"body",levelStyles:r}:void 0;}async getMasterElements(t){let e=this.slideRelsMap.get(t);if(!e)return [];let r;for(let[,i]of e.entries())if(i.includes("slideMaster")){let o=t.substring(0,t.lastIndexOf("/")+1);r=i.startsWith("/")?i.substring(1):i.startsWith("..")?this.resolvePath(o,i):`ppt/${hr(i)}`;break}if(!r)return [];if(this.masterCache.has(r))return this.masterCache.get(r);let n=r.split("/").pop()?.replace(/\.xml$/u,"")??r;try{let i=await this.zip.file(r)?.async("string");if(!i)return [];let o=this.masterXmlMap.get(r)??this.parser.parse(i);this.masterXmlMap.set(r,o);let a=as(r);await this.loadSlideRelationships(r,a);let s=At(o,"p:sldMaster","p:cSld","p:spTree");if(!s)return this.masterCache.set(r,[]),[];this.unwrapAlternateContent(s);let l=this.ensureArray(s["p:sp"]),c=new Set;for(let u=0;u<l.length;u++){let f=l[u];if(f["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"]){c.add(u);let y=this.extractPlaceholderDefaultsFromShape(f);if(y){this.masterPlaceholderDefaultsCache.has(r)||this.masterPlaceholderDefaultsCache.set(r,new Map);let x={type:y.type,idx:y.idx!==void 0?String(y.idx):void 0},v=this.buildPlaceholderDefaultsKey(x);this.masterPlaceholderDefaultsCache.get(r).set(v,y);}}}let d=this.extractSpTreeChildOrder(i,s,"p:spTree"),p=[];for(let u of d)if(u.tag==="p:sp"){if(c.has(u.indexInType))continue;let f=l[u.indexInType];if(!f)continue;let h=f["p:spPr"],g=null;h?.["a:blipFill"]?g=await this.parseShapeWithImageFill(f,`master-shape-img-${n}-${u.indexInType}`,r):g=this.parseShape(f,`master-shape-${n}-${u.indexInType}`,r),g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:pic"){let h=this.ensureArray(s["p:pic"])[u.indexInType];if(!h)continue;let g=await this.parsePicture(h,`master-pic-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:graphicFrame"){let h=this.ensureArray(s["p:graphicFrame"])[u.indexInType];if(!h)continue;let g=this.parseGraphicFrame(h,`master-frame-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:cxnSp"){let h=this.ensureArray(s["p:cxnSp"])[u.indexInType];if(!h)continue;let g=this.parseConnector(h,`master-conn-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:grpSp"){let h=this.ensureArray(s["p:grpSp"])[u.indexInType];if(!h)continue;let g=await this.parseGroupShapeAsGroup(h,`master-group-${n}-${u.indexInType}`,r,i);g&&(g.id=`master-${g.id}`,p.push(g));}return this.masterCache.set(r,p),p}catch(i){return console.warn("Failed to parse master:",i),[]}}};}}),wht,Aue=T({"src/core/core/runtime/PptxHandlerRuntimeAuxiliaryMasterElements.ts"(){nu(),_st(),Y1(),oR(),qQt(),Sht(),wht=class extends bht{async enrichMasterPartElements(t,e){if(!t)return;let r=t.path;WQt(this,r,t.backgroundColor);let n=await this.zip.file(r)?.async("string");if(!n)return;let i=this.parser.parse(n),o=i[e];if(e==="p:notesMaster"){let p=this.parseTextListStyle(o?.["p:notesStyle"]);p&&(t.notesStyle=p);}let s=o?.["p:cSld"]?.["p:spTree"];if(!s){t.elements=[];return}let l=r.slice(r.lastIndexOf("/")+1),c=r.slice(0,r.lastIndexOf("/"));this.slideRelsMap.has(r)||await this.loadSlideRelationships(r,`${c}/_rels/${l}.rels`),t.backgroundImage=await this.extractBackgroundImage(i,r,e),t.backgroundImageProperties=this.extractBackgroundImageProperties(i,e),this.unwrapAlternateContent(s);let d=this.currentSlideClrMapOverride;if(e==="p:sldLayout"){let p=this.parseLayoutClrMapOverride(i);p&&(this.currentSlideClrMapOverride=p);}try{t.elements=await this.parseSpTreeChildren(s,r,n,"p:spTree",KQt(e,r));}finally{this.currentSlideClrMapOverride=d;}Pit(t.elements,void 0,void 0),VQt(this,r,t.elements),this.rememberUnparsedMasterNodes(r,s,t.elements);}async enrichSlideMasterElements(t){for(let e of t)try{this.applyMasterThemeState(e.path),await this.enrichMasterPartElements(e,"p:sldMaster");for(let r of e.layouts??[])await this.enrichMasterPartElements(r,"p:sldLayout");}catch(r){console.warn(`Failed to parse slide master elements for ${e.path}:`,r);}this.applyMasterThemeState(void 0);}async enrichAuxiliaryMasterElements(t,e){await this.enrichMasterPartElements(t,e);}rememberUnparsedMasterNodes(t,e,r){let n=new Set(r.map(o=>o.rawXml).filter(Boolean)),i=new Map;for(let o of ["p:sp","p:pic","p:cxnSp","p:graphicFrame","p:grpSp","p16:model3D","p:contentPart"]){let a=this.ensureArray(e[o]).filter(s=>!n.has(s));a.length>0&&i.set(o,a);}XQt(this,t,i);}};}}),Tht,Pue=T({"src/core/core/runtime/PptxHandlerRuntimeLayoutElements.ts"(){iu(),Ps(),Pt(),Aue(),Tht=class extends wht{async getLayoutElements(t){let e=this.slideRelsMap.get(t);if(!e)return [];let r;for(let[,n]of e.entries())if(n.includes("slideLayout")){let i=t.substring(0,t.lastIndexOf("/")+1);r=n.startsWith("/")?n.substring(1):n.startsWith("..")?this.resolvePath(i,n):`ppt/${hr(n)}`;break}return r?this.getLayoutElementsByPath(r):[]}async getLayoutElementsByPath(t){if(this.layoutCache.has(t))return this.layoutCache.get(t);let e=t.split("/").pop()?.replace(/\.xml$/u,"")??t;try{let r=await this.zip.file(t)?.async("string");if(!r)return [];let n=this.layoutXmlMap.get(t)??this.parser.parse(r);this.layoutXmlMap.set(t,n);let i=as(t);await this.loadSlideRelationships(t,i);let o=this.parseLayoutClrMapOverride(n),a=this.currentSlideClrMapOverride;o&&(this.currentSlideClrMapOverride=o);let s=n["p:sldLayout"]?.["p:cSld"]?.["p:spTree"];if(!s)return this.layoutCache.set(t,[]),[];this.unwrapAlternateContent(s);let l=this.ensureArray(s["p:sp"]),c=new Set;for(let y=0;y<l.length;y++){let x=l[y];if(At(x,"p:nvSpPr","p:nvPr","p:ph")){c.add(y);let b=this.extractPlaceholderDefaultsFromShape(x);if(b){this.layoutPlaceholderDefaultsCache.has(t)||this.layoutPlaceholderDefaultsCache.set(t,new Map);let S={type:b.type,idx:b.idx!==void 0?String(b.idx):void 0},w=this.buildPlaceholderDefaultsKey(S);this.layoutPlaceholderDefaultsCache.get(t).set(w,b);}}}let d=this.extractSpTreeChildOrder(r,s,"p:spTree"),p=[];for(let y of d)if(y.tag==="p:sp"){if(c.has(y.indexInType))continue;let x=l[y.indexInType];if(!x)continue;let v=Q(x,"p:spPr"),b=null;v&&Q(v,"a:blipFill")?b=await this.parseShapeWithImageFill(x,`layout-shape-img-${e}-${y.indexInType}`,t):b=this.parseShape(x,`layout-shape-${e}-${y.indexInType}`,t),b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:pic"){let v=this.ensureArray(s["p:pic"])[y.indexInType];if(!v)continue;let b=await this.parsePicture(v,`layout-pic-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:graphicFrame"){let v=this.ensureArray(s["p:graphicFrame"])[y.indexInType];if(!v)continue;let b=this.parseGraphicFrame(v,`layout-frame-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:cxnSp"){let v=this.ensureArray(s["p:cxnSp"])[y.indexInType];if(!v)continue;let b=this.parseConnector(v,`layout-conn-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:grpSp"){let v=this.ensureArray(s["p:grpSp"])[y.indexInType];if(!v)continue;let b=await this.parseGroupShapeAsGroup(v,`layout-group-${e}-${y.indexInType}`,t,r);b&&(b.id=`layout-${b.id}`,p.push(b));}let u=_t(Q(n,"p:sldLayout"),"showMasterSp"),h=u===void 0||u.trim().toLowerCase()!=="0"&&u.trim().toLowerCase()!=="false"?await this.getMasterElements(t):[];this.currentSlideClrMapOverride=a;let g=[...h,...p];return this.templateElementBaselines.recordBaselines(g),this.layoutCache.set(t,g),g}catch(r){return console.warn("Failed to parse layout:",r),[]}}};}}),Cht,kue=T({"src/core/core/runtime/PptxHandlerRuntimeLayoutPreviews.ts"(){Rr(),Pt(),Pue(),Cht=class extends Tht{layoutPreviewCache=new Map;async getLayoutPreview(t){let e=this.layoutPreviewCache.get(t);if(e)return e;let r=this.layoutXmlMap.get(t);if(!r)return null;let n=this.eagerDecodeImages;n||(this.layoutCache.delete(t),this.eagerDecodeImages=true);let i;try{i=await this.getLayoutElementsByPath(t);}finally{this.eagerDecodeImages=n;}let o=At(r,"p:sldLayout","p:cSld"),a=this.resolveLayoutPreviewBackground(t,o),s={path:t,width:this.rawSlideWidthEmu/oe,height:this.rawSlideHeightEmu/oe,...a,elements:i,placeholders:this.extractPlaceholderList(Q(o,"p:spTree"))};return this.layoutPreviewCache.set(t,s),s}async getLayoutPreviews(t){let e=t??[...this.layoutXmlMap.keys()],r=[];for(let n of e){let i=await this.getLayoutPreview(n);i&&r.push(i);}return r}invalidateLayoutPreviews(t){t?this.layoutPreviewCache.delete(t):this.layoutPreviewCache.clear();}resolveLayoutPreviewBackground(t,e){let r=this.parseBackgroundColor(Q(e,"p:bg"));if(r)return {backgroundColor:r};let n=this.resolveMasterPathForLayout(t),i=n?this.masterXmlMap.get(n):void 0,o=this.parseBackgroundColor(Q(At(i,"p:sldMaster","p:cSld"),"p:bg"));return o?{backgroundColor:o}:{}}};}});function DU(t,e){if(!t)return [];let r=new RegExp(`<${e.replace(":","\\:")}\\b[^>]*>`),n=new RegExp(`</${e.replace(":","\\:")}\\s*>`),i=r.exec(t);if(!i)return [];let o=i.index+i[0].length,a=n.exec(t.slice(o));if(!a)return [];let s=t.slice(o,o+a.index),l=[],c=/<a:(solidFill|gradFill|pattFill|noFill|grpFill)\b/g,d;for(;(d=c.exec(s))!==null;)l.push(`a:${d[1]}`);return l}var n_,_ht,Eue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeFormatScheme.ts"(){kue(),n_=["a:solidFill","a:gradFill","a:pattFill","a:noFill","a:grpFill"],_ht=class Ln extends Cht{buildFillStyleEntry(e,r){switch(e){case "a:solidFill":return {kind:"solid",color:this.parseColor(r),opacity:this.extractColorOpacity(r),rawNode:r};case "a:gradFill":return {kind:"gradient",color:this.extractGradientFillColor(r),opacity:this.extractGradientOpacity(r),gradientStops:this.extractGradientStops(r),gradientAngle:this.extractGradientAngle(r),gradientType:this.extractGradientType(r),gradientCss:this.extractGradientFillCss(r),rawNode:r};case "a:pattFill":return {kind:"pattern",color:this.parseColor(r["a:fgClr"])||this.parseColor(r["a:bgClr"]),patternPreset:String(r["@_prst"]||"").trim()||void 0,patternBackgroundColor:this.parseColor(r["a:bgClr"])||void 0,rawNode:r};case "a:noFill":return {kind:"none",rawNode:r};case "a:grpFill":return {kind:"group",rawNode:r}}}collectFillChildren(e,r){let n={"a:solidFill":this.ensureArray(e["a:solidFill"]),"a:gradFill":this.ensureArray(e["a:gradFill"]),"a:pattFill":this.ensureArray(e["a:pattFill"]),"a:noFill":this.ensureArray(e["a:noFill"]),"a:grpFill":this.ensureArray(e["a:grpFill"])};if(r&&r.length>0){let o={"a:solidFill":0,"a:gradFill":0,"a:pattFill":0,"a:noFill":0,"a:grpFill":0},a=[];for(let s of r){let l=o[s],c=n[s][l];c&&(a.push(this.buildFillStyleEntry(s,c)),o[s]=l+1);}for(let s of n_)for(;o[s]<n[s].length;)a.push(this.buildFillStyleEntry(s,n[s][o[s]])),o[s]+=1;return a}let i=[];for(let o of n_)for(let a of n[o])i.push(this.buildFillStyleEntry(o,a));return i}parseFillStyleList(e,r){return e?this.collectFillChildren(e,r):[]}parseLineStyleList(e){return e?this.ensureArray(e["a:ln"]).map(n=>{let i=n,o={rawNode:i};if(i["@_w"]&&(o.width=parseInt(String(i["@_w"]))/Ln.EMU_PER_PX),i["a:solidFill"])o.color=this.parseColor(i["a:solidFill"]),o.opacity=this.extractColorOpacity(i["a:solidFill"]);else if(i["a:gradFill"])o.color=this.extractGradientFillColor(i["a:gradFill"]);else if(i["a:pattFill"]){let d=i["a:pattFill"];o.color=this.parseColor(d["a:fgClr"])||this.parseColor(d["a:bgClr"]);}let a=i["a:prstDash"]?.["@_val"],s=this.normalizeStrokeDashType(a);s&&(o.dash=s),"a:round"in i?o.lineJoin="round":"a:bevel"in i?o.lineJoin="bevel":"a:miter"in i&&(o.lineJoin="miter");let l=String(i["@_cap"]||"").trim().toLowerCase();(l==="rnd"||l==="sq"||l==="flat")&&(o.lineCap=l);let c=String(i["@_cmpd"]||"").trim();return (c==="sng"||c==="dbl"||c==="thickThin"||c==="thinThick"||c==="tri")&&(o.compoundLine=c),o}):[]}parseEffectStyleList(e){return e?this.ensureArray(e["a:effectStyle"]).map(n=>{let i=n,o=i["a:effectLst"]??i["a:effectDag"],a={rawNode:i};if(!o)return a;let s=o["a:outerShdw"];if(s){a.shadowColor=this.parseColor(s),a.shadowOpacity=this.extractColorOpacity(s);let h=parseInt(String(s["@_blurRad"]||"0"));Number.isFinite(h)&&h>0&&(a.shadowBlur=h/Ln.EMU_PER_PX);let g=parseInt(String(s["@_dist"]||"0")),y=parseInt(String(s["@_dir"]||"0"));if(Number.isFinite(g)&&g>0&&Number.isFinite(y)){let x=y/6e4*(Math.PI/180);a.shadowOffsetX=Math.cos(x)*g/Ln.EMU_PER_PX,a.shadowOffsetY=Math.sin(x)*g/Ln.EMU_PER_PX;}}let l=o["a:innerShdw"];if(l){a.innerShadowColor=this.parseColor(l),a.innerShadowOpacity=this.extractColorOpacity(l);let h=parseInt(String(l["@_blurRad"]||"0"));Number.isFinite(h)&&h>0&&(a.innerShadowBlur=h/Ln.EMU_PER_PX);let g=parseInt(String(l["@_dist"]||"0")),y=parseInt(String(l["@_dir"]||"0"));if(Number.isFinite(g)&&g>0&&Number.isFinite(y)){let x=y/6e4*(Math.PI/180);a.innerShadowOffsetX=Math.cos(x)*g/Ln.EMU_PER_PX,a.innerShadowOffsetY=Math.sin(x)*g/Ln.EMU_PER_PX;}}let c=o["a:glow"];if(c){a.glowColor=this.parseColor(c),a.glowOpacity=this.extractColorOpacity(c);let h=parseInt(String(c["@_rad"]||"0"));Number.isFinite(h)&&h>0&&(a.glowRadius=h/Ln.EMU_PER_PX);}let d=o["a:softEdge"];if(d){let h=parseInt(String(d["@_rad"]||"0"));Number.isFinite(h)&&h>0&&(a.softEdgeRadius=h/Ln.EMU_PER_PX);}let p=o["a:reflection"];if(p){let h=parseInt(String(p["@_blurRad"]||"0"));Number.isFinite(h)&&h>=0&&(a.reflectionBlurRadius=h/Ln.EMU_PER_PX);let g=parseInt(String(p["@_stA"]||""));Number.isFinite(g)&&(a.reflectionStartOpacity=g/1e5);let y=parseInt(String(p["@_endA"]||""));Number.isFinite(y)&&(a.reflectionEndOpacity=y/1e5);let x=parseInt(String(p["@_endPos"]||""));Number.isFinite(x)&&(a.reflectionEndPosition=x/1e5);let v=parseInt(String(p["@_dir"]||""));Number.isFinite(v)&&(a.reflectionDirection=v/6e4);let b=parseInt(String(p["@_rot"]||""));Number.isFinite(b)&&(a.reflectionRotation=b/6e4);let S=parseInt(String(p["@_dist"]||"0"));Number.isFinite(S)&&S>=0&&(a.reflectionDistance=S/Ln.EMU_PER_PX);}let u=i["a:scene3d"];if(u){let h=u["a:camera"],g=u["a:lightRig"];a.scene3d={cameraPreset:String(h?.["@_prst"]||"").trim()||void 0,lightRigType:String(g?.["@_rig"]||"").trim()||void 0,lightRigDirection:String(g?.["@_dir"]||"").trim()||void 0};}let f=i["a:sp3d"];if(f){let h=f["a:bevelT"],g=f["a:bevelB"];a.shape3d={extrusionHeight:f["@_extrusionH"]!==void 0?parseInt(String(f["@_extrusionH"]),10):void 0,extrusionColor:this.parseColor(f["a:extrusionClr"]),contourWidth:f["@_contourW"]!==void 0?parseInt(String(f["@_contourW"]),10):void 0,contourColor:this.parseColor(f["a:contourClr"]),presetMaterial:String(f["@_prstMaterial"]||"").trim()||void 0,bevelTopType:h?String(h["@_prst"]||"circle").trim():void 0,bevelTopWidth:h!==void 0&&h["@_w"]!==void 0?parseInt(String(h["@_w"]),10):void 0,bevelTopHeight:h!==void 0&&h["@_h"]!==void 0?parseInt(String(h["@_h"]),10):void 0,bevelBottomType:g?String(g["@_prst"]||"circle").trim():void 0,bevelBottomWidth:g!==void 0&&g["@_w"]!==void 0?parseInt(String(g["@_w"]),10):void 0,bevelBottomHeight:g!==void 0&&g["@_h"]!==void 0?parseInt(String(g["@_h"]),10):void 0};}return a}):[]}};}}),Aht,Iue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeOverrides.ts"(){Cst(),Eue(),Aht=class extends _ht{parseFormatScheme(t,e){let r=String(t["@_name"]||"").trim()||void 0,n=DU(e,"a:fillStyleLst"),i=DU(e,"a:bgFillStyleLst"),o=t["a:fillStyleLst"],a=this.parseFillStyleList(o,n),s=t["a:lnStyleLst"],l=this.parseLineStyleList(s),c=t["a:effectStyleLst"],d=this.parseEffectStyleList(c),p=t["a:bgFillStyleLst"],u=this.parseFillStyleList(p,i);return {name:r,fillStyles:a,lineStyles:l,effectStyles:d,backgroundFillStyles:u}}parseClrMapOverrideNode(t){if(!t||t["a:masterClrMapping"]!==void 0)return null;let e=t["a:overrideClrMapping"];return e?Sst(e,(r,n)=>{console.warn(`Ignoring a:overrideClrMapping/@${r}="${n}": not an ST_ColorSchemeIndex token.`);}):null}parseSlideClrMapOverride(t){let e=t["p:sld"]?.["p:clrMapOvr"];return this.parseClrMapOverrideNode(e)}parseLayoutClrMapOverride(t){let e=t["p:sldLayout"]?.["p:clrMapOvr"];return this.parseClrMapOverrideNode(e)}applyThemeOverrideState(t){let e={...this.themeColorMap},r={...this.themeFontMap},n=this.themeFormatScheme;if(t.colorOverrides){for(let[i,o]of Object.entries(t.colorOverrides))if(i.startsWith("__fontOverride_")){let a=i.replace("__fontOverride_","");this.themeFontMap[a]=o,a==="mj-lt"?(this.themeFontMap["mj-ea"]=o,this.themeFontMap["mj-cs"]=o):a==="mn-lt"&&(this.themeFontMap["mn-ea"]=o,this.themeFontMap["mn-cs"]=o);}else this.themeColorMap[i]=o;this.themeColorMap.tx1=this.themeColorMap.dk1||e.dk1,this.themeColorMap.bg1=this.themeColorMap.lt1||e.lt1,this.themeColorMap.tx2=this.themeColorMap.dk2||e.dk2,this.themeColorMap.bg2=this.themeColorMap.lt2||e.lt2;}return t.formatSchemeOverride&&(this.themeFormatScheme=t.formatSchemeOverride),()=>{this.themeColorMap=e,this.themeFontMap=r,this.themeFormatScheme=n;}}async loadThemeOverride(t){let e=this.slideRelsMap.get(t);if(!e)return null;let r;for(let[,i]of e)if(i.includes("themeOverride")){let o=t.substring(0,t.lastIndexOf("/")+1);r=this.resolvePath(o,i);break}if(!r)return null;let n=this.themeOverrideCache.get(r);if(n)return n;try{let i=await this.zip.file(r)?.async("string");if(!i)return null;let a=this.parser.parse(i)["a:themeOverride"];if(!a)return null;let s={},l=a["a:clrScheme"];if(l){let p={},u=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let f of u){let h=l[`a:${f}`],g=this.parseColorChoice(h);g&&(p[f]=g);}Object.keys(p).length>0&&(s.colorOverrides=p);}let c=a["a:fmtScheme"];c&&(s.formatSchemeOverride=this.parseFormatScheme(c));let d=a["a:fontScheme"];if(d){let p=d["a:majorFont"],u=d["a:minorFont"],f=p?.["a:latin"],h=u?.["a:latin"],g=this.normalizeTypefaceToken(String(f?.["@_typeface"]||"")),y=this.normalizeTypefaceToken(String(h?.["@_typeface"]||""));s.colorOverrides||(s.colorOverrides={}),g&&(s.colorOverrides["__fontOverride_mj-lt"]=g),y&&(s.colorOverrides["__fontOverride_mn-lt"]=y);}return this.themeOverrideCache.set(r,s),s}catch(i){return console.warn(`Failed to load theme override at ${r}:`,i),null}}};}}),Pht,Mue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeRefResolution.ts"(){ae(),Iue(),Pht=class extends Aht{resolveThemeEffectRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10);Number.isFinite(r)&&r>0&&(e.effectRefIdx=r);let n=iC(t);if(n&&(e.effectRefColorXml=n),!Number.isFinite(r)||r<=0||!this.themeFormatScheme||r>this.themeFormatScheme.effectStyles.length)return;let i=this.themeFormatScheme.effectStyles[r-1];if(!i)return;let o=this.parseColor(t);o&&i.rawNode&&(i=hy(this.themeColorMap,o,()=>this.parseEffectStyleList({"a:effectStyle":i.rawNode})[0]??i)),i.shadowColor&&!e.shadowColor&&(e.shadowColor=i.shadowColor,e.shadowBlur=i.shadowBlur,e.shadowOffsetX=i.shadowOffsetX,e.shadowOffsetY=i.shadowOffsetY,e.shadowOpacity=i.shadowOpacity),i.innerShadowColor&&!e.innerShadowColor&&(e.innerShadowColor=i.innerShadowColor,e.innerShadowBlur=i.innerShadowBlur,e.innerShadowOffsetX=i.innerShadowOffsetX,e.innerShadowOffsetY=i.innerShadowOffsetY,e.innerShadowOpacity=i.innerShadowOpacity),i.glowColor&&!e.glowColor&&(e.glowColor=i.glowColor,e.glowRadius=i.glowRadius,e.glowOpacity=i.glowOpacity),i.softEdgeRadius&&!e.softEdgeRadius&&(e.softEdgeRadius=i.softEdgeRadius),i.reflectionBlurRadius!==void 0&&e.reflectionBlurRadius===void 0&&(e.reflectionBlurRadius=i.reflectionBlurRadius,e.reflectionStartOpacity=i.reflectionStartOpacity,e.reflectionEndOpacity=i.reflectionEndOpacity,e.reflectionEndPosition=i.reflectionEndPosition,e.reflectionDirection=i.reflectionDirection,e.reflectionRotation=i.reflectionRotation,e.reflectionDistance=i.reflectionDistance),i.scene3d&&!e.scene3d&&(e.scene3d=i.scene3d),i.shape3d&&!e.shape3d&&(e.shape3d=i.shape3d);}resolveThemeLineRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10),n=this.parseColor(t);Number.isFinite(r)&&r>0&&(e.lnRefIdx=r);let i=iC(t);if(i&&(e.lnRefColorXml=i),!Number.isFinite(r)||r<=0||!this.themeFormatScheme||r>this.themeFormatScheme.lineStyles.length){e.strokeColor=n,n&&(e.strokeWidth=1);return}let o=this.themeFormatScheme.lineStyles[r-1];if(!o){e.strokeColor=n,n&&(e.strokeWidth=1);return}n&&o.rawNode&&(o=hy(this.themeColorMap,n,()=>this.parseLineStyleList({"a:ln":o.rawNode})[0]??o)),e.strokeColor=o.color||n,o.opacity!==void 0&&(e.strokeOpacity=o.opacity),o.width!==void 0&&o.width>0?e.strokeWidth=o.width:e.strokeColor&&(e.strokeWidth=1),o.dash&&(e.strokeDash=o.dash),o.lineJoin&&(e.lineJoin=o.lineJoin),o.lineCap&&(e.lineCap=o.lineCap),o.compoundLine&&(e.compoundLine=o.compoundLine);}reResolveGradientWithPhClr(t,e){return hy(this.themeColorMap,e,()=>{let r=this.extractGradientStops(t),n=this.extractGradientType(t),i=this.extractGradientAngle(t);return {stops:r,css:this.buildGradientCssFromStops(r,n,i)}})}resolveThemeFillRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10);Number.isFinite(r)&&r>0&&(e.fillRefIdx=r);let n=iC(t);if(n&&(e.fillRefColorXml=n),r===0||r===1e3){e.fillMode="none",e.fillColor="transparent",e.fillOpacity=0;return}if(!Number.isFinite(r)||r<=0||!this.themeFormatScheme){e.fillMode="theme",e.fillColor=this.parseColor(t);return}let i;if(r>=1001){let s=r-1001;i=this.themeFormatScheme.backgroundFillStyles[s];}else i=this.themeFormatScheme.fillStyles[r-1];if(!i){e.fillMode="theme",e.fillColor=this.parseColor(t);return}let o=this.parseColor(t),a=i.kind==="solid"?"a:solidFill":i.kind==="pattern"?"a:pattFill":void 0;if(a&&o&&i.rawNode){let s=i.rawNode;i=hy(this.themeColorMap,o,()=>this.parseFillStyleList({[a]:s})[0]??i);}switch(i.kind){case "solid":{e.fillMode="solid",e.fillColor=i.color||o,e.fillOpacity=i.opacity;break}case "gradient":{if(e.fillMode="gradient",i.rawNode&&o){let s=this.reResolveGradientWithPhClr(i.rawNode,o);e.fillGradientStops=s.stops,e.fillGradient=s.css;}else e.fillGradientStops=i.gradientStops,e.fillGradient=i.gradientCss;e.fillGradientAngle=i.gradientAngle,e.fillGradientType=i.gradientType,e.fillColor=i.color||o;break}case "pattern":{e.fillMode="pattern",e.fillColor=i.color||o,i.patternPreset&&(e.fillPatternPreset=i.patternPreset),i.patternBackgroundColor&&(e.fillPatternBackgroundColor=i.patternBackgroundColor);break}case "none":{e.fillMode="none",e.fillColor="transparent",e.fillOpacity=0;break}}}};}});function Rue(t){return /^ppt\/theme\/(?!themeOverride)[^/]+\.xml$/iu.test(t)}var kht,Lue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeLoading.ts"(){Mue(),kht=class extends Pht{async resolvePrimaryThemePath(){let t=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!t||t.length===0)return;let e=t[0].name,r=e.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),n=this.zip.file(r);if(!n)return;let i=this.parser.parse(await n.async("string")),o=this.ensureArray(i?.Relationships?.Relationship);for(let a of o){let s=String(a["@_Target"]||"");if(!s.includes("theme"))continue;let l=s.startsWith("..")?this.resolvePath(e.substring(0,e.lastIndexOf("/")+1),s):s.startsWith("/")?s.slice(1):`ppt/${s.replace(/^\.?\//,"")}`;if(l.startsWith("ppt/theme/"))return l}}async parseThemeOptions(){let t=Object.values(this.zip.files).filter(r=>!r.dir&&Rue(r.name));if(!t||t.length===0)return [];let e=[];for(let r of t)try{let n=await r.async("string"),o=this.parser.parse(n)["a:theme"],a=String(o?.["@_name"]||"").trim();e.push({path:r.name,name:a.length>0?a:void 0});}catch{e.push({path:r.name});}return e}async getAvailableThemes(){return this.parseThemeOptions()}buildThemeObject(){let t=Object.keys(this.themeColorMap).length>0,e=Object.keys(this.themeFontMap).length>0;if(!t&&!e)return;let r;t&&(r={dk1:this.themeColorMap.dk1||"",lt1:this.themeColorMap.lt1||"",dk2:this.themeColorMap.dk2||"",lt2:this.themeColorMap.lt2||"",accent1:this.themeColorMap.accent1||"",accent2:this.themeColorMap.accent2||"",accent3:this.themeColorMap.accent3||"",accent4:this.themeColorMap.accent4||"",accent5:this.themeColorMap.accent5||"",accent6:this.themeColorMap.accent6||"",hlink:this.themeColorMap.hlink||"",folHlink:this.themeColorMap.folHlink||""});let n;if(e){let i=this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts),o=this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);n={majorFont:{latin:this.themeFontMap["mj-lt"],eastAsia:this.themeFontMap["mj-ea"],complexScript:this.themeFontMap["mj-cs"],...Object.keys(i).length>0?{byScript:i}:{}},minorFont:{latin:this.themeFontMap["mn-lt"],eastAsia:this.themeFontMap["mn-ea"],complexScript:this.themeFontMap["mn-cs"],...Object.keys(o).length>0?{byScript:o}:{}}};}return {colorScheme:r,fontScheme:n,formatScheme:this.themeFormatScheme}}async applySlideMasterColorMap(t){let e=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!e||e.length===0)return;let r=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let n of e)try{let i=await n.async("string"),a=this.parser.parse(i)?.["p:sldMaster"]?.["p:clrMap"];if(!a)continue;let s={};for(let l of r){let c=String(a[`@_${l}`]||"").trim().toLowerCase();c&&(s[l]=c);}Object.keys(s).length>0&&this.masterClrMaps.set(n.name,s);}catch(i){console.warn(`Failed to parse slide master color map for ${n.name}:`,i);}}async parseThemePart(t){let e=this.zip.file(t);if(!e)return null;let r=await e.async("string");this.originalThemeXmlByPath.set(t,r);let i=this.parser.parse(r)["a:theme"],o=i?.["a:themeElements"],a=o?.["a:clrScheme"],s=o?.["a:fontScheme"],l=o?.["a:fmtScheme"],c=String(i?.["@_name"]||"").trim();c&&this.masterThemeNames.set(t,c);let d=String(a?.["@_name"]||"").trim();d&&this.masterThemeColorSchemeNames.set(t,d);let p=String(s?.["@_name"]||"").trim();p&&this.masterThemeFontSchemeNames.set(t,p);let f={...this.getDefaultSchemeColorMap()};if(a){let F=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let D of F){let U=a[`a:${D}`],j=this.parseColorChoice(U);j&&(f[D]=j);}}let h=s?.["a:majorFont"],g=s?.["a:minorFont"],y=h?.["a:latin"],x=g?.["a:latin"],v=this.normalizeTypefaceToken(String(y?.["@_typeface"]||"")),b=this.normalizeTypefaceToken(String(x?.["@_typeface"]||"")),S={};v&&(S["mj-lt"]=v,S["mj-ea"]=v,S["mj-cs"]=v),b&&(S["mn-lt"]=b,S["mn-ea"]=b,S["mn-cs"]=b);let w=this.normalizeTypefaceToken(String(h?.["a:ea"]?.["@_typeface"]||""));w&&(S["mj-ea"]=w);let C=this.normalizeTypefaceToken(String(h?.["a:cs"]?.["@_typeface"]||""));C&&(S["mj-cs"]=C);let _=this.normalizeTypefaceToken(String(g?.["a:ea"]?.["@_typeface"]||""));_&&(S["mn-ea"]=_);let A=this.normalizeTypefaceToken(String(g?.["a:cs"]?.["@_typeface"]||""));A&&(S["mn-cs"]=A);let k=this.collectFontScriptOverrides(h);Object.keys(k).length>0&&this.masterThemeMajorFontScripts.set(t,k);let E=this.collectFontScriptOverrides(g);Object.keys(E).length>0&&this.masterThemeMinorFontScripts.set(t,E);let I=i?.["a:objectDefaults"];if(I){let F={spDef:I["a:spDef"],lnDef:I["a:lnDef"],txDef:I["a:txDef"]};(F.spDef!==void 0||F.lnDef!==void 0||F.txDef!==void 0)&&this.masterThemeObjectDefaults.set(t,F);}let M=i?.["a:extraClrSchemeLst"];M!==void 0&&this.masterThemeExtraClrSchemeLst.set(t,M);let R=i?.["a:custClrLst"];R!==void 0&&this.masterThemeCustClrLst.set(t,R);let O=i?.["a:extLst"];O!==void 0&&this.masterThemeExtLst.set(t,O);let B=l?this.parseFormatScheme(l):void 0;return {colorMap:f,fontMap:S,formatScheme:B}}aggregateFontScriptOverrides(t){let e={};for(let r of t.values())for(let[n,i]of Object.entries(r))n in e||(e[n]=i);return e}collectFontScriptOverrides(t){let e={};if(!t)return e;let r=this.ensureArray(t["a:font"]);for(let n of r){let i=String(n?.["@_script"]||"").trim(),o=this.normalizeTypefaceToken(String(n?.["@_typeface"]||""));i&&o&&(e[i]=o);}return e}async resolveThemePathForMaster(t){let e=t.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),r=this.zip.file(e);if(!r)return;let n=this.parser.parse(await r.async("string")),i=this.ensureArray(n?.Relationships?.Relationship);for(let o of i){let a=String(o["@_Target"]||"");if(!a.includes("theme"))continue;let s=a.startsWith("..")?this.resolvePath(t.substring(0,t.lastIndexOf("/")+1),a):a.startsWith("/")?a.slice(1):`ppt/${a.replace(/^\.?\//,"")}`;if(s.startsWith("ppt/theme/"))return s}}async loadPerMasterThemes(){let t=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!(!t||t.length===0))for(let e of t)try{let r=await this.resolveThemePathForMaster(e.name);if(!r)continue;this.masterThemePaths.set(e.name,r);let n=await this.parseThemePart(r);if(!n)continue;this.masterThemeColorMaps.set(e.name,n.colorMap),this.masterThemeFontMaps.set(e.name,n.fontMap),n.formatScheme&&this.masterThemeFormatSchemes.set(e.name,n.formatScheme);}catch(r){console.warn(`Failed to load per-master theme for ${e.name}:`,r);}}async loadThemeData(){let t=this.zip.file(/^ppt\/theme\/theme\d+\.xml$/);if(!t||t.length===0)return;let e=await this.resolvePrimaryThemePath(),r=e?t.find(i=>i.name===e)??t[0]:t[0],n=await this.parseThemePart(r.name);n&&(this.themeColorMap=n.colorMap,this.themeFontMap=n.fontMap,n.formatScheme&&(this.themeFormatScheme=n.formatScheme)),await this.applySlideMasterColorMap(this.getDefaultSchemeColorMap()),await this.loadPerMasterThemes(),this.globalThemeColorMapSnapshot={...this.themeColorMap},this.globalThemeFontMapSnapshot={...this.themeFontMap},this.globalThemeFormatSchemeSnapshot=this.themeFormatScheme;}};}});function Eht(t){return t.replace(/^#/,"").toUpperCase()}function Fue(t){return {"a:srgbClr":{"@_val":Eht(t)}}}function Iht(t){return t["a:theme"]?.["a:themeElements"]}function Oue(t,e){let r=Iht(t);if(!r)return false;let n=r["a:clrScheme"]??{};for(let i of aL)n[`a:${i}`]=Fue(e[i]);return r["a:clrScheme"]=n,true}function NU(t,e){let r=t??{};return r["a:latin"]={"@_typeface":e},r["a:ea"]||(r["a:ea"]={"@_typeface":""}),r["a:cs"]||(r["a:cs"]={"@_typeface":""}),r}function Due(t,e){let r=Iht(t);if(!r)return false;let n=r["a:fontScheme"]??{};return e.majorFont?.latin&&(n["a:majorFont"]=NU(n["a:majorFont"],e.majorFont.latin)),e.minorFont?.latin&&(n["a:minorFont"]=NU(n["a:minorFont"],e.minorFont.latin)),r["a:fontScheme"]=n,true}function i_(t,e,r){for(let n of aL)t[n]=Eht(e[n]);for(let[n,i]of Object.entries(Mht)){let o=r?.[n]??i,a=t[o];a!==void 0&&(t[n]=a);}}function o_(t,e){e.majorFont?.latin&&(t["mj-lt"]=e.majorFont.latin,t["mj-ea"]=e.majorFont.latin,t["mj-cs"]=e.majorFont.latin),e.minorFont?.latin&&(t["mn-lt"]=e.minorFont.latin,t["mn-ea"]=e.minorFont.latin,t["mn-cs"]=e.minorFont.latin);}var aL,Mht,Nue=T({"src/core/core/runtime/theme-scheme-edit.ts"(){aL=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],Mht={tx1:"dk1",bg1:"lt1",tx2:"dk2",bg2:"lt2"};}}),BU,Rht,Bue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeProcessing.ts"(){Lue(),Nue(),BU=/^ppt\/theme\/theme\d+\.xml$/,Rht=class extends kht{async resolveThemeEditTargets(t){let e=i=>this.zip.file(i)!==null;if(t)return [...new Set(t)].filter(e);let r=await this.resolvePrimaryThemePath(),n=new Set;r&&e(r)&&n.add(r);for(let i of this.masterThemePaths.values())i&&e(i)&&n.add(i);if(n.size===0){let i=this.zip.file(BU)[0];i&&n.add(i.name);}return [...n]}async readThemePart(t){let e=this.zip.file(t);if(!e)return;let r=await e.async("string");return this.parser.parse(r)}async rewriteThemeParts(t,e){let r=[];for(let n of await this.resolveThemeEditTargets(t)){let i=await this.readThemePart(n);!i||!e(i)||(this.zip.file(n,this.builder.build(i)),r.push(n));}return r}mastersUsingThemes(t){let e=new Set(t),r=[];for(let[n,i]of this.masterThemePaths.entries())e.has(i)&&r.push(n);return r}async updateThemeColorScheme(t,e){let r=await this.rewriteThemeParts(e,n=>Oue(n,t));if(r.length!==0){for(let n of this.mastersUsingThemes(r)){let i=this.masterThemeColorMaps.get(n);i&&i_(i,t,this.masterClrMaps.get(n));}i_(this.globalThemeColorMapSnapshot,t,null),i_(this.themeColorMap,t,this.currentMasterClrMap);}}async updateThemeFontScheme(t,e){let r=await this.rewriteThemeParts(e,n=>Due(n,t));if(r.length!==0){for(let n of this.mastersUsingThemes(r)){let i=this.masterThemeFontMaps.get(n);i&&o_(i,t);}o_(this.globalThemeFontMapSnapshot,t),o_(this.themeFontMap,t);}}async updateThemeName(t,e){await this.rewriteThemeParts(e,r=>{let n=r["a:theme"];return n?(n["@_name"]=t,true):false});}async applyTheme(t,e,r){await this.updateThemeColorScheme(t),await this.updateThemeFontScheme(e),r&&await this.updateThemeName(r);}};}}),Lht,$ue=T({"src/core/core/runtime/PptxHandlerRuntimeComments.ts"(){Jnt(),bst(),Pt(),Bue(),Lht=class wx extends Rht{async extractModernSlideComments(e){try{let r=`${e.replace("slides/","slides/_rels/")}.rels`,n=await this.zip.file(r)?.async("string");if(!n)return [];let i=this.parser.parse(n),a=this.ensureArray(Q(i,"Relationships")?.Relationship).filter(l=>String(l?.["@_Type"]||"")===am);if(a.length===0)return [];let s=[];for(let l of a){let c=String(l?.["@_Target"]||"").trim();if(!c)continue;let d=this.resolvePath(e,c),p=await this.zip.file(d)?.async("string");if(!p)continue;let u=$Qt(this.parser.parse(p),{path:d,relationshipId:String(l?.["@_Id"]||"").trim()},f=>this.modernCommentAuthors.get(f)?.name,wx.EMU_PER_PX);s.push(...u.comments),this.modernCommentParts.set(e,u.part);}return s}catch(r){console.warn("Failed to parse modern comments:",r);}return []}async loadModernCommentAuthors(){let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return;let r=this.parser.parse(e),i=this.ensureArray(Q(r,"Relationships")?.Relationship).find(c=>String(c?.["@_Type"]||"")===Ph),o=String(i?.["@_Target"]||"").trim();if(!o)return;let a=this.resolvePath("ppt/presentation.xml",o),s=await this.zip.file(a)?.async("string");if(!s)return;let l=jQt(this.parser.parse(s));this.modernCommentAuthors.clear();for(let c of l.authors)c.id&&this.modernCommentAuthors.set(c.id,c);this.modernCommentAuthorsRootXml=l.root,this.modernCommentAuthorsPartPath=a,this.modernCommentAuthorsRelationshipId=String(i?.["@_Id"]||"").trim();}async resolveSlideCommentTarget(e){let r=this.slideRelsMap.get(e);if(r){for(let[,o]of r.entries())if(String(o||"").toLowerCase().includes("comments/comment"))return o}let n=`${e.replace("slides/","slides/_rels/")}.rels`,i=await this.zip.file(n)?.async("string");if(i)try{let o=this.parser.parse(i),s=this.ensureArray(Q(o,"Relationships")?.Relationship).find(c=>{let d=String(c?.["@_Type"]||"");return d===am?!1:d.toLowerCase().endsWith("/comments")}),l=String(s?.["@_Target"]||"").trim();return l.length>0?l:void 0}catch(o){console.warn("Failed to parse slide relationships for comments:",o);return}}extractCommentText(e){let r=e?.["p:text"]??e?.text??this.xmlLookupService.getChildByLocalName(e,"text");if(typeof r=="string")return r.trim();if(r!=null)return String(r).trim();let n=e?.["p:txBody"]||this.xmlLookupService.getChildByLocalName(e,"txBody"),i=this.extractTextFromTxBody(n);return i.length>0?i:""}async extractSlideComments(e){let r=await this.resolveSlideCommentTarget(e);if(!r)return [];let n=this.resolveImagePath(e,r),i=await this.zip.file(n)?.async("string");if(!i)return [];try{let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"cmLst"),l=this.xmlLookupService.getChildrenArrayByLocalName(a,"cm").map((c,d)=>{let p=String(c?.["@_idx"]||c?.["@_id"]||d).trim(),u=String(c?.["@_authorId"]||"").trim(),f=String(c?.["@_dt"]||"").trim(),h=c?.["p:pos"]||this.xmlLookupService.getChildByLocalName(c,"pos"),g=Number.parseInt(String(h?.["@_x"]||""),10),y=Number.parseInt(String(h?.["@_y"]||""),10),x=String(c?.["@_done"]||c?.["@_resolved"]||"").trim().toLowerCase(),v=x==="1"||x==="true"?!0:void 0;return {id:p.length>0?p:String(d),text:this.extractCommentText(c),author:u.length>0?this.commentAuthorMap.get(u)||`Author ${u}`:void 0,createdAt:f.length>0?f:void 0,x:Number.isFinite(g)?Math.round(g/wx.EMU_PER_PX):void 0,y:Number.isFinite(y)?Math.round(y/wx.EMU_PER_PX):void 0,resolved:v,rawXml:c}});return CYt(l)}catch(o){return console.warn("Failed to parse slide comments:",o),[]}}async loadCommentAuthors(){let e=await this.zip.file("ppt/commentAuthors.xml")?.async("string");if(e)try{let r=this.parser.parse(e),n=this.xmlLookupService.getChildByLocalName(r,"cmAuthorLst");this.commentAuthorsRootXml=n,this.xmlLookupService.getChildrenArrayByLocalName(n,"cmAuthor").forEach((o,a)=>{let s=String(o?.["@_id"]||a).trim();if(s.length===0)return;let l=String(o?.["@_name"]||o?.["@_initials"]||`Author ${s}`).trim(),c=l.length>0?l:`Author ${s}`;this.commentAuthorMap.set(s,c);let d=String(o?.["@_initials"]||"").trim(),p=Number.parseInt(String(o?.["@_lastIdx"]||"0"),10),u=Number.parseInt(String(o?.["@_clrIdx"]||"0"),10),f={id:s,name:c,initials:d.length>0?d:this.toCommentInitials(c),lastIdx:Number.isFinite(p)?p:0,clrIdx:Number.isFinite(u)?u:0,rawXml:o};this.commentAuthorDetails.set(s,f);});}catch(r){console.warn("Failed to parse PowerPoint comment authors:",r);}}toCommentInitials(e){let r=e.split(/\s+/).map(n=>n.trim()).filter(n=>n.length>0);return r.length===0?"U":r.slice(0,2).map(n=>n[0].toUpperCase()).join("")}};}}),Fht,jue=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArtXmlUtils.ts"(){_q(),zM(),ast(),$ue(),Am(),Fht=class extends Lht{async readXmlPartByRelationshipId(t,e){let r=String(e||"").trim();if(r.length===0)return;let i=this.slideRelsMap.get(t)?.get(r);if(!i)return;let o=this.resolveImagePath(t,i),a=await this.zip.file(o)?.async("string");if(a)return {xml:this.parser.parse(a),partPath:o}}collectLocalTextValues(t,e,r){CQt(t,e,r);}extractSmartArtNodeRuns(t){return dV(ZE(t))}extractSmartArtNodeStyle(t){let e={},r=this.xmlLookupService.getChildByLocalName(t,"spPr");if(r){let i=this.parseColor(this.xmlLookupService.getChildByLocalName(r,"solidFill"));i&&(e.fillColor=i);let o=this.xmlLookupService.getChildByLocalName(r,"ln");if(o){let a=this.parseColor(this.xmlLookupService.getChildByLocalName(o,"solidFill"));a&&(e.lineColor=a);}}let n=this.firstRunProperties(t);if(n){this.xmlBoolean(n["@_b"])&&(e.bold=true),this.xmlBoolean(n["@_i"])&&(e.italic=true);let i=this.parseColor(this.xmlLookupService.getChildByLocalName(n,"solidFill"));i&&(e.fontColor=i);}return Object.keys(e).length>0?e:void 0}firstRunProperties(t){let e=this.xmlLookupService.getChildByLocalName(t,"t");if(!e)return;let r=this.xmlLookupService.getChildrenArrayByLocalName(e,"p")[0];if(!r)return;let n=this.xmlLookupService.getChildrenArrayByLocalName(r,"r")[0];if(n)return this.xmlLookupService.getChildByLocalName(n,"rPr")}xmlBoolean(t){let e=String(t??"").trim().toLowerCase();return e==="1"||e==="true"||e==="on"}parseSmartArtChrome(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"bg"),r=this.xmlLookupService.getChildByLocalName(t,"whole");if(!e&&!r)return;let n={};if(e){let i=this.xmlLookupService.getChildByLocalName(e,"solidFill"),o=this.parseColor(i);if(o)n.backgroundColor=o;else {let a=this.approximateSmartArtBackgroundFill(e);a&&(n.backgroundColor=a.color,n.backgroundFillXml={localName:a.localName,xml:a.xml});}}if(r){let i=this.xmlLookupService.getChildByLocalName(r,"ln");if(i){let o=this.xmlLookupService.getChildByLocalName(i,"solidFill"),a=this.parseColor(o);a&&(n.outlineColor=a);let s=parseInt(String(i["@_w"]||""),10);Number.isFinite(s)&&s>0&&(n.outlineWidth=s/12700);}}return n.backgroundColor||n.outlineColor?n:void 0}approximateSmartArtBackgroundFill(t){let e=this.xmlLookupService.getChildByLocalName(t,"gradFill");if(e){let n=this.colorStyleCodec.extractGradientFillColor(e);return n?{color:n,localName:"gradFill",xml:e}:void 0}let r=this.xmlLookupService.getChildByLocalName(t,"pattFill");if(r){let n=this.xmlLookupService.getChildByLocalName(r,"fgClr"),i=n?this.parseColor(n):void 0;return i?{color:i,localName:"pattFill",xml:r}:void 0}}parseSmartArtColorTransform(t,e){return this.parseSmartArtColorTransformImpl(t,e)}async parseSmartArtColorTransformImpl(t,e){if(e.length!==0)try{let r=await this.readXmlPartByRelationshipId(t,e);if(!r)return;let n=this.xmlLookupService.getChildByLocalName(r.xml,"colorsDef");if(!n)return;let i=u=>this.compatibilityService.getXmlLocalName(u),o=Stt(n,i),a=gzt(n,i),s=o.titles?.[0]?.value||String(n["@_title"]||n["@_uniqueId"]||"").trim()||void 0,l=this.xmlLookupService.getChildrenArrayByLocalName(n,"styleLbl"),c={getChild:(u,f)=>this.xmlLookupService.getChildByLocalName(u,f),parseColorChoice:u=>this.parseColor(u),resolveScheme:u=>this.resolveSmartArtSchemeColor(u)},d=f8t(l,c);if(d.fillColors.length===0&&d.lineColors.length===0)return;let p=h8t(l,c);return {...o,name:s,...d,...Object.keys(p).length>0?{roleColors:p}:{},labels:a}}catch{return}}resolveSmartArtSchemeColor(t){if(!t)return;let e=String(t["@_val"]||"").trim();if(e.length===0)return;let r=this.themeColorMap[e];if(r)return r.startsWith("#")?r:`#${r}`}};}});function Hue(t,e){let r={};if(e.hasChild(t,"noFill")){r.fillNone=true;let l=e.extractShadowColor(t);return l&&(r.hasShadow=true,r.shadowColor=l),r}let n=e.getChild(t,"solidFill");n&&(r.fillColor=e.parseColor(n)??void 0);let i=n?void 0:e.getChild(t,"gradFill");if(i){let l=e.extractGradientStops(i).map(c=>({color:c.color,position:c.position,...c.opacity!==void 0?{opacity:c.opacity}:{}}));l.length>0&&(r.fillGradientStops=l,r.fillGradientType=e.extractGradientType(i),r.fillGradientAngle=e.extractGradientAngle(i),r.fillColor??=l[Math.floor(l.length/2)]?.color);}let o=!n&&!i?e.getChild(t,"pattFill"):void 0;if(o){let l=String(o["@_prst"]||"").trim();l&&(r.fillPatternPreset=l);let c=e.parseColor(e.getChild(o,"fgClr")),d=e.parseColor(e.getChild(o,"bgClr"));c&&(r.fillPatternForegroundColor=c),d&&(r.fillPatternBackgroundColor=d),r.fillColor??=c??d;}let a=!n&&!i&&!o?e.getChild(t,"blipFill"):void 0;if(a){let l=e.getChild(a,"blip"),c=String(l?.["@_r:embed"]||l?.["@_embed"]||l?.["@_r:link"]||"").trim();c&&(r.fillBlipEmbedId=c);}let s=e.extractShadowColor(t);return s&&(r.hasShadow=true,r.shadowColor=s),r}function ts(t,e,r){if(!t||t[`@_${e}`]===void 0)return;let n=Number.parseInt(String(t[`@_${e}`]),10);return Number.isFinite(n)?n/r:void 0}function $U(t){return t===true||t===1||t==="1"||t==="true"}function Uue(t,e,r){let n,i,o,a,s,l,c,d,p;if(!t)return {fontSize:n,fontColor:i};let u=e.getChild(t,"bodyPr"),f=e.getChildren(t,"p");for(let h of f){let g=e.getChild(h,"pPr"),y=e.getChild(g,"lnSpc"),x=e.getChild(y,"spcPct"),v=e.getChild(y,"spcPts"),b=e.getChild(g,"spcAft"),S=e.getChild(b,"spcPct"),w=e.getChild(b,"spcPts");if(c===void 0&&x?.["@_val"]!==void 0){let _=Number.parseInt(String(x["@_val"]),10);Number.isFinite(_)&&_>0&&(c=_/1e5);}if(l===void 0&&v?.["@_val"]!==void 0){let _=Number.parseInt(String(v["@_val"]),10);Number.isFinite(_)&&_>0&&(l=_/100*(96/72));}if(p===void 0&&S?.["@_val"]!==void 0){let _=Number.parseInt(String(S["@_val"]),10);Number.isFinite(_)&&_>=0&&(p=_/1e5);}if(d===void 0&&w?.["@_val"]!==void 0){let _=Number.parseInt(String(w["@_val"]),10);Number.isFinite(_)&&_>=0&&(d=_/100*(96/72));}let C=e.getChildren(h,"r");for(let _ of C){let A=e.getChild(_,"rPr");if(A){let k=parseInt(String(A["@_sz"]||""),10);n===void 0&&Number.isFinite(k)&&k>0&&(n=k/100*(96/72)),i??=e.parseColor(e.getChild(A,"solidFill"))??void 0;let E=e.getChild(A,"ea"),I=e.getChild(A,"latin"),M=e.getChild(A,"cs");o??=String(E?.["@_typeface"]||I?.["@_typeface"]||M?.["@_typeface"]||"").trim()||void 0,a===void 0&&A["@_b"]!==void 0&&(a=$U(A["@_b"])?700:400),s===void 0&&A["@_i"]!==void 0&&(s=$U(A["@_i"])?"italic":"normal");}if(n!==void 0&&o!==void 0&&i!==void 0)break}if(n!==void 0&&o!==void 0&&i!==void 0)break}return {fontSize:n,fontColor:i,fontFamily:o,fontWeight:a,fontStyle:s,lineHeight:l,lineHeightRatio:c,lineSpacingAfter:d,lineSpacingAfterRatio:p,textInsetLeft:ts(u,"lIns",r),textInsetTop:ts(u,"tIns",r),textInsetRight:ts(u,"rIns",r),textInsetBottom:ts(u,"bIns",r),textVerticalAnchor:String(u?.["@_anchor"]||"").trim()||void 0}}var zue=T({"src/core/core/runtime/smartart-drawing-shape-style.ts"(){}});function Xue(t,e,r){let n=mzt(t,e);if(!n)return;let i={};n.fillRef&&r.resolveThemeFillRef(n.fillRef,i),n.lnRef&&r.resolveThemeLineRef(n.lnRef,i),n.effectRef&&r.resolveThemeEffectRef(n.effectRef,i);let o=String(n.fontRef?.["@_idx"]??"").toLowerCase(),a=o?r.resolveThemeTypeface(o.includes("minor")?"+mn-lt":"+mj-lt"):void 0,s={...i.fillColor!==void 0?{fillColor:i.fillColor}:{},...i.fillMode&&Oht.has(i.fillMode)?{fillMode:i.fillMode}:{},...i.strokeColor!==void 0?{strokeColor:i.strokeColor}:{},...i.strokeWidth!==void 0?{strokeWidth:i.strokeWidth}:{},...i.shadowColor!==void 0?{shadowColor:i.shadowColor}:{},...a?{fontTypeface:a}:{}};return Object.keys(s).length>0?s:void 0}function Gue(t,e,r,n){let i=d8t(e,r);if(!t||t.length===0)return {effectIntensity:i,labels:t};let o=new Map;for(let s of e){let l=String(s["@_name"]??"");l&&!o.has(l)&&o.set(l,s);}let a=t.map(s=>{let l=o.get(s.name),c=l?Xue(l,r,n):void 0;return c?{...s,resolvedStyle:c}:s});return {effectIntensity:i,labels:a}}function Wue(t,e,r,n){let i=Stt(t,e),o=hzt(t,e),a=i.titles?.[0]?.value||String(t["@_title"]||t["@_uniqueId"]||"").trim()||void 0,{effectIntensity:s,labels:l}=Gue(o,r,e,n);return {...i,name:a,effectIntensity:s,labels:l}}var Oht,Vue=T({"src/core/core/runtime/smartart-style-label-refs.ts"(){zM(),bq(),Oht=new Set(["solid","gradient","pattern","none","theme"]);}});function Dht(t,e){for(let r of t??[]){r.endParaRPr&&(r.endParaStyle=e(r.endParaRPr));for(let n of r.items)n.kind==="run"&&n.run.rPr?n.run.style=e(n.run.rPr):(n.kind==="field"||n.kind==="break")&&n.rPr&&(n.style=e(n.rPr));}return t}var Nht=T({"src/core/core/runtime/smartart-text-style-resolution.ts"(){}}),Bht,Yue=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArtParsing.ts"(){lst(),QI(),oI(),jue(),zue(),Vue(),Am(),Nht(),Bht=class $ht extends Fht{reportIncompleteSmartArtRelationships(e,r,n){let i=[["dm",r?.dataRelId],["lo",r?.layoutRelId],["qs",r?.styleRelId],["cs",r?.colorsRelId]].filter(([,a])=>!a).map(([a])=>a);if(i.length===0)return;let o=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(e,"nvGraphicFramePr"),"cNvPr");this.compatibilityService.reportWarning({code:"DIAGRAM_RELATIONSHIP_IDS_INCOMPLETE",message:`SmartArt relIds is missing required relationship attributes: ${i.join(", ")}.`,scope:"element",slideId:n,elementId:String(o?.["@_id"]??"")||void 0,xmlPath:"p:graphicFrame/a:graphic/a:graphicData/dgm:relIds"});}parseSmartArtConnections(e){let r=this.xmlLookupService.getChildByLocalName(e,"cxnLst"),n=this.xmlLookupService.getChildrenArrayByLocalName(r,"cxn"),i=this.xmlLookupService.getChildByLocalName(e,"ptLst"),o=this.xmlLookupService.getChildrenArrayByLocalName(i,"pt"),a=AQt(o,c=>{let d=[];return this.collectLocalTextValues(c,"t",d),d.join("")}),s=new Map,l=[];return n.forEach(c=>{let d=i8t(c);if(!d)return;let p=d.parentTransitionId?a.get(d.parentTransitionId):void 0,u=d.siblingTransitionId?a.get(d.siblingTransitionId):void 0,f=p??u;l.push(f?{...d,label:f}:d),(!d.type||d.type==="parOf")&&!s.has(d.destId)&&s.set(d.destId,d.sourceId);}),{parsedConnections:l,parentByNodeId:s}}async parseSmartArtQuickStyle(e,r){if(r.length!==0)try{let n=await this.readXmlPartByRelationshipId(e,r);if(!n)return;let i=this.xmlLookupService.getChildByLocalName(n.xml,"styleDef");if(!i)return;let o=s=>this.compatibilityService.getXmlLocalName(s),a=this.xmlLookupService.getChildrenArrayByLocalName(i,"styleLbl");return Wue(i,o,a,{resolveThemeFillRef:this.resolveThemeFillRef.bind(this),resolveThemeLineRef:this.resolveThemeLineRef.bind(this),resolveThemeEffectRef:this.resolveThemeEffectRef.bind(this),resolveThemeTypeface:this.resolveThemeTypeface.bind(this)})}catch{return}}async parseSmartArtDrawingShapes(e,r){if(r.length===0)return [];try{let n=await this.readXmlPartByRelationshipId(e,r);if(!n)return [];let i=this.xmlLookupService.getChildByLocalName(n.xml,"drawing"),o=this.xmlLookupService.getChildByLocalName(i||n.xml,"spTree");if(!o)return [];let a=this.xmlLookupService.getChildrenArrayByLocalName(o,"sp"),s=$ht.EMU_PER_PX;return a.map((l,c)=>this.parseDrawingShape(l,c,s)).filter(l=>l!==null)}catch{return []}}parseDrawingShape(e,r,n){let i=this.xmlLookupService.getChildByLocalName(e,"spPr");if(!i)return null;let o=this.xmlLookupService.getChildByLocalName(i,"xfrm"),a=this.xmlLookupService.getChildByLocalName(o,"off"),s=this.xmlLookupService.getChildByLocalName(o,"ext");if(!a||!s)return null;let l=Math.round(parseInt(String(a["@_x"]||"0"),10)/n),c=Math.round(parseInt(String(a["@_y"]||"0"),10)/n),d=Math.round(parseInt(String(s["@_cx"]||"0"),10)/n),p=Math.round(parseInt(String(s["@_cy"]||"0"),10)/n),u=o?.["@_rot"]?parseInt(String(o["@_rot"]),10)/6e4:void 0,f=["1","true"].includes(String(o?.["@_flipH"]??"").toLowerCase()),h=["1","true"].includes(String(o?.["@_flipV"]??"").toLowerCase()),g=o?.["@_skewX"]?parseInt(String(o["@_skewX"]),10)/6e4:void 0,y=o?.["@_skewY"]?parseInt(String(o["@_skewY"]),10)/6e4:void 0,x=this.xmlLookupService.getChildByLocalName(i,"prstGeom"),v=this.xmlLookupService.getChildByLocalName(i,"custGeom"),b=x?this.parseGeometryAdjustments(x):void 0,S=x?String(x["@_prst"]||"rect"):"rect",w={};if(v){let vt=this.parseCustomGeometry(v,d,p);if(vt){S="custom";let St=this.extractCustomGeometryAdjustHandles(v);w={...vt,customGeometryPaths:this.buildStructuredCustomGeometryPaths(v,vt.pathWidth,vt.pathHeight),customGeometryRawData:this.extractCustomGeometryRawData(v),customGeometryAdjustHandlesXY:St.xy,customGeometryAdjustHandlesPolar:St.polar,customGeometryConnectionSites:this.extractCustomGeometryConnectionSites(v),customGeometryTextRect:this.extractCustomGeometryTextRect(v)};}}if((d<=0||p<=0)&&S!=="line")return null;let C=Hue(i,this.drawingShapeStyleDeps()),_=this.xmlLookupService.getChildByLocalName(i,"ln"),A=_?this.xmlLookupService.getChildByLocalName(_,"solidFill"):void 0,k=this.parseColor(A),E=_?parseInt(String(_["@_w"]||""),10):NaN,I=Number.isFinite(E)&&E>0?E/12700:void 0,M=this.xmlLookupService.getChildByLocalName(e,"txBody"),R=[];M&&this.collectLocalTextValues(M,"t",R);let O=R.join("").trim()||void 0,B=Uue(M,this.drawingShapeStyleDeps(),n),{fontSize:F,fontColor:D}=B,U=this.xmlLookupService.getChildByLocalName(e,"txXfrm"),j=this.xmlLookupService.getChildByLocalName(U,"off"),z=this.xmlLookupService.getChildByLocalName(U,"ext"),V=ts(j,"x",n),X=ts(j,"y",n),K=ts(z,"cx",n),q=ts(z,"cy",n),ot=M?Dht(ZE({"dgm:t":M}),vt=>this.extractTextRunStyle(vt,void 0,void 0,false)):void 0,J=ot?Fb(ot):O,dt=ot?Dx({id:String(e["@_modelId"]||`dsp-${r}`),text:J??"",paragraphs:ot},{...F!==void 0?{fontSize:F}:{},...D?{color:D}:{}}):void 0,mt=this.xmlLookupService.getChildByLocalName(e,"nvSpPr"),Tt=this.xmlLookupService.getChildByLocalName(mt,"cNvPr");return {id:String(e["@_modelId"]||Tt?.["@_id"]||`dsp-${r}`),shapeType:S,x:l,y:c,width:d,height:p,rotation:u,flipHorizontal:f,flipVertical:h,skewX:g,skewY:y,shapeAdjustments:b,...C,fillColor:C.fillColor??void 0,strokeColor:k??void 0,strokeWidth:I,text:J,textSegments:dt,...B,textFrameX:V,textFrameY:X,textFrameWidth:K,textFrameHeight:q,...w}}drawingShapeStyleDeps(){return {getChild:(e,r)=>this.xmlLookupService.getChildByLocalName(e,r),hasChild:(e,r)=>this.xmlLookupService.hasChildByLocalName(e,r),getChildren:(e,r)=>this.xmlLookupService.getChildrenArrayByLocalName(e,r),parseColor:e=>this.parseColor(e),extractGradientStops:e=>this.extractGradientStops(e),extractGradientType:e=>this.extractGradientType(e),extractGradientAngle:e=>this.extractGradientAngle(e),extractShadowColor:e=>this.extractShadowStyle(e).shadowColor}}};}});function Kue(t,e){let r=[],n=i=>{if(i){for(let o of e(i,"sp"))r.push({node:o,isPic:false});for(let o of e(i,"pic"))r.push({node:o,isPic:true});for(let o of e(i,"grpSp"))n(o);}};return n(t),r}function que(t,e){let r=e(e(t,"blipFill"),"blip");if(!r)return;let n=String(r["@_r:embed"]||r["@_embed"]||r["@_r:link"]||"").trim();return n.length>0?n:void 0}function Zue(t,e,r){let n=new Map;try{let i=e(t).Relationships;if(!i)return n;for(let o of r(i.Relationship)){let a=String(o?.["@_Id"]||"").trim(),s=String(o?.["@_Target"]||"").trim();a.length>0&&s.length>0&&n.set(a,s);}}catch{}return n}async function Jue(t,e,r){let n=t.filter(l=>l.fillBlipEmbedId&&!l.fillImageUrl);if(n.length===0)return;let i=e.replace(/\/[^/]+$/u,""),o=e.split("/").pop()??"",a=await r.readText(`${i}/_rels/${o}.rels`);if(!a)return;let s=Zue(a,r.parse,r.ensureArray);for(let l of n){let c=s.get(l.fillBlipEmbedId??"");if(!c)continue;let d=/^(?:https?:|data:)/u.test(c)?c:r.resolveImagePath(e,c),p=await r.getImageData(d);p&&(l.fillImageUrl=p);}}async function Que(t,e){let r=await e.readText(t);if(!r)return [];try{let n=e.parse(r),i=e.getChild(n,"drawing"),o=e.getChild(i||n,"spTree");if(!o)return [];let a=[];return Kue(o,e.getChildren).forEach(({node:s,isPic:l},c)=>{let d=e.parseDrawingShape(s,c,e.emuPerPx);if(d){if(l&&!d.fillBlipEmbedId){let p=que(s,e.getChild);p&&(d.fillBlipEmbedId=p);}a.push(d);}}),await Jue(a,t,e),a}catch{return []}}var tfe=T({"src/core/core/runtime/smartart-drawing-blip.ts"(){}});function efe(t,e){for(let n of e){let i=jht[n.trim().toLowerCase()];if(i)return i}let r=t.toLowerCase();if(r.length>0){for(let[n,i]of Hht)if(n.test(r))return i}}var jht,Hht,rfe=T({"src/core/core/runtime/smartart-layout-category.ts"(){jht={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"relationship",matrix:"matrix",pyramid:"pyramid"},Hht=[[/hier|org/u,"hierarchy"],[/cycle|radial|circular/u,"cycle"],[/process|flow|chevron|arrow|equation/u,"process"],[/timeline/u,"timeline"],[/matrix|grid/u,"matrix"],[/pyramid/u,"pyramid"],[/venn/u,"venn"],[/funnel/u,"funnel"],[/gear/u,"gear"],[/target/u,"target"],[/list/u,"list"]];}}),Uht,nfe=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArt.ts"(){ae(),vq(),dq(),ast(),Yue(),tfe(),rfe(),Am(),Nht(),T1(),Uht=class zht extends Bht{async getSmartArtDataForGraphicFrame(e,r){let n=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(r,"graphic"),"graphicData");if(!this.xmlLookupService.getChildByLocalName(n,"relIds"))return;let o=e8t(n);this.reportIncompleteSmartArtRelationships(r,o,e);let a=o?.dataRelId??"";if(a.length===0)return;let s=await this.readXmlPartByRelationshipId(e,a);if(!s)return;let l=this.xmlLookupService.getChildByLocalName(s.xml,"dataModel"),c=this.xmlLookupService.getChildByLocalName(l,"ptLst"),d=this.xmlLookupService.getChildrenArrayByLocalName(c,"pt"),{parsedConnections:p,parentByNodeId:u}=this.parseSmartArtConnections(l),f=j=>this.compatibilityService.getXmlLocalName(j),h=a8t(d,p,f),g=s8t(d,p,f),y=d.filter(XM).map(j=>{let z=String(j?.["@_modelId"]||"").trim();if(z.length===0)return null;let V=String(j?.["@_type"]||"").trim()||void 0,X=[];this.collectLocalTextValues(j,"t",X);let K=Dht(ZE(j),dt=>this.extractTextRunStyle(dt,void 0,void 0,false)),q=dV(K),ot=K?Fb(K):X.join(""),J=this.extractSmartArtNodeStyle(j);return {id:z,text:ot,connectionId:String(j?.["@_cxnId"]||"").trim()||void 0,parentId:u.get(z),nodeType:V,styleRole:h.get(z),coherent3DOff:g.has(z)||void 0,runs:q,paragraphs:K,style:J}}).filter(j=>!!j).slice(0,ost);if(y.length===0)return;let x=o?.layoutRelId??"",v=x.length>0?await this.readXmlPartByRelationshipId(e,x):void 0,b=v?.partPath?.split("/").pop()?.replace(/\.[^.]+$/u,"")||void 0,S=this.xmlLookupService.getChildByLocalName(v?.xml,"layoutDef"),w=dzt(S,j=>this.compatibilityService.getXmlLocalName(j)),C=this.xmlLookupService.getChildrenArrayByLocalName(this.xmlLookupService.getChildByLocalName(S,"catLst"),"cat").map(j=>String(j?.["@_type"]||"")),_=efe(String(S?.["@_uniqueId"]||""),C),A=this.parseSmartArtChrome(l),k=o?.colorsRelId??"",E=await this.parseSmartArtColorTransform(e,k),I=this.xmlLookupService.getChildByLocalName(l,"extLst"),M=this.xmlLookupService.getChildrenArrayByLocalName(I,"ext").map(j=>this.xmlLookupService.getChildByLocalName(j,"dataModelExt")).find(Boolean),R=String(M?.["@_relId"]||"").trim(),O=await this.resolveSmartArtDrawingPart(e,a,R),B=O?await this.parseSmartArtDrawingShapesFromPath(O.path):[],F=O?.relId,D=o?.styleRelId??"",U=await this.parseSmartArtQuickStyle(e,D);return {layoutType:b,resolvedLayoutType:_,layoutDefinition:w,nodes:y,connections:p.length>0?p:void 0,presLayoutVars:sq(l),drawingShapes:B.length>0?B:void 0,chrome:A,colorTransform:E,quickStyle:U,themeMinorFont:this.themeFontMap["mn-lt"]||void 0,dataRelId:a,layoutRelId:x.length>0?x:void 0,drawingRelId:F&&F.length>0?F:void 0,colorsRelId:k.length>0?k:void 0,styleRelId:D.length>0?D:void 0}}async resolveSmartArtDrawingPart(e,r,n){if(r.length===0)return;let i=this.slideRelsMap.get(e),o=n?i?.get(n):void 0;if(o)return {relId:n,path:this.resolveImagePath(e,o)};let a=[...i?.entries()??[]].find(([,f])=>/(?:^|\/)diagrams\/drawing\d+\.xml$/u.test(f.replaceAll("\\","/")));if(a)return {relId:a[0],path:this.resolveImagePath(e,a[1])};let s=i?.get(r);if(!s)return;let l=this.resolveImagePath(e,s),c=l.replace(/\/[^/]+$/u,""),d=l.split("/").pop()??"",p=`${c}/_rels/${d}.rels`,u=await this.zip.file(p)?.async("string");if(u)try{let h=this.parser.parse(u).Relationships;if(!h)return;let y=this.ensureArray(h.Relationship).find(S=>{let w=String(S?.["@_Id"]||"").trim();return (!n||w===n)&&String(S?.["@_Type"]||"").endsWith("/diagramDrawing")}),x=String(y?.["@_Id"]||"").trim(),v=String(y?.["@_Target"]||"").trim();if(x.length===0||v.length===0)return;let b=this.resolveImagePath(l,v);return {relId:x,path:b}}catch{return}}async parseSmartArtDrawingShapesFromPath(e){return Que(e,this.drawingBlipDeps())}drawingBlipDeps(){return {readText:e=>this.zip.file(e)?.async("string")??Promise.resolve(void 0),parse:e=>this.parser.parse(e),getChild:(e,r)=>this.xmlLookupService.getChildByLocalName(e,r),getChildren:(e,r)=>this.xmlLookupService.getChildrenArrayByLocalName(e,r),parseDrawingShape:(e,r,n)=>this.parseDrawingShape(e,r,n),emuPerPx:zht.EMU_PER_PX,ensureArray:e=>this.ensureArray(e),resolveImagePath:(e,r)=>this.resolveImagePath(e,r),getImageData:e=>this.getImageData(e)}}};}}),Xht,ife=T({"src/core/core/runtime/PptxHandlerRuntimeChartDetection.ts"(){TQt(),nfe(),Xht=class extends Uht{detectChartType(t){if(!t)return "unknown";let e={barChart:"bar",bar3DChart:"bar3D",lineChart:"line",line3DChart:"line3D",pieChart:"pie",pie3DChart:"pie3D",ofPieChart:"ofPie",doughnutChart:"doughnut",areaChart:"area",area3DChart:"area3D",scatterChart:"scatter",bubbleChart:"bubble",radarChart:"radar",stockChart:"stock",surfaceChart:"surface",surface3DChart:"surface"},r=[];for(let n of Object.keys(t)){let i=this.compatibilityService.getXmlLocalName(n);e[i]&&r.push(i);}if(r.length>=2)return "combo";if(r.length===1)return e[r[0]];for(let n of Object.keys(t)){let i=this.compatibilityService.getXmlLocalName(n);if(i==="plotAreaRegion"||i==="plotSurface"){let o=this.xmlLookupService.getChildrenArrayByLocalName(t[n],"series");for(let a of o){let s=String(a?.["@_layoutId"]||"").toLowerCase(),l=this.xmlLookupService.getChildByLocalName(a,"layoutPr"),c=!!this.xmlLookupService.getChildByLocalName(l,"binning");if(s.includes("waterfall"))return "waterfall";if(s.includes("funnel"))return "funnel";if(s.includes("treemap"))return "treemap";if(s.includes("sunburst"))return "sunburst";if(s.includes("boxwhisker")||s.includes("box"))return "boxWhisker";if(s.includes("histogram")||s.includes("pareto")||s==="clusteredcolumn"&&c)return "histogram";if(s.includes("regionmap")||s.includes("map"))return "regionMap"}}}return "unknown"}extractChartPointValues(t,e){if(!t)return [];let r=e?"numRef":"strRef",n=e?"numLit":"strLit",i=e?"numCache":"strCache",o=this.xmlLookupService.getChildByLocalName(t,r)||this.xmlLookupService.getChildByLocalName(t,n),a=this.xmlLookupService.getChildByLocalName(o,i)||o,s=this.xmlLookupService.getChildrenArrayByLocalName(a,"pt");return s.length===0?[]:[...s].sort((l,c)=>{let d=Number.parseInt(String(l?.["@_idx"]||"0"),10),p=Number.parseInt(String(c?.["@_idx"]||"0"),10);return d-p}).map(l=>String(this.xmlLookupService.getScalarChildByLocalName(l,"v")||"").trim()).filter(l=>l.length>0)}extractChartCategoryValues(t,e){if(!t)return [];let r=e?"numRef":"strRef",n=e?"numLit":"strLit",i=e?"numCache":"strCache",o=this.xmlLookupService.getChildByLocalName(t,r)||this.xmlLookupService.getChildByLocalName(t,n),a=this.xmlLookupService.getChildByLocalName(o,i)||o,s=this.xmlLookupService.getChildrenArrayByLocalName(a,"pt");if(s.length===0)return [];let l=new Map,c=-1;for(let f of s){let h=Number.parseInt(String(f?.["@_idx"]??"0"),10);if(!Number.isFinite(h)||h<0)continue;let g=String(this.xmlLookupService.getScalarChildByLocalName(f,"v")||"").trim();g.length>0&&l.set(h,g),h>c&&(c=h);}if(l.size===0)return [];let d=Number.parseInt(String(this.xmlLookupService.getChildByLocalName(a,"ptCount")?.["@_val"]??""),10),p=Number.isFinite(d)&&d>c+1?d:c+1,u=[];for(let f=0;f<p;f++)u.push(l.get(f)??"");return u}extractChartCategoryLevels(t){return SQt(t,this.xmlLookupService)}extractChartSeriesName(t){let e=this.xmlLookupService.getChildByLocalName(t,"tx"),r=String(this.xmlLookupService.getScalarChildByLocalName(e,"v")||"").trim();if(r.length>0)return r;let n=this.extractChartPointValues(e,false);return n.length>0?n[0]:"Series"}};}});function Ny(t){if(!t)return;let e=t["@_val"];return e==null||e===""?true:!(e==="0"||e==="false")}function Io(t){if(!t)return;let e=t["@_val"];if(e==null||e==="")return;let r=Number.parseFloat(String(e));return Number.isFinite(r)?r:void 0}var jU,Ght,ofe=T({"src/core/core/runtime/PptxHandlerRuntimeChartParsingHelpers.ts"(){lM(),nR(),ife(),jU="{56B9EC1D-385E-4148-901F-78D8002777C0}",Ght=class extends Xht{parsePlotVisOnly(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"plotVisOnly");if(!e)return;let r=e["@_val"];return !(r==="0"||r==="false")}parsePivotSource(t){return vQt(t,e=>this.compatibilityService.getXmlLocalName(e))}parseOfPieOptions(t){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"ofPieType")?.["@_val"],i={ofPieType:String(r??"pie").toLowerCase()==="bar"?"bar":"pie"},a=this.xmlLookupService.getChildByLocalName(t,"splitType")?.["@_val"];if(a!=null){let u=String(a);(u==="auto"||u==="cust"||u==="percent"||u==="pos"||u==="val")&&(i.splitType=u);}let s=Io(this.xmlLookupService.getChildByLocalName(t,"splitPos"));s!==void 0&&(i.splitPos=s);let l=Io(this.xmlLookupService.getChildByLocalName(t,"secondPieSize"));l!==void 0&&(i.secondPieSize=l);let c=Io(this.xmlLookupService.getChildByLocalName(t,"gapWidth"));c!==void 0&&(i.gapWidth=c),this.xmlLookupService.getChildrenArrayByLocalName(t,"serLines").length>0&&(i.serLines=true);let p=this.xmlLookupService.getChildByLocalName(t,"custSplit");if(p){let f=this.xmlLookupService.getChildrenArrayByLocalName(p,"secondPiePt").map(h=>Io(h)).filter(h=>h!==void 0&&Number.isFinite(h));f.length>0&&(i.custSplit=f);}return i}parseView3D(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"view3D");if(!e)return;let r={},n=Io(this.xmlLookupService.getChildByLocalName(e,"rotX"));n!==void 0&&(r.rotX=n);let i=Io(this.xmlLookupService.getChildByLocalName(e,"rotY"));i!==void 0&&(r.rotY=i);let o=Io(this.xmlLookupService.getChildByLocalName(e,"depthPercent"));o!==void 0&&(r.depthPercent=o);let a=Io(this.xmlLookupService.getChildByLocalName(e,"perspective"));a!==void 0&&(r.perspective=a);let s=Io(this.xmlLookupService.getChildByLocalName(e,"hPercent"));s!==void 0&&(r.hPercent=s);let l=Ny(this.xmlLookupService.getChildByLocalName(e,"rAngAx"));return l!==void 0&&(r.rAngAx=l),Object.keys(r).length>0?r:void 0}parseChartChrome(t){if(!t)return;let e={},r=this.xmlLookupService.getChildByLocalName(t,"autoTitleDeleted"),n=Ny(r);n!==void 0&&(e.autoTitleDeleted=n);let o=this.xmlLookupService.getChildByLocalName(t,"dispBlanksAs")?.["@_val"];if(o!=null){let f=String(o);(f==="gap"||f==="zero"||f==="span")&&(e.dispBlanksAs=f);}let a=this.xmlLookupService.getChildByLocalName(t,"showDLblsOverMax"),s=Ny(a);s!==void 0&&(e.showDLblsOverMax=s);let l=f=>this.compatibilityService.getXmlLocalName(f),c=s1(t,l,jU),d=gc(c,"dataDisplayOptions16",l),p=gc(d,"dispNaAsBlank",l),u=Ny(p);return u!==void 0&&(e.dispNaAsBlank=u),Object.keys(e).length>0?e:void 0}parseUserShapesXml(t){return t?this.xmlLookupService.getChildByLocalName(t,"userShapes")??void 0:void 0}parsePivotFmtsXml(t){return t?this.xmlLookupService.getChildByLocalName(t,"pivotFmts")??void 0:void 0}parseClrMapOvr(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"clrMapOvr");if(!e)return;let r={};for(let[n,i]of Object.entries(e))n.startsWith("@_")&&i!=null&&(r[n.slice(2)]=String(i));return Object.keys(r).length>0?r:void 0}};}}),HU,Wht,afe=T({"src/core/core/runtime/PptxHandlerRuntimeChartExternalData.ts"(){SM(),WJ(),ofe(),HU="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes",Wht=class extends Ght{async parseChartExternalData(t,e){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"externalData");if(!r)return;let n=String(r["@_r:id"]||r["@_id"]||"").trim();if(n.length===0)return;let i=this.xmlLookupService.getChildByLocalName(r,"autoUpdate"),o=r["@_autoUpdate"],a=i?.["@_val"]==="1"||i?.["@_val"]==="true"||o==="1"||o==="true"||false,s;try{let c=e.substring(0,e.lastIndexOf("/")+1),d=e.substring(e.lastIndexOf("/")+1),p=`${c}_rels/${d}.rels`,u=await this.zip.file(p)?.async("string");if(u){let h=this.parser.parse(u)?.Relationships;if(h?.Relationship){let g=Array.isArray(h.Relationship)?h.Relationship:[h.Relationship];for(let y of g)if(String(y?.["@_Id"]||"")===n){s=String(y?.["@_Target"]||"").trim()||void 0;break}}}}catch{}let l;if(s)try{let c=this.resolveImagePath(e,s);if(c.includes("embeddings/")&&c.endsWith(".xlsx")){let d=await this.zip.file(c)?.async("uint8array");d&&(l=d);}}catch{}return {relId:n,targetPath:s,autoUpdate:a,...l?{embeddedWorkbookData:l}:{}}}async parseEmbeddedWorkbook(t){if(t?.embeddedWorkbookData)try{return await w9t(t.embeddedWorkbookData)}catch{return}}async parseChartUserShapes(t,e){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"userShapes");if(!r)return;let n=String(r["@_r:id"]||r["@_id"]||"").trim(),i=await this.readChartRels(e),o=(n.length>0?i.find(a=>a.id===n):void 0)??i.find(a=>a.type===HU);if(o?.target)try{let a=this.resolveImagePath(e,o.target);if(a.length===0)return;let s=await this.zip.file(a)?.async("string");if(!s)return;let l=this.parser.parse(s);return XJ(l,this.xmlLookupService,{parseColor:(c,d)=>this.parseColor(c,d)})}catch{return}}async readChartRels(t){try{let e=t.substring(0,t.lastIndexOf("/")+1),r=t.substring(t.lastIndexOf("/")+1),n=`${e}_rels/${r}.rels`,i=await this.zip.file(n)?.async("string");if(!i)return [];let a=this.parser.parse(i)?.Relationships;return a?.Relationship?(Array.isArray(a.Relationship)?a.Relationship:[a.Relationship]).filter(l=>!!l).map(l=>({id:String(l["@_Id"]||"").trim(),type:String(l["@_Type"]||"").trim(),target:String(l["@_Target"]||"").trim()})):[]}catch{return []}}};}}),Vht,sfe=T({"src/core/core/runtime/PptxHandlerRuntimeChartColorStyle.ts"(){yQt(),afe(),Vht=class extends Wht{async parseChartStyleDefinitionPart(t){try{let r=(await this.readChartRels(t)).find(s=>s.type.endsWith("/chartStyle"));if(!r)return;let n=this.resolveImagePath(t,r.target),i=await this.zip.file(n)?.async("string");if(!i)return;let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"chartStyle")??o;return gQt(a,this.xmlLookupService,s=>this.resolveChartSchemeColor(s),s=>this.parseColor(s))}catch{return}}async parseChartColorStyle(t){try{let r=(await this.readChartRels(t)).find(d=>d.type.includes("chartColorStyle")||d.type.includes("chartColor"));if(!r)return;let n=this.resolveImagePath(t,r.target),i=await this.zip.file(n)?.async("string");if(!i)return;let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"colorStyle")??o,s=String(a["@_meth"]||"cycle").trim(),l=s==="withinLinear"||s==="acrossLinear"?s:"cycle",c=[];return this.collectColorStylePalette(a,c),c.length===0?void 0:{palette:c,method:l,partPath:n}}catch{return}}collectColorStylePalette(t,e){if(t)for(let[r,n]of Object.entries(t)){if(r.startsWith("@_"))continue;let i=this.compatibilityService.getXmlLocalName(r);if(i==="schemeClr"){let o=Array.isArray(n)?n:[n];for(let a of o){let s=this.resolveChartSchemeColor(a);s&&e.push(s);}}else if(i==="srgbClr"){let o=Array.isArray(n)?n:[n];for(let a of o){let s=String(typeof a=="object"&&a!==null?a["@_val"]:a??"").trim();s.length>0&&e.push(s.startsWith("#")?s:`#${s}`);}}}}resolveChartSchemeColor(t){if(!t)return;let e;if(typeof t=="string")e=t;else if(typeof t=="object"&&t!==null)e=String(t["@_val"]||"").trim();else return;if(e.length===0)return;let r=this.themeColorMap[e];if(r)return r.startsWith("#")?r:`#${r}`}};}}),UU,Yht,lfe=T({"src/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"(){BZ(),xM(),Pat(),CJt(),A1(),Iat(),NJ(),pM(),nJ(),nv(),PJt(),OJt(),V1(),Bs(),$at(),Yat(),rR(),aQt(),mo(),c1(),sQt(),cQt(),uQt(),P1(),hQt(),sfe(),UU=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]),Yht=class extends Vht{async getChartDataForGraphicFrame(t,e){let r=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(e,"graphic"),"graphicData"),n=this.xmlLookupService.getChildByLocalName(r,"chart"),i=String(n?.["@_r:id"]||"").trim();if(i.length===0)return;let o=await this.readXmlPartByRelationshipId(t,i);if(!o)return;let a=this.xmlLookupService.getChildByLocalName(o.xml,"chartSpace"),s=this.xmlLookupService.getChildByLocalName(a,"chart"),l=this.xmlLookupService.getChildByLocalName(s,"plotArea");if(!l)return;let c=this.parseClrMapOvr(a),d=this.currentSlideClrMapOverride;c&&(this.currentSlideClrMapOverride=c);try{let p=this.detectChartType(l),u={parseColor:(wt,re)=>this.parseColor(wt,re)},f=wt=>this.resolveThemeTypeface(wt)??wt,h=m9(a,this.xmlLookupService),g=F7t(l,this.xmlLookupService,u,wt=>this.compatibilityService.getXmlLocalName(wt),f),y=Object.keys(l).filter(wt=>this.compatibilityService.getXmlLocalName(wt).endsWith("Chart")),x=y[0];if(!x)return this.parseCxChart(l,p,a,s,o.partPath,i);let v=l[x],{categories:b,categoryLevels:S,series:w,filteredSeries:C,filteredSeriesTitle:_,filteredCategoryTitle:A}=this.parseAllChartContainers(l,y,p,g),k=y.flatMap(wt=>this.xmlLookupService.getChildrenArrayByLocalName(l[wt],"ser")).at(0),E=g.some(wt=>wt.axisType==="dateAx")?AJt(k,this.xmlLookupService):void 0;if(w.length===0)return;let I=this.xmlLookupService.getChildByLocalName(s,"title"),M=[];this.collectLocalTextValues(I,"t",M);let R=M[0]??this.resolveChartLinkedTitleText(I),O=pQt(I,this.xmlLookupService,{parseColor:(wt,re)=>this.parseColor(wt,re)}),B=this.extractChartStyle(a,s),F,D=this.xmlLookupService.getChildByLocalName(v,"grouping");if(D?.["@_val"]){let wt=String(D["@_val"]).trim();wt==="stacked"?F="stacked":wt==="percentStacked"?F="percentStacked":F="clustered";}let U=this.parseChartBoolVal(v,"varyColors"),j=this.parseChartNumberVal(v,"firstSliceAng"),z=this.parseChartNumberVal(v,"holeSize"),V=this.parseChartNumberVal(v,"gapWidth"),X=this.parseChartNumberVal(v,"overlap"),K=this.parseChartNumberVal(v,"gapDepth"),q=this.xmlLookupService.getChildByLocalName(v,"scatterStyle"),ot=String(q?.["@_val"]??"").trim(),J=UU.has(ot)?ot:void 0,dt,mt=this.xmlLookupService.getChildByLocalName(v,"barDir");mt?.["@_val"]!==void 0&&(dt=String(mt["@_val"]).trim()==="bar"?"bar":"col");let Tt=p==="bar3D"?g9(String(this.xmlLookupService.getChildByLocalName(v,"shape")?.["@_val"]??"").trim()):void 0,jt=p==="radar"?lQt(String(this.xmlLookupService.getChildByLocalName(v,"radarStyle")?.["@_val"]??"").trim()):void 0,vt=p==="surface"?this.parseChartBoolVal(v,"wireframe"):void 0,St=o.partPath,Xt=u7t(l,this.xmlLookupService,u,f),ue=pj(v,"dropLines",this.xmlLookupService,u),ee=pj(v,"hiLowLines",this.xmlLookupService,u),Pe=gXt(v,this.xmlLookupService,u),Sr=s?N7t(s,this.xmlLookupService,u):{},Qn=this.parsePlotVisOnly(s),ti=await this.parseChartExternalData(a,o.partPath),wr=await this.parseEmbeddedWorkbook(ti),wn=E?{...E,date1904:h.date1904??wr?.date1904??!1}:void 0,ul=b,ei=w;wr&&(ul.length===0&&wr.categories.length>0&&(ul=wr.categories),ei.every(re=>re.values.length===0)&&wr.series.length>0&&(ei=ei.map((re,_n)=>{let Kr=wr.series[_n];return Kr&&Kr.values.length>0?{...re,values:Kr.values}:re}))),ei.some(wt=>wt.picture||wt.impliedPicture||wt.dataPoints?.some(re=>re.picture||re.impliedPicture))&&await fQt(this.xmlLookupService,this.readChartRels.bind(this),this.resolveImagePath.bind(this),this.getImageDataAsDataUrl.bind(this),l,y,ei,St);let ri=this.parsePivotSource(a),Ke=await this.parseChartColorStyle(St),fl=await this.parseChartStyleDefinitionPart(St),Bi=p==="ofPie"?this.parseOfPieOptions(v):void 0,hl=p==="bubble"?dXt(v,wt=>this.compatibilityService.getXmlLocalName(wt)):void 0,$i=p==="surface"&&v?wJt(v,this.xmlLookupService,u):void 0,Ao=this.parseView3D(s),bd=this.parseChartChrome(s),Ca=dj(s,wt=>this.compatibilityService.getXmlLocalName(wt)),Tn=this.parseUserShapesXml(a),Le=await this.parseChartUserShapes(a,o.partPath),qt=l9(s,wt=>this.compatibilityService.getXmlLocalName(wt),{parseColor:(wt,re)=>this.parseColor(wt,re)}),Nr=p9(a,wt=>this.compatibilityService.getXmlLocalName(wt)),Cn=f9(a,wt=>this.compatibilityService.getXmlLocalName(wt));return {chartType:p,categories:ul,...S?{categoryLevels:S}:{},...wn?{dateCategories:wn}:{},series:ei,...C?{filteredSeries:C}:{},..._?{filteredSeriesTitle:_}:{},...A?{filteredCategoryTitle:A}:{},title:R,...O?{titleRuns:O}:{},style:B,grouping:F,...U!==void 0?{varyColors:U}:{},...j!==void 0?{firstSliceAngle:j}:{},...z!==void 0?{doughnutHoleSize:z}:{},...V!==void 0?{barGapWidth:V}:{},...X!==void 0?{barOverlap:X}:{},...dt!==void 0?{barDirection:dt}:{},...Tt!==void 0?{barShape:Tt}:{},...jt!==void 0?{radarStyle:jt}:{},...vt!==void 0?{wireframe:vt}:{},...J!==void 0?{scatterStyle:J}:{},chartPartPath:St,chartRelationshipId:i,...Xt?{dataTable:Xt}:{},...ue?{dropLines:ue}:{},...ee?{hiLowLines:ee}:{},...Pe?{upDownBars:Pe}:{},...g.length>0?{axes:g}:{},...Sr.floor?{floor:Sr.floor}:{},...Sr.sideWall?{sideWall:Sr.sideWall}:{},...Sr.backWall?{backWall:Sr.backWall}:{},...$i?{bandFmts:$i}:{},...ti?{externalData:ti}:{},...wr?{embeddedWorkbookData:wr}:{},...Qn!==void 0?{plotVisibleOnly:Qn}:{},...ri?{pivotSource:ri}:{},...Ke?.palette?{colorPalette:Ke.palette}:{},...Ke?.method?{colorMethod:Ke.method}:{},...Ke?{colorStylePartPath:Ke.partPath,colorStyleOriginalPalette:[...Ke.palette],colorStyleOriginalMethod:Ke.method}:{},...Bi?{ofPieOptions:Bi}:{},...hl?{bubbleOptions:hl}:{},...Ao?{view3D:Ao}:{},...bd?{chartChrome:bd}:{},...Ca?{layouts:Ca}:{},...Tn?{userShapesXml:Tn}:{},...Le?{userShapes:Le}:{},...qt?{pivotFormats:qt}:{},...c?{clrMapOvr:c}:{},...Nr?{printSettings:Nr}:{},...Cn?{protection:Cn}:{},...h.date1904!==void 0?{date1904:h.date1904}:{},...h.roundedCorners!==void 0?{roundedCorners:h.roundedCorners}:{},...K!==void 0?{gapDepth:K}:{},...fl?{chartStyleDefinition:fl}:{}}}finally{this.currentSlideClrMapOverride=d;}}parseAllChartContainers(t,e,r,n){let i=r==="combo",o=[],a,s=[],l,c,d;for(let p of e){let u=t[p],f=this.xmlLookupService.getChildrenArrayByLocalName(u,"ser"),h=tR(u,this.xmlLookupService);h&&(l=[...l??[],...h]);let g=FJt(u,this.xmlLookupService);if(g?.seriesTitle&&c===void 0&&(c=g.seriesTitle),g?.categoryTitle&&d===void 0&&(d=g.categoryTitle),f.length===0)continue;if(o.length===0){let b=this.xmlLookupService.getChildByLocalName(f[0],"cat"),S=this.extractChartCategoryLevels(b),w=S?S.categories:this.extractChartCategoryValues(b,false),C=S||w.length?[]:this.extractChartCategoryValues(b,true);o=w.length?w:C.length?C:this.extractChartCategoryValues(this.xmlLookupService.getChildByLocalName(f[0],"xVal"),false),S?.categoryLevels&&(a=S.categoryLevels);}let y=_Jt(this.compatibilityService.getXmlLocalName(p)),x=i?y:void 0,v=oQt(u,n??[],this.xmlLookupService);s.push(...this.buildChartSeries(f,o,x,v,y));}return {categories:o,...a?{categoryLevels:a}:{},series:s,...l?{filteredSeries:l}:{},...c?{filteredSeriesTitle:c}:{},...d?{filteredCategoryTitle:d}:{}}}resolveChartLinkedTitleText(t){let e=this.xmlLookupService.getChildByLocalName(t,"tx");return this.extractChartPointValues(e,false)[0]?.trim()||void 0}parseChartNumberVal(t,e){let n=this.xmlLookupService.getChildByLocalName(t,e)?.["@_val"];if(n==null||n==="")return;let i=Number.parseFloat(String(n));return Number.isFinite(i)?i:void 0}parseChartBoolVal(t,e){let r=this.xmlLookupService.getChildByLocalName(t,e);if(!r)return;let n=r["@_val"];return n==null||n===""?true:!(n==="0"||n==="false")}buildChartSeries(t,e,r,n,i){return t.map((o,a)=>{let s=this.extractChartSeriesName(o),l=this.xmlLookupService.getChildByLocalName(o,"idx")?.["@_val"],c=l!==void 0?Number.parseInt(String(l),10):Number.NaN,d=Number.isFinite(c)?c:void 0,p=this.xmlLookupService.getChildByLocalName(o,"val")||this.xmlLookupService.getChildByLocalName(o,"yVal"),u=CC(p,this.xmlLookupService),f=u.some(J=>J===null),h=f?u.map(J=>J??0):this.extractChartPointValues(p,true).map(J=>Number.parseFloat(J)).filter(J=>Number.isFinite(J)),g=f?u.map(J=>J===null):void 0,y=String(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(o,"dLbls"),"numFmt")?.["@_formatCode"]??"").trim()||String(this.xmlLookupService.getScalarChildByLocalName(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(p,"numRef")??p,"numCache"),"formatCode")??"").trim(),x=this.xmlLookupService.getChildByLocalName(o,"spPr"),v=lP(i),b=this.parseColor(this.xmlLookupService.getChildByLocalName(x,"solidFill"))??(v?this.parseColor(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(x,"ln"),"solidFill")):void 0),S=h.length>0?h:e.map((J,dt)=>dt+1+a),w={parseColor:(J,dt)=>this.parseColor(J,dt)},C=qjt(o,this.xmlLookupService,w),_=Zjt(o,this.xmlLookupService,this.extractChartPointValues.bind(this),w),A=d7t(o,this.xmlLookupService,w),k=tJ(this.xmlLookupService.getChildByLocalName(o,"marker"),this.xmlLookupService,w),E=A7t(o,this.xmlLookupService,w,J=>this.resolveThemeTypeface(J)??J),I=p7t(o,this.xmlLookupService),M=cM(o,J=>this.compatibilityService.getXmlLocalName(J)),R=$Z(o,this.xmlLookupService),O=R?void 0:HZ(o,this.xmlLookupService),B=CC(this.xmlLookupService.getChildByLocalName(o,"xVal"),this.xmlLookupService).map(J=>J??Number.NaN),F=CC(this.xmlLookupService.getChildByLocalName(o,"bubbleSize"),this.xmlLookupService).map(J=>J??0),D=this.xmlLookupService.getChildByLocalName(o,"dLbls"),U=D?uJ(D,this.xmlLookupService,w,J=>this.resolveThemeTypeface(J)??J):void 0,j=this.xmlLookupService.getChildByLocalName(x,"ln"),z=j?Object.keys(j).some(J=>this.compatibilityService.getXmlLocalName(J)==="noFill"):false,V=this.xmlLookupService.getChildByLocalName(o,"smooth"),X=V?!(V["@_val"]==="0"||V["@_val"]==="false"):void 0,K=this.xmlLookupService.getChildByLocalName(o,"invertIfNegative"),q=K?!(K["@_val"]==="0"||K["@_val"]==="false"):void 0,ot=i==="bar3D"?g9(String(this.xmlLookupService.getChildByLocalName(o,"shape")?.["@_val"]??"").trim()):void 0;return {name:s.trim().length>0?s:`Series ${a+1}`,...d!==void 0?{idx:d}:{},values:S,...g?{blanks:g}:{},...B.length>0?{xValues:B}:{},...F.length>0?{bubbleSizes:F}:{},...U&&Object.keys(U).length>0?{dataLabelOptions:U}:{},...z?{lineNoFill:z}:{},...y?{numberFormat:y}:{},color:b,...C.length>0?{trendlines:C}:{},..._.length>0?{errBars:_}:{},...A.length>0?{dataPoints:A}:{},...k?{marker:k}:{},...E.length>0?{dataLabels:E}:{},...I!==void 0?{explosion:I}:{},...R?{picture:R}:{},...O?{impliedPicture:O}:{},...q!==void 0?{invertIfNegative:q}:{},...X!==void 0?{smooth:X}:{},...n!==void 0?{axisId:n}:{},...r?{seriesChartType:r}:{},...ot!==void 0?{shape:ot}:{},...M!==void 0?{uniqueId:M}:{}}})}async parseCxChart(t,e,r,n,i,o){let a=s9t(t,this.xmlLookupService,r,n,{parseColor:(M,R)=>this.parseColor(M,R)},M=>this.resolveThemeTypeface(M)??M);if(!a)return;let s=a.chartData,l=this.xmlLookupService.getChildByLocalName(n,"title"),c=[];this.collectLocalTextValues(l,"t",c);let d=s?.title??c[0]??this.resolveChartLinkedTitleText(l),p=this.extractChartStyle(r,n);a.hasDataLabels&&p&&(p.hasDataLabels=true);let u=this.parsePlotVisOnly(n),f=await this.parseChartExternalData(r,i),h=await this.parseEmbeddedWorkbook(f),g=this.parsePivotSource(r),y=await this.parseChartColorStyle(i),x=await this.parseChartStyleDefinitionPart(i),v=m9(r,this.xmlLookupService),b=this.parseView3D(n),S=this.parseChartChrome(n),w=dj(n,M=>this.compatibilityService.getXmlLocalName(M)),C=this.parseUserShapesXml(r),_=await this.parseChartUserShapes(r,i),A=l9(n,M=>this.compatibilityService.getXmlLocalName(M),{parseColor:(M,R)=>this.parseColor(M,R)}),k=this.parseClrMapOvr(r),E=p9(r,M=>this.compatibilityService.getXmlLocalName(M)),I=f9(r,M=>this.compatibilityService.getXmlLocalName(M));return {chartType:e,categories:a.categories,...a.categoryLevels?{categoryLevels:a.categoryLevels}:{},series:a.series,title:d,style:p,chartPartPath:i,chartRelationshipId:o,...f?{externalData:f}:{},...h?{embeddedWorkbookData:h}:{},...u!==void 0?{plotVisibleOnly:u}:{},...g?{pivotSource:g}:{},...y?.palette?{colorPalette:y.palette}:{},...y?.method?{colorMethod:y.method}:{},...y?{colorStylePartPath:y.partPath,colorStyleOriginalPalette:[...y.palette],colorStyleOriginalMethod:y.method}:{},...b?{view3D:b}:{},...S?{chartChrome:S}:{},...w?{layouts:w}:{},...C?{userShapesXml:C}:{},..._?{userShapes:_}:{},...A?{pivotFormats:A}:{},...k?{clrMapOvr:k}:{},...E?{printSettings:E}:{},...I?{protection:I}:{},...v.date1904!==void 0?{date1904:v.date1904}:{},...v.roundedCorners!==void 0?{roundedCorners:v.roundedCorners}:{},...x?{chartStyleDefinition:x}:{},...s??{}}}};}}),Kht,cfe=T({"src/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts"(){FM(),Jm(),_at(),lfe(),Kht=class extends Yht{parseEditorAnimations(t){return this.editorAnimationService.parseEditorAnimations(t)}parseSlideTransition(t,e){let r=this.slideTransitionService.parseSlideTransition(t);if(!r||!e||!r.soundRId)return r;let i=this.slideRelsMap.get(e)?.get(r.soundRId);if(i){let o=this.resolveImagePath(e,i);r.soundPath=o,r.soundFileName=o.split("/").pop()||o;}return r}extractSectionMap(){return Zm(this.presentationData,this.xmlLookupService)}extractHeaderFooter(){let t=this.firstSlideMasterRoot();if(!t)return;let e=Tat(t);return Object.keys(e).length>0?e:void 0}firstSlideMasterRoot(){let t=Array.from(this.masterXmlMap.keys()).sort((e,r)=>e.localeCompare(r));for(let e of t){let r=this.masterXmlMap.get(e)?.["p:sldMaster"];if(typeof r=="object"&&r!==null)return r}}extractPhotoAlbum(){let t=this.presentationData?.["p:presentation"];if(!t)return;let e=t["p:photoAlbum"];if(!e)return;let r={},n=false,i=e["@_bw"];i!==void 0&&(r.bw=String(i)==="1"||String(i)==="true",n=true);let o=e["@_showCaptions"];o!==void 0&&(r.showCaptions=String(o)==="1"||String(o)==="true",n=true);let a=e["@_layout"];if(a!==void 0){let c=String(a).trim();c.length>0&&(r.layout=c,n=true);}let s=e["@_frame"];if(s!==void 0){let c=String(s).trim();c.length>0&&(r.frame=c,n=true);}let l=e["@_isPhoto"];return l!==void 0&&(r.isPhoto=String(l)==="1"||String(l)==="true",n=true),n?r:{}}extractModifyVerifier(){let t=this.presentationData?.["p:presentation"];if(!t)return;let e=t["p:modifyVerifier"];if(!e)return;let r={},n=e["@_algorithmName"]??e["@_algIdExt"];n!==void 0&&(r.algorithmName=String(n));let i=e["@_hashData"];i!==void 0&&(r.hashData=String(i));let o=e["@_saltData"];o!==void 0&&(r.saltData=String(o));let a=e["@_spinValue"]??e["@_spinCount"];if(a!==void 0){let f=parseInt(String(a),10);Number.isFinite(f)&&(r.spinValue=f);}let s=e["@_algIdExt"];s!==void 0&&(r.algIdExt=String(s));let l=e["@_cryptAlgorithmSid"];if(l!==void 0){let f=parseInt(String(l),10);Number.isFinite(f)&&(r.cryptAlgorithmSid=f);}let c=e["@_cryptAlgorithmType"];c!==void 0&&(r.cryptAlgorithmType=String(c));let d=e["@_cryptProvider"];d!==void 0&&(r.cryptProvider=String(d));let p=e["@_cryptProviderType"];p!==void 0&&(r.cryptProviderType=String(p));let u=e["@_cryptAlgorithmClass"];return u!==void 0&&(r.cryptAlgorithmClass=String(u)),r}extractKinsoku(){return dHt(this.presentationData??void 0)}extractEmbedTrueTypeFonts(){let e=this.presentationData?.["p:presentation"]?.["@_embedTrueTypeFonts"];if(e===void 0)return;let r=String(e).trim().toLowerCase();return r!=="0"&&r!=="false"}};}}),qht,dfe=T({"src/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts"(){hJt(),Ds(),qM(),Ps(),Pt(),cfe(),qht=class extends Kht{async getEmbeddedFonts(t){if(!t||t.fonts.length===0)return [];let e=await this.loadPresentationFontRels();if(e.size===0)return [];let r=[];for(let n of t.fonts){let i=(n.font.typeface||"").trim();if(!i)continue;let o=[{data:n.regular,bold:false,italic:false},{data:n.bold,bold:true,italic:false},{data:n.italic,bold:false,italic:true},{data:n.boldItalic,bold:true,italic:true}];for(let a of o){if(!a.data)continue;let s=String(a.data.relationshipId||"").trim();if(!s)continue;let l=String(a.data.rawXml?.["@_fontKey"]||"").trim()||void 0,c=await this.extractEmbeddedFontVariant(i,s,a.bold,a.italic,e,l);c&&r.push(c);}}return r}async loadPresentationFontRels(){let t=new Map;try{let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return t;let r=this.parser.parse(e),n=this.ensureArray(Q(r,"Relationships")?.Relationship);for(let i of n){if(!String(i?.["@_Type"]||"").includes("/font"))continue;let a=String(i?.["@_Id"]||""),s=String(i?.["@_Target"]||"");a&&s&&t.set(a,s.startsWith("/")?s.substring(1):`ppt/${s}`);}}catch{}return t}async extractEmbeddedFontVariant(t,e,r,n,i,o){let a=i.get(e);if(!a)return null;try{let s=await this.zip.file(a)?.async("uint8array");if(!s||s.length===0)return null;let l=new Uint8Array(s),c,d;if(gat(s)){let _=fJt(s);if(_)c=_.fontData;else {let A=yat(s);return console.info(`[pptx-viewer] Embedded font "${t}" uses EOT format${A?.isCompressed?" with MTX compression":""} \u2014 extraction failed, will use web font fallback`),null}}else {let _=o?J8(o)??o.replace(/[{}]/g,"").trim():null,A=J8(a),k=_||A;if(k)c=Jb(s,k),d=k;else return console.warn(`[pptx-viewer] Embedded font "${t}" at "${a}" has no fontKey attribute and no GUID in filename \u2014 skipping`),null}if(c.length<4)return null;let p=c[0],u=c[1],f=c[2],h=c[3];if(!(p===0&&u===1&&f===0&&h===0||p===79&&u===84&&f===84&&h===79||p===116&&u===116&&f===99&&h===102||p===119&&u===79&&f===70&&(h===70||h===50)))return console.warn(`[pptx-viewer] Embedded font "${t}" has invalid sfnt header [${p.toString(16)},${u.toString(16)},${f.toString(16)},${h.toString(16)}] after processing \u2014 skipping (web font fallback will be used)`),null;let b=Aq(c),S=b==="woff2"?"font/woff2":b==="woff"?"font/woff":b==="opentype"?"font/otf":"font/ttf",w=this.uint8ArrayToBase64(c),C=`data:${S};base64,${w}`;return {name:t,dataUrl:C,bold:r,italic:n,format:b,rawFontData:c,partPath:a,fontGuid:d,originalRId:e,originalPartBytes:l}}catch{return null}}uint8ArrayToBase64(t){let e="";for(let n=0;n<t.length;n+=8192){let i=t.subarray(n,Math.min(n+8192,t.length));for(let o=0;o<i.length;o++)e+=String.fromCharCode(i[o]);}return btoa(e)}getLayoutOptions(){let t=[];for(let[e,r]of this.layoutXmlMap.entries()){let n=r["p:sldLayout"],i=(_t(Q(n,"p:cSld"),"name")||"").trim(),o=n?.["@_type"]!==void 0?String(n["@_type"]).trim():void 0,a=ztt({name:i,type:o,path:e}),s=this.resolveMasterPathForLayout(e);t.push({path:e,name:a,...o?{type:o}:{},...s?{masterPath:s}:{}});}return t}resolveMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e){for(let[,r]of e.entries())if(r.includes("slideMaster")){let n=t.substring(0,t.lastIndexOf("/")+1);if(r.startsWith("..")){let i=(n+r).split("/"),o=[];for(let a of i)a===".."?o.pop():a&&a!=="."&&o.push(a);return o.join("/")}return `ppt/${hr(r)}`}}}};}}),zU,Zht,pfe=T({"src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts"(){aa(),wm(),iM(),mat(),F1(),dfe(),zU=25*1024*1024,Zht=class Xk extends qht{isZipContainer(e){let r=new Uint8Array(e);return r.byteLength<4?false:r[0]===80&&r[1]===75&&(r[2]===3&&r[3]===4||r[2]===5&&r[3]===6||r[2]===7&&r[3]===8)}async initializeLoadSession(e,r){if(this.eagerDecodeImages=r.eagerDecodeImages??false,this.allowExternalImages=r.allowExternalImages===true,e.byteLength<4)throw new Error("Invalid PPTX binary: file is empty or truncated.");if(!this.isZipContainer(e))throw new Error("Invalid PPTX binary: not a ZIP/OpenXML package. The file is neither an OpenXML archive nor an OLE compound file (which is how legacy .ppt and encrypted presentations arrive), so it is most likely corrupt, truncated, or not a presentation at all.");try{this.zip=await pn__default.default.loadAsync(e),this.documentPropertiesUpdater=this.dependencyFactory.createDocumentPropertiesUpdater(this.zip,this.parser,this.builder);}catch(a){let s=a instanceof Error?a.message:"Unable to read zip container.";throw new Error(`Invalid PPTX package: ${s}`,{cause:a})}let n=typeof r.maxUncompressedBytes=="number"&&r.maxUncompressedBytes>0?r.maxUncompressedBytes:hat,i=0,o=0;for(let a of Object.keys(this.zip.files)){if(o+=1,o>cx)throw new sP(`PPTX archive contains more than ${cx} entries \u2014 refusing to load.`,{limit:cx,entryCount:o});let s=this.zip.files[a],l=Number(s?._data?.uncompressedSize??0);if(Number.isFinite(l)&&l>0&&(i+=l,i>n))throw new sP(`PPTX archive uncompressed size exceeds ${n} bytes (zip-bomb guard).`,{uncompressedBytes:i,limit:n})}if(this.slideRelsMap.clear(),this.externalRelsMap.clear(),this.slideMap.clear(),this.savedSlideFingerprints.clear(),this.layoutCache.clear(),this.masterCache.clear(),this.templateElementBaselines.reset(),this.layoutXmlMap.clear(),this.masterXmlMap.clear(),this.masterTxStylesCache.clear(),typeof globalThis.URL?.revokeObjectURL=="function"&&this.blobUrlCache.size>0){for(let a of this.blobUrlCache)URL.revokeObjectURL(a);this.blobUrlCache.clear();}this.imageDataCache.clear(),this.themeColorMap={},this.themeFontMap={},this.masterClrMaps.clear(),this.masterThemeColorMaps.clear(),this.masterThemeFontMaps.clear(),this.masterThemeFormatSchemes.clear(),this.masterThemePaths.clear(),this.masterThemeMajorFontScripts.clear(),this.masterThemeMinorFontScripts.clear(),this.masterThemeNames.clear(),this.masterThemeFontSchemeNames.clear(),this.masterThemeColorSchemeNames.clear(),this.originalThemeXmlByPath.clear(),this.dirtyThemePaths.clear(),this.masterThemeObjectDefaults.clear(),this.masterThemeExtraClrSchemeLst.clear(),this.masterThemeCustClrLst.clear(),this.masterThemeExtLst.clear(),this.currentMasterClrMap=null,this.presentationDefaultTextStyle=void 0,this.commentAuthorMap.clear(),this.commentAuthorDetails.clear(),this.modernCommentAuthors.clear(),this.modernCommentAuthorsRootXml=void 0,this.modernCommentAuthorsPartPath=void 0,this.modernCommentAuthorsRelationshipId=void 0,this.modernCommentParts.clear(),this.thumbnailData=null,this.vbaProjectBin=null,this.vbaRelatedParts.clear(),this.signatureDetection=null,this.customXmlParts=[],this.loadedEmbeddedFonts=[],this.loadedEmbeddedFontList=void 0,this.isStrictOoxml=false,this.restoreOriginalParser(),this.compatibilityService.resetWarnings();}async detectAndPreserveVbaProject(){let e=this.zip.file("ppt/vbaProject.bin");if(!e)return;this.vbaProjectBin=await e.async("uint8array");let r=["ppt/vbaData.xml","ppt/_rels/vbaProject.bin.rels"];for(let n of r){let i=this.zip.file(n);if(i){let o=await i.async("uint8array");this.vbaRelatedParts.set(n,o);}}}detectDigitalSignatureParts(){let e=[];this.zip.forEach(r=>{e.push(r);}),this.signatureDetection=_jt(e);}async parseCustomXmlParts(){let e=[],r=/^customXml\/item(?<index>\d+)\.xml$/iu,n=[];this.zip.forEach(i=>{n.push(i);});for(let i of n){let o=i.match(r);if(!o)continue;let a=o[1],s=this.zip.file(i);if(!s)continue;let l=await s.async("string"),c=`customXml/itemProps${a}.xml`,d=this.zip.file(c),p,u;if(d){p=await d.async("string");try{let x=this.parser.parse(p)?.["ds:datastoreItem"]?.["ds:schemaRefs"]?.["ds:schemaRef"];if(x){let b=(Array.isArray(x)?x:[x])[0];b?.["@_ds:uri"]?u=String(b["@_ds:uri"]):b?.["@_uri"]&&(u=String(b["@_uri"]));}}catch{}}let f=`customXml/_rels/item${a}.xml.rels`,h=this.zip.file(f),g;h&&(g=await h.async("string")),e.push({id:a,data:l,schemaUri:u,properties:p,rels:g});}this.customXmlParts=e;}async loadPresentationState(){let e=await this.zip.file("ppt/presentation.xml")?.async("string");if(!e)throw new Error("Invalid PPTX: presentation.xml not found");this.presentationData=this.parser.parse(e),this.detectAndSetStrictConformance(this.presentationData),await this.loadThemeData(),this.parsePresentationDefaultTextStyle(),await this.loadCommentAuthors(),await this.loadModernCommentAuthors();let{sectionBySlideId:r,orderedSections:n}=this.extractSectionMap();this.compatibilityService.inspectPresentationCompatibility(this.presentationData??void 0);let i=this.presentationData?.["p:presentation"],o=i?.["p:sldSz"]||{};this.rawSlideWidthEmu=parseInt(String(o["@_cx"]))||0,this.rawSlideHeightEmu=parseInt(String(o["@_cy"]))||0;let a=o["@_type"];a&&(this.rawSlideSizeType=a);let s=i?.["p:notesSz"]||{},l=parseInt(String(s["@_cx"]))||0,c=parseInt(String(s["@_cy"]))||0,d=Math.round(this.rawSlideWidthEmu/Xk.EMU_PER_PX),p=Math.round(this.rawSlideHeightEmu/Xk.EMU_PER_PX);return {width:d,height:p,notesWidthEmu:l,notesHeightEmu:c,sectionBySlideId:r,orderedSections:n}}async enrichOleElementsWithEmbeddedData(e,r,n=0){if(!(n>32))for(let o of e){if(o.type==="group"&&o.children){await this.enrichOleElementsWithEmbeddedData(o.children,r,n+1);continue}if(o.type==="ole"){if(o.previewImage&&!o.previewImageData)try{let a=this.resolveImagePath(r,o.previewImage);if(a){let s=await this.getImageData(a);s&&(o.previewImageData=s);}}catch{}if(!(o.isLinked||!o.oleTarget))try{let a=this.resolveImagePath(r,o.oleTarget);if(!a)continue;let s=this.zip.file(a);if(!s)continue;let l=await s.async("arraybuffer");if(l.byteLength===0||l.byteLength>zU)continue;let c=kFt(new Uint8Array(l));if(c.data.length===0)continue;let d=c.fileName??o.fileName??(o.oleName&&o.oleFileExtension?`${o.oleName}.${o.oleFileExtension}`:void 0),p=IE(d??`x.${o.oleFileExtension??"bin"}`);o.oleEmbeddedData=Xa(c.data,p),o.oleEmbeddedByteSize=c.data.length,o.oleEmbeddedMimeType=p,d&&(o.oleEmbeddedFileName=d);}catch{}}}}async loadSlidesForPresentation(e){return this.presentationData?this.slideLoaderService.loadSlides({presentationData:this.presentationData,parser:this.parser,zip:this.zip,compatibilityService:this.compatibilityService,slideMap:this.slideMap,sectionBySlideId:e,setOrderedSlidePaths:r=>{this.orderedSlidePaths=r;},loadSlideRelationships:(r,n)=>this.loadSlideRelationships(r,n),parseSlideClrMapOverride:r=>this.parseSlideClrMapOverride(r),setCurrentSlideClrMapOverride:r=>{this.currentSlideClrMapOverride=r;},setActiveMasterForSlide:r=>this.setActiveMasterForSlide(r),findLayoutPathForSlide:r=>this.findLayoutPathForSlide(r),loadThemeOverride:r=>this.loadThemeOverride(r),applyThemeOverrideState:r=>this.applyThemeOverrideState(r),getLayoutElements:r=>this.getLayoutElements(r),parseSlide:(r,n)=>this.parseSlide(r,n),extractMediaTimingMap:(r,n)=>this.extractMediaTimingMap(r,n),enrichMediaElementsWithTiming:(r,n)=>this.enrichMediaElementsWithTiming(r,n),enrichOleElementsWithEmbeddedData:(r,n)=>this.enrichOleElementsWithEmbeddedData(r,n),extractBackgroundColor:r=>this.extractBackgroundColor(r),extractOwnBackgroundNode:r=>this.extractOwnBackgroundNode(r),getLayoutBackgroundColor:r=>this.getLayoutBackgroundColor(r),extractBackgroundGradient:r=>this.extractBackgroundGradient(r),getLayoutBackgroundGradient:r=>this.getLayoutBackgroundGradient(r),extractBackgroundImage:(r,n)=>this.extractBackgroundImage(r,n),extractBackgroundImageProperties:(r,n)=>this.extractBackgroundImageProperties(r,n),getLayoutBackgroundImage:r=>this.getLayoutBackgroundImage(r),getLayoutBackgroundImageProperties:r=>this.getLayoutBackgroundImageProperties(r),rememberSlideBackgroundOrigin:(r,n)=>Mrt(this,r,n),extractSlideNotes:r=>this.extractSlideNotes(r),extractSlideComments:r=>this.extractSlideComments(r),extractModernSlideComments:r=>this.extractModernSlideComments(r),getModernCommentPart:r=>this.modernCommentParts.get(r),extractBackgroundPattern:r=>this.extractBackgroundPattern(r),extractBackgroundShadeToTitle:r=>this.extractBackgroundShadeToTitle(r),extractBackgroundShowAnimation:r=>this.extractBackgroundShowAnimation(r),extractShowMasterShapes:r=>this.extractShowMasterShapes(r),extractShowMasterPhAnim:r=>this.extractShowMasterPhAnim(r),isSlideHidden:(r,n)=>this.isSlideHidden(r,n),parseSlideTransition:(r,n)=>this.parseSlideTransition(r,n),parseEditorAnimations:r=>this.parseEditorAnimations(r),parseNativeAnimations:(r,n)=>this.parseNativeAnimations(r,n),getSmartArtDataForGraphicFrame:(r,n)=>this.getSmartArtDataForGraphicFrame(r,n),getChartDataForGraphicFrame:(r,n)=>this.getChartDataForGraphicFrame(r,n),parseSlideCustomerData:(r,n)=>this.parseSlideCustomerData(r,n),parseSlideActiveXControls:r=>this.parseSlideActiveXControls(r)}):[]}};}}),Jht,ufe=T({"src/core/core/runtime/PptxHandlerRuntimeLoadPipeline.ts"(){dat(),fat(),h1(),qM(),iu(),BQ(),Ps(),Nc(),F1(),pJt(),pfe(),rL(),Jht=class extends Zht{async buildLoadData(t,e,r){let n=this.extractHeaderFooter(),i=await this.parsePresentationProperties(),o=await this.parseViewProperties();this.loadedViewProperties=o;let a=this.parseCustomShows(),s=await this.parseTableStyles(),l=this.loadedTableStylesDefaultId,c=oJt(this.presentationData),d=await this.getEmbeddedFonts(c);this.loadedEmbeddedFonts=d,this.loadedEmbeddedFontList=c;let p=await this.parseThemeOptions(),u=await this.parseNotesMaster(),f=await this.parseHandoutMaster(),h=i?.printProperties?.printWhat?.match(/^handouts([123469])$/u);f&&h&&(f.slidesPerPage=Number.parseInt(h[1],10)),await this.enrichAuxiliaryMasterElements(u,"p:notesMaster"),await this.enrichAuxiliaryMasterElements(f,"p:handoutMaster"),await this.enrichSlideMasterElements(r);let g=await this.parseTags(),y=await this.parseCustomProperties(),x=await this.parseCoreProperties(),v=await this.parseAppProperties(),b=this.presentationData?P9t(this.presentationData):[],S=this.extractPhotoAlbum(),w=this.extractModifyVerifier(),C=this.extractKinsoku(),_=await mHt(this.zip,I=>this.parser.parse(I),this.presentationData),A=await this.parsePresentationCustomerData();this.thumbnailData=await this.parseThumbnail()??null;let k=this.extractEmbedTrueTypeFonts(),E=this.presentationDefaultTextStyle?.levelStyles;return new Wnt().withDimensions(t.width,t.height,this.rawSlideWidthEmu,this.rawSlideHeightEmu).withNotesDimensions(t.notesWidthEmu,t.notesHeightEmu).withSlides(e).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(n).withPresentationProperties(i).withViewProperties(o).withCustomShows(a).withSections(t.orderedSections.length>0?t.orderedSections:void 0).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({...this.themeColorMap}).withTheme(this.buildThemeObject()).withThemeOptions(p.length>0?p:void 0).withTableStyleMap(s).withTableStylesDefaultId(l).withEmbeddedFonts(d.length>0?d:void 0).withEmbeddedFontList(c).withMruColors(i?.mruColors).withNotesMaster(u).withHandoutMaster(f).withSlideMasters(r.length>0?r:void 0).withTags(g.length>0?g:void 0).withCustomProperties(y.length>0?y:void 0).withCoreProperties(x).withAppProperties(v).withHasMacros(this.vbaProjectBin!==null?true:void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures||void 0).withDigitalSignatureCount(this.signatureDetection?.signatureCount&&this.signatureDetection.signatureCount>0?this.signatureDetection.signatureCount:void 0).withPresentationGuides(b.length>0?b:void 0).withPhotoAlbum(S).withKinsoku(C).withModifyVerifier(w).withSmartTags(_).withCustomXmlParts(this.customXmlParts.length>0?this.customXmlParts:void 0).withCustomerData(A.length>0?A:void 0).withSlideSizeType(this.rawSlideSizeType).withThumbnailData(this.thumbnailData??void 0).withCommentAuthors(this.commentAuthorDetails.size>0?Array.from(this.commentAuthorDetails.values()):void 0).withModernCommentAuthors(this.modernCommentAuthors.size>0?Array.from(this.modernCommentAuthors.values()):void 0).withConformance(this.isStrictOoxml?"strict":"transitional").withEmbedTrueTypeFonts(k).withDefaultTextStyle(E).build()}findMaxElementId(t){let r=0,n=[];for(let o of t)n.push(o.rawXml);let i=0;for(;n.length>0&&!(i++>1e6);){let o=n.pop();if(o==null||typeof o!="object")continue;if(Array.isArray(o)){for(let s of o)s!=null&&typeof s=="object"&&n.push(s);continue}let a=o;if("@_id"in a){let s=parseInt(String(a["@_id"]),10);Number.isFinite(s)&&s>r&&(r=s);}for(let s of Object.values(a))s!=null&&(Array.isArray(s)||typeof s=="object")&&n.push(s);}return r}resetElementIdCounter(t){let e=this.findMaxElementId(t);this.elementXmlBuilder.resetIdCounter(e+1);}attachSlideWarnings(t){let e=this.compatibilityService.getWarnings(),r=new Map;for(let n of e){if(!n.slideId)continue;let i=r.get(n.slideId);i?i.push(n):r.set(n.slideId,[n]);}return t.map(n=>({...n,warnings:r.get(n.id)??[]}))}revokeBlobUrls(){if(typeof globalThis.URL?.revokeObjectURL=="function"&&this.blobUrlCache.size>0){for(let t of this.blobUrlCache)URL.revokeObjectURL(t);this.blobUrlCache.clear();}}dispose(){this.revokeBlobUrls(),this.imageDataCache.clear(),this.slideMap.clear(),this.savedSlideFingerprints.clear(),this.slideRelsMap.clear(),this.externalRelsMap.clear(),this.layoutCache.clear(),this.masterCache.clear(),this.templateElementBaselines.reset(),this.layoutXmlMap.clear(),this.masterXmlMap.clear(),this.masterTxStylesCache.clear(),this.layoutPlaceholderDefaultsCache.clear(),this.masterPlaceholderDefaultsCache.clear(),this.themeOverrideCache.clear(),this.commentAuthorMap.clear(),this.commentAuthorDetails.clear(),this.vbaRelatedParts.clear(),this.presentationData=null,this.thumbnailData=null,this.vbaProjectBin=null,this.customXmlParts=[],this.loadedEmbeddedFonts=[],this.loadedEmbeddedFontList=void 0,this.loadedViewProperties=void 0,this.loadedTableStylesDefaultId=void 0,this.orderedSlidePaths=[],this.zip=null;}async load(t,e={}){await this.initializeLoadSession(t,e),await this.detectAndPreserveVbaProject(),this.detectDigitalSignatureParts(),await this.parseCustomXmlParts();let r=await this.loadPresentationState(),n=await this.parseSlideMasters();await this.enrichSlideMastersWithTxStyles(n);let i=await this.loadSlidesForPresentation(r.sectionBySlideId),o=this.attachSlideWarnings(i);return this.resetElementIdCounter(i),epe(this.savedSlideFingerprints,o),this.buildLoadData(r,o,n)}getTemplateBackgroundColor(t){return this.templateBackgroundService.getBackgroundColor({layoutXmlMap:this.layoutXmlMap,masterXmlMap:this.masterXmlMap},t,(e,r)=>this.extractBackgroundColor(e,r))}setTemplateBackground(t,e){this.templateBackgroundService.setBackground({layoutXmlMap:this.layoutXmlMap,masterXmlMap:this.masterXmlMap},t,e);}createXmlBuilder(t){return new sat(t)}Builder(t){return this.createXmlBuilder(t)}getCompatibilityWarnings(){return this.compatibilityService.getWarnings()}findMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e){for(let[,r]of e.entries())if(r.includes("slideMaster")){let n=t.substring(0,t.lastIndexOf("/")+1);return r.startsWith("/")?r.substring(1):r.startsWith("..")?this.resolvePath(n,r):`ppt/${hr(r)}`}}}findMasterPathForSlide(t){let e=this.findLayoutPathForSlide(t);if(e)return this.findMasterPathForLayout(e)}async getTemplateElementsForSlide(t){let e=this.slideMap.get(t);return e&&this.extractShowMasterShapes(e)===false?[]:this.getLayoutElements(t)}async getAvailableLayoutsForSlide(t,e){let r=e[t];if(!r)return [];let n=r.id,i=this.findMasterPathForSlide(n);if(!i)return this.getLayoutOptions();let o=this.slideRelsMap.get(i);if(!o)return this.getLayoutOptions();let a=new Set;for(let[,l]of o.entries())if(l.includes("slideLayout")){let c=i.substring(0,i.lastIndexOf("/")+1),d=l.startsWith("/")?l.substring(1):l.startsWith("..")?this.resolvePath(c,l):`ppt/${hr(l)}`;a.add(d);}let s=[];for(let l of a){let c=this.layoutXmlMap.get(l);if(c)s.push(this.buildLayoutOption(l,c));else try{let d=await this.zip.file(l)?.async("string");if(d){let p=this.parser.parse(d);this.layoutXmlMap.set(l,p),s.push(this.buildLayoutOption(l,p));}}catch{}}return s}buildLayoutOption(t,e){let r=e["p:sldLayout"],n=String(r?.["p:cSld"]?.["@_name"]||"").trim(),i=r?.["@_type"],o=i!=null?String(i).trim():void 0,a=ztt({name:n,type:o,path:t}),s=this.findMasterPathForLayout(t);return {path:t,name:a,...o?{type:o}:{},...s?{masterPath:s}:{}}}async applyLayoutToSlide(t,e,r){let n=r[t];if(!n)throw new Error(`Slide index ${t} out of range`);let i=this.layoutXmlMap.get(e);if(!i){let h=await this.zip.file(e)?.async("string");if(!h)throw new Error(`Layout not found: ${e}`);i=this.parser.parse(h),this.layoutXmlMap.set(e,i);}let o=n.id,a=`${o.replace("slides/","slides/_rels/")}.rels`,s=await this.zip.file(a)?.async("string");if(s){let h=this.parser.parse(s),g=Array.isArray(h?.Relationships?.Relationship)?h.Relationships.Relationship:h?.Relationships?.Relationship?[h.Relationships.Relationship]:[],y=`../slideLayouts/${e.split("/").pop()}`,x=false;for(let S of g)if(String(S["@_Type"]||"").includes("/slideLayout")){S["@_Target"]=y,x=true;break}if(!x){let S=g.reduce((w,C)=>{let _=parseInt(String(C["@_Id"]||"rId0").replace("rId",""),10);return Number.isFinite(_)&&_>w?_:w},0);g.push({"@_Id":`rId${S+1}`,"@_Type":"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout","@_Target":y});}h.Relationships.Relationship=g.length===1?g[0]:g;let v=this.builder.build(h);this.zip.file(a,v);let b=this.slideRelsMap.get(o);if(b){for(let[S,w]of b.entries())if(w.includes("slideLayout")){b.set(S,y);break}}}this.slideRelsMap.has(o)||this.slideRelsMap.set(o,new Map([["rId1",`../slideLayouts/${e.split("/").pop()}`]])),this.layoutCache.delete(e),await this.getLayoutElements(o);let l=dJt(this.remapElementsToNewLayout(n.elements,i,e),{resolveDefaults:h=>{let g=this.getElementPlaceholderInfo(h);return g?this.lookupPlaceholderDefaults(o,g):void 0},placeholderType:h=>this.getElementPlaceholderInfo(h)?.type,applyBodyDefaults:(h,g)=>this.applyPlaceholderBodyDefaults(h,g),applyLevelDefaults:(h,g)=>this.applyPlaceholderLevelDefaults(h,g)}),c=i["p:sldLayout"],d=String(c?.["p:cSld"]?.["@_name"]||"").trim()||e,p={...n,elements:l,layoutPath:e,layoutName:d,isDirty:true},u=Rrt(this,o);if(u?Lrt(u,n):!n.rawXml||!this.extractBackgroundColor(n.rawXml)){await this.loadSlideRelationships(e,as(e));let[h,g,y]=await Promise.all([this.getLayoutBackgroundColor(o),this.getLayoutBackgroundGradient(o),this.getLayoutBackgroundImage(o)]);p.backgroundColor=h??n.backgroundColor,p.backgroundGradient=g,p.backgroundImage=y,Mrt(this,o,{authored:false,color:p.backgroundColor,gradient:g,image:y});}return r[t]=p,p}};}}),Qht,ffe=T({"src/core/core/runtime/PptxHandlerRuntimeImplementation.ts"(){ert(),Nc(),Q5(),ufe(),Qht=class Do extends Jht{constructor(e=new oat){super(),this.dependencyFactory=e,this.zip=new pn__default.default,this.parser=this.dependencyFactory.createParser(),this.builder=this.dependencyFactory.createBuilder(),this.elementXmlBuilder=new trt({emuPerPx:Do.EMU_PER_PX,toDrawingTextVerticalAlign:i=>this.textVerticalAlignToDrawingValue(i)}),this.contentTypesBuilder=new rrt,this.elementTransformUpdater=new krt,this.presentationSaveBuilder=new mrt,this.presentationSlidesReconciler=new yrt,this.slideBackgroundBuilder=new Frt,this.slideCommentPartWriter=new Crt,this.slideMediaRelationshipBuilder=new Ert,this.slideNotesPartUpdater=new Irt,this.colorStyleCodec=new dnt({emuPerPx:Do.EMU_PER_PX,ensureArray:i=>this.ensureArray(i),resolveThemeColor:i=>this.resolveThemeColor(i)}),this.connectorParser=new Gnt({emuPerPx:Do.EMU_PER_PX,getOrderedSlidePaths:()=>this.orderedSlidePaths,slideRelsMap:this.slideRelsMap,parseGeometryAdjustments:i=>this.parseGeometryAdjustments(i),readFlipState:i=>this.readFlipState(i),extractShapeStyle:(i,o)=>this.extractShapeStyle(i,o),parseShapeLocks:i=>this.parseShapeLocks(i),parseElementActions:(i,o,a)=>this.parseElementActions(i,o,a),parseConnectorTextBody:(i,o)=>this.parseConnectorTextBody(i,o)}),this.shapeStyleExtractor=new hnt({emuPerPx:Do.EMU_PER_PX,parseColor:(i,o)=>this.parseColor(i,o),extractColorOpacity:i=>this.extractColorOpacity(i),extractGradientFillColor:i=>this.extractGradientFillColor(i),extractGradientOpacity:i=>this.extractGradientOpacity(i),extractGradientFillCss:i=>this.extractGradientFillCss(i),extractGradientStops:i=>this.extractGradientStops(i),extractGradientAngle:i=>this.extractGradientAngle(i),extractGradientType:i=>this.extractGradientType(i),extractGradientPathType:i=>this.colorStyleCodec.extractGradientPathType(i),extractGradientFocalPoint:i=>this.colorStyleCodec.extractGradientFocalPoint(i),extractGradientFillToRect:i=>this.colorStyleCodec.extractGradientFillToRect(i),extractGradientFlip:i=>this.colorStyleCodec.extractGradientFlip(i),extractGradientRotWithShape:i=>this.colorStyleCodec.extractGradientRotWithShape(i),extractGradientScaled:i=>this.colorStyleCodec.extractGradientScaled(i),normalizeStrokeDashType:i=>this.normalizeStrokeDashType(i),normalizeConnectorArrowType:i=>this.normalizeConnectorArrowType(i),ensureArray:i=>this.ensureArray(i),resolveThemeFillRef:(i,o)=>this.resolveThemeFillRef(i,o),resolveThemeLineRef:(i,o)=>this.resolveThemeLineRef(i,o),resolveThemeEffectRef:(i,o)=>this.resolveThemeEffectRef(i,o),extractShadowStyle:i=>this.extractShadowStyle(i),extractInnerShadowStyle:i=>this.extractInnerShadowStyle(i),extractGlowStyle:i=>this.extractGlowStyle(i),extractSoftEdgeStyle:i=>this.extractSoftEdgeStyle(i),extractReflectionStyle:i=>this.extractReflectionStyle(i),extractBlurStyle:i=>this.extractBlurStyle(i),extractEffectDagStyle:i=>this.extractEffectDagStyle(i),extractFillOverlayStyle:i=>this.extractFillOverlayStyle(i)}),this.tableDataParser=new Ant({emuPerPx:Do.EMU_PER_PX,ensureArray:i=>this.ensureArray(i),parseColor:(i,o)=>this.parseColor(i,o),extractGradientFillCss:i=>this.extractGradientFillCss(i),extractGradientStops:i=>this.extractGradientStops(i),extractGradientType:i=>this.extractGradientType(i),extractGradientAngle:i=>this.extractGradientAngle(i),extractGradientPathType:i=>this.colorStyleCodec.extractGradientPathType(i),extractGradientFocalPoint:i=>this.colorStyleCodec.extractGradientFocalPoint(i),extractGradientFillToRect:i=>this.colorStyleCodec.extractGradientFillToRect(i),resolveCellImagePath:(i,o,a)=>this.resolveTableCellImagePath(i,o,a)}),this.mediaDataParser=new Pnt({slideRelsMap:this.slideRelsMap,externalRelsMap:this.externalRelsMap,resolvePath:(i,o)=>this.resolvePath(i,o),getPathExtension:i=>this.getPathExtension(i),allowExternalMedia:()=>this.allowExternalImages===true}),this.graphicFrameParser=new Xnt({emuPerPx:Do.EMU_PER_PX,getOrderedSlidePaths:()=>this.orderedSlidePaths,slideRelsMap:this.slideRelsMap,externalRelsMap:this.externalRelsMap,readFlipState:i=>this.readFlipState(i),parseTableData:(i,o)=>this.parseTableData(i,o),parseMediaData:(i,o)=>this.parseMediaData(i,o),parseElementActions:(i,o,a)=>this.parseElementActions(i,o,a),inspectGraphicFrameCompatibility:(i,o,a)=>this.compatibilityService.inspectGraphicFrameCompatibility(i,o,a),findPlaceholderNode:(i,o)=>this.findPlaceholderNode(i,{idx:o.idx,type:o.type,sz:o.sz,orient:o.orient})});let r=new oit;this.slideCommentsXmlFactory=r.createSlideCommentsFactory(),this.commentAuthorsXmlFactory=r.createCommentAuthorsFactory();let n=this.dependencyFactory.createDependencies({zip:this.zip,parser:this.parser,builder:this.builder,editorMetaExtensionUri:Do.EDITOR_META_EXTENSION_URI,editorMetaNamespaceUri:Do.EDITOR_META_NAMESPACE_URI,getXmlLocalName:i=>{let o=i.startsWith("@_")?i.slice(2):i,a=o.lastIndexOf(":");return a<0?o:o.slice(a+1)}});this.xmlLookupService=n.xmlLookupService,this.compatibilityService=n.compatibilityService,this.slideLoaderService=n.slideLoaderService,this.templateBackgroundService=n.templateBackgroundService,this.slideTransitionService=n.slideTransitionService,this.editorAnimationService=n.editorAnimationService,this.nativeAnimationService=n.nativeAnimationService,this.animationWriteService=n.animationWriteService,this.documentPropertiesUpdater=n.documentPropertiesUpdater;}};}}),Gk,tmt=T({"src/core/core/PptxHandlerRuntime.ts"(){ffe(),Gk=class extends Qht{};}}),emt,mfe=T({"src/core/core/PptxHandlerRuntimeFactory.ts"(){tmt(),emt=()=>new Gk;}});function gfe(t){let e=globalThis.structuredClone;return e?e(t):JSON.parse(JSON.stringify(t))}function yfe(t=new Set){let e=globalThis.crypto;for(let r=0;r<8;r++){let n=e?.randomUUID?.(),i=n?`{${n.toUpperCase()}}`:xfe(r);if(!t.has(bs(i)))return i}return `{${Date.now().toString(16).padStart(12,"0")}-FFFF-FFFF-FFFF-${Math.random().toString(16).slice(2,14).padEnd(12,"0")}}`.toUpperCase()}function xfe(t){let e=()=>Math.floor(Math.random()*4294967295).toString(16).padStart(8,"0"),r=(Date.now()+t).toString(16).padStart(12,"0").slice(-12);return `{${e()}-${e().slice(0,4)}-4${e().slice(1,4)}-8${e().slice(1,4)}-${r}}`}function NUe(t,e){let r=e.styleId?bs(e.styleId):yfe(new Set(Object.keys(t).map(bs)));return e.basedOn?{...gfe(e.basedOn),styleId:r,styleName:e.styleName}:{styleId:r,styleName:e.styleName}}function BUe(t,e){return t[bs(e.styleId)]=e,t}function $Ue(t,e){let r=bs(e);return r in t?(delete t[r],true):false}var vfe=T({"src/core/core/runtime/table-style-editor.ts"(){uS();}}),rmt=T({"src/core/core/index.ts"(){mfe(),tmt(),Nc(),Q5(),mat(),VR(),ub(),sR(),vfe(),uS();}}),wS,bfe=T({"src/core/ppt/text/byte-cursor.ts"(){wS=class{constructor(t,e,r){this.view=t,this.end=r,this.pos=e;}view;end;pos;canRead(t){return this.pos+t<=this.end}u16(){let t=this.view.getUint16(this.pos,true);return this.pos+=2,t}i16(){let t=this.view.getInt16(this.pos,true);return this.pos+=2,t}u32(){let t=this.view.getUint32(this.pos,true);return this.pos+=4,t}bytes4(){let t=this.view,e=this.pos;return this.pos+=4,[t.getUint8(e),t.getUint8(e+1),t.getUint8(e+2),t.getUint8(e+3)]}skip(t){this.pos+=t;}};}});function nmt(t,e,r){if(!t.canRead(4))return false;let n=t.u32(),i=o=>(n&o)!==0;try{let o=0;if(n&15&&(o=t.u16(),i(1)&&(r.hasBullet=(o&1)!==0)),i(128)&&(r.bulletChar=String.fromCharCode(t.u16())),i(16)&&(r.bulletFontRef=t.u16()),i(64)&&t.i16(),i(32)){let[a,s,l,c]=t.bytes4();r.bulletColorRgb=Jlt(a,s,l,c,e);}if(i(2048)&&(r.align=omt[t.u16()]),i(4096)&&t.i16(),i(8192)&&t.i16(),i(16384)&&t.i16(),i(256)&&(r.leftMarginMu=t.u16()),i(1024)&&(r.indentMu=t.u16()),i(32768)&&t.u16(),i(1048576)){let a=t.u16();t.skip(a*4);}i(65536)&&t.u16(),n&917504&&t.u16(),i(2097152)&&t.u16();}catch{return false}return true}function imt(t,e,r){if(!t.canRead(4))return false;let n=t.u32(),i=o=>(n&o)!==0;try{if(n&65535){let o=t.u16();i(1)&&(r.bold=(o&1)!==0),i(2)&&(r.italic=(o&2)!==0),i(4)&&(r.underline=(o&4)!==0),i(16)&&(r.shadow=(o&16)!==0);}if(i(65536)&&(r.fontRef=t.u16()),i(2097152)&&t.u16(),i(4194304)){let o=t.u16();r.fontRef===void 0&&(r.fontRef=o);}if(i(8388608)&&t.u16(),i(131072)&&(r.sizePt=t.i16()),i(262144)){let[o,a,s,l]=t.bytes4();r.colorRgb=Jlt(o,a,s,l,e);}i(524288)&&t.i16();}catch{return false}return true}function Sfe(t,e,r,n){let i=new wS(t,e,r),o={count:0,indentLevel:0};if(nmt(i,n,o))return {props:o,next:i.pos}}function wfe(t,e,r,n){let i=new wS(t,e,r),o={count:0};if(imt(i,n,o))return {props:o,next:i.pos}}function Tfe(t,e,r,n,i){let o=new wS(t,e,e+r),a=n+1,s=[],l=[],c=0;for(;c<a&&o.canRead(6);){let d=o.u32(),p=o.u16(),u={count:d,indentLevel:p};if(!nmt(o,i,u))break;s.push(u),c+=d;}for(c=0;c<a&&o.canRead(8);){let d=o.u32(),p={count:d};if(!imt(o,i,p))break;l.push(p),c+=d;}return {paragraphRuns:s,charRuns:l}}var omt,amt=T({"src/core/ppt/text/style-props.ts"(){js(),bfe(),omt={0:"l",1:"ctr",2:"r",3:"just"};}});function Cfe(t,e,r){let n="";for(let i=0;i<r;i++){let o=t.getUint8(e+i);n+=String.fromCharCode(lmt[o]??o);}return n}function TS(t,e,r){let n="";for(let i=0;i+1<r;i+=2)n+=String.fromCharCode(t.getUint16(e+i,true));return n}function smt(t,e,r,n){let i=[],o;for(let a of au(t,e,r))a.recType===tt.TextHeaderAtom?(o={textType:a.recLen>=4?t.getUint32(a.dataOffset,true):0,text:""},i.push(o)):a.recType===tt.TextCharsAtom&&o?o.text=TS(t,a.dataOffset,a.recLen):a.recType===tt.TextBytesAtom&&o?o.text=Cfe(t,a.dataOffset,a.recLen):a.recType===tt.StyleTextPropAtom&&o&&(o.styles=Tfe(t,a.dataOffset,a.recLen,o.text.length,n));return i}function _fe(t,e,r){for(let n of au(t,e,r))if(n.recType===tt.OutlineTextRefAtom&&n.recLen>=4)return t.getInt32(n.dataOffset,true)}function Afe(t,e,r){let n=new Map,i,o,a=l=>{i!==void 0&&o!==void 0&&n.set(i,smt(t,o,l,r));},s=e.dataOffset+e.recLen;for(let l of au(t,e.dataOffset,s))l.recType===tt.SlidePersistAtom&&l.recLen>=4&&(a(l.headerOffset),i=t.getUint32(l.dataOffset,true),o=l.dataOffset+l.recLen);return a(s),n}var lmt,CS=T({"src/core/ppt/text/text-atoms.ts"(){Lr(),Rt(),amt(),lmt={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};}});function a_(t,e){return TS(t,e.dataOffset,e.recLen)}function Pfe(t,e){let r=Kt(t,e,tt.ExternalHyperlinkAtom);if(!r||r.recLen<4)return;let n=t.getUint32(r.dataOffset,true),i={};for(let o of Gr(t,e))o.recType===tt.CString&&(o.recInstance===0?i.friendlyName=a_(t,o):o.recInstance===1?i.target=a_(t,o):o.recInstance===3&&(i.location=a_(t,o)));return {id:n,strings:i}}function kfe(t,e){let r=new Map,n=Kt(t,e,tt.ExternalObjectList);if(!n)return r;for(let i of Gr(t,n)){if(i.recType!==tt.ExternalHyperlink)continue;let o=Pfe(t,i);o&&r.set(o.id,o.strings);}return r}function Efe(t){if(!t)return;let e=/^\d+,(\d+),$/u.exec(t);return e?Number.parseInt(e[1],10)-1:void 0}function cmt(t,e,r){if(e.recLen<16)return;let n=t.getUint32(e.dataOffset+4,true),i=t.getUint8(e.dataOffset+8),o=t.getUint8(e.dataOffset+10),a=t.getUint8(e.dataOffset+12);if(i===Tx.jumpAction)return Wk[o]?{kind:Wk[o]}:void 0;if(i!==Tx.hyperlinkAction&&i!==Tx.customShowAction)return;let s=r.get(n);if(s)switch(a){case zd.url:return s.target?{kind:"url",url:s.target}:void 0;case zd.slideNumber:{let l=Efe(s.location);return l!==void 0?{kind:"slide",slideIndex:l}:void 0}case zd.customShow:return s.friendlyName?{kind:"customShow",name:s.friendlyName}:void 0;case zd.otherFile:return s.target?{kind:"openFile",path:s.target}:void 0;case zd.otherPresentation:return s.target?{kind:"openPresentation",path:s.target}:void 0;default:return}}function Ife(t,e,r,n){let i=[],o;for(let a of au(t,e,r))if(a.recType===tt.InteractiveInfo&&a.recInstance===0){let s=Kt(t,a,tt.InteractiveInfoAtom);o=s?cmt(t,s,n):void 0;}else a.recType===tt.TextInteractiveInfoAtom&&a.recLen>=8&&(o&&i.push({begin:t.getUint32(a.dataOffset,true),end:t.getUint32(a.dataOffset+4,true),target:o}),o=void 0);return i}function Mfe(t,e,r){for(let n of Gr(t,e))if(n.recType===tt.InteractiveInfo&&n.recInstance===0){let i=Kt(t,n,tt.InteractiveInfoAtom);if(i)return cmt(t,i,r)}}var zd,Tx,Wk,sL=T({"src/core/ppt/hyperlink-parser.ts"(){Lr(),Rt(),CS(),zd={customShow:6,slideNumber:7,url:8,otherPresentation:9,otherFile:10},Tx={jumpAction:3,hyperlinkAction:4,customShowAction:7},Wk={1:"nextSlide",2:"prevSlide",3:"firstSlide",4:"lastSlide",5:"lastViewed",6:"endShow"};}});async function dmt(t){if(!(typeof DecompressionStream>"u"))try{let r=new Blob([t.slice().buffer]).stream().pipeThrough(new DecompressionStream("deflate")).getReader(),n=[],i=0;for(;;){let s;try{s=await r.read();}catch{break}if(s.done)break;n.push(s.value),i+=s.value.length;}if(i===0)return;let o=new Uint8Array(i),a=0;for(let s of n)o.set(s,a),a+=s.length;return o}catch{return}}var pmt=T({"src/core/ppt/deflate-utils.ts"(){}});function Rfe(t,e){return TS(t,e.dataOffset,e.recLen)}function Lfe(t,e){let r=Kt(t,e,tt.ExternalOleObjectAtom);if(!r||r.recLen<24)return;let n=t.getUint32(r.dataOffset+8,true),i=t.getUint32(r.dataOffset+16,true),o=Kt(t,e,tt.CString,2),a=o?Rfe(t,o):void 0;return {exObjId:n,ref:{persistIdRef:i,progId:a}}}function Ffe(t,e){let r=new Map,n=Kt(t,e,tt.ExternalObjectList);if(!n)return r;for(let i of Gr(t,n)){if(i.recType!==tt.ExternalOleEmbed)continue;let o=Lfe(t,i);o&&r.set(o.exObjId,o.ref);}return r}function Ofe(t){if(t.length<16||t.every(a=>a===0))return;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=e.getUint32(0,true).toString(16).padStart(8,"0"),n=e.getUint16(4,true).toString(16).padStart(4,"0"),i=e.getUint16(6,true).toString(16).padStart(4,"0"),o="";for(let a=8;a<16;a++)o+=t[a].toString(16).padStart(2,"0");return `${r}-${n}-${i}-${o.slice(0,4)}-${o.slice(4)}`.toUpperCase()}async function Dfe(t,e,r,n){let i=Pre(t,r,n.persistIdRef);if(!i||i.recType!==tt.ExternalOleObjectStg)return;let o=sre(e,i);if(i.recInstance===1){if(o.length<4)return;let s=await dmt(o.subarray(4));if(!s)return;o=s;}else o=o.slice();let a;if($p(o))try{let s=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),c=Es(s).entries.find(d=>d.type===rs);a=c?Ofe(c.clsid):void 0;}catch{}return {data:o,progId:n.progId,clsId:a}}function Vk(t,e){for(let r of t)r.kind==="ole"?e.add(r.exObjId):r.kind==="group"&&Vk(r.children,e);}var Nfe=T({"src/core/ppt/ole-embed-parser.ts"(){aa(),Dm(),pmt(),oS(),Lr(),Rt(),CS();}});function Bfe(t){if(t.length<40)return t;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=e.getUint32(0,true),n=e.getUint16(14,true),i=e.getUint32(16,true),a=e.getUint32(32,true);a===0&&n<=8&&(a=1<<n);let s=14+r+a*4;i===3&&r===40&&(s+=12);let l=new Uint8Array(14+t.length),c=new DataView(l.buffer);return l[0]=66,l[1]=77,c.setUint32(2,l.length,true),c.setUint32(10,s,true),l.set(t,14),l}async function XU(t,e,r){let n=umt.get(r.recType);if(!n)return;let i=r.recInstance===n.singleUidInstance?1:2,o=r.dataOffset+i*16,a=r.dataOffset+r.recLen;if(n.isMetafile){if(o+34>a)return;let l=t.getUint8(o+32),c=e.subarray(o+34,a);if(l===0){let d=await dmt(c);return d?{extension:n.extension,bytes:d}:void 0}return {extension:n.extension,bytes:c.slice()}}if(o+=1,o>a)return;let s=e.subarray(o,a);return r.recType===pt.BlipDib?{extension:"bmp",bytes:Bfe(s)}:{extension:n.extension,bytes:s.slice()}}async function $fe(t,e){if(!t)return [];let r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=new Map,i=[];for(let c of au(r,0,t.length))if(c.recType>=pt.BlipFirst&&c.recType<=pt.BlipLast){let d=await XU(r,t,c);n.set(c.headerOffset,d),i.push(d);}if(!e)return i;let o=[],a=e.view,s=e.rec.dataOffset,l=e.rec.dataOffset+e.rec.recLen;for(;s+8<=l;){let c=IR(a,s);if(!c||c.dataOffset+c.recLen>l)break;if(c.recType===pt.FBSE&&c.recLen>=36){let d=a.getUint32(c.dataOffset+28,true);o.push(n.get(d)??i[o.length]);}else if(c.recType>=pt.BlipFirst&&c.recType<=pt.BlipLast){let d=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);o.push(await XU(a,d,c));}s=c.dataOffset+c.recLen;}return o.length>0?o:i}var umt,jfe=T({"src/core/ppt/pictures.ts"(){pmt(),Lr(),Rt(),umt=new Map([[pt.BlipEmf,{extension:"emf",isMetafile:true,singleUidInstance:980}],[pt.BlipWmf,{extension:"wmf",isMetafile:true,singleUidInstance:534}],[pt.BlipPict,{extension:"pict",isMetafile:true,singleUidInstance:1346}],[pt.BlipJpeg,{extension:"jpg",isMetafile:false,singleUidInstance:1130}],[pt.BlipPng,{extension:"png",isMetafile:false,singleUidInstance:1760}],[pt.BlipDib,{extension:"bmp",isMetafile:false,singleUidInstance:1960}],[pt.BlipTiff,{extension:"tiff",isMetafile:false,singleUidInstance:1764}],[pt.BlipJpegCmyk,{extension:"jpg",isMetafile:false,singleUidInstance:1762}]]);}});function Hfe(t,e){let r=0;for(let n of t)if(r+=n.count,e<r)return n;return t[t.length-1]}function Ufe(t,e,r){if(t.length===0)return [{start:e,end:r,props:void 0}];let n=[],i=0;for(let o of t){let a=i+o.count,s=Math.max(e,i),l=Math.min(r,a);if(s<l&&n.push({start:s,end:l,props:o}),i=a,i>=r)break}if(n.length===0)n.push({start:e,end:r,props:t[t.length-1]});else {let o=n[n.length-1];o.end<r&&n.push({start:o.end,end:r,props:o.props});}return n}function zfe(t,e){if(e.length===0)return t;let r=[],n=o=>e.find(a=>a.begin<=o&&o<a.end),i=o=>{let a=Number.POSITIVE_INFINITY;for(let s of e)s.begin>o&&s.begin<a&&(a=s.begin);return a};for(let o of t){let a=o.start;for(;a<o.end;){let s=n(a),l=s?s.end:i(a),c=Math.min(o.end,l);r.push({start:a,end:c,props:o.props,hyperlink:s?.target}),a=c;}}return r}function Xfe(t,e,r,n){let i={text:t};return n&&(i.hyperlink=n),e&&(e.bold!==void 0&&(i.bold=e.bold),e.italic!==void 0&&(i.italic=e.italic),e.underline!==void 0&&(i.underline=e.underline),e.sizePt!==void 0&&(i.sizePt=e.sizePt),e.colorRgb!==void 0&&(i.colorRgb=e.colorRgb),e.fontRef!==void 0&&r[e.fontRef]&&(i.fontName=r[e.fontRef])),i}function Gfe(t,e,r){e&&(t.indentLevel=e.indentLevel,e.align!==void 0&&(t.align=e.align),e.hasBullet!==void 0&&(t.hasBullet=e.hasBullet),e.bulletChar!==void 0&&(t.bulletChar=e.bulletChar),e.bulletColorRgb!==void 0&&(t.bulletColorRgb=e.bulletColorRgb),e.bulletFontRef!==void 0&&r[e.bulletFontRef]&&(t.bulletFontName=r[e.bulletFontRef]),e.leftMarginMu!==void 0&&(t.marginLeftEmu=Yi(e.leftMarginMu)),e.indentMu!==void 0&&(t.indentEmu=Yi(e.indentMu)));}function GU(t,e,r=[]){let i=t.text.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split("\r"),o=t.styles?.paragraphRuns??[],a=t.styles?.charRuns??[],s=[],l=0;for(let c of i){let d={indentLevel:0,runs:[]};Gfe(d,Hfe(o,l),e);let p=Ufe(a,l,l+c.length);for(let u of zfe(p,r)){let f=c.slice(u.start-l,u.end-l);f.length>0&&d.runs.push(Xfe(f,u.props,e,u.hyperlink));}d.runs.length===0&&c.length>0&&d.runs.push({text:c}),s.push(d),l+=c.length+1;}return s.length>1&&s[s.length-1].runs.length===0&&s.pop(),{textType:t.textType,paragraphs:s}}var Wfe=T({"src/core/ppt/text/text-builder.ts"(){Rt();}});function Vfe(t,e){let r=e.dataOffset,n=e.dataOffset+e.recLen,i=Ife(t.view,r,n,t.hyperlinkStrings),o=_fe(t.view,r,n);if(o!==void 0&&t.rawOutlineText){let s=t.rawOutlineText[o];if(s)return GU(s,t.fonts,i)}let a=smt(t.view,r,n,t.scheme);if(a.length!==0)return GU(a[0],t.fonts,i)}function Yfe(t,e){let r=Kt(t.view,e,tt.OEPlaceholderAtom);if(!r||r.recLen<5)return;let n=t.view.getUint8(r.dataOffset+4);return fmt[n]}function Kfe(t,e){let r=Kt(t.view,e,tt.ExternalObjectRefAtom);if(!(!r||r.recLen<4))return t.view.getUint32(r.dataOffset,true)}var fmt,qfe=T({"src/core/ppt/escher/client-data-extract.ts"(){sL(),Lr(),Rt(),CS(),Wfe(),fmt={13:"title",14:"body",15:"ctrTitle",16:"subTitle"};}});function Zfe(t){return lL.get(t)??hmt.get(t)??"rect"}function Jfe(t){return t===202}var lL,hmt,mmt=T({"src/core/ppt/escher/geometry-map.ts"(){lL=new Map([[20,"line"],[32,"straightConnector1"],[33,"bentConnector2"],[34,"bentConnector3"],[35,"bentConnector4"],[36,"bentConnector5"],[37,"curvedConnector2"],[38,"curvedConnector3"],[39,"curvedConnector4"],[40,"curvedConnector5"]]),hmt=new Map([[1,"rect"],[2,"roundRect"],[3,"ellipse"],[4,"diamond"],[5,"triangle"],[6,"rtTriangle"],[7,"parallelogram"],[8,"trapezoid"],[9,"hexagon"],[10,"octagon"],[11,"plus"],[12,"star5"],[13,"rightArrow"],[15,"homePlate"],[16,"cube"],[19,"arc"],[21,"plaque"],[22,"can"],[23,"donut"],[41,"callout1"],[42,"callout2"],[43,"callout3"],[44,"accentCallout1"],[45,"accentCallout2"],[46,"accentCallout3"],[47,"borderCallout1"],[48,"borderCallout2"],[49,"borderCallout3"],[53,"ribbon"],[54,"ribbon2"],[55,"chevron"],[56,"pentagon"],[57,"noSmoking"],[58,"star8"],[59,"star16"],[60,"star32"],[61,"wedgeRectCallout"],[62,"wedgeRoundRectCallout"],[63,"wedgeEllipseCallout"],[64,"wave"],[65,"foldedCorner"],[66,"leftArrow"],[67,"downArrow"],[68,"upArrow"],[69,"leftRightArrow"],[70,"upDownArrow"],[71,"irregularSeal1"],[72,"irregularSeal2"],[73,"lightningBolt"],[74,"heart"],[76,"quadArrow"],[77,"leftArrowCallout"],[78,"rightArrowCallout"],[79,"upArrowCallout"],[80,"downArrowCallout"],[81,"leftRightArrowCallout"],[82,"upDownArrowCallout"],[83,"quadArrowCallout"],[84,"bevel"],[85,"leftBracket"],[86,"rightBracket"],[87,"leftBrace"],[88,"rightBrace"],[89,"leftUpArrow"],[90,"bentUpArrow"],[91,"bentArrow"],[92,"star24"],[93,"stripedRightArrow"],[94,"notchedRightArrow"],[95,"blockArc"],[96,"smileyFace"],[97,"verticalScroll"],[98,"horizontalScroll"],[99,"circularArrow"],[101,"uturnArrow"],[102,"curvedRightArrow"],[103,"curvedLeftArrow"],[104,"curvedUpArrow"],[105,"curvedDownArrow"],[106,"cloudCallout"],[107,"ellipseRibbon"],[108,"ellipseRibbon2"],[109,"flowChartProcess"],[110,"flowChartDecision"],[111,"flowChartInputOutput"],[112,"flowChartPredefinedProcess"],[113,"flowChartInternalStorage"],[114,"flowChartDocument"],[115,"flowChartMultidocument"],[116,"flowChartTerminator"],[117,"flowChartPreparation"],[118,"flowChartManualInput"],[119,"flowChartManualOperation"],[120,"flowChartConnector"],[121,"flowChartPunchedCard"],[122,"flowChartPunchedTape"],[123,"flowChartSummingJunction"],[124,"flowChartOr"],[125,"flowChartCollate"],[126,"flowChartSort"],[127,"flowChartExtract"],[128,"flowChartMerge"],[130,"flowChartOnlineStorage"],[131,"flowChartMagneticTape"],[132,"flowChartMagneticDisk"],[133,"flowChartMagneticDrum"],[134,"flowChartDisplay"],[135,"flowChartDelay"],[176,"flowChartAlternateProcess"],[177,"flowChartOffpageConnector"],[178,"callout1"],[179,"accentCallout1"],[180,"borderCallout1"],[182,"leftRightUpArrow"],[183,"sun"],[184,"moon"],[185,"bracketPair"],[186,"bracePair"],[187,"star4"],[188,"doubleWave"],[189,"actionButtonBlank"],[190,"actionButtonHome"],[191,"actionButtonHelp"],[192,"actionButtonInformation"],[193,"actionButtonForwardNext"],[194,"actionButtonBackPrevious"],[195,"actionButtonEnd"],[196,"actionButtonBeginning"],[197,"actionButtonReturn"],[198,"actionButtonDocument"],[199,"actionButtonSound"],[200,"actionButtonMovie"],[202,"rect"]]);}});function gmt(t,e,r){let n=new Map,i=new Map,o=r.recInstance,a=r.dataOffset+o*6;if(a>r.dataOffset+r.recLen)return {values:n,complex:i};let s=[];for(let d=0;d<o;d++){let p=r.dataOffset+d*6,u=t.getUint16(p,true),f=t.getUint32(p+2,true),h=u&16383;(u&32768)!==0?s.push({id:h,length:f}):n.set(h,f);}let l=a,c=r.dataOffset+r.recLen;for(let d of s){let p=Math.min(l+d.length,c);i.set(d.id,e.subarray(l,p)),l=p;}return {values:n,complex:i}}function ymt(t,e,r){if(!(t===void 0||(t&r)===0))return (t&e)!==0}function Qfe(t){return (t>2147483647?t-4294967296:t)/65536}function the(t){let e="";for(let r=0;r+1<t.length;r+=2){let n=t[r]|t[r+1]<<8;if(n===0)break;e+=String.fromCharCode(n);}return e}function ehe(t){if(!(t===void 0||t===0))return xmt[t]}function WU(t){if(!(t===void 0||t===0))return vmt[t]??"triangle"}var rn,xmt,vmt,bmt=T({"src/core/ppt/escher/properties.ts"(){rn={rotation:4,lTxid:128,pib:260,fillType:384,fillColor:385,fillOpacity:386,fillBackColor:387,fNoFillHitTest:447,lineColor:448,lineOpacity:449,lineWidth:459,lineDashing:462,lineStartArrowhead:464,lineEndArrowhead:465,fNoLineDrawDash:511,wzName:896},xmt={0:"solid",1:"dash",2:"dot",3:"dashDot",4:"lgDashDotDot",5:"dot",6:"dash",7:"lgDash",8:"dashDot",9:"lgDashDot",10:"lgDashDotDot"},vmt={1:"triangle",2:"stealth",3:"diamond",4:"oval",5:"arrow"};}});function cL(t,e,r,n){return {x:Yi(e),y:Yi(t),w:Yi(r-e),h:Yi(n-t)}}function rhe(t,e){let r=t.getInt16(e,true),n=t.getInt16(e+2,true),i=t.getInt16(e+4,true),o=t.getInt16(e+6,true);return cL(r,n,i,o)}function nhe(t,e){let r=t.getInt32(e,true),n=t.getInt32(e+4,true),i=t.getInt32(e+8,true),o=t.getInt32(e+12,true);return cL(r,n,i,o)}function Smt(t,e){if(e.recLen===8)return rhe(t,e.dataOffset);if(e.recLen===16)return nhe(t,e.dataOffset)}function Yk(t,e){if(e.recLen!==16)return;let r=t.getInt32(e.dataOffset,true),n=t.getInt32(e.dataOffset+4,true),i=t.getInt32(e.dataOffset+8,true),o=t.getInt32(e.dataOffset+12,true);return cL(n,r,i,o)}function ihe(t,e,r){let n=ymt(t.values.get(rn.fNoFillHitTest),16,1048576);if(n===false)return {kind:"none"};let i=t.values.get(rn.fillColor);return i!==void 0?{kind:"solid",rgb:RR(i,e)}:n===true?{kind:"solid",rgb:e[4]}:Jfe(r)?{kind:"none"}:void 0}function ohe(t,e){let r=ymt(t.values.get(rn.fNoLineDrawDash),8,524288);if(r===false)return {kind:"noLine"};let n=t.values.get(rn.lineColor),i=t.values.get(rn.lineWidth);if(r!==true&&n===void 0&&i===void 0)return;let o={kind:"line",rgb:n!==void 0?RR(n,e):e[1],widthEmu:i??9525},a=ehe(t.values.get(rn.lineDashing));a&&(o.dash=a);let s=WU(t.values.get(rn.lineStartArrowhead));s&&(o.headArrow=s);let l=WU(t.values.get(rn.lineEndArrowhead));return l&&(o.tailArrow=l),o}var ahe=T({"src/core/ppt/escher/shape-props.ts"(){js(),Rt(),mmt(),bmt();}});function wmt(t,e){let r=Kt(t.view,e,pt.FSP);if(!r||r.recLen<8)return;let n=r.recInstance,i=t.view.getUint32(r.dataOffset+4,true);if(i&Amt)return;let o=Kt(t.view,e,pt.FOPT),a=o?gmt(t.view,t.data,o):{values:new Map,complex:new Map},s=Kt(t.view,e,pt.ClientAnchor),l=Kt(t.view,e,pt.ChildAnchor),c=s?Smt(t.view,s):l?Yk(t.view,l):void 0,d=a.complex.get(rn.wzName),p=d?the(d):void 0,u=a.values.get(rn.rotation),f=u!==void 0?Qfe(u):void 0,h=(i&Pmt)!==0?true:void 0,g=(i&kmt)!==0?true:void 0,y=Kt(t.view,e,pt.ClientData),x=y?Mfe(t.view,y,t.hyperlinkStrings):void 0,v=a.values.get(rn.pib);if(v!==void 0&&v>0){let _=y?Kfe(t,y):void 0;return _!==void 0&&t.oleExObjIds.has(_)?{kind:"ole",pictureIndex:v-1,exObjId:_,name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x}:{kind:"picture",pictureIndex:v-1,name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x}}let b={kind:"shape",preset:Zfe(n),isConnector:lL.has(n),name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x},S=ihe(a,t.scheme,n);S&&(b.fill=S);let w=ohe(a,t.scheme);if(w&&(b.line=w),y){let _=Yfe(t,y);_&&(b.placeholderType=_);}let C=Kt(t.view,e,pt.ClientTextbox);if(C){let _=Vfe(t,C);_&&_.paragraphs.some(A=>A.runs.length>0)&&(b.text=_);}if(!(i&dL))return b}function Tmt(t,e){let r=[],n,i=true;for(let d of Gr(t.view,e))if(d.recType===pt.SpContainer&&i)n=d,i=false;else if(d.recType===pt.SpContainer){let p=wmt(t,d);p&&r.push(p);}else if(d.recType===pt.SpgrContainer){let p=Tmt(t,d);p&&r.push(p);}if(!n)return;let o=Kt(t.view,n,pt.FSPGR),a=Kt(t.view,n,pt.ClientAnchor),s=Kt(t.view,n,pt.ChildAnchor),l=a?Smt(t.view,a):s?Yk(t.view,s):void 0,c=o&&o.recLen>=16?Yk(t.view,o):void 0;if(r.length!==0)return {kind:"group",anchor:l,childRect:c??l??{x:0,y:0,w:0,h:0},children:r}}function Cmt(t,e){let r={shapes:[]},n=Kt(t.view,e,pt.SpgrContainer);if(!n)return r;let i=true;for(let o of Gr(t.view,n))if(o.recType===pt.SpContainer){if(i){i=false;continue}let a=she(t,o);if(a!==void 0){r.backgroundRgb=a;continue}let s=wmt(t,o);s&&r.shapes.push(s);}else if(o.recType===pt.SpgrContainer){let a=Tmt(t,o);a&&r.shapes.push(a);}else Zlt(o);return r}function she(t,e){let r=Kt(t.view,e,pt.FSP);if(!r||r.recLen<8)return;let n=t.view.getUint32(r.dataOffset+4,true);if((n&dL)===0||(n&_mt)!==0)return;let i=Kt(t.view,e,pt.FOPT);if(!i)return t.scheme[0];let a=gmt(t.view,t.data,i).values.get(rn.fillColor);return a!==void 0?RR(a,t.scheme):t.scheme[0]}var _mt,Amt,Pmt,kmt,dL,lhe=T({"src/core/ppt/escher/sp-container.ts"(){js(),sL(),Lr(),Rt(),qfe(),mmt(),bmt(),ahe(),_mt=1,Amt=8,Pmt=64,kmt=128,dL=1024;}});function che(t,e){let{view:r,data:n,fonts:i}=t,o=true,a=true,s=true,l=Kt(r,e,tt.SlideAtom);if(l&&l.recLen>=24){let f=r.getUint16(l.dataOffset+20,true);s=(f&Emt)!==0,a=(f&Imt)!==0,o=(f&Mmt)!==0;}let c=MR(r,e),d=a?t.masterScheme:c??t.masterScheme,p={followMasterBackground:o,followMasterObjects:s,shapes:[]},u=Kt(r,e,tt.Drawing);if(u){let f=o0(r,u,pt.DgContainer);if(f){let h={view:r,data:n,scheme:d,fonts:i,rawOutlineText:t.outlineText,hyperlinkStrings:t.hyperlinkStrings,oleExObjIds:t.oleExObjIds},g=Cmt(h,f);p.shapes=g.shapes,g.backgroundRgb!==void 0&&(p.backgroundRgb=g.backgroundRgb,p.followMasterBackground=false);}}return p}function dhe(t,e,r,n,i,o,a){let s=MR(t,i),l=s??n,c,d=[],p=Kt(t,i,tt.Drawing);if(p){let u=o0(t,p,pt.DgContainer);if(u){let h=Cmt({view:t,data:e,scheme:l,fonts:r,rawOutlineText:void 0,hyperlinkStrings:o,oleExObjIds:a},u);c=h.backgroundRgb,d=h.shapes.filter(g=>!(g.kind==="shape"&&(g.placeholderType!==void 0||g.text!==void 0)));}}return {scheme:s,backgroundRgb:c,shapes:d,container:i}}var Emt,Imt,Mmt,phe=T({"src/core/ppt/slide-parser.ts"(){js(),lhe(),Lr(),Rt(),Emt=1,Imt=2,Mmt=4;}});function VU(t,e,r,n){let i=[],o=e.dataOffset+e.recLen;if(e.recLen<2)return i;let a=t.getUint16(e.dataOffset,true),s=e.dataOffset+2;for(let l=0;l<a&&l<10&&s<o;l++){e.recInstance>=5&&(s+=2);let c=Sfe(t,s,o,r);if(!c)break;s=c.next;let d=wfe(t,s,o,r);if(!d)break;s=d.next;let p={};d.props.sizePt!==void 0&&(p.sizePt=d.props.sizePt),d.props.bold!==void 0&&(p.bold=d.props.bold),d.props.colorRgb!==void 0&&(p.colorRgb=d.props.colorRgb),d.props.fontRef!==void 0&&n[d.props.fontRef]&&(p.fontName=n[d.props.fontRef]),c.props.align!==void 0&&(p.align=c.props.align),c.props.hasBullet!==void 0&&(p.hasBullet=c.props.hasBullet),c.props.bulletChar!==void 0&&(p.bulletChar=c.props.bulletChar),c.props.bulletFontRef!==void 0&&n[c.props.bulletFontRef]&&(p.bulletFontName=n[c.props.bulletFontRef]),c.props.leftMarginMu!==void 0&&(p.marginLeftEmu=Yi(c.props.leftMarginMu)),c.props.indentMu!==void 0&&(p.indentEmu=Yi(c.props.indentMu)),i.push(p);}return i}function uhe(t,e,r,n){let i=[],o=[];for(let a of Gr(t,e))a.recType===tt.TextMasterStyleAtom&&(a.recInstance===0&&i.length===0?i=VU(t,a,r,n):a.recInstance===1&&o.length===0&&(o=VU(t,a,r,n)));return {titleStyles:i,bodyStyles:o}}var fhe=T({"src/core/ppt/text/master-styles.ts"(){Lr(),Rt(),amt();}});function hhe(t,e){let r=[],n=Kt(t,e,tt.Environment);if(!n)return r;let i=o0(t,n,tt.FontCollection);if(!i)return r;for(let o of Gr(t,i))if(o.recType===tt.FontEntityAtom){let a=TS(t,o.dataOffset,Math.min(64,o.recLen)),s=a.indexOf("\0");r.push(s>=0?a.slice(0,s):a);}return r}function Rmt(t,e){let r=[];for(let n of Gr(t,e))n.recType===tt.SlidePersistAtom&&n.recLen>=4&&r.push(t.getUint32(n.dataOffset,true));return r}function mhe(t,e,r,n){for(let o of Gr(t,e))if(o.recType===tt.SlideListWithText&&o.recInstance===0)return {persistIds:Rmt(t,o),outline:Afe(t,o,n)};let i=[];for(let[o,a]of r)yi(t,a).recType===tt.Slide&&i.push(o);return i.sort((o,a)=>o-a),{persistIds:i,outline:new Map}}function ghe(t,e){let r=Kt(t,e,tt.DrawingGroup);if(r)return o0(t,r,pt.BStoreContainer)}async function yhe(t){let e=t.powerPointDocument,r=new DataView(e.buffer,e.byteOffset,e.byteLength),{currentEdit:n,directory:i}=lct(r,t.offsetToCurrentEdit);if(n.encryptSessionPersistIdRef!==void 0&&n.encryptSessionPersistIdRef!==0&&!t.decrypted)throw new Xv;let o=i.get(n.docPersistIdRef);if(o===void 0)throw new Ne("DocumentContainer persist object not found");let a=yi(r,o);if(a.recType!==tt.Document)throw new Ne(`Persist id ${n.docPersistIdRef} is not a DocumentContainer`);let s=9144e3,l=6858e3,c=Kt(r,a,tt.DocumentAtom);c&&c.recLen>=40&&(s=Yi(r.getInt32(c.dataOffset,true)),l=Yi(r.getInt32(c.dataOffset+4,true)));let d=hhe(r,a),p=kfe(r,a),u=Ffe(r,a),f=new Set(u.keys()),h;for(let R of Gr(r,a))if(R.recType===tt.SlideListWithText&&R.recInstance===1){h=Rmt(r,R)[0];break}let g=MR(r,a)??a0,y=g,x,v=[],b=[],S=[],w=h!==void 0?i.get(h):void 0;if(w!==void 0){let R=yi(r,w);if(R.recType===tt.MainMaster){let O=dhe(r,e,d,g,R,p,f);O.scheme&&(y=O.scheme),x=O.backgroundRgb,v=O.shapes;let B=uhe(r,R,y,d);b=B.titleStyles,S=B.bodyStyles;}}let{persistIds:C,outline:_}=mhe(r,a,i,y),A=[];for(let R of C){let O=i.get(R);if(O===void 0)continue;let B=yi(r,O);B.recType===tt.Slide&&A.push(che({view:r,data:e,fonts:d,masterScheme:y,outlineText:_.get(R),hyperlinkStrings:p,oleExObjIds:f},B));}let k=ghe(r,a),E=await $fe(t.pictures,k?{view:r,rec:k}:void 0),I=new Set;Vk(v,I);for(let R of A)Vk(R.shapes,I);let M=new Map;for(let R of I){let O=u.get(R);if(!O)continue;let B=await Dfe(r,e,i,O);B&&M.set(R,B);}return {widthEmu:s,heightEmu:l,slides:A,masterShapes:v,masterBackgroundRgb:x,scheme:y,fonts:d,titleStyles:b,bodyStyles:S,pictures:E.map(R=>R??{extension:"png",bytes:new Uint8Array(0)}),oleEmbeds:M}}var Lmt=T({"src/core/ppt/document-parser.ts"(){js(),iS(),sL(),Nfe(),oS(),jfe(),Lr(),Rt(),phe(),fhe(),CS();}});function Fmt(t,e,r){if(!t)return "";let n=[];switch(t.kind){case "url":n.push(`r:id="${e.addRel(t.url,true)}"`);break;case "slide":{if(t.slideIndex<0||t.slideIndex>=r)return "";let i=e.addRel(`slide${t.slideIndex+1}.xml`,false,Omt);n.push(`r:id="${i}"`,'action="ppaction://hlinksldjump"');break}case "firstSlide":n.push('action="ppaction://hlinkshowjump?jump=firstslide"');break;case "lastSlide":n.push('action="ppaction://hlinkshowjump?jump=lastslide"');break;case "prevSlide":n.push('action="ppaction://hlinkshowjump?jump=previousslide"');break;case "nextSlide":n.push('action="ppaction://hlinkshowjump?jump=nextslide"');break;case "endShow":n.push('action="ppaction://hlinkshowjump?jump=endshow"');break;case "lastViewed":n.push('action="ppaction://hlinkshowjump?jump=lastslideviewed"');break;case "customShow":n.push(`action="ppaction://customshow?id=${or(encodeURIComponent(t.name))}"`);break;case "openFile":n.push(`r:id="${e.addRel(t.path,true)}"`,'action="ppaction://hlinkfile"');break;case "openPresentation":n.push(`r:id="${e.addRel(t.path,true)}"`,'action="ppaction://hlinkpres"');break;default:return ""}return `<a:hlinkClick ${n.join(" ")}/>`}var Omt,Dmt=T({"src/core/ppt/pptx/hyperlink-xml.ts"(){Hn(),Omt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide";}});function pu(t,e,r,n){let i=Fmt(r,n.hyperlinkRels,n.slideCount);return i.length>0?`<p:cNvPr id="${t}" name="${e}">${i}</p:cNvPr>`:`<p:cNvPr id="${t}" name="${e}"/>`}function uu(t,e=""){let r=t.anchor??{x:0,y:0,w:0,h:0},n=[];return t.rotationDeg!==void 0&&t.rotationDeg!==0&&n.push(`rot="${Math.round(t.rotationDeg*6e4)}"`),t.flipH&&n.push('flipH="1"'),t.flipV&&n.push('flipV="1"'),`<a:xfrm${n.length>0?` ${n.join(" ")}`:""}><a:off x="${ir(r.x)}" y="${ir(r.y)}"/><a:ext cx="${Math.max(0,ir(r.w))}" cy="${Math.max(0,ir(r.h))}"/>${e}</a:xfrm>`}var Nmt=T({"src/core/ppt/pptx/shape-writer-context.ts"(){Dmt(),Hn();}});function xhe(t,e){let r=e.mediaRel(t.pictureIndex);if(!r)return "";let n=e.nextId(),i=or(t.name??`Picture ${n}`);return `<p:pic><p:nvPicPr>${pu(n,i,t.actionClick,e)}<p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${r.relId}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`}function vhe(t,e){let r=e.oleRel(t.exObjId);if(!r)return xhe(t,e);let n=e.nextId(),i=or(t.name??`Object ${n}`),o=t.anchor??{x:0,y:0,w:0,h:0},a=Math.max(0,ir(o.w)),s=Math.max(0,ir(o.h)),l=e.mediaRel(t.pictureIndex),c=l?`<a:blip r:embed="${l.relId}"/>`:"<a:blip/>",d=r.progId?` progId="${or(r.progId)}"`:"",p=r.clsId?` classid="${or(r.clsId)}"`:"",u=`<p:pic><p:nvPicPr><p:cNvPr id="0" name="${i}"/><p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill>${c}<a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`,f=`<p:oleObj showAsIcon="0"${d}${p} r:id="${r.relId}" imgW="${a}" imgH="${s}"><p:embed/>${u}</p:oleObj>`;return `<p:graphicFrame><p:nvGraphicFramePr>${pu(n,i,t.actionClick,e)}<p:cNvGraphicFramePr><a:graphicFrameLocks noChangeAspect="1"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${ir(o.x)}" y="${ir(o.y)}"/><a:ext cx="${a}" cy="${s}"/></p:xfrm><a:graphic><a:graphicData uri="${Bmt}">${f}</a:graphicData></a:graphic></p:graphicFrame>`}var Bmt,bhe=T({"src/core/ppt/pptx/shape-writer-ole.ts"(){Nmt(),Hn(),Bmt="http://schemas.openxmlformats.org/presentationml/2006/ole";}});function She(t,e){let r=['lang="en-US"'];t.sizePt!==void 0&&r.push(`sz="${Math.round(t.sizePt*100)}"`),t.bold&&r.push('b="1"'),t.italic&&r.push('i="1"'),t.underline&&r.push('u="sng"'),r.push('dirty="0"');let n="";return t.colorRgb!==void 0&&(n+=Rp(t.colorRgb)),t.fontName!==void 0&&(n+=`<a:latin typeface="${or(t.fontName)}"/>`),n+=Fmt(t.hyperlink,e.hyperlinkRels,e.slideCount),n.length>0?`<a:rPr ${r.join(" ")}>${n}</a:rPr>`:`<a:rPr ${r.join(" ")}/>`}function whe(t,e){let r=t.text.split("\v"),n=She(t,e);return r.map(i=>`<a:r>${n}<a:t>${or(i)}</a:t></a:r>`).join("<a:br/>")}function The(t){let e=[];t.indentLevel>0&&e.push(`lvl="${Math.min(t.indentLevel,8)}"`),t.marginLeftEmu!==void 0&&e.push(`marL="${ir(t.marginLeftEmu)}"`),t.indentEmu!==void 0&&e.push(`indent="${-Math.abs(ir(t.indentEmu))}"`),t.align!==void 0&&e.push(`algn="${t.align}"`);let r="";if(t.hasBullet===false?r="<a:buNone/>":(t.hasBullet===true||t.bulletChar!==void 0)&&(t.bulletColorRgb!==void 0&&(r+=`<a:buClr><a:srgbClr val="${t.bulletColorRgb}"/></a:buClr>`),t.bulletFontName!==void 0&&(r+=`<a:buFont typeface="${or(t.bulletFontName)}"/>`),r+=`<a:buChar char="${or(t.bulletChar??"\u2022")}"/>`),e.length===0&&r.length===0)return "";let n=e.length>0?` ${e.join(" ")}`:"";return r.length>0?`<a:pPr${n}>${r}</a:pPr>`:`<a:pPr${n}/>`}function Che(t,e){let r=[The(t)];for(let n of t.runs)r.push(whe(n,e));return t.runs.length===0&&r.push('<a:endParaRPr lang="en-US"/>'),`<a:p>${r.join("")}</a:p>`}function _he(t,e){let n=t.textType===jP.title||t.textType===jP.centerTitle?'<a:bodyPr wrap="square" anchor="ctr"><a:normAutofit/></a:bodyPr>':'<a:bodyPr wrap="square"><a:normAutofit/></a:bodyPr>',i=t.paragraphs.map(o=>Che(o,e)).join("");return `<p:txBody>${n}<a:lstStyle/>${i}</p:txBody>`}var Ahe=T({"src/core/ppt/pptx/txbody-writer.ts"(){Rt(),Dmt(),Hn();}});function $mt(t){return t.fill?t.fill.kind==="solid"?Rp(t.fill.rgb):"<a:noFill/>":""}function jmt(t){if(!t.line)return "";if(t.line.kind==="noLine")return "<a:ln><a:noFill/></a:ln>";let e=t.line,r=Rp(e.rgb);return e.dash&&(r+=`<a:prstDash val="${e.dash}"/>`),e.headArrow&&(r+=`<a:headEnd type="${e.headArrow}"/>`),e.tailArrow&&(r+=`<a:tailEnd type="${e.tailArrow}"/>`),`<a:ln w="${Math.max(0,ir(e.widthEmu))}">${r}</a:ln>`}function Phe(t,e){let r=e.nextId(),n=or(t.name??`Shape ${r}`),i=t.placeholderType?`<p:ph type="${t.placeholderType}"/>`:"",o=`<p:nvSpPr>${pu(r,n,t.actionClick,e)}<p:cNvSpPr${t.text&&!t.placeholderType?' txBox="1"':""}/><p:nvPr>${i}</p:nvPr></p:nvSpPr>`,a=`<p:spPr>${uu(t)}<a:prstGeom prst="${t.preset}"><a:avLst/></a:prstGeom>${$mt(t)}${jmt(t)}</p:spPr>`,s=t.text?_he(t.text,e):'<p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody>';return `<p:sp>${o}${a}${s}</p:sp>`}function khe(t,e){let r=e.nextId(),n=or(t.name??`Connector ${r}`),i=`<p:nvCxnSpPr>${pu(r,n,t.actionClick,e)}<p:cNvCxnSpPr/><p:nvPr/></p:nvCxnSpPr>`,o=`<p:spPr>${uu(t)}<a:prstGeom prst="${t.preset}"><a:avLst/></a:prstGeom>${$mt(t)}${jmt(t)}</p:spPr>`;return `<p:cxnSp>${i}${o}</p:cxnSp>`}function Ehe(t,e){let r=e.mediaRel(t.pictureIndex);if(!r)return "";let n=e.nextId(),i=or(t.name??`Picture ${n}`);return `<p:pic><p:nvPicPr>${pu(n,i,t.actionClick,e)}<p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${r.relId}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`}function Ihe(t,e){let r=e.nextId(),n=t.anchor??t.childRect,i=t.childRect,o=`<a:chOff x="${ir(i.x)}" y="${ir(i.y)}"/><a:chExt cx="${Math.max(0,ir(i.w))}" cy="${Math.max(0,ir(i.h))}"/>`;return `<p:grpSp><p:nvGrpSpPr>${pu(r,`Group ${r}`,t.actionClick,e)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>${uu({...t,anchor:n},o)}</p:grpSpPr>${t.children.map(a=>pL(a,e)).join("")}</p:grpSp>`}function pL(t,e){return t.kind==="picture"?Ehe(t,e):t.kind==="ole"?vhe(t,e):t.kind==="group"?Ihe(t,e):t.isConnector&&!t.text?khe(t,e):Phe(t,e)}var Hmt=T({"src/core/ppt/pptx/shape-writer.ts"(){Nmt(),bhe(),Ahe(),Hn();}});function Mhe(t,e,r){let n=[];e.marginLeftEmu!==void 0&&n.push(`marL="${ir(e.marginLeftEmu)}"`),e.indentEmu!==void 0&&n.push(`indent="${-Math.abs(ir(e.indentEmu))}"`),n.push(`algn="${e.align??"l"}"`);let i="";e.hasBullet===false?i="<a:buNone/>":(e.hasBullet===true||e.bulletChar!==void 0)&&(e.bulletFontName!==void 0&&(i+=`<a:buFont typeface="${or(e.bulletFontName)}"/>`),i+=`<a:buChar char="${or(e.bulletChar??"\u2022")}"/>`);let o=Math.round((e.sizePt??r)*100),a=e.bold?' b="1"':"",s=e.colorRgb!==void 0?Rp(e.colorRgb):'<a:solidFill><a:schemeClr val="tx1"/></a:solidFill>',l=e.fontName!==void 0?`<a:latin typeface="${or(e.fontName)}"/>`:'<a:latin typeface="+mn-lt"/>',c=`<a:defRPr sz="${o}" kern="1200"${a}>${s}${l}</a:defRPr>`;return `<a:${t} ${n.join(" ")}>${i}${c}</a:${t}>`}function YU(t,e){let r=[],n=Math.max(1,Math.min(t.length,9));for(let i=0;i<n;i++)r.push(Mhe(`lvl${i+1}pPr`,t[i]??{},e));return r.join("")}function Rhe(t,e){let r=t.masterBackgroundRgb??t.scheme[er.background],n=t.masterShapes.map(i=>pL(i,e)).join("");return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
321
|
+
`).trim();return {notes:v.length>0?v:void 0,notesSegments:p.length>0?p:void 0,notesShapes:u.length>0?u:void 0,notesClrMapOverride:f,notesCSldName:x}}};}}),xht,Cue=T({"src/core/core/runtime/PptxHandlerRuntimePlaceholderStyles.ts"(){ge(),Pm(),Pt(),Tue(),xht=class extends yht{parsePlaceholderLevelStyle(t){if(!t)return null;let e={},r=String(t["@_algn"]??"").trim(),n=Ob(r.length>0?r:void 0);n!==void 0&&(e.alignment=n);let i=eI(t);i.paragraphMarginLeft!==void 0&&(e.marginLeft=i.paragraphMarginLeft),i.paragraphMarginRight!==void 0&&(e.marginRight=i.paragraphMarginRight),i.paragraphIndent!==void 0&&(e.indent=i.paragraphIndent);let o=rI(t);o!==void 0&&(e.rtl=o);let a=nI(t);a&&a.length>0&&(e.tabStops=a),Object.assign(e,iI(t));let s=t["a:lnSpc"];if(s){let h=this.parseLineSpacingMultiplier(s);if(h!==void 0)e.lineSpacing=h;else {let g=this.parseLineSpacingExactPt(s);g!==void 0&&(e.lineSpacingExactPt=g);}}let l=t["a:defRPr"],c=Number.parseInt(String(l?.["@_sz"]??""),10),d=Number.isFinite(c)?this.pointsToPixels(c/100):void 0,p=this.parseParagraphSpacingPx(t["a:spcBef"],d);p!==void 0&&(e.spaceBefore=p);let u=this.parseParagraphSpacingPx(t["a:spcAft"],d);return u!==void 0&&(e.spaceAfter=u),this.parsePlaceholderLevelBullet(t,e),l&&this.parsePlaceholderLevelRunDefaults(l,e),Object.keys(e).length>0?e:null}parsePlaceholderLevelBullet(t,e){let r=t["a:buChar"];r?.["@_char"]&&(e.bulletChar=String(r["@_char"]));let n=t["a:buAutoNum"];n?.["@_type"]&&(e.bulletAutoNumType=String(n["@_type"]));let i=t["a:buFont"];i?.["@_typeface"]&&(e.bulletFontFamily=String(i["@_typeface"]));let o=tI(t["a:buSzPct"]);o!==void 0&&(e.bulletSizePercent=o);let a=t["a:buClr"];if(a){let l=this.parseColor(a);l&&(e.bulletColor=l);let c=yr(a);c&&(e.bulletColorXml=c);}let s=t["a:buSzPts"];if(s?.["@_val"]!==void 0){let l=Number.parseInt(String(s["@_val"]),10);Number.isFinite(l)&&(e.bulletSizePts=l/100);}ps(t,"a:buNone")&&(e.bulletNone=true);}parsePlaceholderLevelRunDefaults(t,e){if(t["@_sz"]!==void 0){let o=Number.parseInt(String(t["@_sz"]),10);Number.isFinite(o)&&(e.fontSize=o/100*(96/72));}t["@_b"]!==void 0&&(e.bold=t["@_b"]==="1"),t["@_i"]!==void 0&&(e.italic=t["@_i"]==="1");let r=t["a:solidFill"],n=this.parseColor(r);n&&(e.color=n),r&&(e.colorChoiceXml=r);let i=t["a:latin"];if(i?.["@_typeface"]){let o=String(i["@_typeface"]),a=this.resolveThemeTypeface(o);e.fontFamily=a??o;}}};}}),vht,_ue=T({"src/core/core/runtime/PptxHandlerRuntimePlaceholderDefaults.ts"(){Cue(),vht=class nh extends xht{extractPlaceholderDefaultsFromShape(e){let n=e["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];if(!n)return null;let i=n["@_type"],o=n["@_idx"],s={type:i!==void 0?String(i).toLowerCase():"body"};if(o!==void 0){let p=Number.parseInt(String(o),10);Number.isFinite(p)&&(s.idx=p);}let l=e["p:txBody"],c=l?.["a:bodyPr"];if(c){let p=c["@_lIns"];if(p!==void 0){let x=Number.parseInt(String(p),10);Number.isFinite(x)&&(s.bodyInsetLeft=x/nh.EMU_PER_PX);}let u=c["@_tIns"];if(u!==void 0){let x=Number.parseInt(String(u),10);Number.isFinite(x)&&(s.bodyInsetTop=x/nh.EMU_PER_PX);}let f=c["@_rIns"];if(f!==void 0){let x=Number.parseInt(String(f),10);Number.isFinite(x)&&(s.bodyInsetRight=x/nh.EMU_PER_PX);}let h=c["@_bIns"];if(h!==void 0){let x=Number.parseInt(String(h),10);Number.isFinite(x)&&(s.bodyInsetBottom=x/nh.EMU_PER_PX);}let g=String(c["@_anchor"]||"").trim();if(g.length>0&&(s.textAnchor=g),c["a:spAutoFit"]!==void 0)s.autoFit=true,s.autoFitMode="shrink";else if(c["a:normAutofit"]!==void 0){s.autoFit=true,s.autoFitMode="normal";let x=parseInt(String(c["a:normAutofit"]?.["@_fontScale"]||""),10);Number.isFinite(x)&&x>0&&(s.autoFitFontScale=x/1e5);let v=parseInt(String(c["a:normAutofit"]?.["@_lnSpcReduction"]||""),10);Number.isFinite(v)&&v>0&&(s.autoFitLineSpacingReduction=v/1e5);}else c["a:noAutofit"]!==void 0&&(s.autoFit=false,s.autoFitMode="none");let y=String(c["@_wrap"]||"").trim().toLowerCase();(y==="none"||y==="square")&&(s.textWrap=y);}let d=l?.["a:lstStyle"];if(d){let p={};for(let f=1;f<=9;f++){let h=`a:lvl${f}pPr`,g=this.parsePlaceholderLevelStyle(d[h]);g&&(p[f-1]=g);}let u=this.parsePlaceholderLevelStyle(d["a:defPPr"]);u&&(p[-1]=u),Object.keys(p).length>0&&(s.levelStyles=p);}if(l){let p=this.ensureArray(l["a:p"]),u=[];for(let h of p){let g=this.ensureArray(h?.["a:r"]);for(let x of g){if(!x)continue;let v=x["a:t"];v!==void 0&&u.push(String(v));}h?.["a:t"]!==void 0&&u.push(String(h["a:t"]));let y=this.ensureArray(h?.["a:fld"]);for(let x of y){if(!x)continue;let v=x["a:t"];v!==void 0&&u.push(String(v));}}let f=u.join("").trim();f.length>0&&(s.promptText=f);}return s}};}});function Sx(t){if(!t)return;let e={};return t["@_hdr"]!==void 0&&(e.hasHeader=String(t["@_hdr"])!=="0"),t["@_ftr"]!==void 0&&(e.hasFooter=String(t["@_ftr"])!=="0"),t["@_dt"]!==void 0&&(e.hasDateTime=String(t["@_dt"])!=="0"),t["@_sldNum"]!==void 0&&(e.hasSlideNumber=String(t["@_sldNum"])!=="0"),Object.keys(e).length>0?e:void 0}var bht,Sht=T({"src/core/core/runtime/PptxHandlerRuntimeMasterElements.ts"(){iu(),Ps(),Pt(),_ue(),bht=class extends vht{parseTextListStyle(t){if(!t)return;let e={},r=this.parsePlaceholderLevelStyle(t["a:defPPr"]);r&&(e[-1]=r);for(let n=1;n<=9;n++){let i=this.parsePlaceholderLevelStyle(t[`a:lvl${n}pPr`]);i&&(e[n-1]=i);}return Object.keys(e).length>0?e:void 0}parseMasterTxStyles(t){let e=t?.["p:txStyles"];if(!e)return;let r=this.parseTextListStyle(e["p:titleStyle"]),n=this.parseTextListStyle(e["p:bodyStyle"]),i=this.parseTextListStyle(e["p:otherStyle"]);if(!r&&!n&&!i)return;let o={};return r&&(o.titleStyle=r),n&&(o.bodyStyle=n),i&&(o.otherStyle=i),o}async enrichSlideMastersWithTxStyles(t){for(let e of t)try{let r=this.masterXmlMap.get(e.path);if(!r){let a=await this.zip.file(e.path)?.async("string");if(!a)continue;r=this.parser.parse(a),this.masterXmlMap.set(e.path,r);}let n=r["p:sldMaster"];if(!n)continue;let i=this.parseMasterTxStyles(n);i&&(e.txStyles=i,this.masterTxStylesCache.set(e.path,i));let o=Sx(n["p:hf"]);o&&(e.headerFooter=o);}catch(r){console.warn("Failed to parse master txStyles:",r);}}parsePresentationDefaultTextStyle(){let e=this.presentationData?.["p:presentation"]?.["p:defaultTextStyle"];if(!e){this.presentationDefaultTextStyle=void 0;return}let r={};for(let i=1;i<=9;i++){let o=this.parsePlaceholderLevelStyle(e[`a:lvl${i}pPr`]);o&&(r[i-1]=o);}let n=this.parsePlaceholderLevelStyle(e["a:defPPr"]);n&&(r[-1]=n),this.presentationDefaultTextStyle=Object.keys(r).length>0?{type:"body",levelStyles:r}:void 0;}async getMasterElements(t){let e=this.slideRelsMap.get(t);if(!e)return [];let r;for(let[,i]of e.entries())if(i.includes("slideMaster")){let o=t.substring(0,t.lastIndexOf("/")+1);r=i.startsWith("/")?i.substring(1):i.startsWith("..")?this.resolvePath(o,i):`ppt/${hr(i)}`;break}if(!r)return [];if(this.masterCache.has(r))return this.masterCache.get(r);let n=r.split("/").pop()?.replace(/\.xml$/u,"")??r;try{let i=await this.zip.file(r)?.async("string");if(!i)return [];let o=this.masterXmlMap.get(r)??this.parser.parse(i);this.masterXmlMap.set(r,o);let a=as(r);await this.loadSlideRelationships(r,a);let s=At(o,"p:sldMaster","p:cSld","p:spTree");if(!s)return this.masterCache.set(r,[]),[];this.unwrapAlternateContent(s);let l=this.ensureArray(s["p:sp"]),c=new Set;for(let u=0;u<l.length;u++){let f=l[u];if(f["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"]){c.add(u);let y=this.extractPlaceholderDefaultsFromShape(f);if(y){this.masterPlaceholderDefaultsCache.has(r)||this.masterPlaceholderDefaultsCache.set(r,new Map);let x={type:y.type,idx:y.idx!==void 0?String(y.idx):void 0},v=this.buildPlaceholderDefaultsKey(x);this.masterPlaceholderDefaultsCache.get(r).set(v,y);}}}let d=this.extractSpTreeChildOrder(i,s,"p:spTree"),p=[];for(let u of d)if(u.tag==="p:sp"){if(c.has(u.indexInType))continue;let f=l[u.indexInType];if(!f)continue;let h=f["p:spPr"],g=null;h?.["a:blipFill"]?g=await this.parseShapeWithImageFill(f,`master-shape-img-${n}-${u.indexInType}`,r):g=this.parseShape(f,`master-shape-${n}-${u.indexInType}`,r),g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:pic"){let h=this.ensureArray(s["p:pic"])[u.indexInType];if(!h)continue;let g=await this.parsePicture(h,`master-pic-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:graphicFrame"){let h=this.ensureArray(s["p:graphicFrame"])[u.indexInType];if(!h)continue;let g=this.parseGraphicFrame(h,`master-frame-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:cxnSp"){let h=this.ensureArray(s["p:cxnSp"])[u.indexInType];if(!h)continue;let g=this.parseConnector(h,`master-conn-${n}-${u.indexInType}`,r);g&&(g.id=`master-${g.id}`,p.push(g));}else if(u.tag==="p:grpSp"){let h=this.ensureArray(s["p:grpSp"])[u.indexInType];if(!h)continue;let g=await this.parseGroupShapeAsGroup(h,`master-group-${n}-${u.indexInType}`,r,i);g&&(g.id=`master-${g.id}`,p.push(g));}return this.masterCache.set(r,p),p}catch(i){return console.warn("Failed to parse master:",i),[]}}};}}),wht,Aue=T({"src/core/core/runtime/PptxHandlerRuntimeAuxiliaryMasterElements.ts"(){nu(),_st(),Y1(),oR(),qQt(),Sht(),wht=class extends bht{async enrichMasterPartElements(t,e){if(!t)return;let r=t.path;WQt(this,r,t.backgroundColor);let n=await this.zip.file(r)?.async("string");if(!n)return;let i=this.parser.parse(n),o=i[e];if(e==="p:notesMaster"){let p=this.parseTextListStyle(o?.["p:notesStyle"]);p&&(t.notesStyle=p);}let s=o?.["p:cSld"]?.["p:spTree"];if(!s){t.elements=[];return}let l=r.slice(r.lastIndexOf("/")+1),c=r.slice(0,r.lastIndexOf("/"));this.slideRelsMap.has(r)||await this.loadSlideRelationships(r,`${c}/_rels/${l}.rels`),t.backgroundImage=await this.extractBackgroundImage(i,r,e),t.backgroundImageProperties=this.extractBackgroundImageProperties(i,e),this.unwrapAlternateContent(s);let d=this.currentSlideClrMapOverride;if(e==="p:sldLayout"){let p=this.parseLayoutClrMapOverride(i);p&&(this.currentSlideClrMapOverride=p);}try{t.elements=await this.parseSpTreeChildren(s,r,n,"p:spTree",KQt(e,r));}finally{this.currentSlideClrMapOverride=d;}Pit(t.elements,void 0,void 0),VQt(this,r,t.elements),this.rememberUnparsedMasterNodes(r,s,t.elements);}async enrichSlideMasterElements(t){for(let e of t)try{this.applyMasterThemeState(e.path),await this.enrichMasterPartElements(e,"p:sldMaster");for(let r of e.layouts??[])await this.enrichMasterPartElements(r,"p:sldLayout");}catch(r){console.warn(`Failed to parse slide master elements for ${e.path}:`,r);}this.applyMasterThemeState(void 0);}async enrichAuxiliaryMasterElements(t,e){await this.enrichMasterPartElements(t,e);}rememberUnparsedMasterNodes(t,e,r){let n=new Set(r.map(o=>o.rawXml).filter(Boolean)),i=new Map;for(let o of ["p:sp","p:pic","p:cxnSp","p:graphicFrame","p:grpSp","p16:model3D","p:contentPart"]){let a=this.ensureArray(e[o]).filter(s=>!n.has(s));a.length>0&&i.set(o,a);}XQt(this,t,i);}};}}),Tht,Pue=T({"src/core/core/runtime/PptxHandlerRuntimeLayoutElements.ts"(){iu(),Ps(),Pt(),Aue(),Tht=class extends wht{async getLayoutElements(t){let e=this.slideRelsMap.get(t);if(!e)return [];let r;for(let[,n]of e.entries())if(n.includes("slideLayout")){let i=t.substring(0,t.lastIndexOf("/")+1);r=n.startsWith("/")?n.substring(1):n.startsWith("..")?this.resolvePath(i,n):`ppt/${hr(n)}`;break}return r?this.getLayoutElementsByPath(r):[]}async getLayoutElementsByPath(t){if(this.layoutCache.has(t))return this.layoutCache.get(t);let e=t.split("/").pop()?.replace(/\.xml$/u,"")??t;try{let r=await this.zip.file(t)?.async("string");if(!r)return [];let n=this.layoutXmlMap.get(t)??this.parser.parse(r);this.layoutXmlMap.set(t,n);let i=as(t);await this.loadSlideRelationships(t,i);let o=this.parseLayoutClrMapOverride(n),a=this.currentSlideClrMapOverride;o&&(this.currentSlideClrMapOverride=o);let s=n["p:sldLayout"]?.["p:cSld"]?.["p:spTree"];if(!s)return this.layoutCache.set(t,[]),[];this.unwrapAlternateContent(s);let l=this.ensureArray(s["p:sp"]),c=new Set;for(let y=0;y<l.length;y++){let x=l[y];if(At(x,"p:nvSpPr","p:nvPr","p:ph")){c.add(y);let b=this.extractPlaceholderDefaultsFromShape(x);if(b){this.layoutPlaceholderDefaultsCache.has(t)||this.layoutPlaceholderDefaultsCache.set(t,new Map);let S={type:b.type,idx:b.idx!==void 0?String(b.idx):void 0},w=this.buildPlaceholderDefaultsKey(S);this.layoutPlaceholderDefaultsCache.get(t).set(w,b);}}}let d=this.extractSpTreeChildOrder(r,s,"p:spTree"),p=[];for(let y of d)if(y.tag==="p:sp"){if(c.has(y.indexInType))continue;let x=l[y.indexInType];if(!x)continue;let v=Q(x,"p:spPr"),b=null;v&&Q(v,"a:blipFill")?b=await this.parseShapeWithImageFill(x,`layout-shape-img-${e}-${y.indexInType}`,t):b=this.parseShape(x,`layout-shape-${e}-${y.indexInType}`,t),b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:pic"){let v=this.ensureArray(s["p:pic"])[y.indexInType];if(!v)continue;let b=await this.parsePicture(v,`layout-pic-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:graphicFrame"){let v=this.ensureArray(s["p:graphicFrame"])[y.indexInType];if(!v)continue;let b=this.parseGraphicFrame(v,`layout-frame-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:cxnSp"){let v=this.ensureArray(s["p:cxnSp"])[y.indexInType];if(!v)continue;let b=this.parseConnector(v,`layout-conn-${e}-${y.indexInType}`,t);b&&(b.id=`layout-${b.id}`,p.push(b));}else if(y.tag==="p:grpSp"){let v=this.ensureArray(s["p:grpSp"])[y.indexInType];if(!v)continue;let b=await this.parseGroupShapeAsGroup(v,`layout-group-${e}-${y.indexInType}`,t,r);b&&(b.id=`layout-${b.id}`,p.push(b));}let u=_t(Q(n,"p:sldLayout"),"showMasterSp"),h=u===void 0||u.trim().toLowerCase()!=="0"&&u.trim().toLowerCase()!=="false"?await this.getMasterElements(t):[];this.currentSlideClrMapOverride=a;let g=[...h,...p];return this.templateElementBaselines.recordBaselines(g),this.layoutCache.set(t,g),g}catch(r){return console.warn("Failed to parse layout:",r),[]}}};}}),Cht,kue=T({"src/core/core/runtime/PptxHandlerRuntimeLayoutPreviews.ts"(){Rr(),Pt(),Pue(),Cht=class extends Tht{layoutPreviewCache=new Map;async getLayoutPreview(t){let e=this.layoutPreviewCache.get(t);if(e)return e;let r=this.layoutXmlMap.get(t);if(!r)return null;let n=this.eagerDecodeImages;n||(this.layoutCache.delete(t),this.eagerDecodeImages=true);let i;try{i=await this.getLayoutElementsByPath(t);}finally{this.eagerDecodeImages=n;}let o=At(r,"p:sldLayout","p:cSld"),a=this.resolveLayoutPreviewBackground(t,o),s={path:t,width:this.rawSlideWidthEmu/oe,height:this.rawSlideHeightEmu/oe,...a,elements:i,placeholders:this.extractPlaceholderList(Q(o,"p:spTree"))};return this.layoutPreviewCache.set(t,s),s}async getLayoutPreviews(t){let e=t??[...this.layoutXmlMap.keys()],r=[];for(let n of e){let i=await this.getLayoutPreview(n);i&&r.push(i);}return r}invalidateLayoutPreviews(t){t?this.layoutPreviewCache.delete(t):this.layoutPreviewCache.clear();}resolveLayoutPreviewBackground(t,e){let r=this.parseBackgroundColor(Q(e,"p:bg"));if(r)return {backgroundColor:r};let n=this.resolveMasterPathForLayout(t),i=n?this.masterXmlMap.get(n):void 0,o=this.parseBackgroundColor(Q(At(i,"p:sldMaster","p:cSld"),"p:bg"));return o?{backgroundColor:o}:{}}};}});function DU(t,e){if(!t)return [];let r=new RegExp(`<${e.replace(":","\\:")}\\b[^>]*>`),n=new RegExp(`</${e.replace(":","\\:")}\\s*>`),i=r.exec(t);if(!i)return [];let o=i.index+i[0].length,a=n.exec(t.slice(o));if(!a)return [];let s=t.slice(o,o+a.index),l=[],c=/<a:(solidFill|gradFill|pattFill|noFill|grpFill)\b/g,d;for(;(d=c.exec(s))!==null;)l.push(`a:${d[1]}`);return l}var n_,_ht,Eue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeFormatScheme.ts"(){kue(),n_=["a:solidFill","a:gradFill","a:pattFill","a:noFill","a:grpFill"],_ht=class Ln extends Cht{buildFillStyleEntry(e,r){switch(e){case "a:solidFill":return {kind:"solid",color:this.parseColor(r),opacity:this.extractColorOpacity(r),rawNode:r};case "a:gradFill":return {kind:"gradient",color:this.extractGradientFillColor(r),opacity:this.extractGradientOpacity(r),gradientStops:this.extractGradientStops(r),gradientAngle:this.extractGradientAngle(r),gradientType:this.extractGradientType(r),gradientCss:this.extractGradientFillCss(r),rawNode:r};case "a:pattFill":return {kind:"pattern",color:this.parseColor(r["a:fgClr"])||this.parseColor(r["a:bgClr"]),patternPreset:String(r["@_prst"]||"").trim()||void 0,patternBackgroundColor:this.parseColor(r["a:bgClr"])||void 0,rawNode:r};case "a:noFill":return {kind:"none",rawNode:r};case "a:grpFill":return {kind:"group",rawNode:r}}}collectFillChildren(e,r){let n={"a:solidFill":this.ensureArray(e["a:solidFill"]),"a:gradFill":this.ensureArray(e["a:gradFill"]),"a:pattFill":this.ensureArray(e["a:pattFill"]),"a:noFill":this.ensureArray(e["a:noFill"]),"a:grpFill":this.ensureArray(e["a:grpFill"])};if(r&&r.length>0){let o={"a:solidFill":0,"a:gradFill":0,"a:pattFill":0,"a:noFill":0,"a:grpFill":0},a=[];for(let s of r){let l=o[s],c=n[s][l];c&&(a.push(this.buildFillStyleEntry(s,c)),o[s]=l+1);}for(let s of n_)for(;o[s]<n[s].length;)a.push(this.buildFillStyleEntry(s,n[s][o[s]])),o[s]+=1;return a}let i=[];for(let o of n_)for(let a of n[o])i.push(this.buildFillStyleEntry(o,a));return i}parseFillStyleList(e,r){return e?this.collectFillChildren(e,r):[]}parseLineStyleList(e){return e?this.ensureArray(e["a:ln"]).map(n=>{let i=n,o={rawNode:i};if(i["@_w"]&&(o.width=parseInt(String(i["@_w"]))/Ln.EMU_PER_PX),i["a:solidFill"])o.color=this.parseColor(i["a:solidFill"]),o.opacity=this.extractColorOpacity(i["a:solidFill"]);else if(i["a:gradFill"])o.color=this.extractGradientFillColor(i["a:gradFill"]);else if(i["a:pattFill"]){let d=i["a:pattFill"];o.color=this.parseColor(d["a:fgClr"])||this.parseColor(d["a:bgClr"]);}let a=i["a:prstDash"]?.["@_val"],s=this.normalizeStrokeDashType(a);s&&(o.dash=s),"a:round"in i?o.lineJoin="round":"a:bevel"in i?o.lineJoin="bevel":"a:miter"in i&&(o.lineJoin="miter");let l=String(i["@_cap"]||"").trim().toLowerCase();(l==="rnd"||l==="sq"||l==="flat")&&(o.lineCap=l);let c=String(i["@_cmpd"]||"").trim();return (c==="sng"||c==="dbl"||c==="thickThin"||c==="thinThick"||c==="tri")&&(o.compoundLine=c),o}):[]}parseEffectStyleList(e){return e?this.ensureArray(e["a:effectStyle"]).map(n=>{let i=n,o=i["a:effectLst"]??i["a:effectDag"],a={rawNode:i};if(!o)return a;let s=o["a:outerShdw"];if(s){a.shadowColor=this.parseColor(s),a.shadowOpacity=this.extractColorOpacity(s);let h=parseInt(String(s["@_blurRad"]||"0"));Number.isFinite(h)&&h>0&&(a.shadowBlur=h/Ln.EMU_PER_PX);let g=parseInt(String(s["@_dist"]||"0")),y=parseInt(String(s["@_dir"]||"0"));if(Number.isFinite(g)&&g>0&&Number.isFinite(y)){let x=y/6e4*(Math.PI/180);a.shadowOffsetX=Math.cos(x)*g/Ln.EMU_PER_PX,a.shadowOffsetY=Math.sin(x)*g/Ln.EMU_PER_PX;}}let l=o["a:innerShdw"];if(l){a.innerShadowColor=this.parseColor(l),a.innerShadowOpacity=this.extractColorOpacity(l);let h=parseInt(String(l["@_blurRad"]||"0"));Number.isFinite(h)&&h>0&&(a.innerShadowBlur=h/Ln.EMU_PER_PX);let g=parseInt(String(l["@_dist"]||"0")),y=parseInt(String(l["@_dir"]||"0"));if(Number.isFinite(g)&&g>0&&Number.isFinite(y)){let x=y/6e4*(Math.PI/180);a.innerShadowOffsetX=Math.cos(x)*g/Ln.EMU_PER_PX,a.innerShadowOffsetY=Math.sin(x)*g/Ln.EMU_PER_PX;}}let c=o["a:glow"];if(c){a.glowColor=this.parseColor(c),a.glowOpacity=this.extractColorOpacity(c);let h=parseInt(String(c["@_rad"]||"0"));Number.isFinite(h)&&h>0&&(a.glowRadius=h/Ln.EMU_PER_PX);}let d=o["a:softEdge"];if(d){let h=parseInt(String(d["@_rad"]||"0"));Number.isFinite(h)&&h>0&&(a.softEdgeRadius=h/Ln.EMU_PER_PX);}let p=o["a:reflection"];if(p){let h=parseInt(String(p["@_blurRad"]||"0"));Number.isFinite(h)&&h>=0&&(a.reflectionBlurRadius=h/Ln.EMU_PER_PX);let g=parseInt(String(p["@_stA"]||""));Number.isFinite(g)&&(a.reflectionStartOpacity=g/1e5);let y=parseInt(String(p["@_endA"]||""));Number.isFinite(y)&&(a.reflectionEndOpacity=y/1e5);let x=parseInt(String(p["@_endPos"]||""));Number.isFinite(x)&&(a.reflectionEndPosition=x/1e5);let v=parseInt(String(p["@_dir"]||""));Number.isFinite(v)&&(a.reflectionDirection=v/6e4);let b=parseInt(String(p["@_rot"]||""));Number.isFinite(b)&&(a.reflectionRotation=b/6e4);let S=parseInt(String(p["@_dist"]||"0"));Number.isFinite(S)&&S>=0&&(a.reflectionDistance=S/Ln.EMU_PER_PX);}let u=i["a:scene3d"];if(u){let h=u["a:camera"],g=u["a:lightRig"];a.scene3d={cameraPreset:String(h?.["@_prst"]||"").trim()||void 0,lightRigType:String(g?.["@_rig"]||"").trim()||void 0,lightRigDirection:String(g?.["@_dir"]||"").trim()||void 0};}let f=i["a:sp3d"];if(f){let h=f["a:bevelT"],g=f["a:bevelB"];a.shape3d={extrusionHeight:f["@_extrusionH"]!==void 0?parseInt(String(f["@_extrusionH"]),10):void 0,extrusionColor:this.parseColor(f["a:extrusionClr"]),contourWidth:f["@_contourW"]!==void 0?parseInt(String(f["@_contourW"]),10):void 0,contourColor:this.parseColor(f["a:contourClr"]),presetMaterial:String(f["@_prstMaterial"]||"").trim()||void 0,bevelTopType:h?String(h["@_prst"]||"circle").trim():void 0,bevelTopWidth:h!==void 0&&h["@_w"]!==void 0?parseInt(String(h["@_w"]),10):void 0,bevelTopHeight:h!==void 0&&h["@_h"]!==void 0?parseInt(String(h["@_h"]),10):void 0,bevelBottomType:g?String(g["@_prst"]||"circle").trim():void 0,bevelBottomWidth:g!==void 0&&g["@_w"]!==void 0?parseInt(String(g["@_w"]),10):void 0,bevelBottomHeight:g!==void 0&&g["@_h"]!==void 0?parseInt(String(g["@_h"]),10):void 0};}return a}):[]}};}}),Aht,Iue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeOverrides.ts"(){Cst(),Eue(),Aht=class extends _ht{parseFormatScheme(t,e){let r=String(t["@_name"]||"").trim()||void 0,n=DU(e,"a:fillStyleLst"),i=DU(e,"a:bgFillStyleLst"),o=t["a:fillStyleLst"],a=this.parseFillStyleList(o,n),s=t["a:lnStyleLst"],l=this.parseLineStyleList(s),c=t["a:effectStyleLst"],d=this.parseEffectStyleList(c),p=t["a:bgFillStyleLst"],u=this.parseFillStyleList(p,i);return {name:r,fillStyles:a,lineStyles:l,effectStyles:d,backgroundFillStyles:u}}parseClrMapOverrideNode(t){if(!t||t["a:masterClrMapping"]!==void 0)return null;let e=t["a:overrideClrMapping"];return e?Sst(e,(r,n)=>{console.warn(`Ignoring a:overrideClrMapping/@${r}="${n}": not an ST_ColorSchemeIndex token.`);}):null}parseSlideClrMapOverride(t){let e=t["p:sld"]?.["p:clrMapOvr"];return this.parseClrMapOverrideNode(e)}parseLayoutClrMapOverride(t){let e=t["p:sldLayout"]?.["p:clrMapOvr"];return this.parseClrMapOverrideNode(e)}applyThemeOverrideState(t){let e={...this.themeColorMap},r={...this.themeFontMap},n=this.themeFormatScheme;if(t.colorOverrides){for(let[i,o]of Object.entries(t.colorOverrides))if(i.startsWith("__fontOverride_")){let a=i.replace("__fontOverride_","");this.themeFontMap[a]=o,a==="mj-lt"?(this.themeFontMap["mj-ea"]=o,this.themeFontMap["mj-cs"]=o):a==="mn-lt"&&(this.themeFontMap["mn-ea"]=o,this.themeFontMap["mn-cs"]=o);}else this.themeColorMap[i]=o;this.themeColorMap.tx1=this.themeColorMap.dk1||e.dk1,this.themeColorMap.bg1=this.themeColorMap.lt1||e.lt1,this.themeColorMap.tx2=this.themeColorMap.dk2||e.dk2,this.themeColorMap.bg2=this.themeColorMap.lt2||e.lt2;}return t.formatSchemeOverride&&(this.themeFormatScheme=t.formatSchemeOverride),()=>{this.themeColorMap=e,this.themeFontMap=r,this.themeFormatScheme=n;}}async loadThemeOverride(t){let e=this.slideRelsMap.get(t);if(!e)return null;let r;for(let[,i]of e)if(i.includes("themeOverride")){let o=t.substring(0,t.lastIndexOf("/")+1);r=this.resolvePath(o,i);break}if(!r)return null;let n=this.themeOverrideCache.get(r);if(n)return n;try{let i=await this.zip.file(r)?.async("string");if(!i)return null;let a=this.parser.parse(i)["a:themeOverride"];if(!a)return null;let s={},l=a["a:clrScheme"];if(l){let p={},u=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let f of u){let h=l[`a:${f}`],g=this.parseColorChoice(h);g&&(p[f]=g);}Object.keys(p).length>0&&(s.colorOverrides=p);}let c=a["a:fmtScheme"];c&&(s.formatSchemeOverride=this.parseFormatScheme(c));let d=a["a:fontScheme"];if(d){let p=d["a:majorFont"],u=d["a:minorFont"],f=p?.["a:latin"],h=u?.["a:latin"],g=this.normalizeTypefaceToken(String(f?.["@_typeface"]||"")),y=this.normalizeTypefaceToken(String(h?.["@_typeface"]||""));s.colorOverrides||(s.colorOverrides={}),g&&(s.colorOverrides["__fontOverride_mj-lt"]=g),y&&(s.colorOverrides["__fontOverride_mn-lt"]=y);}return this.themeOverrideCache.set(r,s),s}catch(i){return console.warn(`Failed to load theme override at ${r}:`,i),null}}};}}),Pht,Mue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeRefResolution.ts"(){ae(),Iue(),Pht=class extends Aht{resolveThemeEffectRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10);Number.isFinite(r)&&r>0&&(e.effectRefIdx=r);let n=iC(t);if(n&&(e.effectRefColorXml=n),!Number.isFinite(r)||r<=0||!this.themeFormatScheme||r>this.themeFormatScheme.effectStyles.length)return;let i=this.themeFormatScheme.effectStyles[r-1];if(!i)return;let o=this.parseColor(t);o&&i.rawNode&&(i=hy(this.themeColorMap,o,()=>this.parseEffectStyleList({"a:effectStyle":i.rawNode})[0]??i)),i.shadowColor&&!e.shadowColor&&(e.shadowColor=i.shadowColor,e.shadowBlur=i.shadowBlur,e.shadowOffsetX=i.shadowOffsetX,e.shadowOffsetY=i.shadowOffsetY,e.shadowOpacity=i.shadowOpacity),i.innerShadowColor&&!e.innerShadowColor&&(e.innerShadowColor=i.innerShadowColor,e.innerShadowBlur=i.innerShadowBlur,e.innerShadowOffsetX=i.innerShadowOffsetX,e.innerShadowOffsetY=i.innerShadowOffsetY,e.innerShadowOpacity=i.innerShadowOpacity),i.glowColor&&!e.glowColor&&(e.glowColor=i.glowColor,e.glowRadius=i.glowRadius,e.glowOpacity=i.glowOpacity),i.softEdgeRadius&&!e.softEdgeRadius&&(e.softEdgeRadius=i.softEdgeRadius),i.reflectionBlurRadius!==void 0&&e.reflectionBlurRadius===void 0&&(e.reflectionBlurRadius=i.reflectionBlurRadius,e.reflectionStartOpacity=i.reflectionStartOpacity,e.reflectionEndOpacity=i.reflectionEndOpacity,e.reflectionEndPosition=i.reflectionEndPosition,e.reflectionDirection=i.reflectionDirection,e.reflectionRotation=i.reflectionRotation,e.reflectionDistance=i.reflectionDistance),i.scene3d&&!e.scene3d&&(e.scene3d=i.scene3d),i.shape3d&&!e.shape3d&&(e.shape3d=i.shape3d);}resolveThemeLineRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10),n=this.parseColor(t);Number.isFinite(r)&&r>0&&(e.lnRefIdx=r);let i=iC(t);if(i&&(e.lnRefColorXml=i),!Number.isFinite(r)||r<=0||!this.themeFormatScheme||r>this.themeFormatScheme.lineStyles.length){e.strokeColor=n,n&&(e.strokeWidth=1);return}let o=this.themeFormatScheme.lineStyles[r-1];if(!o){e.strokeColor=n,n&&(e.strokeWidth=1);return}n&&o.rawNode&&(o=hy(this.themeColorMap,n,()=>this.parseLineStyleList({"a:ln":o.rawNode})[0]??o)),e.strokeColor=o.color||n,o.opacity!==void 0&&(e.strokeOpacity=o.opacity),o.width!==void 0&&o.width>0?e.strokeWidth=o.width:e.strokeColor&&(e.strokeWidth=1),o.dash&&(e.strokeDash=o.dash),o.lineJoin&&(e.lineJoin=o.lineJoin),o.lineCap&&(e.lineCap=o.lineCap),o.compoundLine&&(e.compoundLine=o.compoundLine);}reResolveGradientWithPhClr(t,e){return hy(this.themeColorMap,e,()=>{let r=this.extractGradientStops(t),n=this.extractGradientType(t),i=this.extractGradientAngle(t);return {stops:r,css:this.buildGradientCssFromStops(r,n,i)}})}resolveThemeFillRef(t,e){let r=parseInt(String(t["@_idx"]||"0"),10);Number.isFinite(r)&&r>0&&(e.fillRefIdx=r);let n=iC(t);if(n&&(e.fillRefColorXml=n),r===0||r===1e3){e.fillMode="none",e.fillColor="transparent",e.fillOpacity=0;return}if(!Number.isFinite(r)||r<=0||!this.themeFormatScheme){e.fillMode="theme",e.fillColor=this.parseColor(t);return}let i;if(r>=1001){let s=r-1001;i=this.themeFormatScheme.backgroundFillStyles[s];}else i=this.themeFormatScheme.fillStyles[r-1];if(!i){e.fillMode="theme",e.fillColor=this.parseColor(t);return}let o=this.parseColor(t),a=i.kind==="solid"?"a:solidFill":i.kind==="pattern"?"a:pattFill":void 0;if(a&&o&&i.rawNode){let s=i.rawNode;i=hy(this.themeColorMap,o,()=>this.parseFillStyleList({[a]:s})[0]??i);}switch(i.kind){case "solid":{e.fillMode="solid",e.fillColor=i.color||o,e.fillOpacity=i.opacity;break}case "gradient":{if(e.fillMode="gradient",i.rawNode&&o){let s=this.reResolveGradientWithPhClr(i.rawNode,o);e.fillGradientStops=s.stops,e.fillGradient=s.css;}else e.fillGradientStops=i.gradientStops,e.fillGradient=i.gradientCss;e.fillGradientAngle=i.gradientAngle,e.fillGradientType=i.gradientType,e.fillColor=i.color||o;break}case "pattern":{e.fillMode="pattern",e.fillColor=i.color||o,i.patternPreset&&(e.fillPatternPreset=i.patternPreset),i.patternBackgroundColor&&(e.fillPatternBackgroundColor=i.patternBackgroundColor);break}case "none":{e.fillMode="none",e.fillColor="transparent",e.fillOpacity=0;break}}}};}});function Rue(t){return /^ppt\/theme\/(?!themeOverride)[^/]+\.xml$/iu.test(t)}var kht,Lue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeLoading.ts"(){Mue(),kht=class extends Pht{async resolvePrimaryThemePath(){let t=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!t||t.length===0)return;let e=t[0].name,r=e.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),n=this.zip.file(r);if(!n)return;let i=this.parser.parse(await n.async("string")),o=this.ensureArray(i?.Relationships?.Relationship);for(let a of o){let s=String(a["@_Target"]||"");if(!s.includes("theme"))continue;let l=s.startsWith("..")?this.resolvePath(e.substring(0,e.lastIndexOf("/")+1),s):s.startsWith("/")?s.slice(1):`ppt/${s.replace(/^\.?\//,"")}`;if(l.startsWith("ppt/theme/"))return l}}async parseThemeOptions(){let t=Object.values(this.zip.files).filter(r=>!r.dir&&Rue(r.name));if(!t||t.length===0)return [];let e=[];for(let r of t)try{let n=await r.async("string"),o=this.parser.parse(n)["a:theme"],a=String(o?.["@_name"]||"").trim();e.push({path:r.name,name:a.length>0?a:void 0});}catch{e.push({path:r.name});}return e}async getAvailableThemes(){return this.parseThemeOptions()}buildThemeObject(){let t=Object.keys(this.themeColorMap).length>0,e=Object.keys(this.themeFontMap).length>0;if(!t&&!e)return;let r;t&&(r={dk1:this.themeColorMap.dk1||"",lt1:this.themeColorMap.lt1||"",dk2:this.themeColorMap.dk2||"",lt2:this.themeColorMap.lt2||"",accent1:this.themeColorMap.accent1||"",accent2:this.themeColorMap.accent2||"",accent3:this.themeColorMap.accent3||"",accent4:this.themeColorMap.accent4||"",accent5:this.themeColorMap.accent5||"",accent6:this.themeColorMap.accent6||"",hlink:this.themeColorMap.hlink||"",folHlink:this.themeColorMap.folHlink||""});let n;if(e){let i=this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts),o=this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);n={majorFont:{latin:this.themeFontMap["mj-lt"],eastAsia:this.themeFontMap["mj-ea"],complexScript:this.themeFontMap["mj-cs"],...Object.keys(i).length>0?{byScript:i}:{}},minorFont:{latin:this.themeFontMap["mn-lt"],eastAsia:this.themeFontMap["mn-ea"],complexScript:this.themeFontMap["mn-cs"],...Object.keys(o).length>0?{byScript:o}:{}}};}return {colorScheme:r,fontScheme:n,formatScheme:this.themeFormatScheme}}async applySlideMasterColorMap(t){let e=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!e||e.length===0)return;let r=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let n of e)try{let i=await n.async("string"),a=this.parser.parse(i)?.["p:sldMaster"]?.["p:clrMap"];if(!a)continue;let s={};for(let l of r){let c=String(a[`@_${l}`]||"").trim().toLowerCase();c&&(s[l]=c);}Object.keys(s).length>0&&this.masterClrMaps.set(n.name,s);}catch(i){console.warn(`Failed to parse slide master color map for ${n.name}:`,i);}}async parseThemePart(t){let e=this.zip.file(t);if(!e)return null;let r=await e.async("string");this.originalThemeXmlByPath.set(t,r);let i=this.parser.parse(r)["a:theme"],o=i?.["a:themeElements"],a=o?.["a:clrScheme"],s=o?.["a:fontScheme"],l=o?.["a:fmtScheme"],c=String(i?.["@_name"]||"").trim();c&&this.masterThemeNames.set(t,c);let d=String(a?.["@_name"]||"").trim();d&&this.masterThemeColorSchemeNames.set(t,d);let p=String(s?.["@_name"]||"").trim();p&&this.masterThemeFontSchemeNames.set(t,p);let f={...this.getDefaultSchemeColorMap()};if(a){let F=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];for(let D of F){let U=a[`a:${D}`],j=this.parseColorChoice(U);j&&(f[D]=j);}}let h=s?.["a:majorFont"],g=s?.["a:minorFont"],y=h?.["a:latin"],x=g?.["a:latin"],v=this.normalizeTypefaceToken(String(y?.["@_typeface"]||"")),b=this.normalizeTypefaceToken(String(x?.["@_typeface"]||"")),S={};v&&(S["mj-lt"]=v,S["mj-ea"]=v,S["mj-cs"]=v),b&&(S["mn-lt"]=b,S["mn-ea"]=b,S["mn-cs"]=b);let w=this.normalizeTypefaceToken(String(h?.["a:ea"]?.["@_typeface"]||""));w&&(S["mj-ea"]=w);let C=this.normalizeTypefaceToken(String(h?.["a:cs"]?.["@_typeface"]||""));C&&(S["mj-cs"]=C);let _=this.normalizeTypefaceToken(String(g?.["a:ea"]?.["@_typeface"]||""));_&&(S["mn-ea"]=_);let A=this.normalizeTypefaceToken(String(g?.["a:cs"]?.["@_typeface"]||""));A&&(S["mn-cs"]=A);let k=this.collectFontScriptOverrides(h);Object.keys(k).length>0&&this.masterThemeMajorFontScripts.set(t,k);let E=this.collectFontScriptOverrides(g);Object.keys(E).length>0&&this.masterThemeMinorFontScripts.set(t,E);let I=i?.["a:objectDefaults"];if(I){let F={spDef:I["a:spDef"],lnDef:I["a:lnDef"],txDef:I["a:txDef"]};(F.spDef!==void 0||F.lnDef!==void 0||F.txDef!==void 0)&&this.masterThemeObjectDefaults.set(t,F);}let M=i?.["a:extraClrSchemeLst"];M!==void 0&&this.masterThemeExtraClrSchemeLst.set(t,M);let R=i?.["a:custClrLst"];R!==void 0&&this.masterThemeCustClrLst.set(t,R);let O=i?.["a:extLst"];O!==void 0&&this.masterThemeExtLst.set(t,O);let B=l?this.parseFormatScheme(l):void 0;return {colorMap:f,fontMap:S,formatScheme:B}}aggregateFontScriptOverrides(t){let e={};for(let r of t.values())for(let[n,i]of Object.entries(r))n in e||(e[n]=i);return e}collectFontScriptOverrides(t){let e={};if(!t)return e;let r=this.ensureArray(t["a:font"]);for(let n of r){let i=String(n?.["@_script"]||"").trim(),o=this.normalizeTypefaceToken(String(n?.["@_typeface"]||""));i&&o&&(e[i]=o);}return e}async resolveThemePathForMaster(t){let e=t.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),r=this.zip.file(e);if(!r)return;let n=this.parser.parse(await r.async("string")),i=this.ensureArray(n?.Relationships?.Relationship);for(let o of i){let a=String(o["@_Target"]||"");if(!a.includes("theme"))continue;let s=a.startsWith("..")?this.resolvePath(t.substring(0,t.lastIndexOf("/")+1),a):a.startsWith("/")?a.slice(1):`ppt/${a.replace(/^\.?\//,"")}`;if(s.startsWith("ppt/theme/"))return s}}async loadPerMasterThemes(){let t=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!(!t||t.length===0))for(let e of t)try{let r=await this.resolveThemePathForMaster(e.name);if(!r)continue;this.masterThemePaths.set(e.name,r);let n=await this.parseThemePart(r);if(!n)continue;this.masterThemeColorMaps.set(e.name,n.colorMap),this.masterThemeFontMaps.set(e.name,n.fontMap),n.formatScheme&&this.masterThemeFormatSchemes.set(e.name,n.formatScheme);}catch(r){console.warn(`Failed to load per-master theme for ${e.name}:`,r);}}async loadThemeData(){let t=this.zip.file(/^ppt\/theme\/theme\d+\.xml$/);if(!t||t.length===0)return;let e=await this.resolvePrimaryThemePath(),r=e?t.find(i=>i.name===e)??t[0]:t[0],n=await this.parseThemePart(r.name);n&&(this.themeColorMap=n.colorMap,this.themeFontMap=n.fontMap,n.formatScheme&&(this.themeFormatScheme=n.formatScheme)),await this.applySlideMasterColorMap(this.getDefaultSchemeColorMap()),await this.loadPerMasterThemes(),this.globalThemeColorMapSnapshot={...this.themeColorMap},this.globalThemeFontMapSnapshot={...this.themeFontMap},this.globalThemeFormatSchemeSnapshot=this.themeFormatScheme;}};}});function Eht(t){return t.replace(/^#/,"").toUpperCase()}function Fue(t){return {"a:srgbClr":{"@_val":Eht(t)}}}function Iht(t){return t["a:theme"]?.["a:themeElements"]}function Oue(t,e){let r=Iht(t);if(!r)return false;let n=r["a:clrScheme"]??{};for(let i of aL)n[`a:${i}`]=Fue(e[i]);return r["a:clrScheme"]=n,true}function NU(t,e){let r=t??{};return r["a:latin"]={"@_typeface":e},r["a:ea"]||(r["a:ea"]={"@_typeface":""}),r["a:cs"]||(r["a:cs"]={"@_typeface":""}),r}function Due(t,e){let r=Iht(t);if(!r)return false;let n=r["a:fontScheme"]??{};return e.majorFont?.latin&&(n["a:majorFont"]=NU(n["a:majorFont"],e.majorFont.latin)),e.minorFont?.latin&&(n["a:minorFont"]=NU(n["a:minorFont"],e.minorFont.latin)),r["a:fontScheme"]=n,true}function i_(t,e,r){for(let n of aL)t[n]=Eht(e[n]);for(let[n,i]of Object.entries(Mht)){let o=r?.[n]??i,a=t[o];a!==void 0&&(t[n]=a);}}function o_(t,e){e.majorFont?.latin&&(t["mj-lt"]=e.majorFont.latin,t["mj-ea"]=e.majorFont.latin,t["mj-cs"]=e.majorFont.latin),e.minorFont?.latin&&(t["mn-lt"]=e.minorFont.latin,t["mn-ea"]=e.minorFont.latin,t["mn-cs"]=e.minorFont.latin);}var aL,Mht,Nue=T({"src/core/core/runtime/theme-scheme-edit.ts"(){aL=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],Mht={tx1:"dk1",bg1:"lt1",tx2:"dk2",bg2:"lt2"};}}),BU,Rht,Bue=T({"src/core/core/runtime/PptxHandlerRuntimeThemeProcessing.ts"(){Lue(),Nue(),BU=/^ppt\/theme\/theme\d+\.xml$/,Rht=class extends kht{async resolveThemeEditTargets(t){let e=i=>this.zip.file(i)!==null;if(t)return [...new Set(t)].filter(e);let r=await this.resolvePrimaryThemePath(),n=new Set;r&&e(r)&&n.add(r);for(let i of this.masterThemePaths.values())i&&e(i)&&n.add(i);if(n.size===0){let i=this.zip.file(BU)[0];i&&n.add(i.name);}return [...n]}async readThemePart(t){let e=this.zip.file(t);if(!e)return;let r=await e.async("string");return this.parser.parse(r)}async rewriteThemeParts(t,e){let r=[];for(let n of await this.resolveThemeEditTargets(t)){let i=await this.readThemePart(n);!i||!e(i)||(this.zip.file(n,this.builder.build(i)),r.push(n));}return r}mastersUsingThemes(t){let e=new Set(t),r=[];for(let[n,i]of this.masterThemePaths.entries())e.has(i)&&r.push(n);return r}async updateThemeColorScheme(t,e){let r=await this.rewriteThemeParts(e,n=>Oue(n,t));if(r.length!==0){for(let n of this.mastersUsingThemes(r)){let i=this.masterThemeColorMaps.get(n);i&&i_(i,t,this.masterClrMaps.get(n));}i_(this.globalThemeColorMapSnapshot,t,null),i_(this.themeColorMap,t,this.currentMasterClrMap);}}async updateThemeFontScheme(t,e){let r=await this.rewriteThemeParts(e,n=>Due(n,t));if(r.length!==0){for(let n of this.mastersUsingThemes(r)){let i=this.masterThemeFontMaps.get(n);i&&o_(i,t);}o_(this.globalThemeFontMapSnapshot,t),o_(this.themeFontMap,t);}}async updateThemeName(t,e){await this.rewriteThemeParts(e,r=>{let n=r["a:theme"];return n?(n["@_name"]=t,true):false});}async applyTheme(t,e,r){await this.updateThemeColorScheme(t),await this.updateThemeFontScheme(e),r&&await this.updateThemeName(r);}};}}),Lht,$ue=T({"src/core/core/runtime/PptxHandlerRuntimeComments.ts"(){Jnt(),bst(),Pt(),Bue(),Lht=class wx extends Rht{async extractModernSlideComments(e){try{let r=`${e.replace("slides/","slides/_rels/")}.rels`,n=await this.zip.file(r)?.async("string");if(!n)return [];let i=this.parser.parse(n),a=this.ensureArray(Q(i,"Relationships")?.Relationship).filter(l=>String(l?.["@_Type"]||"")===am);if(a.length===0)return [];let s=[];for(let l of a){let c=String(l?.["@_Target"]||"").trim();if(!c)continue;let d=this.resolvePath(e,c),p=await this.zip.file(d)?.async("string");if(!p)continue;let u=$Qt(this.parser.parse(p),{path:d,relationshipId:String(l?.["@_Id"]||"").trim()},f=>this.modernCommentAuthors.get(f)?.name,wx.EMU_PER_PX);s.push(...u.comments),this.modernCommentParts.set(e,u.part);}return s}catch(r){console.warn("Failed to parse modern comments:",r);}return []}async loadModernCommentAuthors(){let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return;let r=this.parser.parse(e),i=this.ensureArray(Q(r,"Relationships")?.Relationship).find(c=>String(c?.["@_Type"]||"")===Ph),o=String(i?.["@_Target"]||"").trim();if(!o)return;let a=this.resolvePath("ppt/presentation.xml",o),s=await this.zip.file(a)?.async("string");if(!s)return;let l=jQt(this.parser.parse(s));this.modernCommentAuthors.clear();for(let c of l.authors)c.id&&this.modernCommentAuthors.set(c.id,c);this.modernCommentAuthorsRootXml=l.root,this.modernCommentAuthorsPartPath=a,this.modernCommentAuthorsRelationshipId=String(i?.["@_Id"]||"").trim();}async resolveSlideCommentTarget(e){let r=this.slideRelsMap.get(e);if(r){for(let[,o]of r.entries())if(String(o||"").toLowerCase().includes("comments/comment"))return o}let n=`${e.replace("slides/","slides/_rels/")}.rels`,i=await this.zip.file(n)?.async("string");if(i)try{let o=this.parser.parse(i),s=this.ensureArray(Q(o,"Relationships")?.Relationship).find(c=>{let d=String(c?.["@_Type"]||"");return d===am?!1:d.toLowerCase().endsWith("/comments")}),l=String(s?.["@_Target"]||"").trim();return l.length>0?l:void 0}catch(o){console.warn("Failed to parse slide relationships for comments:",o);return}}extractCommentText(e){let r=e?.["p:text"]??e?.text??this.xmlLookupService.getChildByLocalName(e,"text");if(typeof r=="string")return r.trim();if(r!=null)return String(r).trim();let n=e?.["p:txBody"]||this.xmlLookupService.getChildByLocalName(e,"txBody"),i=this.extractTextFromTxBody(n);return i.length>0?i:""}async extractSlideComments(e){let r=await this.resolveSlideCommentTarget(e);if(!r)return [];let n=this.resolveImagePath(e,r),i=await this.zip.file(n)?.async("string");if(!i)return [];try{let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"cmLst"),l=this.xmlLookupService.getChildrenArrayByLocalName(a,"cm").map((c,d)=>{let p=String(c?.["@_idx"]||c?.["@_id"]||d).trim(),u=String(c?.["@_authorId"]||"").trim(),f=String(c?.["@_dt"]||"").trim(),h=c?.["p:pos"]||this.xmlLookupService.getChildByLocalName(c,"pos"),g=Number.parseInt(String(h?.["@_x"]||""),10),y=Number.parseInt(String(h?.["@_y"]||""),10),x=String(c?.["@_done"]||c?.["@_resolved"]||"").trim().toLowerCase(),v=x==="1"||x==="true"?!0:void 0;return {id:p.length>0?p:String(d),text:this.extractCommentText(c),author:u.length>0?this.commentAuthorMap.get(u)||`Author ${u}`:void 0,createdAt:f.length>0?f:void 0,x:Number.isFinite(g)?Math.round(g/wx.EMU_PER_PX):void 0,y:Number.isFinite(y)?Math.round(y/wx.EMU_PER_PX):void 0,resolved:v,rawXml:c}});return CYt(l)}catch(o){return console.warn("Failed to parse slide comments:",o),[]}}async loadCommentAuthors(){let e=await this.zip.file("ppt/commentAuthors.xml")?.async("string");if(e)try{let r=this.parser.parse(e),n=this.xmlLookupService.getChildByLocalName(r,"cmAuthorLst");this.commentAuthorsRootXml=n,this.xmlLookupService.getChildrenArrayByLocalName(n,"cmAuthor").forEach((o,a)=>{let s=String(o?.["@_id"]||a).trim();if(s.length===0)return;let l=String(o?.["@_name"]||o?.["@_initials"]||`Author ${s}`).trim(),c=l.length>0?l:`Author ${s}`;this.commentAuthorMap.set(s,c);let d=String(o?.["@_initials"]||"").trim(),p=Number.parseInt(String(o?.["@_lastIdx"]||"0"),10),u=Number.parseInt(String(o?.["@_clrIdx"]||"0"),10),f={id:s,name:c,initials:d.length>0?d:this.toCommentInitials(c),lastIdx:Number.isFinite(p)?p:0,clrIdx:Number.isFinite(u)?u:0,rawXml:o};this.commentAuthorDetails.set(s,f);});}catch(r){console.warn("Failed to parse PowerPoint comment authors:",r);}}toCommentInitials(e){let r=e.split(/\s+/).map(n=>n.trim()).filter(n=>n.length>0);return r.length===0?"U":r.slice(0,2).map(n=>n[0].toUpperCase()).join("")}};}}),Fht,jue=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArtXmlUtils.ts"(){_q(),zM(),ast(),$ue(),Am(),Fht=class extends Lht{async readXmlPartByRelationshipId(t,e){let r=String(e||"").trim();if(r.length===0)return;let i=this.slideRelsMap.get(t)?.get(r);if(!i)return;let o=this.resolveImagePath(t,i),a=await this.zip.file(o)?.async("string");if(a)return {xml:this.parser.parse(a),partPath:o}}collectLocalTextValues(t,e,r){CQt(t,e,r);}extractSmartArtNodeRuns(t){return dV(ZE(t))}extractSmartArtNodeStyle(t){let e={},r=this.xmlLookupService.getChildByLocalName(t,"spPr");if(r){let i=this.parseColor(this.xmlLookupService.getChildByLocalName(r,"solidFill"));i&&(e.fillColor=i);let o=this.xmlLookupService.getChildByLocalName(r,"ln");if(o){let a=this.parseColor(this.xmlLookupService.getChildByLocalName(o,"solidFill"));a&&(e.lineColor=a);}}let n=this.firstRunProperties(t);if(n){this.xmlBoolean(n["@_b"])&&(e.bold=true),this.xmlBoolean(n["@_i"])&&(e.italic=true);let i=this.parseColor(this.xmlLookupService.getChildByLocalName(n,"solidFill"));i&&(e.fontColor=i);}return Object.keys(e).length>0?e:void 0}firstRunProperties(t){let e=this.xmlLookupService.getChildByLocalName(t,"t");if(!e)return;let r=this.xmlLookupService.getChildrenArrayByLocalName(e,"p")[0];if(!r)return;let n=this.xmlLookupService.getChildrenArrayByLocalName(r,"r")[0];if(n)return this.xmlLookupService.getChildByLocalName(n,"rPr")}xmlBoolean(t){let e=String(t??"").trim().toLowerCase();return e==="1"||e==="true"||e==="on"}parseSmartArtChrome(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"bg"),r=this.xmlLookupService.getChildByLocalName(t,"whole");if(!e&&!r)return;let n={};if(e){let i=this.xmlLookupService.getChildByLocalName(e,"solidFill"),o=this.parseColor(i);if(o)n.backgroundColor=o;else {let a=this.approximateSmartArtBackgroundFill(e);a&&(n.backgroundColor=a.color,n.backgroundFillXml={localName:a.localName,xml:a.xml});}}if(r){let i=this.xmlLookupService.getChildByLocalName(r,"ln");if(i){let o=this.xmlLookupService.getChildByLocalName(i,"solidFill"),a=this.parseColor(o);a&&(n.outlineColor=a);let s=parseInt(String(i["@_w"]||""),10);Number.isFinite(s)&&s>0&&(n.outlineWidth=s/12700);}}return n.backgroundColor||n.outlineColor?n:void 0}approximateSmartArtBackgroundFill(t){let e=this.xmlLookupService.getChildByLocalName(t,"gradFill");if(e){let n=this.colorStyleCodec.extractGradientFillColor(e);return n?{color:n,localName:"gradFill",xml:e}:void 0}let r=this.xmlLookupService.getChildByLocalName(t,"pattFill");if(r){let n=this.xmlLookupService.getChildByLocalName(r,"fgClr"),i=n?this.parseColor(n):void 0;return i?{color:i,localName:"pattFill",xml:r}:void 0}}parseSmartArtColorTransform(t,e){return this.parseSmartArtColorTransformImpl(t,e)}async parseSmartArtColorTransformImpl(t,e){if(e.length!==0)try{let r=await this.readXmlPartByRelationshipId(t,e);if(!r)return;let n=this.xmlLookupService.getChildByLocalName(r.xml,"colorsDef");if(!n)return;let i=u=>this.compatibilityService.getXmlLocalName(u),o=Stt(n,i),a=gzt(n,i),s=o.titles?.[0]?.value||String(n["@_title"]||n["@_uniqueId"]||"").trim()||void 0,l=this.xmlLookupService.getChildrenArrayByLocalName(n,"styleLbl"),c={getChild:(u,f)=>this.xmlLookupService.getChildByLocalName(u,f),parseColorChoice:u=>this.parseColor(u),resolveScheme:u=>this.resolveSmartArtSchemeColor(u)},d=f8t(l,c);if(d.fillColors.length===0&&d.lineColors.length===0)return;let p=h8t(l,c);return {...o,name:s,...d,...Object.keys(p).length>0?{roleColors:p}:{},labels:a}}catch{return}}resolveSmartArtSchemeColor(t){if(!t)return;let e=String(t["@_val"]||"").trim();if(e.length===0)return;let r=this.themeColorMap[e];if(r)return r.startsWith("#")?r:`#${r}`}};}});function Hue(t,e){let r={};if(e.hasChild(t,"noFill")){r.fillNone=true;let l=e.extractShadowColor(t);return l&&(r.hasShadow=true,r.shadowColor=l),r}let n=e.getChild(t,"solidFill");n&&(r.fillColor=e.parseColor(n)??void 0);let i=n?void 0:e.getChild(t,"gradFill");if(i){let l=e.extractGradientStops(i).map(c=>({color:c.color,position:c.position,...c.opacity!==void 0?{opacity:c.opacity}:{}}));l.length>0&&(r.fillGradientStops=l,r.fillGradientType=e.extractGradientType(i),r.fillGradientAngle=e.extractGradientAngle(i),r.fillColor??=l[Math.floor(l.length/2)]?.color);}let o=!n&&!i?e.getChild(t,"pattFill"):void 0;if(o){let l=String(o["@_prst"]||"").trim();l&&(r.fillPatternPreset=l);let c=e.parseColor(e.getChild(o,"fgClr")),d=e.parseColor(e.getChild(o,"bgClr"));c&&(r.fillPatternForegroundColor=c),d&&(r.fillPatternBackgroundColor=d),r.fillColor??=c??d;}let a=!n&&!i&&!o?e.getChild(t,"blipFill"):void 0;if(a){let l=e.getChild(a,"blip"),c=String(l?.["@_r:embed"]||l?.["@_embed"]||l?.["@_r:link"]||"").trim();c&&(r.fillBlipEmbedId=c);}let s=e.extractShadowColor(t);return s&&(r.hasShadow=true,r.shadowColor=s),r}function ts(t,e,r){if(!t||t[`@_${e}`]===void 0)return;let n=Number.parseInt(String(t[`@_${e}`]),10);return Number.isFinite(n)?n/r:void 0}function $U(t){return t===true||t===1||t==="1"||t==="true"}function Uue(t,e,r){let n,i,o,a,s,l,c,d,p;if(!t)return {fontSize:n,fontColor:i};let u=e.getChild(t,"bodyPr"),f=e.getChildren(t,"p");for(let h of f){let g=e.getChild(h,"pPr"),y=e.getChild(g,"lnSpc"),x=e.getChild(y,"spcPct"),v=e.getChild(y,"spcPts"),b=e.getChild(g,"spcAft"),S=e.getChild(b,"spcPct"),w=e.getChild(b,"spcPts");if(c===void 0&&x?.["@_val"]!==void 0){let _=Number.parseInt(String(x["@_val"]),10);Number.isFinite(_)&&_>0&&(c=_/1e5);}if(l===void 0&&v?.["@_val"]!==void 0){let _=Number.parseInt(String(v["@_val"]),10);Number.isFinite(_)&&_>0&&(l=_/100*(96/72));}if(p===void 0&&S?.["@_val"]!==void 0){let _=Number.parseInt(String(S["@_val"]),10);Number.isFinite(_)&&_>=0&&(p=_/1e5);}if(d===void 0&&w?.["@_val"]!==void 0){let _=Number.parseInt(String(w["@_val"]),10);Number.isFinite(_)&&_>=0&&(d=_/100*(96/72));}let C=e.getChildren(h,"r");for(let _ of C){let A=e.getChild(_,"rPr");if(A){let k=parseInt(String(A["@_sz"]||""),10);n===void 0&&Number.isFinite(k)&&k>0&&(n=k/100*(96/72)),i??=e.parseColor(e.getChild(A,"solidFill"))??void 0;let E=e.getChild(A,"ea"),I=e.getChild(A,"latin"),M=e.getChild(A,"cs");o??=String(E?.["@_typeface"]||I?.["@_typeface"]||M?.["@_typeface"]||"").trim()||void 0,a===void 0&&A["@_b"]!==void 0&&(a=$U(A["@_b"])?700:400),s===void 0&&A["@_i"]!==void 0&&(s=$U(A["@_i"])?"italic":"normal");}if(n!==void 0&&o!==void 0&&i!==void 0)break}if(n!==void 0&&o!==void 0&&i!==void 0)break}return {fontSize:n,fontColor:i,fontFamily:o,fontWeight:a,fontStyle:s,lineHeight:l,lineHeightRatio:c,lineSpacingAfter:d,lineSpacingAfterRatio:p,textInsetLeft:ts(u,"lIns",r),textInsetTop:ts(u,"tIns",r),textInsetRight:ts(u,"rIns",r),textInsetBottom:ts(u,"bIns",r),textVerticalAnchor:String(u?.["@_anchor"]||"").trim()||void 0}}var zue=T({"src/core/core/runtime/smartart-drawing-shape-style.ts"(){}});function Xue(t,e,r){let n=mzt(t,e);if(!n)return;let i={};n.fillRef&&r.resolveThemeFillRef(n.fillRef,i),n.lnRef&&r.resolveThemeLineRef(n.lnRef,i),n.effectRef&&r.resolveThemeEffectRef(n.effectRef,i);let o=String(n.fontRef?.["@_idx"]??"").toLowerCase(),a=o?r.resolveThemeTypeface(o.includes("minor")?"+mn-lt":"+mj-lt"):void 0,s={...i.fillColor!==void 0?{fillColor:i.fillColor}:{},...i.fillMode&&Oht.has(i.fillMode)?{fillMode:i.fillMode}:{},...i.strokeColor!==void 0?{strokeColor:i.strokeColor}:{},...i.strokeWidth!==void 0?{strokeWidth:i.strokeWidth}:{},...i.shadowColor!==void 0?{shadowColor:i.shadowColor}:{},...a?{fontTypeface:a}:{}};return Object.keys(s).length>0?s:void 0}function Gue(t,e,r,n){let i=d8t(e,r);if(!t||t.length===0)return {effectIntensity:i,labels:t};let o=new Map;for(let s of e){let l=String(s["@_name"]??"");l&&!o.has(l)&&o.set(l,s);}let a=t.map(s=>{let l=o.get(s.name),c=l?Xue(l,r,n):void 0;return c?{...s,resolvedStyle:c}:s});return {effectIntensity:i,labels:a}}function Wue(t,e,r,n){let i=Stt(t,e),o=hzt(t,e),a=i.titles?.[0]?.value||String(t["@_title"]||t["@_uniqueId"]||"").trim()||void 0,{effectIntensity:s,labels:l}=Gue(o,r,e,n);return {...i,name:a,effectIntensity:s,labels:l}}var Oht,Vue=T({"src/core/core/runtime/smartart-style-label-refs.ts"(){zM(),bq(),Oht=new Set(["solid","gradient","pattern","none","theme"]);}});function Dht(t,e){for(let r of t??[]){r.endParaRPr&&(r.endParaStyle=e(r.endParaRPr));for(let n of r.items)n.kind==="run"&&n.run.rPr?n.run.style=e(n.run.rPr):(n.kind==="field"||n.kind==="break")&&n.rPr&&(n.style=e(n.rPr));}return t}var Nht=T({"src/core/core/runtime/smartart-text-style-resolution.ts"(){}}),Bht,Yue=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArtParsing.ts"(){lst(),QI(),oI(),jue(),zue(),Vue(),Am(),Nht(),Bht=class $ht extends Fht{reportIncompleteSmartArtRelationships(e,r,n){let i=[["dm",r?.dataRelId],["lo",r?.layoutRelId],["qs",r?.styleRelId],["cs",r?.colorsRelId]].filter(([,a])=>!a).map(([a])=>a);if(i.length===0)return;let o=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(e,"nvGraphicFramePr"),"cNvPr");this.compatibilityService.reportWarning({code:"DIAGRAM_RELATIONSHIP_IDS_INCOMPLETE",message:`SmartArt relIds is missing required relationship attributes: ${i.join(", ")}.`,scope:"element",slideId:n,elementId:String(o?.["@_id"]??"")||void 0,xmlPath:"p:graphicFrame/a:graphic/a:graphicData/dgm:relIds"});}parseSmartArtConnections(e){let r=this.xmlLookupService.getChildByLocalName(e,"cxnLst"),n=this.xmlLookupService.getChildrenArrayByLocalName(r,"cxn"),i=this.xmlLookupService.getChildByLocalName(e,"ptLst"),o=this.xmlLookupService.getChildrenArrayByLocalName(i,"pt"),a=AQt(o,c=>{let d=[];return this.collectLocalTextValues(c,"t",d),d.join("")}),s=new Map,l=[];return n.forEach(c=>{let d=i8t(c);if(!d)return;let p=d.parentTransitionId?a.get(d.parentTransitionId):void 0,u=d.siblingTransitionId?a.get(d.siblingTransitionId):void 0,f=p??u;l.push(f?{...d,label:f}:d),(!d.type||d.type==="parOf")&&!s.has(d.destId)&&s.set(d.destId,d.sourceId);}),{parsedConnections:l,parentByNodeId:s}}async parseSmartArtQuickStyle(e,r){if(r.length!==0)try{let n=await this.readXmlPartByRelationshipId(e,r);if(!n)return;let i=this.xmlLookupService.getChildByLocalName(n.xml,"styleDef");if(!i)return;let o=s=>this.compatibilityService.getXmlLocalName(s),a=this.xmlLookupService.getChildrenArrayByLocalName(i,"styleLbl");return Wue(i,o,a,{resolveThemeFillRef:this.resolveThemeFillRef.bind(this),resolveThemeLineRef:this.resolveThemeLineRef.bind(this),resolveThemeEffectRef:this.resolveThemeEffectRef.bind(this),resolveThemeTypeface:this.resolveThemeTypeface.bind(this)})}catch{return}}async parseSmartArtDrawingShapes(e,r){if(r.length===0)return [];try{let n=await this.readXmlPartByRelationshipId(e,r);if(!n)return [];let i=this.xmlLookupService.getChildByLocalName(n.xml,"drawing"),o=this.xmlLookupService.getChildByLocalName(i||n.xml,"spTree");if(!o)return [];let a=this.xmlLookupService.getChildrenArrayByLocalName(o,"sp"),s=$ht.EMU_PER_PX;return a.map((l,c)=>this.parseDrawingShape(l,c,s)).filter(l=>l!==null)}catch{return []}}parseDrawingShape(e,r,n){let i=this.xmlLookupService.getChildByLocalName(e,"spPr");if(!i)return null;let o=this.xmlLookupService.getChildByLocalName(i,"xfrm"),a=this.xmlLookupService.getChildByLocalName(o,"off"),s=this.xmlLookupService.getChildByLocalName(o,"ext");if(!a||!s)return null;let l=Math.round(parseInt(String(a["@_x"]||"0"),10)/n),c=Math.round(parseInt(String(a["@_y"]||"0"),10)/n),d=Math.round(parseInt(String(s["@_cx"]||"0"),10)/n),p=Math.round(parseInt(String(s["@_cy"]||"0"),10)/n),u=o?.["@_rot"]?parseInt(String(o["@_rot"]),10)/6e4:void 0,f=["1","true"].includes(String(o?.["@_flipH"]??"").toLowerCase()),h=["1","true"].includes(String(o?.["@_flipV"]??"").toLowerCase()),g=o?.["@_skewX"]?parseInt(String(o["@_skewX"]),10)/6e4:void 0,y=o?.["@_skewY"]?parseInt(String(o["@_skewY"]),10)/6e4:void 0,x=this.xmlLookupService.getChildByLocalName(i,"prstGeom"),v=this.xmlLookupService.getChildByLocalName(i,"custGeom"),b=x?this.parseGeometryAdjustments(x):void 0,S=x?String(x["@_prst"]||"rect"):"rect",w={};if(v){let vt=this.parseCustomGeometry(v,d,p);if(vt){S="custom";let St=this.extractCustomGeometryAdjustHandles(v);w={...vt,customGeometryPaths:this.buildStructuredCustomGeometryPaths(v,vt.pathWidth,vt.pathHeight),customGeometryRawData:this.extractCustomGeometryRawData(v),customGeometryAdjustHandlesXY:St.xy,customGeometryAdjustHandlesPolar:St.polar,customGeometryConnectionSites:this.extractCustomGeometryConnectionSites(v),customGeometryTextRect:this.extractCustomGeometryTextRect(v)};}}if((d<=0||p<=0)&&S!=="line")return null;let C=Hue(i,this.drawingShapeStyleDeps()),_=this.xmlLookupService.getChildByLocalName(i,"ln"),A=_?this.xmlLookupService.getChildByLocalName(_,"solidFill"):void 0,k=this.parseColor(A),E=_?parseInt(String(_["@_w"]||""),10):NaN,I=Number.isFinite(E)&&E>0?E/12700:void 0,M=this.xmlLookupService.getChildByLocalName(e,"txBody"),R=[];M&&this.collectLocalTextValues(M,"t",R);let O=R.join("").trim()||void 0,B=Uue(M,this.drawingShapeStyleDeps(),n),{fontSize:F,fontColor:D}=B,U=this.xmlLookupService.getChildByLocalName(e,"txXfrm"),j=this.xmlLookupService.getChildByLocalName(U,"off"),z=this.xmlLookupService.getChildByLocalName(U,"ext"),V=ts(j,"x",n),X=ts(j,"y",n),K=ts(z,"cx",n),q=ts(z,"cy",n),ot=M?Dht(ZE({"dgm:t":M}),vt=>this.extractTextRunStyle(vt,void 0,void 0,false)):void 0,J=ot?Fb(ot):O,dt=ot?Dx({id:String(e["@_modelId"]||`dsp-${r}`),text:J??"",paragraphs:ot},{...F!==void 0?{fontSize:F}:{},...D?{color:D}:{}}):void 0,mt=this.xmlLookupService.getChildByLocalName(e,"nvSpPr"),Tt=this.xmlLookupService.getChildByLocalName(mt,"cNvPr");return {id:String(e["@_modelId"]||Tt?.["@_id"]||`dsp-${r}`),shapeType:S,x:l,y:c,width:d,height:p,rotation:u,flipHorizontal:f,flipVertical:h,skewX:g,skewY:y,shapeAdjustments:b,...C,fillColor:C.fillColor??void 0,strokeColor:k??void 0,strokeWidth:I,text:J,textSegments:dt,...B,textFrameX:V,textFrameY:X,textFrameWidth:K,textFrameHeight:q,...w}}drawingShapeStyleDeps(){return {getChild:(e,r)=>this.xmlLookupService.getChildByLocalName(e,r),hasChild:(e,r)=>this.xmlLookupService.hasChildByLocalName(e,r),getChildren:(e,r)=>this.xmlLookupService.getChildrenArrayByLocalName(e,r),parseColor:e=>this.parseColor(e),extractGradientStops:e=>this.extractGradientStops(e),extractGradientType:e=>this.extractGradientType(e),extractGradientAngle:e=>this.extractGradientAngle(e),extractShadowColor:e=>this.extractShadowStyle(e).shadowColor}}};}});function Kue(t,e){let r=[],n=i=>{if(i){for(let o of e(i,"sp"))r.push({node:o,isPic:false});for(let o of e(i,"pic"))r.push({node:o,isPic:true});for(let o of e(i,"grpSp"))n(o);}};return n(t),r}function que(t,e){let r=e(e(t,"blipFill"),"blip");if(!r)return;let n=String(r["@_r:embed"]||r["@_embed"]||r["@_r:link"]||"").trim();return n.length>0?n:void 0}function Zue(t,e,r){let n=new Map;try{let i=e(t).Relationships;if(!i)return n;for(let o of r(i.Relationship)){let a=String(o?.["@_Id"]||"").trim(),s=String(o?.["@_Target"]||"").trim();a.length>0&&s.length>0&&n.set(a,s);}}catch{}return n}async function Jue(t,e,r){let n=t.filter(l=>l.fillBlipEmbedId&&!l.fillImageUrl);if(n.length===0)return;let i=e.replace(/\/[^/]+$/u,""),o=e.split("/").pop()??"",a=await r.readText(`${i}/_rels/${o}.rels`);if(!a)return;let s=Zue(a,r.parse,r.ensureArray);for(let l of n){let c=s.get(l.fillBlipEmbedId??"");if(!c)continue;let d=/^(?:https?:|data:)/u.test(c)?c:r.resolveImagePath(e,c),p=await r.getImageData(d);p&&(l.fillImageUrl=p);}}async function Que(t,e){let r=await e.readText(t);if(!r)return [];try{let n=e.parse(r),i=e.getChild(n,"drawing"),o=e.getChild(i||n,"spTree");if(!o)return [];let a=[];return Kue(o,e.getChildren).forEach(({node:s,isPic:l},c)=>{let d=e.parseDrawingShape(s,c,e.emuPerPx);if(d){if(l&&!d.fillBlipEmbedId){let p=que(s,e.getChild);p&&(d.fillBlipEmbedId=p);}a.push(d);}}),await Jue(a,t,e),a}catch{return []}}var tfe=T({"src/core/core/runtime/smartart-drawing-blip.ts"(){}});function efe(t,e){for(let n of e){let i=jht[n.trim().toLowerCase()];if(i)return i}let r=t.toLowerCase();if(r.length>0){for(let[n,i]of Hht)if(n.test(r))return i}}var jht,Hht,rfe=T({"src/core/core/runtime/smartart-layout-category.ts"(){jht={list:"list",process:"process",cycle:"cycle",hierarchy:"hierarchy",relationship:"relationship",matrix:"matrix",pyramid:"pyramid"},Hht=[[/hier|org/u,"hierarchy"],[/cycle|radial|circular/u,"cycle"],[/process|flow|chevron|arrow|equation/u,"process"],[/timeline/u,"timeline"],[/matrix|grid/u,"matrix"],[/pyramid/u,"pyramid"],[/venn/u,"venn"],[/funnel/u,"funnel"],[/gear/u,"gear"],[/target/u,"target"],[/list/u,"list"]];}}),Uht,nfe=T({"src/core/core/runtime/PptxHandlerRuntimeSmartArt.ts"(){ae(),vq(),dq(),ast(),Yue(),tfe(),rfe(),Am(),Nht(),T1(),Uht=class zht extends Bht{async getSmartArtDataForGraphicFrame(e,r){let n=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(r,"graphic"),"graphicData");if(!this.xmlLookupService.getChildByLocalName(n,"relIds"))return;let o=e8t(n);this.reportIncompleteSmartArtRelationships(r,o,e);let a=o?.dataRelId??"";if(a.length===0)return;let s=await this.readXmlPartByRelationshipId(e,a);if(!s)return;let l=this.xmlLookupService.getChildByLocalName(s.xml,"dataModel"),c=this.xmlLookupService.getChildByLocalName(l,"ptLst"),d=this.xmlLookupService.getChildrenArrayByLocalName(c,"pt"),{parsedConnections:p,parentByNodeId:u}=this.parseSmartArtConnections(l),f=j=>this.compatibilityService.getXmlLocalName(j),h=a8t(d,p,f),g=s8t(d,p,f),y=d.filter(XM).map(j=>{let z=String(j?.["@_modelId"]||"").trim();if(z.length===0)return null;let V=String(j?.["@_type"]||"").trim()||void 0,X=[];this.collectLocalTextValues(j,"t",X);let K=Dht(ZE(j),dt=>this.extractTextRunStyle(dt,void 0,void 0,false)),q=dV(K),ot=K?Fb(K):X.join(""),J=this.extractSmartArtNodeStyle(j);return {id:z,text:ot,connectionId:String(j?.["@_cxnId"]||"").trim()||void 0,parentId:u.get(z),nodeType:V,styleRole:h.get(z),coherent3DOff:g.has(z)||void 0,runs:q,paragraphs:K,style:J}}).filter(j=>!!j).slice(0,ost);if(y.length===0)return;let x=o?.layoutRelId??"",v=x.length>0?await this.readXmlPartByRelationshipId(e,x):void 0,b=v?.partPath?.split("/").pop()?.replace(/\.[^.]+$/u,"")||void 0,S=this.xmlLookupService.getChildByLocalName(v?.xml,"layoutDef"),w=dzt(S,j=>this.compatibilityService.getXmlLocalName(j)),C=this.xmlLookupService.getChildrenArrayByLocalName(this.xmlLookupService.getChildByLocalName(S,"catLst"),"cat").map(j=>String(j?.["@_type"]||"")),_=efe(String(S?.["@_uniqueId"]||""),C),A=this.parseSmartArtChrome(l),k=o?.colorsRelId??"",E=await this.parseSmartArtColorTransform(e,k),I=this.xmlLookupService.getChildByLocalName(l,"extLst"),M=this.xmlLookupService.getChildrenArrayByLocalName(I,"ext").map(j=>this.xmlLookupService.getChildByLocalName(j,"dataModelExt")).find(Boolean),R=String(M?.["@_relId"]||"").trim(),O=await this.resolveSmartArtDrawingPart(e,a,R),B=O?await this.parseSmartArtDrawingShapesFromPath(O.path):[],F=O?.relId,D=o?.styleRelId??"",U=await this.parseSmartArtQuickStyle(e,D);return {layoutType:b,resolvedLayoutType:_,layoutDefinition:w,nodes:y,connections:p.length>0?p:void 0,presLayoutVars:sq(l),drawingShapes:B.length>0?B:void 0,chrome:A,colorTransform:E,quickStyle:U,themeMinorFont:this.themeFontMap["mn-lt"]||void 0,dataRelId:a,layoutRelId:x.length>0?x:void 0,drawingRelId:F&&F.length>0?F:void 0,colorsRelId:k.length>0?k:void 0,styleRelId:D.length>0?D:void 0}}async resolveSmartArtDrawingPart(e,r,n){if(r.length===0)return;let i=this.slideRelsMap.get(e),o=n?i?.get(n):void 0;if(o)return {relId:n,path:this.resolveImagePath(e,o)};let a=[...i?.entries()??[]].find(([,f])=>/(?:^|\/)diagrams\/drawing\d+\.xml$/u.test(f.replaceAll("\\","/")));if(a)return {relId:a[0],path:this.resolveImagePath(e,a[1])};let s=i?.get(r);if(!s)return;let l=this.resolveImagePath(e,s),c=l.replace(/\/[^/]+$/u,""),d=l.split("/").pop()??"",p=`${c}/_rels/${d}.rels`,u=await this.zip.file(p)?.async("string");if(u)try{let h=this.parser.parse(u).Relationships;if(!h)return;let y=this.ensureArray(h.Relationship).find(S=>{let w=String(S?.["@_Id"]||"").trim();return (!n||w===n)&&String(S?.["@_Type"]||"").endsWith("/diagramDrawing")}),x=String(y?.["@_Id"]||"").trim(),v=String(y?.["@_Target"]||"").trim();if(x.length===0||v.length===0)return;let b=this.resolveImagePath(l,v);return {relId:x,path:b}}catch{return}}async parseSmartArtDrawingShapesFromPath(e){return Que(e,this.drawingBlipDeps())}drawingBlipDeps(){return {readText:e=>this.zip.file(e)?.async("string")??Promise.resolve(void 0),parse:e=>this.parser.parse(e),getChild:(e,r)=>this.xmlLookupService.getChildByLocalName(e,r),getChildren:(e,r)=>this.xmlLookupService.getChildrenArrayByLocalName(e,r),parseDrawingShape:(e,r,n)=>this.parseDrawingShape(e,r,n),emuPerPx:zht.EMU_PER_PX,ensureArray:e=>this.ensureArray(e),resolveImagePath:(e,r)=>this.resolveImagePath(e,r),getImageData:e=>this.getImageData(e)}}};}}),Xht,ife=T({"src/core/core/runtime/PptxHandlerRuntimeChartDetection.ts"(){TQt(),nfe(),Xht=class extends Uht{detectChartType(t){if(!t)return "unknown";let e={barChart:"bar",bar3DChart:"bar3D",lineChart:"line",line3DChart:"line3D",pieChart:"pie",pie3DChart:"pie3D",ofPieChart:"ofPie",doughnutChart:"doughnut",areaChart:"area",area3DChart:"area3D",scatterChart:"scatter",bubbleChart:"bubble",radarChart:"radar",stockChart:"stock",surfaceChart:"surface",surface3DChart:"surface"},r=[];for(let n of Object.keys(t)){let i=this.compatibilityService.getXmlLocalName(n);e[i]&&r.push(i);}if(r.length>=2)return "combo";if(r.length===1)return e[r[0]];for(let n of Object.keys(t)){let i=this.compatibilityService.getXmlLocalName(n);if(i==="plotAreaRegion"||i==="plotSurface"){let o=this.xmlLookupService.getChildrenArrayByLocalName(t[n],"series");for(let a of o){let s=String(a?.["@_layoutId"]||"").toLowerCase(),l=this.xmlLookupService.getChildByLocalName(a,"layoutPr"),c=!!this.xmlLookupService.getChildByLocalName(l,"binning");if(s.includes("waterfall"))return "waterfall";if(s.includes("funnel"))return "funnel";if(s.includes("treemap"))return "treemap";if(s.includes("sunburst"))return "sunburst";if(s.includes("boxwhisker")||s.includes("box"))return "boxWhisker";if(s.includes("histogram")||s.includes("pareto")||s==="clusteredcolumn"&&c)return "histogram";if(s.includes("regionmap")||s.includes("map"))return "regionMap"}}}return "unknown"}extractChartPointValues(t,e){if(!t)return [];let r=e?"numRef":"strRef",n=e?"numLit":"strLit",i=e?"numCache":"strCache",o=this.xmlLookupService.getChildByLocalName(t,r)||this.xmlLookupService.getChildByLocalName(t,n),a=this.xmlLookupService.getChildByLocalName(o,i)||o,s=this.xmlLookupService.getChildrenArrayByLocalName(a,"pt");return s.length===0?[]:[...s].sort((l,c)=>{let d=Number.parseInt(String(l?.["@_idx"]||"0"),10),p=Number.parseInt(String(c?.["@_idx"]||"0"),10);return d-p}).map(l=>String(this.xmlLookupService.getScalarChildByLocalName(l,"v")||"").trim()).filter(l=>l.length>0)}extractChartCategoryValues(t,e){if(!t)return [];let r=e?"numRef":"strRef",n=e?"numLit":"strLit",i=e?"numCache":"strCache",o=this.xmlLookupService.getChildByLocalName(t,r)||this.xmlLookupService.getChildByLocalName(t,n),a=this.xmlLookupService.getChildByLocalName(o,i)||o,s=this.xmlLookupService.getChildrenArrayByLocalName(a,"pt");if(s.length===0)return [];let l=new Map,c=-1;for(let f of s){let h=Number.parseInt(String(f?.["@_idx"]??"0"),10);if(!Number.isFinite(h)||h<0)continue;let g=String(this.xmlLookupService.getScalarChildByLocalName(f,"v")||"").trim();g.length>0&&l.set(h,g),h>c&&(c=h);}if(l.size===0)return [];let d=Number.parseInt(String(this.xmlLookupService.getChildByLocalName(a,"ptCount")?.["@_val"]??""),10),p=Number.isFinite(d)&&d>c+1?d:c+1,u=[];for(let f=0;f<p;f++)u.push(l.get(f)??"");return u}extractChartCategoryLevels(t){return SQt(t,this.xmlLookupService)}extractChartSeriesName(t){let e=this.xmlLookupService.getChildByLocalName(t,"tx"),r=String(this.xmlLookupService.getScalarChildByLocalName(e,"v")||"").trim();if(r.length>0)return r;let n=this.extractChartPointValues(e,false);return n.length>0?n[0]:"Series"}};}});function Ny(t){if(!t)return;let e=t["@_val"];return e==null||e===""?true:!(e==="0"||e==="false")}function Io(t){if(!t)return;let e=t["@_val"];if(e==null||e==="")return;let r=Number.parseFloat(String(e));return Number.isFinite(r)?r:void 0}var jU,Ght,ofe=T({"src/core/core/runtime/PptxHandlerRuntimeChartParsingHelpers.ts"(){lM(),nR(),ife(),jU="{56B9EC1D-385E-4148-901F-78D8002777C0}",Ght=class extends Xht{parsePlotVisOnly(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"plotVisOnly");if(!e)return;let r=e["@_val"];return !(r==="0"||r==="false")}parsePivotSource(t){return vQt(t,e=>this.compatibilityService.getXmlLocalName(e))}parseOfPieOptions(t){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"ofPieType")?.["@_val"],i={ofPieType:String(r??"pie").toLowerCase()==="bar"?"bar":"pie"},a=this.xmlLookupService.getChildByLocalName(t,"splitType")?.["@_val"];if(a!=null){let u=String(a);(u==="auto"||u==="cust"||u==="percent"||u==="pos"||u==="val")&&(i.splitType=u);}let s=Io(this.xmlLookupService.getChildByLocalName(t,"splitPos"));s!==void 0&&(i.splitPos=s);let l=Io(this.xmlLookupService.getChildByLocalName(t,"secondPieSize"));l!==void 0&&(i.secondPieSize=l);let c=Io(this.xmlLookupService.getChildByLocalName(t,"gapWidth"));c!==void 0&&(i.gapWidth=c),this.xmlLookupService.getChildrenArrayByLocalName(t,"serLines").length>0&&(i.serLines=true);let p=this.xmlLookupService.getChildByLocalName(t,"custSplit");if(p){let f=this.xmlLookupService.getChildrenArrayByLocalName(p,"secondPiePt").map(h=>Io(h)).filter(h=>h!==void 0&&Number.isFinite(h));f.length>0&&(i.custSplit=f);}return i}parseView3D(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"view3D");if(!e)return;let r={},n=Io(this.xmlLookupService.getChildByLocalName(e,"rotX"));n!==void 0&&(r.rotX=n);let i=Io(this.xmlLookupService.getChildByLocalName(e,"rotY"));i!==void 0&&(r.rotY=i);let o=Io(this.xmlLookupService.getChildByLocalName(e,"depthPercent"));o!==void 0&&(r.depthPercent=o);let a=Io(this.xmlLookupService.getChildByLocalName(e,"perspective"));a!==void 0&&(r.perspective=a);let s=Io(this.xmlLookupService.getChildByLocalName(e,"hPercent"));s!==void 0&&(r.hPercent=s);let l=Ny(this.xmlLookupService.getChildByLocalName(e,"rAngAx"));return l!==void 0&&(r.rAngAx=l),Object.keys(r).length>0?r:void 0}parseChartChrome(t){if(!t)return;let e={},r=this.xmlLookupService.getChildByLocalName(t,"autoTitleDeleted"),n=Ny(r);n!==void 0&&(e.autoTitleDeleted=n);let o=this.xmlLookupService.getChildByLocalName(t,"dispBlanksAs")?.["@_val"];if(o!=null){let f=String(o);(f==="gap"||f==="zero"||f==="span")&&(e.dispBlanksAs=f);}let a=this.xmlLookupService.getChildByLocalName(t,"showDLblsOverMax"),s=Ny(a);s!==void 0&&(e.showDLblsOverMax=s);let l=f=>this.compatibilityService.getXmlLocalName(f),c=s1(t,l,jU),d=gc(c,"dataDisplayOptions16",l),p=gc(d,"dispNaAsBlank",l),u=Ny(p);return u!==void 0&&(e.dispNaAsBlank=u),Object.keys(e).length>0?e:void 0}parseUserShapesXml(t){return t?this.xmlLookupService.getChildByLocalName(t,"userShapes")??void 0:void 0}parsePivotFmtsXml(t){return t?this.xmlLookupService.getChildByLocalName(t,"pivotFmts")??void 0:void 0}parseClrMapOvr(t){if(!t)return;let e=this.xmlLookupService.getChildByLocalName(t,"clrMapOvr");if(!e)return;let r={};for(let[n,i]of Object.entries(e))n.startsWith("@_")&&i!=null&&(r[n.slice(2)]=String(i));return Object.keys(r).length>0?r:void 0}};}}),HU,Wht,afe=T({"src/core/core/runtime/PptxHandlerRuntimeChartExternalData.ts"(){SM(),WJ(),ofe(),HU="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes",Wht=class extends Ght{async parseChartExternalData(t,e){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"externalData");if(!r)return;let n=String(r["@_r:id"]||r["@_id"]||"").trim();if(n.length===0)return;let i=this.xmlLookupService.getChildByLocalName(r,"autoUpdate"),o=r["@_autoUpdate"],a=i?.["@_val"]==="1"||i?.["@_val"]==="true"||o==="1"||o==="true"||false,s;try{let c=e.substring(0,e.lastIndexOf("/")+1),d=e.substring(e.lastIndexOf("/")+1),p=`${c}_rels/${d}.rels`,u=await this.zip.file(p)?.async("string");if(u){let h=this.parser.parse(u)?.Relationships;if(h?.Relationship){let g=Array.isArray(h.Relationship)?h.Relationship:[h.Relationship];for(let y of g)if(String(y?.["@_Id"]||"")===n){s=String(y?.["@_Target"]||"").trim()||void 0;break}}}}catch{}let l;if(s)try{let c=this.resolveImagePath(e,s);if(c.includes("embeddings/")&&c.endsWith(".xlsx")){let d=await this.zip.file(c)?.async("uint8array");d&&(l=d);}}catch{}return {relId:n,targetPath:s,autoUpdate:a,...l?{embeddedWorkbookData:l}:{}}}async parseEmbeddedWorkbook(t){if(t?.embeddedWorkbookData)try{return await w9t(t.embeddedWorkbookData)}catch{return}}async parseChartUserShapes(t,e){if(!t)return;let r=this.xmlLookupService.getChildByLocalName(t,"userShapes");if(!r)return;let n=String(r["@_r:id"]||r["@_id"]||"").trim(),i=await this.readChartRels(e),o=(n.length>0?i.find(a=>a.id===n):void 0)??i.find(a=>a.type===HU);if(o?.target)try{let a=this.resolveImagePath(e,o.target);if(a.length===0)return;let s=await this.zip.file(a)?.async("string");if(!s)return;let l=this.parser.parse(s);return XJ(l,this.xmlLookupService,{parseColor:(c,d)=>this.parseColor(c,d)})}catch{return}}async readChartRels(t){try{let e=t.substring(0,t.lastIndexOf("/")+1),r=t.substring(t.lastIndexOf("/")+1),n=`${e}_rels/${r}.rels`,i=await this.zip.file(n)?.async("string");if(!i)return [];let a=this.parser.parse(i)?.Relationships;return a?.Relationship?(Array.isArray(a.Relationship)?a.Relationship:[a.Relationship]).filter(l=>!!l).map(l=>({id:String(l["@_Id"]||"").trim(),type:String(l["@_Type"]||"").trim(),target:String(l["@_Target"]||"").trim()})):[]}catch{return []}}};}}),Vht,sfe=T({"src/core/core/runtime/PptxHandlerRuntimeChartColorStyle.ts"(){yQt(),afe(),Vht=class extends Wht{async parseChartStyleDefinitionPart(t){try{let r=(await this.readChartRels(t)).find(s=>s.type.endsWith("/chartStyle"));if(!r)return;let n=this.resolveImagePath(t,r.target),i=await this.zip.file(n)?.async("string");if(!i)return;let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"chartStyle")??o;return gQt(a,this.xmlLookupService,s=>this.resolveChartSchemeColor(s),s=>this.parseColor(s))}catch{return}}async parseChartColorStyle(t){try{let r=(await this.readChartRels(t)).find(d=>d.type.includes("chartColorStyle")||d.type.includes("chartColor"));if(!r)return;let n=this.resolveImagePath(t,r.target),i=await this.zip.file(n)?.async("string");if(!i)return;let o=this.parser.parse(i),a=this.xmlLookupService.getChildByLocalName(o,"colorStyle")??o,s=String(a["@_meth"]||"cycle").trim(),l=s==="withinLinear"||s==="acrossLinear"?s:"cycle",c=[];return this.collectColorStylePalette(a,c),c.length===0?void 0:{palette:c,method:l,partPath:n}}catch{return}}collectColorStylePalette(t,e){if(t)for(let[r,n]of Object.entries(t)){if(r.startsWith("@_"))continue;let i=this.compatibilityService.getXmlLocalName(r);if(i==="schemeClr"){let o=Array.isArray(n)?n:[n];for(let a of o){let s=this.resolveChartSchemeColor(a);s&&e.push(s);}}else if(i==="srgbClr"){let o=Array.isArray(n)?n:[n];for(let a of o){let s=String(typeof a=="object"&&a!==null?a["@_val"]:a??"").trim();s.length>0&&e.push(s.startsWith("#")?s:`#${s}`);}}}}resolveChartSchemeColor(t){if(!t)return;let e;if(typeof t=="string")e=t;else if(typeof t=="object"&&t!==null)e=String(t["@_val"]||"").trim();else return;if(e.length===0)return;let r=this.themeColorMap[e];if(r)return r.startsWith("#")?r:`#${r}`}};}}),UU,Yht,lfe=T({"src/core/core/runtime/PptxHandlerRuntimeChartParsing.ts"(){BZ(),xM(),Pat(),CJt(),A1(),Iat(),NJ(),pM(),nJ(),nv(),PJt(),OJt(),V1(),Bs(),$at(),Yat(),rR(),aQt(),mo(),c1(),sQt(),cQt(),uQt(),P1(),hQt(),sfe(),UU=new Set(["none","line","lineMarker","marker","smooth","smoothMarker"]),Yht=class extends Vht{async getChartDataForGraphicFrame(t,e){let r=this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(e,"graphic"),"graphicData"),n=this.xmlLookupService.getChildByLocalName(r,"chart"),i=String(n?.["@_r:id"]||"").trim();if(i.length===0)return;let o=await this.readXmlPartByRelationshipId(t,i);if(!o)return;let a=this.xmlLookupService.getChildByLocalName(o.xml,"chartSpace"),s=this.xmlLookupService.getChildByLocalName(a,"chart"),l=this.xmlLookupService.getChildByLocalName(s,"plotArea");if(!l)return;let c=this.parseClrMapOvr(a),d=this.currentSlideClrMapOverride;c&&(this.currentSlideClrMapOverride=c);try{let p=this.detectChartType(l),u={parseColor:(wt,re)=>this.parseColor(wt,re)},f=wt=>this.resolveThemeTypeface(wt)??wt,h=m9(a,this.xmlLookupService),g=F7t(l,this.xmlLookupService,u,wt=>this.compatibilityService.getXmlLocalName(wt),f),y=Object.keys(l).filter(wt=>this.compatibilityService.getXmlLocalName(wt).endsWith("Chart")),x=y[0];if(!x)return this.parseCxChart(l,p,a,s,o.partPath,i);let v=l[x],{categories:b,categoryLevels:S,series:w,filteredSeries:C,filteredSeriesTitle:_,filteredCategoryTitle:A}=this.parseAllChartContainers(l,y,p,g),k=y.flatMap(wt=>this.xmlLookupService.getChildrenArrayByLocalName(l[wt],"ser")).at(0),E=g.some(wt=>wt.axisType==="dateAx")?AJt(k,this.xmlLookupService):void 0;if(w.length===0)return;let I=this.xmlLookupService.getChildByLocalName(s,"title"),M=[];this.collectLocalTextValues(I,"t",M);let R=M[0]??this.resolveChartLinkedTitleText(I),O=pQt(I,this.xmlLookupService,{parseColor:(wt,re)=>this.parseColor(wt,re)}),B=this.extractChartStyle(a,s),F,D=this.xmlLookupService.getChildByLocalName(v,"grouping");if(D?.["@_val"]){let wt=String(D["@_val"]).trim();wt==="stacked"?F="stacked":wt==="percentStacked"?F="percentStacked":F="clustered";}let U=this.parseChartBoolVal(v,"varyColors"),j=this.parseChartNumberVal(v,"firstSliceAng"),z=this.parseChartNumberVal(v,"holeSize"),V=this.parseChartNumberVal(v,"gapWidth"),X=this.parseChartNumberVal(v,"overlap"),K=this.parseChartNumberVal(v,"gapDepth"),q=this.xmlLookupService.getChildByLocalName(v,"scatterStyle"),ot=String(q?.["@_val"]??"").trim(),J=UU.has(ot)?ot:void 0,dt,mt=this.xmlLookupService.getChildByLocalName(v,"barDir");mt?.["@_val"]!==void 0&&(dt=String(mt["@_val"]).trim()==="bar"?"bar":"col");let Tt=p==="bar3D"?g9(String(this.xmlLookupService.getChildByLocalName(v,"shape")?.["@_val"]??"").trim()):void 0,jt=p==="radar"?lQt(String(this.xmlLookupService.getChildByLocalName(v,"radarStyle")?.["@_val"]??"").trim()):void 0,vt=p==="surface"?this.parseChartBoolVal(v,"wireframe"):void 0,St=o.partPath,Xt=u7t(l,this.xmlLookupService,u,f),ue=pj(v,"dropLines",this.xmlLookupService,u),ee=pj(v,"hiLowLines",this.xmlLookupService,u),Pe=gXt(v,this.xmlLookupService,u),Sr=s?N7t(s,this.xmlLookupService,u):{},Qn=this.parsePlotVisOnly(s),ti=await this.parseChartExternalData(a,o.partPath),wr=await this.parseEmbeddedWorkbook(ti),wn=E?{...E,date1904:h.date1904??wr?.date1904??!1}:void 0,ul=b,ei=w;wr&&(ul.length===0&&wr.categories.length>0&&(ul=wr.categories),ei.every(re=>re.values.length===0)&&wr.series.length>0&&(ei=ei.map((re,_n)=>{let Kr=wr.series[_n];return Kr&&Kr.values.length>0?{...re,values:Kr.values}:re}))),ei.some(wt=>wt.picture||wt.impliedPicture||wt.dataPoints?.some(re=>re.picture||re.impliedPicture))&&await fQt(this.xmlLookupService,this.readChartRels.bind(this),this.resolveImagePath.bind(this),this.getImageDataAsDataUrl.bind(this),l,y,ei,St);let ri=this.parsePivotSource(a),Ke=await this.parseChartColorStyle(St),fl=await this.parseChartStyleDefinitionPart(St),Bi=p==="ofPie"?this.parseOfPieOptions(v):void 0,hl=p==="bubble"?dXt(v,wt=>this.compatibilityService.getXmlLocalName(wt)):void 0,$i=p==="surface"&&v?wJt(v,this.xmlLookupService,u):void 0,Ao=this.parseView3D(s),bd=this.parseChartChrome(s),Ca=dj(s,wt=>this.compatibilityService.getXmlLocalName(wt)),Tn=this.parseUserShapesXml(a),Le=await this.parseChartUserShapes(a,o.partPath),qt=l9(s,wt=>this.compatibilityService.getXmlLocalName(wt),{parseColor:(wt,re)=>this.parseColor(wt,re)}),Nr=p9(a,wt=>this.compatibilityService.getXmlLocalName(wt)),Cn=f9(a,wt=>this.compatibilityService.getXmlLocalName(wt));return {chartType:p,categories:ul,...S?{categoryLevels:S}:{},...wn?{dateCategories:wn}:{},series:ei,...C?{filteredSeries:C}:{},..._?{filteredSeriesTitle:_}:{},...A?{filteredCategoryTitle:A}:{},title:R,...O?{titleRuns:O}:{},style:B,grouping:F,...U!==void 0?{varyColors:U}:{},...j!==void 0?{firstSliceAngle:j}:{},...z!==void 0?{doughnutHoleSize:z}:{},...V!==void 0?{barGapWidth:V}:{},...X!==void 0?{barOverlap:X}:{},...dt!==void 0?{barDirection:dt}:{},...Tt!==void 0?{barShape:Tt}:{},...jt!==void 0?{radarStyle:jt}:{},...vt!==void 0?{wireframe:vt}:{},...J!==void 0?{scatterStyle:J}:{},chartPartPath:St,chartRelationshipId:i,...Xt?{dataTable:Xt}:{},...ue?{dropLines:ue}:{},...ee?{hiLowLines:ee}:{},...Pe?{upDownBars:Pe}:{},...g.length>0?{axes:g}:{},...Sr.floor?{floor:Sr.floor}:{},...Sr.sideWall?{sideWall:Sr.sideWall}:{},...Sr.backWall?{backWall:Sr.backWall}:{},...$i?{bandFmts:$i}:{},...ti?{externalData:ti}:{},...wr?{embeddedWorkbookData:wr}:{},...Qn!==void 0?{plotVisibleOnly:Qn}:{},...ri?{pivotSource:ri}:{},...Ke?.palette?{colorPalette:Ke.palette}:{},...Ke?.method?{colorMethod:Ke.method}:{},...Ke?{colorStylePartPath:Ke.partPath,colorStyleOriginalPalette:[...Ke.palette],colorStyleOriginalMethod:Ke.method}:{},...Bi?{ofPieOptions:Bi}:{},...hl?{bubbleOptions:hl}:{},...Ao?{view3D:Ao}:{},...bd?{chartChrome:bd}:{},...Ca?{layouts:Ca}:{},...Tn?{userShapesXml:Tn}:{},...Le?{userShapes:Le}:{},...qt?{pivotFormats:qt}:{},...c?{clrMapOvr:c}:{},...Nr?{printSettings:Nr}:{},...Cn?{protection:Cn}:{},...h.date1904!==void 0?{date1904:h.date1904}:{},...h.roundedCorners!==void 0?{roundedCorners:h.roundedCorners}:{},...K!==void 0?{gapDepth:K}:{},...fl?{chartStyleDefinition:fl}:{}}}finally{this.currentSlideClrMapOverride=d;}}parseAllChartContainers(t,e,r,n){let i=r==="combo",o=[],a,s=[],l,c,d;for(let p of e){let u=t[p],f=this.xmlLookupService.getChildrenArrayByLocalName(u,"ser"),h=tR(u,this.xmlLookupService);h&&(l=[...l??[],...h]);let g=FJt(u,this.xmlLookupService);if(g?.seriesTitle&&c===void 0&&(c=g.seriesTitle),g?.categoryTitle&&d===void 0&&(d=g.categoryTitle),f.length===0)continue;if(o.length===0){let b=this.xmlLookupService.getChildByLocalName(f[0],"cat"),S=this.extractChartCategoryLevels(b),w=S?S.categories:this.extractChartCategoryValues(b,false),C=S||w.length?[]:this.extractChartCategoryValues(b,true);o=w.length?w:C.length?C:this.extractChartCategoryValues(this.xmlLookupService.getChildByLocalName(f[0],"xVal"),false),S?.categoryLevels&&(a=S.categoryLevels);}let y=_Jt(this.compatibilityService.getXmlLocalName(p)),x=i?y:void 0,v=oQt(u,n??[],this.xmlLookupService);s.push(...this.buildChartSeries(f,o,x,v,y));}return {categories:o,...a?{categoryLevels:a}:{},series:s,...l?{filteredSeries:l}:{},...c?{filteredSeriesTitle:c}:{},...d?{filteredCategoryTitle:d}:{}}}resolveChartLinkedTitleText(t){let e=this.xmlLookupService.getChildByLocalName(t,"tx");return this.extractChartPointValues(e,false)[0]?.trim()||void 0}parseChartNumberVal(t,e){let n=this.xmlLookupService.getChildByLocalName(t,e)?.["@_val"];if(n==null||n==="")return;let i=Number.parseFloat(String(n));return Number.isFinite(i)?i:void 0}parseChartBoolVal(t,e){let r=this.xmlLookupService.getChildByLocalName(t,e);if(!r)return;let n=r["@_val"];return n==null||n===""?true:!(n==="0"||n==="false")}buildChartSeries(t,e,r,n,i){return t.map((o,a)=>{let s=this.extractChartSeriesName(o),l=this.xmlLookupService.getChildByLocalName(o,"idx")?.["@_val"],c=l!==void 0?Number.parseInt(String(l),10):Number.NaN,d=Number.isFinite(c)?c:void 0,p=this.xmlLookupService.getChildByLocalName(o,"val")||this.xmlLookupService.getChildByLocalName(o,"yVal"),u=CC(p,this.xmlLookupService),f=u.some(J=>J===null),h=f?u.map(J=>J??0):this.extractChartPointValues(p,true).map(J=>Number.parseFloat(J)).filter(J=>Number.isFinite(J)),g=f?u.map(J=>J===null):void 0,y=String(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(o,"dLbls"),"numFmt")?.["@_formatCode"]??"").trim()||String(this.xmlLookupService.getScalarChildByLocalName(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(p,"numRef")??p,"numCache"),"formatCode")??"").trim(),x=this.xmlLookupService.getChildByLocalName(o,"spPr"),v=lP(i),b=this.parseColor(this.xmlLookupService.getChildByLocalName(x,"solidFill"))??(v?this.parseColor(this.xmlLookupService.getChildByLocalName(this.xmlLookupService.getChildByLocalName(x,"ln"),"solidFill")):void 0),S=h.length>0?h:e.map((J,dt)=>dt+1+a),w={parseColor:(J,dt)=>this.parseColor(J,dt)},C=qjt(o,this.xmlLookupService,w),_=Zjt(o,this.xmlLookupService,this.extractChartPointValues.bind(this),w),A=d7t(o,this.xmlLookupService,w),k=tJ(this.xmlLookupService.getChildByLocalName(o,"marker"),this.xmlLookupService,w),E=A7t(o,this.xmlLookupService,w,J=>this.resolveThemeTypeface(J)??J),I=p7t(o,this.xmlLookupService),M=cM(o,J=>this.compatibilityService.getXmlLocalName(J)),R=$Z(o,this.xmlLookupService),O=R?void 0:HZ(o,this.xmlLookupService),B=CC(this.xmlLookupService.getChildByLocalName(o,"xVal"),this.xmlLookupService).map(J=>J??Number.NaN),F=CC(this.xmlLookupService.getChildByLocalName(o,"bubbleSize"),this.xmlLookupService).map(J=>J??0),D=this.xmlLookupService.getChildByLocalName(o,"dLbls"),U=D?uJ(D,this.xmlLookupService,w,J=>this.resolveThemeTypeface(J)??J):void 0,j=this.xmlLookupService.getChildByLocalName(x,"ln"),z=j?Object.keys(j).some(J=>this.compatibilityService.getXmlLocalName(J)==="noFill"):false,V=this.xmlLookupService.getChildByLocalName(o,"smooth"),X=V?!(V["@_val"]==="0"||V["@_val"]==="false"):void 0,K=this.xmlLookupService.getChildByLocalName(o,"invertIfNegative"),q=K?!(K["@_val"]==="0"||K["@_val"]==="false"):void 0,ot=i==="bar3D"?g9(String(this.xmlLookupService.getChildByLocalName(o,"shape")?.["@_val"]??"").trim()):void 0;return {name:s.trim().length>0?s:`Series ${a+1}`,...d!==void 0?{idx:d}:{},values:S,...g?{blanks:g}:{},...B.length>0?{xValues:B}:{},...F.length>0?{bubbleSizes:F}:{},...U&&Object.keys(U).length>0?{dataLabelOptions:U}:{},...z?{lineNoFill:z}:{},...y?{numberFormat:y}:{},color:b,...C.length>0?{trendlines:C}:{},..._.length>0?{errBars:_}:{},...A.length>0?{dataPoints:A}:{},...k?{marker:k}:{},...E.length>0?{dataLabels:E}:{},...I!==void 0?{explosion:I}:{},...R?{picture:R}:{},...O?{impliedPicture:O}:{},...q!==void 0?{invertIfNegative:q}:{},...X!==void 0?{smooth:X}:{},...n!==void 0?{axisId:n}:{},...r?{seriesChartType:r}:{},...ot!==void 0?{shape:ot}:{},...M!==void 0?{uniqueId:M}:{}}})}async parseCxChart(t,e,r,n,i,o){let a=s9t(t,this.xmlLookupService,r,n,{parseColor:(M,R)=>this.parseColor(M,R)},M=>this.resolveThemeTypeface(M)??M);if(!a)return;let s=a.chartData,l=this.xmlLookupService.getChildByLocalName(n,"title"),c=[];this.collectLocalTextValues(l,"t",c);let d=s?.title??c[0]??this.resolveChartLinkedTitleText(l),p=this.extractChartStyle(r,n);a.hasDataLabels&&p&&(p.hasDataLabels=true);let u=this.parsePlotVisOnly(n),f=await this.parseChartExternalData(r,i),h=await this.parseEmbeddedWorkbook(f),g=this.parsePivotSource(r),y=await this.parseChartColorStyle(i),x=await this.parseChartStyleDefinitionPart(i),v=m9(r,this.xmlLookupService),b=this.parseView3D(n),S=this.parseChartChrome(n),w=dj(n,M=>this.compatibilityService.getXmlLocalName(M)),C=this.parseUserShapesXml(r),_=await this.parseChartUserShapes(r,i),A=l9(n,M=>this.compatibilityService.getXmlLocalName(M),{parseColor:(M,R)=>this.parseColor(M,R)}),k=this.parseClrMapOvr(r),E=p9(r,M=>this.compatibilityService.getXmlLocalName(M)),I=f9(r,M=>this.compatibilityService.getXmlLocalName(M));return {chartType:e,categories:a.categories,...a.categoryLevels?{categoryLevels:a.categoryLevels}:{},series:a.series,title:d,style:p,chartPartPath:i,chartRelationshipId:o,...f?{externalData:f}:{},...h?{embeddedWorkbookData:h}:{},...u!==void 0?{plotVisibleOnly:u}:{},...g?{pivotSource:g}:{},...y?.palette?{colorPalette:y.palette}:{},...y?.method?{colorMethod:y.method}:{},...y?{colorStylePartPath:y.partPath,colorStyleOriginalPalette:[...y.palette],colorStyleOriginalMethod:y.method}:{},...b?{view3D:b}:{},...S?{chartChrome:S}:{},...w?{layouts:w}:{},...C?{userShapesXml:C}:{},..._?{userShapes:_}:{},...A?{pivotFormats:A}:{},...k?{clrMapOvr:k}:{},...E?{printSettings:E}:{},...I?{protection:I}:{},...v.date1904!==void 0?{date1904:v.date1904}:{},...v.roundedCorners!==void 0?{roundedCorners:v.roundedCorners}:{},...x?{chartStyleDefinition:x}:{},...s??{}}}};}}),Kht,cfe=T({"src/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts"(){FM(),Jm(),_at(),lfe(),Kht=class extends Yht{parseEditorAnimations(t){return this.editorAnimationService.parseEditorAnimations(t)}parseSlideTransition(t,e){let r=this.slideTransitionService.parseSlideTransition(t);if(!r||!e||!r.soundRId)return r;let i=this.slideRelsMap.get(e)?.get(r.soundRId);if(i){let o=this.resolveImagePath(e,i);r.soundPath=o,r.soundFileName=o.split("/").pop()||o;}return r}extractSectionMap(){return Zm(this.presentationData,this.xmlLookupService)}extractHeaderFooter(){let t=this.firstSlideMasterRoot();if(!t)return;let e=Tat(t);return Object.keys(e).length>0?e:void 0}firstSlideMasterRoot(){let t=Array.from(this.masterXmlMap.keys()).sort((e,r)=>e.localeCompare(r));for(let e of t){let r=this.masterXmlMap.get(e)?.["p:sldMaster"];if(typeof r=="object"&&r!==null)return r}}extractPhotoAlbum(){let t=this.presentationData?.["p:presentation"];if(!t)return;let e=t["p:photoAlbum"];if(!e)return;let r={},n=false,i=e["@_bw"];i!==void 0&&(r.bw=String(i)==="1"||String(i)==="true",n=true);let o=e["@_showCaptions"];o!==void 0&&(r.showCaptions=String(o)==="1"||String(o)==="true",n=true);let a=e["@_layout"];if(a!==void 0){let c=String(a).trim();c.length>0&&(r.layout=c,n=true);}let s=e["@_frame"];if(s!==void 0){let c=String(s).trim();c.length>0&&(r.frame=c,n=true);}let l=e["@_isPhoto"];return l!==void 0&&(r.isPhoto=String(l)==="1"||String(l)==="true",n=true),n?r:{}}extractModifyVerifier(){let t=this.presentationData?.["p:presentation"];if(!t)return;let e=t["p:modifyVerifier"];if(!e)return;let r={},n=e["@_algorithmName"]??e["@_algIdExt"];n!==void 0&&(r.algorithmName=String(n));let i=e["@_hashData"];i!==void 0&&(r.hashData=String(i));let o=e["@_saltData"];o!==void 0&&(r.saltData=String(o));let a=e["@_spinValue"]??e["@_spinCount"];if(a!==void 0){let f=parseInt(String(a),10);Number.isFinite(f)&&(r.spinValue=f);}let s=e["@_algIdExt"];s!==void 0&&(r.algIdExt=String(s));let l=e["@_cryptAlgorithmSid"];if(l!==void 0){let f=parseInt(String(l),10);Number.isFinite(f)&&(r.cryptAlgorithmSid=f);}let c=e["@_cryptAlgorithmType"];c!==void 0&&(r.cryptAlgorithmType=String(c));let d=e["@_cryptProvider"];d!==void 0&&(r.cryptProvider=String(d));let p=e["@_cryptProviderType"];p!==void 0&&(r.cryptProviderType=String(p));let u=e["@_cryptAlgorithmClass"];return u!==void 0&&(r.cryptAlgorithmClass=String(u)),r}extractKinsoku(){return dHt(this.presentationData??void 0)}extractEmbedTrueTypeFonts(){let e=this.presentationData?.["p:presentation"]?.["@_embedTrueTypeFonts"];if(e===void 0)return;let r=String(e).trim().toLowerCase();return r!=="0"&&r!=="false"}};}}),qht,dfe=T({"src/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts"(){hJt(),Ds(),qM(),Ps(),Pt(),cfe(),qht=class extends Kht{async getEmbeddedFonts(t){if(!t||t.fonts.length===0)return [];let e=await this.loadPresentationFontRels();if(e.size===0)return [];let r=[];for(let n of t.fonts){let i=(n.font.typeface||"").trim();if(!i)continue;let o=[{data:n.regular,bold:false,italic:false},{data:n.bold,bold:true,italic:false},{data:n.italic,bold:false,italic:true},{data:n.boldItalic,bold:true,italic:true}];for(let a of o){if(!a.data)continue;let s=String(a.data.relationshipId||"").trim();if(!s)continue;let l=String(a.data.rawXml?.["@_fontKey"]||"").trim()||void 0,c=await this.extractEmbeddedFontVariant(i,s,a.bold,a.italic,e,l);c&&r.push(c);}}return r}async loadPresentationFontRels(){let t=new Map;try{let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return t;let r=this.parser.parse(e),n=this.ensureArray(Q(r,"Relationships")?.Relationship);for(let i of n){if(!String(i?.["@_Type"]||"").includes("/font"))continue;let a=String(i?.["@_Id"]||""),s=String(i?.["@_Target"]||"");a&&s&&t.set(a,s.startsWith("/")?s.substring(1):`ppt/${s}`);}}catch{}return t}async extractEmbeddedFontVariant(t,e,r,n,i,o){let a=i.get(e);if(!a)return null;try{let s=await this.zip.file(a)?.async("uint8array");if(!s||s.length===0)return null;let l=new Uint8Array(s),c,d;if(gat(s)){let _=fJt(s);if(_)c=_.fontData;else {let A=yat(s);return console.info(`[pptx-viewer] Embedded font "${t}" uses EOT format${A?.isCompressed?" with MTX compression":""} \u2014 extraction failed, will use web font fallback`),null}}else {let _=o?J8(o)??o.replace(/[{}]/g,"").trim():null,A=J8(a),k=_||A;if(k)c=Jb(s,k),d=k;else return console.warn(`[pptx-viewer] Embedded font "${t}" at "${a}" has no fontKey attribute and no GUID in filename \u2014 skipping`),null}if(c.length<4)return null;let p=c[0],u=c[1],f=c[2],h=c[3];if(!(p===0&&u===1&&f===0&&h===0||p===79&&u===84&&f===84&&h===79||p===116&&u===116&&f===99&&h===102||p===119&&u===79&&f===70&&(h===70||h===50)))return console.warn(`[pptx-viewer] Embedded font "${t}" has invalid sfnt header [${p.toString(16)},${u.toString(16)},${f.toString(16)},${h.toString(16)}] after processing \u2014 skipping (web font fallback will be used)`),null;let b=Aq(c),S=b==="woff2"?"font/woff2":b==="woff"?"font/woff":b==="opentype"?"font/otf":"font/ttf",w=this.uint8ArrayToBase64(c),C=`data:${S};base64,${w}`;return {name:t,dataUrl:C,bold:r,italic:n,format:b,rawFontData:c,partPath:a,fontGuid:d,originalRId:e,originalPartBytes:l}}catch{return null}}uint8ArrayToBase64(t){let e="";for(let n=0;n<t.length;n+=8192){let i=t.subarray(n,Math.min(n+8192,t.length));for(let o=0;o<i.length;o++)e+=String.fromCharCode(i[o]);}return btoa(e)}getLayoutOptions(){let t=[];for(let[e,r]of this.layoutXmlMap.entries()){let n=r["p:sldLayout"],i=(_t(Q(n,"p:cSld"),"name")||"").trim(),o=n?.["@_type"]!==void 0?String(n["@_type"]).trim():void 0,a=ztt({name:i,type:o,path:e}),s=this.resolveMasterPathForLayout(e);t.push({path:e,name:a,...o?{type:o}:{},...s?{masterPath:s}:{}});}return t}resolveMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e){for(let[,r]of e.entries())if(r.includes("slideMaster")){let n=t.substring(0,t.lastIndexOf("/")+1);if(r.startsWith("..")){let i=(n+r).split("/"),o=[];for(let a of i)a===".."?o.pop():a&&a!=="."&&o.push(a);return o.join("/")}return `ppt/${hr(r)}`}}}};}}),zU,Zht,pfe=T({"src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts"(){aa(),wm(),iM(),mat(),F1(),dfe(),zU=25*1024*1024,Zht=class Xk extends qht{isZipContainer(e){let r=new Uint8Array(e);return r.byteLength<4?false:r[0]===80&&r[1]===75&&(r[2]===3&&r[3]===4||r[2]===5&&r[3]===6||r[2]===7&&r[3]===8)}async initializeLoadSession(e,r){if(this.eagerDecodeImages=r.eagerDecodeImages??false,this.allowExternalImages=r.allowExternalImages===true,e.byteLength<4)throw new Error("Invalid PPTX binary: file is empty or truncated.");if(!this.isZipContainer(e))throw new Error("Invalid PPTX binary: not a ZIP/OpenXML package. The file is neither an OpenXML archive nor an OLE compound file (which is how legacy .ppt and encrypted presentations arrive), so it is most likely corrupt, truncated, or not a presentation at all.");try{this.zip=await pn__default.default.loadAsync(e),this.documentPropertiesUpdater=this.dependencyFactory.createDocumentPropertiesUpdater(this.zip,this.parser,this.builder);}catch(a){let s=a instanceof Error?a.message:"Unable to read zip container.";throw new Error(`Invalid PPTX package: ${s}`,{cause:a})}let n=typeof r.maxUncompressedBytes=="number"&&r.maxUncompressedBytes>0?r.maxUncompressedBytes:hat,i=0,o=0;for(let a of Object.keys(this.zip.files)){if(o+=1,o>cx)throw new sP(`PPTX archive contains more than ${cx} entries \u2014 refusing to load.`,{limit:cx,entryCount:o});let s=this.zip.files[a],l=Number(s?._data?.uncompressedSize??0);if(Number.isFinite(l)&&l>0&&(i+=l,i>n))throw new sP(`PPTX archive uncompressed size exceeds ${n} bytes (zip-bomb guard).`,{uncompressedBytes:i,limit:n})}if(this.slideRelsMap.clear(),this.externalRelsMap.clear(),this.slideMap.clear(),this.savedSlideFingerprints.clear(),this.layoutCache.clear(),this.masterCache.clear(),this.templateElementBaselines.reset(),this.layoutXmlMap.clear(),this.masterXmlMap.clear(),this.masterTxStylesCache.clear(),typeof globalThis.URL?.revokeObjectURL=="function"&&this.blobUrlCache.size>0){for(let a of this.blobUrlCache)URL.revokeObjectURL(a);this.blobUrlCache.clear();}this.imageDataCache.clear(),this.themeColorMap={},this.themeFontMap={},this.masterClrMaps.clear(),this.masterThemeColorMaps.clear(),this.masterThemeFontMaps.clear(),this.masterThemeFormatSchemes.clear(),this.masterThemePaths.clear(),this.masterThemeMajorFontScripts.clear(),this.masterThemeMinorFontScripts.clear(),this.masterThemeNames.clear(),this.masterThemeFontSchemeNames.clear(),this.masterThemeColorSchemeNames.clear(),this.originalThemeXmlByPath.clear(),this.dirtyThemePaths.clear(),this.masterThemeObjectDefaults.clear(),this.masterThemeExtraClrSchemeLst.clear(),this.masterThemeCustClrLst.clear(),this.masterThemeExtLst.clear(),this.currentMasterClrMap=null,this.presentationDefaultTextStyle=void 0,this.commentAuthorMap.clear(),this.commentAuthorDetails.clear(),this.modernCommentAuthors.clear(),this.modernCommentAuthorsRootXml=void 0,this.modernCommentAuthorsPartPath=void 0,this.modernCommentAuthorsRelationshipId=void 0,this.modernCommentParts.clear(),this.thumbnailData=null,this.vbaProjectBin=null,this.vbaRelatedParts.clear(),this.signatureDetection=null,this.customXmlParts=[],this.loadedEmbeddedFonts=[],this.loadedEmbeddedFontList=void 0,this.isStrictOoxml=false,this.restoreOriginalParser(),this.compatibilityService.resetWarnings();}async detectAndPreserveVbaProject(){let e=this.zip.file("ppt/vbaProject.bin");if(!e)return;this.vbaProjectBin=await e.async("uint8array");let r=["ppt/vbaData.xml","ppt/_rels/vbaProject.bin.rels"];for(let n of r){let i=this.zip.file(n);if(i){let o=await i.async("uint8array");this.vbaRelatedParts.set(n,o);}}}detectDigitalSignatureParts(){let e=[];this.zip.forEach(r=>{e.push(r);}),this.signatureDetection=_jt(e);}async parseCustomXmlParts(){let e=[],r=/^customXml\/item(?<index>\d+)\.xml$/iu,n=[];this.zip.forEach(i=>{n.push(i);});for(let i of n){let o=i.match(r);if(!o)continue;let a=o[1],s=this.zip.file(i);if(!s)continue;let l=await s.async("string"),c=`customXml/itemProps${a}.xml`,d=this.zip.file(c),p,u;if(d){p=await d.async("string");try{let x=this.parser.parse(p)?.["ds:datastoreItem"]?.["ds:schemaRefs"]?.["ds:schemaRef"];if(x){let b=(Array.isArray(x)?x:[x])[0];b?.["@_ds:uri"]?u=String(b["@_ds:uri"]):b?.["@_uri"]&&(u=String(b["@_uri"]));}}catch{}}let f=`customXml/_rels/item${a}.xml.rels`,h=this.zip.file(f),g;h&&(g=await h.async("string")),e.push({id:a,data:l,schemaUri:u,properties:p,rels:g});}this.customXmlParts=e;}async loadPresentationState(){let e=await this.zip.file("ppt/presentation.xml")?.async("string");if(!e)throw new Error("Invalid PPTX: presentation.xml not found");this.presentationData=this.parser.parse(e),this.detectAndSetStrictConformance(this.presentationData),await this.loadThemeData(),this.parsePresentationDefaultTextStyle(),await this.loadCommentAuthors(),await this.loadModernCommentAuthors();let{sectionBySlideId:r,orderedSections:n}=this.extractSectionMap();this.compatibilityService.inspectPresentationCompatibility(this.presentationData??void 0);let i=this.presentationData?.["p:presentation"],o=i?.["p:sldSz"]||{};this.rawSlideWidthEmu=parseInt(String(o["@_cx"]))||0,this.rawSlideHeightEmu=parseInt(String(o["@_cy"]))||0;let a=o["@_type"];a&&(this.rawSlideSizeType=a);let s=i?.["p:notesSz"]||{},l=parseInt(String(s["@_cx"]))||0,c=parseInt(String(s["@_cy"]))||0,d=Math.round(this.rawSlideWidthEmu/Xk.EMU_PER_PX),p=Math.round(this.rawSlideHeightEmu/Xk.EMU_PER_PX);return {width:d,height:p,notesWidthEmu:l,notesHeightEmu:c,sectionBySlideId:r,orderedSections:n}}async enrichOleElementsWithEmbeddedData(e,r,n=0){if(!(n>32))for(let o of e){if(o.type==="group"&&o.children){await this.enrichOleElementsWithEmbeddedData(o.children,r,n+1);continue}if(o.type==="ole"){if(o.previewImage&&!o.previewImageData)try{let a=this.resolveImagePath(r,o.previewImage);if(a){let s=await this.getImageData(a);s&&(o.previewImageData=s);}}catch{}if(!(o.isLinked||!o.oleTarget))try{let a=this.resolveImagePath(r,o.oleTarget);if(!a)continue;let s=this.zip.file(a);if(!s)continue;let l=await s.async("arraybuffer");if(l.byteLength===0||l.byteLength>zU)continue;let c=kFt(new Uint8Array(l));if(c.data.length===0)continue;let d=c.fileName??o.fileName??(o.oleName&&o.oleFileExtension?`${o.oleName}.${o.oleFileExtension}`:void 0),p=IE(d??`x.${o.oleFileExtension??"bin"}`);o.oleEmbeddedData=Xa(c.data,p),o.oleEmbeddedByteSize=c.data.length,o.oleEmbeddedMimeType=p,d&&(o.oleEmbeddedFileName=d);}catch{}}}}async loadSlidesForPresentation(e){return this.presentationData?this.slideLoaderService.loadSlides({presentationData:this.presentationData,parser:this.parser,zip:this.zip,compatibilityService:this.compatibilityService,slideMap:this.slideMap,sectionBySlideId:e,setOrderedSlidePaths:r=>{this.orderedSlidePaths=r;},loadSlideRelationships:(r,n)=>this.loadSlideRelationships(r,n),parseSlideClrMapOverride:r=>this.parseSlideClrMapOverride(r),setCurrentSlideClrMapOverride:r=>{this.currentSlideClrMapOverride=r;},setActiveMasterForSlide:r=>this.setActiveMasterForSlide(r),findLayoutPathForSlide:r=>this.findLayoutPathForSlide(r),loadThemeOverride:r=>this.loadThemeOverride(r),applyThemeOverrideState:r=>this.applyThemeOverrideState(r),getLayoutElements:r=>this.getLayoutElements(r),parseSlide:(r,n)=>this.parseSlide(r,n),extractMediaTimingMap:(r,n)=>this.extractMediaTimingMap(r,n),enrichMediaElementsWithTiming:(r,n)=>this.enrichMediaElementsWithTiming(r,n),enrichOleElementsWithEmbeddedData:(r,n)=>this.enrichOleElementsWithEmbeddedData(r,n),extractBackgroundColor:r=>this.extractBackgroundColor(r),extractOwnBackgroundNode:r=>this.extractOwnBackgroundNode(r),getLayoutBackgroundColor:r=>this.getLayoutBackgroundColor(r),extractBackgroundGradient:r=>this.extractBackgroundGradient(r),getLayoutBackgroundGradient:r=>this.getLayoutBackgroundGradient(r),extractBackgroundImage:(r,n)=>this.extractBackgroundImage(r,n),extractBackgroundImageProperties:(r,n)=>this.extractBackgroundImageProperties(r,n),getLayoutBackgroundImage:r=>this.getLayoutBackgroundImage(r),getLayoutBackgroundImageProperties:r=>this.getLayoutBackgroundImageProperties(r),rememberSlideBackgroundOrigin:(r,n)=>Mrt(this,r,n),extractSlideNotes:r=>this.extractSlideNotes(r),extractSlideComments:r=>this.extractSlideComments(r),extractModernSlideComments:r=>this.extractModernSlideComments(r),getModernCommentPart:r=>this.modernCommentParts.get(r),extractBackgroundPattern:r=>this.extractBackgroundPattern(r),extractBackgroundShadeToTitle:r=>this.extractBackgroundShadeToTitle(r),extractBackgroundShowAnimation:r=>this.extractBackgroundShowAnimation(r),extractShowMasterShapes:r=>this.extractShowMasterShapes(r),extractShowMasterPhAnim:r=>this.extractShowMasterPhAnim(r),isSlideHidden:(r,n)=>this.isSlideHidden(r,n),parseSlideTransition:(r,n)=>this.parseSlideTransition(r,n),parseEditorAnimations:r=>this.parseEditorAnimations(r),parseNativeAnimations:(r,n)=>this.parseNativeAnimations(r,n),getSmartArtDataForGraphicFrame:(r,n)=>this.getSmartArtDataForGraphicFrame(r,n),getChartDataForGraphicFrame:(r,n)=>this.getChartDataForGraphicFrame(r,n),parseSlideCustomerData:(r,n)=>this.parseSlideCustomerData(r,n),parseSlideActiveXControls:r=>this.parseSlideActiveXControls(r)}):[]}};}}),Jht,ufe=T({"src/core/core/runtime/PptxHandlerRuntimeLoadPipeline.ts"(){dat(),fat(),h1(),qM(),iu(),BQ(),Ps(),Nc(),F1(),pJt(),pfe(),rL(),Jht=class extends Zht{async buildLoadData(t,e,r){let n=this.extractHeaderFooter(),i=await this.parsePresentationProperties(),o=await this.parseViewProperties();this.loadedViewProperties=o;let a=this.parseCustomShows(),s=await this.parseTableStyles(),l=this.loadedTableStylesDefaultId,c=oJt(this.presentationData),d=await this.getEmbeddedFonts(c);this.loadedEmbeddedFonts=d,this.loadedEmbeddedFontList=c;let p=await this.parseThemeOptions(),u=await this.parseNotesMaster(),f=await this.parseHandoutMaster(),h=i?.printProperties?.printWhat?.match(/^handouts([123469])$/u);f&&h&&(f.slidesPerPage=Number.parseInt(h[1],10)),await this.enrichAuxiliaryMasterElements(u,"p:notesMaster"),await this.enrichAuxiliaryMasterElements(f,"p:handoutMaster"),await this.enrichSlideMasterElements(r);let g=await this.parseTags(),y=await this.parseCustomProperties(),x=await this.parseCoreProperties(),v=await this.parseAppProperties(),b=this.presentationData?P9t(this.presentationData):[],S=this.extractPhotoAlbum(),w=this.extractModifyVerifier(),C=this.extractKinsoku(),_=await mHt(this.zip,I=>this.parser.parse(I),this.presentationData),A=await this.parsePresentationCustomerData();this.thumbnailData=await this.parseThumbnail()??null;let k=this.extractEmbedTrueTypeFonts(),E=this.presentationDefaultTextStyle?.levelStyles;return new Wnt().withDimensions(t.width,t.height,this.rawSlideWidthEmu,this.rawSlideHeightEmu).withNotesDimensions(t.notesWidthEmu,t.notesHeightEmu).withSlides(e).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(n).withPresentationProperties(i).withViewProperties(o).withCustomShows(a).withSections(t.orderedSections.length>0?t.orderedSections:void 0).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({...this.themeColorMap}).withTheme(this.buildThemeObject()).withThemeOptions(p.length>0?p:void 0).withTableStyleMap(s).withTableStylesDefaultId(l).withEmbeddedFonts(d.length>0?d:void 0).withEmbeddedFontList(c).withMruColors(i?.mruColors).withNotesMaster(u).withHandoutMaster(f).withSlideMasters(r.length>0?r:void 0).withTags(g.length>0?g:void 0).withCustomProperties(y.length>0?y:void 0).withCoreProperties(x).withAppProperties(v).withHasMacros(this.vbaProjectBin!==null?true:void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures||void 0).withDigitalSignatureCount(this.signatureDetection?.signatureCount&&this.signatureDetection.signatureCount>0?this.signatureDetection.signatureCount:void 0).withPresentationGuides(b.length>0?b:void 0).withPhotoAlbum(S).withKinsoku(C).withModifyVerifier(w).withSmartTags(_).withCustomXmlParts(this.customXmlParts.length>0?this.customXmlParts:void 0).withCustomerData(A.length>0?A:void 0).withSlideSizeType(this.rawSlideSizeType).withThumbnailData(this.thumbnailData??void 0).withCommentAuthors(this.commentAuthorDetails.size>0?Array.from(this.commentAuthorDetails.values()):void 0).withModernCommentAuthors(this.modernCommentAuthors.size>0?Array.from(this.modernCommentAuthors.values()):void 0).withConformance(this.isStrictOoxml?"strict":"transitional").withEmbedTrueTypeFonts(k).withDefaultTextStyle(E).build()}findMaxElementId(t){let r=0,n=[];for(let o of t)n.push(o.rawXml);let i=0;for(;n.length>0&&!(i++>1e6);){let o=n.pop();if(o==null||typeof o!="object")continue;if(Array.isArray(o)){for(let s of o)s!=null&&typeof s=="object"&&n.push(s);continue}let a=o;if("@_id"in a){let s=parseInt(String(a["@_id"]),10);Number.isFinite(s)&&s>r&&(r=s);}for(let s of Object.values(a))s!=null&&(Array.isArray(s)||typeof s=="object")&&n.push(s);}return r}resetElementIdCounter(t){let e=this.findMaxElementId(t);this.elementXmlBuilder.resetIdCounter(e+1);}attachSlideWarnings(t){let e=this.compatibilityService.getWarnings(),r=new Map;for(let n of e){if(!n.slideId)continue;let i=r.get(n.slideId);i?i.push(n):r.set(n.slideId,[n]);}return t.map(n=>({...n,warnings:r.get(n.id)??[]}))}revokeBlobUrls(){if(typeof globalThis.URL?.revokeObjectURL=="function"&&this.blobUrlCache.size>0){for(let t of this.blobUrlCache)URL.revokeObjectURL(t);this.blobUrlCache.clear();}}dispose(){this.revokeBlobUrls(),this.imageDataCache.clear(),this.slideMap.clear(),this.savedSlideFingerprints.clear(),this.slideRelsMap.clear(),this.externalRelsMap.clear(),this.layoutCache.clear(),this.masterCache.clear(),this.templateElementBaselines.reset(),this.layoutXmlMap.clear(),this.masterXmlMap.clear(),this.masterTxStylesCache.clear(),this.layoutPlaceholderDefaultsCache.clear(),this.masterPlaceholderDefaultsCache.clear(),this.themeOverrideCache.clear(),this.commentAuthorMap.clear(),this.commentAuthorDetails.clear(),this.vbaRelatedParts.clear(),this.presentationData=null,this.thumbnailData=null,this.vbaProjectBin=null,this.customXmlParts=[],this.loadedEmbeddedFonts=[],this.loadedEmbeddedFontList=void 0,this.loadedViewProperties=void 0,this.loadedTableStylesDefaultId=void 0,this.orderedSlidePaths=[],this.zip=null;}async load(t,e={}){await this.initializeLoadSession(t,e),await this.detectAndPreserveVbaProject(),this.detectDigitalSignatureParts(),await this.parseCustomXmlParts();let r=await this.loadPresentationState(),n=await this.parseSlideMasters();await this.enrichSlideMastersWithTxStyles(n);let i=await this.loadSlidesForPresentation(r.sectionBySlideId),o=this.attachSlideWarnings(i);return this.resetElementIdCounter(i),epe(this.savedSlideFingerprints,o),this.buildLoadData(r,o,n)}getTemplateBackgroundColor(t){return this.templateBackgroundService.getBackgroundColor({layoutXmlMap:this.layoutXmlMap,masterXmlMap:this.masterXmlMap},t,(e,r)=>this.extractBackgroundColor(e,r))}setTemplateBackground(t,e){this.templateBackgroundService.setBackground({layoutXmlMap:this.layoutXmlMap,masterXmlMap:this.masterXmlMap},t,e);}createXmlBuilder(t){return new sat(t)}Builder(t){return this.createXmlBuilder(t)}getCompatibilityWarnings(){return this.compatibilityService.getWarnings()}findMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e){for(let[,r]of e.entries())if(r.includes("slideMaster")){let n=t.substring(0,t.lastIndexOf("/")+1);return r.startsWith("/")?r.substring(1):r.startsWith("..")?this.resolvePath(n,r):`ppt/${hr(r)}`}}}findMasterPathForSlide(t){let e=this.findLayoutPathForSlide(t);if(e)return this.findMasterPathForLayout(e)}async getTemplateElementsForSlide(t){let e=this.slideMap.get(t);return e&&this.extractShowMasterShapes(e)===false?[]:this.getLayoutElements(t)}async getAvailableLayoutsForSlide(t,e){let r=e[t];if(!r)return [];let n=r.id,i=this.findMasterPathForSlide(n);if(!i)return this.getLayoutOptions();let o=this.slideRelsMap.get(i);if(!o)return this.getLayoutOptions();let a=new Set;for(let[,l]of o.entries())if(l.includes("slideLayout")){let c=i.substring(0,i.lastIndexOf("/")+1),d=l.startsWith("/")?l.substring(1):l.startsWith("..")?this.resolvePath(c,l):`ppt/${hr(l)}`;a.add(d);}let s=[];for(let l of a){let c=this.layoutXmlMap.get(l);if(c)s.push(this.buildLayoutOption(l,c));else try{let d=await this.zip.file(l)?.async("string");if(d){let p=this.parser.parse(d);this.layoutXmlMap.set(l,p),s.push(this.buildLayoutOption(l,p));}}catch{}}return s}buildLayoutOption(t,e){let r=e["p:sldLayout"],n=String(r?.["p:cSld"]?.["@_name"]||"").trim(),i=r?.["@_type"],o=i!=null?String(i).trim():void 0,a=ztt({name:n,type:o,path:t}),s=this.findMasterPathForLayout(t);return {path:t,name:a,...o?{type:o}:{},...s?{masterPath:s}:{}}}async applyLayoutToSlide(t,e,r){let n=r[t];if(!n)throw new Error(`Slide index ${t} out of range`);let i=this.layoutXmlMap.get(e);if(!i){let b=await this.zip.file(e)?.async("string");if(!b)throw new Error(`Layout not found: ${e}`);i=this.parser.parse(b),this.layoutXmlMap.set(e,i);}let o=n.id,a=`../slideLayouts/${e.split("/").pop()}`,s=o.startsWith("ppt/slides/")?a:`/${e}`,l=`${o.replace("slides/","slides/_rels/")}.rels`,c=await this.zip.file(l)?.async("string"),d;if(c){let b=this.parser.parse(c),S=Array.isArray(b?.Relationships?.Relationship)?b.Relationships.Relationship:b?.Relationships?.Relationship?[b.Relationships.Relationship]:[],w=false;for(let _ of S)if(String(_["@_Type"]||"").includes("/slideLayout")){d=String(_["@_Id"]||""),_["@_Target"]=a,w=true;break}w||(d=`rId${S.reduce((A,k)=>{let E=parseInt(String(k["@_Id"]||"rId0").replace("rId",""),10);return Number.isFinite(E)&&E>A?E:A},0)+1}`,S.push({"@_Id":d,"@_Type":"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout","@_Target":a})),b.Relationships.Relationship=S.length===1?S[0]:S;let C=this.builder.build(b);this.zip.file(l,C);}let p=this.slideRelsMap.get(o);p||(p=new Map,this.slideRelsMap.set(o,p));let u=[...p.entries()].find(([,b])=>b.includes("slideLayout"));if(u)p.set(u[0],s);else {if(!d){let b=1;for(;p.has(`rId${b}`);)b++;d=`rId${b}`;}p.set(d,s);}this.layoutCache.delete(e),await this.getLayoutElements(o);let f=dJt(this.remapElementsToNewLayout(n.elements,i,e),{resolveDefaults:b=>{let S=this.getElementPlaceholderInfo(b);return S?this.lookupPlaceholderDefaults(o,S):void 0},placeholderType:b=>this.getElementPlaceholderInfo(b)?.type,applyBodyDefaults:(b,S)=>this.applyPlaceholderBodyDefaults(b,S),applyLevelDefaults:(b,S)=>this.applyPlaceholderLevelDefaults(b,S)}),h=i["p:sldLayout"],g=String(h?.["p:cSld"]?.["@_name"]||"").trim()||e,y={...n,elements:f,layoutPath:e,layoutName:g,isDirty:true},x=Rrt(this,o);if(x?Lrt(x,n):!n.rawXml||!this.extractBackgroundColor(n.rawXml)){await this.loadSlideRelationships(e,as(e));let[b,S,w]=await Promise.all([this.getLayoutBackgroundColor(o),this.getLayoutBackgroundGradient(o),this.getLayoutBackgroundImage(o)]);y.backgroundColor=b??n.backgroundColor,y.backgroundGradient=S,y.backgroundImage=w,Mrt(this,o,{authored:false,color:y.backgroundColor,gradient:S,image:w});}return r[t]=y,y}};}}),Qht,ffe=T({"src/core/core/runtime/PptxHandlerRuntimeImplementation.ts"(){ert(),Nc(),Q5(),ufe(),Qht=class Do extends Jht{constructor(e=new oat){super(),this.dependencyFactory=e,this.zip=new pn__default.default,this.parser=this.dependencyFactory.createParser(),this.builder=this.dependencyFactory.createBuilder(),this.elementXmlBuilder=new trt({emuPerPx:Do.EMU_PER_PX,toDrawingTextVerticalAlign:i=>this.textVerticalAlignToDrawingValue(i)}),this.contentTypesBuilder=new rrt,this.elementTransformUpdater=new krt,this.presentationSaveBuilder=new mrt,this.presentationSlidesReconciler=new yrt,this.slideBackgroundBuilder=new Frt,this.slideCommentPartWriter=new Crt,this.slideMediaRelationshipBuilder=new Ert,this.slideNotesPartUpdater=new Irt,this.colorStyleCodec=new dnt({emuPerPx:Do.EMU_PER_PX,ensureArray:i=>this.ensureArray(i),resolveThemeColor:i=>this.resolveThemeColor(i)}),this.connectorParser=new Gnt({emuPerPx:Do.EMU_PER_PX,getOrderedSlidePaths:()=>this.orderedSlidePaths,slideRelsMap:this.slideRelsMap,parseGeometryAdjustments:i=>this.parseGeometryAdjustments(i),readFlipState:i=>this.readFlipState(i),extractShapeStyle:(i,o)=>this.extractShapeStyle(i,o),parseShapeLocks:i=>this.parseShapeLocks(i),parseElementActions:(i,o,a)=>this.parseElementActions(i,o,a),parseConnectorTextBody:(i,o)=>this.parseConnectorTextBody(i,o)}),this.shapeStyleExtractor=new hnt({emuPerPx:Do.EMU_PER_PX,parseColor:(i,o)=>this.parseColor(i,o),extractColorOpacity:i=>this.extractColorOpacity(i),extractGradientFillColor:i=>this.extractGradientFillColor(i),extractGradientOpacity:i=>this.extractGradientOpacity(i),extractGradientFillCss:i=>this.extractGradientFillCss(i),extractGradientStops:i=>this.extractGradientStops(i),extractGradientAngle:i=>this.extractGradientAngle(i),extractGradientType:i=>this.extractGradientType(i),extractGradientPathType:i=>this.colorStyleCodec.extractGradientPathType(i),extractGradientFocalPoint:i=>this.colorStyleCodec.extractGradientFocalPoint(i),extractGradientFillToRect:i=>this.colorStyleCodec.extractGradientFillToRect(i),extractGradientFlip:i=>this.colorStyleCodec.extractGradientFlip(i),extractGradientRotWithShape:i=>this.colorStyleCodec.extractGradientRotWithShape(i),extractGradientScaled:i=>this.colorStyleCodec.extractGradientScaled(i),normalizeStrokeDashType:i=>this.normalizeStrokeDashType(i),normalizeConnectorArrowType:i=>this.normalizeConnectorArrowType(i),ensureArray:i=>this.ensureArray(i),resolveThemeFillRef:(i,o)=>this.resolveThemeFillRef(i,o),resolveThemeLineRef:(i,o)=>this.resolveThemeLineRef(i,o),resolveThemeEffectRef:(i,o)=>this.resolveThemeEffectRef(i,o),extractShadowStyle:i=>this.extractShadowStyle(i),extractInnerShadowStyle:i=>this.extractInnerShadowStyle(i),extractGlowStyle:i=>this.extractGlowStyle(i),extractSoftEdgeStyle:i=>this.extractSoftEdgeStyle(i),extractReflectionStyle:i=>this.extractReflectionStyle(i),extractBlurStyle:i=>this.extractBlurStyle(i),extractEffectDagStyle:i=>this.extractEffectDagStyle(i),extractFillOverlayStyle:i=>this.extractFillOverlayStyle(i)}),this.tableDataParser=new Ant({emuPerPx:Do.EMU_PER_PX,ensureArray:i=>this.ensureArray(i),parseColor:(i,o)=>this.parseColor(i,o),extractGradientFillCss:i=>this.extractGradientFillCss(i),extractGradientStops:i=>this.extractGradientStops(i),extractGradientType:i=>this.extractGradientType(i),extractGradientAngle:i=>this.extractGradientAngle(i),extractGradientPathType:i=>this.colorStyleCodec.extractGradientPathType(i),extractGradientFocalPoint:i=>this.colorStyleCodec.extractGradientFocalPoint(i),extractGradientFillToRect:i=>this.colorStyleCodec.extractGradientFillToRect(i),resolveCellImagePath:(i,o,a)=>this.resolveTableCellImagePath(i,o,a)}),this.mediaDataParser=new Pnt({slideRelsMap:this.slideRelsMap,externalRelsMap:this.externalRelsMap,resolvePath:(i,o)=>this.resolvePath(i,o),getPathExtension:i=>this.getPathExtension(i),allowExternalMedia:()=>this.allowExternalImages===true}),this.graphicFrameParser=new Xnt({emuPerPx:Do.EMU_PER_PX,getOrderedSlidePaths:()=>this.orderedSlidePaths,slideRelsMap:this.slideRelsMap,externalRelsMap:this.externalRelsMap,readFlipState:i=>this.readFlipState(i),parseTableData:(i,o)=>this.parseTableData(i,o),parseMediaData:(i,o)=>this.parseMediaData(i,o),parseElementActions:(i,o,a)=>this.parseElementActions(i,o,a),inspectGraphicFrameCompatibility:(i,o,a)=>this.compatibilityService.inspectGraphicFrameCompatibility(i,o,a),findPlaceholderNode:(i,o)=>this.findPlaceholderNode(i,{idx:o.idx,type:o.type,sz:o.sz,orient:o.orient})});let r=new oit;this.slideCommentsXmlFactory=r.createSlideCommentsFactory(),this.commentAuthorsXmlFactory=r.createCommentAuthorsFactory();let n=this.dependencyFactory.createDependencies({zip:this.zip,parser:this.parser,builder:this.builder,editorMetaExtensionUri:Do.EDITOR_META_EXTENSION_URI,editorMetaNamespaceUri:Do.EDITOR_META_NAMESPACE_URI,getXmlLocalName:i=>{let o=i.startsWith("@_")?i.slice(2):i,a=o.lastIndexOf(":");return a<0?o:o.slice(a+1)}});this.xmlLookupService=n.xmlLookupService,this.compatibilityService=n.compatibilityService,this.slideLoaderService=n.slideLoaderService,this.templateBackgroundService=n.templateBackgroundService,this.slideTransitionService=n.slideTransitionService,this.editorAnimationService=n.editorAnimationService,this.nativeAnimationService=n.nativeAnimationService,this.animationWriteService=n.animationWriteService,this.documentPropertiesUpdater=n.documentPropertiesUpdater;}};}}),Gk,tmt=T({"src/core/core/PptxHandlerRuntime.ts"(){ffe(),Gk=class extends Qht{};}}),emt,mfe=T({"src/core/core/PptxHandlerRuntimeFactory.ts"(){tmt(),emt=()=>new Gk;}});function gfe(t){let e=globalThis.structuredClone;return e?e(t):JSON.parse(JSON.stringify(t))}function yfe(t=new Set){let e=globalThis.crypto;for(let r=0;r<8;r++){let n=e?.randomUUID?.(),i=n?`{${n.toUpperCase()}}`:xfe(r);if(!t.has(bs(i)))return i}return `{${Date.now().toString(16).padStart(12,"0")}-FFFF-FFFF-FFFF-${Math.random().toString(16).slice(2,14).padEnd(12,"0")}}`.toUpperCase()}function xfe(t){let e=()=>Math.floor(Math.random()*4294967295).toString(16).padStart(8,"0"),r=(Date.now()+t).toString(16).padStart(12,"0").slice(-12);return `{${e()}-${e().slice(0,4)}-4${e().slice(1,4)}-8${e().slice(1,4)}-${r}}`}function NUe(t,e){let r=e.styleId?bs(e.styleId):yfe(new Set(Object.keys(t).map(bs)));return e.basedOn?{...gfe(e.basedOn),styleId:r,styleName:e.styleName}:{styleId:r,styleName:e.styleName}}function BUe(t,e){return t[bs(e.styleId)]=e,t}function $Ue(t,e){let r=bs(e);return r in t?(delete t[r],true):false}var vfe=T({"src/core/core/runtime/table-style-editor.ts"(){uS();}}),rmt=T({"src/core/core/index.ts"(){mfe(),tmt(),Nc(),Q5(),mat(),VR(),ub(),sR(),vfe(),uS();}}),wS,bfe=T({"src/core/ppt/text/byte-cursor.ts"(){wS=class{constructor(t,e,r){this.view=t,this.end=r,this.pos=e;}view;end;pos;canRead(t){return this.pos+t<=this.end}u16(){let t=this.view.getUint16(this.pos,true);return this.pos+=2,t}i16(){let t=this.view.getInt16(this.pos,true);return this.pos+=2,t}u32(){let t=this.view.getUint32(this.pos,true);return this.pos+=4,t}bytes4(){let t=this.view,e=this.pos;return this.pos+=4,[t.getUint8(e),t.getUint8(e+1),t.getUint8(e+2),t.getUint8(e+3)]}skip(t){this.pos+=t;}};}});function nmt(t,e,r){if(!t.canRead(4))return false;let n=t.u32(),i=o=>(n&o)!==0;try{let o=0;if(n&15&&(o=t.u16(),i(1)&&(r.hasBullet=(o&1)!==0)),i(128)&&(r.bulletChar=String.fromCharCode(t.u16())),i(16)&&(r.bulletFontRef=t.u16()),i(64)&&t.i16(),i(32)){let[a,s,l,c]=t.bytes4();r.bulletColorRgb=Jlt(a,s,l,c,e);}if(i(2048)&&(r.align=omt[t.u16()]),i(4096)&&t.i16(),i(8192)&&t.i16(),i(16384)&&t.i16(),i(256)&&(r.leftMarginMu=t.u16()),i(1024)&&(r.indentMu=t.u16()),i(32768)&&t.u16(),i(1048576)){let a=t.u16();t.skip(a*4);}i(65536)&&t.u16(),n&917504&&t.u16(),i(2097152)&&t.u16();}catch{return false}return true}function imt(t,e,r){if(!t.canRead(4))return false;let n=t.u32(),i=o=>(n&o)!==0;try{if(n&65535){let o=t.u16();i(1)&&(r.bold=(o&1)!==0),i(2)&&(r.italic=(o&2)!==0),i(4)&&(r.underline=(o&4)!==0),i(16)&&(r.shadow=(o&16)!==0);}if(i(65536)&&(r.fontRef=t.u16()),i(2097152)&&t.u16(),i(4194304)){let o=t.u16();r.fontRef===void 0&&(r.fontRef=o);}if(i(8388608)&&t.u16(),i(131072)&&(r.sizePt=t.i16()),i(262144)){let[o,a,s,l]=t.bytes4();r.colorRgb=Jlt(o,a,s,l,e);}i(524288)&&t.i16();}catch{return false}return true}function Sfe(t,e,r,n){let i=new wS(t,e,r),o={count:0,indentLevel:0};if(nmt(i,n,o))return {props:o,next:i.pos}}function wfe(t,e,r,n){let i=new wS(t,e,r),o={count:0};if(imt(i,n,o))return {props:o,next:i.pos}}function Tfe(t,e,r,n,i){let o=new wS(t,e,e+r),a=n+1,s=[],l=[],c=0;for(;c<a&&o.canRead(6);){let d=o.u32(),p=o.u16(),u={count:d,indentLevel:p};if(!nmt(o,i,u))break;s.push(u),c+=d;}for(c=0;c<a&&o.canRead(8);){let d=o.u32(),p={count:d};if(!imt(o,i,p))break;l.push(p),c+=d;}return {paragraphRuns:s,charRuns:l}}var omt,amt=T({"src/core/ppt/text/style-props.ts"(){js(),bfe(),omt={0:"l",1:"ctr",2:"r",3:"just"};}});function Cfe(t,e,r){let n="";for(let i=0;i<r;i++){let o=t.getUint8(e+i);n+=String.fromCharCode(lmt[o]??o);}return n}function TS(t,e,r){let n="";for(let i=0;i+1<r;i+=2)n+=String.fromCharCode(t.getUint16(e+i,true));return n}function smt(t,e,r,n){let i=[],o;for(let a of au(t,e,r))a.recType===tt.TextHeaderAtom?(o={textType:a.recLen>=4?t.getUint32(a.dataOffset,true):0,text:""},i.push(o)):a.recType===tt.TextCharsAtom&&o?o.text=TS(t,a.dataOffset,a.recLen):a.recType===tt.TextBytesAtom&&o?o.text=Cfe(t,a.dataOffset,a.recLen):a.recType===tt.StyleTextPropAtom&&o&&(o.styles=Tfe(t,a.dataOffset,a.recLen,o.text.length,n));return i}function _fe(t,e,r){for(let n of au(t,e,r))if(n.recType===tt.OutlineTextRefAtom&&n.recLen>=4)return t.getInt32(n.dataOffset,true)}function Afe(t,e,r){let n=new Map,i,o,a=l=>{i!==void 0&&o!==void 0&&n.set(i,smt(t,o,l,r));},s=e.dataOffset+e.recLen;for(let l of au(t,e.dataOffset,s))l.recType===tt.SlidePersistAtom&&l.recLen>=4&&(a(l.headerOffset),i=t.getUint32(l.dataOffset,true),o=l.dataOffset+l.recLen);return a(s),n}var lmt,CS=T({"src/core/ppt/text/text-atoms.ts"(){Lr(),Rt(),amt(),lmt={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};}});function a_(t,e){return TS(t,e.dataOffset,e.recLen)}function Pfe(t,e){let r=Kt(t,e,tt.ExternalHyperlinkAtom);if(!r||r.recLen<4)return;let n=t.getUint32(r.dataOffset,true),i={};for(let o of Gr(t,e))o.recType===tt.CString&&(o.recInstance===0?i.friendlyName=a_(t,o):o.recInstance===1?i.target=a_(t,o):o.recInstance===3&&(i.location=a_(t,o)));return {id:n,strings:i}}function kfe(t,e){let r=new Map,n=Kt(t,e,tt.ExternalObjectList);if(!n)return r;for(let i of Gr(t,n)){if(i.recType!==tt.ExternalHyperlink)continue;let o=Pfe(t,i);o&&r.set(o.id,o.strings);}return r}function Efe(t){if(!t)return;let e=/^\d+,(\d+),$/u.exec(t);return e?Number.parseInt(e[1],10)-1:void 0}function cmt(t,e,r){if(e.recLen<16)return;let n=t.getUint32(e.dataOffset+4,true),i=t.getUint8(e.dataOffset+8),o=t.getUint8(e.dataOffset+10),a=t.getUint8(e.dataOffset+12);if(i===Tx.jumpAction)return Wk[o]?{kind:Wk[o]}:void 0;if(i!==Tx.hyperlinkAction&&i!==Tx.customShowAction)return;let s=r.get(n);if(s)switch(a){case zd.url:return s.target?{kind:"url",url:s.target}:void 0;case zd.slideNumber:{let l=Efe(s.location);return l!==void 0?{kind:"slide",slideIndex:l}:void 0}case zd.customShow:return s.friendlyName?{kind:"customShow",name:s.friendlyName}:void 0;case zd.otherFile:return s.target?{kind:"openFile",path:s.target}:void 0;case zd.otherPresentation:return s.target?{kind:"openPresentation",path:s.target}:void 0;default:return}}function Ife(t,e,r,n){let i=[],o;for(let a of au(t,e,r))if(a.recType===tt.InteractiveInfo&&a.recInstance===0){let s=Kt(t,a,tt.InteractiveInfoAtom);o=s?cmt(t,s,n):void 0;}else a.recType===tt.TextInteractiveInfoAtom&&a.recLen>=8&&(o&&i.push({begin:t.getUint32(a.dataOffset,true),end:t.getUint32(a.dataOffset+4,true),target:o}),o=void 0);return i}function Mfe(t,e,r){for(let n of Gr(t,e))if(n.recType===tt.InteractiveInfo&&n.recInstance===0){let i=Kt(t,n,tt.InteractiveInfoAtom);if(i)return cmt(t,i,r)}}var zd,Tx,Wk,sL=T({"src/core/ppt/hyperlink-parser.ts"(){Lr(),Rt(),CS(),zd={customShow:6,slideNumber:7,url:8,otherPresentation:9,otherFile:10},Tx={jumpAction:3,hyperlinkAction:4,customShowAction:7},Wk={1:"nextSlide",2:"prevSlide",3:"firstSlide",4:"lastSlide",5:"lastViewed",6:"endShow"};}});async function dmt(t){if(!(typeof DecompressionStream>"u"))try{let r=new Blob([t.slice().buffer]).stream().pipeThrough(new DecompressionStream("deflate")).getReader(),n=[],i=0;for(;;){let s;try{s=await r.read();}catch{break}if(s.done)break;n.push(s.value),i+=s.value.length;}if(i===0)return;let o=new Uint8Array(i),a=0;for(let s of n)o.set(s,a),a+=s.length;return o}catch{return}}var pmt=T({"src/core/ppt/deflate-utils.ts"(){}});function Rfe(t,e){return TS(t,e.dataOffset,e.recLen)}function Lfe(t,e){let r=Kt(t,e,tt.ExternalOleObjectAtom);if(!r||r.recLen<24)return;let n=t.getUint32(r.dataOffset+8,true),i=t.getUint32(r.dataOffset+16,true),o=Kt(t,e,tt.CString,2),a=o?Rfe(t,o):void 0;return {exObjId:n,ref:{persistIdRef:i,progId:a}}}function Ffe(t,e){let r=new Map,n=Kt(t,e,tt.ExternalObjectList);if(!n)return r;for(let i of Gr(t,n)){if(i.recType!==tt.ExternalOleEmbed)continue;let o=Lfe(t,i);o&&r.set(o.exObjId,o.ref);}return r}function Ofe(t){if(t.length<16||t.every(a=>a===0))return;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=e.getUint32(0,true).toString(16).padStart(8,"0"),n=e.getUint16(4,true).toString(16).padStart(4,"0"),i=e.getUint16(6,true).toString(16).padStart(4,"0"),o="";for(let a=8;a<16;a++)o+=t[a].toString(16).padStart(2,"0");return `${r}-${n}-${i}-${o.slice(0,4)}-${o.slice(4)}`.toUpperCase()}async function Dfe(t,e,r,n){let i=Pre(t,r,n.persistIdRef);if(!i||i.recType!==tt.ExternalOleObjectStg)return;let o=sre(e,i);if(i.recInstance===1){if(o.length<4)return;let s=await dmt(o.subarray(4));if(!s)return;o=s;}else o=o.slice();let a;if($p(o))try{let s=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),c=Es(s).entries.find(d=>d.type===rs);a=c?Ofe(c.clsid):void 0;}catch{}return {data:o,progId:n.progId,clsId:a}}function Vk(t,e){for(let r of t)r.kind==="ole"?e.add(r.exObjId):r.kind==="group"&&Vk(r.children,e);}var Nfe=T({"src/core/ppt/ole-embed-parser.ts"(){aa(),Dm(),pmt(),oS(),Lr(),Rt(),CS();}});function Bfe(t){if(t.length<40)return t;let e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=e.getUint32(0,true),n=e.getUint16(14,true),i=e.getUint32(16,true),a=e.getUint32(32,true);a===0&&n<=8&&(a=1<<n);let s=14+r+a*4;i===3&&r===40&&(s+=12);let l=new Uint8Array(14+t.length),c=new DataView(l.buffer);return l[0]=66,l[1]=77,c.setUint32(2,l.length,true),c.setUint32(10,s,true),l.set(t,14),l}async function XU(t,e,r){let n=umt.get(r.recType);if(!n)return;let i=r.recInstance===n.singleUidInstance?1:2,o=r.dataOffset+i*16,a=r.dataOffset+r.recLen;if(n.isMetafile){if(o+34>a)return;let l=t.getUint8(o+32),c=e.subarray(o+34,a);if(l===0){let d=await dmt(c);return d?{extension:n.extension,bytes:d}:void 0}return {extension:n.extension,bytes:c.slice()}}if(o+=1,o>a)return;let s=e.subarray(o,a);return r.recType===pt.BlipDib?{extension:"bmp",bytes:Bfe(s)}:{extension:n.extension,bytes:s.slice()}}async function $fe(t,e){if(!t)return [];let r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=new Map,i=[];for(let c of au(r,0,t.length))if(c.recType>=pt.BlipFirst&&c.recType<=pt.BlipLast){let d=await XU(r,t,c);n.set(c.headerOffset,d),i.push(d);}if(!e)return i;let o=[],a=e.view,s=e.rec.dataOffset,l=e.rec.dataOffset+e.rec.recLen;for(;s+8<=l;){let c=IR(a,s);if(!c||c.dataOffset+c.recLen>l)break;if(c.recType===pt.FBSE&&c.recLen>=36){let d=a.getUint32(c.dataOffset+28,true);o.push(n.get(d)??i[o.length]);}else if(c.recType>=pt.BlipFirst&&c.recType<=pt.BlipLast){let d=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);o.push(await XU(a,d,c));}s=c.dataOffset+c.recLen;}return o.length>0?o:i}var umt,jfe=T({"src/core/ppt/pictures.ts"(){pmt(),Lr(),Rt(),umt=new Map([[pt.BlipEmf,{extension:"emf",isMetafile:true,singleUidInstance:980}],[pt.BlipWmf,{extension:"wmf",isMetafile:true,singleUidInstance:534}],[pt.BlipPict,{extension:"pict",isMetafile:true,singleUidInstance:1346}],[pt.BlipJpeg,{extension:"jpg",isMetafile:false,singleUidInstance:1130}],[pt.BlipPng,{extension:"png",isMetafile:false,singleUidInstance:1760}],[pt.BlipDib,{extension:"bmp",isMetafile:false,singleUidInstance:1960}],[pt.BlipTiff,{extension:"tiff",isMetafile:false,singleUidInstance:1764}],[pt.BlipJpegCmyk,{extension:"jpg",isMetafile:false,singleUidInstance:1762}]]);}});function Hfe(t,e){let r=0;for(let n of t)if(r+=n.count,e<r)return n;return t[t.length-1]}function Ufe(t,e,r){if(t.length===0)return [{start:e,end:r,props:void 0}];let n=[],i=0;for(let o of t){let a=i+o.count,s=Math.max(e,i),l=Math.min(r,a);if(s<l&&n.push({start:s,end:l,props:o}),i=a,i>=r)break}if(n.length===0)n.push({start:e,end:r,props:t[t.length-1]});else {let o=n[n.length-1];o.end<r&&n.push({start:o.end,end:r,props:o.props});}return n}function zfe(t,e){if(e.length===0)return t;let r=[],n=o=>e.find(a=>a.begin<=o&&o<a.end),i=o=>{let a=Number.POSITIVE_INFINITY;for(let s of e)s.begin>o&&s.begin<a&&(a=s.begin);return a};for(let o of t){let a=o.start;for(;a<o.end;){let s=n(a),l=s?s.end:i(a),c=Math.min(o.end,l);r.push({start:a,end:c,props:o.props,hyperlink:s?.target}),a=c;}}return r}function Xfe(t,e,r,n){let i={text:t};return n&&(i.hyperlink=n),e&&(e.bold!==void 0&&(i.bold=e.bold),e.italic!==void 0&&(i.italic=e.italic),e.underline!==void 0&&(i.underline=e.underline),e.sizePt!==void 0&&(i.sizePt=e.sizePt),e.colorRgb!==void 0&&(i.colorRgb=e.colorRgb),e.fontRef!==void 0&&r[e.fontRef]&&(i.fontName=r[e.fontRef])),i}function Gfe(t,e,r){e&&(t.indentLevel=e.indentLevel,e.align!==void 0&&(t.align=e.align),e.hasBullet!==void 0&&(t.hasBullet=e.hasBullet),e.bulletChar!==void 0&&(t.bulletChar=e.bulletChar),e.bulletColorRgb!==void 0&&(t.bulletColorRgb=e.bulletColorRgb),e.bulletFontRef!==void 0&&r[e.bulletFontRef]&&(t.bulletFontName=r[e.bulletFontRef]),e.leftMarginMu!==void 0&&(t.marginLeftEmu=Yi(e.leftMarginMu)),e.indentMu!==void 0&&(t.indentEmu=Yi(e.indentMu)));}function GU(t,e,r=[]){let i=t.text.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split("\r"),o=t.styles?.paragraphRuns??[],a=t.styles?.charRuns??[],s=[],l=0;for(let c of i){let d={indentLevel:0,runs:[]};Gfe(d,Hfe(o,l),e);let p=Ufe(a,l,l+c.length);for(let u of zfe(p,r)){let f=c.slice(u.start-l,u.end-l);f.length>0&&d.runs.push(Xfe(f,u.props,e,u.hyperlink));}d.runs.length===0&&c.length>0&&d.runs.push({text:c}),s.push(d),l+=c.length+1;}return s.length>1&&s[s.length-1].runs.length===0&&s.pop(),{textType:t.textType,paragraphs:s}}var Wfe=T({"src/core/ppt/text/text-builder.ts"(){Rt();}});function Vfe(t,e){let r=e.dataOffset,n=e.dataOffset+e.recLen,i=Ife(t.view,r,n,t.hyperlinkStrings),o=_fe(t.view,r,n);if(o!==void 0&&t.rawOutlineText){let s=t.rawOutlineText[o];if(s)return GU(s,t.fonts,i)}let a=smt(t.view,r,n,t.scheme);if(a.length!==0)return GU(a[0],t.fonts,i)}function Yfe(t,e){let r=Kt(t.view,e,tt.OEPlaceholderAtom);if(!r||r.recLen<5)return;let n=t.view.getUint8(r.dataOffset+4);return fmt[n]}function Kfe(t,e){let r=Kt(t.view,e,tt.ExternalObjectRefAtom);if(!(!r||r.recLen<4))return t.view.getUint32(r.dataOffset,true)}var fmt,qfe=T({"src/core/ppt/escher/client-data-extract.ts"(){sL(),Lr(),Rt(),CS(),Wfe(),fmt={13:"title",14:"body",15:"ctrTitle",16:"subTitle"};}});function Zfe(t){return lL.get(t)??hmt.get(t)??"rect"}function Jfe(t){return t===202}var lL,hmt,mmt=T({"src/core/ppt/escher/geometry-map.ts"(){lL=new Map([[20,"line"],[32,"straightConnector1"],[33,"bentConnector2"],[34,"bentConnector3"],[35,"bentConnector4"],[36,"bentConnector5"],[37,"curvedConnector2"],[38,"curvedConnector3"],[39,"curvedConnector4"],[40,"curvedConnector5"]]),hmt=new Map([[1,"rect"],[2,"roundRect"],[3,"ellipse"],[4,"diamond"],[5,"triangle"],[6,"rtTriangle"],[7,"parallelogram"],[8,"trapezoid"],[9,"hexagon"],[10,"octagon"],[11,"plus"],[12,"star5"],[13,"rightArrow"],[15,"homePlate"],[16,"cube"],[19,"arc"],[21,"plaque"],[22,"can"],[23,"donut"],[41,"callout1"],[42,"callout2"],[43,"callout3"],[44,"accentCallout1"],[45,"accentCallout2"],[46,"accentCallout3"],[47,"borderCallout1"],[48,"borderCallout2"],[49,"borderCallout3"],[53,"ribbon"],[54,"ribbon2"],[55,"chevron"],[56,"pentagon"],[57,"noSmoking"],[58,"star8"],[59,"star16"],[60,"star32"],[61,"wedgeRectCallout"],[62,"wedgeRoundRectCallout"],[63,"wedgeEllipseCallout"],[64,"wave"],[65,"foldedCorner"],[66,"leftArrow"],[67,"downArrow"],[68,"upArrow"],[69,"leftRightArrow"],[70,"upDownArrow"],[71,"irregularSeal1"],[72,"irregularSeal2"],[73,"lightningBolt"],[74,"heart"],[76,"quadArrow"],[77,"leftArrowCallout"],[78,"rightArrowCallout"],[79,"upArrowCallout"],[80,"downArrowCallout"],[81,"leftRightArrowCallout"],[82,"upDownArrowCallout"],[83,"quadArrowCallout"],[84,"bevel"],[85,"leftBracket"],[86,"rightBracket"],[87,"leftBrace"],[88,"rightBrace"],[89,"leftUpArrow"],[90,"bentUpArrow"],[91,"bentArrow"],[92,"star24"],[93,"stripedRightArrow"],[94,"notchedRightArrow"],[95,"blockArc"],[96,"smileyFace"],[97,"verticalScroll"],[98,"horizontalScroll"],[99,"circularArrow"],[101,"uturnArrow"],[102,"curvedRightArrow"],[103,"curvedLeftArrow"],[104,"curvedUpArrow"],[105,"curvedDownArrow"],[106,"cloudCallout"],[107,"ellipseRibbon"],[108,"ellipseRibbon2"],[109,"flowChartProcess"],[110,"flowChartDecision"],[111,"flowChartInputOutput"],[112,"flowChartPredefinedProcess"],[113,"flowChartInternalStorage"],[114,"flowChartDocument"],[115,"flowChartMultidocument"],[116,"flowChartTerminator"],[117,"flowChartPreparation"],[118,"flowChartManualInput"],[119,"flowChartManualOperation"],[120,"flowChartConnector"],[121,"flowChartPunchedCard"],[122,"flowChartPunchedTape"],[123,"flowChartSummingJunction"],[124,"flowChartOr"],[125,"flowChartCollate"],[126,"flowChartSort"],[127,"flowChartExtract"],[128,"flowChartMerge"],[130,"flowChartOnlineStorage"],[131,"flowChartMagneticTape"],[132,"flowChartMagneticDisk"],[133,"flowChartMagneticDrum"],[134,"flowChartDisplay"],[135,"flowChartDelay"],[176,"flowChartAlternateProcess"],[177,"flowChartOffpageConnector"],[178,"callout1"],[179,"accentCallout1"],[180,"borderCallout1"],[182,"leftRightUpArrow"],[183,"sun"],[184,"moon"],[185,"bracketPair"],[186,"bracePair"],[187,"star4"],[188,"doubleWave"],[189,"actionButtonBlank"],[190,"actionButtonHome"],[191,"actionButtonHelp"],[192,"actionButtonInformation"],[193,"actionButtonForwardNext"],[194,"actionButtonBackPrevious"],[195,"actionButtonEnd"],[196,"actionButtonBeginning"],[197,"actionButtonReturn"],[198,"actionButtonDocument"],[199,"actionButtonSound"],[200,"actionButtonMovie"],[202,"rect"]]);}});function gmt(t,e,r){let n=new Map,i=new Map,o=r.recInstance,a=r.dataOffset+o*6;if(a>r.dataOffset+r.recLen)return {values:n,complex:i};let s=[];for(let d=0;d<o;d++){let p=r.dataOffset+d*6,u=t.getUint16(p,true),f=t.getUint32(p+2,true),h=u&16383;(u&32768)!==0?s.push({id:h,length:f}):n.set(h,f);}let l=a,c=r.dataOffset+r.recLen;for(let d of s){let p=Math.min(l+d.length,c);i.set(d.id,e.subarray(l,p)),l=p;}return {values:n,complex:i}}function ymt(t,e,r){if(!(t===void 0||(t&r)===0))return (t&e)!==0}function Qfe(t){return (t>2147483647?t-4294967296:t)/65536}function the(t){let e="";for(let r=0;r+1<t.length;r+=2){let n=t[r]|t[r+1]<<8;if(n===0)break;e+=String.fromCharCode(n);}return e}function ehe(t){if(!(t===void 0||t===0))return xmt[t]}function WU(t){if(!(t===void 0||t===0))return vmt[t]??"triangle"}var rn,xmt,vmt,bmt=T({"src/core/ppt/escher/properties.ts"(){rn={rotation:4,lTxid:128,pib:260,fillType:384,fillColor:385,fillOpacity:386,fillBackColor:387,fNoFillHitTest:447,lineColor:448,lineOpacity:449,lineWidth:459,lineDashing:462,lineStartArrowhead:464,lineEndArrowhead:465,fNoLineDrawDash:511,wzName:896},xmt={0:"solid",1:"dash",2:"dot",3:"dashDot",4:"lgDashDotDot",5:"dot",6:"dash",7:"lgDash",8:"dashDot",9:"lgDashDot",10:"lgDashDotDot"},vmt={1:"triangle",2:"stealth",3:"diamond",4:"oval",5:"arrow"};}});function cL(t,e,r,n){return {x:Yi(e),y:Yi(t),w:Yi(r-e),h:Yi(n-t)}}function rhe(t,e){let r=t.getInt16(e,true),n=t.getInt16(e+2,true),i=t.getInt16(e+4,true),o=t.getInt16(e+6,true);return cL(r,n,i,o)}function nhe(t,e){let r=t.getInt32(e,true),n=t.getInt32(e+4,true),i=t.getInt32(e+8,true),o=t.getInt32(e+12,true);return cL(r,n,i,o)}function Smt(t,e){if(e.recLen===8)return rhe(t,e.dataOffset);if(e.recLen===16)return nhe(t,e.dataOffset)}function Yk(t,e){if(e.recLen!==16)return;let r=t.getInt32(e.dataOffset,true),n=t.getInt32(e.dataOffset+4,true),i=t.getInt32(e.dataOffset+8,true),o=t.getInt32(e.dataOffset+12,true);return cL(n,r,i,o)}function ihe(t,e,r){let n=ymt(t.values.get(rn.fNoFillHitTest),16,1048576);if(n===false)return {kind:"none"};let i=t.values.get(rn.fillColor);return i!==void 0?{kind:"solid",rgb:RR(i,e)}:n===true?{kind:"solid",rgb:e[4]}:Jfe(r)?{kind:"none"}:void 0}function ohe(t,e){let r=ymt(t.values.get(rn.fNoLineDrawDash),8,524288);if(r===false)return {kind:"noLine"};let n=t.values.get(rn.lineColor),i=t.values.get(rn.lineWidth);if(r!==true&&n===void 0&&i===void 0)return;let o={kind:"line",rgb:n!==void 0?RR(n,e):e[1],widthEmu:i??9525},a=ehe(t.values.get(rn.lineDashing));a&&(o.dash=a);let s=WU(t.values.get(rn.lineStartArrowhead));s&&(o.headArrow=s);let l=WU(t.values.get(rn.lineEndArrowhead));return l&&(o.tailArrow=l),o}var ahe=T({"src/core/ppt/escher/shape-props.ts"(){js(),Rt(),mmt(),bmt();}});function wmt(t,e){let r=Kt(t.view,e,pt.FSP);if(!r||r.recLen<8)return;let n=r.recInstance,i=t.view.getUint32(r.dataOffset+4,true);if(i&Amt)return;let o=Kt(t.view,e,pt.FOPT),a=o?gmt(t.view,t.data,o):{values:new Map,complex:new Map},s=Kt(t.view,e,pt.ClientAnchor),l=Kt(t.view,e,pt.ChildAnchor),c=s?Smt(t.view,s):l?Yk(t.view,l):void 0,d=a.complex.get(rn.wzName),p=d?the(d):void 0,u=a.values.get(rn.rotation),f=u!==void 0?Qfe(u):void 0,h=(i&Pmt)!==0?true:void 0,g=(i&kmt)!==0?true:void 0,y=Kt(t.view,e,pt.ClientData),x=y?Mfe(t.view,y,t.hyperlinkStrings):void 0,v=a.values.get(rn.pib);if(v!==void 0&&v>0){let _=y?Kfe(t,y):void 0;return _!==void 0&&t.oleExObjIds.has(_)?{kind:"ole",pictureIndex:v-1,exObjId:_,name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x}:{kind:"picture",pictureIndex:v-1,name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x}}let b={kind:"shape",preset:Zfe(n),isConnector:lL.has(n),name:p,anchor:c,rotationDeg:f,flipH:h,flipV:g,actionClick:x},S=ihe(a,t.scheme,n);S&&(b.fill=S);let w=ohe(a,t.scheme);if(w&&(b.line=w),y){let _=Yfe(t,y);_&&(b.placeholderType=_);}let C=Kt(t.view,e,pt.ClientTextbox);if(C){let _=Vfe(t,C);_&&_.paragraphs.some(A=>A.runs.length>0)&&(b.text=_);}if(!(i&dL))return b}function Tmt(t,e){let r=[],n,i=true;for(let d of Gr(t.view,e))if(d.recType===pt.SpContainer&&i)n=d,i=false;else if(d.recType===pt.SpContainer){let p=wmt(t,d);p&&r.push(p);}else if(d.recType===pt.SpgrContainer){let p=Tmt(t,d);p&&r.push(p);}if(!n)return;let o=Kt(t.view,n,pt.FSPGR),a=Kt(t.view,n,pt.ClientAnchor),s=Kt(t.view,n,pt.ChildAnchor),l=a?Smt(t.view,a):s?Yk(t.view,s):void 0,c=o&&o.recLen>=16?Yk(t.view,o):void 0;if(r.length!==0)return {kind:"group",anchor:l,childRect:c??l??{x:0,y:0,w:0,h:0},children:r}}function Cmt(t,e){let r={shapes:[]},n=Kt(t.view,e,pt.SpgrContainer);if(!n)return r;let i=true;for(let o of Gr(t.view,n))if(o.recType===pt.SpContainer){if(i){i=false;continue}let a=she(t,o);if(a!==void 0){r.backgroundRgb=a;continue}let s=wmt(t,o);s&&r.shapes.push(s);}else if(o.recType===pt.SpgrContainer){let a=Tmt(t,o);a&&r.shapes.push(a);}else Zlt(o);return r}function she(t,e){let r=Kt(t.view,e,pt.FSP);if(!r||r.recLen<8)return;let n=t.view.getUint32(r.dataOffset+4,true);if((n&dL)===0||(n&_mt)!==0)return;let i=Kt(t.view,e,pt.FOPT);if(!i)return t.scheme[0];let a=gmt(t.view,t.data,i).values.get(rn.fillColor);return a!==void 0?RR(a,t.scheme):t.scheme[0]}var _mt,Amt,Pmt,kmt,dL,lhe=T({"src/core/ppt/escher/sp-container.ts"(){js(),sL(),Lr(),Rt(),qfe(),mmt(),bmt(),ahe(),_mt=1,Amt=8,Pmt=64,kmt=128,dL=1024;}});function che(t,e){let{view:r,data:n,fonts:i}=t,o=true,a=true,s=true,l=Kt(r,e,tt.SlideAtom);if(l&&l.recLen>=24){let f=r.getUint16(l.dataOffset+20,true);s=(f&Emt)!==0,a=(f&Imt)!==0,o=(f&Mmt)!==0;}let c=MR(r,e),d=a?t.masterScheme:c??t.masterScheme,p={followMasterBackground:o,followMasterObjects:s,shapes:[]},u=Kt(r,e,tt.Drawing);if(u){let f=o0(r,u,pt.DgContainer);if(f){let h={view:r,data:n,scheme:d,fonts:i,rawOutlineText:t.outlineText,hyperlinkStrings:t.hyperlinkStrings,oleExObjIds:t.oleExObjIds},g=Cmt(h,f);p.shapes=g.shapes,g.backgroundRgb!==void 0&&(p.backgroundRgb=g.backgroundRgb,p.followMasterBackground=false);}}return p}function dhe(t,e,r,n,i,o,a){let s=MR(t,i),l=s??n,c,d=[],p=Kt(t,i,tt.Drawing);if(p){let u=o0(t,p,pt.DgContainer);if(u){let h=Cmt({view:t,data:e,scheme:l,fonts:r,rawOutlineText:void 0,hyperlinkStrings:o,oleExObjIds:a},u);c=h.backgroundRgb,d=h.shapes.filter(g=>!(g.kind==="shape"&&(g.placeholderType!==void 0||g.text!==void 0)));}}return {scheme:s,backgroundRgb:c,shapes:d,container:i}}var Emt,Imt,Mmt,phe=T({"src/core/ppt/slide-parser.ts"(){js(),lhe(),Lr(),Rt(),Emt=1,Imt=2,Mmt=4;}});function VU(t,e,r,n){let i=[],o=e.dataOffset+e.recLen;if(e.recLen<2)return i;let a=t.getUint16(e.dataOffset,true),s=e.dataOffset+2;for(let l=0;l<a&&l<10&&s<o;l++){e.recInstance>=5&&(s+=2);let c=Sfe(t,s,o,r);if(!c)break;s=c.next;let d=wfe(t,s,o,r);if(!d)break;s=d.next;let p={};d.props.sizePt!==void 0&&(p.sizePt=d.props.sizePt),d.props.bold!==void 0&&(p.bold=d.props.bold),d.props.colorRgb!==void 0&&(p.colorRgb=d.props.colorRgb),d.props.fontRef!==void 0&&n[d.props.fontRef]&&(p.fontName=n[d.props.fontRef]),c.props.align!==void 0&&(p.align=c.props.align),c.props.hasBullet!==void 0&&(p.hasBullet=c.props.hasBullet),c.props.bulletChar!==void 0&&(p.bulletChar=c.props.bulletChar),c.props.bulletFontRef!==void 0&&n[c.props.bulletFontRef]&&(p.bulletFontName=n[c.props.bulletFontRef]),c.props.leftMarginMu!==void 0&&(p.marginLeftEmu=Yi(c.props.leftMarginMu)),c.props.indentMu!==void 0&&(p.indentEmu=Yi(c.props.indentMu)),i.push(p);}return i}function uhe(t,e,r,n){let i=[],o=[];for(let a of Gr(t,e))a.recType===tt.TextMasterStyleAtom&&(a.recInstance===0&&i.length===0?i=VU(t,a,r,n):a.recInstance===1&&o.length===0&&(o=VU(t,a,r,n)));return {titleStyles:i,bodyStyles:o}}var fhe=T({"src/core/ppt/text/master-styles.ts"(){Lr(),Rt(),amt();}});function hhe(t,e){let r=[],n=Kt(t,e,tt.Environment);if(!n)return r;let i=o0(t,n,tt.FontCollection);if(!i)return r;for(let o of Gr(t,i))if(o.recType===tt.FontEntityAtom){let a=TS(t,o.dataOffset,Math.min(64,o.recLen)),s=a.indexOf("\0");r.push(s>=0?a.slice(0,s):a);}return r}function Rmt(t,e){let r=[];for(let n of Gr(t,e))n.recType===tt.SlidePersistAtom&&n.recLen>=4&&r.push(t.getUint32(n.dataOffset,true));return r}function mhe(t,e,r,n){for(let o of Gr(t,e))if(o.recType===tt.SlideListWithText&&o.recInstance===0)return {persistIds:Rmt(t,o),outline:Afe(t,o,n)};let i=[];for(let[o,a]of r)yi(t,a).recType===tt.Slide&&i.push(o);return i.sort((o,a)=>o-a),{persistIds:i,outline:new Map}}function ghe(t,e){let r=Kt(t,e,tt.DrawingGroup);if(r)return o0(t,r,pt.BStoreContainer)}async function yhe(t){let e=t.powerPointDocument,r=new DataView(e.buffer,e.byteOffset,e.byteLength),{currentEdit:n,directory:i}=lct(r,t.offsetToCurrentEdit);if(n.encryptSessionPersistIdRef!==void 0&&n.encryptSessionPersistIdRef!==0&&!t.decrypted)throw new Xv;let o=i.get(n.docPersistIdRef);if(o===void 0)throw new Ne("DocumentContainer persist object not found");let a=yi(r,o);if(a.recType!==tt.Document)throw new Ne(`Persist id ${n.docPersistIdRef} is not a DocumentContainer`);let s=9144e3,l=6858e3,c=Kt(r,a,tt.DocumentAtom);c&&c.recLen>=40&&(s=Yi(r.getInt32(c.dataOffset,true)),l=Yi(r.getInt32(c.dataOffset+4,true)));let d=hhe(r,a),p=kfe(r,a),u=Ffe(r,a),f=new Set(u.keys()),h;for(let R of Gr(r,a))if(R.recType===tt.SlideListWithText&&R.recInstance===1){h=Rmt(r,R)[0];break}let g=MR(r,a)??a0,y=g,x,v=[],b=[],S=[],w=h!==void 0?i.get(h):void 0;if(w!==void 0){let R=yi(r,w);if(R.recType===tt.MainMaster){let O=dhe(r,e,d,g,R,p,f);O.scheme&&(y=O.scheme),x=O.backgroundRgb,v=O.shapes;let B=uhe(r,R,y,d);b=B.titleStyles,S=B.bodyStyles;}}let{persistIds:C,outline:_}=mhe(r,a,i,y),A=[];for(let R of C){let O=i.get(R);if(O===void 0)continue;let B=yi(r,O);B.recType===tt.Slide&&A.push(che({view:r,data:e,fonts:d,masterScheme:y,outlineText:_.get(R),hyperlinkStrings:p,oleExObjIds:f},B));}let k=ghe(r,a),E=await $fe(t.pictures,k?{view:r,rec:k}:void 0),I=new Set;Vk(v,I);for(let R of A)Vk(R.shapes,I);let M=new Map;for(let R of I){let O=u.get(R);if(!O)continue;let B=await Dfe(r,e,i,O);B&&M.set(R,B);}return {widthEmu:s,heightEmu:l,slides:A,masterShapes:v,masterBackgroundRgb:x,scheme:y,fonts:d,titleStyles:b,bodyStyles:S,pictures:E.map(R=>R??{extension:"png",bytes:new Uint8Array(0)}),oleEmbeds:M}}var Lmt=T({"src/core/ppt/document-parser.ts"(){js(),iS(),sL(),Nfe(),oS(),jfe(),Lr(),Rt(),phe(),fhe(),CS();}});function Fmt(t,e,r){if(!t)return "";let n=[];switch(t.kind){case "url":n.push(`r:id="${e.addRel(t.url,true)}"`);break;case "slide":{if(t.slideIndex<0||t.slideIndex>=r)return "";let i=e.addRel(`slide${t.slideIndex+1}.xml`,false,Omt);n.push(`r:id="${i}"`,'action="ppaction://hlinksldjump"');break}case "firstSlide":n.push('action="ppaction://hlinkshowjump?jump=firstslide"');break;case "lastSlide":n.push('action="ppaction://hlinkshowjump?jump=lastslide"');break;case "prevSlide":n.push('action="ppaction://hlinkshowjump?jump=previousslide"');break;case "nextSlide":n.push('action="ppaction://hlinkshowjump?jump=nextslide"');break;case "endShow":n.push('action="ppaction://hlinkshowjump?jump=endshow"');break;case "lastViewed":n.push('action="ppaction://hlinkshowjump?jump=lastslideviewed"');break;case "customShow":n.push(`action="ppaction://customshow?id=${or(encodeURIComponent(t.name))}"`);break;case "openFile":n.push(`r:id="${e.addRel(t.path,true)}"`,'action="ppaction://hlinkfile"');break;case "openPresentation":n.push(`r:id="${e.addRel(t.path,true)}"`,'action="ppaction://hlinkpres"');break;default:return ""}return `<a:hlinkClick ${n.join(" ")}/>`}var Omt,Dmt=T({"src/core/ppt/pptx/hyperlink-xml.ts"(){Hn(),Omt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide";}});function pu(t,e,r,n){let i=Fmt(r,n.hyperlinkRels,n.slideCount);return i.length>0?`<p:cNvPr id="${t}" name="${e}">${i}</p:cNvPr>`:`<p:cNvPr id="${t}" name="${e}"/>`}function uu(t,e=""){let r=t.anchor??{x:0,y:0,w:0,h:0},n=[];return t.rotationDeg!==void 0&&t.rotationDeg!==0&&n.push(`rot="${Math.round(t.rotationDeg*6e4)}"`),t.flipH&&n.push('flipH="1"'),t.flipV&&n.push('flipV="1"'),`<a:xfrm${n.length>0?` ${n.join(" ")}`:""}><a:off x="${ir(r.x)}" y="${ir(r.y)}"/><a:ext cx="${Math.max(0,ir(r.w))}" cy="${Math.max(0,ir(r.h))}"/>${e}</a:xfrm>`}var Nmt=T({"src/core/ppt/pptx/shape-writer-context.ts"(){Dmt(),Hn();}});function xhe(t,e){let r=e.mediaRel(t.pictureIndex);if(!r)return "";let n=e.nextId(),i=or(t.name??`Picture ${n}`);return `<p:pic><p:nvPicPr>${pu(n,i,t.actionClick,e)}<p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${r.relId}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`}function vhe(t,e){let r=e.oleRel(t.exObjId);if(!r)return xhe(t,e);let n=e.nextId(),i=or(t.name??`Object ${n}`),o=t.anchor??{x:0,y:0,w:0,h:0},a=Math.max(0,ir(o.w)),s=Math.max(0,ir(o.h)),l=e.mediaRel(t.pictureIndex),c=l?`<a:blip r:embed="${l.relId}"/>`:"<a:blip/>",d=r.progId?` progId="${or(r.progId)}"`:"",p=r.clsId?` classid="${or(r.clsId)}"`:"",u=`<p:pic><p:nvPicPr><p:cNvPr id="0" name="${i}"/><p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill>${c}<a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`,f=`<p:oleObj showAsIcon="0"${d}${p} r:id="${r.relId}" imgW="${a}" imgH="${s}"><p:embed/>${u}</p:oleObj>`;return `<p:graphicFrame><p:nvGraphicFramePr>${pu(n,i,t.actionClick,e)}<p:cNvGraphicFramePr><a:graphicFrameLocks noChangeAspect="1"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x="${ir(o.x)}" y="${ir(o.y)}"/><a:ext cx="${a}" cy="${s}"/></p:xfrm><a:graphic><a:graphicData uri="${Bmt}">${f}</a:graphicData></a:graphic></p:graphicFrame>`}var Bmt,bhe=T({"src/core/ppt/pptx/shape-writer-ole.ts"(){Nmt(),Hn(),Bmt="http://schemas.openxmlformats.org/presentationml/2006/ole";}});function She(t,e){let r=['lang="en-US"'];t.sizePt!==void 0&&r.push(`sz="${Math.round(t.sizePt*100)}"`),t.bold&&r.push('b="1"'),t.italic&&r.push('i="1"'),t.underline&&r.push('u="sng"'),r.push('dirty="0"');let n="";return t.colorRgb!==void 0&&(n+=Rp(t.colorRgb)),t.fontName!==void 0&&(n+=`<a:latin typeface="${or(t.fontName)}"/>`),n+=Fmt(t.hyperlink,e.hyperlinkRels,e.slideCount),n.length>0?`<a:rPr ${r.join(" ")}>${n}</a:rPr>`:`<a:rPr ${r.join(" ")}/>`}function whe(t,e){let r=t.text.split("\v"),n=She(t,e);return r.map(i=>`<a:r>${n}<a:t>${or(i)}</a:t></a:r>`).join("<a:br/>")}function The(t){let e=[];t.indentLevel>0&&e.push(`lvl="${Math.min(t.indentLevel,8)}"`),t.marginLeftEmu!==void 0&&e.push(`marL="${ir(t.marginLeftEmu)}"`),t.indentEmu!==void 0&&e.push(`indent="${-Math.abs(ir(t.indentEmu))}"`),t.align!==void 0&&e.push(`algn="${t.align}"`);let r="";if(t.hasBullet===false?r="<a:buNone/>":(t.hasBullet===true||t.bulletChar!==void 0)&&(t.bulletColorRgb!==void 0&&(r+=`<a:buClr><a:srgbClr val="${t.bulletColorRgb}"/></a:buClr>`),t.bulletFontName!==void 0&&(r+=`<a:buFont typeface="${or(t.bulletFontName)}"/>`),r+=`<a:buChar char="${or(t.bulletChar??"\u2022")}"/>`),e.length===0&&r.length===0)return "";let n=e.length>0?` ${e.join(" ")}`:"";return r.length>0?`<a:pPr${n}>${r}</a:pPr>`:`<a:pPr${n}/>`}function Che(t,e){let r=[The(t)];for(let n of t.runs)r.push(whe(n,e));return t.runs.length===0&&r.push('<a:endParaRPr lang="en-US"/>'),`<a:p>${r.join("")}</a:p>`}function _he(t,e){let n=t.textType===jP.title||t.textType===jP.centerTitle?'<a:bodyPr wrap="square" anchor="ctr"><a:normAutofit/></a:bodyPr>':'<a:bodyPr wrap="square"><a:normAutofit/></a:bodyPr>',i=t.paragraphs.map(o=>Che(o,e)).join("");return `<p:txBody>${n}<a:lstStyle/>${i}</p:txBody>`}var Ahe=T({"src/core/ppt/pptx/txbody-writer.ts"(){Rt(),Dmt(),Hn();}});function $mt(t){return t.fill?t.fill.kind==="solid"?Rp(t.fill.rgb):"<a:noFill/>":""}function jmt(t){if(!t.line)return "";if(t.line.kind==="noLine")return "<a:ln><a:noFill/></a:ln>";let e=t.line,r=Rp(e.rgb);return e.dash&&(r+=`<a:prstDash val="${e.dash}"/>`),e.headArrow&&(r+=`<a:headEnd type="${e.headArrow}"/>`),e.tailArrow&&(r+=`<a:tailEnd type="${e.tailArrow}"/>`),`<a:ln w="${Math.max(0,ir(e.widthEmu))}">${r}</a:ln>`}function Phe(t,e){let r=e.nextId(),n=or(t.name??`Shape ${r}`),i=t.placeholderType?`<p:ph type="${t.placeholderType}"/>`:"",o=`<p:nvSpPr>${pu(r,n,t.actionClick,e)}<p:cNvSpPr${t.text&&!t.placeholderType?' txBox="1"':""}/><p:nvPr>${i}</p:nvPr></p:nvSpPr>`,a=`<p:spPr>${uu(t)}<a:prstGeom prst="${t.preset}"><a:avLst/></a:prstGeom>${$mt(t)}${jmt(t)}</p:spPr>`,s=t.text?_he(t.text,e):'<p:txBody><a:bodyPr/><a:lstStyle/><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody>';return `<p:sp>${o}${a}${s}</p:sp>`}function khe(t,e){let r=e.nextId(),n=or(t.name??`Connector ${r}`),i=`<p:nvCxnSpPr>${pu(r,n,t.actionClick,e)}<p:cNvCxnSpPr/><p:nvPr/></p:nvCxnSpPr>`,o=`<p:spPr>${uu(t)}<a:prstGeom prst="${t.preset}"><a:avLst/></a:prstGeom>${$mt(t)}${jmt(t)}</p:spPr>`;return `<p:cxnSp>${i}${o}</p:cxnSp>`}function Ehe(t,e){let r=e.mediaRel(t.pictureIndex);if(!r)return "";let n=e.nextId(),i=or(t.name??`Picture ${n}`);return `<p:pic><p:nvPicPr>${pu(n,i,t.actionClick,e)}<p:cNvPicPr/><p:nvPr/></p:nvPicPr><p:blipFill><a:blip r:embed="${r.relId}"/><a:stretch><a:fillRect/></a:stretch></p:blipFill><p:spPr>${uu(t)}<a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr></p:pic>`}function Ihe(t,e){let r=e.nextId(),n=t.anchor??t.childRect,i=t.childRect,o=`<a:chOff x="${ir(i.x)}" y="${ir(i.y)}"/><a:chExt cx="${Math.max(0,ir(i.w))}" cy="${Math.max(0,ir(i.h))}"/>`;return `<p:grpSp><p:nvGrpSpPr>${pu(r,`Group ${r}`,t.actionClick,e)}<p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr>${uu({...t,anchor:n},o)}</p:grpSpPr>${t.children.map(a=>pL(a,e)).join("")}</p:grpSp>`}function pL(t,e){return t.kind==="picture"?Ehe(t,e):t.kind==="ole"?vhe(t,e):t.kind==="group"?Ihe(t,e):t.isConnector&&!t.text?khe(t,e):Phe(t,e)}var Hmt=T({"src/core/ppt/pptx/shape-writer.ts"(){Nmt(),bhe(),Ahe(),Hn();}});function Mhe(t,e,r){let n=[];e.marginLeftEmu!==void 0&&n.push(`marL="${ir(e.marginLeftEmu)}"`),e.indentEmu!==void 0&&n.push(`indent="${-Math.abs(ir(e.indentEmu))}"`),n.push(`algn="${e.align??"l"}"`);let i="";e.hasBullet===false?i="<a:buNone/>":(e.hasBullet===true||e.bulletChar!==void 0)&&(e.bulletFontName!==void 0&&(i+=`<a:buFont typeface="${or(e.bulletFontName)}"/>`),i+=`<a:buChar char="${or(e.bulletChar??"\u2022")}"/>`);let o=Math.round((e.sizePt??r)*100),a=e.bold?' b="1"':"",s=e.colorRgb!==void 0?Rp(e.colorRgb):'<a:solidFill><a:schemeClr val="tx1"/></a:solidFill>',l=e.fontName!==void 0?`<a:latin typeface="${or(e.fontName)}"/>`:'<a:latin typeface="+mn-lt"/>',c=`<a:defRPr sz="${o}" kern="1200"${a}>${s}${l}</a:defRPr>`;return `<a:${t} ${n.join(" ")}>${i}${c}</a:${t}>`}function YU(t,e){let r=[],n=Math.max(1,Math.min(t.length,9));for(let i=0;i<n;i++)r.push(Mhe(`lvl${i+1}pPr`,t[i]??{},e));return r.join("")}function Rhe(t,e){let r=t.masterBackgroundRgb??t.scheme[er.background],n=t.masterShapes.map(i=>pL(i,e)).join("");return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
322
322
|
<p:sldMaster ${uL}>
|
|
323
323
|
<p:cSld>
|
|
324
324
|
<p:bg><p:bgPr>${Rp(r)}<a:effectLst/></p:bgPr></p:bg>
|