pptx-vanilla-viewer 1.7.2 → 1.7.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/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import {uf as uf$1,Ae,D,zf,Af,P,O,N,Dc as Dc$1,qe as qe$1,K,Cf,bc as bc$1,dc as dc$1,_d as _d$1,Yd as Yd$1,bb as bb$1,ab as ab$1,j as j$1,re as re$1,bd as bd$1,Cc as Cc$1,Ec as Ec$1,Hc as Hc$1,Ic as Ic$1,Jc as Jc$1,Ac as Ac$1,Bc,uc as uc$1,Fc,Gc as Gc$1,Oc as Oc$1,Kc as Kc$1,Lc as Lc$1,Mc as Mc$1,Td as Td$1,Ud as Ud$1,ze as ze$1,Df,T,S,Zd as Zd$1,Kd as Kd$1,I,J as J$1,e,V,X,W,Bf,Ve as Ve$1,Ue,Le as Le$1,Me as Me$1,Qe,Se as Se$1,Be as Be$1,Pe,Sb as Sb$1,G as G$1,Jd as Jd$1,Id as Id$1,he as he$1,ie as ie$1,je as je$1,ke as ke$1,Sd as Sd$1,ec as ec$1,fc as fc$1,ae,R,Q,nb as nb$1,Wd as Wd$1,Xd as Xd$1,$d as $d$1,Ld as Ld$1,Md as Md$1,Nd as Nd$1,Pd as Pd$1,Od as Od$1,b,zd as zd$1,Sc as Sc$1,H,x,be as be$1,Pc as Pc$1,wd as wd$1,Ua,Cb as Cb$1,Bb as Bb$1,C,Hd as Hd$1,Xe as Xe$1,Ba,Re as Re$1,Je,Oe,Ne as Ne$1,Xc as Xc$1,Xb as Xb$1,Zb as Zb$1,Yb as Yb$1,Ke as Ke$1,Te as Te$1,Rb as Rb$1,Tb as Tb$1,Ub as Ub$1,of as of$1,Uc as Uc$1,B,xf as xf$1,ce,yf as yf$1,Rd as Rd$1,Qd as Qd$1,cd,ee as ee$1,hb as hb$1,eb as eb$1,db as db$1,fb as fb$1,gb as gb$1,yd as yd$1,id,xd as xd$1,me,ya,Db as Db$1,Ha,Ia,Ja,ad,_c as _c$1,$c as $c$1,Wc as Wc$1,k,Vd as Vd$1,Hb as Hb$1,gc as gc$1,Ib as Ib$1,Gb as Gb$1,Ob as Ob$1,Pb as Pb$1,oc as oc$1,qc as qc$1,hc as hc$1,jc as jc$1,wf,Jb as Jb$1,ge as ge$1,L,M as M$1,U,_b as _b$1,qa,$b as $b$1,ac as ac$1,pb as pb$1,ob as ob$1,qb as qb$1,de,Ce as Ce$1,ed,dd,fe,Z,Y as Y$1,_,Bd as Bd$1,y,ib as ib$1,hd as hd$1,ff as ff$1,Nc as Nc$1,Qc as Qc$1,l,Oa,Rc as Rc$1,Vc as Vc$1,Ad as Ad$1,h,g,Pa,f,Dd as Dd$1,$a,Za,_a,Ya,Xa,Wa,gd as gd$1,z,o,t,p,r,s,u,q as q$1,vd as vd$1,ud as ud$1,n,a,sd,qd as qd$1,od,nd,md,ld,zb as zb$1,sb as sb$1,xb as xb$1,wb as wb$1,tb as tb$1,$ as $$1,aa,ba,oa,na,i,Gd as Gd$1,Fd as Fd$1,Ed as Ed$1,bf as bf$1,af as af$1,ye as ye$1,Ie as Ie$1,Ee as Ee$1,Wb as Wb$1,Vb as Vb$1,Mb as Mb$1,Fb as Fb$1,Eb as Eb$1,fd as fd$1,mc as mc$1,nc as nc$1,pc as pc$1,ic as ic$1,vf as vf$1,kc as kc$1,Tc as Tc$1,Va,ra,zc as zc$1,xc as xc$1,wc as wc$1,w,v,Cd as Cd$1,rb as rb$1,pd,rd,td,m,vb as vb$1,ub as ub$1,jd as jd$1,kd as kd$1,c,wa,va,ua,ta,sa,Na,Ma,Aa,za,Ab as Ab$1,le,Kb as Kb$1,Lb as Lb$1,lc as lc$1,Gf,pa,yc as yc$1,A,d,Da,cb as cb$1,Ea,Fa,Ca,Ga,yb as yb$1,tc as tc$1,sc as sc$1,Nb as Nb$1,Qb as Qb$1,Hf,vc as vc$1,kb as kb$1,jb as jb$1,mb as mb$1,lb as lb$1,la,ma,ea,fa,ca,ha,ia,ga,ja,ka,da,Ra,Qa,Ta,Sa,Ka,La,We,cc as cc$1,Zc as Zc$1,Yc as Yc$1,Fe as Fe$1,He as He$1,De as De$1,ne,pe as pe$1,oe as oe$1,rc as rc$1,xa,se as se$1,cf as cf$1,ef as ef$1,df as df$1,gf as gf$1,$e,hf as hf$1,if as _if,Ye as Ye$1,_e as _e$1,te as te$1,we as we$1,jf,mf as mf$1,lf as lf$1,kf,nf as nf$1,Ze,Ef,ue as ue$1,ve,Jf,xe as xe$1,Ge as Ge$1}from'./chunk-RVVCALIC.js';export{tf as applyStyleMap,Cf as createDefaultRegistry,uf as createEl,sf as createElementRendererRegistry,vf as createSvgEl,H as defaultCssVars,F as defaultRadius,E as defaultThemeColors,Af as keyToLabel,Kc as loadPresentationDeck,Fc as parsePresentationSessionId,xf as renderSlideStage,G as themeToCssVars,zf as translationsEn,J as vermilionDarkTheme,I as vermilionLightTheme}from'./chunk-RVVCALIC.js';import'./chunk-WOT6VMZA.js';import {Settings,UserRound,X as X$1,Upload,Share2,Printer,Download,Save,Info,FolderOpen,FilePlus2,Home,ArrowLeft,FileText,Presentation,Package,FileCode2,Image as Image$1,Video,Images,Copy,UserPlus,Clock3,LockKeyhole,Type,BadgeCheck}from'lucide';import eb from'jszip';function ud(e,t){t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.width!==void 0&&(e.width=t.width),t.height!==void 0&&(e.height=t.height),t.rotation!==void 0&&(e.rotation=t.rotation),t.opacity!==void 0&&(e.opacity=t.opacity),t.hidden!==void 0&&(e.hidden=t.hidden),t.flipHorizontal!==void 0&&(e.flipHorizontal=t.flipHorizontal),t.flipVertical!==void 0&&(e.flipVertical=t.flipVertical),Ix(e,t),Lx(e,t);}function Ix(e,t){if(!b(e))return;let n=e;if(t.text!==void 0&&(n.text=t.text,n.textSegments&&n.textSegments.length>0?n.textSegments[0].text=t.text:n.textSegments=[{text:t.text,style:{}}]),t.fontSize===void 0&&t.fontFamily===void 0&&t.fontColor===void 0&&t.bold===void 0&&t.italic===void 0&&t.underline===void 0&&t.align===void 0)return;n.textStyle??={};let o=n.textStyle;t.fontSize!==void 0&&(o.fontSize=t.fontSize),t.fontFamily!==void 0&&(o.fontFamily=t.fontFamily),t.fontColor!==void 0&&(o.color=t.fontColor),t.bold!==void 0&&(o.bold=t.bold),t.italic!==void 0&&(o.italic=t.italic),t.underline!==void 0&&(o.underline=t.underline),t.align!==void 0&&(o.align=t.align);}function Lx(e,t){if(t.fillColor===void 0&&t.strokeColor===void 0&&t.strokeWidth===void 0||!("shapeStyle"in e))return;let n=e;n.shapeStyle??={};let o=n.shapeStyle;t.fillColor!==void 0&&(o.fillColor=t.fillColor),t.strokeColor!==void 0&&(o.strokeColor=t.strokeColor),t.strokeWidth!==void 0&&(o.strokeWidth=t.strokeWidth);}function Tn(e){let{store:t,editor:n}=e,o=(a,s)=>{let p=a(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(p,t.get().currentSlide);},r=()=>{let a=t.get();return {slides:a.slides,width:a.canvasSize.width,height:a.canvasSize.height,theme:a.colorScheme?{colorScheme:a.colorScheme}:void 0,sections:a.sections,presentationProperties:a.presentationProperties,customProperties:a.customProperties,coreProperties:a.coreProperties,appProperties:a.appProperties}},i=(a,s)=>JSON.stringify(a)!==JSON.stringify(s);return {getDeckMeta(){let a=t.get();return {slideCount:a.slides.length,activeSlideIndex:a.currentSlide,title:Mx(a.slides),width:a.canvasSize.width,height:a.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:a}=t.get();return a?{colorScheme:a}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:a=>e.goToSlide(a),selectElements(a,s){e.goToSlide(a),n.selectElements(s);},applySlidesUpdate:o,updateElement(a,s,p){o(l=>{let m=l[a]?.elements.find(d=>d.id===s);return m&&ud(m,p),l});},applyTheme:a=>e.applyThemeUpdates(a),getDeckData:()=>r(),applyDeckData(a,s){let p=r(),l=a(structuredClone(p));e.ensureEditable(),i(p.slides,l.slides)&&n.commitSlides(l.slides,t.get().currentSlide),(p.width!==l.width||p.height!==l.height)&&n.getEditActions().updateCanvasSize({width:l.width,height:l.height});let m=l.sections??p.sections??[];i(p.sections,m)&&n.updateSections(m);let d=l.presentationProperties??p.presentationProperties??{};i(p.presentationProperties,d)&&n.updatePresentationProperties(d);let u=l.coreProperties??p.coreProperties,x=l.appProperties??p.appProperties,g=l.customProperties??p.customProperties??[];(i(p.coreProperties,u)||i(p.appProperties,x)||i(p.customProperties,g))&&n.updateDocumentProperties(u??{},x??{},g);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function Mx(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var Dx=2600;function Hx(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function Pn(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,a=null,s=false,p=null,l={text:"",nonce:0},m=()=>{for(let g of n)g();},d=()=>{let g=t.get();return of$1({activeSlideIndex:g.currentSlide,selectedElementIds:g.selectedElementIds,selectedElementId:g.selectedElementId})},u=()=>r.length>0,x=t.subscribe((g,f)=>{(g.currentSlide!==f.currentSlide||g.selectedElementId!==f.selectedElementId||g.selectedElementIds!==f.selectedElementIds)&&m();});return {subscribe(g){return n.add(g),()=>n.delete(g)},getLiveTargets:d,getEffectiveTargets(){return u()?r:o&&o.length>0?o:d()},isPinned:()=>!u()&&o!==null,hasPicks:u,pinFocus(){o=d(),m();},clearPinnedFocus(){o=null,m();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),m();},stopPicking(){i=false,m();},addPick(g,f){r.some(v=>v.kind==="element"&&v.elementId===f)||(r=[...r,{kind:"element",slideIndex:g,elementId:f}],m());},clearPicks(){r=[],i=false,m();},getHighlights(){let g=[];for(let f of r)f.kind==="element"&&g.push({slideIndex:f.slideIndex,elementId:f.elementId,variant:"pick"});if(a)for(let f of a.elementIds)g.push({slideIndex:a.slideIndex,elementId:f,variant:"active"});return g},isAnimating:()=>s||r.length>0,flashToolTarget(g){a=g&&g.slideIndex!==void 0&&g.elementIds.length>0?{slideIndex:g.slideIndex,elementIds:g.elementIds}:null,s=true,p&&clearTimeout(p),p=setTimeout(()=>{a=null,s=false,p=null,m();},Dx),m();},getPrefill:()=>l,askAboutSelection(){o=d(),l={text:"",nonce:l.nonce+1},e.requestOpen(),m();},fixElement(g,f){o=d(),l={text:g?Hx(g,f):"",nonce:l.nonce+1},e.requestOpen(),m();},dispose(){p&&clearTimeout(p),x(),n.clear();}}}function M(e,t){let n=uf$1(e,"button",`pptxv-btn${t.className?` ${t.className}`:""}`);if(n.type="button",n.title=t.label,n.setAttribute("aria-label",t.label),t.icon?n.appendChild(Df(e,t.icon)):t.text!==void 0&&(n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=uf$1(e,"span","pptxv-btn-label");o.textContent=t.textLabel,n.appendChild(o);}return n.addEventListener("click",t.onClick),{btn:n,setActive(o){n.classList.toggle("is-active",o),n.setAttribute("aria-pressed",String(o));},setDisabled(o){n.disabled=o;}}}function Rx(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Fe(e,t,n="#000000"){let o=uf$1(e,"label","pptxv-color");o.title=t.label,o.setAttribute("aria-label",t.label);let r=e.createElement("input");return r.type="color",r.className="pptxv-color-input",r.value=n,r.setAttribute("aria-label",t.label),r.addEventListener("input",()=>t.onInput(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=Rx(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function Y(e,t){let n=uf$1(e,"label","pptxv-field"),o=uf$1(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("input");r.type="number",r.className="pptxv-field-input",r.setAttribute("aria-label",t.label),t.min!==void 0&&(r.min=String(t.min)),t.max!==void 0&&(r.max=String(t.max)),r.step=String(t.step??1),n.appendChild(r);let i=()=>{let a=Number.parseFloat(r.value);Number.isFinite(a)&&t.onCommit(a);};return r.addEventListener("change",i),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&i();}),{el:n,input:r,setValue(a){e.activeElement!==r&&(r.value=String(Math.round(a*100)/100));},setDisabled(a){r.disabled=a;}}}function xd(e,t,n){let o=Hf(e,t,n);return {position:o.position,left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,opacity:String(o.opacity),transform:o.transform,transition:o.transition,"box-shadow":o.boxShadow,border:o.border,"border-radius":o.borderRadius,"pointer-events":o.pointerEvents,"z-index":String(o.zIndex)}}function Ox(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=uf$1(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let a=uf$1(e,"div","pptxv-ai-change-ghost",xd(i,"start",t.config));a.setAttribute("data-ai-change",i.kind),a.setAttribute("data-export-ignore","true"),r.appendChild(a);}return r}function Fx(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n),r=e.children;for(let i=0;i<r.length&&i<o.length;i+=1){let a=r[i],s=xd(o[i],"end",t.config);for(let[p,l]of Object.entries(s))a.style.setProperty(p,String(l));}}function gd(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,a=o.current(),s=0,p=0,l=()=>{s&&(cancelAnimationFrame(s),s=0),p&&(cancelAnimationFrame(p),p=0);},m=g=>{a&&((!i||!i.isConnected)&&(i=uf$1(t,"style","pptxv-ai-change-css"),(g??t.head).appendChild(i)),i.textContent=Gf(a.config));},d=()=>{if(l(),r?.remove(),r=null,!a)return;let g=e.getStageRoot();if(!g)return;m(g.parentElement);let f=n.get().currentSlide,v=Ox(t,a,f);if(!v)return;g.appendChild(v),r=v;let b=a;s=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>{r&&Fx(r,b,f);});});},u=n.subscribe(d),x=o.subscribe(g=>{a=g,g&&e.goToSlide(g.slideIndex),d();});return d(),{destroy(){l(),u(),x(),r?.remove(),r=null,i?.remove(),i=null;}}}var Bx="[data-element-id]";function ee(e,t){if(!t||!(e instanceof Element))return null;let n=e.closest(Bx);if(!n||!t.contains(n)||n===t)return null;let o=n,r=n.parentElement;for(;r&&r!==t;)r.hasAttribute("data-element-id")&&(o=r),r=r.parentElement;return r===t?o.getAttribute("data-element-id"):null}function bd(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,a=null,s=()=>{a?.remove(),a=null;},p=d=>{let u=o.get().currentSlide,x=o.get().slides[u]?.elements.find(g=>g.id===d)??null;return o.set({selectedElementId:d,selectedElementIds:[d]}),x},l=(d,u,x)=>{let g=uf$1(t,"button","pptxv-ai-menu-item");return g.type="button",g.append(Df(t,d),t.createTextNode(u)),g.addEventListener("click",()=>{x(),s();}),g},m=d=>{let u=ee(d.target,e.getStageRoot());if(!u)return;d.preventDefault(),s();let x=p(u),g=o.get().currentSlide;a=uf$1(t,"div","pptxv-ai-menu",{left:`${d.clientX}px`,top:`${d.clientY}px`}),a.setAttribute("role","menu"),a.append(l("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),l("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(x,g))),t.body.appendChild(a);let f=v=>{v instanceof KeyboardEvent&&v.key!=="Escape"||v.target instanceof Node&&a?.contains(v.target)||(s(),t.removeEventListener("pointerdown",f,true),t.removeEventListener("keydown",f,true));};t.addEventListener("pointerdown",f,true),t.addEventListener("keydown",f,true);};return i.addEventListener("contextmenu",m),{destroy(){i.removeEventListener("contextmenu",m),s();}}}function fd(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let p=e.getStageRoot();if(!p)return;o.isAnimating()?p.setAttribute("data-pptx-ai-active","true"):p.removeAttribute("data-pptx-ai-active");let l=n.get(),m=o.getHighlights().filter(g=>g.slideIndex===l.currentSlide);if(m.length===0)return;let d=l.slides[l.currentSlide]?.elements??[],u=new Map(d.map(g=>[g.id,g])),x=uf$1(t,"div","pptxv-ai-hl-layer");for(let g of m){let f=u.get(g.elementId);if(!f)continue;let v=uf$1(t,"div",`pptxv-ai-hl pptxv-ai-hl-${g.variant}`,{left:`${f.x-3}px`,top:`${f.y-3}px`,width:`${f.width+6}px`,height:`${f.height+6}px`});x.appendChild(v);}p.appendChild(x),r=x;},a=n.subscribe(i),s=o.subscribe(i);return i(),{destroy(){a(),s(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function vd(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let a=ee(i.target,e.getStageRoot());a&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,a));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function Vx(e){return e.stageWrap.querySelector(".pptxv-stage")}function An(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>Vx(n),a=[],s=(b,E)=>{let A=M(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:E,onClick:()=>{v(!g);}});A.btn.setAttribute("aria-expanded","false"),b.appendChild(A.btn),a.push(A);};s(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&s(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let p=uf$1(t,"aside","pptxv-ai-panel");p.setAttribute("aria-label",o("pptx.ai.title")),p.hidden=true,(n.viewport.parentElement??n.root).appendChild(p);let l=fd({doc:t,store:e.store,controller:r,getStageRoot:i}),m=vd({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),d=bd({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),u=null,x=null,g=false,f=false,v=async b=>{g=b,p.hidden=!g;for(let E of a)E.setActive(g),E.btn.setAttribute("aria-expanded",String(g));if(!(!g||u||f)){f=true,p.classList.add("is-loading");try{let{createAiPanel:E}=await import('./ai-panel-NB4EQN3N.js');u=await E({host:p,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide}),u.changeAnimator&&(x=gd({doc:t,store:e.store,animator:u.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{f=false,p.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){x?.destroy(),x=null,u?.destroy(),u=null,d.destroy(),m.destroy(),l.destroy(),r.dispose();for(let b of a)b.btn.remove();p.remove();}}}function Jt(e){let t=new Map;return new Proxy({},{get(n,o){if(typeof o!="string")return;let r=t.get(o);return r||(r=(...i)=>e()[o](...i),t.set(o,r)),r}})}function hd(e){return {ribbonHandlers:{nav:{prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>e.togglePresentation(),normalView:()=>e.returnToNormalView(),toggleNotes:()=>e.toggleNotes(),openAccessibility:()=>e.openAccessibility(),openSettings:o=>e.openSettings(o),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),toggleViewOption:o=>e.getEditActions().toggleViewOption(o),addGuide:o=>e.getEditActions().addGuide(o),activateEyedropper:()=>e.getEditActions().activateEyedropper(),toggleSpellCheck:()=>e.getEditActions().toggleSpellCheck()},primary:{undo:()=>e.undo(),redo:()=>e.redo(),save:()=>e.save()},file:{openFile:()=>e.openFile(),openRecentFile:o=>e.openRecentFile(o),createPresentation:o=>e.createPresentation(o),openSettings:()=>e.openSettings("general"),openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},packageForSharing:()=>{e.packageForSharing();},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow()},edit:Jt(()=>e.getEditActions()),insert:{insert:(o,r)=>e.getEditActions().insert(o,r),insertImage:()=>e.getEditActions().insertImage(),insertMedia:()=>e.getEditActions().insertMedia(),insertChart:o=>e.getEditActions().insertChart(o),insertSmartArt:(o,r)=>e.getEditActions().insertSmartArt(o,r),insertEquation:o=>e.getEditActions().insertEquation(o),insertActionButton:o=>e.getEditActions().insertActionButton(o),insertField:(o,r)=>e.getEditActions().insertField(o,r)},findReplace:Jt(()=>e.getFindReplaceActions()),design:{setTheme:o=>e.setTheme(o),applyPresentationTheme:o=>e.applyPresentationTheme(o)},draw:{setTool:o=>e.setDrawTool(o),setColor:o=>e.setDrawColor(o),setWidth:o=>e.setDrawWidth(o)}},inspectorHandlers:{selectElement:o=>e.selectElement(o),openDocumentProperties:()=>e.openDocumentProperties(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),addComment:o=>{e.getEditActions().comments.addComment(o);},addCommentReply:(o,r)=>{e.getEditActions().comments.addCommentReply(o,r);},editComment:(o,r)=>e.getEditActions().comments.editComment(o,r),deleteComment:o=>e.getEditActions().comments.deleteComment(o),toggleCommentResolved:o=>e.getEditActions().comments.toggleCommentResolved(o),setAnimationEffect:(o,r)=>e.getEditActions().setAnimationEffect(o,r),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),setShapeFill:o=>e.getEditActions().setShapeFill(o),setShapeStroke:o=>e.getEditActions().setShapeStroke(o),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),setTextVerticalAlign:o=>e.getEditActions().setTextVerticalAlign(o),setTextWrap:o=>e.getEditActions().setTextWrap(o),setAutoFitMode:o=>e.getEditActions().setAutoFitMode(o),setTextAdvanced:o=>e.getEditActions().setTextAdvanced(o),setTextStyle:(o,r)=>e.getEditActions().setTextStyle(o,r),setFillOpacity:o=>e.getEditActions().setFillOpacity(o),setStrokeOpacity:o=>e.getEditActions().setStrokeOpacity(o),setGradientFill:o=>e.getEditActions().setGradientFill(o),addGradientStop:(o,r)=>e.getEditActions().addGradientStop(o,r),removeGradientStop:o=>e.getEditActions().removeGradientStop(o),updateGradientStop:(o,r)=>e.getEditActions().updateGradientStop(o,r),setImageBrightness:o=>e.getEditActions().setImageBrightness(o),setImageContrast:o=>e.getEditActions().setImageContrast(o),setImageSaturation:o=>e.getEditActions().setImageSaturation(o),setImageCrop:(o,r)=>e.getEditActions().setImageCrop(o,r),setImageEffects:o=>e.getEditActions().setImageEffects(o),replaceImage:()=>{e.getEditActions().replaceSelectedImage();},resetImage:()=>e.getEditActions().resetSelectedImage(),setElementAction:(o,r)=>e.getEditActions().setElementAction(o,r),setChartData:o=>e.getEditActions().setChartData(o),setMediaProperties:o=>e.getEditActions().setMediaProperties(o),setTableHeaderRow:o=>e.getEditActions().setTableHeaderRow(o),setTableBandedRows:o=>e.getEditActions().setTableBandedRows(o),setTableCellPadding:o=>e.getEditActions().setTableCellPadding(o),setTableOptions:(o,r)=>e.getEditActions().setTableOptions(o,r),setTableCellStyle:(o,r,i)=>e.getEditActions().setTableCellStyle(o,r,i),setTableCellStyles:(o,r)=>e.getEditActions().setTableCellStyles(o,r),mutateTableStructure:(o,r)=>e.getEditActions().mutateTableStructure(o,r),setTableColumnWidth:(o,r)=>e.getEditActions().setTableColumnWidth(o,r),setTableRowHeight:(o,r)=>e.getEditActions().setTableRowHeight(o,r),mergeTableCells:o=>e.getEditActions().mergeTableCells(o),splitTableCell:o=>e.getEditActions().splitTableCell(o),setSmartArtNodeText:(o,r)=>e.getEditActions().setSmartArtNodeText(o,r),setSmartArtNodeStyle:(o,r)=>e.getEditActions().setSmartArtNodeStyle(o,r),mutateSmartArtNode:(o,r)=>e.getEditActions().mutateSmartArtNode(o,r),setSmartArtLayout:o=>e.getEditActions().setSmartArtLayout(o),setSmartArtColorScheme:o=>e.getEditActions().setSmartArtColorScheme(o)},onSelectSlide:o=>e.goToSlide(o),onToggleNotes:()=>e.toggleNotes(),onCommitNotes:(o,r)=>e.commitNotes(o,r)}}function kn(e){return e.presenting&&e.animationBuildsComplete&&!me(e.currentSlide)}function at(e,t,n){for(let r of n)e.style.removeProperty(r);let o=G$1(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function In(e,t,n){let o=uf$1(e,"section","pptxv-accessibility-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","false"),o.setAttribute("aria-label",t("pptx.accessibility.title"));let r=uf$1(e,"div","pptxv-accessibility-header"),i=uf$1(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let a=uf$1(e,"button","pptxv-accessibility-close");a.type="button",a.textContent=t("pptx.accessibility.close"),a.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,a),o.appendChild(r);let s=uf$1(e,"p","pptxv-accessibility-summary");o.appendChild(s);let p=uf$1(e,"div","pptxv-accessibility-list");p.setAttribute("role","list"),p.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(p);let l=()=>{o.hidden=true;};a.addEventListener("click",l);let m=d=>{let u=uf$1(e,"section",`pptxv-accessibility-group is-${d.severity}`),x=uf$1(e,"h3","pptxv-accessibility-group-title");x.textContent=`${d.label} (${d.issues.length})`,u.appendChild(x);for(let[g,f]of d.issues.entries()){let v=uf$1(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=ed(f,g);let b=uf$1(e,"strong","pptxv-accessibility-issue-type");b.textContent=dd(f.type);let E=uf$1(e,"span","pptxv-accessibility-issue-message");E.textContent=f.message;let A=uf$1(e,"span","pptxv-accessibility-issue-slide");A.textContent=`Slide ${f.slideIndex+1}`,v.append(b,E,A),v.addEventListener("click",()=>n(f.slideIndex)),u.appendChild(v);}p.appendChild(u);};return {el:o,open(d){if(p.replaceChildren(),s.textContent=t("pptx.accessibility.issueCount",{count:d.length}),d.length===0){let u=uf$1(e,"p","pptxv-accessibility-empty");u.textContent=t("pptx.accessibility.noIssuesFound"),p.appendChild(u);}else for(let u of cd(d))m(u);o.hidden=false,a.focus();},close:l}}var Nx=["none","url","slide","firstSlide","lastSlide","prevSlide","nextSlide","endShow"];function Sd(e,t,n,o){let r=n(t("pptx.action.title")),i=yd(e,t,"click",o),a=yd(e,t,"hover",o);return r.append(i.el,a.el),{el:r,update(s){r.hidden=!s.hasSelection,i.update(s.actionClick),a.update(s.actionHover);}}}function yd(e,t,n,o){let r=e.createElement("fieldset"),i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let a=e.createElement("select");for(let m of Nx){let d=e.createElement("option");d.value=m,d.textContent=t(`pptx.hyperlink.action${zx(m)}`),a.appendChild(d);}let s=e.createElement("input"),p=()=>{let m=a.value;o.setElementAction(n,{trigger:n,type:m,url:m==="url"?s.value:void 0,slideIndex:m==="slide"?Math.max(0,s.valueAsNumber-1):void 0});},l=()=>{s.hidden=a.value!=="url"&&a.value!=="slide",s.type=a.value==="slide"?"number":"url",s.placeholder=a.value==="slide"?t("pptx.action.slideNumberPlaceholder"):"https://",a.value==="slide"&&(s.min="1",s.step="1");};return a.addEventListener("change",()=>{l(),p();}),s.addEventListener("change",p),r.append(i,a,s),{el:r,update(m){a.value=m?.type??"none",s.value=m?.type==="slide"?String((m.slideIndex??0)+1):m?.url??"",l();}}}function zx(e){return e[0].toUpperCase()+e.slice(1)}var Cd=["fromTop","fromBottom","fromLeft","fromRight"],wd=[{value:"ease",labelKey:"pptx.animation.timingCurve.ease"},{value:"ease-in",labelKey:"pptx.animation.timingCurve.easeIn"},{value:"ease-out",labelKey:"pptx.animation.timingCurve.easeOut"},{value:"linear",labelKey:"pptx.animation.timingCurve.linear"}],Ed=["none","untilNextClick","untilEndOfSlide"];function eo(e,t,n){let o=uf$1(e,"label","pptxv-anim-field"),r=uf$1(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function Be(e,t,n,o,r){let i=eo(e,t,r),a=e.createElement("select");for(let s of n){let p=e.createElement("option");p.value=s.value,p.textContent=s.label,a.appendChild(p);}return a.addEventListener("change",()=>o(a.value)),i.appendChild(a),a}function to(e,t,n,o,r){let i=eo(e,t,r),a=e.createElement("input");return a.type="number",a.min=String(n.min),a.max=String(n.max),a.step=String(n.step),a.addEventListener("change",()=>o(a.valueAsNumber)),i.appendChild(a),a}function Ln(e){return b(e)&&e.text?e.text.slice(0,24):e.type}function Td(e,t){let n=t.find(o=>o.id===e.elementId);return n?Ln(n):e.elementId.slice(0,8)}function Gx(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function Pd(e,t,n,o,r){let i=1;for(let a of n)i=Math.max(i,(a.delayMs??0)+(a.durationMs??500));t.replaceChildren(...n.map(a=>{let s=uf$1(e,"div","pptxv-anim-bar-seg");s.classList.add(`is-${Gx(a)}`),s.classList.toggle("is-selected",a.elementId===r);let p=(a.delayMs??0)/i*100,l=Math.max((a.durationMs??500)/i*100,2);s.style.left=`${p}%`,s.style.width=`${l}%`;let m=a.entrance??a.emphasis??a.exit??"custom";return s.title=`${Td(a,o)} - ${m} (${a.durationMs??500}ms)`,s}));}function Ad(e,t,n,o,r,i,a,s,p){let l=uf$1(e,"div","pptxv-animation-timeline-row");l.classList.toggle("is-selected",n.elementId===a);let m=uf$1(e,"span","pptxv-animation-timeline-name");m.textContent=`${o+1}. ${Td(n,i)}`;let d=(u,x,g)=>{let f=uf$1(e,"button","pptxv-btn");return f.type="button",f.textContent=x,f.setAttribute("aria-label",t(u==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),f.disabled=g,f.addEventListener("click",()=>p(n.elementId,u)),f};return l.append(m,d("up","\u2191",!s||o===0),d("down","\u2193",!s||o===r-1)),l}function kd(e,t){if(!t)return;let n=t.entrance??t.emphasis??t.exit;if(!n)return;let o=ra(n,{direction:t.direction,durationMs:t.durationMs,timingCurve:t.timingCurve});if(!o)return;let r=e.querySelector(`[data-element-id="${CSS.escape(t.elementId)}"]`);if(!r)return;let i=`pptxv-anim-preview-${o.keyframeName}`;if(!e.getElementById(i)){let s=e.createElement("style");s.id=i,s.textContent=o.keyframesCss,(e.head??e.documentElement).appendChild(s);}r.style.animation="none",r.offsetWidth,r.style.animation=o.cssAnimation;let a=()=>{r.style.animation="";};r.addEventListener("animationend",a,{once:true}),setTimeout(a,o.durationMs+250);}function Id(e,t,n){let o=uf$1(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(L=>L.elementId===r.selectedElementId),a=uf$1(e,"div","pptxv-anim-header"),s=uf$1(e,"span","pptxv-inspector-section-title");s.textContent=t("pptx.animation.title");let p=uf$1(e,"button","pptxv-anim-preview-btn");p.type="button",p.textContent=t("pptx.animation.preview"),p.addEventListener("click",()=>kd(e,i())),a.append(s,p),o.appendChild(a);let l=(L,R,B)=>Be(e,t(R),[{value:"none",label:t("pptx.animation.none")},...B.map(F=>({value:F,label:t(`pptx.animation.preset.${F}`)}))],F=>n.setAnimationEffect(L,F),o),m=l("entrance","pptx.animation.entrance",V),d=l("emphasis","pptx.animation.emphasis",X),u=l("exit","pptx.animation.exit",W),x=uf$1(e,"div","pptxv-anim-options");o.appendChild(x);let g=L=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,L);},f=eo(e,t("pptx.animation.direction"),x);f.classList.add("pptxv-anim-direction");let v=Cd.map(L=>{let R=uf$1(e,"button","pptxv-anim-direction-btn");return R.type="button",R.textContent=t(`pptx.animation.direction.${L}`),R.addEventListener("click",()=>g({direction:L})),f.appendChild(R),{value:L,btn:R}}),b=Be(e,t("pptx.animation.sequence"),Z.map(L=>({value:L,label:t(`pptx.animation.sequence.${L}`)})),L=>g({sequence:L}),x),E=uf$1(e,"span","pptxv-inspector-section-title");E.textContent=t("pptx.animation.timing"),x.appendChild(E);let A=Be(e,t("pptx.animation.trigger"),Y$1.map(L=>({value:L,label:t(`pptx.animation.trigger.${L}`)})),L=>g({trigger:L,triggerShapeId:""}),x),S=Be(e,t("pptx.animation.trigger.shapeLabel"),[],L=>g({triggerShapeId:L}),x),h=S.parentElement,C=to(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},L=>g({durationMs:L}),x),y=to(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},L=>g({delayMs:L}),x),P=Be(e,t("pptx.animation.timingCurve"),wd.map(L=>({value:L.value,label:t(L.labelKey)})),L=>g({timingCurve:L}),x),T=to(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},L=>g({repeatCount:L}),x),w=Be(e,t("pptx.animation.repeatUntil"),Ed.map(L=>({value:L,label:t(`pptx.animation.repeatUntil.${L}`)})),L=>g({repeatMode:L}),x),k=uf$1(e,"div","pptxv-anim-timeline"),I=uf$1(e,"span","pptxv-inspector-section-title");I.textContent=t("pptx.animation.timelineBar");let H=uf$1(e,"div","pptxv-anim-bar"),D=uf$1(e,"span","pptxv-inspector-section-title");D.textContent=t("pptx.animation.timeline");let O=uf$1(e,"div","pptxv-animation-timeline-list");return k.append(I,H,D,O),o.appendChild(k),{el:o,update(L){if(r=L,o.hidden=!L.selectedElementId,o.hidden)return;let R=i(),B=!!(R?.entrance||R?.emphasis||R?.exit);m.value=R?.entrance??"none",d.value=R?.emphasis??"none",u.value=R?.exit??"none",p.hidden=!B,x.hidden=!B;let F=_.has(R?.entrance??"")||_.has(R?.exit??"");f.hidden=!F;for(let{value:N,btn:W}of v)W.classList.toggle("is-active",R?.direction===N),W.disabled=!L.editable;b.value=R?.sequence??"asOne",A.value=R?.trigger??"onClick",h.hidden=A.value!=="onShapeClick",S.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...L.elements.filter(N=>N.id!==L.selectedElementId).map(N=>({id:N.id,label:Ln(N)}))].map(N=>{let W=e.createElement("option");return W.value=N.id,W.textContent=N.label,W})),S.value=R?.triggerShapeId??"",C.value=String(R?.durationMs??450),y.value=String(R?.delayMs??0),P.value=R?.timingCurve??"ease",T.value=String(R?.repeatCount??1),w.value=R?.repeatMode??"none";for(let N of [m,d,u,b,A,S,P,w])N.disabled=!L.editable;C.disabled=y.disabled=T.disabled=!L.editable;let V=[...L.animations].sort((N,W)=>(N.order??0)-(W.order??0));k.hidden=V.length===0,Pd(e,H,V,L.elements,L.selectedElementId),O.replaceChildren(...V.map((N,W)=>Ad(e,t,N,W,V.length,L.elements,L.selectedElementId,L.editable,n.reorderAnimation)));}}}function Md(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-advanced";let r=pt(e,t("pptx.chart.axis"),[]),i=Ve(e,t("pptx.chart.axisMinimum")),a=Ve(e,t("pptx.chart.axisMaximum")),s=Ve(e,t("pptx.chart.majorUnit")),p=st(e,t("pptx.chart.logScale")),l=st(e,t("pptx.chart.reverseOrder")),m=st(e,t("pptx.chart.majorGridlines")),d=pt(e,t("pptx.chart.series"),[]),u=pt(e,t("pptx.chart.trendlines"),["","linear","exponential","logarithmic","polynomial","power","movingAvg"]),x=st(e,t("pptx.chart.trendlineEquation")),g=st(e,t("pptx.chart.trendlineRSquared")),f=pt(e,t("pptx.chart.errorBars"),["","fixedVal","percentage","stdDev","stdErr"]),v=Ve(e,t("pptx.chart.errorBarAmount")),b=pt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"]),E=Ve(e,t("pptx.chart.markerSize")),A=Ld(e,t("pptx.chart.seriesColor")),S=Ve(e,t("pptx.chart.dataPointIndex")),h=Ld(e,t("pptx.chart.dataPointColor")),C=Ve(e,t("pptx.chart.explosion"));o.append(r.label,i.label,a.label,s.label,p.label,l.label,m.label,d.label,u.label,x.label,g.label,f.label,v.label,b.label,E.label,A.label,S.label,h.label,C.label);let y,P=()=>Math.max(0,r.control.selectedIndex),T=()=>Math.max(0,d.control.selectedIndex),w=()=>{if(!y)return;let H=[...y.axes??[]],D=H[P()]??{axisType:"valAx"};H[P()]={...D,min:qe(i.control),max:qe(a.control),majorUnit:qe(s.control),logScale:p.control.checked,orientation:l.control.checked?"maxMin":"minMax",majorGridlines:m.control.checked},n({...y,axes:H});},k=()=>{if(!y?.series[T()])return;let H=[...y.series],D=H[T()],O=u.control.value,L=f.control.value,R=Math.max(0,(S.control.valueAsNumber||1)-1),B=[...D.dataPoints??[]],F=B.findIndex(({idx:N})=>N===R),V={...F>=0?B[F]:{idx:R},spPr:{...F>=0?B[F].spPr:{},fillColor:h.control.value},explosion:qe(C.control)};F>=0?B[F]=V:B.push(V),H[T()]={...D,color:A.control.value,trendlines:O?[{trendlineType:O,displayEq:x.control.checked,displayRSq:g.control.checked}]:[],errBars:L?[{direction:"y",barType:"both",valType:L,val:qe(v.control)}]:[],marker:{symbol:b.control.value,size:qe(E.control)},dataPoints:B},n({...y,series:H});};for(let H of [i.control,a.control,s.control,p.control,l.control,m.control])H.addEventListener("change",w);for(let H of [u.control,x.control,g.control,f.control,v.control,b.control,E.control,A.control,S.control,h.control,C.control])H.addEventListener("change",k);r.control.addEventListener("change",()=>y&&I(y)),d.control.addEventListener("change",()=>y&&I(y));let I=H=>{y=H,Mn(e,r.control,(H.axes??[]).map((R,B)=>[String(B),R.titleText??R.axisType])),Mn(e,d.control,H.series.map((R,B)=>[String(B),R.name]));let D=H.axes?.[P()];Ke(i.control,D?.min),Ke(a.control,D?.max),Ke(s.control,D?.majorUnit),p.control.checked=D?.logScale??false,l.control.checked=D?.orientation==="maxMin",m.control.checked=D?.majorGridlines??false;let O=H.series[T()];u.control.value=O?.trendlines?.[0]?.trendlineType??"",x.control.checked=O?.trendlines?.[0]?.displayEq??false,g.control.checked=O?.trendlines?.[0]?.displayRSq??false,f.control.value=O?.errBars?.[0]?.valType??"",Ke(v.control,O?.errBars?.[0]?.val),b.control.value=O?.marker?.symbol??"none",Ke(E.control,O?.marker?.size),A.control.value=O?.color??"#4472c4";let L=O?.dataPoints?.find(({idx:R})=>R===Math.max(0,(S.control.valueAsNumber||1)-1));h.control.value=L?.spPr?.fillColor??O?.color??"#4472c4",Ke(C.control,L?.explosion);};return {el:o,update:I}}function oo(e,t,n){let o=e.createElement("label");return o.textContent=t,o.appendChild(n),{label:o,control:n}}function Ve(e,t){let n=e.createElement("input");return n.type="number",oo(e,t,n)}function Ld(e,t){let n=e.createElement("input");return n.type="color",oo(e,t,n)}function st(e,t){let n=e.createElement("input");return n.type="checkbox",oo(e,t,n)}function pt(e,t,n){let o=e.createElement("select");return Mn(e,o,n.map(r=>[r,r])),oo(e,t,o)}function Mn(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let a=e.createElement("option");return a.value=r,a.textContent=i,a})),t.value=o;}function qe(e){return e.value===""?void 0:e.valueAsNumber}function Ke(e,t){e.value=t===void 0?"":String(t);}function Dd(e,t,n){let o=e.createElement("label");return o.textContent=t,o.appendChild(n),{label:o,control:n}}function ke(e,t){return Dd(e,t,e.createElement("input"))}function he(e,t){let n=ke(e,t);return n.control.type="number",n}function Ne(e,t){let n=ke(e,t);return n.control.type="color",n}function ue(e,t){let n=ke(e,t);return n.control.type="checkbox",n}function ye(e,t,n){let o=e.createElement("select");return no(e,o,n.map(r=>[r,r])),Dd(e,t,o)}function no(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let a=e.createElement("option");return a.value=r,a.textContent=i,a})),t.value=o;}function Se(e){return e.value===""?void 0:e.valueAsNumber}function Ce(e,t){e.value=t===void 0?"":String(t);}function Dn(e){return e.split(",").map(Number).filter(Number.isFinite)}function Hd(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-exhaustive";let r=ye(e,t("pptx.chart.series"),[]),i=ye(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"]),a=ue(e,t("pptx.chart.secondaryAxis")),s=ye(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"]),p=ue(e,t("pptx.chart.showValue")),l=ue(e,t("pptx.chart.showCategory")),m=ue(e,t("pptx.chart.showSeriesName")),d=ue(e,t("pptx.chart.showPercentage")),u=ue(e,t("pptx.chart.showLeaderLines")),x=he(e,t("pptx.chart.trendlineOrder")),g=he(e,t("pptx.chart.trendlinePeriod")),f=he(e,t("pptx.chart.forecastForward")),v=he(e,t("pptx.chart.forecastBackward")),b=he(e,t("pptx.chart.trendlineIntercept")),E=Ne(e,t("pptx.chart.trendlineColor")),A=ye(e,t("pptx.chart.errorBarDirection"),["x","y"]),S=ye(e,t("pptx.chart.errorBarType"),["both","minus","plus"]),h=Ne(e,t("pptx.chart.errorBarColor")),C=ue(e,t("pptx.chart.noEndCap")),y=ke(e,t("pptx.chart.customPlus")),P=ke(e,t("pptx.chart.customMinus")),T=Ne(e,t("pptx.chart.markerFill")),w=Ne(e,t("pptx.chart.markerOutline")),k=ye(e,t("pptx.chart.dataPointMarker"),["none","circle","diamond","square","star","triangle","x","plus"]),I=he(e,t("pptx.chart.markerSize")),H=ue(e,t("pptx.chart.invertIfNegative")),D=ye(e,t("pptx.chart.axis"),[]),O=ke(e,t("pptx.chart.axisTitle")),L=he(e,t("pptx.chart.minorUnit")),R=ue(e,t("pptx.chart.minorGridlines")),B=ke(e,t("pptx.chart.numberFormat")),F=ye(e,t("pptx.chart.tickLabelPosition"),["nextTo","high","low","none"]),V=Ne(e,t("pptx.chart.axisColor")),N=Ne(e,t("pptx.chart.axisFontColor")),W=he(e,t("pptx.chart.axisFontSize")),Z=[r,i,a,s,p,l,m,d,u,x,g,f,v,b,E,A,S,h,C,y,P,T,w,k,I,H,D,O,L,R,B,F,V,N,W];o.append(...Z.map(({label:U})=>U));let K,Mo=()=>Math.max(0,r.control.selectedIndex),Do=()=>Math.max(0,D.control.selectedIndex),wx=()=>{let U=K?.series[Mo()];if(!K||!U)return;let Q=[...K.series],fe=U.trendlines?.[0],ve=U.errBars?.[0],Pe=U.dataPoints?.[0]??{idx:0};Q[Mo()]={...U,seriesChartType:i.control.value,axisId:a.control.checked?K.axes?.find(ne=>ne.axPos==="r")?.axisId:K.axes?.find(ne=>ne.axPos==="l")?.axisId,trendlines:fe?[{...fe,order:Se(x.control),period:Se(g.control),forward:Se(f.control),backward:Se(v.control),intercept:Se(b.control),color:E.control.value}]:[],errBars:ve?[{...ve,direction:A.control.value,barType:S.control.value,color:h.control.value,noEndCap:C.control.checked,customPlus:Dn(y.control.value),customMinus:Dn(P.control.value)}]:[],marker:{...U.marker??{symbol:"auto"},spPr:{fillColor:T.control.value,strokeColor:w.control.value}},dataPoints:[{...Pe,invertIfNegative:H.control.checked,marker:{symbol:k.control.value,size:Se(I.control)}},...U.dataPoints?.slice(1)??[]]},n({...K,series:Q,style:{...K.style,hasDataLabels:true,dataLabels:{...K.style?.dataLabels,position:s.control.value,showValue:p.control.checked,showCategory:l.control.checked,showSeriesName:m.control.checked,showPercent:d.control.checked,showLeaderLines:u.control.checked}}});},Ex=()=>{let U=K?.axes?.[Do()];if(!K||!U)return;let Q=[...K.axes??[]];Q[Do()]={...U,titleText:O.control.value,minorUnit:Se(L.control),minorGridlines:R.control.checked,numFmt:{formatCode:B.control.value},tickLblPos:F.control.value,spPr:{...U.spPr,strokeColor:V.control.value},fontColor:N.control.value,fontSize:Se(W.control)},n({...K,axes:Q});};for(let U of Z.slice(1,26))U.control.addEventListener("change",wx);for(let U of Z.slice(27))U.control.addEventListener("change",Ex);r.control.addEventListener("change",()=>K&&Ho(K)),D.control.addEventListener("change",()=>K&&Ho(K));let Ho=U=>{K=U,no(e,r.control,U.series.map((Ue,Ro)=>[String(Ro),Ue.name])),no(e,D.control,(U.axes??[]).map((Ue,Ro)=>[String(Ro),Ue.titleText??Ue.axisType]));let Q=U.series[Mo()],fe=Q?.trendlines?.[0],ve=Q?.errBars?.[0];i.control.value=Q?.seriesChartType??U.chartType,a.control.checked=!!(Q?.axisId&&U.axes?.find(Ue=>Ue.axisId===Q.axisId)?.axPos==="r");let Pe=U.style?.dataLabels;s.control.value=Pe?.position??"bestFit",p.control.checked=Pe?.showValue??false,l.control.checked=Pe?.showCategory??false,m.control.checked=Pe?.showSeriesName??false,d.control.checked=Pe?.showPercent??false,u.control.checked=Pe?.showLeaderLines??false,Ce(x.control,fe?.order),Ce(g.control,fe?.period),Ce(f.control,fe?.forward),Ce(v.control,fe?.backward),Ce(b.control,fe?.intercept),E.control.value=fe?.color??"#4472c4",A.control.value=ve?.direction??"y",S.control.value=ve?.barType??"both",h.control.value=ve?.color??"#000000",C.control.checked=ve?.noEndCap??false,y.control.value=ve?.customPlus?.join(", ")??"",P.control.value=ve?.customMinus?.join(", ")??"",T.control.value=Q?.marker?.spPr?.fillColor??"#4472c4",w.control.value=Q?.marker?.spPr?.strokeColor??"#000000",k.control.value=Q?.dataPoints?.[0]?.marker?.symbol??"none",Ce(I.control,Q?.dataPoints?.[0]?.marker?.size),H.control.checked=Q?.dataPoints?.[0]?.invertIfNegative??false;let ne=U.axes?.[Do()];O.control.value=ne?.titleText??"",Ce(L.control,ne?.minorUnit),R.control.checked=ne?.minorGridlines??false,B.control.value=ne?.numFmt?.formatCode??"",F.control.value=ne?.tickLblPos??"nextTo",V.control.value=ne?.spPr?.strokeColor??"#000000",N.control.value=ne?.fontColor??"#000000",Ce(W.control,ne?.fontSize);};return {el:o,update:Ho}}var _x=["bar","line","pie","doughnut","area","scatter","bubble","radar","waterfall","funnel","treemap","sunburst","combo"];function Vd(e,t,n,o){let r=n(t("pptx.chart.data")),i=Nd(e,"text",t("pptx.chart.title")),a=e.createElement("select");for(let v of _x)Bd(e,a,v);let s=e.createElement("select");for(let v of ["clustered","stacked","percentStacked"])Bd(e,s,v);let p=Rd(e,t("pptx.chart.categories")),l=Rd(e,t("pptx.chart.series")),m=Od(e,t("pptx.chart.legend")),d=Od(e,t("pptx.chart.dataLabels")),u=Md(e,t,v=>o.setChartData(v)),x=Hd(e,t,v=>o.setChartData(v));r.append(i.label,a,s,p.label,l.label,m.label,d.label,u.el,x.el);let g,f=()=>{g&&o.setChartData({...g,title:i.control.value,chartType:a.value,grouping:s.value,categories:Fd(p.control.value),series:Fd(l.control.value).map(Ux),style:{...g.style,hasTitle:i.control.value.trim().length>0,hasLegend:m.control.checked,hasDataLabels:d.control.checked}});};for(let v of [i.control,a,s,p.control,l.control,m.control,d.control])v.addEventListener("change",f);return {el:r,update(v){r.hidden=!v.isChart,g=v.chartData,g&&(i.control.value=g.title??"",a.value=g.chartType,s.value=g.grouping??"clustered",p.control.value=g.categories.join(`
1
+ import {uf as uf$1,Ae,D,zf,Af,P,O,N,Dc as Dc$1,qe as qe$1,K,Cf,bc as bc$1,dc as dc$1,_d as _d$1,Yd as Yd$1,bb as bb$1,ab as ab$1,j as j$1,re as re$1,bd as bd$1,Cc as Cc$1,Ec as Ec$1,Hc as Hc$1,Ic as Ic$1,Jc as Jc$1,Ac as Ac$1,Bc,uc as uc$1,Fc,Gc as Gc$1,Oc as Oc$1,Kc as Kc$1,Lc as Lc$1,Mc as Mc$1,Td as Td$1,Ud as Ud$1,ze as ze$1,Df,T,S,Zd as Zd$1,Kd as Kd$1,I,J as J$1,e,V,X,W,Bf,Ve as Ve$1,Ue,Le as Le$1,Me as Me$1,Qe,Se as Se$1,Be as Be$1,Pe,Sb as Sb$1,G as G$1,Jd as Jd$1,Id as Id$1,he as he$1,ie as ie$1,je as je$1,ke as ke$1,Sd as Sd$1,ec as ec$1,fc as fc$1,ae,R,Q,nb as nb$1,Wd as Wd$1,Xd as Xd$1,$d as $d$1,Ld as Ld$1,Md as Md$1,Nd as Nd$1,Pd as Pd$1,Od as Od$1,b,zd as zd$1,Sc as Sc$1,H,x,be as be$1,Pc as Pc$1,wd as wd$1,Ua,Cb as Cb$1,Bb as Bb$1,C,Hd as Hd$1,Xe as Xe$1,Ba,Re as Re$1,Je,Oe,Ne as Ne$1,Xc as Xc$1,Xb as Xb$1,Zb as Zb$1,Yb as Yb$1,Ke as Ke$1,Te as Te$1,Rb as Rb$1,Tb as Tb$1,Ub as Ub$1,of as of$1,Uc as Uc$1,B,xf as xf$1,ce,yf as yf$1,Rd as Rd$1,Qd as Qd$1,cd,ee as ee$1,hb as hb$1,eb as eb$1,db as db$1,fb as fb$1,gb as gb$1,yd as yd$1,id,xd as xd$1,me,ya,Db as Db$1,Ha,Ia,Ja,ad,_c as _c$1,$c as $c$1,Wc as Wc$1,k,Vd as Vd$1,Hb as Hb$1,gc as gc$1,Ib as Ib$1,Gb as Gb$1,Ob as Ob$1,Pb as Pb$1,oc as oc$1,qc as qc$1,hc as hc$1,jc as jc$1,wf,Jb as Jb$1,ge as ge$1,L,M as M$1,U,_b as _b$1,qa,$b as $b$1,ac as ac$1,pb as pb$1,ob as ob$1,qb as qb$1,de,Ce as Ce$1,ed,dd,fe,Z,Y as Y$1,_,Bd as Bd$1,y,ib as ib$1,hd as hd$1,ff as ff$1,Nc as Nc$1,Qc as Qc$1,l,Oa,Rc as Rc$1,Vc as Vc$1,Ad as Ad$1,h,g,Pa,f,Dd as Dd$1,$a,Za,_a,Ya,Xa,Wa,gd as gd$1,z,o,t,p,r,s,u,q as q$1,vd as vd$1,ud as ud$1,n,a,sd,qd as qd$1,od,nd,md,ld,zb as zb$1,sb as sb$1,xb as xb$1,wb as wb$1,tb as tb$1,$ as $$1,aa,ba,oa,na,i,Gd as Gd$1,Fd as Fd$1,Ed as Ed$1,bf as bf$1,af as af$1,ye as ye$1,Ie as Ie$1,Ee as Ee$1,Wb as Wb$1,Vb as Vb$1,Mb as Mb$1,Fb as Fb$1,Eb as Eb$1,fd as fd$1,mc as mc$1,nc as nc$1,pc as pc$1,ic as ic$1,vf as vf$1,kc as kc$1,Tc as Tc$1,Va,ra,zc as zc$1,xc as xc$1,wc as wc$1,w,v,Cd as Cd$1,rb as rb$1,pd,rd,td,m,vb as vb$1,ub as ub$1,jd as jd$1,kd as kd$1,c,wa,va,ua,ta,sa,Na,Ma,Aa,za,Ab as Ab$1,le,Kb as Kb$1,Lb as Lb$1,lc as lc$1,Gf,pa,yc as yc$1,A,d,Da,cb as cb$1,Ea,Fa,Ca,Ga,yb as yb$1,tc as tc$1,sc as sc$1,Nb as Nb$1,Qb as Qb$1,Hf,vc as vc$1,kb as kb$1,jb as jb$1,mb as mb$1,lb as lb$1,la,ma,ea,fa,ca,ha,ia,ga,ja,ka,da,Ra,Qa,Ta,Sa,Ka,La,We,cc as cc$1,Zc as Zc$1,Yc as Yc$1,Fe as Fe$1,He as He$1,De as De$1,ne,pe as pe$1,oe as oe$1,rc as rc$1,xa,se as se$1,cf as cf$1,ef as ef$1,df as df$1,gf as gf$1,$e,hf as hf$1,if as _if,Ye as Ye$1,_e as _e$1,te as te$1,we as we$1,jf,mf as mf$1,lf as lf$1,kf,nf as nf$1,Ze,Ef,ue as ue$1,ve,Jf,xe as xe$1,Ge as Ge$1}from'./chunk-OEQJD4Z7.js';export{tf as applyStyleMap,Cf as createDefaultRegistry,uf as createEl,sf as createElementRendererRegistry,vf as createSvgEl,H as defaultCssVars,F as defaultRadius,E as defaultThemeColors,Af as keyToLabel,Kc as loadPresentationDeck,Fc as parsePresentationSessionId,xf as renderSlideStage,G as themeToCssVars,zf as translationsEn,J as vermilionDarkTheme,I as vermilionLightTheme}from'./chunk-OEQJD4Z7.js';import'./chunk-WOT6VMZA.js';import {Settings,UserRound,X as X$1,Upload,Share2,Printer,Download,Save,Info,FolderOpen,FilePlus2,Home,ArrowLeft,FileText,Presentation,Package,FileCode2,Image as Image$1,Video,Images,Copy,UserPlus,Clock3,LockKeyhole,Type,BadgeCheck}from'lucide';import eb from'jszip';function ud(e,t){t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.width!==void 0&&(e.width=t.width),t.height!==void 0&&(e.height=t.height),t.rotation!==void 0&&(e.rotation=t.rotation),t.opacity!==void 0&&(e.opacity=t.opacity),t.hidden!==void 0&&(e.hidden=t.hidden),t.flipHorizontal!==void 0&&(e.flipHorizontal=t.flipHorizontal),t.flipVertical!==void 0&&(e.flipVertical=t.flipVertical),Ix(e,t),Lx(e,t);}function Ix(e,t){if(!b(e))return;let n=e;if(t.text!==void 0&&(n.text=t.text,n.textSegments&&n.textSegments.length>0?n.textSegments[0].text=t.text:n.textSegments=[{text:t.text,style:{}}]),t.fontSize===void 0&&t.fontFamily===void 0&&t.fontColor===void 0&&t.bold===void 0&&t.italic===void 0&&t.underline===void 0&&t.align===void 0)return;n.textStyle??={};let o=n.textStyle;t.fontSize!==void 0&&(o.fontSize=t.fontSize),t.fontFamily!==void 0&&(o.fontFamily=t.fontFamily),t.fontColor!==void 0&&(o.color=t.fontColor),t.bold!==void 0&&(o.bold=t.bold),t.italic!==void 0&&(o.italic=t.italic),t.underline!==void 0&&(o.underline=t.underline),t.align!==void 0&&(o.align=t.align);}function Lx(e,t){if(t.fillColor===void 0&&t.strokeColor===void 0&&t.strokeWidth===void 0||!("shapeStyle"in e))return;let n=e;n.shapeStyle??={};let o=n.shapeStyle;t.fillColor!==void 0&&(o.fillColor=t.fillColor),t.strokeColor!==void 0&&(o.strokeColor=t.strokeColor),t.strokeWidth!==void 0&&(o.strokeWidth=t.strokeWidth);}function Tn(e){let{store:t,editor:n}=e,o=(a,s)=>{let p=a(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(p,t.get().currentSlide);},r=()=>{let a=t.get();return {slides:a.slides,width:a.canvasSize.width,height:a.canvasSize.height,theme:a.colorScheme?{colorScheme:a.colorScheme}:void 0,sections:a.sections,presentationProperties:a.presentationProperties,customProperties:a.customProperties,coreProperties:a.coreProperties,appProperties:a.appProperties}},i=(a,s)=>JSON.stringify(a)!==JSON.stringify(s);return {getDeckMeta(){let a=t.get();return {slideCount:a.slides.length,activeSlideIndex:a.currentSlide,title:Mx(a.slides),width:a.canvasSize.width,height:a.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:a}=t.get();return a?{colorScheme:a}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:a=>e.goToSlide(a),selectElements(a,s){e.goToSlide(a),n.selectElements(s);},applySlidesUpdate:o,updateElement(a,s,p){o(l=>{let m=l[a]?.elements.find(d=>d.id===s);return m&&ud(m,p),l});},applyTheme:a=>e.applyThemeUpdates(a),getDeckData:()=>r(),applyDeckData(a,s){let p=r(),l=a(structuredClone(p));e.ensureEditable(),i(p.slides,l.slides)&&n.commitSlides(l.slides,t.get().currentSlide),(p.width!==l.width||p.height!==l.height)&&n.getEditActions().updateCanvasSize({width:l.width,height:l.height});let m=l.sections??p.sections??[];i(p.sections,m)&&n.updateSections(m);let d=l.presentationProperties??p.presentationProperties??{};i(p.presentationProperties,d)&&n.updatePresentationProperties(d);let u=l.coreProperties??p.coreProperties,x=l.appProperties??p.appProperties,g=l.customProperties??p.customProperties??[];(i(p.coreProperties,u)||i(p.appProperties,x)||i(p.customProperties,g))&&n.updateDocumentProperties(u??{},x??{},g);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function Mx(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var Dx=2600;function Hx(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function Pn(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,a=null,s=false,p=null,l={text:"",nonce:0},m=()=>{for(let g of n)g();},d=()=>{let g=t.get();return of$1({activeSlideIndex:g.currentSlide,selectedElementIds:g.selectedElementIds,selectedElementId:g.selectedElementId})},u=()=>r.length>0,x=t.subscribe((g,f)=>{(g.currentSlide!==f.currentSlide||g.selectedElementId!==f.selectedElementId||g.selectedElementIds!==f.selectedElementIds)&&m();});return {subscribe(g){return n.add(g),()=>n.delete(g)},getLiveTargets:d,getEffectiveTargets(){return u()?r:o&&o.length>0?o:d()},isPinned:()=>!u()&&o!==null,hasPicks:u,pinFocus(){o=d(),m();},clearPinnedFocus(){o=null,m();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),m();},stopPicking(){i=false,m();},addPick(g,f){r.some(v=>v.kind==="element"&&v.elementId===f)||(r=[...r,{kind:"element",slideIndex:g,elementId:f}],m());},clearPicks(){r=[],i=false,m();},getHighlights(){let g=[];for(let f of r)f.kind==="element"&&g.push({slideIndex:f.slideIndex,elementId:f.elementId,variant:"pick"});if(a)for(let f of a.elementIds)g.push({slideIndex:a.slideIndex,elementId:f,variant:"active"});return g},isAnimating:()=>s||r.length>0,flashToolTarget(g){a=g&&g.slideIndex!==void 0&&g.elementIds.length>0?{slideIndex:g.slideIndex,elementIds:g.elementIds}:null,s=true,p&&clearTimeout(p),p=setTimeout(()=>{a=null,s=false,p=null,m();},Dx),m();},getPrefill:()=>l,askAboutSelection(){o=d(),l={text:"",nonce:l.nonce+1},e.requestOpen(),m();},fixElement(g,f){o=d(),l={text:g?Hx(g,f):"",nonce:l.nonce+1},e.requestOpen(),m();},dispose(){p&&clearTimeout(p),x(),n.clear();}}}function M(e,t){let n=uf$1(e,"button",`pptxv-btn${t.className?` ${t.className}`:""}`);if(n.type="button",n.title=t.label,n.setAttribute("aria-label",t.label),t.icon?n.appendChild(Df(e,t.icon)):t.text!==void 0&&(n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=uf$1(e,"span","pptxv-btn-label");o.textContent=t.textLabel,n.appendChild(o);}return n.addEventListener("click",t.onClick),{btn:n,setActive(o){n.classList.toggle("is-active",o),n.setAttribute("aria-pressed",String(o));},setDisabled(o){n.disabled=o;}}}function Rx(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Fe(e,t,n="#000000"){let o=uf$1(e,"label","pptxv-color");o.title=t.label,o.setAttribute("aria-label",t.label);let r=e.createElement("input");return r.type="color",r.className="pptxv-color-input",r.value=n,r.setAttribute("aria-label",t.label),r.addEventListener("input",()=>t.onInput(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=Rx(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function Y(e,t){let n=uf$1(e,"label","pptxv-field"),o=uf$1(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("input");r.type="number",r.className="pptxv-field-input",r.setAttribute("aria-label",t.label),t.min!==void 0&&(r.min=String(t.min)),t.max!==void 0&&(r.max=String(t.max)),r.step=String(t.step??1),n.appendChild(r);let i=()=>{let a=Number.parseFloat(r.value);Number.isFinite(a)&&t.onCommit(a);};return r.addEventListener("change",i),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&i();}),{el:n,input:r,setValue(a){e.activeElement!==r&&(r.value=String(Math.round(a*100)/100));},setDisabled(a){r.disabled=a;}}}function xd(e,t,n){let o=Hf(e,t,n);return {position:o.position,left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,opacity:String(o.opacity),transform:o.transform,transition:o.transition,"box-shadow":o.boxShadow,border:o.border,"border-radius":o.borderRadius,"pointer-events":o.pointerEvents,"z-index":String(o.zIndex)}}function Ox(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=uf$1(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let a=uf$1(e,"div","pptxv-ai-change-ghost",xd(i,"start",t.config));a.setAttribute("data-ai-change",i.kind),a.setAttribute("data-export-ignore","true"),r.appendChild(a);}return r}function Fx(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n),r=e.children;for(let i=0;i<r.length&&i<o.length;i+=1){let a=r[i],s=xd(o[i],"end",t.config);for(let[p,l]of Object.entries(s))a.style.setProperty(p,String(l));}}function gd(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,a=o.current(),s=0,p=0,l=()=>{s&&(cancelAnimationFrame(s),s=0),p&&(cancelAnimationFrame(p),p=0);},m=g=>{a&&((!i||!i.isConnected)&&(i=uf$1(t,"style","pptxv-ai-change-css"),(g??t.head).appendChild(i)),i.textContent=Gf(a.config));},d=()=>{if(l(),r?.remove(),r=null,!a)return;let g=e.getStageRoot();if(!g)return;m(g.parentElement);let f=n.get().currentSlide,v=Ox(t,a,f);if(!v)return;g.appendChild(v),r=v;let b=a;s=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>{r&&Fx(r,b,f);});});},u=n.subscribe(d),x=o.subscribe(g=>{a=g,g&&e.goToSlide(g.slideIndex),d();});return d(),{destroy(){l(),u(),x(),r?.remove(),r=null,i?.remove(),i=null;}}}var Bx="[data-element-id]";function ee(e,t){if(!t||!(e instanceof Element))return null;let n=e.closest(Bx);if(!n||!t.contains(n)||n===t)return null;let o=n,r=n.parentElement;for(;r&&r!==t;)r.hasAttribute("data-element-id")&&(o=r),r=r.parentElement;return r===t?o.getAttribute("data-element-id"):null}function bd(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,a=null,s=()=>{a?.remove(),a=null;},p=d=>{let u=o.get().currentSlide,x=o.get().slides[u]?.elements.find(g=>g.id===d)??null;return o.set({selectedElementId:d,selectedElementIds:[d]}),x},l=(d,u,x)=>{let g=uf$1(t,"button","pptxv-ai-menu-item");return g.type="button",g.append(Df(t,d),t.createTextNode(u)),g.addEventListener("click",()=>{x(),s();}),g},m=d=>{let u=ee(d.target,e.getStageRoot());if(!u)return;d.preventDefault(),s();let x=p(u),g=o.get().currentSlide;a=uf$1(t,"div","pptxv-ai-menu",{left:`${d.clientX}px`,top:`${d.clientY}px`}),a.setAttribute("role","menu"),a.append(l("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),l("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(x,g))),t.body.appendChild(a);let f=v=>{v instanceof KeyboardEvent&&v.key!=="Escape"||v.target instanceof Node&&a?.contains(v.target)||(s(),t.removeEventListener("pointerdown",f,true),t.removeEventListener("keydown",f,true));};t.addEventListener("pointerdown",f,true),t.addEventListener("keydown",f,true);};return i.addEventListener("contextmenu",m),{destroy(){i.removeEventListener("contextmenu",m),s();}}}function fd(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let p=e.getStageRoot();if(!p)return;o.isAnimating()?p.setAttribute("data-pptx-ai-active","true"):p.removeAttribute("data-pptx-ai-active");let l=n.get(),m=o.getHighlights().filter(g=>g.slideIndex===l.currentSlide);if(m.length===0)return;let d=l.slides[l.currentSlide]?.elements??[],u=new Map(d.map(g=>[g.id,g])),x=uf$1(t,"div","pptxv-ai-hl-layer");for(let g of m){let f=u.get(g.elementId);if(!f)continue;let v=uf$1(t,"div",`pptxv-ai-hl pptxv-ai-hl-${g.variant}`,{left:`${f.x-3}px`,top:`${f.y-3}px`,width:`${f.width+6}px`,height:`${f.height+6}px`});x.appendChild(v);}p.appendChild(x),r=x;},a=n.subscribe(i),s=o.subscribe(i);return i(),{destroy(){a(),s(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function vd(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let a=ee(i.target,e.getStageRoot());a&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,a));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function Vx(e){return e.stageWrap.querySelector(".pptxv-stage")}function An(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>Vx(n),a=[],s=(b,E)=>{let A=M(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:E,onClick:()=>{v(!g);}});A.btn.setAttribute("aria-expanded","false"),b.appendChild(A.btn),a.push(A);};s(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&s(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let p=uf$1(t,"aside","pptxv-ai-panel");p.setAttribute("aria-label",o("pptx.ai.title")),p.hidden=true,(n.viewport.parentElement??n.root).appendChild(p);let l=fd({doc:t,store:e.store,controller:r,getStageRoot:i}),m=vd({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),d=bd({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),u=null,x=null,g=false,f=false,v=async b=>{g=b,p.hidden=!g;for(let E of a)E.setActive(g),E.btn.setAttribute("aria-expanded",String(g));if(!(!g||u||f)){f=true,p.classList.add("is-loading");try{let{createAiPanel:E}=await import('./ai-panel-XQVSIR65.js');u=await E({host:p,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide}),u.changeAnimator&&(x=gd({doc:t,store:e.store,animator:u.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{f=false,p.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){x?.destroy(),x=null,u?.destroy(),u=null,d.destroy(),m.destroy(),l.destroy(),r.dispose();for(let b of a)b.btn.remove();p.remove();}}}function Jt(e){let t=new Map;return new Proxy({},{get(n,o){if(typeof o!="string")return;let r=t.get(o);return r||(r=(...i)=>e()[o](...i),t.set(o,r)),r}})}function hd(e){return {ribbonHandlers:{nav:{prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>e.togglePresentation(),normalView:()=>e.returnToNormalView(),toggleNotes:()=>e.toggleNotes(),openAccessibility:()=>e.openAccessibility(),openSettings:o=>e.openSettings(o),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),toggleViewOption:o=>e.getEditActions().toggleViewOption(o),addGuide:o=>e.getEditActions().addGuide(o),activateEyedropper:()=>e.getEditActions().activateEyedropper(),toggleSpellCheck:()=>e.getEditActions().toggleSpellCheck()},primary:{undo:()=>e.undo(),redo:()=>e.redo(),save:()=>e.save()},file:{openFile:()=>e.openFile(),openRecentFile:o=>e.openRecentFile(o),createPresentation:o=>e.createPresentation(o),openSettings:()=>e.openSettings("general"),openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},packageForSharing:()=>{e.packageForSharing();},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow()},edit:Jt(()=>e.getEditActions()),insert:{insert:(o,r)=>e.getEditActions().insert(o,r),insertImage:()=>e.getEditActions().insertImage(),insertMedia:()=>e.getEditActions().insertMedia(),insertChart:o=>e.getEditActions().insertChart(o),insertSmartArt:(o,r)=>e.getEditActions().insertSmartArt(o,r),insertEquation:o=>e.getEditActions().insertEquation(o),insertActionButton:o=>e.getEditActions().insertActionButton(o),insertField:(o,r)=>e.getEditActions().insertField(o,r)},findReplace:Jt(()=>e.getFindReplaceActions()),design:{setTheme:o=>e.setTheme(o),applyPresentationTheme:o=>e.applyPresentationTheme(o)},draw:{setTool:o=>e.setDrawTool(o),setColor:o=>e.setDrawColor(o),setWidth:o=>e.setDrawWidth(o)}},inspectorHandlers:{selectElement:o=>e.selectElement(o),openDocumentProperties:()=>e.openDocumentProperties(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),addComment:o=>{e.getEditActions().comments.addComment(o);},addCommentReply:(o,r)=>{e.getEditActions().comments.addCommentReply(o,r);},editComment:(o,r)=>e.getEditActions().comments.editComment(o,r),deleteComment:o=>e.getEditActions().comments.deleteComment(o),toggleCommentResolved:o=>e.getEditActions().comments.toggleCommentResolved(o),setAnimationEffect:(o,r)=>e.getEditActions().setAnimationEffect(o,r),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),setShapeFill:o=>e.getEditActions().setShapeFill(o),setShapeStroke:o=>e.getEditActions().setShapeStroke(o),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),setTextVerticalAlign:o=>e.getEditActions().setTextVerticalAlign(o),setTextWrap:o=>e.getEditActions().setTextWrap(o),setAutoFitMode:o=>e.getEditActions().setAutoFitMode(o),setTextAdvanced:o=>e.getEditActions().setTextAdvanced(o),setTextStyle:(o,r)=>e.getEditActions().setTextStyle(o,r),setFillOpacity:o=>e.getEditActions().setFillOpacity(o),setStrokeOpacity:o=>e.getEditActions().setStrokeOpacity(o),setGradientFill:o=>e.getEditActions().setGradientFill(o),addGradientStop:(o,r)=>e.getEditActions().addGradientStop(o,r),removeGradientStop:o=>e.getEditActions().removeGradientStop(o),updateGradientStop:(o,r)=>e.getEditActions().updateGradientStop(o,r),setImageBrightness:o=>e.getEditActions().setImageBrightness(o),setImageContrast:o=>e.getEditActions().setImageContrast(o),setImageSaturation:o=>e.getEditActions().setImageSaturation(o),setImageCrop:(o,r)=>e.getEditActions().setImageCrop(o,r),setImageEffects:o=>e.getEditActions().setImageEffects(o),replaceImage:()=>{e.getEditActions().replaceSelectedImage();},resetImage:()=>e.getEditActions().resetSelectedImage(),setElementAction:(o,r)=>e.getEditActions().setElementAction(o,r),setChartData:o=>e.getEditActions().setChartData(o),setMediaProperties:o=>e.getEditActions().setMediaProperties(o),setTableHeaderRow:o=>e.getEditActions().setTableHeaderRow(o),setTableBandedRows:o=>e.getEditActions().setTableBandedRows(o),setTableCellPadding:o=>e.getEditActions().setTableCellPadding(o),setTableOptions:(o,r)=>e.getEditActions().setTableOptions(o,r),setTableCellStyle:(o,r,i)=>e.getEditActions().setTableCellStyle(o,r,i),setTableCellStyles:(o,r)=>e.getEditActions().setTableCellStyles(o,r),mutateTableStructure:(o,r)=>e.getEditActions().mutateTableStructure(o,r),setTableColumnWidth:(o,r)=>e.getEditActions().setTableColumnWidth(o,r),setTableRowHeight:(o,r)=>e.getEditActions().setTableRowHeight(o,r),mergeTableCells:o=>e.getEditActions().mergeTableCells(o),splitTableCell:o=>e.getEditActions().splitTableCell(o),setSmartArtNodeText:(o,r)=>e.getEditActions().setSmartArtNodeText(o,r),setSmartArtNodeStyle:(o,r)=>e.getEditActions().setSmartArtNodeStyle(o,r),mutateSmartArtNode:(o,r)=>e.getEditActions().mutateSmartArtNode(o,r),setSmartArtLayout:o=>e.getEditActions().setSmartArtLayout(o),setSmartArtColorScheme:o=>e.getEditActions().setSmartArtColorScheme(o)},onSelectSlide:o=>e.goToSlide(o),onToggleNotes:()=>e.toggleNotes(),onCommitNotes:(o,r)=>e.commitNotes(o,r)}}function kn(e){return e.presenting&&e.animationBuildsComplete&&!me(e.currentSlide)}function at(e,t,n){for(let r of n)e.style.removeProperty(r);let o=G$1(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function In(e,t,n){let o=uf$1(e,"section","pptxv-accessibility-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","false"),o.setAttribute("aria-label",t("pptx.accessibility.title"));let r=uf$1(e,"div","pptxv-accessibility-header"),i=uf$1(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let a=uf$1(e,"button","pptxv-accessibility-close");a.type="button",a.textContent=t("pptx.accessibility.close"),a.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,a),o.appendChild(r);let s=uf$1(e,"p","pptxv-accessibility-summary");o.appendChild(s);let p=uf$1(e,"div","pptxv-accessibility-list");p.setAttribute("role","list"),p.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(p);let l=()=>{o.hidden=true;};a.addEventListener("click",l);let m=d=>{let u=uf$1(e,"section",`pptxv-accessibility-group is-${d.severity}`),x=uf$1(e,"h3","pptxv-accessibility-group-title");x.textContent=`${d.label} (${d.issues.length})`,u.appendChild(x);for(let[g,f]of d.issues.entries()){let v=uf$1(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=ed(f,g);let b=uf$1(e,"strong","pptxv-accessibility-issue-type");b.textContent=dd(f.type);let E=uf$1(e,"span","pptxv-accessibility-issue-message");E.textContent=f.message;let A=uf$1(e,"span","pptxv-accessibility-issue-slide");A.textContent=`Slide ${f.slideIndex+1}`,v.append(b,E,A),v.addEventListener("click",()=>n(f.slideIndex)),u.appendChild(v);}p.appendChild(u);};return {el:o,open(d){if(p.replaceChildren(),s.textContent=t("pptx.accessibility.issueCount",{count:d.length}),d.length===0){let u=uf$1(e,"p","pptxv-accessibility-empty");u.textContent=t("pptx.accessibility.noIssuesFound"),p.appendChild(u);}else for(let u of cd(d))m(u);o.hidden=false,a.focus();},close:l}}var Nx=["none","url","slide","firstSlide","lastSlide","prevSlide","nextSlide","endShow"];function Sd(e,t,n,o){let r=n(t("pptx.action.title")),i=yd(e,t,"click",o),a=yd(e,t,"hover",o);return r.append(i.el,a.el),{el:r,update(s){r.hidden=!s.hasSelection,i.update(s.actionClick),a.update(s.actionHover);}}}function yd(e,t,n,o){let r=e.createElement("fieldset"),i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let a=e.createElement("select");for(let m of Nx){let d=e.createElement("option");d.value=m,d.textContent=t(`pptx.hyperlink.action${zx(m)}`),a.appendChild(d);}let s=e.createElement("input"),p=()=>{let m=a.value;o.setElementAction(n,{trigger:n,type:m,url:m==="url"?s.value:void 0,slideIndex:m==="slide"?Math.max(0,s.valueAsNumber-1):void 0});},l=()=>{s.hidden=a.value!=="url"&&a.value!=="slide",s.type=a.value==="slide"?"number":"url",s.placeholder=a.value==="slide"?t("pptx.action.slideNumberPlaceholder"):"https://",a.value==="slide"&&(s.min="1",s.step="1");};return a.addEventListener("change",()=>{l(),p();}),s.addEventListener("change",p),r.append(i,a,s),{el:r,update(m){a.value=m?.type??"none",s.value=m?.type==="slide"?String((m.slideIndex??0)+1):m?.url??"",l();}}}function zx(e){return e[0].toUpperCase()+e.slice(1)}var Cd=["fromTop","fromBottom","fromLeft","fromRight"],wd=[{value:"ease",labelKey:"pptx.animation.timingCurve.ease"},{value:"ease-in",labelKey:"pptx.animation.timingCurve.easeIn"},{value:"ease-out",labelKey:"pptx.animation.timingCurve.easeOut"},{value:"linear",labelKey:"pptx.animation.timingCurve.linear"}],Ed=["none","untilNextClick","untilEndOfSlide"];function eo(e,t,n){let o=uf$1(e,"label","pptxv-anim-field"),r=uf$1(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function Be(e,t,n,o,r){let i=eo(e,t,r),a=e.createElement("select");for(let s of n){let p=e.createElement("option");p.value=s.value,p.textContent=s.label,a.appendChild(p);}return a.addEventListener("change",()=>o(a.value)),i.appendChild(a),a}function to(e,t,n,o,r){let i=eo(e,t,r),a=e.createElement("input");return a.type="number",a.min=String(n.min),a.max=String(n.max),a.step=String(n.step),a.addEventListener("change",()=>o(a.valueAsNumber)),i.appendChild(a),a}function Ln(e){return b(e)&&e.text?e.text.slice(0,24):e.type}function Td(e,t){let n=t.find(o=>o.id===e.elementId);return n?Ln(n):e.elementId.slice(0,8)}function Gx(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function Pd(e,t,n,o,r){let i=1;for(let a of n)i=Math.max(i,(a.delayMs??0)+(a.durationMs??500));t.replaceChildren(...n.map(a=>{let s=uf$1(e,"div","pptxv-anim-bar-seg");s.classList.add(`is-${Gx(a)}`),s.classList.toggle("is-selected",a.elementId===r);let p=(a.delayMs??0)/i*100,l=Math.max((a.durationMs??500)/i*100,2);s.style.left=`${p}%`,s.style.width=`${l}%`;let m=a.entrance??a.emphasis??a.exit??"custom";return s.title=`${Td(a,o)} - ${m} (${a.durationMs??500}ms)`,s}));}function Ad(e,t,n,o,r,i,a,s,p){let l=uf$1(e,"div","pptxv-animation-timeline-row");l.classList.toggle("is-selected",n.elementId===a);let m=uf$1(e,"span","pptxv-animation-timeline-name");m.textContent=`${o+1}. ${Td(n,i)}`;let d=(u,x,g)=>{let f=uf$1(e,"button","pptxv-btn");return f.type="button",f.textContent=x,f.setAttribute("aria-label",t(u==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),f.disabled=g,f.addEventListener("click",()=>p(n.elementId,u)),f};return l.append(m,d("up","\u2191",!s||o===0),d("down","\u2193",!s||o===r-1)),l}function kd(e,t){if(!t)return;let n=t.entrance??t.emphasis??t.exit;if(!n)return;let o=ra(n,{direction:t.direction,durationMs:t.durationMs,timingCurve:t.timingCurve});if(!o)return;let r=e.querySelector(`[data-element-id="${CSS.escape(t.elementId)}"]`);if(!r)return;let i=`pptxv-anim-preview-${o.keyframeName}`;if(!e.getElementById(i)){let s=e.createElement("style");s.id=i,s.textContent=o.keyframesCss,(e.head??e.documentElement).appendChild(s);}r.style.animation="none",r.offsetWidth,r.style.animation=o.cssAnimation;let a=()=>{r.style.animation="";};r.addEventListener("animationend",a,{once:true}),setTimeout(a,o.durationMs+250);}function Id(e,t,n){let o=uf$1(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(L=>L.elementId===r.selectedElementId),a=uf$1(e,"div","pptxv-anim-header"),s=uf$1(e,"span","pptxv-inspector-section-title");s.textContent=t("pptx.animation.title");let p=uf$1(e,"button","pptxv-anim-preview-btn");p.type="button",p.textContent=t("pptx.animation.preview"),p.addEventListener("click",()=>kd(e,i())),a.append(s,p),o.appendChild(a);let l=(L,R,B)=>Be(e,t(R),[{value:"none",label:t("pptx.animation.none")},...B.map(F=>({value:F,label:t(`pptx.animation.preset.${F}`)}))],F=>n.setAnimationEffect(L,F),o),m=l("entrance","pptx.animation.entrance",V),d=l("emphasis","pptx.animation.emphasis",X),u=l("exit","pptx.animation.exit",W),x=uf$1(e,"div","pptxv-anim-options");o.appendChild(x);let g=L=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,L);},f=eo(e,t("pptx.animation.direction"),x);f.classList.add("pptxv-anim-direction");let v=Cd.map(L=>{let R=uf$1(e,"button","pptxv-anim-direction-btn");return R.type="button",R.textContent=t(`pptx.animation.direction.${L}`),R.addEventListener("click",()=>g({direction:L})),f.appendChild(R),{value:L,btn:R}}),b=Be(e,t("pptx.animation.sequence"),Z.map(L=>({value:L,label:t(`pptx.animation.sequence.${L}`)})),L=>g({sequence:L}),x),E=uf$1(e,"span","pptxv-inspector-section-title");E.textContent=t("pptx.animation.timing"),x.appendChild(E);let A=Be(e,t("pptx.animation.trigger"),Y$1.map(L=>({value:L,label:t(`pptx.animation.trigger.${L}`)})),L=>g({trigger:L,triggerShapeId:""}),x),S=Be(e,t("pptx.animation.trigger.shapeLabel"),[],L=>g({triggerShapeId:L}),x),h=S.parentElement,C=to(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},L=>g({durationMs:L}),x),y=to(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},L=>g({delayMs:L}),x),P=Be(e,t("pptx.animation.timingCurve"),wd.map(L=>({value:L.value,label:t(L.labelKey)})),L=>g({timingCurve:L}),x),T=to(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},L=>g({repeatCount:L}),x),w=Be(e,t("pptx.animation.repeatUntil"),Ed.map(L=>({value:L,label:t(`pptx.animation.repeatUntil.${L}`)})),L=>g({repeatMode:L}),x),k=uf$1(e,"div","pptxv-anim-timeline"),I=uf$1(e,"span","pptxv-inspector-section-title");I.textContent=t("pptx.animation.timelineBar");let H=uf$1(e,"div","pptxv-anim-bar"),D=uf$1(e,"span","pptxv-inspector-section-title");D.textContent=t("pptx.animation.timeline");let O=uf$1(e,"div","pptxv-animation-timeline-list");return k.append(I,H,D,O),o.appendChild(k),{el:o,update(L){if(r=L,o.hidden=!L.selectedElementId,o.hidden)return;let R=i(),B=!!(R?.entrance||R?.emphasis||R?.exit);m.value=R?.entrance??"none",d.value=R?.emphasis??"none",u.value=R?.exit??"none",p.hidden=!B,x.hidden=!B;let F=_.has(R?.entrance??"")||_.has(R?.exit??"");f.hidden=!F;for(let{value:N,btn:W}of v)W.classList.toggle("is-active",R?.direction===N),W.disabled=!L.editable;b.value=R?.sequence??"asOne",A.value=R?.trigger??"onClick",h.hidden=A.value!=="onShapeClick",S.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...L.elements.filter(N=>N.id!==L.selectedElementId).map(N=>({id:N.id,label:Ln(N)}))].map(N=>{let W=e.createElement("option");return W.value=N.id,W.textContent=N.label,W})),S.value=R?.triggerShapeId??"",C.value=String(R?.durationMs??450),y.value=String(R?.delayMs??0),P.value=R?.timingCurve??"ease",T.value=String(R?.repeatCount??1),w.value=R?.repeatMode??"none";for(let N of [m,d,u,b,A,S,P,w])N.disabled=!L.editable;C.disabled=y.disabled=T.disabled=!L.editable;let V=[...L.animations].sort((N,W)=>(N.order??0)-(W.order??0));k.hidden=V.length===0,Pd(e,H,V,L.elements,L.selectedElementId),O.replaceChildren(...V.map((N,W)=>Ad(e,t,N,W,V.length,L.elements,L.selectedElementId,L.editable,n.reorderAnimation)));}}}function Md(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-advanced";let r=pt(e,t("pptx.chart.axis"),[]),i=Ve(e,t("pptx.chart.axisMinimum")),a=Ve(e,t("pptx.chart.axisMaximum")),s=Ve(e,t("pptx.chart.majorUnit")),p=st(e,t("pptx.chart.logScale")),l=st(e,t("pptx.chart.reverseOrder")),m=st(e,t("pptx.chart.majorGridlines")),d=pt(e,t("pptx.chart.series"),[]),u=pt(e,t("pptx.chart.trendlines"),["","linear","exponential","logarithmic","polynomial","power","movingAvg"]),x=st(e,t("pptx.chart.trendlineEquation")),g=st(e,t("pptx.chart.trendlineRSquared")),f=pt(e,t("pptx.chart.errorBars"),["","fixedVal","percentage","stdDev","stdErr"]),v=Ve(e,t("pptx.chart.errorBarAmount")),b=pt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"]),E=Ve(e,t("pptx.chart.markerSize")),A=Ld(e,t("pptx.chart.seriesColor")),S=Ve(e,t("pptx.chart.dataPointIndex")),h=Ld(e,t("pptx.chart.dataPointColor")),C=Ve(e,t("pptx.chart.explosion"));o.append(r.label,i.label,a.label,s.label,p.label,l.label,m.label,d.label,u.label,x.label,g.label,f.label,v.label,b.label,E.label,A.label,S.label,h.label,C.label);let y,P=()=>Math.max(0,r.control.selectedIndex),T=()=>Math.max(0,d.control.selectedIndex),w=()=>{if(!y)return;let H=[...y.axes??[]],D=H[P()]??{axisType:"valAx"};H[P()]={...D,min:qe(i.control),max:qe(a.control),majorUnit:qe(s.control),logScale:p.control.checked,orientation:l.control.checked?"maxMin":"minMax",majorGridlines:m.control.checked},n({...y,axes:H});},k=()=>{if(!y?.series[T()])return;let H=[...y.series],D=H[T()],O=u.control.value,L=f.control.value,R=Math.max(0,(S.control.valueAsNumber||1)-1),B=[...D.dataPoints??[]],F=B.findIndex(({idx:N})=>N===R),V={...F>=0?B[F]:{idx:R},spPr:{...F>=0?B[F].spPr:{},fillColor:h.control.value},explosion:qe(C.control)};F>=0?B[F]=V:B.push(V),H[T()]={...D,color:A.control.value,trendlines:O?[{trendlineType:O,displayEq:x.control.checked,displayRSq:g.control.checked}]:[],errBars:L?[{direction:"y",barType:"both",valType:L,val:qe(v.control)}]:[],marker:{symbol:b.control.value,size:qe(E.control)},dataPoints:B},n({...y,series:H});};for(let H of [i.control,a.control,s.control,p.control,l.control,m.control])H.addEventListener("change",w);for(let H of [u.control,x.control,g.control,f.control,v.control,b.control,E.control,A.control,S.control,h.control,C.control])H.addEventListener("change",k);r.control.addEventListener("change",()=>y&&I(y)),d.control.addEventListener("change",()=>y&&I(y));let I=H=>{y=H,Mn(e,r.control,(H.axes??[]).map((R,B)=>[String(B),R.titleText??R.axisType])),Mn(e,d.control,H.series.map((R,B)=>[String(B),R.name]));let D=H.axes?.[P()];Ke(i.control,D?.min),Ke(a.control,D?.max),Ke(s.control,D?.majorUnit),p.control.checked=D?.logScale??false,l.control.checked=D?.orientation==="maxMin",m.control.checked=D?.majorGridlines??false;let O=H.series[T()];u.control.value=O?.trendlines?.[0]?.trendlineType??"",x.control.checked=O?.trendlines?.[0]?.displayEq??false,g.control.checked=O?.trendlines?.[0]?.displayRSq??false,f.control.value=O?.errBars?.[0]?.valType??"",Ke(v.control,O?.errBars?.[0]?.val),b.control.value=O?.marker?.symbol??"none",Ke(E.control,O?.marker?.size),A.control.value=O?.color??"#4472c4";let L=O?.dataPoints?.find(({idx:R})=>R===Math.max(0,(S.control.valueAsNumber||1)-1));h.control.value=L?.spPr?.fillColor??O?.color??"#4472c4",Ke(C.control,L?.explosion);};return {el:o,update:I}}function oo(e,t,n){let o=e.createElement("label");return o.textContent=t,o.appendChild(n),{label:o,control:n}}function Ve(e,t){let n=e.createElement("input");return n.type="number",oo(e,t,n)}function Ld(e,t){let n=e.createElement("input");return n.type="color",oo(e,t,n)}function st(e,t){let n=e.createElement("input");return n.type="checkbox",oo(e,t,n)}function pt(e,t,n){let o=e.createElement("select");return Mn(e,o,n.map(r=>[r,r])),oo(e,t,o)}function Mn(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let a=e.createElement("option");return a.value=r,a.textContent=i,a})),t.value=o;}function qe(e){return e.value===""?void 0:e.valueAsNumber}function Ke(e,t){e.value=t===void 0?"":String(t);}function Dd(e,t,n){let o=e.createElement("label");return o.textContent=t,o.appendChild(n),{label:o,control:n}}function ke(e,t){return Dd(e,t,e.createElement("input"))}function he(e,t){let n=ke(e,t);return n.control.type="number",n}function Ne(e,t){let n=ke(e,t);return n.control.type="color",n}function ue(e,t){let n=ke(e,t);return n.control.type="checkbox",n}function ye(e,t,n){let o=e.createElement("select");return no(e,o,n.map(r=>[r,r])),Dd(e,t,o)}function no(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let a=e.createElement("option");return a.value=r,a.textContent=i,a})),t.value=o;}function Se(e){return e.value===""?void 0:e.valueAsNumber}function Ce(e,t){e.value=t===void 0?"":String(t);}function Dn(e){return e.split(",").map(Number).filter(Number.isFinite)}function Hd(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-exhaustive";let r=ye(e,t("pptx.chart.series"),[]),i=ye(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"]),a=ue(e,t("pptx.chart.secondaryAxis")),s=ye(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"]),p=ue(e,t("pptx.chart.showValue")),l=ue(e,t("pptx.chart.showCategory")),m=ue(e,t("pptx.chart.showSeriesName")),d=ue(e,t("pptx.chart.showPercentage")),u=ue(e,t("pptx.chart.showLeaderLines")),x=he(e,t("pptx.chart.trendlineOrder")),g=he(e,t("pptx.chart.trendlinePeriod")),f=he(e,t("pptx.chart.forecastForward")),v=he(e,t("pptx.chart.forecastBackward")),b=he(e,t("pptx.chart.trendlineIntercept")),E=Ne(e,t("pptx.chart.trendlineColor")),A=ye(e,t("pptx.chart.errorBarDirection"),["x","y"]),S=ye(e,t("pptx.chart.errorBarType"),["both","minus","plus"]),h=Ne(e,t("pptx.chart.errorBarColor")),C=ue(e,t("pptx.chart.noEndCap")),y=ke(e,t("pptx.chart.customPlus")),P=ke(e,t("pptx.chart.customMinus")),T=Ne(e,t("pptx.chart.markerFill")),w=Ne(e,t("pptx.chart.markerOutline")),k=ye(e,t("pptx.chart.dataPointMarker"),["none","circle","diamond","square","star","triangle","x","plus"]),I=he(e,t("pptx.chart.markerSize")),H=ue(e,t("pptx.chart.invertIfNegative")),D=ye(e,t("pptx.chart.axis"),[]),O=ke(e,t("pptx.chart.axisTitle")),L=he(e,t("pptx.chart.minorUnit")),R=ue(e,t("pptx.chart.minorGridlines")),B=ke(e,t("pptx.chart.numberFormat")),F=ye(e,t("pptx.chart.tickLabelPosition"),["nextTo","high","low","none"]),V=Ne(e,t("pptx.chart.axisColor")),N=Ne(e,t("pptx.chart.axisFontColor")),W=he(e,t("pptx.chart.axisFontSize")),Z=[r,i,a,s,p,l,m,d,u,x,g,f,v,b,E,A,S,h,C,y,P,T,w,k,I,H,D,O,L,R,B,F,V,N,W];o.append(...Z.map(({label:U})=>U));let K,Mo=()=>Math.max(0,r.control.selectedIndex),Do=()=>Math.max(0,D.control.selectedIndex),wx=()=>{let U=K?.series[Mo()];if(!K||!U)return;let Q=[...K.series],fe=U.trendlines?.[0],ve=U.errBars?.[0],Pe=U.dataPoints?.[0]??{idx:0};Q[Mo()]={...U,seriesChartType:i.control.value,axisId:a.control.checked?K.axes?.find(ne=>ne.axPos==="r")?.axisId:K.axes?.find(ne=>ne.axPos==="l")?.axisId,trendlines:fe?[{...fe,order:Se(x.control),period:Se(g.control),forward:Se(f.control),backward:Se(v.control),intercept:Se(b.control),color:E.control.value}]:[],errBars:ve?[{...ve,direction:A.control.value,barType:S.control.value,color:h.control.value,noEndCap:C.control.checked,customPlus:Dn(y.control.value),customMinus:Dn(P.control.value)}]:[],marker:{...U.marker??{symbol:"auto"},spPr:{fillColor:T.control.value,strokeColor:w.control.value}},dataPoints:[{...Pe,invertIfNegative:H.control.checked,marker:{symbol:k.control.value,size:Se(I.control)}},...U.dataPoints?.slice(1)??[]]},n({...K,series:Q,style:{...K.style,hasDataLabels:true,dataLabels:{...K.style?.dataLabels,position:s.control.value,showValue:p.control.checked,showCategory:l.control.checked,showSeriesName:m.control.checked,showPercent:d.control.checked,showLeaderLines:u.control.checked}}});},Ex=()=>{let U=K?.axes?.[Do()];if(!K||!U)return;let Q=[...K.axes??[]];Q[Do()]={...U,titleText:O.control.value,minorUnit:Se(L.control),minorGridlines:R.control.checked,numFmt:{formatCode:B.control.value},tickLblPos:F.control.value,spPr:{...U.spPr,strokeColor:V.control.value},fontColor:N.control.value,fontSize:Se(W.control)},n({...K,axes:Q});};for(let U of Z.slice(1,26))U.control.addEventListener("change",wx);for(let U of Z.slice(27))U.control.addEventListener("change",Ex);r.control.addEventListener("change",()=>K&&Ho(K)),D.control.addEventListener("change",()=>K&&Ho(K));let Ho=U=>{K=U,no(e,r.control,U.series.map((Ue,Ro)=>[String(Ro),Ue.name])),no(e,D.control,(U.axes??[]).map((Ue,Ro)=>[String(Ro),Ue.titleText??Ue.axisType]));let Q=U.series[Mo()],fe=Q?.trendlines?.[0],ve=Q?.errBars?.[0];i.control.value=Q?.seriesChartType??U.chartType,a.control.checked=!!(Q?.axisId&&U.axes?.find(Ue=>Ue.axisId===Q.axisId)?.axPos==="r");let Pe=U.style?.dataLabels;s.control.value=Pe?.position??"bestFit",p.control.checked=Pe?.showValue??false,l.control.checked=Pe?.showCategory??false,m.control.checked=Pe?.showSeriesName??false,d.control.checked=Pe?.showPercent??false,u.control.checked=Pe?.showLeaderLines??false,Ce(x.control,fe?.order),Ce(g.control,fe?.period),Ce(f.control,fe?.forward),Ce(v.control,fe?.backward),Ce(b.control,fe?.intercept),E.control.value=fe?.color??"#4472c4",A.control.value=ve?.direction??"y",S.control.value=ve?.barType??"both",h.control.value=ve?.color??"#000000",C.control.checked=ve?.noEndCap??false,y.control.value=ve?.customPlus?.join(", ")??"",P.control.value=ve?.customMinus?.join(", ")??"",T.control.value=Q?.marker?.spPr?.fillColor??"#4472c4",w.control.value=Q?.marker?.spPr?.strokeColor??"#000000",k.control.value=Q?.dataPoints?.[0]?.marker?.symbol??"none",Ce(I.control,Q?.dataPoints?.[0]?.marker?.size),H.control.checked=Q?.dataPoints?.[0]?.invertIfNegative??false;let ne=U.axes?.[Do()];O.control.value=ne?.titleText??"",Ce(L.control,ne?.minorUnit),R.control.checked=ne?.minorGridlines??false,B.control.value=ne?.numFmt?.formatCode??"",F.control.value=ne?.tickLblPos??"nextTo",V.control.value=ne?.spPr?.strokeColor??"#000000",N.control.value=ne?.fontColor??"#000000",Ce(W.control,ne?.fontSize);};return {el:o,update:Ho}}var _x=["bar","line","pie","doughnut","area","scatter","bubble","radar","waterfall","funnel","treemap","sunburst","combo"];function Vd(e,t,n,o){let r=n(t("pptx.chart.data")),i=Nd(e,"text",t("pptx.chart.title")),a=e.createElement("select");for(let v of _x)Bd(e,a,v);let s=e.createElement("select");for(let v of ["clustered","stacked","percentStacked"])Bd(e,s,v);let p=Rd(e,t("pptx.chart.categories")),l=Rd(e,t("pptx.chart.series")),m=Od(e,t("pptx.chart.legend")),d=Od(e,t("pptx.chart.dataLabels")),u=Md(e,t,v=>o.setChartData(v)),x=Hd(e,t,v=>o.setChartData(v));r.append(i.label,a,s,p.label,l.label,m.label,d.label,u.el,x.el);let g,f=()=>{g&&o.setChartData({...g,title:i.control.value,chartType:a.value,grouping:s.value,categories:Fd(p.control.value),series:Fd(l.control.value).map(Ux),style:{...g.style,hasTitle:i.control.value.trim().length>0,hasLegend:m.control.checked,hasDataLabels:d.control.checked}});};for(let v of [i.control,a,s,p.control,l.control,m.control,d.control])v.addEventListener("change",f);return {el:r,update(v){r.hidden=!v.isChart,g=v.chartData,g&&(i.control.value=g.title??"",a.value=g.chartType,s.value=g.grouping??"clustered",p.control.value=g.categories.join(`
2
2
  `),l.control.value=g.series.map(({name:b,values:E})=>`${b}: ${E.join(", ")}`).join(`
3
3
  `),m.control.checked=g.style?.hasLegend??false,d.control.checked=g.style?.hasDataLabels??false,u.update(g),x.update(g));}}}function Nd(e,t,n){let o=e.createElement("label");o.textContent=n;let r=e.createElement("input");return r.type=t,o.appendChild(r),{label:o,control:r}}function Rd(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=4,n.appendChild(o),{label:n,control:o}}function Od(e,t){return Nd(e,"checkbox",t)}function Fd(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Ux(e){let[t,n=""]=e.split(":",2);return {name:t.trim(),values:n.split(",").map(Number).filter(Number.isFinite)}}function Bd(e,t,n){let o=e.createElement("option");o.value=n,o.textContent=n,t.appendChild(o);}function zd(e,t,n){let o=uf$1(e,"div","pptxv-inspector-comments"),r=uf$1(e,"div","pptxv-inspector-comment-list");o.appendChild(r);let i=uf$1(e,"p","pptxv-inspector-empty");i.textContent=t("pptx.comments.noComments"),o.appendChild(i);let a=uf$1(e,"div","pptxv-inspector-comment-add"),s=e.createElement("textarea");s.className="pptxv-inspector-comment-input",s.rows=2,s.placeholder=t("pptx.comments.addCommentPlaceholder"),s.setAttribute("aria-label",t("pptx.comments.addComment"));let p=uf$1(e,"button","pptxv-inspector-deck-btn");p.type="button",p.textContent=t("pptx.comments.addComment"),p.addEventListener("click",()=>{let h=s.value.trim();h&&(n.addComment(h),s.value="");}),a.append(s,p),o.appendChild(a);let l=null,m="",d=null,u="",x=new Set,g=null,f=()=>{let h=g;h&&(i.hidden=h.comments.length>0,a.hidden=!h.editable,r.replaceChildren(...h.comments.map(C=>S(C,h.editable,0))));},v=(h,C)=>{let y=uf$1(e,"button","pptxv-inspector-comment-action");return y.type="button",y.textContent=h,y.addEventListener("click",C),y},b=(h,C,y)=>{let P=e.createElement("textarea");return P.className="pptxv-inspector-comment-input",P.rows=2,P.value=h,P.placeholder=C,P.addEventListener("input",()=>y(P.value)),P},E=h=>{let C=uf$1(e,"div","pptxv-inspector-comment-edit"),y=b(m,"",T=>{m=T;});y.setAttribute("aria-label",t("pptx.comments.edit"));let P=uf$1(e,"div","pptxv-inspector-comment-actions");return P.append(v(t("pptx.comments.save"),()=>{m.trim()&&n.editComment(h.id,m.trim()),l=null,f();}),v(t("pptx.comments.cancel"),()=>{l=null,f();})),C.append(y,P),C},A=h=>{let C=uf$1(e,"div","pptxv-inspector-comment-reply-form"),y=b(u,t("pptx.comments.replyPlaceholder",{author:h.author||t("pptx.comments.unknownAuthor")}),T=>{u=T;});y.setAttribute("aria-label",t("pptx.comments.reply"));let P=uf$1(e,"div","pptxv-inspector-comment-actions");return P.append(v(t("pptx.comments.addReply"),()=>{u.trim()&&n.addCommentReply(h.id,u.trim()),d=null,u="",f();}),v(t("pptx.comments.cancel"),()=>{d=null,f();})),C.append(y,P),C},S=(h,C,y)=>{let P=uf$1(e,"div","pptxv-inspector-comment");P.classList.toggle("is-resolved",h.resolved===true),P.classList.toggle("is-reply",y>0);let T=uf$1(e,"div","pptxv-inspector-comment-meta");if(T.textContent=h.author||t("pptx.comments.unknownAuthor"),h.resolved){let k=uf$1(e,"span","pptxv-inspector-comment-badge");k.textContent=t("pptx.comments.resolved"),T.appendChild(k);}if(P.appendChild(T),l===h.id)P.appendChild(E(h));else {let k=uf$1(e,"p","pptxv-inspector-comment-text");if(k.textContent=h.text,P.appendChild(k),C){let I=uf$1(e,"div","pptxv-inspector-comment-actions");I.appendChild(v(t("pptx.comments.edit"),()=>{l=h.id,m=h.text,f();})),y===0&&I.appendChild(v(t("pptx.comments.reply"),()=>{d=h.id,u="",f();})),I.append(v(t(h.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(h.id)),v(t("pptx.comments.delete"),()=>n.deleteComment(h.id))),P.appendChild(I);}}let w=h.replies??[];if(w.length>0){let k=uf$1(e,"button","pptxv-inspector-comment-replies-toggle");if(k.type="button",k.textContent=t("pptx.comments.repliesCount",{count:w.length}),k.setAttribute("aria-expanded",String(!x.has(h.id))),k.addEventListener("click",()=>{x.has(h.id)?x.delete(h.id):x.add(h.id),f();}),P.appendChild(k),!x.has(h.id)){let I=uf$1(e,"div","pptxv-inspector-comment-replies");I.append(...w.map(H=>S(H,C,y+1))),P.appendChild(I);}}return d===h.id&&P.appendChild(A(h)),P};return {el:o,update(h){g=h,f();}}}function we(e,t){let n=uf$1(e,"div","pptxv-inspector-section"),o=uf$1(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=uf$1(e,"div");return n.appendChild(r),{el:n,body:r}}function Ie(e,t){let n=uf$1(e,"div","pptxv-inspector-row"),o=uf$1(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=uf$1(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function lt(e,t,n){let o=uf$1(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function xe(e,t){let n=uf$1(e,"label","pptxv-field pptxv-field-select"),o=uf$1(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("select");r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let a=e.createElement("option");a.value=i.value,a.textContent=i.label,r.appendChild(a);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function $(e,t){let n=uf$1(e,"label","pptxv-field pptxv-field-checkbox"),o=e.createElement("input");o.type="checkbox",o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=uf$1(e,"span","pptxv-field-label");return r.textContent=t.label,n.append(o,r),{el:n,setValue(i){o.checked=i;},setDisabled(i){o.disabled=i;}}}function re(e,t){let n=uf$1(e,"label","pptxv-field pptxv-field-range"),o=uf$1(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=uf$1(e,"span","pptxv-field-range-row"),i=e.createElement("input");i.type="range",i.min=String(t.min),i.max=String(t.max),i.step=String(t.step??1),i.setAttribute("aria-label",t.label);let a=uf$1(e,"span","pptxv-field-range-readout"),s=t.formatValue??(l=>String(l)),p=()=>{a.textContent=s(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{p(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,a),n.appendChild(r),{el:n,setValue(l){e.activeElement!==i&&(i.value=String(l),p());},setDisabled(l){i.disabled=l;}}}function Gd(e,t,n){let{el:o,body:r}=we(e,t("pptx.slideInspector.presentation")),i,a=xe(e,{label:t("pptx.presentationSettings.showType"),options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:x=>n.updatePresentationSettings({showType:x})}),s=$(e,{label:t("pptx.presentationSettings.loopContinuously"),onChange:x=>n.updatePresentationSettings({loopContinuously:x})}),p=$(e,{label:t("pptx.presentationSettings.showNarration"),onChange:x=>n.updatePresentationSettings({showWithNarration:x})}),l=$(e,{label:t("pptx.presentationSettings.showAnimation"),onChange:x=>n.updatePresentationSettings({showWithAnimation:x})}),m=$(e,{label:t("pptx.presentationSettings.frameSlides"),onChange:x=>n.updatePresentationSettings({printProperties:yc$1(i,x)})}),d=e.createElement("input");d.type="number",d.min="1",d.max="16",d.className="pptxv-field-input",d.setAttribute("aria-label",t("pptx.presentationSettings.slidesPerPage")),d.addEventListener("change",()=>{let x=Number.parseInt(d.value,10);Number.isFinite(x)&&n.updatePresentationSettings({printProperties:zc$1(i,x)});});let u=Ie(e,t("pptx.presentationSettings.slidesPerPage"));return u.value.appendChild(d),r.append(a.el,s.el,p.el,l.el,m.el,u.el),{el:o,update(x){let g=x.presentationProperties;i=g.printProperties,a.setValue(g.showType??"presented"),s.setValue(!!g.loopContinuously),p.setValue(g.showWithNarration!==false),l.setValue(g.showWithAnimation!==false),m.setValue(xc$1(g.printProperties)),e.activeElement!==d&&(d.value=String(wc$1(g.printProperties)));for(let f of [a,s,p,l,m])f.setDisabled(!x.editable);d.disabled=!x.editable;}}}var Hn={bg1:"Background 1",tx1:"Text 1",bg2:"Background 2",tx2:"Text 2",accent1:"Accent 1",accent2:"Accent 2",accent3:"Accent 3",accent4:"Accent 4",accent5:"Accent 5",accent6:"Accent 6",hlink:"Hyperlink",folHlink:"Followed Hyperlink"};function _d(e,t,n){let{el:o,body:r}=we(e,t("pptx.documentProperties.themeHeading")),i=e.createElement("select");i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let a=uf$1(e,"div","pptxv-inspector-deck-btn-row"),s=lt(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),p=lt(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));a.append(s,p),r.appendChild(a);let l="";return {el:o,update(m){let d=m.themeOptions.map(x=>x.path).join(`
4
4
  `);if(d!==l){l=d;let x=i.value;if(i.replaceChildren(),m.themeOptions.length===0){let g=e.createElement("option");g.value="",g.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(g);}else {for(let g of m.themeOptions){let f=e.createElement("option");f.value=g.path,f.textContent=g.name||g.path.split("/").pop()||g.path,i.appendChild(f);}m.themeOptions.some(g=>g.path===x)&&(i.value=x);}}i.disabled=m.themeOptions.length===0;let u=!m.editable||!i.value;s.disabled=u,p.disabled=u;}}}function Ud(e,t,n){let{el:o,body:r}=we(e,t("pptx.themeOverride.heading")),i,a=u=>{let x=i?.activeSlide;if(!x)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:u});return}let g=A(x,i.colorScheme,u);n.updateActiveSlide({clrMapOverride:g.clrMapOverride,backgroundColor:g.backgroundColor,elements:g.elements});},s=uf$1(e,"label","pptxv-field pptxv-field-checkbox"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),p.addEventListener("change",()=>{p.checked?a({...w}):a(void 0);});let l=uf$1(e,"span","pptxv-field-label");l.textContent=t("pptx.themeOverride.enableOverride"),s.append(p,l),r.appendChild(s);let m=uf$1(e,"div","pptxv-inspector-override-rows");r.appendChild(m);let d$1=(u,x,g)=>{let f=uf$1(e,"div","pptxv-inspector-override-row"),v$1=uf$1(e,"span","pptxv-inspector-row-label");v$1.textContent=Hn[u],v$1.title=Hn[u];let b=x[u]??w[u],E=uf$1(e,"span","pptxv-inspector-override-swatch"),A=i?.colorScheme?.[b];typeof A=="string"&&A&&(E.style.backgroundColor=`#${A.replace(/^#/u,"")}`);let S=e.createElement("select");S.className="pptxv-field-select-input",S.setAttribute("aria-label",Hn[u]);for(let h of d){let C=e.createElement("option");C.value=h,C.textContent=h,S.appendChild(C);}return S.value=b,S.disabled=!g,S.addEventListener("change",()=>{let h={...x,[u]:S.value};for(let C of v)h[C]||(h[C]=w[C]);a(h);}),f.append(v$1,E,S),f};return {el:o,update(u){i=u,o.hidden=!u.activeSlide;let x=u.activeSlide?.clrMapOverride;if(p.checked=x!==void 0,p.disabled=!u.editable,m.replaceChildren(),x)for(let g of v)m.appendChild(d$1(g,x,u.editable));}}}function Wx(e,t,n){let{el:o,body:r}=we(e,t("pptx.slideSize.title")),i=uf$1(e,"div","pptxv-inspector-grid");r.appendChild(i);let a={width:0,height:0},s=Y(e,{label:"W",min:1,onCommit:l=>n.updateCanvasSize({width:l,height:a.height})}),p=Y(e,{label:"H",min:1,onCommit:l=>n.updateCanvasSize({width:a.width,height:l})});return i.append(s.el,p.el),{el:o,update(l){a=l.canvasSize,s.setValue(l.canvasSize.width),p.setValue(l.canvasSize.height),s.setDisabled(!l.editable),p.setDisabled(!l.editable);}}}function $x(e,t){let{el:n,body:o}=we(e,t("pptx.documentProperties.notesHandoutHeading")),r=Ie(e,t("pptx.documentProperties.notesSize")),i=Ie(e,t("pptx.master.notesMasterTitle")),a=Ie(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,a.el);let s=t("pptx.digitalSignatures.notAvailable"),p=l=>l===void 0?s:`${l} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(l){r.value.textContent=l.notesCanvasSize?`${l.notesCanvasSize.width} \xD7 ${l.notesCanvasSize.height}px`:s,i.value.textContent=p(l.notesPlaceholderCount),a.value.textContent=p(l.handoutPlaceholderCount);}}}function qx(e,t,n){let{el:o,body:r}=we(e,t("pptx.documentProperties.documentHeading")),i=Ie(e,t("pptx.properties.titleLabel")),a=Ie(e,t("pptx.properties.author")),s=lt(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,a.el,s),{el:o,update(p){i.value.textContent=p.docTitle||"-",a.value.textContent=p.docAuthor||"-";}}}function Wd(e,t,n){let o=uf$1(e,"div","pptxv-inspector-deck"),r=[Gd(e,t,n),_d(e,t,n),Ud(e,t,n),Wx(e,t,n),$x(e,t),qx(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let a of r)a.update(i);},setVisible(i){o.hidden=!i;}}}function Kx(e){return b(e)&&e.text?e.text.slice(0,24):e.type}function $d(e,t,n){let o=uf$1(e,"div","pptxv-inspector-elements"),r=uf$1(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=uf$1(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let a=uf$1(e,"p","pptxv-inspector-empty");return a.textContent=t("pptx.selectionPane.empty"),o.appendChild(a),{el:o,update(s){i.replaceChildren(),a.hidden=s.elements.length>0,[...s.elements].reverse().forEach((p,l)=>{let m=s.elements.length-l-1,d=uf$1(e,"button","pptxv-inspector-layer-row");d.type="button",d.title=`${p.type}: ${p.id}`,d.classList.toggle("is-selected",s.selectedIds.includes(p.id));let u=uf$1(e,"span","pptxv-inspector-layer-num");u.textContent=String(m+1);let x=uf$1(e,"span","pptxv-inspector-layer-label");x.textContent=Kx(p),d.append(u,x),d.addEventListener("click",()=>n(p.id)),i.appendChild(d);});}}}var jx=[{label:"Accent",patch:{fillColor:"#4472c4",strokeColor:"#2f5597",strokeWidth:1}},{label:"Subtle",patch:{fillColor:"#f2f2f2",strokeColor:"#a6a6a6",strokeWidth:1}},{label:"Outline",patch:{fillColor:"transparent",strokeColor:"#4472c4",strokeWidth:2}},{label:"Dark",patch:{fillColor:"#262626",strokeColor:"#000000",strokeWidth:1}}];function qd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-shape-effects";let r=e.createElement("div");for(let S of jx){let h=e.createElement("button");h.type="button",h.textContent=S.label,h.addEventListener("click",()=>n.setShapeStyle(S.patch)),r.appendChild(h);}o.appendChild(r);let i=e.createElement("select");for(let S of Kd$1){let h=e.createElement("option");h.value=S.type,h.textContent=t(S.i18nKey),i.appendChild(h);}i.addEventListener("change",()=>n.setShapeType(i.value)),o.appendChild(i);let a=(S,h)=>{let C=e.createElement("label");C.textContent=S,C.appendChild(h),o.appendChild(C);},s=(S,h)=>{let C=e.createElement("input");return C.type="number",C.min="0",C.addEventListener("change",()=>n.setShapeStyle({[h]:Number(C.value)})),a(S,C),C},p=(S,h)=>{let C=e.createElement("input");return C.type="color",C.addEventListener("input",()=>n.setShapeStyle({[h]:C.value})),a(S,C),C},l=p(t("pptx.textEffects.shadowColor"),"shadowColor"),m=s(t("pptx.textEffects.blur"),"shadowBlur"),d=s(t("pptx.shape.shadowDistance"),"shadowDistance"),u=p(t("pptx.textEffects.glowColor"),"glowColor"),x=s(t("pptx.textEffects.glow"),"glowRadius"),g=s(t("pptx.shape.softEdges"),"softEdgeRadius"),f=e.createElement("input");f.type="checkbox",f.addEventListener("change",()=>n.setShapeStyle({reflectionStartOpacity:f.checked?.5:void 0})),a(t("pptx.textEffects.reflection"),f);let v=(S,h)=>{let C=e.createElement("select");for(let P of ["none","triangle","stealth","diamond","oval","arrow"]){let T=e.createElement("option");T.value=P,T.textContent=P,C.appendChild(T);}C.addEventListener("change",()=>n.setShapeStyle({[h]:C.value==="none"?void 0:C.value}));let y=e.createElement("label");return y.textContent=S,y.appendChild(C),o.appendChild(y),C},b=v(t("pptx.connector.startArrow"),"connectorStartArrow"),E=v(t("pptx.connector.endArrow"),"connectorEndArrow"),A=[i,l,m,d,u,x,g,f,b,E];return {el:o,update(S){let h=S.shapeStyle??{};l.value=h.shadowColor??"#000000",m.value=String(h.shadowBlur??0),d.value=String(h.shadowDistance??0),u.value=h.glowColor??"#ffff00",x.value=String(h.glowRadius??0),g.value=String(h.softEdgeRadius??0),f.checked=!!h.reflectionStartOpacity,i.value=S.shapeType??"rect",i.hidden=!S.shapeType,b.value=h.connectorStartArrow??"none",E.value=h.connectorEndArrow??"none",b.parentElement.hidden=!S.isConnector,E.parentElement.hidden=!S.isConnector;for(let C of A)C.disabled=!S.canShape;for(let C of r.querySelectorAll("button"))C.disabled=!S.canShape;}}}function Kd(e){return `${Math.round(e*100)}%`}function jd(e,t,n,o){let r=n(t("pptx.shape.fillStroke")),i=uf$1(e,"div","pptxv-inspector-row"),a=Fe(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),s=Fe(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),p=uf$1(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.fill");let l=uf$1(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.line"),i.append(p,a.el,l,s.el),r.appendChild(i);let m=Y(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(m.el);let d=re(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:Kd,onCommit:o.setFillOpacity});r.appendChild(d.el);let u=re(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:Kd,onCommit:o.setStrokeOpacity});r.appendChild(u.el);let x=$(e,{label:t("pptx.fill.gradient"),onChange(k){k?o.setGradientFill(h):o.setShapeFill(a.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(x.el);let g=uf$1(e,"div","pptxv-inspector-gradient");r.appendChild(g);let f=uf$1(e,"div","pptxv-inspector-row");g.appendChild(f);let v=M(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...h,type:"linear"})}),b=M(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...h,type:"radial"})});f.append(v.btn,b.btn);let E=Y(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:k=>o.setGradientFill({...h,angle:k})});g.appendChild(E.el);let A=uf$1(e,"div","pptxv-inspector-gradient-stops");g.appendChild(A);let S=M(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let k=h.stops,I=k[k.length-1]?.position??100,H=k[k.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((I+H)/2));}});g.appendChild(S.btn);let h={type:"linear",angle:90,stops:[]},C=[],y=k=>{A.replaceChildren(),C=k.map((I,H)=>{let D=uf$1(e,"div","pptxv-inspector-row"),O=Fe(e,{label:t("pptx.gradient.stops"),onInput:B=>o.updateGradientStop(H,{color:B})},I.color),L=Y(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:B=>o.updateGradientStop(H,{position:B})});L.setValue(I.position);let R=M(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(H)});return R.setDisabled(k.length<=2),D.append(O.el,L.el,R.btn),A.appendChild(D),{color:O,position:L,remove:R}});},P=[a,s,m,d,u,x],T=[v,b,E,S],w=qd(e,t,o);return r.appendChild(w.el),{el:r,update(k){r.hidden=!k.hasSelection||!k.canShape,a.setValue(k.fillColor),s.setValue(k.strokeColor),m.setValue(k.strokeWidth),d.setValue(k.fillOpacity),u.setValue(k.strokeOpacity),x.setValue(k.gradientEnabled),E.setValue(k.gradient.angle),h=k.gradient,y(k.gradient.stops),g.hidden=!k.gradientEnabled,w.update(k);for(let I of P)I.setDisabled(!k.canShape);for(let I of T)I.setDisabled(!k.canShape||!k.gradientEnabled);for(let I of C)I.color.setDisabled(!k.canShape),I.position.setDisabled(!k.canShape),I.remove.setDisabled(!k.canShape||k.gradient.stops.length<=2);}}}function Yd(e,t,n,o){let r=n(t("pptx.inspector.image")),i=e.createElement("button");i.type="button",i.textContent=t("pptx.image.replace"),i.addEventListener("click",o.replaceImage);let a=e.createElement("button");a.type="button",a.textContent=t("pptx.image.reset"),a.addEventListener("click",o.resetImage),r.append(i,a);let s=L=>`${Math.round(L)}%`,p=re(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:s,onCommit:o.setImageBrightness}),l=re(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:s,onCommit:o.setImageContrast}),m=re(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:s,onCommit:o.setImageSaturation});r.append(p.el,l.el,m.el);let d=e.createElement("label");d.textContent=t("pptx.image.artisticEffects");let u=e.createElement("select");for(let[L,R]of Bd$1){let B=e.createElement("option");B.value=L,B.textContent=t(R),u.appendChild(B);}u.addEventListener("change",()=>o.setImageEffects({artisticEffect:u.value==="none"?void 0:u.value})),d.appendChild(u);let x=re(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:s,onCommit:L=>o.setImageEffects({alphaModFix:100-L})}),g=re(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:s,onCommit:L=>o.setImageEffects({biLevel:L})}),f=uf$1(e,"div","pptxv-inspector-grid"),v={},b=(L,R)=>{let B=e.createElement("label");B.textContent=L;let F=e.createElement("input");return F.type="color",F.addEventListener("input",()=>o.setImageEffects({duotone:{color1:R==="color1"?F.value:v.color1?.value??"#000000",color2:R==="color2"?F.value:v.color2?.value??"#ffffff"}})),B.appendChild(F),f.appendChild(B),F},E=b(t("pptx.image.duotoneDark"),"color1"),A=b(t("pptx.image.duotoneLight"),"color2");v.color1=E,v.color2=A,r.append(d,x.el,g.el,f);let S=e.createElement("input");S.type="checkbox";let h=e.createElement("input");h.type="color";let C=40,y=re(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:s,onCommit:L=>{C=L,o.setImageEffects({colorWash:{color:h.value,opacity:L}});}});S.addEventListener("change",()=>o.setImageEffects({colorWash:S.checked?{color:h.value,opacity:C}:void 0})),h.addEventListener("input",()=>o.setImageEffects({colorWash:{color:h.value,opacity:C}})),r.append(S,h,y.el);let P=uf$1(e,"div","pptxv-inspector-grid");r.appendChild(P);let T=(L,R)=>{let B=Y(e,{label:L,min:0,max:90,onCommit:F=>o.setImageCrop(R,F/100)});return P.appendChild(B.el),B},w=T(t("pptx.image.cropLeft"),"left"),k=T(t("pptx.image.cropTop"),"top"),I=T(t("pptx.image.cropRight"),"right"),H=T(t("pptx.image.cropBottom"),"bottom"),D=[p,l,m],O=[w,k,I,H];return {el:r,update(L){r.hidden=!L.hasSelection||!L.isImage,p.setValue(L.imageBrightness),l.setValue(L.imageContrast),m.setValue(L.imageSaturation),u.value=L.imageArtisticEffect,x.setValue(L.imageTransparency),g.setValue(L.imageBiLevel),E.value=L.imageDuotone1,A.value=L.imageDuotone2,S.checked=!!L.imageColorWash,h.value=L.imageColorWash?.color??"#0066cc",y.setValue(L.imageColorWash?.opacity??40),C=L.imageColorWash?.opacity??40,w.setValue(L.cropLeft*100),k.setValue(L.cropTop*100),I.setValue(L.cropRight*100),H.setValue(L.cropBottom*100);for(let R of [...D,x,g])R.setDisabled(!L.isImage);u.disabled=!L.isImage,E.disabled=!L.isImage,A.disabled=!L.isImage,i.disabled=!L.isImage,a.disabled=!L.isImage,S.disabled=!L.isImage,h.disabled=!L.isImage,y.setDisabled(!L.isImage);for(let R of O)R.setDisabled(!L.isImage);}}}function Qd(e,t,n,o){let r=n(t("pptx.media.title")),i=e.createElement("video");i.controls=true,i.preload="metadata",i.className="pptxv-media-preview",i.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(i.duration)?i.duration:void 0,videoWidth:i.videoWidth||void 0,videoHeight:i.videoHeight||void 0}});});let a=e.createElement("img");a.className="pptxv-media-poster",a.alt=t("pptx.media.posterFrame");let s=$(e,{label:t("pptx.media.autoPlay"),onChange:S=>o.setMediaProperties({autoPlay:S})}),p=$(e,{label:t("pptx.media.loop"),onChange:S=>o.setMediaProperties({loop:S})}),l=$(e,{label:t("pptx.media.playAcrossSlides"),onChange:S=>o.setMediaProperties({playAcrossSlides:S})}),m=$(e,{label:t("pptx.media.fullScreen"),onChange:S=>o.setMediaProperties({fullScreen:S})}),d=$(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:S=>o.setMediaProperties({hideWhenNotPlaying:S})}),u=re(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:S=>`${Math.round(S)}%`,onCommit:S=>o.setMediaProperties({volume:S/100})}),x=xe(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(S=>({value:String(S),label:`${S}x`})),onChange:S=>o.setMediaProperties({playbackSpeed:Number(S)})}),g=Y(e,{label:t("pptx.media.trimStart"),min:0,onCommit:S=>o.setMediaProperties({trimStartMs:S})}),f=Y(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:S=>o.setMediaProperties({trimEndMs:S})}),v=Xd(e,t("pptx.media.bookmarks"));v.control.placeholder="12.5 | Intro",v.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:Zd(v.control.value).map((S,h)=>{let[C,y=""]=S.split("|").map(P=>P.trim());return {id:`bookmark-${h+1}`,time:Number(C),label:y}}).filter(({time:S})=>Number.isFinite(S))}));let b=Xd(e,t("pptx.media.captions"));b.control.placeholder="en | English | captions | captions.vtt",b.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:Zd(b.control.value).map((S,h)=>{let[C="",y="",P="captions",T=""]=S.split("|").map(w=>w.trim());return {id:`caption-${h+1}`,language:C,label:y,kind:P,src:T||void 0}})}));let E=e.createElement("output");E.className="pptxv-media-metadata";let A=[s,p,l,m,d];return r.append(i,a,...A.map(({el:S})=>S),u.el,x.el,g.el,f.el,v.label,b.label,E),{el:r,update(S){r.hidden=!S.isMedia;let h=S.media,C=S.mediaPreviewUrl??"";i.src!==C&&(i.src=C),i.hidden=!C,i.poster=S.mediaPosterUrl??"",a.src=S.mediaPosterUrl??"",a.hidden=!S.mediaPosterUrl,s.setValue(h?.autoPlay??false),p.setValue(h?.loop??false),l.setValue(h?.playAcrossSlides??false),m.setValue(h?.fullScreen??false),d.setValue(h?.hideWhenNotPlaying??false),u.setValue((h?.volume??1)*100),x.setValue(String(h?.playbackSpeed??1)),g.setValue(h?.trimStartMs??0),f.setValue(h?.trimEndMs??0),v.control.value=(h?.bookmarks??[]).map(({time:y,label:P})=>`${y} | ${P}`).join(`
5
5
  `),b.control.value=(h?.captionTracks??[]).map(({language:y,label:P,kind:T,src:w})=>`${y} | ${P} | ${T} | ${w??""}`).join(`
6
- `),E.textContent=h?.metadata?`${h.metadata.duration??0}s, ${h.metadata.videoWidth??0} x ${h.metadata.videoHeight??0}, ${h.metadata.codecInfo??h.mediaMimeType??""}`:h?.mediaMimeType??"";for(let y of [...A,u,x,g,f])y.setDisabled(!S.isMedia);v.control.disabled=!S.isMedia,b.control.disabled=!S.isMedia;}}}function Xd(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Zd(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Jd(e,t,n,o){let r=n(t("pptx.arrange.positionSize")),i=uf$1(e,"div","pptxv-inspector-grid");r.appendChild(i);let a=(x,g,f)=>{let v=Y(e,{label:x,min:f,onCommit:b=>o({[g]:b})});return i.appendChild(v.el),v},s=a(t("pptx.arrange.x"),"x"),p=a(t("pptx.arrange.y"),"y"),l=a(t("pptx.arrange.width"),"width",1),m=a(t("pptx.arrange.height"),"height",1),d=a(t("pptx.arrange.rotation"),"rotation"),u=[s,p,l,m,d];return {el:r,update(x){r.hidden=!x.hasSelection,s.setValue(x.x),p.setValue(x.y),l.setValue(x.width),m.setValue(x.height),d.setValue(x.rotation);for(let g of u)g.setDisabled(!x.hasSelection);}}}var Yx=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function ec(e,t,n,o){let r=n(t("pptx.smartart.title")),i=uf$1(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=uf$1(e,"div","pptxv-smartart-layout-grid"),s=new Map;for(let f of y){let v=uf$1(e,"button","pptxv-smartart-layout-button");v.type="button",v.dataset.testid=`smartart-layout-${f}`,v.textContent=t(`pptx.smartart.category.${f}`),v.addEventListener("click",()=>o.setSmartArtLayout(f)),s.set(f,v),a.appendChild(v);}r.appendChild(a);let p=xe(e,{label:t("pptx.smartart.colorScheme"),options:Yx.map(f=>({value:f,label:f})),onChange:o.setSmartArtColorScheme}),l=p.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(p.el);let m=uf$1(e,"span","pptxv-smartart-label");m.textContent=t("pptx.smartart.textPane"),r.appendChild(m);let d=uf$1(e,"div","pptxv-smartart-nodes"),u=e.createElement("button");u.type="button",u.textContent=t("pptx.smartart.addItem"),u.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(u,d);let x="",g=f=>{let v=f.smartArtData,b=v?.nodes.map(E=>E.id).join("|")??"";if(b===x){let E=d.querySelectorAll('[data-testid="smartart-node-text"]');v?.nodes.forEach((A,S)=>{let h=E[S];h&&e.activeElement!==h&&(h.value=A.text);});return}x=b,d.replaceChildren();for(let[E,A]of (v?.nodes??[]).entries()){let S=uf$1(e,"label","pptxv-smartart-node"),h=uf$1(e,"span","pptxv-smartart-node-index");h.textContent=String(E+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${E+1}`),C.value=A.text,C.addEventListener("change",()=>o.setSmartArtNodeText(A.id,C.value));let y=e.createElement("input");y.type="color",y.value=A.style?.fillColor??"#3b82f6",y.title=t("pptx.inspector.fill"),y.addEventListener("input",()=>o.setSmartArtNodeStyle(A.id,{fillColor:y.value}));let P=e.createElement("input");P.type="color",P.value=A.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(A.id,{fontColor:P.value}));let T=e.createElement("button");T.type="button",T.textContent="B",T.addEventListener("click",()=>o.setSmartArtNodeStyle(A.id,{bold:!A.style?.bold}));let w=e.createElement("button");w.type="button",w.textContent="I",w.addEventListener("click",()=>o.setSmartArtNodeStyle(A.id,{italic:!A.style?.italic}));let k=uf$1(e,"span","pptxv-smartart-hierarchy");for(let[I,H]of [["addChild","+Child"],["promote","Outdent"],["demote","Indent"],["remove","Delete"]]){let D=e.createElement("button");D.type="button",D.textContent=H,D.addEventListener("click",()=>o.mutateSmartArtNode(A.id,I)),k.appendChild(D);}S.append(h,C,y,P,T,w,k),d.appendChild(S);}};return {el:r,update(f){r.hidden=!f.isSmartArt;let v=f.smartArtData?.resolvedLayoutType;for(let[b,E]of s)E.disabled=!f.isSmartArt,E.classList.toggle("is-active",b===v),E.setAttribute("aria-pressed",String(b===v));p.setValue(f.smartArtData?.colorScheme??"colorful1"),p.setDisabled(!f.isSmartArt),u.disabled=!f.isSmartArt,g(f);}}}function tc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,P)=>{let T=e.createElement("label");T.textContent=y;let w=e.createElement("select");for(let k of P){let I=e.createElement("option");I.value=k,I.textContent=k,w.appendChild(I);}return T.appendChild(w),o.appendChild(T),w},s=y=>{let P=e.createElement("label");P.textContent=y;let T=e.createElement("input");return T.type="color",P.appendChild(T),o.appendChild(P),T},p=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),m=e.createElement("input");m.type="number",m.min="0",m.max="360",m.title=t("pptx.table.gradientAngle"),o.appendChild(m);let d=s(t("pptx.table.gradientStart")),u=s(t("pptx.table.gradientEnd")),x=a(t("pptx.table.patternPreset"),["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"]),g=s(t("pptx.table.patternForeground")),f=s(t("pptx.table.patternBackground")),v=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=s(t("pptx.table.borderColor")),E=e.createElement("input");E.type="number",E.min="0",E.max="20",E.title=t("pptx.table.borderWidth"),o.appendChild(E);let A=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(m.value),gradientFillStops:[{color:d.value,position:0},{color:u.value,position:100}]});p.addEventListener("change",()=>i({fillMode:p.value}));for(let y of [l,m,d,u])y.addEventListener("change",A);let S=()=>i({fillMode:"pattern",patternFillPreset:x.value,patternFillForeground:g.value,patternFillBackground:f.value});for(let y of [x,g,f])y.addEventListener("change",S);let h=()=>{let y=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(E.value)});};for(let y of [v,b,E])y.addEventListener("change",h);let C=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let P=y.tableCellStyle??{};p.value=P.fillMode??"solid",l.value=P.gradientFillType??"linear",m.value=String(P.gradientFillAngle??90),d.value=P.gradientFillStops?.[0]?.color??"#ff0000",u.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",x.value=P.patternFillPreset??"ltDnDiag",g.value=P.patternFillForeground??"#000000",f.value=P.patternFillBackground??"#ffffff";let T=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;b.value=String(P[`border${T}Color`]??"#374151"),E.value=String(P[`border${T}Width`]??1);for(let w of C)w.disabled=!y.isTable;}}}function Rn(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function oc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],s=T=>{i&&n.setTableCellStyles(a.length>0?a:[i],T);},p=(T,w)=>{let k=e.createElement("label"),I=e.createElement("span");return I.textContent=T,k.append(I,w),o.appendChild(k),k},l=(T,w)=>{let k=e.createElement("input");return k.type="number",k.addEventListener("change",()=>w(Number(k.value))),p(T,k),k},m=(T,w)=>{let k=e.createElement("input");return k.type="color",k.addEventListener("input",()=>s({[w]:k.value})),p(T,k),k},d=(T,w)=>{let k=e.createElement("input");return k.type="checkbox",k.addEventListener("change",()=>s({[w]:k.checked})),p(T,k),k},u=(T,w,k)=>{let I=e.createElement("select");for(let H of w){let D=e.createElement("option");D.value=H,D.textContent=H,I.appendChild(D);}return I.addEventListener("change",()=>k(I.value)),p(T,I),I},x=l(t("pptx.table.fontSize"),T=>s({fontSize:T})),g=m(t("pptx.table.color"),"color"),f=m(t("pptx.table.background"),"backgroundColor"),v=m(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),T=>s({borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T})),E=l(t("pptx.table.cellPadding"),T=>s({marginLeft:T,marginRight:T,marginTop:T,marginBottom:T})),A=d(t("pptx.format.bold"),"bold"),S=d(t("pptx.format.italic"),"italic"),h=d(t("pptx.format.underline"),"underline"),C=u(t("pptx.table.alignment"),["left","center","right"],T=>s({align:T})),y=u(t("pptx.table.verticalAlignment"),["top","middle","bottom"],T=>s({vAlign:T})),P=[x,g,f,v,b,E,A,S,h,C,y];return {el:o,update(T){if(i=T.selectedTableCell,a=T.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let w=T.tableCellStyle??{};x.value=String(w.fontSize??14),g.value=Rn(w.color,"#000000"),f.value=Rn(w.backgroundColor,"#ffffff"),v.value=Rn(w.borderColor,"#374151"),b.value=String(w.borderTopWidth??1),E.value=String(w.marginLeft??4),A.checked=!!w.bold,S.checked=!!w.italic,h.checked=!!w.underline,C.value=w.align??"left",y.value=w.vAlign??"top";for(let k of P)k.disabled=!T.isTable;}}}function nc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(d,u)=>{let x=e.createElement("button");return x.type="button",x.textContent=d,x.addEventListener("click",()=>r&&u(r)),o.appendChild(x),x},a=d=>d.selectedTableCell,s=d=>u=>{let x=a(u);x&&n.mutateTableStructure(x,d);},p=[i(t("pptx.table.insertRowAbove"),s("insertRowAbove")),i(t("pptx.table.insertRowBelow"),s("insertRowBelow")),i(t("pptx.table.deleteRow"),s("deleteRow")),i(t("pptx.table.insertColumnLeft"),s("insertColumnLeft")),i(t("pptx.table.insertColumnRight"),s("insertColumnRight")),i(t("pptx.table.deleteColumn"),s("deleteColumn")),i(t("pptx.table.mergeCells"),d=>n.mergeTableCells(d.selectedTableCells)),i(t("pptx.table.split"),d=>{let u=a(d);u&&n.splitTableCell(u);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let d=r&&a(r);d&&n.setTableColumnWidth(d.column,Number(l.value));});let m=e.createElement("input");return m.type="number",m.min="1",m.title=t("pptx.table.rowHeights"),m.addEventListener("change",()=>{let d=r&&a(r);d&&n.setTableRowHeight(d.row,Number(m.value));}),o.append(l,m),{el:o,update(d){r=d;let u=a(d);o.hidden=!u,l.value=u?String(Math.round((d.tableColumnWidths[u.column]??0)*100)):"",m.value=u?String(d.tableRowHeights[u.row]??32):"";for(let x of p)x.disabled=!u;p[6].disabled=d.selectedTableCells.length<2,l.disabled=!u,m.disabled=!u;}}}function rc(e,t,n,o){let r=n(t("pptx.inspector.table")),i=$(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=$(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),s=$(e,{label:t("pptx.table.bandedColumns"),onChange:h=>o.setTableOptions({bandedColumns:h})}),p=$(e,{label:t("pptx.table.totalRow"),onChange:h=>o.setTableOptions({lastRow:h})}),l=$(e,{label:t("pptx.table.firstColumn"),onChange:h=>o.setTableOptions({firstCol:h})}),m=$(e,{label:t("pptx.table.lastColumn"),onChange:h=>o.setTableOptions({lastCol:h})}),d=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:h=>o.setTableOptions({rtl:h})});r.append(i.el,a.el,s.el,p.el,l.el,m.el,d.el);let u=Y(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(u.el);let x=e.createElement("input");x.placeholder=t("pptx.table.styleId"),x.addEventListener("change",()=>o.setTableOptions({tableStyleId:x.value}));let g=e.createElement("input");g.type="color",g.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:g.value}));let f=e.createElement("input");f.type="color",f.addEventListener("input",()=>o.setTableOptions({},{borderColor:f.value})),r.append(x,g,f);let v=oc(e,t,o),b=tc(e,t,o),E=nc(e,t,o);r.append(v.el,b.el,E.el);let A=[i,a,s,p,l,m,d],S=[u];return {el:r,update(h){r.hidden=!h.hasSelection||!h.isTable,i.setValue(h.tableHeaderRow),a.setValue(h.tableBandedRows),s.setValue(h.tableBandedColumns),p.setValue(h.tableLastRow),l.setValue(h.tableFirstCol),m.setValue(h.tableLastCol),d.setValue(h.tableRtl),u.setValue(h.tableCellPadding),x.value=h.tableStyleId,g.value=h.tableCellBackground,f.value=h.tableCellBorder,v.update(h),b.update(h),E.update(h);for(let C of A)C.setDisabled(!h.isTable);x.disabled=!h.isTable,g.disabled=!h.isTable,f.disabled=!h.isTable;for(let C of S)C.setDisabled(!h.isTable);}}}function ic(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=w=>n.setTextStyle(w,r?.selectedTextRange),a=w=>n.setTextStyle(w),s=(w,k)=>{let I=e.createElement("label");I.textContent=w,I.appendChild(k),o.appendChild(I);},p=(w,k,I=0,H=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(I),D.addEventListener("change",()=>(H?a:i)({[k]:Number(D.value)})),s(w,D),D},l=(w,k)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[k]:I.value})),s(w,I),I},m=(w,k)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[k]:I.checked})),s(w,I),I},d=p(t("pptx.textFormatting.columns"),"columnCount",1,true);d.max="6";let u=p(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),x=l(t("pptx.textEffects.outline"),"textOutlineColor"),g=p(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),f=m(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=p(t("pptx.textEffects.blur"),"textShadowBlur"),E=l(t("pptx.textEffects.glowColor"),"textGlowColor"),A=p(t("pptx.textEffects.glow"),"textGlowRadius"),S=m(t("pptx.textEffects.reflection"),"textReflection"),h=m(t("pptx.textFormatting.strikethrough"),"strikethrough"),C=l(t("pptx.textFormatting.highlight"),"highlightColor"),y=e.createElement("select");for(let w of Cd$1){let k=e.createElement("option");k.value=w.value,k.textContent=w.label,y.appendChild(k);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),s(t("pptx.textEffects.transform"),y);let P=p(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),T=Array.from(o.querySelectorAll("input,select"));return {el:o,update(w){r=w,o.hidden=!w.canText;let k=w.textStyle??{};d.value=String(k.columnCount??1),u.value=String(k.columnSpacing??0),x.value=k.textOutlineColor??"#000000",g.value=String(k.textOutlineWidth??0),f.checked=!!k.textShadowOpacity,v.value=k.textShadowColor??"#000000",b.value=String(k.textShadowBlur??4),E.value=k.textGlowColor??"#ffff00",A.value=String(k.textGlowRadius??0),S.checked=!!k.textReflection,h.checked=!!k.strikethrough,C.value=k.highlightColor??"#ffff00",y.value=k.textWarpPreset??"textNoShape",P.value=String(k.textWarpAdj??5e4);for(let I of T)I.disabled=!w.canText;}}}function ac(e,t,n,o){let r=n(t("pptx.inspector.text")),i=xe(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=$(e,{label:t("pptx.textAdvanced.wrapText"),onChange:h=>o.setTextWrap(h?"square":"none")});r.appendChild(a.el);let s=xe(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(s.el);let p=(h,C,y)=>Y(e,{label:h,min:y,onCommit:P=>o.setTextAdvanced({[C]:P})}),l=p(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),m=p(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),d=p(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),u=p(t("pptx.textAdvanced.spacingBefore"),"paragraphSpacingBefore",0),x=p(t("pptx.textAdvanced.spacingAfter"),"paragraphSpacingAfter",0),g=p(t("pptx.textAdvanced.indent"),"paragraphIndent"),f=p(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),v=xe(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(h=>({value:h,label:t(`pptx.textAdvanced.direction.${h}`)})),onChange:h=>o.setTextAdvanced({textDirection:h})}),b=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:h=>o.setTextAdvanced({rtl:h})}),E=[l,m,d,u,x,g,f];r.append(...E.map(({el:h})=>h),v.el,b.el);let A=ic(e,t,o);r.appendChild(A.el);let S=[i,a,s,...E,v,b];return {el:r,update(h){r.hidden=!h.hasSelection||!h.canText,i.setValue(h.vAlign),a.setValue(h.textWrap==="square"),s.setValue(h.autoFitMode),l.setValue(h.characterSpacing),m.setValue(h.lineSpacing),d.setValue(h.lineSpacingExactPt??0),u.setValue(h.paragraphSpacingBefore),x.setValue(h.paragraphSpacingAfter),g.setValue(h.paragraphIndent),f.setValue(h.paragraphMarginLeft),v.setValue(h.textDirection),b.setValue(h.textRtl),A.update(h);for(let C of S)C.setDisabled(!h.canText);}}}function ro(e,t,n){let o=uf$1(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=uf$1(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let T of a){let w=uf$1(e,"button","pptxv-inspector-tab");w.type="button",w.setAttribute("role","tab"),w.textContent=T.label,w.addEventListener("click",()=>u(T.id)),r.appendChild(w),i.set(T.id,w);}let s=$d(e,t,T=>n.selectElement(T));s.el.classList.add("pptxv-inspector-body"),o.appendChild(s.el);let p=uf$1(e,"div","pptxv-inspector-body");o.appendChild(p);let l=zd(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let m=Id(e,t,n);o.appendChild(m.el);let d="properties",u=T=>{d=T;for(let[w,k]of i)k.classList.toggle("is-active",w===T),k.setAttribute("aria-selected",String(w===T));s.el.hidden=T!=="elements",p.hidden=T!=="properties",l.el.hidden=T!=="comments";},x=Wd(e,t,n);p.appendChild(x.el);let g=T=>{let w=uf$1(e,"div","pptxv-inspector-section"),k=uf$1(e,"h4","pptxv-inspector-section-title");return k.textContent=T,w.appendChild(k),p.appendChild(w),w},f=Jd(e,t,g,n.setGeometry),v=jd(e,t,g,n),b=ac(e,t,g,n),E=Yd(e,t,g,n),A=rc(e,t,g,n),S=ec(e,t,g,n),h=Sd(e,t,g,n),C=Vd(e,t,g,n),y=Qd(e,t,g,n),P=[f,v,b,E,A,S,h,C,y];return u(d),{el:o,update(T){x.setVisible(!T.hasSelection);for(let w of P)w.update(T);},updateDeck(T){s.update(T),l.update(T),x.update(T),m.update({editable:T.editable,selectedElementId:T.selectedElementId,elements:T.elements,animations:T.activeSlide?.animations??[]});},setEditable(T){o.hidden=!T;}}}var sc=128,Xx=[1,2,3,4,6,9],Zx={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function pc(e,t,n,o,r){let i=uf$1(e,"section","pptxv-master-card"),a=uf$1(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let s=uf$1(e,"input","pptxv-master-background");s.type="color",s.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",s.setAttribute("aria-label","Master background color"),s.addEventListener("input",()=>r(s.value)),i.append(a,s),n.appendChild(i);}function lc(e,t,n,o,r){let i=uf$1(e,"section","pptxv-master-card"),a=uf$1(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let s=uf$1(e,"div","pptxv-master-empty");s.textContent=t("pptx.master.noPlaceholders"),i.appendChild(s);}for(let s of o){let p=uf$1(e,"div","pptxv-master-placeholder"),l=uf$1(e,"span",`pptxv-master-dot is-${r}`);p.append(l,e.createTextNode(t(Zx[s.type]??s.type))),i.appendChild(p);}n.appendChild(i);}function Qx(e,t){let n=t===null?void 0:e.layouts?.[t];return {id:n?.path??e.path,rId:"",slideNumber:0,elements:n?[...e.elements??[],...n.elements??[]]:e.elements??[],backgroundColor:n?.backgroundColor??e.backgroundColor,backgroundImage:n?.backgroundImage??e.backgroundImage}}function Jx(e,t,n,o){let r=sc/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let s=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((p,l)=>({layoutIndex:l,label:p.name||t("pptx.master.layout")}))??[]];for(let p of s){let l=uf$1(e,"button",`pptxv-master-thumb${p.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",p.label);let m=o.active.masterIndex===i&&o.active.layoutIndex===p.layoutIndex;l.classList.toggle("is-active",m),m&&l.setAttribute("aria-current","page");let d=uf$1(e,"span","pptxv-master-thumb-name");d.textContent=p.label;let u=uf$1(e,"span","pptxv-master-thumb-frame");u.style.width=`${sc}px`,u.style.height=`${Math.round(o.canvasSize.height*r)}px`,u.appendChild(o.renderStage(Qx(a,p.layoutIndex),r)),l.append(d,u),l.addEventListener("click",()=>o.onSelect(i,p.layoutIndex)),n.appendChild(l);}}}function On(e,t){let n=uf$1(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=uf$1(e,"header","pptxv-master-header"),i=uf$1(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=uf$1(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let s=uf$1(e,"div","pptxv-master-tabs");s.setAttribute("role","tablist");for(let[l,m]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let d=uf$1(e,"button","pptxv-master-tab");d.type="button",d.role="tab",d.textContent=t(m),d.setAttribute("aria-selected",String(o.tab===l)),d.classList.toggle("is-active",o.tab===l),d.addEventListener("click",()=>o.onTabChange(l)),s.appendChild(d);}let p=uf$1(e,"div","pptxv-master-body");if(p.setAttribute("role","tabpanel"),o.tab==="slides")Jx(e,t,p,o);else if(o.tab==="notes")o.notesMasterPresent?(pc(e,t,p,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),lc(e,t,p,o.notesPlaceholders??[],"notes")):(p.textContent=t("pptx.master.noNotesMaster"),p.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)p.textContent=t("pptx.master.noHandoutMaster"),p.classList.add("pptxv-master-empty");else {let l=uf$1(e,"section","pptxv-master-card"),m=uf$1(e,"div","pptxv-master-card-label");m.textContent=t("pptx.master.handoutSlidesPerPage");let d=uf$1(e,"div","pptxv-master-counts");for(let u of Xx){let x=uf$1(e,"button","pptxv-master-count");x.type="button",x.textContent=String(u),x.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===u)),x.classList.toggle("is-active",o.handoutSlidesPerPage===u),x.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(u)),d.appendChild(x);}l.append(m,d),p.appendChild(l),pc(e,t,p,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),lc(e,t,p,o.handoutPlaceholders??[],"handout");}n.append(r,s,p);},setVisible(o){n.hidden=!o;}}}function Fn(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-mobile-actions"),s=uf$1(e,"div","pptxv-mobile-sheet-host");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let p=e.createElement("button");p.type="button",p.className="pptxv-mobile-sheet-backdrop",p.setAttribute("aria-label",t("pptx.settings.close"));let l=uf$1(e,"section","pptxv-mobile-sheet"),m=uf$1(e,"header","pptxv-mobile-sheet-header"),d=uf$1(e,"span","pptxv-mobile-sheet-handle"),u=e.createElement("strong");m.append(d,u);let x=uf$1(e,"div","pptxv-mobile-sheet-body");l.append(m,x),s.append(p,l),s.hidden=true,a.appendChild(s);let g=null,f=0,v=[],b=[],E=true,A=false,S=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(S,r);let h=()=>{r&&S?.parentNode&&S.parentNode.insertBefore(r,S.nextSibling);},C=()=>{g=null,s.hidden=true,l.style.transform="",h();for(let D of w.querySelectorAll("button"))D.setAttribute("aria-pressed","false");};p.addEventListener("click",C);let y=yd$1((D,O)=>{l.style.transform=D>0?`translateY(${D}px)`:"",l.style.transition=O?"none":"";},C),P=D=>({clientY:D.clientY,pointerId:D.pointerId,currentTarget:m});m.addEventListener("pointerdown",D=>y.pointerDown(P(D))),m.addEventListener("pointermove",D=>y.pointerMove(P(D))),m.addEventListener("pointerup",D=>y.pointerUp(P(D))),m.addEventListener("pointercancel",D=>y.cancel(P(D)));let T=D=>{if(x.replaceChildren(),u.textContent=t(D==="inspector"?"pptx.field.format":`pptx.${D==="slides"?"sections.slides":D==="comments"?"toolbar.comments":D==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),s.setAttribute("aria-label",u.textContent),D==="slides"){let O=uf$1(e,"div","pptxv-mobile-slide-list");for(let L=0;L<v.length;L+=1){let R=e.createElement("button");R.type="button",R.textContent=ff$1(v[L],L),R.classList.toggle("is-active",L===f),R.addEventListener("click",()=>{o(L),C();}),O.appendChild(R);}x.appendChild(O);}else if(D==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[L,R]of O){let B=e.createElement("button");B.type="button",B.textContent=L,B.addEventListener("click",R),x.appendChild(B);}}else if(D==="inspector"&&r)x.appendChild(r);else if(D==="comments"){b.length===0&&(x.textContent=t("pptx.comments.noneOnSlide"));for(let B of b){let F=uf$1(e,"article","pptxv-mobile-comment"),V=e.createElement("textarea");V.value=B.text,V.setAttribute("aria-label",t("pptx.comments.edit"));let N=uf$1(e,"div","pptxv-mobile-comment-actions"),W=e.createElement("button");W.type="button",W.textContent=t("pptx.comments.save"),W.addEventListener("click",()=>n.edit.comments.editComment(B.id,V.value));let Z=e.createElement("button");Z.type="button",Z.textContent=B.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),Z.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(B.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(B.id)),N.append(W,Z,K),F.append(V,N),x.appendChild(F);}let O=uf$1(e,"div","pptxv-mobile-comment-add"),L=e.createElement("textarea");L.placeholder=t("pptx.comments.addPlaceholder"),L.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let R=e.createElement("button");R.type="button",R.textContent=t("pptx.comments.addComment"),R.addEventListener("click",()=>{n.edit.comments.addComment(L.value)&&(L.value="");}),O.append(L,R),x.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[L,R,B]of O){if(B&&ze$1(B,i))continue;let F=e.createElement("button");F.type="button",F.textContent=L,F.addEventListener("click",R),x.appendChild(F);}}},w=e.createElement("nav");w.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let k=D=>{if(g=hd$1(g,D),!g){C();return}T(g),s.hidden=false;for(let O of w.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===g));},I={slides:"panel-left",insert:"plus",inspector:"shapes",comments:"notes",notes:"sticky-note"};for(let D of id({slideCount:0})){let O=D.key;if(O==="notes"&&ze$1("notes",i))continue;let L=e.createElement("button");L.type="button",L.dataset.mobileAction=O,O==="notes"&&L.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),L.appendChild(Df(e,I[O]));let R=uf$1(e,"span");R.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),L.appendChild(R),L.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}k(O);}),w.appendChild(L);}a.appendChild(w);let H=()=>{let D=id({slideCount:v.length});for(let O of D){let L=w.querySelector(`button[data-mobile-action='${O.key}']`);if(!L)continue;let R=O.key==="insert"||O.key==="inspector"||O.key==="comments";L.disabled=O.disabled||R&&!E||O.key==="inspector"&&!r,L.setAttribute("aria-pressed",String(O.key==="notes"?A:O.key===g));}};return {el:a,update(D,O,L){f=D,v=O,b=L,g&&T(g),H();},toggle:k,close:C,setEditable(D){E=D,!E&&g&&["insert","inspector","comments"].includes(g)&&C(),H();},setNotesExpanded(D){A=D,H();}}}function Bn(e,t,n,o){let r=uf$1(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=M(e,{label:t("pptx.mobileToolbar.menu"),icon:"sidebar",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=ze$1("undo",o)?null:M(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),s=ze$1("redo",o)?null:M(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),p=uf$1(e,"span","pptxv-mobile-toolbar-spacer"),l=M(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),m=ze$1("fullscreen",o)?null:M(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),d=uf$1(e,"span","pptxv-mobile-toolbar-ai"),u=uf$1(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...s?[s.btn]:[],p,d,l.btn,...m?[m.btn]:[],u),{el:r,collaborationHost:u,aiHost:d,setEditState({editable:x,canUndo:g,canRedo:f}){for(let v of [i.btn,a?.btn,s?.btn])v&&(v.hidden=!x);u.hidden=!x,d.hidden=!x,a?.setDisabled(!g),s?.setDisabled(!f);}}}function Vn(e,t,n,o){let r=uf$1(e,"div","pptxv-notes"),i=uf$1(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=uf$1(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let s=uf$1(e,"span","pptxv-notes-chevron");s.setAttribute("aria-hidden","true"),i.appendChild(s);let p=uf$1(e,"div","pptxv-notes-body");p.id="slide-notes-content",r.appendChild(p);let l=uf$1(e,"div","pptxv-notes-toolbar");p.appendChild(l);let m=e.createElement("button");m.type="button",m.className="pptxv-notes-mode",l.appendChild(m);let d=uf$1(e,"div","pptxv-notes-rich-editor");d.contentEditable="true",d.setAttribute("role","textbox"),d.setAttribute("aria-multiline","true"),d.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(d);let u=e.createElement("textarea");u.className="pptxv-notes-textarea",u.name="slide-notes",u.spellcheck=true,u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(u);let x=false,g=null,f=false,v=hb$1(),b=[],E=y=>{v=y,d.hidden=!v,u.hidden=v,l.hidden=!f,m.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),m.setAttribute("aria-pressed",String(v));},A=()=>{if(!f)return;let y=ib$1(d);b=y.segments,o(y.text,y.segments);},S=(y,P,T)=>{let w=e.createElement("button");w.type="button",w.className="pptxv-notes-tool",w.textContent=y,w.title=P,w.setAttribute("aria-label",P),w.addEventListener("mousedown",k=>k.preventDefault()),w.addEventListener("click",()=>{d.focus(),T(),A();}),l.insertBefore(w,m);};S("B",t("pptx.notes.bold"),()=>kb$1("bold")),S("I",t("pptx.notes.italic"),()=>kb$1("italic")),S("U",t("pptx.notes.underline"),()=>kb$1("underline")),S("S",t("pptx.notes.strikethrough"),()=>kb$1("strikeThrough")),S("\u2022",t("pptx.notes.bulletList"),()=>{b=jb$1(d,b,"bullet").segments,d.innerHTML=fb$1(b);}),S("1.",t("pptx.notes.numberedList"),()=>{b=jb$1(d,b,"numbered").segments,d.innerHTML=fb$1(b);}),S("\u2192",t("pptx.notes.indent"),()=>{b=jb$1(d,b,"indent").segments,d.innerHTML=fb$1(b);}),S("\u2190",t("pptx.notes.outdent"),()=>{b=jb$1(d,b,"outdent").segments,d.innerHTML=fb$1(b);}),S("\u2197",t("pptx.notes.insertLink"),()=>{let y=e.getSelection()?.toString()??"",P=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!P)return;let T=window.prompt(t("pptx.notes.linkDisplayText"),y)??y;mb$1(lb$1(P),T);}),m.addEventListener("click",()=>{v?(A(),u.value=eb$1(b)):(b=db$1(u.value),d.innerHTML=fb$1(b)),E(!v);});let h=()=>{f&&o(u.value);};u.addEventListener("change",h),u.addEventListener("blur",h),d.addEventListener("blur",A);let C=()=>{r.dataset.collapsed=x?"false":"true",i.setAttribute("aria-expanded",String(x)),p.hidden=!x,s.textContent=x?"\u25BE":"\u25B8";};return C(),E(v),{el:r,update({slide:y,editable:P}){f=P;let T=y!==void 0;u.disabled=!T,u.readOnly=!f,d.contentEditable=String(f&&T),l.hidden=!f,u.placeholder=t(T?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let w=y?.id??null;w!==g&&(g=w,b=gb$1(y),u.value=eb$1(b),d.innerHTML=fb$1(b));},setExpanded(y){x=y,C();}}}function Nn(e,t,n,o){let r=uf$1(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=M(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!ze$1("navigation",o),s=a?M(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,p=a?M(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=uf$1(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let m of [i.btn,s?.btn,p?.btn])m?.addEventListener("pointerdown",d=>d.stopPropagation()),m?.addEventListener("click",d=>d.stopPropagation());return r.append(i.btn,...s?[s.btn]:[],...p?[p.btn]:[],l),{el:r,update(m,d){let u=xd$1(m,d);s?.setDisabled(u.previousDisabled),p?.setDisabled(u.nextDisabled),l.textContent=u.counterLabel;}}}function dc(e){if(!e.trim())return "";try{let t=R(e),n=Q(t);return n?nb$1(n):""}catch{return ""}}function cc(e,t,n){let o=uf$1(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=uf$1(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=uf$1(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=uf$1(e,"header","pptxv-eqdlg-header"),s=uf$1(e,"h2");s.textContent=t("pptx.equation.insertTitle");let p=uf$1(e,"button","pptxv-eqdlg-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),a.append(s,p);let l=uf$1(e,"div","pptxv-eqdlg-preview"),m=uf$1(e,"label","pptxv-eqdlg-field"),d=uf$1(e,"span","pptxv-eqdlg-label");d.textContent=t("pptx.equation.latexInput");let u=e.createElement("textarea");u.className="pptxv-eqdlg-input",u.rows=3,u.placeholder="\\frac{a}{b} + \\sqrt{c}",u.spellcheck=false;let x=uf$1(e,"span","pptxv-eqdlg-hint");x.textContent=t("pptx.equation.latexHint"),m.append(d,u,x);let g=uf$1(e,"div","pptxv-eqdlg-field"),f=uf$1(e,"span","pptxv-eqdlg-label");f.textContent=t("pptx.equation.templates");let v=uf$1(e,"div","pptxv-eqdlg-grid"),b=[];for(let I of T){let H=uf$1(e,"button","pptxv-eqdlg-template");H.type="button",H.title=t(I.i18nKey);let D=uf$1(e,"span","pptxv-eqdlg-template-math");D.innerHTML=dc(I.latex);let O=uf$1(e,"span","pptxv-eqdlg-template-label");O.textContent=t(I.i18nKey),H.append(D,O),H.addEventListener("click",()=>{u.value=I.latex,P(),u.focus();}),v.appendChild(H),b.push(H);}g.append(f,v);let E=()=>{let I=u.value.trim();if(!I)return null;try{let H=R(I);return Object.keys(H).length>0?H:null}catch{return null}},A=true,S$1,h=uf$1(e,"footer","pptxv-eqdlg-footer"),C=M(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>w(false)}),y=M(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let I=E();I&&(n(I,S$1),u.value="",P(),w(false));}});y.btn.classList.add("is-primary"),h.append(C.btn,y.btn),i.append(a,l,m,g,h),o.append(r,i);let P=()=>{let I=dc(u.value);I?(l.classList.remove("is-empty"),l.innerHTML=I):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let H=u.value;for(let[D,O]of b.entries())O.classList.toggle("is-active",T[D]?.latex===H);y.setDisabled(!A||E()===null);};u.addEventListener("input",P),o.addEventListener("keydown",I=>{I.stopPropagation(),I.key==="Escape"?w(false):I.key==="Enter"&&(I.ctrlKey||I.metaKey)&&(I.preventDefault(),y.btn.click());}),r.addEventListener("click",()=>w(false)),p.addEventListener("click",()=>w(false));let T$1=false,w=I=>{T$1=I,o.hidden=!T$1,T$1?u.focus():S$1=void 0;},k=()=>{let I=S$1!==void 0,H=t(I?"pptx.equation.editTitle":"pptx.equation.insertTitle"),D=t(I?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",H),s.textContent=H,y.btn.textContent=D,y.btn.title=D,y.btn.setAttribute("aria-label",D);};return P(),{el:o,toggle:()=>{T$1||(S$1=void 0,u.value="",k(),P()),w(!T$1);},setOpen:w,isOpen:()=>T$1,setEditable(I){A=I,u.disabled=!I,y.setDisabled(!I||E()===null);},openEdit(I,H){S$1=I,u.value=S(H),k(),P(),w(true);}}}function zn(e,t,n){let o=uf$1(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=uf$1(e,"label","pptxv-findreplace-checkbox"),s=e.createElement("input");s.type="checkbox",s.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(s,e.createTextNode(t("pptx.findReplace.matchCase")));let p=uf$1(e,"span","pptxv-findreplace-status");p.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,s.checked);p.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},m=M(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),d=M(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,s.checked),l();}}),u=M(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,s.checked),l();}}),x=M(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.stopPropagation(),b.key==="Escape"&&v(false);}),i.addEventListener("keydown",b=>b.stopPropagation());let g=uf$1(e,"div","pptxv-findreplace-row");g.append(r,i,a,m.btn,d.btn,u.btn,x.btn),o.append(g,p);let f=false,v=b=>{f=b,o.hidden=!f,f&&r.focus();};return {el:o,toggle:()=>v(!f),setOpen:v,isOpen:()=>f,setEditable(b){i.disabled=!b,d.setDisabled(!b),u.setDisabled(!b);}}}function mc(e,t,n){let o=uf$1(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=Fe(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:d=>n.setSlideBackgroundColor(d)},"#ffffff"),i=M(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=M(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),s=uf$1(e,"div","pptxv-format-background-row"),p=uf$1(e,"span","pptxv-format-background-label");p.textContent=t("pptx.slideBackground.colour"),s.append(p,r.el,i.btn,a.btn),o.appendChild(s);let l=false,m=d=>{l=d,o.hidden=!l;};return {el:o,toggle:()=>m(!l),setOpen:m,isOpen:()=>l,setEditable(d){r.setDisabled(!d),i.setDisabled(!d);}}}var eg=24,tg=1,og=400;function se(e){return e!==void 0&&b(e)}function io(e){return e!==void 0&&c(e)}function Ee(e){let t=se(e)?e.textStyle:void 0,n=se(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??eg,fontFamily:t?.fontFamily??n?.fontFamily,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Le(e,t){if(!se(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function je(e,t){let n=Ee(e);return Le(e,{[t]:!n[t]})}function ao(e,t){let n=Math.min(og,Math.max(tg,Math.round(t)));return Le(e,{fontSize:n})}function Gn(e,t){return ao(e,Ee(e).fontSize+t)}function _n(e,t){return Le(e,{color:t})}function Un(e,t){return Le(e,{highlightColor:t})}function Te(e,t){return io(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function Wn(e,t){return Le(e,{fontFamily:t})}function $n(e,t){return Le(e,{characterSpacing:t})}var ng={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function qn(e){let t=Ee(e).hasTextShadow;return Le(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:ng)}function Kn(e,t){if(!se(e)||!e.textSegments)return {};let n=Ab$1(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function jn(e){return Le(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var rg=[{edge:"left",icon:"align-left"},{edge:"centerH",icon:"align-center"},{edge:"right",icon:"align-right"},{edge:"top",icon:"align-top"},{edge:"middle",icon:"align-middle"},{edge:"bottom",icon:"align-bottom"}];function uc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.arrange"),o.appendChild(i);let a=M(e,{label:t("pptx.arrange.bringToFront"),icon:"bring-front",onClick:n.bringToFront}),s=M(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),p=M(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),l=M(e,{label:t("pptx.arrange.sendToBack"),icon:"send-back",onClick:n.sendToBack}),m=rg.map(A=>M(e,{label:t("pptx.arrange.align",{direction:A.edge}),icon:A.icon,onClick:()=>n.alignElements(A.edge)})),d=M(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),u=M(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),x=M(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),g=M(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),f=M(e,{label:t("pptx.ribbon.group"),icon:"group",onClick:n.groupSelected}),v=M(e,{label:t("pptx.ribbon.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),b=M(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",onClick:n.duplicate}),E=M(e,{label:t("pptx.arrange.delete"),icon:"trash",onClick:n.delete});return r.append(a.btn,s.btn,p.btn,l.btn,...m.map(A=>A.btn),d.btn,u.btn,x.btn,g.btn,f.btn,v.btn,b.btn,E.btn),{el:o,update({editable:A,hasSelection:S,isGroup:h,selectedCount:C}){let y=A&&S;for(let P of [a,s,p,l,...m,x,g,b,E])P.setDisabled(!y);d.setDisabled(!A||C<3),u.setDisabled(!A||C<3),f.setDisabled(!A||C<2),v.setDisabled(!y||!h);}}}function xc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=M(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),s=M(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),p=M(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=M(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,s.btn,p.btn,l.btn),{el:o,update({hasSelection:m,hasClipboard:d,editable:u,formatPainterActive:x}){a.setDisabled(!u||!d),s.setDisabled(!u||!m),p.setDisabled(!m),l.setDisabled(!u||!m&&!x),l.btn.dataset.active=String(x);}}}function gc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=M(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),s=M(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace});return r.append(a.btn,s.btn),{el:o}}function J(e,t){let n=uf$1(e,"div","pptxv-dropdown"),o=uf$1(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=uf$1(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(Df(e,t.icon??"chevron-down")),n.appendChild(o);let i=uf$1(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,s,p=new Map,l=d=>{a=d,i.hidden=!d,o.setAttribute("aria-expanded",String(d)),o.classList.toggle("is-active",d);},m=()=>{for(let[d,u]of p){let x=s!==void 0&&u===s;d.classList.toggle("is-selected",x),d.setAttribute("aria-selected",String(x));}};for(let d of t.items){let u=uf$1(e,"button","pptxv-dropdown-item");u.type="button",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.textContent=d.label,d.style&&Object.assign(u.style,d.style),u.addEventListener("click",()=>{l(false),t.onSelect(d.value);}),i.appendChild(u),p.set(u,d.value);}return o.addEventListener("click",d=>{d.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",d=>{a&&!n.contains(d.target)&&l(false);}),{el:n,setDisabled(d){o.disabled=d,d&&l(false);},setTriggerText(d){r.textContent=d;},setSelected(d){s=d,m();},close:()=>l(false)}}var Ye=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function ig(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Xe(e,t,n){let o=uf$1(e,"div","pptxv-swatch-picker"),r=uf$1(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(Df(e,n.icon));let i=uf$1(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=uf$1(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let s=uf$1(e,"div","pptxv-swatch-grid");a.appendChild(s);let p=n.fallback,l=new Map,m=()=>{for(let[f,v]of l)f.classList.toggle("is-selected",v===p);i.style.backgroundColor=p;},d=false,u=f=>{d=f,a.hidden=!f,r.setAttribute("aria-expanded",String(f)),r.classList.toggle("is-active",f);};for(let f of n.swatches){let v=uf$1(e,"button","pptxv-swatch");v.type="button",v.setAttribute("data-pptx-compact",""),v.style.backgroundColor=f,v.setAttribute("aria-label",f),v.addEventListener("click",()=>{u(false),n.onSelect(f);}),s.appendChild(v),l.set(v,f);}let x=uf$1(e,"label","pptxv-swatch-custom");x.textContent=t("pptx.ribbon.customColour");let g=e.createElement("input");return g.type="color",g.className="pptxv-swatch-custom-input",g.addEventListener("input",()=>n.onSelect(g.value)),x.appendChild(g),a.appendChild(x),r.addEventListener("click",f=>{f.stopPropagation(),u(!d);}),e.addEventListener("pointerdown",f=>{d&&!o.contains(f.target)&&u(false);}),m(),{el:o,setValue(f){p=ig(f,n.fallback),g.value=p,m();},setDisabled(f){r.disabled=f,f&&u(false);}}}var bc=2;function fc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=J(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:Ld$1.map(C=>({label:C,value:C,style:{fontFamily:C}})),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let s=J(e,{triggerLabel:t("pptx.textPanel.size"),triggerText:"24",items:Md$1.map(C=>({label:String(C),value:C})),onSelect:n.setFontSize});s.el.classList.add("pptxv-font-size-dd");let p=M(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=M(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),m=M(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),d=M(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),u=M(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),x=M(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-bc)}),g=M(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(bc)}),f=M(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),v=J(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:Nd$1.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.setCharacterSpacing});v.el.querySelector(".pptxv-dropdown-text")?.remove();let b=J(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:Pd$1.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let E=Xe(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:Ye,fallback:"#000000",onSelect:n.setTextColor}),A=Xe(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:Ye,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,s.el,x.btn,g.btn,p.btn,l.btn,m.btn,d.btn,u.btn,f.btn,v.el,b.el,E.el,A.el);let S=[p,l,m,d],h=[a,s,x,g,p,l,m,d,u,f,v,b,E,A];return {el:o,update({canFormat:C,editable:y,text:P}){p.setActive(P.bold),l.setActive(P.italic),m.setActive(P.underline),d.setActive(P.strikethrough),u.setActive(P.hasTextShadow),a.setTriggerText(P.fontFamily??"Segoe UI"),a.setSelected(P.fontFamily),s.setTriggerText(String(P.fontSize)),s.setSelected(P.fontSize),E.setValue(P.color),A.setValue(P.highlightColor);for(let T of h)T.setDisabled(!y||!C);for(let T of S)(!y||!C)&&T.setActive(false);}}}var vc=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function hc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=M(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),s=M(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),p=M(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=M(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),m=vc.map(x=>M(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTextAlign(x.align)})),d=J(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:Od$1.map(x=>({label:x.label,value:x.value})),onSelect:n.setLineSpacing});d.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,s.btn,p.btn,l.btn,...m.map(x=>x.btn),d.el);let u=[a,s,p,l,...m,d];return {el:o,update({canFormat:x,editable:g,text:f}){a.setActive(f.listType==="bullet"),s.setActive(f.listType==="numbered");for(let[v,b]of vc.entries())m[v].setActive(f.align===b.align);d.setSelected(f.lineSpacing);for(let v of u)v.setDisabled(!g||!x);}}}function yc(e,t,n){let o=uf$1(e,"div","pptxv-primary-menu pptxv-layout-menu");o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};return e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);}),{el:o,setItems(a){o.replaceChildren();for(let s of a){let p=uf$1(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.name,p.addEventListener("click",()=>{i(false),n(s);}),o.appendChild(p);}},toggle:()=>i(!r),close:()=>i(false)}}function Sc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=uf$1(e,"div","pptxv-slides-split"),s=M(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),p=uf$1(e,"button","pptxv-slides-caret");p.type="button",p.title=t("pptx.home.chooseLayout"),p.setAttribute("aria-label",t("pptx.home.chooseLayout")),p.setAttribute("aria-haspopup","menu"),p.appendChild(Df(e,"chevron-down"));let l=yc(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));p.addEventListener("click",f=>{f.stopPropagation(),l.toggle();}),a.append(s.btn,p,l.el);let m=uf$1(e,"div","pptxv-slides-menu-host"),d=M(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>u.toggle()});d.btn.setAttribute("aria-haspopup","menu");let u=yc(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));m.append(d.btn,u.el);let x=M(e,{label:t("pptx.sections.resetSlideTitle"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide}),g=M(e,{label:t("pptx.sections.addSection"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return r.append(a,m,x.btn,g.btn),{el:o,update({editable:f,slideCount:v,layouts:b}){let E=b.length>0;l.setItems(b),u.setItems(b),s.setDisabled(!f),p.hidden=!E,p.disabled=!f,d.setDisabled(!f||!E),x.setDisabled(!f||v===0),g.setDisabled(!f||v===0),f||(l.close(),u.close());}}}function Cc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=xc(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=Sc(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName"))}),s=fc(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),p=hc(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing}),l=uc(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,duplicate:r.duplicateSelected,delete:r.deleteSelected}),m=gc(e,t,{toggleFindReplace:n.onToggleFindReplace});return o.append(i.el,a.el,s.el,p.el,m.el,l.el),{el:o,update({editable:d,selectedElement:u,hasClipboard:x,slideCount:g,selectedCount:f,formatPainterActive:v,layouts:b}){let E=se(u),A=Ee(u);i.update({hasSelection:u!==void 0,hasClipboard:x,editable:d,formatPainterActive:v}),a.update({editable:d,slideCount:g,layouts:b}),s.update({canFormat:E,editable:d,text:A}),p.update({canFormat:E,editable:d,text:A}),l.update({editable:d,hasSelection:u!==void 0,isGroup:u?.type==="group",selectedCount:f});}}}function Yn(e,t,n,o){let r=uf$1(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=s=>{i=s,r.hidden=!s,o?.(s);};for(let s of n){s.separatorBefore&&r.appendChild(uf$1(e,"div","pptxv-primary-menu-sep"));let p=uf$1(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.label,p.addEventListener("click",()=>{a(false),s.run();}),r.appendChild(p);}return e.addEventListener("pointerdown",s=>{i&&!r.parentElement?.contains(s.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function wc(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return ze$1("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function Ec(e,t,n){let{file:o,nav:r}=t,i=[];return ze$1("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function Tc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-primary"),i=M(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=uf$1(e,"div","pptxv-present-split"),s=uf$1(e,"button","pptxv-present-main");s.type="button",s.title=t("pptx.present.presentTooltip"),s.textContent=t("pptx.toolbar.present"),s.addEventListener("click",()=>n.slideShow.startFromCurrent());let p=uf$1(e,"button","pptxv-present-caret");p.type="button",p.title=t("pptx.present.optionsTooltip"),p.setAttribute("aria-label",t("pptx.present.optionsTooltip")),p.setAttribute("aria-haspopup","menu"),p.appendChild(Df(e,"chevron-down"));let l=Yn(e,t("pptx.present.optionsTooltip"),wc(t,n,o),v=>{p.classList.toggle("is-active",v),p.setAttribute("aria-expanded",String(v));});p.addEventListener("click",v=>{v.stopPropagation(),l.toggle();}),a.append(s,p,l.el),r.appendChild(a);let m=uf$1(e,"button","pptxv-show-btn");m.type="button",m.title=t("pptx.customShows.createTooltip"),m.textContent="+ Show",m.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(m),r.appendChild(uf$1(e,"span","pptxv-primary-sep"));let d=M(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(d.btn);let u=M(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(u.btn);let x=uf$1(e,"div","pptxv-primary-menu-host"),g=Yn(e,t("pptx.ribbon.moreActions"),Ec(t,n,o)),f=M(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>g.toggle()});return f.btn.setAttribute("aria-haspopup","menu"),f.btn.addEventListener("pointerdown",v=>v.stopPropagation()),x.append(f.btn,g.el),r.appendChild(x),{el:r,setEditState({editable:v}){r.hidden=!v,v||(l.close(),g.close());},setAutosaveStatus(){},setInspectorOpen(v){d.setActive(v);}}}var dt=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],so="home";function Xn(e,t,n,o,r){let i=uf$1(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,s=new Map;for(let p of Ae(dt,o)){let l=uf$1(e,"button","pptxv-ribbon-tab");p.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let m=t(p.labelKey);l.textContent=m,l.addEventListener("click",()=>n(p.id)),i.appendChild(l),a.set(p.id,l),s.set(p.id,m);}if(r){i.appendChild(uf$1(e,"span","pptxv-tabrow-spacer"));let p=uf$1(e,"div","pptxv-tabrow-actions");if(!ze$1("record",o)){let l=uf$1(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let m=uf$1(e,"span","pptxv-tabrow-record-dot");m.setAttribute("aria-hidden","true");let d=uf$1(e,"span");d.textContent=t("pptx.titleBar.record"),l.append(m,d),l.addEventListener("click",()=>r.startRecording()),p.appendChild(l);}i.appendChild(p);}return {el:i,setActive(p){for(let[l,m]of a){let d=l===p;m.classList.toggle("is-active",d),m.setAttribute("aria-selected",String(d));}},setHiddenTabs(p){for(let[l,m]of a)m.hidden=l!=="file"&&p.has(l);},applyScreenTips(p){for(let[l,m]of a){let d=p(s.get(l)??"");d?m.title=d:m.removeAttribute("title");}}}}function ct(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function mt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");for(let a of o){let s=e.createElement("option");s.value=a,s.textContent=t(`${n}.${a}`),i.appendChild(s);}return r.appendChild(i),{label:r,select:i}}function Pc(e,t,n,o,r,i,a,s){let p=uf$1(e,"div","pptxv-animation-timeline-row");p.draggable=a,p.addEventListener("dragstart",x=>x.dataTransfer?.setData("text/plain",n.elementId)),p.addEventListener("dragover",x=>x.preventDefault()),p.addEventListener("drop",x=>{x.preventDefault();let g=x.dataTransfer?.getData("text/plain");g&&s.moveAnimation(g,o);}),p.classList.toggle("is-selected",n.elementId===i);let l=uf$1(e,"span","pptxv-animation-timeline-name"),m=n.entrance??n.emphasis??n.exit??"custom";l.textContent=`${o+1}. ${m}`;let d=M(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>s.reorderAnimation(n.elementId,"up")}),u=M(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>s.reorderAnimation(n.elementId,"down")});return d.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),p.append(l,d.btn,u.btn),p}var ag=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:V},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:X},{group:"exit",labelKey:"pptx.animation.exit",presets:W}];function Ac(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=[];for(let y of ag){let P=uf$1(e,"div","pptxv-rgroup"),T=uf$1(e,"span","pptxv-rgroup-label");T.textContent=t(y.labelKey),P.appendChild(T);let w=uf$1(e,"div","pptxv-animation-gallery");for(let k of y.presets){let I=M(e,{label:t(`pptx.animation.preset.${k}`),text:t(`pptx.animation.preset.${k}`),onClick:()=>n.addAnimation(y.group,k)});w.appendChild(I.btn),r.push(I);}P.appendChild(w),o.appendChild(P);}let i=M(e,{label:t("pptx.animation.remove"),text:t("pptx.animation.remove"),onClick:()=>n.removeAnimation()});o.appendChild(i.btn),r.push(i);let a=uf$1(e,"div","pptxv-animation-timeline"),s=uf$1(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.animation.timeline");let p=uf$1(e,"div","pptxv-animation-timeline-list"),l=uf$1(e,"div","pptxv-animation-timing-controls"),m=e.createElement("select");m.setAttribute("aria-label",t("pptx.animation.trigger"));let d=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let y of d){let P=e.createElement("option");P.value=y,P.textContent=t(`pptx.animation.trigger.${y}`),m.appendChild(P);}let u=ct(e,t("pptx.animation.duration"),500),x=ct(e,t("pptx.animation.delay"),0),g=mt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),f=mt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),v=mt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),b=mt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),E=ct(e,t("pptx.animation.repeatCount"),1),A=ct(e,t("pptx.animations.triggerShape"),0);A.input.type="text",A.input.min="",A.input.max="";let S=M(e,{label:t("pptx.animation.preview"),text:t("pptx.animation.preview"),onClick:()=>{if(!h)return;e.querySelector(`[data-element-id="${CSS.escape(h.elementId)}"]`)?.animate([{opacity:0,transform:"translateY(12px)"},{opacity:1,transform:"translateY(0)"}],{duration:h.durationMs??500,easing:"ease"});}});l.append(m,u.label,x.label,g.label,f.label,v.label,E.label,b.label,A.label,S.btn),a.append(s,p,l),o.appendChild(a);let h,C=()=>{h&&n.setAnimationTiming(h.elementId,{trigger:m.value,durationMs:u.input.valueAsNumber,delayMs:x.input.valueAsNumber,direction:g.select.value,sequence:f.select.value,timingCurve:v.select.value,repeatCount:E.input.valueAsNumber,repeatMode:b.select.value,triggerShapeId:A.input.value});};for(let y of [m,g.select,f.select,v.select,b.select])y.addEventListener("change",C);return u.input.addEventListener("change",C),x.input.addEventListener("change",C),E.input.addEventListener("change",C),A.input.addEventListener("change",C),{el:o,update({editable:y,hasSelection:P,selectedElementId:T,animations:w}){let k=!y||!P;for(let H of r)H.setDisabled(k);let I=[...w].sort((H,D)=>(H.order??0)-(D.order??0));h=I.find(({elementId:H})=>H===T),p.replaceChildren(...I.map((H,D)=>Pc(e,t,H,D,I.length,T,y,n))),a.hidden=I.length===0,l.hidden=!h,m.value=h?.trigger??"onClick",A.input.value=h?.triggerShapeId??"",A.label.hidden=m.value!=="onShapeClick",u.input.value=String(h?.durationMs??500),x.input.value=String(h?.delayMs??0),g.select.value=h?.direction??"fromTop",f.select.value=h?.sequence??"asOne",v.select.value=h?.timingCurve??"ease",b.select.value=h?.repeatMode??"none",E.input.value=String(h?.repeatCount??1);for(let H of [m,u.input,x.input,g.select,f.select,v.select,b.select,E.input,A.input])H.disabled=!y;}}}var sg=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:I},{labelKey:"pptx.ribbon.theme.dark",theme:J$1}];function kc(e$1,t,n,o){let r=uf$1(e$1,"div","pptxv-ribbon-tab-content"),i=uf$1(e$1,"div","pptxv-theme-gallery");for(let l of sg){let m=M(e$1,{label:t(l.labelKey),text:t(l.labelKey),onClick:()=>n.setTheme(l.theme)}),d=uf$1(e$1,"span","pptxv-theme-swatch-preview");d.style.background=l.theme?.colors?.primary??"#6b7280",m.btn.prepend(d),i.appendChild(m.btn);}r.appendChild(i);let a=uf$1(e$1,"div","pptxv-theme-gallery pptxv-deck-theme-gallery"),s=e.map(l=>{let m=M(e$1,{label:l.name,text:l.name,onClick:()=>n.applyPresentationTheme(l.id)}),d=uf$1(e$1,"span","pptxv-theme-swatch-preview");return d.style.background=`linear-gradient(135deg, ${l.colorScheme.accent1}, ${l.colorScheme.accent2})`,m.btn.prepend(d),a.appendChild(m.btn),m});r.appendChild(a);let p=M(e$1,{label:t("pptx.ribbon.formatBackground"),text:t("pptx.ribbon.formatBackground"),onClick:o});return r.appendChild(p.btn),{el:r,setEditable(l){p.setDisabled(!l);for(let m of s)m.setDisabled(!l);}}}var pg=[1,2,3,4,6,8,12,16],Ic=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"}];function Lc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=uf$1(e,"div","pptxv-rgroup"),i=uf$1(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=uf$1(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let s=Ic.map(x=>M(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTool(x.tool)}));i.append(...s.map(x=>x.btn)),o.appendChild(r);let p=uf$1(e,"div","pptxv-rgroup"),l=uf$1(e,"div","pptxv-rgroup-row");p.appendChild(l);let m=Xe(e,t,{label:t("pptx.ribbon.penColour"),icon:"pen",swatches:Ye,fallback:"#000000",onSelect:x=>n.setColor(x)}),d=J(e,{triggerLabel:t("pptx.ribbon.strokeWidth"),triggerText:"",icon:"chevron-down",items:pg.map(x=>({label:`${x} px`,value:x})),onSelect:x=>n.setWidth(x)});l.append(m.el,d.el),o.appendChild(p);let u=[...s,m,d];return {el:o,setEditable(x){for(let g of u)g.setDisabled(!x);},update(x){for(let[g,f]of Ic.entries())s[g].setActive(x.tool===f.tool);m.setValue(x.color),d.setSelected(x.width),d.setTriggerText(`${x.width} px`);}}}var Mc="1.7.1";function Dc(e,t,n,o){let r=uf$1(e,"div","pptxv-account");n.appendChild(r);let i={...se$1,...qe$1().profile};r.appendChild(dg(e,t,i,s=>{i=s,xe$1(i);}));let a=uf$1(e,"section","pptxv-account-section");r.appendChild(a),cg(e,t,a),r.appendChild(mg(e,t)),o?.enabled&&r.appendChild(ug(e,t,o));}function dg(e,t,n,o){let r=n,i=uf$1(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let s=uf$1(e,"div","pptxv-account-profile-row"),p=uf$1(e,"span","pptxv-account-avatar"),l=()=>{p.textContent=ue$1(r),p.style.background=r.avatarColor;};l();let m=e.createElement("label");m.className="pptxv-account-name-field";let d=e.createElement("span");d.textContent=t("pptx.account.profile.nameLabel");let u=e.createElement("input");u.type="text",u.placeholder=t("pptx.account.profile.namePlaceholder"),u.value=r.displayName,u.addEventListener("input",()=>{r={...r,displayName:u.value},l(),o(r);}),m.append(d,u),s.append(p,m),i.appendChild(s);let x=e.createElement("p");x.className="pptxv-account-swatch-label",x.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(x);let g=uf$1(e,"div","pptxv-parity-swatch-row"),f=(v,b)=>{r={...r,avatarColor:b},l();for(let E of g.querySelectorAll("button"))E.classList.toggle("is-active",E===v);o(r);};for(let v of te$1){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",v===r.avatarColor),b.style.background=v,b.setAttribute("aria-label",v),b.addEventListener("click",()=>f(b,v)),g.appendChild(b);}return i.appendChild(g),i}function cg(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let s=e.createElement("p");s.className="pptxv-account-notice",s.hidden=true,n.appendChild(s);async function p(){let l=await ve();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:ae(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}p(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await we$1(),s.hidden=false,s.textContent=t("pptx.account.storage.clearedNotice"),await p()))();});}function mg(e,t){let n=uf$1(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:Mc}),n.appendChild(i),n}function ug(e,t,n){let o=uf$1(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let s=e.createElement("p");return s.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(s),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var Ag={back:ArrowLeft,home:Home,new:FilePlus2,open:FolderOpen,info:Info,save:Save,saveAs:Download,print:Printer,share:Share2,export:Upload,close:X$1,account:UserRound,options:Settings},Hc="http://www.w3.org/2000/svg";function Rc(e,t){return ut(e,Ag[t],17)}function ut(e,t,n){let o=e.createElementNS(Hc,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Hc,r);for(let[s,p]of Object.entries(i))p!==void 0&&a.setAttribute(s,String(p));o.appendChild(a);}return o}function Me(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function Zn(e,t,n,o){let r=Me(e,"",n,o);return r.appendChild(Rc(e,t)),r}function Oc(e,t,n,o){let r=Zn(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}function Vc(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-bs-actions"),s=(p,l,m,d)=>{let u=Me(e,"",()=>r(d)),x=e.createElement("b");x.appendChild(ut(e,m,22));let g=e.createElement("span"),f=e.createElement("strong");f.textContent=p;let v=e.createElement("small");return v.textContent=l,g.append(f,v),u.append(x,g),u};return t==="saveAs"&&(a.append(s("PowerPoint Presentation","Save an editable .pptx copy.",FileText,n.save),s("PowerPoint Show","Save a .ppsx slide show.",Presentation,n.saveAsPpsx),s("Package for Sharing","Bundle the deck and linked assets.",Package,n.packageForSharing)),o&&a.append(s("Macro-Enabled Presentation","Preserve VBA in a .pptm file.",FileCode2,n.saveAsPptm))),t==="export"&&!ze$1("export",i)&&a.append(s("Create PDF","Publish one page per slide.",FileText,n.exportPdf),s("Export current slide","Create a high-quality PNG.",Image$1,n.exportPng),s("Create a Video","Export timings and animations.",Video,n.exportVideo),s("Create an Animated GIF","Make a compact looping preview.",Images,n.exportGif),s("Copy as Image","Copy the current slide.",Copy,n.copySlideAsImage)),t==="print"&&a.append(s("Print Presentation","Choose layout and output settings.",Printer,n.print)),t==="share"&&a.append(s("Share with People","Invite others to collaborate on this presentation.",UserPlus,n.openShare),s("Package for Sharing","Download a self-contained package.",Package,n.packageForSharing)),t==="info"&&a.append(s("Version History","Restore or remove the latest recovery snapshot.",Clock3,n.openVersionHistory),s("Document Properties","View and edit presentation metadata and statistics.",Info,n.openDocumentProperties),s("Protect Presentation","Control access and editing preferences.",LockKeyhole,n.openPasswordProtection),s("Embed Fonts","Keep typography consistent across devices.",Type,n.openFontEmbedding),s("Digital Signatures","View signatures attached to this presentation.",BadgeCheck,n.openDigitalSignatures)),a}function Nc(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label","File");let s=e.createElement("aside"),p=Zn(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label","Back to presentation");let l=e.createElement("nav");s.append(p,l);let m=e.createElement("main");a.append(s,m);let d="home",u=false,x="",g=[];(async()=>(g=await Zd$1(),C()))();function f(y){y?.(),y&&o();}function v(y){if(y==="close")return o();if(y==="save")return f(n.save);if(y==="options")return f(n.openSettings);d=y,C();}function b(){l.replaceChildren();for(let y of Wd$1){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let P=Oc(e,y.id,y.label,()=>v(y.id));P.classList.toggle("active",d===y.id),l.appendChild(P);}}function E(){let y=e.createElement("h2");y.textContent="New";let P=uf$1(e,"div","pptxv-bs-templates");for(let T of Xd$1){let w=Me(e,"",()=>f(()=>n.createPresentation(T.id))),k=e.createElement("b");k.style.background=T.preview;let I=e.createElement("strong");I.textContent=T.name;let H=e.createElement("small");H.textContent=T.description,w.append(k,I,H),P.appendChild(w);}m.append(y,P);}function A(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder="Search recent presentations",y.value=x,y.addEventListener("input",()=>{x=y.value,C();}),m.appendChild(y),d==="open"&&m.appendChild(Me(e,"Browse this device",()=>f(n.openFile),"pptxv-bs-primary"));let P=e.createElement("h2");P.textContent="Recent";let T=uf$1(e,"div","pptxv-bs-recent"),w=e.createElement("header");w.innerHTML="<span>Name</span><span>Date modified</span><span>Size</span>",T.appendChild(w);let k=x.trim().toLowerCase(),I=k?g.filter(H=>`${H.name} ${H.location}`.toLowerCase().includes(k)):g;for(let H of I){let D=Me(e,"",()=>f(()=>n.openRecentFile(H.key))),O=uf$1(e,"span","name"),L=e.createElement("b");L.textContent="P";let R=e.createElement("span"),B=e.createElement("strong");B.textContent=H.name;let F=e.createElement("small");F.textContent=H.location,R.append(B,F),O.append(L,R);let V=e.createElement("span");V.textContent=$d$1(H.timestamp);let N=e.createElement("span");N.textContent=ae(H.size),D.append(O,V,N),T.appendChild(D);}if(!I.length){let H=e.createElement("p");H.textContent="No recent presentations yet.",T.appendChild(H);}m.append(P,T);}function S(){m.appendChild(Vc(e,d,n,u,f,r));}function h(){let y=uf$1(e,"section","pptxv-bs-card"),P=e.createElement("b");P.appendChild(ut(e,Settings,24));let T=e.createElement("h2");T.textContent="PowerPoint Options";let w=e.createElement("p");w.textContent="Configure autosave, proofing, grid, rulers, language, theme, and keyboard shortcuts.",y.append(P,T,w),y.appendChild(Me(e,"Open Options",()=>f(n.openSettings),"pptxv-bs-primary")),m.appendChild(y);}function C(){b(),m.replaceChildren();let y=e.createElement("h1");y.textContent=d==="home"?"Good evening":Wd$1.find(T=>T.id===d)?.label??"Home",m.appendChild(y),(d==="home"||d==="new")&&E(),(d==="home"||d==="open")&&A(),["info","saveAs","print","share","export"].includes(d)&&S(),d==="options"&&h(),d==="account"&&Dc(e,t,m,i);let P=e.createElement("footer");P.textContent="Presentation \xB7 Saved to this browser",m.appendChild(P);}return C(),{el:a,setHasMacros(y){u=y,d==="saveAs"&&C();}}}function zc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:Sc$1.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Gc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.chart"),triggerText:t("pptx.ribbon.chart"),items:zd$1.map(i=>({label:i.label,value:i.type})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertChart")),o}var _g=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function _c(e,t,n){let o=J(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:_g.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function Uc(e,t,n){let o=uf$1(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=uf$1(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=uf$1(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=uf$1(e,"div","pptxv-smartart-dialog-header"),s=uf$1(e,"h2");s.textContent=t("pptx.smartart.insertTitle");let p=uf$1(e,"button","pptxv-smartart-dialog-close");p.type="button",p.setAttribute("aria-label",t("pptx.smartart.close")),p.textContent="\xD7",a.append(s,p);let l=uf$1(e,"div","pptxv-smartart-dialog-body"),m=uf$1(e,"nav","pptxv-smartart-categories");m.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let d=uf$1(e,"div","pptxv-smartart-gallery"),u=uf$1(e,"div","pptxv-smartart-options");u.setAttribute("role","listbox"),u.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),d.appendChild(u),l.append(m,d);let x=uf$1(e,"div","pptxv-smartart-dialog-footer"),g=uf$1(e,"button","pptxv-smartart-dialog-cancel");g.type="button",g.textContent=t("pptx.smartart.cancel");let f=uf$1(e,"button","pptxv-smartart-dialog-insert");f.type="button",f.textContent=t("pptx.smartart.insert"),f.disabled=true,x.append(g,f),i.append(a,l,x),o.append(r,i);let v="list",b,E=null;function A(T){b=T,f.disabled=false;for(let w of u.querySelectorAll('[role="option"]')){let k=w.dataset.layout===T.layout;w.setAttribute("aria-selected",String(k)),w.classList.toggle("is-selected",k);}}function S(T){T&&(n(T.layout,T.defaultItems),y());}function h(){u.replaceChildren();for(let T of Tc$1.filter(w=>w.category===v)){let w=uf$1(e,"button","pptxv-smartart-option");w.type="button",w.dataset.layout=T.layout,w.setAttribute("role","option"),w.setAttribute("aria-selected",String(b?.layout===T.layout)),w.classList.toggle("is-selected",b?.layout===T.layout);let k=uf$1(e,"span","pptxv-smartart-option-preview");k.setAttribute("aria-hidden","true"),k.appendChild(Df(e,"smart-art"));let I=uf$1(e,"span","pptxv-smartart-option-label");I.textContent=t(T.labelKey),w.append(k,I),w.addEventListener("click",()=>A(T)),w.addEventListener("dblclick",()=>S(T)),u.appendChild(w);}}function C(T){v=T,b=void 0,f.disabled=true;for(let w of m.querySelectorAll("button")){let k=w.dataset.category===T;w.classList.toggle("is-active",k),w.setAttribute("aria-pressed",String(k));}h();}for(let T of Uc$1){let w=uf$1(e,"button","pptxv-smartart-category");w.type="button",w.dataset.category=T.id,w.textContent=t(T.labelKey),w.addEventListener("click",()=>C(T.id)),m.appendChild(w);}C(v);function y(){o.hidden||(o.hidden=true,E?.focus(),E=null);}function P(T){if(T.key==="Escape"){T.preventDefault(),y();return}if(T.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let k=w[0],I=w[w.length-1];T.shiftKey&&e.activeElement===k?(T.preventDefault(),I.focus()):!T.shiftKey&&e.activeElement===I&&(T.preventDefault(),k.focus());}return r.addEventListener("click",y),p.addEventListener("click",y),g.addEventListener("click",y),f.addEventListener("click",()=>S(b)),o.addEventListener("keydown",P),{el:o,open(T){let w=e.defaultView?.HTMLElement;E=w&&e.activeElement instanceof w?e.activeElement:null,o.parentElement!==T&&T.appendChild(o),o.hidden=false,i.focus();},close:y}}function Wc(e,t,n){let o=Uc(e,t,n),r=M(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}var Ug={square:"square",circle:"circle",database:"database",diamond:"diamond",minus:"minus",moveRight:"move-right",plus:"plus",triangle:"triangle"};function Wg(e){switch(e){case "rotate-45":return "rotate(45deg)";case "rotate-90":return "rotate(90deg)";case "-rotate-90":return "rotate(-90deg)";case "rotate-180":return "rotate(180deg)";case "-skew-x-12":return "skewX(-12deg)";default:return}}function $c(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content");r.classList.add("pptxv-ribbon-insert-content");let i=[],a=M(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),s=M(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),p=M(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),l=M(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});l.btn.title=t("pptx.ribbon.insertMedia");let m=Gc(e,t,v=>n.insertChart(v)),d=Wc(e,t,(v,b)=>n.insertSmartArt(v,b)),u=M(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});u.btn.title=t("pptx.insert.insertEquation");let x=zc(e,t,v=>n.insertActionButton(v)),g=_c(e,t,v=>n.insertField(v));r.append(a.btn,s.btn,p.btn,l.btn,m.el,d.el,u.btn,x.el,g.el),i.push(a,s,p,l,m,d,u,x,g);let f=uf$1(e,"div","pptxv-shape-grid");r.appendChild(f);for(let v of Kd$1){let b=M(e,{label:t(v.i18nKey),icon:Ug[v.glyph]??"square",onClick:()=>n.insert("shape",v.type)}),E=v.glyphClass?Wg(v.glyphClass):void 0;if(E){let A=b.btn.querySelector("svg");A&&(A.style.transform=E);}f.appendChild(b.btn),i.push(b);}return {el:r,setEditable(v){for(let b of i)b.setDisabled(!v);}}}function qc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content"),i=M(e,{label:t("pptx.slideShow.fromBeginningTooltip"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning}),a=M(e,{label:t("pptx.slideShow.fromCurrentTooltip"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent}),s=ze$1("broadcast",o)?null:M(e,{label:t("pptx.slideShow.broadcastTooltip"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast}),p=M(e,{label:t("pptx.slideShow.presenterViewTooltip"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView}),l=M(e,{label:t("pptx.slideShow.setUpTooltip"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp}),m=M(e,{label:t("pptx.slideShow.rehearseTimingsTooltip"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal}),d=M(e,{label:t("pptx.customShows.title"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),u=M(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles}),x=M(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings});return r.append(i.btn,a.btn,p.btn,l.btn,m.btn,d.btn,...s?[s.btn]:[],u.btn,x.btn),{el:r,setSubtitlesVisible:g=>u.setActive(g)}}var $g=[{type:"none",labelKey:"pptx.ribbon.transition.none"},{type:"fade",labelKey:"pptx.ribbon.transition.fade"},{type:"push",labelKey:"pptx.ribbon.transition.push"},{type:"wipe",labelKey:"pptx.ribbon.transition.wipe"},{type:"split",labelKey:"pptx.ribbon.transition.split"},{type:"reveal",labelKey:"pptx.ribbon.transition.reveal"},{type:"cut",labelKey:"pptx.ribbon.transition.cut"},{type:"cover",labelKey:"pptx.ribbon.transition.cover"},{type:"uncover",labelKey:"pptx.ribbon.transition.uncover"}],Kc=.7;function jc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=Kc,i=uf$1(e,"label","pptxv-transition-apply-all"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.ribbon.applyTransitionToAll")),i.append(a,e.createTextNode(t("pptx.ribbon.applyTransitionToAll")));let s=d=>n.applyTransition(d,Math.round(r*1e3),a.checked),p=uf$1(e,"div","pptxv-transition-gallery"),l=$g.map(d=>{let u=M(e,{label:t(d.labelKey),text:t(d.labelKey),onClick:()=>s(d.type)});return p.appendChild(u.btn),u});o.appendChild(p);let m=Y(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:d=>{r=Math.max(0,d);}});return m.setValue(Kc),o.appendChild(m.el),o.appendChild(i),{el:o,setEditable(d){for(let u of l)u.setDisabled(!d);m.setDisabled(!d),a.disabled=!d;}}}function Yc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=uf$1(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=M(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),a=M(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,i.btn,a.btn),o}function Xc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=M(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),i=M(e,{label:t("pptx.headerFooter.title"),text:t("pptx.headerFooter.title"),onClick:n.openHeaderFooter}),a=M(e,{label:t("pptx.ribbon.compareTitle"),text:t("pptx.ribbon.compare"),onClick:n.openCompare}),s=M(e,{label:t("pptx.toolbar.comments"),text:t("pptx.toolbar.comments"),onClick:n.openComments}),p=M(e,{label:t("pptx.hyperlink.editTitle"),text:t("pptx.hyperlink.editTitle"),onClick:n.openHyperlink}),l=M(e,{label:t("pptx.settings.spellCheck"),text:t("pptx.settings.spellCheck"),onClick:n.toggleSpellCheck}),m=M(e,{label:t("pptx.review.language"),text:t("pptx.review.language"),onClick:()=>n.openSettings("general")});return o.append(r.btn,i.btn,a.btn,s.btn,p.btn,l.btn,m.btn),{el:o,setEditable:d=>a.setDisabled(!d)}}function Zc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=M(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),i=M(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),a=M(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")});return o.append(a.btn,r.btn,i.btn),o}function Qc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content"),i=!ze$1("zoom",o),a=i?M(e,{label:t("pptx.statusBar.zoomOut"),icon:"zoom-out",onClick:n.zoomOut}):null,s=i?M(e,{label:t("pptx.statusBar.zoomIn"),icon:"zoom-in",onClick:n.zoomIn}):null,p=i?M(e,{label:t("pptx.view.zoomToFit"),icon:"fit",onClick:n.zoomToFit}):null,l=ze$1("fullscreen",o)?null:M(e,{label:t("pptx.statusBar.slideShow"),icon:"play",onClick:n.togglePresentation}),m=ze$1("notes",o)?null:M(e,{label:t("pptx.statusBar.toggleNotes"),icon:"notes",onClick:n.toggleNotes}),d=M(e,{label:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),u=M(e,{label:t("pptx.ribbon.templatesOff"),text:t("pptx.ribbon.templatesOff"),onClick:()=>n.toggleTemplateEditing?.()}),x=M(e,{label:t("pptx.master.title"),text:t("pptx.master.title"),onClick:()=>n.toggleMasterView?.()}),g=M(e,{label:t("pptx.view.slideSorterTooltip"),text:t("pptx.slideSorter.title"),onClick:n.openSlideSorter}),f=M(e,{label:t("pptx.selectionPane.title"),text:t("pptx.selectionPane.title"),onClick:n.openSelectionPane}),v=M(e,{label:t("pptx.view.gridlines"),text:t("pptx.view.gridlines"),onClick:()=>n.toggleViewOption("showGrid")}),b=M(e,{label:t("pptx.view.ruler"),text:t("pptx.view.ruler"),onClick:()=>n.toggleViewOption("showRulers")}),E=M(e,{label:t("pptx.view.snapToGrid"),text:t("pptx.view.snapToGrid"),onClick:()=>n.toggleViewOption("snapToGrid")}),A=M(e,{label:t("pptx.view.snapToShape"),text:t("pptx.view.snapToShape"),onClick:()=>n.toggleViewOption("snapToShape")}),S=M(e,{label:t("pptx.view.addHorizontalGuide"),text:t("pptx.view.addHorizontalGuide"),onClick:()=>n.addGuide("h")}),h=M(e,{label:t("pptx.view.addVerticalGuide"),text:t("pptx.view.addVerticalGuide"),onClick:()=>n.addGuide("v")}),C=M(e,{label:t("pptx.ribbon.eyedropper"),text:t("pptx.ribbon.eyedropper"),onClick:n.activateEyedropper});return u.btn.dataset.testid="template-edit-toggle",r.append(...a&&s&&p?[a.btn,s.btn,p.btn]:[],...l?[l.btn]:[],...m?[m.btn]:[],d.btn,u.btn,x.btn,g.btn,f.btn,v.btn,b.btn,E.btn,A.btn,S.btn,h.btn,C.btn),{el:r,setEditable(y){u.setDisabled(!y),x.setDisabled(!y),C.setDisabled(!y);},setTemplateEditing(y){let P=t(y?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");u.btn.textContent=P,u.btn.title=P,u.btn.setAttribute("aria-label",P),u.setActive(y);}}}function po(e,t,n,o,r){let i=uf$1(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=Tc(e,t,n,o);i.append(a.el);let s=Xn(e,t,F=>k(F),o,{startRecording:()=>n.slideShow.startRehearsal()});s.el.hidden=true,i.appendChild(s.el);let p=zn(e,t,n.findReplace);i.appendChild(p.el);let l=cc(e,t,(F,V)=>V?n.edit.updateEquation(V,F):n.insert.insertEquation(F));i.appendChild(l.el);let m=mc(e,t,n.edit);i.appendChild(m.el);let d=F=>ze$1(F,o),u=d("file")?null:Nc(e,t,n.file,()=>k("home"),o,r),x=d("home")?null:Cc(e,t,{edit:n.edit,onToggleFindReplace:()=>p.toggle()}),g=d("insert")?null:$c(e,t,n.insert,()=>l.toggle()),f=d("draw")?null:Lc(e,t,n.draw),v=d("design")?null:kc(e,t,n.design,()=>m.toggle()),b=d("transitions")?null:jc(e,t,n.edit),E=d("animations")?null:Ac(e,t,n.edit),A=d("slideShow")?null:qc(e,t,n.slideShow,o),S=d("record")?null:Yc(e,t,n.slideShow),h=d("review")?null:Xc(e,t,n.nav),C=d("view")?null:Qc(e,t,n.nav,o),y=d("help")?null:Zc(e,t,n.nav),P={file:u?.el,home:x?.el,insert:g?.el,draw:f?.el,design:v?.el,transitions:b?.el,animations:E?.el,slideShow:A?.el,record:S??void 0,review:h?.el,view:C?.el,help:y??void 0},T=Ae(dt,o);for(let F of T){let V=P[F.id];V&&(V.hidden=true,i.appendChild(V));}let w=T.find(F=>F.id===so)?.id??T[0]?.id??so;function k(F){if(P[F]){w=F,s.setActive(F);for(let V of Object.keys(P)){let N=P[V];N&&(N.hidden=V!==F);}}}k(w);let I,H={hasClipboard:false,slideCount:0,selectedCount:0},D=()=>{x?.update({editable:L,selectedElement:I,hasClipboard:H.hasClipboard,formatPainterActive:H.formatPainterActive??false,slideCount:H.slideCount,selectedCount:H.selectedCount??0,layouts:H.layouts??[]});},O=()=>{E?.update({editable:L,hasSelection:I!==void 0,selectedElementId:H.selectedElementId,animations:H.animations??[]});},L=false,R=new Set;return {el:i,update(){},setEditState(F){a.setEditState(F),s.el.hidden=!F.editable;},setNotesExpanded(){},setAutosaveStatus:(F,V)=>a.setAutosaveStatus(F,V),setEditable(F){L=F,h?.setEditable(F),C?.setEditable(F),g?.setEditable(F),f?.setEditable(F),p.setEditable(F),l.setEditable(F),m.setEditable(F),v?.setEditable(F),b?.setEditable(F),D(),O();},setDrawState:F=>f?.update(F),setTemplateEditing:F=>C?.setTemplateEditing(F),setHasMacros:F=>u?.setHasMacros(F),setSubtitlesVisible:F=>A?.setSubtitlesVisible(F),setInspectorOpen:F=>a.setInspectorOpen(F),openEquationEditor:(F,V)=>l.openEdit(F,V),setHiddenOptionTabs:F=>{if(R=new Set(F.filter(V=>V!=="file")),s.setHiddenTabs(R),R.has(w)){let V=R.has("home")?T.find(N=>!R.has(N.id))?.id:"home";V&&k(V);}},applyScreenTips:F=>s.applyScreenTips(F),updateSelection(F,V){I=F,H=V,D(),O();}}}function Jc(e,t,n,o,r){let i=uf$1(e,"div","pptxv-statusbar"),a=()=>{let P=uf$1(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},s=uf$1(e,"span","pptxv-statusbar-counter");s.setAttribute("aria-live","polite");let p=uf$1(e,"span","pptxv-statusbar-text");p.textContent=t("pptx.statusBar.language");let l=uf$1(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(s,a(),p,a(),l),i.appendChild(uf$1(e,"span","pptxv-statusbar-spacer"));let m=false,d="",u="idle",x=()=>{l.textContent=d.length>0?d:t(m?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",u==="saving"),l.classList.toggle("is-error",u==="error");};x();let g=!ze$1("notes",o),f=!ze$1("fullscreen",o),v=!ze$1("zoom",o),b=null;if(g){b=uf$1(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(qg(e,"sticky-note"));let P=uf$1(e,"span");P.textContent=t("pptx.notes.title"),b.appendChild(P),b.addEventListener("click",n.toggleNotes);}let E=M(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});E.btn.setAttribute("data-pptx-compact","");let A=M(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});A.btn.setAttribute("data-pptx-compact","");let S=f?M(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;S?.btn.setAttribute("data-pptx-compact","");let h=null,C=null,y=null;return v&&(h=M(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),h.btn.setAttribute("data-pptx-compact",""),C=uf$1(e,"button","pptxv-statusbar-zoom"),C.type="button",C.title=t("pptx.statusBar.zoomToFit"),C.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),C.setAttribute("data-pptx-compact",""),C.addEventListener("click",n.zoomToFit),y=M(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),E.btn,A.btn,...S?[S.btn]:[],...[],a(),...h&&C&&y?[h.btn,C,y.btn]:[]),{el:i,update({current:P,total:T,zoomPercent:w}){s.textContent=T>0?t("pptx.statusBar.slideOf",{current:P+1,total:T}):t("pptx.statusBar.noSlides"),C&&(C.textContent=`${Math.round(w)}%`);},setNotesExpanded(P){b?.setAttribute("aria-pressed",String(P)),b?.classList.toggle("is-active",P);},setSaveStatus(P,T){d=P,u=T,x();},setDirty(P){m=P,x();},setPresenting(P){E.btn.classList.toggle("is-active",!P),S?.btn.classList.toggle("is-active",P);}}}function qg(e,t){let n=uf$1(e,"span","pptxv-statusbar-icon");return n.appendChild(Kg(e,t)),n}function Kg(e,t){return Df(e,t)}function em(e){let{doc:t,t:n,actions:o}=e,r=Va(e.sections,e.slides);return r.map((i,a)=>{let s=uf$1(t,"section","pptxv-thumb-section"),p=uf$1(t,"header","pptxv-thumb-section-header"),l=uf$1(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(s.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),p.appendChild(l),i.section&&o){let m=uf$1(t,"span","pptxv-thumb-section-actions"),d=(u,x,g,f=false)=>{let v=uf$1(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=u,v.setAttribute("aria-label",u),v.textContent=x,v.disabled=f,v.addEventListener("click",g),m.appendChild(v);};d(n("pptx.sections.rename"),"\u270E",()=>{let u=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);u!=null&&o.rename(i.section.id,u);}),d(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),d(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),d(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),p.appendChild(m);}if(s.appendChild(p),!i.section?.collapsed){let m=uf$1(t,"div","pptxv-thumb-section-slides");i.slides.forEach((d,u)=>m.appendChild(e.buildSlide(d,i.slideIndexes[u]))),s.appendChild(m);}return s})}var xt=128;function Qn(e,t,n,o){let r=uf$1(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=uf$1(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,s=false,p=false,l=()=>{a&&(a.hidden=!s||p);};if(o){a=uf$1(e,"div","pptxv-thumbs-footer"),a.hidden=true;let h=uf$1(e,"button","pptxv-thumbs-add");h.type="button",h.appendChild(Df(e,"plus")),h.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),h.addEventListener("click",()=>o()),a.appendChild(h),r.appendChild(a);}let m=new Map,d=0,u=[],x={width:1,height:1},g=null,f=[],v,b=1,E=false,A=(h,C,y)=>{let P=uf$1(e,"button","pptxv-thumb");P.type="button",P.dataset.slideIndex=String(C),P.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:C+1}));let T=uf$1(e,"span","pptxv-thumb-num");T.textContent=String(C+1);let w=uf$1(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(x.height*y)}px`});return w.appendChild(g(h,y)),P.append(T,w),P.addEventListener("click",()=>n(C)),m.set(C,P),P},S=()=>{if(!g)return;m=new Map;let h=xt/Math.max(x.width,1);if(f.length>0){i.replaceChildren(...em({doc:e,t,sections:f,slides:u,actions:v,buildSlide:(w,k)=>A(w,k,h)})),m.get(d)?.classList.add("is-active");return}let C=E?fe(u.length,b,i.scrollTop,i.clientHeight||600):fe(u.length,b,0,u.length*b,0),y=uf$1(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});E&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${C.offsetY}px`);for(let w=C.startIndex;w<=C.endIndex;w+=1){let k=u[w];k&&y.appendChild(A(k,w,h));}let P=uf$1(e,"div","pptxv-thumbs-space",{position:"relative",height:E?`${C.totalHeight}px`:"auto"});E&&(P.dataset.virtualized="true"),P.appendChild(y),i.replaceChildren(P);let T=m.get(d);T?.classList.add("is-active"),T?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{E&&S();}),{el:r,render(h,C,y,P,T){p=false,l(),u=h,x=C,g=y,f=P??[],v=T;let w=xt/Math.max(C.width,1);b=Math.round(C.height*w)+8,E=!P?.length&&h.length>=ee$1,r.classList.toggle("pptxv-thumbs-virtualized",E),S(),this.setActive(d);},setActive(h){if(d=h,E){let y=h*b,P=y+b,T=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:P>i.scrollTop+T&&(i.scrollTop=Math.max(0,P-T)),S();}m.forEach((y,P)=>{y.classList.toggle("is-active",P===h),P===h?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let C=m.get(h);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"});},setVisible(h){r.hidden=!h;},setAddSlideVisible(h){s=h,l();},renderMasters(h,C,y,P,T){p=true,l(),i.replaceChildren(),m=new Map,E=false,r.classList.remove("pptxv-thumbs-virtualized");let w=xt/Math.max(C.width,1),k=(I,H,D,O)=>{let L=uf$1(e,"button",`pptxv-thumb${O===null?"":" pptxv-master-layout"}`);L.type="button",L.setAttribute("aria-label",H),L.classList.toggle("is-active",T.masterIndex===D&&T.layoutIndex===O),T.masterIndex===D&&T.layoutIndex===O&&L.setAttribute("aria-current","page");let R=uf$1(e,"span","pptxv-thumb-num");R.textContent=H;let B=uf$1(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(C.height*w)}px`});B.appendChild(y(I,w)),L.append(R,B),L.addEventListener("click",()=>P(D,O)),i.appendChild(L);};h.forEach((I,H)=>{k({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),H,null),I.layouts?.forEach((D,O)=>k({id:D.path,rId:"",slideNumber:0,elements:[...I.elements??[],...D.elements??[]],backgroundColor:D.backgroundColor??I.backgroundColor,backgroundImage:D.backgroundImage??I.backgroundImage},D.name||t("pptx.master.layout"),H,O));});}}}function jg(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function tm(e,t,n){let o=uf$1(e,"div","pptxv-cmdsearch"),r=uf$1(e,"div","pptxv-cmdsearch-box");r.appendChild(Df(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=uf$1(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let s=()=>{a.hidden=true,a.replaceChildren();},p=d=>{i.value="",s(),d.run();},l=[],m=()=>{if(l=jg(i.value,n,t),i.value.trim().length===0){s();return}if(a.replaceChildren(),l.length===0){let d=uf$1(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(d);}for(let d of l){let u=uf$1(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",x=>{x.preventDefault(),p(d);}),a.appendChild(u);}a.hidden=false;};return i.addEventListener("input",m),i.addEventListener("focus",m),i.addEventListener("blur",s),i.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?p(l[0]):d.key==="Escape"&&(i.value="",s());}),{el:o}}var Yg={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function om(e,t,n){let o=uf$1(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=uf$1(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=uf$1(e,"span","pptxv-titlebar-autosave"),s=uf$1(e,"span","pptxv-titlebar-autosave-label");s.textContent=t("pptx.titleBar.autoSave");let p=uf$1(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t("pptx.titleBar.toggleAutoSave"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),p.appendChild(uf$1(e,"span","pptxv-titlebar-switch-knob"));let l=uf$1(e,"span","pptxv-titlebar-autosave-label");a.append(s,p,l),o.appendChild(a);let m=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),l.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{i=n.onToggleAutosave(),m(),T();});let d=uf$1(e,"span","pptxv-titlebar-sep");o.appendChild(d);let u=uf$1(e,"span","pptxv-qat");o.appendChild(u);let x=uf$1(e,"span","pptxv-titlebar-sep");o.appendChild(x);let g={editable:true,canUndo:false,canRedo:false},f=null,v=null,b=k=>{k==="save"?n.save():k==="undo"?n.undo():k==="redo"?n.redo():n.quickAccess?.run(k);},E=()=>{u.replaceChildren(),f=null,v=null;let k=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};u.hidden=!k.visible||!g.editable;for(let I of k.commandIds){if((I==="undo"||I==="redo")&&ze$1(I,n.hiddenActions))continue;let H=Ce$1.find(R=>R.id===I);if(!H)continue;let D=t(H.labelKey),O=Yg[H.icon],L=M(e,{label:D,icon:O,text:O===void 0?"Ab":void 0,textLabel:k.showCommandLabels?D:void 0,className:"pptxv-titlebar-btn",onClick:()=>b(I)});if(n.quickAccess){let R=n.quickAccess.screenTip(D);R===void 0?L.btn.removeAttribute("title"):L.btn.title=R;}I==="undo"?(f=L,L.setDisabled(!g.canUndo)):I==="redo"&&(v=L,L.setDisabled(!g.canRedo)),u.appendChild(L.btn);}},A=uf$1(e,"span","pptxv-titlebar-file"),S=uf$1(e,"span","pptxv-titlebar-filename");S.textContent=n.fileName||t(Rd$1);let h=uf$1(e,"span","pptxv-titlebar-dot");h.textContent="\u2022",h.setAttribute("aria-hidden","true");let C=uf$1(e,"span","pptxv-titlebar-status");A.append(S,h,C),o.appendChild(A);let y="idle",P=false,T=()=>{C.textContent=t(Qd$1({autosaveState:y,isDirty:P,autosaveEnabled:i})),C.classList.toggle("is-error",i&&y==="error"),C.classList.toggle("is-saving",i&&y==="saving");},w=uf$1(e,"span","pptxv-titlebar-search");return w.appendChild(tm(e,t,n.commands).el),o.appendChild(w),o.appendChild(uf$1(e,"span","pptxv-titlebar-spacer")),m(),T(),E(),{el:o,setEditState(k){g=k;for(let H of [a,d,x])H.hidden=!k.editable;let I=n.quickAccess?.getState();u.hidden=!k.editable||I?.visible===false,h.hidden=!k.editable,C.hidden=!k.editable,w.hidden=!k.editable,f?.setDisabled(!k.canUndo),v?.setDisabled(!k.canRedo);},setAutosaveState(k){y=k,T();},setDirty(k){P=k,T();},setAutosaveEnabled(k){i=k,m(),T();},refreshQuickAccess:E}}function Jn(e,t,n){let o=uf$1(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false"),o.classList.toggle("pptxv-editable",n.editable);let r=null,i=null;n.showToolbar&&(r=om(e,t,n.titleBar),o.appendChild(r.el),i=po(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,s=n.showToolbar?Bn(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;s&&(s.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(s.el));let p=uf$1(e,"div","pptxv-body");o.appendChild(p);let l=In(e,t,n.onSelectSlide);o.appendChild(l.el);let m=On(e,t);p.appendChild(m.el);let d=null;n.showThumbnails&&(d=Qn(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),p.appendChild(d.el));let u=uf$1(e,"div","pptxv-viewport");u.setAttribute("data-pptx-viewport",""),p.appendChild(u);let x=null;n.showInspector&&(x=ro(e,t,n.inspectorHandlers),x.setEditable(n.editable),p.appendChild(x.el));let g=uf$1(e,"div","pptxv-stage-wrap");u.appendChild(g);let f=uf$1(e,"div","pptxv-empty");f.textContent=t("pptx.statusBar.noSlides"),f.hidden=true,u.appendChild(f);let v=Vn(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(v.el);let b=n.showToolbar?Jc(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;b&&o.appendChild(b.el),a=n.showToolbar?Fn(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let E=Nn(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);E.update(0,0),o.appendChild(E.el);let A=uf$1(e,"div","pptxv-overlay pptxv-loading");A.textContent=t("common.loading"),A.setAttribute("role","status"),A.setAttribute("aria-live","polite"),A.hidden=true,o.appendChild(A);let S=uf$1(e,"div","pptxv-overlay pptxv-error");S.setAttribute("role","alert");let h=uf$1(e,"div","pptxv-error-message");return S.appendChild(h),S.hidden=true,o.appendChild(S),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,masterSidebar:m,thumbnails:d,viewport:u,stageWrap:g,notes:v,statusBar:b,mobileToolbar:s,mobileActionSheets:a,presentationTouchControls:E,setLoading(C){A.hidden=!C,o.setAttribute("aria-busy",String(C));},setError(C){S.hidden=C===null,h.textContent=C??"";},setEmpty(C){f.hidden=!C,g.hidden=C;},setPresenting(C){o.classList.toggle("pptxv-presenting",C);}}}function er(e,t){let n=Pc$1(),o=r=>{let i=r.target;if(!(i&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(i.tagName))){if(t.isPresenting?.()){Xg(r,t,n);return}switch(r.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}r.preventDefault();}};return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o);}}function Xg(e,t,n){if(!Nc$1())return;let o=Qc$1(e,n);if(o.action!=="none")switch(e.preventDefault(),o.action){case "next":t.next();return;case "previous":t.prev();return;case "first":t.first();return;case "last":t.last();return;case "goto":{let r=o.slideNumber-1,i=t.getSlideCount?.()??0;r>=0&&r<i&&t.goToSlide?.(r);return}case "end":t.escape();return;case "pointerTool":t.setPointerTool?.(o.tool==="arrow"?"none":o.tool);return;case "eraseAnnotations":t.eraseAnnotations?.();return;case "toggleInkMarkup":t.toggleInkMarkup?.();return;case "toggleBlackScreen":t.toggleBlank?.("black");return;case "toggleWhiteScreen":t.toggleBlank?.("white");break;}}var Zg=.1,Qg=8;function tr(e,t){let n=wd$1({getScale:t.getScale,minScale:Zg,maxScale:Qg,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:s=>{t.isSwipeEnabled()&&(s===-1?t.onNext():t.onPrevious());}}}),o=s=>n.onTouchStart(s),r=s=>n.onTouchMove(s),i=s=>n.onTouchEnd(s),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function or(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}function nr(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,s=Jn(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:r.autosave??false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:Jg(e),hiddenActions:r.hiddenActions},accountAuth:r.accountAuth,...hd(e)}),p=at(s.root,e.initialTheme??r.theme,[]);n.appendChild(s.root),s.statusBar?.setNotesExpanded(i.get().notesExpanded),s.statusBar?.setDirty(i.get().dirty),s.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),s.titleBar?.setDirty(i.get().dirty);let l=er(s.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation,isPresenting:()=>i.get().presenting,goToSlide:e.goToSlide,getSlideCount:()=>i.get().slides.length,setPointerTool:e.setPresentationPointerTool,eraseAnnotations:e.erasePresentationAnnotations,toggleInkMarkup:e.togglePresentationInkMarkup,toggleBlank:e.togglePresentationBlank}),m=tr(s.root,{getScale:()=>a.effectiveScale(),onPinchZoom:A=>i.set({zoom:A}),isSwipeEnabled:()=>{let A=i.get();return A.presenting||!A.editable},onNext:()=>{let A=i.get();kn({presenting:A.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:A.slides[A.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),d=t.createElement("button");d.type="button",d.setAttribute("data-pptx-end-of-show",""),d.className="pptxv-presentation-end",Object.assign(d.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let u=t.createElement("span");Object.assign(u.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),u.textContent=o("pptx.presentation.endOfSlideShow"),d.appendChild(u),d.addEventListener("click",A=>{A.stopPropagation(),e.next();});let x=()=>{let A=i.get(),S=A.presenting&&A.endOfShow;S&&d.parentElement!==s.root?s.root.appendChild(d):!S&&d.parentElement&&d.remove();},g=i.subscribe(x);x();let f=A=>{let S=i.get();!S.presenting||!(A.target instanceof Element)||A.target.closest('button, a, input, select, textarea, [role="dialog"]')||A.target.closest(".pptxv-stage")&&(kn({presenting:S.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:S.slides[S.currentSlide]})||e.next());};s.root.addEventListener("click",f);let v=()=>{s.root.removeEventListener("click",f),g(),d.remove();},b=or(s.root,A=>{i.set({presenting:A});}),E=null;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),E.observe(s.viewport)),{chrome:s,presentation:b,detachKeyboard:l,detachTouchGestures:m,detachPresentationClick:v,resizeObserver:E,appliedThemeVars:p}}function Jg(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function rr(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function ir(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToSlide(0),goToLastSlide:()=>e.goToSlide(e.getSlideCount()-1),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444"};e.updatePresenterSnapshot({pointer:{...n,tool:t}});},erasePresentationAnnotations:()=>e.updatePresenterSnapshot({inkStrokes:[]}),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t)}}function G(e){if(e.masterViewTarget){if(e.masterViewTab==="notes")return e.notesMaster?.elements??[];if(e.masterViewTab==="handout")return e.handoutMaster?.elements??[];let n=e.slideMasters[e.masterViewTarget.masterIndex];return e.masterViewTarget.layoutIndex===null?n?.elements??[]:n?.layouts?.[e.masterViewTarget.layoutIndex]?.elements??[]}let t=e.slides[e.currentSlide];return t?e.editTemplateMode?e.templateElementsBySlideId[t.id]??[]:t.elements:[]}function j(e,t){if(e.masterViewTarget){if(e.masterViewTab==="notes")return {notesMaster:e.notesMaster?{...e.notesMaster,elements:t}:void 0};if(e.masterViewTab==="handout")return {handoutMaster:e.handoutMaster?{...e.handoutMaster,elements:t}:void 0};let{masterIndex:o,layoutIndex:r}=e.masterViewTarget;return {slideMasters:e.slideMasters.map((i,a)=>a!==o?i:r===null?{...i,elements:t}:{...i,layouts:i.layouts?.map((s,p)=>p===r?{...s,elements:t}:s)})}}let n=e.slides[e.currentSlide];return n?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[n.id]:t}}:{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:t}:o)}:{slides:e.slides}}function te(e,t){return G(e).find(n=>n.id===t)}function ar(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(j(o,G(o).map(s=>s.id===r?{...s,...a}:s))),t.commitChange());}}function sr(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function nm(e,t,n){return e.map((o,r)=>r===t?{...j$1(o),elements:n(o.elements)}:o)}function pr(e,t,n){return nm(e,t,o=>o.filter(r=>r.id!==n))}function lo(e){return e.map(j$1)}function gt(e,t,n){return nm(e,t,o=>[...o,n])}function lr(e,t,n,o){return e.map((r,i)=>i===t?{...j$1(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function oe(e,t,n){return e.map((o,r)=>r===t?{...j$1(o),...n}:o)}function dr(e,t){return e.map(n=>({...j$1(n),...t}))}function cr(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s?.animations?.some(l=>l.elementId===r))return;let p=i(s.animations);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:p})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let l=na(p.animations??[],s,r,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let s=oa(a.animations,i);s.length!==a.animations.length&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{animations:s})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let m=(r==="entrance"?$$1:r==="exit"?aa:ba)(p.animations??[],s,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:m})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let s=[...a];return i.durationMs!==void 0&&(s=ea(s,r,i.durationMs)),i.delayMs!==void 0&&(s=fa(s,r,i.delayMs)),i.trigger!==void 0&&(s=ca(s,r,i.trigger)),i.direction!==void 0&&(s=ha(s,r,i.direction)),i.sequence!==void 0&&(s=ia(s,r,i.sequence)),i.timingCurve!==void 0&&(s=ga(s,r,i.timingCurve)),i.repeatCount!==void 0&&(s=ja(s,r,i.repeatCount)),i.repeatMode!==void 0&&(s=ka(s,r,i.repeatMode)),i.triggerShapeId!==void 0&&(s=da(s,r,i.triggerShapeId||void 0)),s});},reorderAnimation(r,i){o(r,a=>i==="up"?la(a,r):ma(a,r));},moveAnimation(r,i){o(r,a=>{let s=[...a].sort((m,d)=>(m.order??0)-(d.order??0)),p=s.findIndex(m=>m.elementId===r);if(p<0)return s;let[l]=s.splice(p,1);return s.splice(Math.max(0,Math.min(i,s.length)),0,l),s.map((m,d)=>({...m,order:d}))});}}}function rm(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function mr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return rm(e,za(r,n))}function ur(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return rm(e,Aa(r,n))}function xr(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function co(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function gr(e,t,n){return Ma(e,t,n)}function br(e,t,n){return Na(e,t,n)}function fr(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),s=a.selectedElementId,p=G(a);!a.editable||!s||!p||i(p,s)!==p&&(n.pushHistory(),t.set(j(a,i(p,s))),n.commitChange());};return {bringForward:()=>r(Sa),sendBackward:()=>r(Ta),bringToFront:()=>r(Qa),sendToBack:()=>r(Ra),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(s=>xr(s,i,a.canvasSize));return}n.pushHistory(),t.set(j(a,mr(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(j(a,ur(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>co(i,"horizontal")),flipVertical:()=>o(i=>co(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=gr(G(i),i.selectedElementIds,i.editTemplateMode?Ed$1(true,i.selectedElementIds[0]):Dd$1());a.groupId&&(n.pushHistory(),t.set({...j(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,s=G(i),p=n.selectedElement(i);if(!i.editable||!a||!s||!p||p.type!=="group")return;let l=p.children.map(d=>i.editTemplateMode?Ed$1(true,d.id||p.id):Dd$1()),m=br(s,a,l);m.childIds.length!==0&&(n.pushHistory(),t.set({...j(i,m.elements),selectedElementId:m.childIds.at(-1)??null,selectedElementIds:m.childIds}),n.commitChange());}}}function vr(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:im(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:im(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:oe(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function im(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function hr(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:Fd$1(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:Fd$1(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=Gd$1(r.element);n.pushHistory(),t.set({...j(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function yr(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,s)=>r||s===0?{...a,themePath:o}:a)}),n.commitChange()))();},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,o)}),n.commitChange());},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());}}}async function Sr(e,t){let n=new eb,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",Xe$1(t)),n.generateAsync({type:"blob"})}function am(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}var tb={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function ob(e){return e&&c(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function Cr(e,t=null,n=[],o=null,r=new Map){let i=ob(e),a$1=e?rb$1(e):void 0,s=e?pd(e):void 0,p=e?rd(e):void 0,l=e?td(e):void 0,m$1=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,canShape:io(e),canText:se(e),isImage:e!==void 0&&a(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:i.fillColor,strokeColor:i.strokeColor,strokeWidth:i.strokeWidth,shapeStyle:e&&c(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:i.fillOpacity,strokeOpacity:i.strokeOpacity,gradientEnabled:e!==void 0&&kd$1(e),gradient:e?jd$1(e):tb,vAlign:a$1?.vAlign??"top",textWrap:e?ub$1(e):"square",autoFitMode:e?vb$1(e):"none",characterSpacing:a$1?.characterSpacing??0,lineSpacing:a$1?.lineSpacing??1,lineSpacingExactPt:a$1?.lineSpacingExactPt??null,paragraphSpacingBefore:a$1?.paragraphSpacingBefore??0,paragraphSpacingAfter:a$1?.paragraphSpacingAfter??0,paragraphIndent:a$1?.paragraphIndent??0,paragraphMarginLeft:a$1?.paragraphMarginLeft??0,textDirection:a$1?.textDirection??"horizontal",textRtl:a$1?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:s?.brightness??0,imageContrast:s?.contrast??0,imageSaturation:s?.saturation??0,imageArtisticEffect:e&&a(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&a(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&a(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&a(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&a(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&a(e)?e.imageEffects?.colorWash:void 0,actionClick:e?.actionClick?m(e.actionClick,"click"):void 0,actionHover:e?.actionHover?m(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:p?.cropLeft??0,cropTop:p?.cropTop??0,cropRight:p?.cropRight??0,cropBottom:p?.cropBottom??0,tableHeaderRow:l?.firstRowHeader??false,tableBandedRows:l?.bandedRows??false,tableBandedColumns:l?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:l?.cellPadding??0,selectedTableCell:m$1?t:null,selectedTableCells:m$1?n:[],tableCellStyle:m$1?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(d=>d.height??32)??[]:[]}}function nb(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function sm(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r)return;o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen);let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:nb(t)}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(Cr(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls));let s=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,elements:s?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:s?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:s,colorScheme:t.colorScheme,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function pm(e){if(e.length===0)return null;if(e.length>1){let n=Ja(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function lm(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function wr(e){let t=null,n=s=>lm(s.clientX,s.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(s){!t||s.pointerId!==t.pointerId||t.points.push(n(s));}function i(s){if(!t||s.pointerId!==t.pointerId)return;t.points.push(n(s));let p=t;o(),t=null,e.onCommitStroke({points:p.points,color:e.getColor(),width:e.getWidth(),tool:p.tool});}function a(s){!t||s.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(s){if(s.button!==0)return;let p=e.getTool();if(p!=="select"){if(p==="eraser"){let l=ee(s.target,e.getStageRoot());l&&(s.preventDefault(),s.stopPropagation(),e.onEraseAt(l));return}s.preventDefault(),s.stopPropagation(),t={tool:p,pointerId:s.pointerId,points:[n(s)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function Er(e){let{store:t,editActions:n,interactions:o}=e,r=wr({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let s=t.get();a.dataset.drawTool=i(s)?s.drawTool:"select";},setTool(a){let s=t.get();s.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?s.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function rb(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function Tr(e,t){return e.map(n=>{let o=t(n);return o.replies?.length?{...o,replies:Tr(o.replies,t)}:o})}function dm(e,t){return e.filter(n=>n.id!==t).map(n=>n.replies?.length?{...n,replies:dm(n.replies,t)}:n)}function cm(e){let t=n=>{let o=e.store.get();!o.editable||!o.slides[o.currentSlide]||(e.ops.pushHistory(),e.store.set({slides:rb(o.slides,o.currentSlide,n)}),e.ops.commitChange());};return {addComment(n,o){let r=n.trim();if(!r)return null;let i=e.store.get();if(!i.editable||!i.slides[i.currentSlide])return null;let a=Dd$1();return t(s=>[...s,{id:a,text:r,author:"You",createdAt:new Date().toISOString(),resolved:false,elementId:o}]),a},addCommentReply(n,o){let r=o.trim();if(!r)return null;let i=e.store.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return null;let s=(a.comments??[]).find(m=>m.id===n);if(!s)return null;let p=Dd$1(),l={id:p,text:r,author:"You",createdAt:new Date().toISOString(),threadId:n,elementId:s.elementId};return t(m=>m.map(d=>d.id===n?{...d,replies:[...d.replies??[],l]}:d)),p},editComment(n,o){let r=o.trim();r&&t(i=>Tr(i,a=>a.id===n?{...a,text:r}:a));},deleteComment(n){t(o=>dm(o,n));},toggleCommentResolved(n){t(o=>Tr(o,r=>r.id===n?{...r,resolved:!r.resolved}:r));}}}function Pr(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=gd$1(o);i&&(n.pushHistory(),t.set({slides:gt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=sr(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:pr(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var ib={width:320,height:80},ab={width:600,height:250},sb={width:200,height:150},mm={width:240,height:0};function pe(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function Ar(e,t,n="rect"){let o,r;switch(e){case "text":o=f("Text",{fontSize:18,color:"#000000"}),r=ib;break;case "table":o={...Pa(3,3),id:l("table")},r=ab;break;case "shape":n==="connector"?(o=h({type:"straight",stroke:{color:"#000000",width:2}}),r=mm):(o=g(n),r=n==="line"?mm:sb);break}return o.width=r.width,o.height=r.height,pe(o,t),o}function pb(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function mo(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let s=typeof a.result=="string"?a.result:"";if(!s){n(null);return}let p=Math.round(t.width*.6),{width:l$1,height:m}=await pb(s,p),d={id:l("image"),type:"image",name:"Image",x:0,y:0,width:l$1,height:m,imageData:s};pe(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var lb={width:420,height:64},ze={width:640,height:360};function db(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||ze.width,i=o.videoHeight||ze.height;if(r>ze.width||i>ze.height){let a=Math.min(ze.width/r,ze.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(ze),o.src=t;})}function kr(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=i.type.startsWith("audio/")?"audio":i.type.startsWith("video/")?"video":null;if(!a){n(null);return}let s=new FileReader;s.onload=async()=>{let p=typeof s.result=="string"?s.result:"";if(!p){n(null);return}let l$1=a==="audio"?lb:await db(e,p),m={id:l("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:p,x:0,y:0,width:l$1.width,height:l$1.height};pe(m,t),n(m);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var um={width:400,height:80},xm={width:600,height:340},gm={width:200,height:40};function Ir(e,t){let n=Ad$1(e);return pe(n,t),n}function Lr(e,t,n){let o={id:l("smartart"),type:"smartArt",x:0,y:0,width:xm.width,height:xm.height,smartArtData:Vc$1(e,t,r=>l(`smartart-node-${r}`))};return pe(o,n),o}function Mr(e,t){let n="[Equation]",o={id:l("equation"),type:"shape",x:0,y:0,width:um.width,height:um.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return pe(o,t),o}function Dr(e,t){let n=Rc$1(e,l("actionbutton"));return n?(pe(n,t),n):null}function Hr(e,t){return Oa(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Rr(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:l("field"),type:"shape",x:0,y:0,width:gm.width,height:gm.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return pe(r,n),r}function bm(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,s)=>o.has(`${i}:${s}`)?{...a,style:{...a.style,...n}}:a)}))}}function fm(e,t,n){switch(n){case "insertRowAbove":return sa(e,t.row,"above");case "insertRowBelow":return sa(e,t.row,"below");case "deleteRow":return ta(e,t.row);case "insertColumnLeft":return ua(e,t.column,"left");case "insertColumnRight":return ua(e,t.column,"right");case "deleteColumn":return va(e,t.column)}}function vm(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100)),i=1-e.columnWidths[t],a=1-o;return {...e,columnWidths:e.columnWidths.map((s,p)=>p===t?o:i>0?s/i*a:s)}}function hm(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function ym(e,t){if(t.length<2)return e;let n=t.map(({row:l})=>l),o=t.map(({column:l})=>l),r=Math.min(...n),i=Math.max(...n),a=Math.min(...o),s=Math.max(...o);if(t.length!==(i-r+1)*(s-a+1))return e;let p=e.rows.map((l,m)=>({...l,cells:l.cells.map((d,u)=>m<r||m>i||u<a||u>s?d:m===r&&u===a?{...d,text:t.map(({row:x,column:g})=>e.rows[x]?.cells[g]?.text).filter(Boolean).join(" "),gridSpan:s>a?s-a+1:void 0,rowSpan:i>r?i-r+1:void 0}:{...d,text:"",hMerge:u>a||void 0,vMerge:m>r||void 0})}));return {...e,rows:p}}function Sm(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=wa(e,t.row,t.column);return i?{...e,rows:i.map((a,s)=>({...a,cells:a.cells.map((p,l)=>s>=t.row&&s<t.row+o&&l>=t.column&&l<t.column+r?{...p,hMerge:void 0,vMerge:void 0}:p)}))}:e}var cb={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Or(e){return {setTextVerticalAlign:t=>e(n=>tb$1(n,t)),setTextWrap:t=>e(n=>wb$1(n,t)),setAutoFitMode:t=>e(n=>xb$1(n,t)),setTextAdvanced:t=>e(n=>sb$1(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:zb$1(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>Te(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>Te(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>ld(n,t)),addGradientStop:(t,n)=>e(o=>md(o,t,n)),removeGradientStop:t=>e(n=>nd(n,t)??{}),updateGradientStop:(t,n)=>e(o=>od(o,t,n)),setImageBrightness:t=>e(n=>qd$1(n,{brightness:t})),setImageContrast:t=>e(n=>qd$1(n,{contrast:t})),setImageSaturation:t=>e(n=>qd$1(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>sd(o,{[cb[t]]:n})),setImageEffects:t=>e(n=>a(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n$1)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:n(n$1)})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>ud$1(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>ud$1(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>vd$1(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((s,p)=>p===n?{...s,style:{...s.style,...o}}:s)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:bm(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:fm(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:vm(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:hm(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:ym(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:Sm(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:q$1(o.smartArtData,t,n)}:{}),setSmartArtNodeStyle:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:u(o.smartArtData,t,n)}:{}),mutateSmartArtNode:(t$1,n)=>e(o$1=>{if(o$1.type!=="smartArt"||!o$1.smartArtData)return {};let r$1=o$1.smartArtData;return {smartArtData:n==="add"?o(r$1,"New item"):n==="addChild"?t(r$1,t$1,"New item"):n==="remove"?p(r$1,t$1):n==="promote"?r(r$1,t$1):s(r$1,t$1)}}),setSmartArtLayout:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:z(n.smartArtData,t)}:{}),setSmartArtColorScheme:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:{...n.smartArtData,colorScheme:t}}:{})}}function Fr(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let s=Wa(i.sections,i.slides,a,r),p=s.sections.find(l=>!i.sections.some(m=>m.id===l.id));return n(s.sections,s.slides),p?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),s=i.sections.find(l=>l.id===o);if(!i.editable||!s||!a||s.name===a)return;let p=Xa(i.sections,i.slides,o,a);n(p.sections,p.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=Ya(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?Za(i.sections,o):_a(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=$a(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function uo(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function Br(e){let{store:t,ops:n}=e;function o(r,i,a){let s=e.getHandler();s&&s.applyLayoutToSlide(r,i,[...t.get().slides]).then(p=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let m=[...l.slides];m[r]=p,t.set({slides:m}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=bb$1(i+1),s=uo([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:s,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i$1=r.slides[r.currentSlide];if(!r.editable||!i$1)return;n.pushHistory();let a=r.currentSlide+1,s={...j$1(i$1),id:ab$1()},p=r.templateElementsBySlideId[i$1.id]??[],l=uo([...r.slides.slice(0,a),s,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[s.id]:p.map(i)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=uo(r.slides.filter((p,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),s={...r.templateElementsBySlideId};delete s[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:s,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let s=a.currentSlide+1,p={...bb$1(s+1),layoutPath:r,...i?{layoutName:i}:{}},l=uo([...a.slides.slice(0,s),p,...a.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(s,r,p.id);},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide];!r.editable||!i?.layoutPath||o(r.currentSlide,i.layoutPath,i.id);}}}var mb=24;function xo(e,t){if(!se(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function go(e,t){let n=Ee(e).listType;return xo(e,{listType:n===t?"none":t})}function bo(e,t){let n=Ee(e).paragraphMarginLeft,o=Math.max(0,n+t*mb);return xo(e,{paragraphMarginLeft:o})}function Vr(e,t){return xo(e,{align:t})}function Nr(e,t){return xo(e,{lineSpacing:t})}function zr(e){return {toggleBold:()=>e(t=>je(t,"bold")),toggleItalic:()=>e(t=>je(t,"italic")),toggleUnderline:()=>e(t=>je(t,"underline")),toggleStrikethrough:()=>e(t=>je(t,"strikethrough")),toggleTextShadow:()=>e(t=>qn(t)),changeFontSize:t=>e(n=>Gn(n,t)),setFontSize:t=>e(n=>ao(n,t)),setFontFamily:t=>e(n=>Wn(n,t)),setTextColor:t=>e(n=>_n(n,t)),setHighlightColor:t=>e(n=>Un(n,t)),setCharacterSpacing:t=>e(n=>$n(n,t)),changeCase:t=>e(n=>Kn(n,t)),clearFormatting:()=>e(t=>jn(t)),toggleBulletList:()=>e(t=>go(t,"bullet")),toggleNumberedList:()=>e(t=>go(t,"numbered")),increaseIndent:()=>e(t=>bo(t,1)),decreaseIndent:()=>e(t=>bo(t,-1)),setTextAlign:t=>e(n=>Vr(n,t)),setLineSpacing:t=>e(n=>Nr(n,t))}}function Gr(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i){let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s)return;let p=Math.max(0,Math.round(r));if(n.pushHistory(),i){let l={type:o,durationMs:p};t.set({slides:dr(a.slides,{transition:l})});}else {let l={...s.transition,type:o,durationMs:p};t.set({slides:oe(a.slides,a.currentSlide,{transition:l})});}n.commitChange();}}}function _r(e){let{doc:t,store:n,ops:o}=e,r=ar(n,o),i=a=>{if(!a)return;let s=n.get();!s.editable||!s.slides[s.currentSlide]||(o.pushHistory(),n.set({slides:gt(s.slides,s.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...zr(r),...fr({store:n,ops:o,applyToSelected:r}),...hr({store:n,ops:o}),...Br({store:n,ops:o,getHandler:e.getHandler}),...vr({store:n,ops:o}),...Gr({store:n,ops:o}),...cr({store:n,ops:o}),...Or(r),...Pr({store:n,ops:o}),...yr({store:n,ops:o,getHandler:e.getHandler}),sections:Fr(n,o),comments:cm({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(s=>Te(s,{fillColor:a,fillMode:"solid"})),setShapeStroke:a=>r(s=>Te(s,{strokeColor:a})),setShapeStrokeWidth:a=>r(s=>Te(s,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(s=>Te(s,a)),setShapeType:a=>r(s=>s.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let s={};return a.x!==void 0&&Number.isFinite(a.x)&&(s.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(s.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(s.width=Math.max(k,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(s.height=Math.max(k,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(s.rotation=a.rotation),s});},insert(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Ar(a,p.canvasSize,s));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await mo(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await kr(t,a.canvasSize));},insertChart(a){let s=n.get();s.slides[s.currentSlide]&&i(Ir(a,s.canvasSize));},insertSmartArt(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Lr(a,s,p.canvasSize));},insertEquation(a){let s=n.get();s.slides[s.currentSlide]&&i(Mr(a,s.canvasSize));},updateEquation:(a,s)=>o.updateEquation(a,s),insertActionButton(a){let s=n.get();s.slides[s.currentSlide]&&i(Dr(a,s.canvasSize));},insertField(a,s){let p=n.get();if(!p.slides[p.currentSlide])return;let l=s??Hr(a,{slideNumber:p.currentSlide+1});i(Rr(a,l,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),toggleViewOption(a){let s=n.get();n.set({[a]:!s[a]});for(let p of t.querySelectorAll(".pptxv"))p.classList.toggle(`pptxv-${a}`,!s[a]);},addGuide(a){let s=n.get();n.set({guides:[...s.guides,Wc$1(`guide-${Date.now()}`,a,s.canvasSize)]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await mo(t,n.get().canvasSize);!a||a.type!=="image"||r(s=>s.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Ur(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?_c$1(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let p=_c$1(s.slides,r,{matchCase:a}),{slides:l,replacements:m}=$c$1(s.slides,p,0,i);return o(l,m),m},replaceAll(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let{slides:p,replacements:l}=ad(s.slides,r,i,{matchCase:a});return o(p,l),l}}}var Cm=1,wm=10,ub=new Set(["nw","ne","se","sw"]);function Em(e){return ub.has(e)}function Wr(e,t,n,o=k){if(!Em(n)||t.width<=0||t.height<=0)return e;let r=e.width/t.width,i=e.height/t.height,a=Math.abs(r-1)>=Math.abs(i-1)?r:i,s=t.width*a,p=t.height*a;if(s<o||p<o){let d=Math.max(o/t.width,o/t.height);s=t.width*d,p=t.height*d;}let l=n==="nw"||n==="sw",m=n==="nw"||n==="ne";return {x:l?t.x+t.width-s:t.x,y:m?t.y+t.height-p:t.y,width:s,height:p,rotation:e.rotation}}function $r(e,t){let n=t?wm:Cm;switch(e){case "ArrowLeft":return {dx:-n,dy:0};case "ArrowRight":return {dx:n,dy:0};case "ArrowUp":return {dx:0,dy:-n};case "ArrowDown":return {dx:0,dy:n};default:return null}}var xb=/^(?:INPUT|TEXTAREA|SELECT)$/u;function qr(e){return t=>{if(!e.isActive())return;let n=t.target instanceof HTMLElement?t.target:null;if(n&&(xb.test(n.tagName)||n.isContentEditable))return;let o=t.ctrlKey||t.metaKey,r=t.key;if(r==="Escape"&&e.cancelFormatPainter()){t.preventDefault();return}if(o&&(r==="z"||r==="Z")){t.preventDefault(),t.shiftKey?e.redo():e.undo();return}if(o&&(r==="y"||r==="Y")){t.preventDefault(),e.redo();return}if(o&&(r==="v"||r==="V")){t.preventDefault(),e.paste();return}if(e.getSelectedId()===null)return;if(r==="Escape"){t.preventDefault(),e.deselect();return}if(r==="Delete"||r==="Backspace"){t.preventDefault(),e.deleteSelected();return}if(o&&(r==="d"||r==="D")){t.preventDefault(),e.duplicateSelected();return}if(o&&(r==="c"||r==="C")){t.preventDefault(),e.copySelected();return}if(o&&(r==="x"||r==="X")){t.preventDefault(),e.cutSelected();return}let i=$r(r,t.shiftKey);i&&(t.preventDefault(),e.nudgeSelected(i.dx,i.dy));}}function Tm(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function Pm(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null}}function Am(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=te(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let s=a.tableData.rows.map((p,l)=>({...p,cells:p.cells.map((m,d)=>l===n&&d===o?{...m,text:r,textRuns:void 0}:m)}));e.store.set(j(i,G(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:s}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=te(o,t);!r||!b(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(j(o,G(o).map(i=>i.id===t&&b(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function Kr(e){return !e||!b(e)||e.locks?.noTextEdit?false:!e.textSegments?.some(t=>t.equationXml)}function jr(e,t){let n=b(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:Db$1(t,o,r)}}function bt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
6
+ `),E.textContent=h?.metadata?`${h.metadata.duration??0}s, ${h.metadata.videoWidth??0} x ${h.metadata.videoHeight??0}, ${h.metadata.codecInfo??h.mediaMimeType??""}`:h?.mediaMimeType??"";for(let y of [...A,u,x,g,f])y.setDisabled(!S.isMedia);v.control.disabled=!S.isMedia,b.control.disabled=!S.isMedia;}}}function Xd(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Zd(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Jd(e,t,n,o){let r=n(t("pptx.arrange.positionSize")),i=uf$1(e,"div","pptxv-inspector-grid");r.appendChild(i);let a=(x,g,f)=>{let v=Y(e,{label:x,min:f,onCommit:b=>o({[g]:b})});return i.appendChild(v.el),v},s=a(t("pptx.arrange.x"),"x"),p=a(t("pptx.arrange.y"),"y"),l=a(t("pptx.arrange.width"),"width",1),m=a(t("pptx.arrange.height"),"height",1),d=a(t("pptx.arrange.rotation"),"rotation"),u=[s,p,l,m,d];return {el:r,update(x){r.hidden=!x.hasSelection,s.setValue(x.x),p.setValue(x.y),l.setValue(x.width),m.setValue(x.height),d.setValue(x.rotation);for(let g of u)g.setDisabled(!x.hasSelection);}}}var Yx=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function ec(e,t,n,o){let r=n(t("pptx.smartart.title")),i=uf$1(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=uf$1(e,"div","pptxv-smartart-layout-grid"),s=new Map;for(let f of y){let v=uf$1(e,"button","pptxv-smartart-layout-button");v.type="button",v.dataset.testid=`smartart-layout-${f}`,v.textContent=t(`pptx.smartart.category.${f}`),v.addEventListener("click",()=>o.setSmartArtLayout(f)),s.set(f,v),a.appendChild(v);}r.appendChild(a);let p=xe(e,{label:t("pptx.smartart.colorScheme"),options:Yx.map(f=>({value:f,label:f})),onChange:o.setSmartArtColorScheme}),l=p.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(p.el);let m=uf$1(e,"span","pptxv-smartart-label");m.textContent=t("pptx.smartart.textPane"),r.appendChild(m);let d=uf$1(e,"div","pptxv-smartart-nodes"),u=e.createElement("button");u.type="button",u.textContent=t("pptx.smartart.addItem"),u.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(u,d);let x="",g=f=>{let v=f.smartArtData,b=v?.nodes.map(E=>E.id).join("|")??"";if(b===x){let E=d.querySelectorAll('[data-testid="smartart-node-text"]');v?.nodes.forEach((A,S)=>{let h=E[S];h&&e.activeElement!==h&&(h.value=A.text);});return}x=b,d.replaceChildren();for(let[E,A]of (v?.nodes??[]).entries()){let S=uf$1(e,"label","pptxv-smartart-node"),h=uf$1(e,"span","pptxv-smartart-node-index");h.textContent=String(E+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${E+1}`),C.value=A.text,C.addEventListener("change",()=>o.setSmartArtNodeText(A.id,C.value));let y=e.createElement("input");y.type="color",y.value=A.style?.fillColor??"#3b82f6",y.title=t("pptx.inspector.fill"),y.addEventListener("input",()=>o.setSmartArtNodeStyle(A.id,{fillColor:y.value}));let P=e.createElement("input");P.type="color",P.value=A.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(A.id,{fontColor:P.value}));let T=e.createElement("button");T.type="button",T.textContent="B",T.addEventListener("click",()=>o.setSmartArtNodeStyle(A.id,{bold:!A.style?.bold}));let w=e.createElement("button");w.type="button",w.textContent="I",w.addEventListener("click",()=>o.setSmartArtNodeStyle(A.id,{italic:!A.style?.italic}));let k=uf$1(e,"span","pptxv-smartart-hierarchy");for(let[I,H]of [["addChild","+Child"],["promote","Outdent"],["demote","Indent"],["remove","Delete"]]){let D=e.createElement("button");D.type="button",D.textContent=H,D.addEventListener("click",()=>o.mutateSmartArtNode(A.id,I)),k.appendChild(D);}S.append(h,C,y,P,T,w,k),d.appendChild(S);}};return {el:r,update(f){r.hidden=!f.isSmartArt;let v=f.smartArtData?.resolvedLayoutType;for(let[b,E]of s)E.disabled=!f.isSmartArt,E.classList.toggle("is-active",b===v),E.setAttribute("aria-pressed",String(b===v));p.setValue(f.smartArtData?.colorScheme??"colorful1"),p.setDisabled(!f.isSmartArt),u.disabled=!f.isSmartArt,g(f);}}}function tc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,P)=>{let T=e.createElement("label");T.textContent=y;let w=e.createElement("select");for(let k of P){let I=e.createElement("option");I.value=k,I.textContent=k,w.appendChild(I);}return T.appendChild(w),o.appendChild(T),w},s=y=>{let P=e.createElement("label");P.textContent=y;let T=e.createElement("input");return T.type="color",P.appendChild(T),o.appendChild(P),T},p=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),m=e.createElement("input");m.type="number",m.min="0",m.max="360",m.title=t("pptx.table.gradientAngle"),o.appendChild(m);let d=s(t("pptx.table.gradientStart")),u=s(t("pptx.table.gradientEnd")),x=a(t("pptx.table.patternPreset"),["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"]),g=s(t("pptx.table.patternForeground")),f=s(t("pptx.table.patternBackground")),v=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=s(t("pptx.table.borderColor")),E=e.createElement("input");E.type="number",E.min="0",E.max="20",E.title=t("pptx.table.borderWidth"),o.appendChild(E);let A=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(m.value),gradientFillStops:[{color:d.value,position:0},{color:u.value,position:100}]});p.addEventListener("change",()=>i({fillMode:p.value}));for(let y of [l,m,d,u])y.addEventListener("change",A);let S=()=>i({fillMode:"pattern",patternFillPreset:x.value,patternFillForeground:g.value,patternFillBackground:f.value});for(let y of [x,g,f])y.addEventListener("change",S);let h=()=>{let y=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(E.value)});};for(let y of [v,b,E])y.addEventListener("change",h);let C=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let P=y.tableCellStyle??{};p.value=P.fillMode??"solid",l.value=P.gradientFillType??"linear",m.value=String(P.gradientFillAngle??90),d.value=P.gradientFillStops?.[0]?.color??"#ff0000",u.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",x.value=P.patternFillPreset??"ltDnDiag",g.value=P.patternFillForeground??"#000000",f.value=P.patternFillBackground??"#ffffff";let T=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;b.value=String(P[`border${T}Color`]??"#374151"),E.value=String(P[`border${T}Width`]??1);for(let w of C)w.disabled=!y.isTable;}}}function Rn(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function oc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],s=T=>{i&&n.setTableCellStyles(a.length>0?a:[i],T);},p=(T,w)=>{let k=e.createElement("label"),I=e.createElement("span");return I.textContent=T,k.append(I,w),o.appendChild(k),k},l=(T,w)=>{let k=e.createElement("input");return k.type="number",k.addEventListener("change",()=>w(Number(k.value))),p(T,k),k},m=(T,w)=>{let k=e.createElement("input");return k.type="color",k.addEventListener("input",()=>s({[w]:k.value})),p(T,k),k},d=(T,w)=>{let k=e.createElement("input");return k.type="checkbox",k.addEventListener("change",()=>s({[w]:k.checked})),p(T,k),k},u=(T,w,k)=>{let I=e.createElement("select");for(let H of w){let D=e.createElement("option");D.value=H,D.textContent=H,I.appendChild(D);}return I.addEventListener("change",()=>k(I.value)),p(T,I),I},x=l(t("pptx.table.fontSize"),T=>s({fontSize:T})),g=m(t("pptx.table.color"),"color"),f=m(t("pptx.table.background"),"backgroundColor"),v=m(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),T=>s({borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T})),E=l(t("pptx.table.cellPadding"),T=>s({marginLeft:T,marginRight:T,marginTop:T,marginBottom:T})),A=d(t("pptx.format.bold"),"bold"),S=d(t("pptx.format.italic"),"italic"),h=d(t("pptx.format.underline"),"underline"),C=u(t("pptx.table.alignment"),["left","center","right"],T=>s({align:T})),y=u(t("pptx.table.verticalAlignment"),["top","middle","bottom"],T=>s({vAlign:T})),P=[x,g,f,v,b,E,A,S,h,C,y];return {el:o,update(T){if(i=T.selectedTableCell,a=T.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let w=T.tableCellStyle??{};x.value=String(w.fontSize??14),g.value=Rn(w.color,"#000000"),f.value=Rn(w.backgroundColor,"#ffffff"),v.value=Rn(w.borderColor,"#374151"),b.value=String(w.borderTopWidth??1),E.value=String(w.marginLeft??4),A.checked=!!w.bold,S.checked=!!w.italic,h.checked=!!w.underline,C.value=w.align??"left",y.value=w.vAlign??"top";for(let k of P)k.disabled=!T.isTable;}}}function nc(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(d,u)=>{let x=e.createElement("button");return x.type="button",x.textContent=d,x.addEventListener("click",()=>r&&u(r)),o.appendChild(x),x},a=d=>d.selectedTableCell,s=d=>u=>{let x=a(u);x&&n.mutateTableStructure(x,d);},p=[i(t("pptx.table.insertRowAbove"),s("insertRowAbove")),i(t("pptx.table.insertRowBelow"),s("insertRowBelow")),i(t("pptx.table.deleteRow"),s("deleteRow")),i(t("pptx.table.insertColumnLeft"),s("insertColumnLeft")),i(t("pptx.table.insertColumnRight"),s("insertColumnRight")),i(t("pptx.table.deleteColumn"),s("deleteColumn")),i(t("pptx.table.mergeCells"),d=>n.mergeTableCells(d.selectedTableCells)),i(t("pptx.table.split"),d=>{let u=a(d);u&&n.splitTableCell(u);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let d=r&&a(r);d&&n.setTableColumnWidth(d.column,Number(l.value));});let m=e.createElement("input");return m.type="number",m.min="1",m.title=t("pptx.table.rowHeights"),m.addEventListener("change",()=>{let d=r&&a(r);d&&n.setTableRowHeight(d.row,Number(m.value));}),o.append(l,m),{el:o,update(d){r=d;let u=a(d);o.hidden=!u,l.value=u?String(Math.round((d.tableColumnWidths[u.column]??0)*100)):"",m.value=u?String(d.tableRowHeights[u.row]??32):"";for(let x of p)x.disabled=!u;p[6].disabled=d.selectedTableCells.length<2,l.disabled=!u,m.disabled=!u;}}}function rc(e,t,n,o){let r=n(t("pptx.inspector.table")),i=$(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=$(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),s=$(e,{label:t("pptx.table.bandedColumns"),onChange:h=>o.setTableOptions({bandedColumns:h})}),p=$(e,{label:t("pptx.table.totalRow"),onChange:h=>o.setTableOptions({lastRow:h})}),l=$(e,{label:t("pptx.table.firstColumn"),onChange:h=>o.setTableOptions({firstCol:h})}),m=$(e,{label:t("pptx.table.lastColumn"),onChange:h=>o.setTableOptions({lastCol:h})}),d=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:h=>o.setTableOptions({rtl:h})});r.append(i.el,a.el,s.el,p.el,l.el,m.el,d.el);let u=Y(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(u.el);let x=e.createElement("input");x.placeholder=t("pptx.table.styleId"),x.addEventListener("change",()=>o.setTableOptions({tableStyleId:x.value}));let g=e.createElement("input");g.type="color",g.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:g.value}));let f=e.createElement("input");f.type="color",f.addEventListener("input",()=>o.setTableOptions({},{borderColor:f.value})),r.append(x,g,f);let v=oc(e,t,o),b=tc(e,t,o),E=nc(e,t,o);r.append(v.el,b.el,E.el);let A=[i,a,s,p,l,m,d],S=[u];return {el:r,update(h){r.hidden=!h.hasSelection||!h.isTable,i.setValue(h.tableHeaderRow),a.setValue(h.tableBandedRows),s.setValue(h.tableBandedColumns),p.setValue(h.tableLastRow),l.setValue(h.tableFirstCol),m.setValue(h.tableLastCol),d.setValue(h.tableRtl),u.setValue(h.tableCellPadding),x.value=h.tableStyleId,g.value=h.tableCellBackground,f.value=h.tableCellBorder,v.update(h),b.update(h),E.update(h);for(let C of A)C.setDisabled(!h.isTable);x.disabled=!h.isTable,g.disabled=!h.isTable,f.disabled=!h.isTable;for(let C of S)C.setDisabled(!h.isTable);}}}function ic(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=w=>n.setTextStyle(w,r?.selectedTextRange),a=w=>n.setTextStyle(w),s=(w,k)=>{let I=e.createElement("label");I.textContent=w,I.appendChild(k),o.appendChild(I);},p=(w,k,I=0,H=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(I),D.addEventListener("change",()=>(H?a:i)({[k]:Number(D.value)})),s(w,D),D},l=(w,k)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[k]:I.value})),s(w,I),I},m=(w,k)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[k]:I.checked})),s(w,I),I},d=p(t("pptx.textFormatting.columns"),"columnCount",1,true);d.max="6";let u=p(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),x=l(t("pptx.textEffects.outline"),"textOutlineColor"),g=p(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),f=m(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=p(t("pptx.textEffects.blur"),"textShadowBlur"),E=l(t("pptx.textEffects.glowColor"),"textGlowColor"),A=p(t("pptx.textEffects.glow"),"textGlowRadius"),S=m(t("pptx.textEffects.reflection"),"textReflection"),h=m(t("pptx.textFormatting.strikethrough"),"strikethrough"),C=l(t("pptx.textFormatting.highlight"),"highlightColor"),y=e.createElement("select");for(let w of Cd$1){let k=e.createElement("option");k.value=w.value,k.textContent=w.label,y.appendChild(k);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),s(t("pptx.textEffects.transform"),y);let P=p(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),T=Array.from(o.querySelectorAll("input,select"));return {el:o,update(w){r=w,o.hidden=!w.canText;let k=w.textStyle??{};d.value=String(k.columnCount??1),u.value=String(k.columnSpacing??0),x.value=k.textOutlineColor??"#000000",g.value=String(k.textOutlineWidth??0),f.checked=!!k.textShadowOpacity,v.value=k.textShadowColor??"#000000",b.value=String(k.textShadowBlur??4),E.value=k.textGlowColor??"#ffff00",A.value=String(k.textGlowRadius??0),S.checked=!!k.textReflection,h.checked=!!k.strikethrough,C.value=k.highlightColor??"#ffff00",y.value=k.textWarpPreset??"textNoShape",P.value=String(k.textWarpAdj??5e4);for(let I of T)I.disabled=!w.canText;}}}function ac(e,t,n,o){let r=n(t("pptx.inspector.text")),i=xe(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=$(e,{label:t("pptx.textAdvanced.wrapText"),onChange:h=>o.setTextWrap(h?"square":"none")});r.appendChild(a.el);let s=xe(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(s.el);let p=(h,C,y)=>Y(e,{label:h,min:y,onCommit:P=>o.setTextAdvanced({[C]:P})}),l=p(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),m=p(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),d=p(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),u=p(t("pptx.textAdvanced.spacingBefore"),"paragraphSpacingBefore",0),x=p(t("pptx.textAdvanced.spacingAfter"),"paragraphSpacingAfter",0),g=p(t("pptx.textAdvanced.indent"),"paragraphIndent"),f=p(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),v=xe(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(h=>({value:h,label:t(`pptx.textAdvanced.direction.${h}`)})),onChange:h=>o.setTextAdvanced({textDirection:h})}),b=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:h=>o.setTextAdvanced({rtl:h})}),E=[l,m,d,u,x,g,f];r.append(...E.map(({el:h})=>h),v.el,b.el);let A=ic(e,t,o);r.appendChild(A.el);let S=[i,a,s,...E,v,b];return {el:r,update(h){r.hidden=!h.hasSelection||!h.canText,i.setValue(h.vAlign),a.setValue(h.textWrap==="square"),s.setValue(h.autoFitMode),l.setValue(h.characterSpacing),m.setValue(h.lineSpacing),d.setValue(h.lineSpacingExactPt??0),u.setValue(h.paragraphSpacingBefore),x.setValue(h.paragraphSpacingAfter),g.setValue(h.paragraphIndent),f.setValue(h.paragraphMarginLeft),v.setValue(h.textDirection),b.setValue(h.textRtl),A.update(h);for(let C of S)C.setDisabled(!h.canText);}}}function ro(e,t,n){let o=uf$1(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=uf$1(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let T of a){let w=uf$1(e,"button","pptxv-inspector-tab");w.type="button",w.setAttribute("role","tab"),w.textContent=T.label,w.addEventListener("click",()=>u(T.id)),r.appendChild(w),i.set(T.id,w);}let s=$d(e,t,T=>n.selectElement(T));s.el.classList.add("pptxv-inspector-body"),o.appendChild(s.el);let p=uf$1(e,"div","pptxv-inspector-body");o.appendChild(p);let l=zd(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let m=Id(e,t,n);o.appendChild(m.el);let d="properties",u=T=>{d=T;for(let[w,k]of i)k.classList.toggle("is-active",w===T),k.setAttribute("aria-selected",String(w===T));s.el.hidden=T!=="elements",p.hidden=T!=="properties",l.el.hidden=T!=="comments";},x=Wd(e,t,n);p.appendChild(x.el);let g=T=>{let w=uf$1(e,"div","pptxv-inspector-section"),k=uf$1(e,"h4","pptxv-inspector-section-title");return k.textContent=T,w.appendChild(k),p.appendChild(w),w},f=Jd(e,t,g,n.setGeometry),v=jd(e,t,g,n),b=ac(e,t,g,n),E=Yd(e,t,g,n),A=rc(e,t,g,n),S=ec(e,t,g,n),h=Sd(e,t,g,n),C=Vd(e,t,g,n),y=Qd(e,t,g,n),P=[f,v,b,E,A,S,h,C,y];return u(d),{el:o,update(T){x.setVisible(!T.hasSelection);for(let w of P)w.update(T);},updateDeck(T){s.update(T),l.update(T),x.update(T),m.update({editable:T.editable,selectedElementId:T.selectedElementId,elements:T.elements,animations:T.activeSlide?.animations??[]});},setEditable(T){o.hidden=!T;}}}var sc=128,Xx=[1,2,3,4,6,9],Zx={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function pc(e,t,n,o,r){let i=uf$1(e,"section","pptxv-master-card"),a=uf$1(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let s=uf$1(e,"input","pptxv-master-background");s.type="color",s.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",s.setAttribute("aria-label","Master background color"),s.addEventListener("input",()=>r(s.value)),i.append(a,s),n.appendChild(i);}function lc(e,t,n,o,r){let i=uf$1(e,"section","pptxv-master-card"),a=uf$1(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let s=uf$1(e,"div","pptxv-master-empty");s.textContent=t("pptx.master.noPlaceholders"),i.appendChild(s);}for(let s of o){let p=uf$1(e,"div","pptxv-master-placeholder"),l=uf$1(e,"span",`pptxv-master-dot is-${r}`);p.append(l,e.createTextNode(t(Zx[s.type]??s.type))),i.appendChild(p);}n.appendChild(i);}function Qx(e,t){let n=t===null?void 0:e.layouts?.[t];return {id:n?.path??e.path,rId:"",slideNumber:0,elements:n?[...e.elements??[],...n.elements??[]]:e.elements??[],backgroundColor:n?.backgroundColor??e.backgroundColor,backgroundImage:n?.backgroundImage??e.backgroundImage}}function Jx(e,t,n,o){let r=sc/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let s=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((p,l)=>({layoutIndex:l,label:p.name||t("pptx.master.layout")}))??[]];for(let p of s){let l=uf$1(e,"button",`pptxv-master-thumb${p.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",p.label);let m=o.active.masterIndex===i&&o.active.layoutIndex===p.layoutIndex;l.classList.toggle("is-active",m),m&&l.setAttribute("aria-current","page");let d=uf$1(e,"span","pptxv-master-thumb-name");d.textContent=p.label;let u=uf$1(e,"span","pptxv-master-thumb-frame");u.style.width=`${sc}px`,u.style.height=`${Math.round(o.canvasSize.height*r)}px`,u.appendChild(o.renderStage(Qx(a,p.layoutIndex),r)),l.append(d,u),l.addEventListener("click",()=>o.onSelect(i,p.layoutIndex)),n.appendChild(l);}}}function On(e,t){let n=uf$1(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=uf$1(e,"header","pptxv-master-header"),i=uf$1(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=uf$1(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let s=uf$1(e,"div","pptxv-master-tabs");s.setAttribute("role","tablist");for(let[l,m]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let d=uf$1(e,"button","pptxv-master-tab");d.type="button",d.role="tab",d.textContent=t(m),d.setAttribute("aria-selected",String(o.tab===l)),d.classList.toggle("is-active",o.tab===l),d.addEventListener("click",()=>o.onTabChange(l)),s.appendChild(d);}let p=uf$1(e,"div","pptxv-master-body");if(p.setAttribute("role","tabpanel"),o.tab==="slides")Jx(e,t,p,o);else if(o.tab==="notes")o.notesMasterPresent?(pc(e,t,p,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),lc(e,t,p,o.notesPlaceholders??[],"notes")):(p.textContent=t("pptx.master.noNotesMaster"),p.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)p.textContent=t("pptx.master.noHandoutMaster"),p.classList.add("pptxv-master-empty");else {let l=uf$1(e,"section","pptxv-master-card"),m=uf$1(e,"div","pptxv-master-card-label");m.textContent=t("pptx.master.handoutSlidesPerPage");let d=uf$1(e,"div","pptxv-master-counts");for(let u of Xx){let x=uf$1(e,"button","pptxv-master-count");x.type="button",x.textContent=String(u),x.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===u)),x.classList.toggle("is-active",o.handoutSlidesPerPage===u),x.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(u)),d.appendChild(x);}l.append(m,d),p.appendChild(l),pc(e,t,p,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),lc(e,t,p,o.handoutPlaceholders??[],"handout");}n.append(r,s,p);},setVisible(o){n.hidden=!o;}}}function Fn(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-mobile-actions"),s=uf$1(e,"div","pptxv-mobile-sheet-host");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let p=e.createElement("button");p.type="button",p.className="pptxv-mobile-sheet-backdrop",p.setAttribute("aria-label",t("pptx.settings.close"));let l=uf$1(e,"section","pptxv-mobile-sheet"),m=uf$1(e,"header","pptxv-mobile-sheet-header"),d=uf$1(e,"span","pptxv-mobile-sheet-handle"),u=e.createElement("strong");m.append(d,u);let x=uf$1(e,"div","pptxv-mobile-sheet-body");l.append(m,x),s.append(p,l),s.hidden=true,a.appendChild(s);let g=null,f=0,v=[],b=[],E=true,A=false,S=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(S,r);let h=()=>{r&&S?.parentNode&&S.parentNode.insertBefore(r,S.nextSibling);},C=()=>{g=null,s.hidden=true,l.style.transform="",h();for(let D of w.querySelectorAll("button"))D.setAttribute("aria-pressed","false");};p.addEventListener("click",C);let y=yd$1((D,O)=>{l.style.transform=D>0?`translateY(${D}px)`:"",l.style.transition=O?"none":"";},C),P=D=>({clientY:D.clientY,pointerId:D.pointerId,currentTarget:m});m.addEventListener("pointerdown",D=>y.pointerDown(P(D))),m.addEventListener("pointermove",D=>y.pointerMove(P(D))),m.addEventListener("pointerup",D=>y.pointerUp(P(D))),m.addEventListener("pointercancel",D=>y.cancel(P(D)));let T=D=>{if(x.replaceChildren(),u.textContent=t(D==="inspector"?"pptx.field.format":`pptx.${D==="slides"?"sections.slides":D==="comments"?"toolbar.comments":D==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),s.setAttribute("aria-label",u.textContent),D==="slides"){let O=uf$1(e,"div","pptxv-mobile-slide-list");for(let L=0;L<v.length;L+=1){let R=e.createElement("button");R.type="button",R.textContent=ff$1(v[L],L),R.classList.toggle("is-active",L===f),R.addEventListener("click",()=>{o(L),C();}),O.appendChild(R);}x.appendChild(O);}else if(D==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[L,R]of O){let B=e.createElement("button");B.type="button",B.textContent=L,B.addEventListener("click",R),x.appendChild(B);}}else if(D==="inspector"&&r)x.appendChild(r);else if(D==="comments"){b.length===0&&(x.textContent=t("pptx.comments.noneOnSlide"));for(let B of b){let F=uf$1(e,"article","pptxv-mobile-comment"),V=e.createElement("textarea");V.value=B.text,V.setAttribute("aria-label",t("pptx.comments.edit"));let N=uf$1(e,"div","pptxv-mobile-comment-actions"),W=e.createElement("button");W.type="button",W.textContent=t("pptx.comments.save"),W.addEventListener("click",()=>n.edit.comments.editComment(B.id,V.value));let Z=e.createElement("button");Z.type="button",Z.textContent=B.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),Z.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(B.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(B.id)),N.append(W,Z,K),F.append(V,N),x.appendChild(F);}let O=uf$1(e,"div","pptxv-mobile-comment-add"),L=e.createElement("textarea");L.placeholder=t("pptx.comments.addPlaceholder"),L.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let R=e.createElement("button");R.type="button",R.textContent=t("pptx.comments.addComment"),R.addEventListener("click",()=>{n.edit.comments.addComment(L.value)&&(L.value="");}),O.append(L,R),x.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[L,R,B]of O){if(B&&ze$1(B,i))continue;let F=e.createElement("button");F.type="button",F.textContent=L,F.addEventListener("click",R),x.appendChild(F);}}},w=e.createElement("nav");w.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let k=D=>{if(g=hd$1(g,D),!g){C();return}T(g),s.hidden=false;for(let O of w.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===g));},I={slides:"panel-left",insert:"plus",inspector:"shapes",comments:"notes",notes:"sticky-note"};for(let D of id({slideCount:0})){let O=D.key;if(O==="notes"&&ze$1("notes",i))continue;let L=e.createElement("button");L.type="button",L.dataset.mobileAction=O,O==="notes"&&L.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),L.appendChild(Df(e,I[O]));let R=uf$1(e,"span");R.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),L.appendChild(R),L.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}k(O);}),w.appendChild(L);}a.appendChild(w);let H=()=>{let D=id({slideCount:v.length});for(let O of D){let L=w.querySelector(`button[data-mobile-action='${O.key}']`);if(!L)continue;let R=O.key==="insert"||O.key==="inspector"||O.key==="comments";L.disabled=O.disabled||R&&!E||O.key==="inspector"&&!r,L.setAttribute("aria-pressed",String(O.key==="notes"?A:O.key===g));}};return {el:a,update(D,O,L){f=D,v=O,b=L,g&&T(g),H();},toggle:k,close:C,setEditable(D){E=D,!E&&g&&["insert","inspector","comments"].includes(g)&&C(),H();},setNotesExpanded(D){A=D,H();}}}function Bn(e,t,n,o){let r=uf$1(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=M(e,{label:t("pptx.mobileToolbar.menu"),icon:"sidebar",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=ze$1("undo",o)?null:M(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),s=ze$1("redo",o)?null:M(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),p=uf$1(e,"span","pptxv-mobile-toolbar-spacer"),l=M(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),m=ze$1("fullscreen",o)?null:M(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),d=uf$1(e,"span","pptxv-mobile-toolbar-ai"),u=uf$1(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...s?[s.btn]:[],p,d,l.btn,...m?[m.btn]:[],u),{el:r,collaborationHost:u,aiHost:d,setEditState({editable:x,canUndo:g,canRedo:f}){for(let v of [i.btn,a?.btn,s?.btn])v&&(v.hidden=!x);u.hidden=!x,d.hidden=!x,a?.setDisabled(!g),s?.setDisabled(!f);}}}function Vn(e,t,n,o){let r=uf$1(e,"div","pptxv-notes"),i=uf$1(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=uf$1(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let s=uf$1(e,"span","pptxv-notes-chevron");s.setAttribute("aria-hidden","true"),i.appendChild(s);let p=uf$1(e,"div","pptxv-notes-body");p.id="slide-notes-content",r.appendChild(p);let l=uf$1(e,"div","pptxv-notes-toolbar");p.appendChild(l);let m=e.createElement("button");m.type="button",m.className="pptxv-notes-mode",l.appendChild(m);let d=uf$1(e,"div","pptxv-notes-rich-editor");d.contentEditable="true",d.setAttribute("role","textbox"),d.setAttribute("aria-multiline","true"),d.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(d);let u=e.createElement("textarea");u.className="pptxv-notes-textarea",u.name="slide-notes",u.spellcheck=true,u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(u);let x=false,g=null,f=false,v=hb$1(),b=[],E=y=>{v=y,d.hidden=!v,u.hidden=v,l.hidden=!f,m.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),m.setAttribute("aria-pressed",String(v));},A=()=>{if(!f)return;let y=ib$1(d);b=y.segments,o(y.text,y.segments);},S=(y,P,T)=>{let w=e.createElement("button");w.type="button",w.className="pptxv-notes-tool",w.textContent=y,w.title=P,w.setAttribute("aria-label",P),w.addEventListener("mousedown",k=>k.preventDefault()),w.addEventListener("click",()=>{d.focus(),T(),A();}),l.insertBefore(w,m);};S("B",t("pptx.notes.bold"),()=>kb$1("bold")),S("I",t("pptx.notes.italic"),()=>kb$1("italic")),S("U",t("pptx.notes.underline"),()=>kb$1("underline")),S("S",t("pptx.notes.strikethrough"),()=>kb$1("strikeThrough")),S("\u2022",t("pptx.notes.bulletList"),()=>{b=jb$1(d,b,"bullet").segments,d.innerHTML=fb$1(b);}),S("1.",t("pptx.notes.numberedList"),()=>{b=jb$1(d,b,"numbered").segments,d.innerHTML=fb$1(b);}),S("\u2192",t("pptx.notes.indent"),()=>{b=jb$1(d,b,"indent").segments,d.innerHTML=fb$1(b);}),S("\u2190",t("pptx.notes.outdent"),()=>{b=jb$1(d,b,"outdent").segments,d.innerHTML=fb$1(b);}),S("\u2197",t("pptx.notes.insertLink"),()=>{let y=e.getSelection()?.toString()??"",P=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!P)return;let T=window.prompt(t("pptx.notes.linkDisplayText"),y)??y;mb$1(lb$1(P),T);}),m.addEventListener("click",()=>{v?(A(),u.value=eb$1(b)):(b=db$1(u.value),d.innerHTML=fb$1(b)),E(!v);});let h=()=>{f&&o(u.value);};u.addEventListener("change",h),u.addEventListener("blur",h),d.addEventListener("blur",A);let C=()=>{r.dataset.collapsed=x?"false":"true",i.setAttribute("aria-expanded",String(x)),p.hidden=!x,s.textContent=x?"\u25BE":"\u25B8";};return C(),E(v),{el:r,update({slide:y,editable:P}){f=P;let T=y!==void 0;u.disabled=!T,u.readOnly=!f,d.contentEditable=String(f&&T),l.hidden=!f,u.placeholder=t(T?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let w=y?.id??null;w!==g&&(g=w,b=gb$1(y),u.value=eb$1(b),d.innerHTML=fb$1(b));},setExpanded(y){x=y,C();}}}function Nn(e,t,n,o){let r=uf$1(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=M(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!ze$1("navigation",o),s=a?M(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,p=a?M(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=uf$1(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let m of [i.btn,s?.btn,p?.btn])m?.addEventListener("pointerdown",d=>d.stopPropagation()),m?.addEventListener("click",d=>d.stopPropagation());return r.append(i.btn,...s?[s.btn]:[],...p?[p.btn]:[],l),{el:r,update(m,d){let u=xd$1(m,d);s?.setDisabled(u.previousDisabled),p?.setDisabled(u.nextDisabled),l.textContent=u.counterLabel;}}}function dc(e){if(!e.trim())return "";try{let t=R(e),n=Q(t);return n?nb$1(n):""}catch{return ""}}function cc(e,t,n){let o=uf$1(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=uf$1(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=uf$1(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=uf$1(e,"header","pptxv-eqdlg-header"),s=uf$1(e,"h2");s.textContent=t("pptx.equation.insertTitle");let p=uf$1(e,"button","pptxv-eqdlg-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),a.append(s,p);let l=uf$1(e,"div","pptxv-eqdlg-preview"),m=uf$1(e,"label","pptxv-eqdlg-field"),d=uf$1(e,"span","pptxv-eqdlg-label");d.textContent=t("pptx.equation.latexInput");let u=e.createElement("textarea");u.className="pptxv-eqdlg-input",u.rows=3,u.placeholder="\\frac{a}{b} + \\sqrt{c}",u.spellcheck=false;let x=uf$1(e,"span","pptxv-eqdlg-hint");x.textContent=t("pptx.equation.latexHint"),m.append(d,u,x);let g=uf$1(e,"div","pptxv-eqdlg-field"),f=uf$1(e,"span","pptxv-eqdlg-label");f.textContent=t("pptx.equation.templates");let v=uf$1(e,"div","pptxv-eqdlg-grid"),b=[];for(let I of T){let H=uf$1(e,"button","pptxv-eqdlg-template");H.type="button",H.title=t(I.i18nKey);let D=uf$1(e,"span","pptxv-eqdlg-template-math");D.innerHTML=dc(I.latex);let O=uf$1(e,"span","pptxv-eqdlg-template-label");O.textContent=t(I.i18nKey),H.append(D,O),H.addEventListener("click",()=>{u.value=I.latex,P(),u.focus();}),v.appendChild(H),b.push(H);}g.append(f,v);let E=()=>{let I=u.value.trim();if(!I)return null;try{let H=R(I);return Object.keys(H).length>0?H:null}catch{return null}},A=true,S$1,h=uf$1(e,"footer","pptxv-eqdlg-footer"),C=M(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>w(false)}),y=M(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let I=E();I&&(n(I,S$1),u.value="",P(),w(false));}});y.btn.classList.add("is-primary"),h.append(C.btn,y.btn),i.append(a,l,m,g,h),o.append(r,i);let P=()=>{let I=dc(u.value);I?(l.classList.remove("is-empty"),l.innerHTML=I):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let H=u.value;for(let[D,O]of b.entries())O.classList.toggle("is-active",T[D]?.latex===H);y.setDisabled(!A||E()===null);};u.addEventListener("input",P),o.addEventListener("keydown",I=>{I.stopPropagation(),I.key==="Escape"?w(false):I.key==="Enter"&&(I.ctrlKey||I.metaKey)&&(I.preventDefault(),y.btn.click());}),r.addEventListener("click",()=>w(false)),p.addEventListener("click",()=>w(false));let T$1=false,w=I=>{T$1=I,o.hidden=!T$1,T$1?u.focus():S$1=void 0;},k=()=>{let I=S$1!==void 0,H=t(I?"pptx.equation.editTitle":"pptx.equation.insertTitle"),D=t(I?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",H),s.textContent=H,y.btn.textContent=D,y.btn.title=D,y.btn.setAttribute("aria-label",D);};return P(),{el:o,toggle:()=>{T$1||(S$1=void 0,u.value="",k(),P()),w(!T$1);},setOpen:w,isOpen:()=>T$1,setEditable(I){A=I,u.disabled=!I,y.setDisabled(!I||E()===null);},openEdit(I,H){S$1=I,u.value=S(H),k(),P(),w(true);}}}function zn(e,t,n){let o=uf$1(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=uf$1(e,"label","pptxv-findreplace-checkbox"),s=e.createElement("input");s.type="checkbox",s.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(s,e.createTextNode(t("pptx.findReplace.matchCase")));let p=uf$1(e,"span","pptxv-findreplace-status");p.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,s.checked);p.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},m=M(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),d=M(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,s.checked),l();}}),u=M(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,s.checked),l();}}),x=M(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.stopPropagation(),b.key==="Escape"&&v(false);}),i.addEventListener("keydown",b=>b.stopPropagation());let g=uf$1(e,"div","pptxv-findreplace-row");g.append(r,i,a,m.btn,d.btn,u.btn,x.btn),o.append(g,p);let f=false,v=b=>{f=b,o.hidden=!f,f&&r.focus();};return {el:o,toggle:()=>v(!f),setOpen:v,isOpen:()=>f,setEditable(b){i.disabled=!b,d.setDisabled(!b),u.setDisabled(!b);}}}function mc(e,t,n){let o=uf$1(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=Fe(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:d=>n.setSlideBackgroundColor(d)},"#ffffff"),i=M(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=M(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),s=uf$1(e,"div","pptxv-format-background-row"),p=uf$1(e,"span","pptxv-format-background-label");p.textContent=t("pptx.slideBackground.colour"),s.append(p,r.el,i.btn,a.btn),o.appendChild(s);let l=false,m=d=>{l=d,o.hidden=!l;};return {el:o,toggle:()=>m(!l),setOpen:m,isOpen:()=>l,setEditable(d){r.setDisabled(!d),i.setDisabled(!d);}}}var eg=24,tg=1,og=400;function se(e){return e!==void 0&&b(e)}function io(e){return e!==void 0&&c(e)}function Ee(e){let t=se(e)?e.textStyle:void 0,n=se(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??eg,fontFamily:t?.fontFamily??n?.fontFamily,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Le(e,t){if(!se(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function je(e,t){let n=Ee(e);return Le(e,{[t]:!n[t]})}function ao(e,t){let n=Math.min(og,Math.max(tg,Math.round(t)));return Le(e,{fontSize:n})}function Gn(e,t){return ao(e,Ee(e).fontSize+t)}function _n(e,t){return Le(e,{color:t})}function Un(e,t){return Le(e,{highlightColor:t})}function Te(e,t){return io(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function Wn(e,t){return Le(e,{fontFamily:t})}function $n(e,t){return Le(e,{characterSpacing:t})}var ng={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function qn(e){let t=Ee(e).hasTextShadow;return Le(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:ng)}function Kn(e,t){if(!se(e)||!e.textSegments)return {};let n=Ab$1(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function jn(e){return Le(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var rg=[{edge:"left",icon:"align-left"},{edge:"centerH",icon:"align-center"},{edge:"right",icon:"align-right"},{edge:"top",icon:"align-top"},{edge:"middle",icon:"align-middle"},{edge:"bottom",icon:"align-bottom"}];function uc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.arrange"),o.appendChild(i);let a=M(e,{label:t("pptx.arrange.bringToFront"),icon:"bring-front",onClick:n.bringToFront}),s=M(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),p=M(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),l=M(e,{label:t("pptx.arrange.sendToBack"),icon:"send-back",onClick:n.sendToBack}),m=rg.map(A=>M(e,{label:t("pptx.arrange.align",{direction:A.edge}),icon:A.icon,onClick:()=>n.alignElements(A.edge)})),d=M(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),u=M(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),x=M(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),g=M(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),f=M(e,{label:t("pptx.ribbon.group"),icon:"group",onClick:n.groupSelected}),v=M(e,{label:t("pptx.ribbon.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),b=M(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",onClick:n.duplicate}),E=M(e,{label:t("pptx.arrange.delete"),icon:"trash",onClick:n.delete});return r.append(a.btn,s.btn,p.btn,l.btn,...m.map(A=>A.btn),d.btn,u.btn,x.btn,g.btn,f.btn,v.btn,b.btn,E.btn),{el:o,update({editable:A,hasSelection:S,isGroup:h,selectedCount:C}){let y=A&&S;for(let P of [a,s,p,l,...m,x,g,b,E])P.setDisabled(!y);d.setDisabled(!A||C<3),u.setDisabled(!A||C<3),f.setDisabled(!A||C<2),v.setDisabled(!y||!h);}}}function xc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=M(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),s=M(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),p=M(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=M(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,s.btn,p.btn,l.btn),{el:o,update({hasSelection:m,hasClipboard:d,editable:u,formatPainterActive:x}){a.setDisabled(!u||!d),s.setDisabled(!u||!m),p.setDisabled(!m),l.setDisabled(!u||!m&&!x),l.btn.dataset.active=String(x);}}}function gc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=M(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),s=M(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace});return r.append(a.btn,s.btn),{el:o}}function J(e,t){let n=uf$1(e,"div","pptxv-dropdown"),o=uf$1(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=uf$1(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(Df(e,t.icon??"chevron-down")),n.appendChild(o);let i=uf$1(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,s,p=new Map,l=d=>{a=d,i.hidden=!d,o.setAttribute("aria-expanded",String(d)),o.classList.toggle("is-active",d);},m=()=>{for(let[d,u]of p){let x=s!==void 0&&u===s;d.classList.toggle("is-selected",x),d.setAttribute("aria-selected",String(x));}};for(let d of t.items){let u=uf$1(e,"button","pptxv-dropdown-item");u.type="button",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.textContent=d.label,d.style&&Object.assign(u.style,d.style),u.addEventListener("click",()=>{l(false),t.onSelect(d.value);}),i.appendChild(u),p.set(u,d.value);}return o.addEventListener("click",d=>{d.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",d=>{a&&!n.contains(d.target)&&l(false);}),{el:n,setDisabled(d){o.disabled=d,d&&l(false);},setTriggerText(d){r.textContent=d;},setSelected(d){s=d,m();},close:()=>l(false)}}var Ye=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function ig(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Xe(e,t,n){let o=uf$1(e,"div","pptxv-swatch-picker"),r=uf$1(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(Df(e,n.icon));let i=uf$1(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=uf$1(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let s=uf$1(e,"div","pptxv-swatch-grid");a.appendChild(s);let p=n.fallback,l=new Map,m=()=>{for(let[f,v]of l)f.classList.toggle("is-selected",v===p);i.style.backgroundColor=p;},d=false,u=f=>{d=f,a.hidden=!f,r.setAttribute("aria-expanded",String(f)),r.classList.toggle("is-active",f);};for(let f of n.swatches){let v=uf$1(e,"button","pptxv-swatch");v.type="button",v.setAttribute("data-pptx-compact",""),v.style.backgroundColor=f,v.setAttribute("aria-label",f),v.addEventListener("click",()=>{u(false),n.onSelect(f);}),s.appendChild(v),l.set(v,f);}let x=uf$1(e,"label","pptxv-swatch-custom");x.textContent=t("pptx.ribbon.customColour");let g=e.createElement("input");return g.type="color",g.className="pptxv-swatch-custom-input",g.addEventListener("input",()=>n.onSelect(g.value)),x.appendChild(g),a.appendChild(x),r.addEventListener("click",f=>{f.stopPropagation(),u(!d);}),e.addEventListener("pointerdown",f=>{d&&!o.contains(f.target)&&u(false);}),m(),{el:o,setValue(f){p=ig(f,n.fallback),g.value=p,m();},setDisabled(f){r.disabled=f,f&&u(false);}}}var bc=2;function fc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=J(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:Ld$1.map(C=>({label:C,value:C,style:{fontFamily:C}})),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let s=J(e,{triggerLabel:t("pptx.textPanel.size"),triggerText:"24",items:Md$1.map(C=>({label:String(C),value:C})),onSelect:n.setFontSize});s.el.classList.add("pptxv-font-size-dd");let p=M(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=M(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),m=M(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),d=M(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),u=M(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),x=M(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-bc)}),g=M(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(bc)}),f=M(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),v=J(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:Nd$1.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.setCharacterSpacing});v.el.querySelector(".pptxv-dropdown-text")?.remove();let b=J(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:Pd$1.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let E=Xe(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:Ye,fallback:"#000000",onSelect:n.setTextColor}),A=Xe(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:Ye,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,s.el,x.btn,g.btn,p.btn,l.btn,m.btn,d.btn,u.btn,f.btn,v.el,b.el,E.el,A.el);let S=[p,l,m,d],h=[a,s,x,g,p,l,m,d,u,f,v,b,E,A];return {el:o,update({canFormat:C,editable:y,text:P}){p.setActive(P.bold),l.setActive(P.italic),m.setActive(P.underline),d.setActive(P.strikethrough),u.setActive(P.hasTextShadow),a.setTriggerText(P.fontFamily??"Segoe UI"),a.setSelected(P.fontFamily),s.setTriggerText(String(P.fontSize)),s.setSelected(P.fontSize),E.setValue(P.color),A.setValue(P.highlightColor);for(let T of h)T.setDisabled(!y||!C);for(let T of S)(!y||!C)&&T.setActive(false);}}}var vc=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function hc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=M(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),s=M(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),p=M(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=M(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),m=vc.map(x=>M(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTextAlign(x.align)})),d=J(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:Od$1.map(x=>({label:x.label,value:x.value})),onSelect:n.setLineSpacing});d.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,s.btn,p.btn,l.btn,...m.map(x=>x.btn),d.el);let u=[a,s,p,l,...m,d];return {el:o,update({canFormat:x,editable:g,text:f}){a.setActive(f.listType==="bullet"),s.setActive(f.listType==="numbered");for(let[v,b]of vc.entries())m[v].setActive(f.align===b.align);d.setSelected(f.lineSpacing);for(let v of u)v.setDisabled(!g||!x);}}}function yc(e,t,n){let o=uf$1(e,"div","pptxv-primary-menu pptxv-layout-menu");o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};return e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);}),{el:o,setItems(a){o.replaceChildren();for(let s of a){let p=uf$1(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.name,p.addEventListener("click",()=>{i(false),n(s);}),o.appendChild(p);}},toggle:()=>i(!r),close:()=>i(false)}}function Sc(e,t,n){let o=uf$1(e,"div","pptxv-rgroup"),r=uf$1(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=uf$1(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=uf$1(e,"div","pptxv-slides-split"),s=M(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),p=uf$1(e,"button","pptxv-slides-caret");p.type="button",p.title=t("pptx.home.chooseLayout"),p.setAttribute("aria-label",t("pptx.home.chooseLayout")),p.setAttribute("aria-haspopup","menu"),p.appendChild(Df(e,"chevron-down"));let l=yc(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));p.addEventListener("click",f=>{f.stopPropagation(),l.toggle();}),a.append(s.btn,p,l.el);let m=uf$1(e,"div","pptxv-slides-menu-host"),d=M(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>u.toggle()});d.btn.setAttribute("aria-haspopup","menu");let u=yc(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));m.append(d.btn,u.el);let x=M(e,{label:t("pptx.sections.resetSlideTitle"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide}),g=M(e,{label:t("pptx.sections.addSection"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return r.append(a,m,x.btn,g.btn),{el:o,update({editable:f,slideCount:v,layouts:b}){let E=b.length>0;l.setItems(b),u.setItems(b),s.setDisabled(!f),p.hidden=!E,p.disabled=!f,d.setDisabled(!f||!E),x.setDisabled(!f||v===0),g.setDisabled(!f||v===0),f||(l.close(),u.close());}}}function Cc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=xc(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=Sc(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName"))}),s=fc(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),p=hc(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing}),l=uc(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,duplicate:r.duplicateSelected,delete:r.deleteSelected}),m=gc(e,t,{toggleFindReplace:n.onToggleFindReplace});return o.append(i.el,a.el,s.el,p.el,m.el,l.el),{el:o,update({editable:d,selectedElement:u,hasClipboard:x,slideCount:g,selectedCount:f,formatPainterActive:v,layouts:b}){let E=se(u),A=Ee(u);i.update({hasSelection:u!==void 0,hasClipboard:x,editable:d,formatPainterActive:v}),a.update({editable:d,slideCount:g,layouts:b}),s.update({canFormat:E,editable:d,text:A}),p.update({canFormat:E,editable:d,text:A}),l.update({editable:d,hasSelection:u!==void 0,isGroup:u?.type==="group",selectedCount:f});}}}function Yn(e,t,n,o){let r=uf$1(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=s=>{i=s,r.hidden=!s,o?.(s);};for(let s of n){s.separatorBefore&&r.appendChild(uf$1(e,"div","pptxv-primary-menu-sep"));let p=uf$1(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.label,p.addEventListener("click",()=>{a(false),s.run();}),r.appendChild(p);}return e.addEventListener("pointerdown",s=>{i&&!r.parentElement?.contains(s.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function wc(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return ze$1("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function Ec(e,t,n){let{file:o,nav:r}=t,i=[];return ze$1("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function Tc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-primary"),i=M(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=uf$1(e,"div","pptxv-present-split"),s=uf$1(e,"button","pptxv-present-main");s.type="button",s.title=t("pptx.present.presentTooltip"),s.textContent=t("pptx.toolbar.present"),s.addEventListener("click",()=>n.slideShow.startFromCurrent());let p=uf$1(e,"button","pptxv-present-caret");p.type="button",p.title=t("pptx.present.optionsTooltip"),p.setAttribute("aria-label",t("pptx.present.optionsTooltip")),p.setAttribute("aria-haspopup","menu"),p.appendChild(Df(e,"chevron-down"));let l=Yn(e,t("pptx.present.optionsTooltip"),wc(t,n,o),v=>{p.classList.toggle("is-active",v),p.setAttribute("aria-expanded",String(v));});p.addEventListener("click",v=>{v.stopPropagation(),l.toggle();}),a.append(s,p,l.el),r.appendChild(a);let m=uf$1(e,"button","pptxv-show-btn");m.type="button",m.title=t("pptx.customShows.createTooltip"),m.textContent="+ Show",m.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(m),r.appendChild(uf$1(e,"span","pptxv-primary-sep"));let d=M(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(d.btn);let u=M(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(u.btn);let x=uf$1(e,"div","pptxv-primary-menu-host"),g=Yn(e,t("pptx.ribbon.moreActions"),Ec(t,n,o)),f=M(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>g.toggle()});return f.btn.setAttribute("aria-haspopup","menu"),f.btn.addEventListener("pointerdown",v=>v.stopPropagation()),x.append(f.btn,g.el),r.appendChild(x),{el:r,setEditState({editable:v}){r.hidden=!v,v||(l.close(),g.close());},setAutosaveStatus(){},setInspectorOpen(v){d.setActive(v);}}}var dt=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],so="home";function Xn(e,t,n,o,r){let i=uf$1(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,s=new Map;for(let p of Ae(dt,o)){let l=uf$1(e,"button","pptxv-ribbon-tab");p.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let m=t(p.labelKey);l.textContent=m,l.addEventListener("click",()=>n(p.id)),i.appendChild(l),a.set(p.id,l),s.set(p.id,m);}if(r){i.appendChild(uf$1(e,"span","pptxv-tabrow-spacer"));let p=uf$1(e,"div","pptxv-tabrow-actions");if(!ze$1("record",o)){let l=uf$1(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let m=uf$1(e,"span","pptxv-tabrow-record-dot");m.setAttribute("aria-hidden","true");let d=uf$1(e,"span");d.textContent=t("pptx.titleBar.record"),l.append(m,d),l.addEventListener("click",()=>r.startRecording()),p.appendChild(l);}i.appendChild(p);}return {el:i,setActive(p){for(let[l,m]of a){let d=l===p;m.classList.toggle("is-active",d),m.setAttribute("aria-selected",String(d));}},setHiddenTabs(p){for(let[l,m]of a)m.hidden=l!=="file"&&p.has(l);},applyScreenTips(p){for(let[l,m]of a){let d=p(s.get(l)??"");d?m.title=d:m.removeAttribute("title");}}}}function ct(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function mt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");for(let a of o){let s=e.createElement("option");s.value=a,s.textContent=t(`${n}.${a}`),i.appendChild(s);}return r.appendChild(i),{label:r,select:i}}function Pc(e,t,n,o,r,i,a,s){let p=uf$1(e,"div","pptxv-animation-timeline-row");p.draggable=a,p.addEventListener("dragstart",x=>x.dataTransfer?.setData("text/plain",n.elementId)),p.addEventListener("dragover",x=>x.preventDefault()),p.addEventListener("drop",x=>{x.preventDefault();let g=x.dataTransfer?.getData("text/plain");g&&s.moveAnimation(g,o);}),p.classList.toggle("is-selected",n.elementId===i);let l=uf$1(e,"span","pptxv-animation-timeline-name"),m=n.entrance??n.emphasis??n.exit??"custom";l.textContent=`${o+1}. ${m}`;let d=M(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>s.reorderAnimation(n.elementId,"up")}),u=M(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>s.reorderAnimation(n.elementId,"down")});return d.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),p.append(l,d.btn,u.btn),p}var ag=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:V},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:X},{group:"exit",labelKey:"pptx.animation.exit",presets:W}];function Ac(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=[];for(let y of ag){let P=uf$1(e,"div","pptxv-rgroup"),T=uf$1(e,"span","pptxv-rgroup-label");T.textContent=t(y.labelKey),P.appendChild(T);let w=uf$1(e,"div","pptxv-animation-gallery");for(let k of y.presets){let I=M(e,{label:t(`pptx.animation.preset.${k}`),text:t(`pptx.animation.preset.${k}`),onClick:()=>n.addAnimation(y.group,k)});w.appendChild(I.btn),r.push(I);}P.appendChild(w),o.appendChild(P);}let i=M(e,{label:t("pptx.animation.remove"),text:t("pptx.animation.remove"),onClick:()=>n.removeAnimation()});o.appendChild(i.btn),r.push(i);let a=uf$1(e,"div","pptxv-animation-timeline"),s=uf$1(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.animation.timeline");let p=uf$1(e,"div","pptxv-animation-timeline-list"),l=uf$1(e,"div","pptxv-animation-timing-controls"),m=e.createElement("select");m.setAttribute("aria-label",t("pptx.animation.trigger"));let d=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let y of d){let P=e.createElement("option");P.value=y,P.textContent=t(`pptx.animation.trigger.${y}`),m.appendChild(P);}let u=ct(e,t("pptx.animation.duration"),500),x=ct(e,t("pptx.animation.delay"),0),g=mt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),f=mt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),v=mt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),b=mt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),E=ct(e,t("pptx.animation.repeatCount"),1),A=ct(e,t("pptx.animations.triggerShape"),0);A.input.type="text",A.input.min="",A.input.max="";let S=M(e,{label:t("pptx.animation.preview"),text:t("pptx.animation.preview"),onClick:()=>{if(!h)return;e.querySelector(`[data-element-id="${CSS.escape(h.elementId)}"]`)?.animate([{opacity:0,transform:"translateY(12px)"},{opacity:1,transform:"translateY(0)"}],{duration:h.durationMs??500,easing:"ease"});}});l.append(m,u.label,x.label,g.label,f.label,v.label,E.label,b.label,A.label,S.btn),a.append(s,p,l),o.appendChild(a);let h,C=()=>{h&&n.setAnimationTiming(h.elementId,{trigger:m.value,durationMs:u.input.valueAsNumber,delayMs:x.input.valueAsNumber,direction:g.select.value,sequence:f.select.value,timingCurve:v.select.value,repeatCount:E.input.valueAsNumber,repeatMode:b.select.value,triggerShapeId:A.input.value});};for(let y of [m,g.select,f.select,v.select,b.select])y.addEventListener("change",C);return u.input.addEventListener("change",C),x.input.addEventListener("change",C),E.input.addEventListener("change",C),A.input.addEventListener("change",C),{el:o,update({editable:y,hasSelection:P,selectedElementId:T,animations:w}){let k=!y||!P;for(let H of r)H.setDisabled(k);let I=[...w].sort((H,D)=>(H.order??0)-(D.order??0));h=I.find(({elementId:H})=>H===T),p.replaceChildren(...I.map((H,D)=>Pc(e,t,H,D,I.length,T,y,n))),a.hidden=I.length===0,l.hidden=!h,m.value=h?.trigger??"onClick",A.input.value=h?.triggerShapeId??"",A.label.hidden=m.value!=="onShapeClick",u.input.value=String(h?.durationMs??500),x.input.value=String(h?.delayMs??0),g.select.value=h?.direction??"fromTop",f.select.value=h?.sequence??"asOne",v.select.value=h?.timingCurve??"ease",b.select.value=h?.repeatMode??"none",E.input.value=String(h?.repeatCount??1);for(let H of [m,u.input,x.input,g.select,f.select,v.select,b.select,E.input,A.input])H.disabled=!y;}}}var sg=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:I},{labelKey:"pptx.ribbon.theme.dark",theme:J$1}];function kc(e$1,t,n,o){let r=uf$1(e$1,"div","pptxv-ribbon-tab-content"),i=uf$1(e$1,"div","pptxv-theme-gallery");for(let l of sg){let m=M(e$1,{label:t(l.labelKey),text:t(l.labelKey),onClick:()=>n.setTheme(l.theme)}),d=uf$1(e$1,"span","pptxv-theme-swatch-preview");d.style.background=l.theme?.colors?.primary??"#6b7280",m.btn.prepend(d),i.appendChild(m.btn);}r.appendChild(i);let a=uf$1(e$1,"div","pptxv-theme-gallery pptxv-deck-theme-gallery"),s=e.map(l=>{let m=M(e$1,{label:l.name,text:l.name,onClick:()=>n.applyPresentationTheme(l.id)}),d=uf$1(e$1,"span","pptxv-theme-swatch-preview");return d.style.background=`linear-gradient(135deg, ${l.colorScheme.accent1}, ${l.colorScheme.accent2})`,m.btn.prepend(d),a.appendChild(m.btn),m});r.appendChild(a);let p=M(e$1,{label:t("pptx.ribbon.formatBackground"),text:t("pptx.ribbon.formatBackground"),onClick:o});return r.appendChild(p.btn),{el:r,setEditable(l){p.setDisabled(!l);for(let m of s)m.setDisabled(!l);}}}var pg=[1,2,3,4,6,8,12,16],Ic=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"}];function Lc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=uf$1(e,"div","pptxv-rgroup"),i=uf$1(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=uf$1(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let s=Ic.map(x=>M(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTool(x.tool)}));i.append(...s.map(x=>x.btn)),o.appendChild(r);let p=uf$1(e,"div","pptxv-rgroup"),l=uf$1(e,"div","pptxv-rgroup-row");p.appendChild(l);let m=Xe(e,t,{label:t("pptx.ribbon.penColour"),icon:"pen",swatches:Ye,fallback:"#000000",onSelect:x=>n.setColor(x)}),d=J(e,{triggerLabel:t("pptx.ribbon.strokeWidth"),triggerText:"",icon:"chevron-down",items:pg.map(x=>({label:`${x} px`,value:x})),onSelect:x=>n.setWidth(x)});l.append(m.el,d.el),o.appendChild(p);let u=[...s,m,d];return {el:o,setEditable(x){for(let g of u)g.setDisabled(!x);},update(x){for(let[g,f]of Ic.entries())s[g].setActive(x.tool===f.tool);m.setValue(x.color),d.setSelected(x.width),d.setTriggerText(`${x.width} px`);}}}var Mc="1.7.3";function Dc(e,t,n,o){let r=uf$1(e,"div","pptxv-account");n.appendChild(r);let i={...se$1,...qe$1().profile};r.appendChild(dg(e,t,i,s=>{i=s,xe$1(i);}));let a=uf$1(e,"section","pptxv-account-section");r.appendChild(a),cg(e,t,a),r.appendChild(mg(e,t)),o?.enabled&&r.appendChild(ug(e,t,o));}function dg(e,t,n,o){let r=n,i=uf$1(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let s=uf$1(e,"div","pptxv-account-profile-row"),p=uf$1(e,"span","pptxv-account-avatar"),l=()=>{p.textContent=ue$1(r),p.style.background=r.avatarColor;};l();let m=e.createElement("label");m.className="pptxv-account-name-field";let d=e.createElement("span");d.textContent=t("pptx.account.profile.nameLabel");let u=e.createElement("input");u.type="text",u.placeholder=t("pptx.account.profile.namePlaceholder"),u.value=r.displayName,u.addEventListener("input",()=>{r={...r,displayName:u.value},l(),o(r);}),m.append(d,u),s.append(p,m),i.appendChild(s);let x=e.createElement("p");x.className="pptxv-account-swatch-label",x.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(x);let g=uf$1(e,"div","pptxv-parity-swatch-row"),f=(v,b)=>{r={...r,avatarColor:b},l();for(let E of g.querySelectorAll("button"))E.classList.toggle("is-active",E===v);o(r);};for(let v of te$1){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",v===r.avatarColor),b.style.background=v,b.setAttribute("aria-label",v),b.addEventListener("click",()=>f(b,v)),g.appendChild(b);}return i.appendChild(g),i}function cg(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let s=e.createElement("p");s.className="pptxv-account-notice",s.hidden=true,n.appendChild(s);async function p(){let l=await ve();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:ae(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}p(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await we$1(),s.hidden=false,s.textContent=t("pptx.account.storage.clearedNotice"),await p()))();});}function mg(e,t){let n=uf$1(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:Mc}),n.appendChild(i),n}function ug(e,t,n){let o=uf$1(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let s=e.createElement("p");return s.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(s),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var Ag={back:ArrowLeft,home:Home,new:FilePlus2,open:FolderOpen,info:Info,save:Save,saveAs:Download,print:Printer,share:Share2,export:Upload,close:X$1,account:UserRound,options:Settings},Hc="http://www.w3.org/2000/svg";function Rc(e,t){return ut(e,Ag[t],17)}function ut(e,t,n){let o=e.createElementNS(Hc,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Hc,r);for(let[s,p]of Object.entries(i))p!==void 0&&a.setAttribute(s,String(p));o.appendChild(a);}return o}function Me(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function Zn(e,t,n,o){let r=Me(e,"",n,o);return r.appendChild(Rc(e,t)),r}function Oc(e,t,n,o){let r=Zn(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}function Vc(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-bs-actions"),s=(p,l,m,d)=>{let u=Me(e,"",()=>r(d)),x=e.createElement("b");x.appendChild(ut(e,m,22));let g=e.createElement("span"),f=e.createElement("strong");f.textContent=p;let v=e.createElement("small");return v.textContent=l,g.append(f,v),u.append(x,g),u};return t==="saveAs"&&(a.append(s("PowerPoint Presentation","Save an editable .pptx copy.",FileText,n.save),s("PowerPoint Show","Save a .ppsx slide show.",Presentation,n.saveAsPpsx),s("Package for Sharing","Bundle the deck and linked assets.",Package,n.packageForSharing)),o&&a.append(s("Macro-Enabled Presentation","Preserve VBA in a .pptm file.",FileCode2,n.saveAsPptm))),t==="export"&&!ze$1("export",i)&&a.append(s("Create PDF","Publish one page per slide.",FileText,n.exportPdf),s("Export current slide","Create a high-quality PNG.",Image$1,n.exportPng),s("Create a Video","Export timings and animations.",Video,n.exportVideo),s("Create an Animated GIF","Make a compact looping preview.",Images,n.exportGif),s("Copy as Image","Copy the current slide.",Copy,n.copySlideAsImage)),t==="print"&&a.append(s("Print Presentation","Choose layout and output settings.",Printer,n.print)),t==="share"&&a.append(s("Share with People","Invite others to collaborate on this presentation.",UserPlus,n.openShare),s("Package for Sharing","Download a self-contained package.",Package,n.packageForSharing)),t==="info"&&a.append(s("Version History","Restore or remove the latest recovery snapshot.",Clock3,n.openVersionHistory),s("Document Properties","View and edit presentation metadata and statistics.",Info,n.openDocumentProperties),s("Protect Presentation","Control access and editing preferences.",LockKeyhole,n.openPasswordProtection),s("Embed Fonts","Keep typography consistent across devices.",Type,n.openFontEmbedding),s("Digital Signatures","View signatures attached to this presentation.",BadgeCheck,n.openDigitalSignatures)),a}function Nc(e,t,n,o,r,i){let a=uf$1(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label","File");let s=e.createElement("aside"),p=Zn(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label","Back to presentation");let l=e.createElement("nav");s.append(p,l);let m=e.createElement("main");a.append(s,m);let d="home",u=false,x="",g=[];(async()=>(g=await Zd$1(),C()))();function f(y){y?.(),y&&o();}function v(y){if(y==="close")return o();if(y==="save")return f(n.save);if(y==="options")return f(n.openSettings);d=y,C();}function b(){l.replaceChildren();for(let y of Wd$1){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let P=Oc(e,y.id,y.label,()=>v(y.id));P.classList.toggle("active",d===y.id),l.appendChild(P);}}function E(){let y=e.createElement("h2");y.textContent="New";let P=uf$1(e,"div","pptxv-bs-templates");for(let T of Xd$1){let w=Me(e,"",()=>f(()=>n.createPresentation(T.id))),k=e.createElement("b");k.style.background=T.preview;let I=e.createElement("strong");I.textContent=T.name;let H=e.createElement("small");H.textContent=T.description,w.append(k,I,H),P.appendChild(w);}m.append(y,P);}function A(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder="Search recent presentations",y.value=x,y.addEventListener("input",()=>{x=y.value,C();}),m.appendChild(y),d==="open"&&m.appendChild(Me(e,"Browse this device",()=>f(n.openFile),"pptxv-bs-primary"));let P=e.createElement("h2");P.textContent="Recent";let T=uf$1(e,"div","pptxv-bs-recent"),w=e.createElement("header");w.innerHTML="<span>Name</span><span>Date modified</span><span>Size</span>",T.appendChild(w);let k=x.trim().toLowerCase(),I=k?g.filter(H=>`${H.name} ${H.location}`.toLowerCase().includes(k)):g;for(let H of I){let D=Me(e,"",()=>f(()=>n.openRecentFile(H.key))),O=uf$1(e,"span","name"),L=e.createElement("b");L.textContent="P";let R=e.createElement("span"),B=e.createElement("strong");B.textContent=H.name;let F=e.createElement("small");F.textContent=H.location,R.append(B,F),O.append(L,R);let V=e.createElement("span");V.textContent=$d$1(H.timestamp);let N=e.createElement("span");N.textContent=ae(H.size),D.append(O,V,N),T.appendChild(D);}if(!I.length){let H=e.createElement("p");H.textContent="No recent presentations yet.",T.appendChild(H);}m.append(P,T);}function S(){m.appendChild(Vc(e,d,n,u,f,r));}function h(){let y=uf$1(e,"section","pptxv-bs-card"),P=e.createElement("b");P.appendChild(ut(e,Settings,24));let T=e.createElement("h2");T.textContent="PowerPoint Options";let w=e.createElement("p");w.textContent="Configure autosave, proofing, grid, rulers, language, theme, and keyboard shortcuts.",y.append(P,T,w),y.appendChild(Me(e,"Open Options",()=>f(n.openSettings),"pptxv-bs-primary")),m.appendChild(y);}function C(){b(),m.replaceChildren();let y=e.createElement("h1");y.textContent=d==="home"?"Good evening":Wd$1.find(T=>T.id===d)?.label??"Home",m.appendChild(y),(d==="home"||d==="new")&&E(),(d==="home"||d==="open")&&A(),["info","saveAs","print","share","export"].includes(d)&&S(),d==="options"&&h(),d==="account"&&Dc(e,t,m,i);let P=e.createElement("footer");P.textContent="Presentation \xB7 Saved to this browser",m.appendChild(P);}return C(),{el:a,setHasMacros(y){u=y,d==="saveAs"&&C();}}}function zc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:Sc$1.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Gc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.chart"),triggerText:t("pptx.ribbon.chart"),items:zd$1.map(i=>({label:i.label,value:i.type})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertChart")),o}var _g=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function _c(e,t,n){let o=J(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:_g.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function Uc(e,t,n){let o=uf$1(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=uf$1(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=uf$1(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=uf$1(e,"div","pptxv-smartart-dialog-header"),s=uf$1(e,"h2");s.textContent=t("pptx.smartart.insertTitle");let p=uf$1(e,"button","pptxv-smartart-dialog-close");p.type="button",p.setAttribute("aria-label",t("pptx.smartart.close")),p.textContent="\xD7",a.append(s,p);let l=uf$1(e,"div","pptxv-smartart-dialog-body"),m=uf$1(e,"nav","pptxv-smartart-categories");m.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let d=uf$1(e,"div","pptxv-smartart-gallery"),u=uf$1(e,"div","pptxv-smartart-options");u.setAttribute("role","listbox"),u.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),d.appendChild(u),l.append(m,d);let x=uf$1(e,"div","pptxv-smartart-dialog-footer"),g=uf$1(e,"button","pptxv-smartart-dialog-cancel");g.type="button",g.textContent=t("pptx.smartart.cancel");let f=uf$1(e,"button","pptxv-smartart-dialog-insert");f.type="button",f.textContent=t("pptx.smartart.insert"),f.disabled=true,x.append(g,f),i.append(a,l,x),o.append(r,i);let v="list",b,E=null;function A(T){b=T,f.disabled=false;for(let w of u.querySelectorAll('[role="option"]')){let k=w.dataset.layout===T.layout;w.setAttribute("aria-selected",String(k)),w.classList.toggle("is-selected",k);}}function S(T){T&&(n(T.layout,T.defaultItems),y());}function h(){u.replaceChildren();for(let T of Tc$1.filter(w=>w.category===v)){let w=uf$1(e,"button","pptxv-smartart-option");w.type="button",w.dataset.layout=T.layout,w.setAttribute("role","option"),w.setAttribute("aria-selected",String(b?.layout===T.layout)),w.classList.toggle("is-selected",b?.layout===T.layout);let k=uf$1(e,"span","pptxv-smartart-option-preview");k.setAttribute("aria-hidden","true"),k.appendChild(Df(e,"smart-art"));let I=uf$1(e,"span","pptxv-smartart-option-label");I.textContent=t(T.labelKey),w.append(k,I),w.addEventListener("click",()=>A(T)),w.addEventListener("dblclick",()=>S(T)),u.appendChild(w);}}function C(T){v=T,b=void 0,f.disabled=true;for(let w of m.querySelectorAll("button")){let k=w.dataset.category===T;w.classList.toggle("is-active",k),w.setAttribute("aria-pressed",String(k));}h();}for(let T of Uc$1){let w=uf$1(e,"button","pptxv-smartart-category");w.type="button",w.dataset.category=T.id,w.textContent=t(T.labelKey),w.addEventListener("click",()=>C(T.id)),m.appendChild(w);}C(v);function y(){o.hidden||(o.hidden=true,E?.focus(),E=null);}function P(T){if(T.key==="Escape"){T.preventDefault(),y();return}if(T.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let k=w[0],I=w[w.length-1];T.shiftKey&&e.activeElement===k?(T.preventDefault(),I.focus()):!T.shiftKey&&e.activeElement===I&&(T.preventDefault(),k.focus());}return r.addEventListener("click",y),p.addEventListener("click",y),g.addEventListener("click",y),f.addEventListener("click",()=>S(b)),o.addEventListener("keydown",P),{el:o,open(T){let w=e.defaultView?.HTMLElement;E=w&&e.activeElement instanceof w?e.activeElement:null,o.parentElement!==T&&T.appendChild(o),o.hidden=false,i.focus();},close:y}}function Wc(e,t,n){let o=Uc(e,t,n),r=M(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}var Ug={square:"square",circle:"circle",database:"database",diamond:"diamond",minus:"minus",moveRight:"move-right",plus:"plus",triangle:"triangle"};function Wg(e){switch(e){case "rotate-45":return "rotate(45deg)";case "rotate-90":return "rotate(90deg)";case "-rotate-90":return "rotate(-90deg)";case "rotate-180":return "rotate(180deg)";case "-skew-x-12":return "skewX(-12deg)";default:return}}function $c(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content");r.classList.add("pptxv-ribbon-insert-content");let i=[],a=M(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),s=M(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),p=M(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),l=M(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});l.btn.title=t("pptx.ribbon.insertMedia");let m=Gc(e,t,v=>n.insertChart(v)),d=Wc(e,t,(v,b)=>n.insertSmartArt(v,b)),u=M(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});u.btn.title=t("pptx.insert.insertEquation");let x=zc(e,t,v=>n.insertActionButton(v)),g=_c(e,t,v=>n.insertField(v));r.append(a.btn,s.btn,p.btn,l.btn,m.el,d.el,u.btn,x.el,g.el),i.push(a,s,p,l,m,d,u,x,g);let f=uf$1(e,"div","pptxv-shape-grid");r.appendChild(f);for(let v of Kd$1){let b=M(e,{label:t(v.i18nKey),icon:Ug[v.glyph]??"square",onClick:()=>n.insert("shape",v.type)}),E=v.glyphClass?Wg(v.glyphClass):void 0;if(E){let A=b.btn.querySelector("svg");A&&(A.style.transform=E);}f.appendChild(b.btn),i.push(b);}return {el:r,setEditable(v){for(let b of i)b.setDisabled(!v);}}}function qc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content"),i=M(e,{label:t("pptx.slideShow.fromBeginningTooltip"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning}),a=M(e,{label:t("pptx.slideShow.fromCurrentTooltip"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent}),s=ze$1("broadcast",o)?null:M(e,{label:t("pptx.slideShow.broadcastTooltip"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast}),p=M(e,{label:t("pptx.slideShow.presenterViewTooltip"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView}),l=M(e,{label:t("pptx.slideShow.setUpTooltip"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp}),m=M(e,{label:t("pptx.slideShow.rehearseTimingsTooltip"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal}),d=M(e,{label:t("pptx.customShows.title"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),u=M(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles}),x=M(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings});return r.append(i.btn,a.btn,p.btn,l.btn,m.btn,d.btn,...s?[s.btn]:[],u.btn,x.btn),{el:r,setSubtitlesVisible:g=>u.setActive(g)}}var $g=[{type:"none",labelKey:"pptx.ribbon.transition.none"},{type:"fade",labelKey:"pptx.ribbon.transition.fade"},{type:"push",labelKey:"pptx.ribbon.transition.push"},{type:"wipe",labelKey:"pptx.ribbon.transition.wipe"},{type:"split",labelKey:"pptx.ribbon.transition.split"},{type:"reveal",labelKey:"pptx.ribbon.transition.reveal"},{type:"cut",labelKey:"pptx.ribbon.transition.cut"},{type:"cover",labelKey:"pptx.ribbon.transition.cover"},{type:"uncover",labelKey:"pptx.ribbon.transition.uncover"}],Kc=.7;function jc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=Kc,i=uf$1(e,"label","pptxv-transition-apply-all"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.ribbon.applyTransitionToAll")),i.append(a,e.createTextNode(t("pptx.ribbon.applyTransitionToAll")));let s=d=>n.applyTransition(d,Math.round(r*1e3),a.checked),p=uf$1(e,"div","pptxv-transition-gallery"),l=$g.map(d=>{let u=M(e,{label:t(d.labelKey),text:t(d.labelKey),onClick:()=>s(d.type)});return p.appendChild(u.btn),u});o.appendChild(p);let m=Y(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:d=>{r=Math.max(0,d);}});return m.setValue(Kc),o.appendChild(m.el),o.appendChild(i),{el:o,setEditable(d){for(let u of l)u.setDisabled(!d);m.setDisabled(!d),a.disabled=!d;}}}function Yc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=uf$1(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=M(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),a=M(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,i.btn,a.btn),o}function Xc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=M(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),i=M(e,{label:t("pptx.headerFooter.title"),text:t("pptx.headerFooter.title"),onClick:n.openHeaderFooter}),a=M(e,{label:t("pptx.ribbon.compareTitle"),text:t("pptx.ribbon.compare"),onClick:n.openCompare}),s=M(e,{label:t("pptx.toolbar.comments"),text:t("pptx.toolbar.comments"),onClick:n.openComments}),p=M(e,{label:t("pptx.hyperlink.editTitle"),text:t("pptx.hyperlink.editTitle"),onClick:n.openHyperlink}),l=M(e,{label:t("pptx.settings.spellCheck"),text:t("pptx.settings.spellCheck"),onClick:n.toggleSpellCheck}),m=M(e,{label:t("pptx.review.language"),text:t("pptx.review.language"),onClick:()=>n.openSettings("general")});return o.append(r.btn,i.btn,a.btn,s.btn,p.btn,l.btn,m.btn),{el:o,setEditable:d=>a.setDisabled(!d)}}function Zc(e,t,n){let o=uf$1(e,"div","pptxv-ribbon-tab-content"),r=M(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),i=M(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),a=M(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")});return o.append(a.btn,r.btn,i.btn),o}function Qc(e,t,n,o){let r=uf$1(e,"div","pptxv-ribbon-tab-content"),i=!ze$1("zoom",o),a=i?M(e,{label:t("pptx.statusBar.zoomOut"),icon:"zoom-out",onClick:n.zoomOut}):null,s=i?M(e,{label:t("pptx.statusBar.zoomIn"),icon:"zoom-in",onClick:n.zoomIn}):null,p=i?M(e,{label:t("pptx.view.zoomToFit"),icon:"fit",onClick:n.zoomToFit}):null,l=ze$1("fullscreen",o)?null:M(e,{label:t("pptx.statusBar.slideShow"),icon:"play",onClick:n.togglePresentation}),m=ze$1("notes",o)?null:M(e,{label:t("pptx.statusBar.toggleNotes"),icon:"notes",onClick:n.toggleNotes}),d=M(e,{label:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),u=M(e,{label:t("pptx.ribbon.templatesOff"),text:t("pptx.ribbon.templatesOff"),onClick:()=>n.toggleTemplateEditing?.()}),x=M(e,{label:t("pptx.master.title"),text:t("pptx.master.title"),onClick:()=>n.toggleMasterView?.()}),g=M(e,{label:t("pptx.view.slideSorterTooltip"),text:t("pptx.slideSorter.title"),onClick:n.openSlideSorter}),f=M(e,{label:t("pptx.selectionPane.title"),text:t("pptx.selectionPane.title"),onClick:n.openSelectionPane}),v=M(e,{label:t("pptx.view.gridlines"),text:t("pptx.view.gridlines"),onClick:()=>n.toggleViewOption("showGrid")}),b=M(e,{label:t("pptx.view.ruler"),text:t("pptx.view.ruler"),onClick:()=>n.toggleViewOption("showRulers")}),E=M(e,{label:t("pptx.view.snapToGrid"),text:t("pptx.view.snapToGrid"),onClick:()=>n.toggleViewOption("snapToGrid")}),A=M(e,{label:t("pptx.view.snapToShape"),text:t("pptx.view.snapToShape"),onClick:()=>n.toggleViewOption("snapToShape")}),S=M(e,{label:t("pptx.view.addHorizontalGuide"),text:t("pptx.view.addHorizontalGuide"),onClick:()=>n.addGuide("h")}),h=M(e,{label:t("pptx.view.addVerticalGuide"),text:t("pptx.view.addVerticalGuide"),onClick:()=>n.addGuide("v")}),C=M(e,{label:t("pptx.ribbon.eyedropper"),text:t("pptx.ribbon.eyedropper"),onClick:n.activateEyedropper});return u.btn.dataset.testid="template-edit-toggle",r.append(...a&&s&&p?[a.btn,s.btn,p.btn]:[],...l?[l.btn]:[],...m?[m.btn]:[],d.btn,u.btn,x.btn,g.btn,f.btn,v.btn,b.btn,E.btn,A.btn,S.btn,h.btn,C.btn),{el:r,setEditable(y){u.setDisabled(!y),x.setDisabled(!y),C.setDisabled(!y);},setTemplateEditing(y){let P=t(y?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");u.btn.textContent=P,u.btn.title=P,u.btn.setAttribute("aria-label",P),u.setActive(y);}}}function po(e,t,n,o,r){let i=uf$1(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=Tc(e,t,n,o);i.append(a.el);let s=Xn(e,t,F=>k(F),o,{startRecording:()=>n.slideShow.startRehearsal()});s.el.hidden=true,i.appendChild(s.el);let p=zn(e,t,n.findReplace);i.appendChild(p.el);let l=cc(e,t,(F,V)=>V?n.edit.updateEquation(V,F):n.insert.insertEquation(F));i.appendChild(l.el);let m=mc(e,t,n.edit);i.appendChild(m.el);let d=F=>ze$1(F,o),u=d("file")?null:Nc(e,t,n.file,()=>k("home"),o,r),x=d("home")?null:Cc(e,t,{edit:n.edit,onToggleFindReplace:()=>p.toggle()}),g=d("insert")?null:$c(e,t,n.insert,()=>l.toggle()),f=d("draw")?null:Lc(e,t,n.draw),v=d("design")?null:kc(e,t,n.design,()=>m.toggle()),b=d("transitions")?null:jc(e,t,n.edit),E=d("animations")?null:Ac(e,t,n.edit),A=d("slideShow")?null:qc(e,t,n.slideShow,o),S=d("record")?null:Yc(e,t,n.slideShow),h=d("review")?null:Xc(e,t,n.nav),C=d("view")?null:Qc(e,t,n.nav,o),y=d("help")?null:Zc(e,t,n.nav),P={file:u?.el,home:x?.el,insert:g?.el,draw:f?.el,design:v?.el,transitions:b?.el,animations:E?.el,slideShow:A?.el,record:S??void 0,review:h?.el,view:C?.el,help:y??void 0},T=Ae(dt,o);for(let F of T){let V=P[F.id];V&&(V.hidden=true,i.appendChild(V));}let w=T.find(F=>F.id===so)?.id??T[0]?.id??so;function k(F){if(P[F]){w=F,s.setActive(F);for(let V of Object.keys(P)){let N=P[V];N&&(N.hidden=V!==F);}}}k(w);let I,H={hasClipboard:false,slideCount:0,selectedCount:0},D=()=>{x?.update({editable:L,selectedElement:I,hasClipboard:H.hasClipboard,formatPainterActive:H.formatPainterActive??false,slideCount:H.slideCount,selectedCount:H.selectedCount??0,layouts:H.layouts??[]});},O=()=>{E?.update({editable:L,hasSelection:I!==void 0,selectedElementId:H.selectedElementId,animations:H.animations??[]});},L=false,R=new Set;return {el:i,update(){},setEditState(F){a.setEditState(F),s.el.hidden=!F.editable;},setNotesExpanded(){},setAutosaveStatus:(F,V)=>a.setAutosaveStatus(F,V),setEditable(F){L=F,h?.setEditable(F),C?.setEditable(F),g?.setEditable(F),f?.setEditable(F),p.setEditable(F),l.setEditable(F),m.setEditable(F),v?.setEditable(F),b?.setEditable(F),D(),O();},setDrawState:F=>f?.update(F),setTemplateEditing:F=>C?.setTemplateEditing(F),setHasMacros:F=>u?.setHasMacros(F),setSubtitlesVisible:F=>A?.setSubtitlesVisible(F),setInspectorOpen:F=>a.setInspectorOpen(F),openEquationEditor:(F,V)=>l.openEdit(F,V),setHiddenOptionTabs:F=>{if(R=new Set(F.filter(V=>V!=="file")),s.setHiddenTabs(R),R.has(w)){let V=R.has("home")?T.find(N=>!R.has(N.id))?.id:"home";V&&k(V);}},applyScreenTips:F=>s.applyScreenTips(F),updateSelection(F,V){I=F,H=V,D(),O();}}}function Jc(e,t,n,o,r){let i=uf$1(e,"div","pptxv-statusbar"),a=()=>{let P=uf$1(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},s=uf$1(e,"span","pptxv-statusbar-counter");s.setAttribute("aria-live","polite");let p=uf$1(e,"span","pptxv-statusbar-text");p.textContent=t("pptx.statusBar.language");let l=uf$1(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(s,a(),p,a(),l),i.appendChild(uf$1(e,"span","pptxv-statusbar-spacer"));let m=false,d="",u="idle",x=()=>{l.textContent=d.length>0?d:t(m?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",u==="saving"),l.classList.toggle("is-error",u==="error");};x();let g=!ze$1("notes",o),f=!ze$1("fullscreen",o),v=!ze$1("zoom",o),b=null;if(g){b=uf$1(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(qg(e,"sticky-note"));let P=uf$1(e,"span");P.textContent=t("pptx.notes.title"),b.appendChild(P),b.addEventListener("click",n.toggleNotes);}let E=M(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});E.btn.setAttribute("data-pptx-compact","");let A=M(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});A.btn.setAttribute("data-pptx-compact","");let S=f?M(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;S?.btn.setAttribute("data-pptx-compact","");let h=null,C=null,y=null;return v&&(h=M(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),h.btn.setAttribute("data-pptx-compact",""),C=uf$1(e,"button","pptxv-statusbar-zoom"),C.type="button",C.title=t("pptx.statusBar.zoomToFit"),C.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),C.setAttribute("data-pptx-compact",""),C.addEventListener("click",n.zoomToFit),y=M(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),E.btn,A.btn,...S?[S.btn]:[],...[],a(),...h&&C&&y?[h.btn,C,y.btn]:[]),{el:i,update({current:P,total:T,zoomPercent:w}){s.textContent=T>0?t("pptx.statusBar.slideOf",{current:P+1,total:T}):t("pptx.statusBar.noSlides"),C&&(C.textContent=`${Math.round(w)}%`);},setNotesExpanded(P){b?.setAttribute("aria-pressed",String(P)),b?.classList.toggle("is-active",P);},setSaveStatus(P,T){d=P,u=T,x();},setDirty(P){m=P,x();},setPresenting(P){E.btn.classList.toggle("is-active",!P),S?.btn.classList.toggle("is-active",P);}}}function qg(e,t){let n=uf$1(e,"span","pptxv-statusbar-icon");return n.appendChild(Kg(e,t)),n}function Kg(e,t){return Df(e,t)}function em(e){let{doc:t,t:n,actions:o}=e,r=Va(e.sections,e.slides);return r.map((i,a)=>{let s=uf$1(t,"section","pptxv-thumb-section"),p=uf$1(t,"header","pptxv-thumb-section-header"),l=uf$1(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(s.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),p.appendChild(l),i.section&&o){let m=uf$1(t,"span","pptxv-thumb-section-actions"),d=(u,x,g,f=false)=>{let v=uf$1(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=u,v.setAttribute("aria-label",u),v.textContent=x,v.disabled=f,v.addEventListener("click",g),m.appendChild(v);};d(n("pptx.sections.rename"),"\u270E",()=>{let u=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);u!=null&&o.rename(i.section.id,u);}),d(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),d(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),d(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),p.appendChild(m);}if(s.appendChild(p),!i.section?.collapsed){let m=uf$1(t,"div","pptxv-thumb-section-slides");i.slides.forEach((d,u)=>m.appendChild(e.buildSlide(d,i.slideIndexes[u]))),s.appendChild(m);}return s})}var xt=128;function Qn(e,t,n,o){let r=uf$1(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=uf$1(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,s=false,p=false,l=()=>{a&&(a.hidden=!s||p);};if(o){a=uf$1(e,"div","pptxv-thumbs-footer"),a.hidden=true;let h=uf$1(e,"button","pptxv-thumbs-add");h.type="button",h.appendChild(Df(e,"plus")),h.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),h.addEventListener("click",()=>o()),a.appendChild(h),r.appendChild(a);}let m=new Map,d=0,u=[],x={width:1,height:1},g=null,f=[],v,b=1,E=false,A=(h,C,y)=>{let P=uf$1(e,"button","pptxv-thumb");P.type="button",P.dataset.slideIndex=String(C),P.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:C+1}));let T=uf$1(e,"span","pptxv-thumb-num");T.textContent=String(C+1);let w=uf$1(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(x.height*y)}px`});return w.appendChild(g(h,y)),P.append(T,w),P.addEventListener("click",()=>n(C)),m.set(C,P),P},S=()=>{if(!g)return;m=new Map;let h=xt/Math.max(x.width,1);if(f.length>0){i.replaceChildren(...em({doc:e,t,sections:f,slides:u,actions:v,buildSlide:(w,k)=>A(w,k,h)})),m.get(d)?.classList.add("is-active");return}let C=E?fe(u.length,b,i.scrollTop,i.clientHeight||600):fe(u.length,b,0,u.length*b,0),y=uf$1(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});E&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${C.offsetY}px`);for(let w=C.startIndex;w<=C.endIndex;w+=1){let k=u[w];k&&y.appendChild(A(k,w,h));}let P=uf$1(e,"div","pptxv-thumbs-space",{position:"relative",height:E?`${C.totalHeight}px`:"auto"});E&&(P.dataset.virtualized="true"),P.appendChild(y),i.replaceChildren(P);let T=m.get(d);T?.classList.add("is-active"),T?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{E&&S();}),{el:r,render(h,C,y,P,T){p=false,l(),u=h,x=C,g=y,f=P??[],v=T;let w=xt/Math.max(C.width,1);b=Math.round(C.height*w)+8,E=!P?.length&&h.length>=ee$1,r.classList.toggle("pptxv-thumbs-virtualized",E),S(),this.setActive(d);},setActive(h){if(d=h,E){let y=h*b,P=y+b,T=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:P>i.scrollTop+T&&(i.scrollTop=Math.max(0,P-T)),S();}m.forEach((y,P)=>{y.classList.toggle("is-active",P===h),P===h?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let C=m.get(h);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"});},setVisible(h){r.hidden=!h;},setAddSlideVisible(h){s=h,l();},renderMasters(h,C,y,P,T){p=true,l(),i.replaceChildren(),m=new Map,E=false,r.classList.remove("pptxv-thumbs-virtualized");let w=xt/Math.max(C.width,1),k=(I,H,D,O)=>{let L=uf$1(e,"button",`pptxv-thumb${O===null?"":" pptxv-master-layout"}`);L.type="button",L.setAttribute("aria-label",H),L.classList.toggle("is-active",T.masterIndex===D&&T.layoutIndex===O),T.masterIndex===D&&T.layoutIndex===O&&L.setAttribute("aria-current","page");let R=uf$1(e,"span","pptxv-thumb-num");R.textContent=H;let B=uf$1(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(C.height*w)}px`});B.appendChild(y(I,w)),L.append(R,B),L.addEventListener("click",()=>P(D,O)),i.appendChild(L);};h.forEach((I,H)=>{k({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),H,null),I.layouts?.forEach((D,O)=>k({id:D.path,rId:"",slideNumber:0,elements:[...I.elements??[],...D.elements??[]],backgroundColor:D.backgroundColor??I.backgroundColor,backgroundImage:D.backgroundImage??I.backgroundImage},D.name||t("pptx.master.layout"),H,O));});}}}function jg(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function tm(e,t,n){let o=uf$1(e,"div","pptxv-cmdsearch"),r=uf$1(e,"div","pptxv-cmdsearch-box");r.appendChild(Df(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=uf$1(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let s=()=>{a.hidden=true,a.replaceChildren();},p=d=>{i.value="",s(),d.run();},l=[],m=()=>{if(l=jg(i.value,n,t),i.value.trim().length===0){s();return}if(a.replaceChildren(),l.length===0){let d=uf$1(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(d);}for(let d of l){let u=uf$1(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",x=>{x.preventDefault(),p(d);}),a.appendChild(u);}a.hidden=false;};return i.addEventListener("input",m),i.addEventListener("focus",m),i.addEventListener("blur",s),i.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?p(l[0]):d.key==="Escape"&&(i.value="",s());}),{el:o}}var Yg={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function om(e,t,n){let o=uf$1(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=uf$1(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=uf$1(e,"span","pptxv-titlebar-autosave"),s=uf$1(e,"span","pptxv-titlebar-autosave-label");s.textContent=t("pptx.titleBar.autoSave");let p=uf$1(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t("pptx.titleBar.toggleAutoSave"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),p.appendChild(uf$1(e,"span","pptxv-titlebar-switch-knob"));let l=uf$1(e,"span","pptxv-titlebar-autosave-label");a.append(s,p,l),o.appendChild(a);let m=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),l.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{i=n.onToggleAutosave(),m(),T();});let d=uf$1(e,"span","pptxv-titlebar-sep");o.appendChild(d);let u=uf$1(e,"span","pptxv-qat");o.appendChild(u);let x=uf$1(e,"span","pptxv-titlebar-sep");o.appendChild(x);let g={editable:true,canUndo:false,canRedo:false},f=null,v=null,b=k=>{k==="save"?n.save():k==="undo"?n.undo():k==="redo"?n.redo():n.quickAccess?.run(k);},E=()=>{u.replaceChildren(),f=null,v=null;let k=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};u.hidden=!k.visible||!g.editable;for(let I of k.commandIds){if((I==="undo"||I==="redo")&&ze$1(I,n.hiddenActions))continue;let H=Ce$1.find(R=>R.id===I);if(!H)continue;let D=t(H.labelKey),O=Yg[H.icon],L=M(e,{label:D,icon:O,text:O===void 0?"Ab":void 0,textLabel:k.showCommandLabels?D:void 0,className:"pptxv-titlebar-btn",onClick:()=>b(I)});if(n.quickAccess){let R=n.quickAccess.screenTip(D);R===void 0?L.btn.removeAttribute("title"):L.btn.title=R;}I==="undo"?(f=L,L.setDisabled(!g.canUndo)):I==="redo"&&(v=L,L.setDisabled(!g.canRedo)),u.appendChild(L.btn);}},A=uf$1(e,"span","pptxv-titlebar-file"),S=uf$1(e,"span","pptxv-titlebar-filename");S.textContent=n.fileName||t(Rd$1);let h=uf$1(e,"span","pptxv-titlebar-dot");h.textContent="\u2022",h.setAttribute("aria-hidden","true");let C=uf$1(e,"span","pptxv-titlebar-status");A.append(S,h,C),o.appendChild(A);let y="idle",P=false,T=()=>{C.textContent=t(Qd$1({autosaveState:y,isDirty:P,autosaveEnabled:i})),C.classList.toggle("is-error",i&&y==="error"),C.classList.toggle("is-saving",i&&y==="saving");},w=uf$1(e,"span","pptxv-titlebar-search");return w.appendChild(tm(e,t,n.commands).el),o.appendChild(w),o.appendChild(uf$1(e,"span","pptxv-titlebar-spacer")),m(),T(),E(),{el:o,setEditState(k){g=k;for(let H of [a,d,x])H.hidden=!k.editable;let I=n.quickAccess?.getState();u.hidden=!k.editable||I?.visible===false,h.hidden=!k.editable,C.hidden=!k.editable,w.hidden=!k.editable,f?.setDisabled(!k.canUndo),v?.setDisabled(!k.canRedo);},setAutosaveState(k){y=k,T();},setDirty(k){P=k,T();},setAutosaveEnabled(k){i=k,m(),T();},refreshQuickAccess:E}}function Jn(e,t,n){let o=uf$1(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false"),o.classList.toggle("pptxv-editable",n.editable);let r=null,i=null;n.showToolbar&&(r=om(e,t,n.titleBar),o.appendChild(r.el),i=po(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,s=n.showToolbar?Bn(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;s&&(s.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(s.el));let p=uf$1(e,"div","pptxv-body");o.appendChild(p);let l=In(e,t,n.onSelectSlide);o.appendChild(l.el);let m=On(e,t);p.appendChild(m.el);let d=null;n.showThumbnails&&(d=Qn(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),p.appendChild(d.el));let u=uf$1(e,"div","pptxv-viewport");u.setAttribute("data-pptx-viewport",""),p.appendChild(u);let x=null;n.showInspector&&(x=ro(e,t,n.inspectorHandlers),x.setEditable(n.editable),p.appendChild(x.el));let g=uf$1(e,"div","pptxv-stage-wrap");u.appendChild(g);let f=uf$1(e,"div","pptxv-empty");f.textContent=t("pptx.statusBar.noSlides"),f.hidden=true,u.appendChild(f);let v=Vn(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(v.el);let b=n.showToolbar?Jc(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;b&&o.appendChild(b.el),a=n.showToolbar?Fn(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let E=Nn(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);E.update(0,0),o.appendChild(E.el);let A=uf$1(e,"div","pptxv-overlay pptxv-loading");A.textContent=t("common.loading"),A.setAttribute("role","status"),A.setAttribute("aria-live","polite"),A.hidden=true,o.appendChild(A);let S=uf$1(e,"div","pptxv-overlay pptxv-error");S.setAttribute("role","alert");let h=uf$1(e,"div","pptxv-error-message");return S.appendChild(h),S.hidden=true,o.appendChild(S),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,masterSidebar:m,thumbnails:d,viewport:u,stageWrap:g,notes:v,statusBar:b,mobileToolbar:s,mobileActionSheets:a,presentationTouchControls:E,setLoading(C){A.hidden=!C,o.setAttribute("aria-busy",String(C));},setError(C){S.hidden=C===null,h.textContent=C??"";},setEmpty(C){f.hidden=!C,g.hidden=C;},setPresenting(C){o.classList.toggle("pptxv-presenting",C);}}}function er(e,t){let n=Pc$1(),o=r=>{let i=r.target;if(!(i&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(i.tagName))){if(t.isPresenting?.()){Xg(r,t,n);return}switch(r.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}r.preventDefault();}};return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o);}}function Xg(e,t,n){if(!Nc$1())return;let o=Qc$1(e,n);if(o.action!=="none")switch(e.preventDefault(),o.action){case "next":t.next();return;case "previous":t.prev();return;case "first":t.first();return;case "last":t.last();return;case "goto":{let r=o.slideNumber-1,i=t.getSlideCount?.()??0;r>=0&&r<i&&t.goToSlide?.(r);return}case "end":t.escape();return;case "pointerTool":t.setPointerTool?.(o.tool==="arrow"?"none":o.tool);return;case "eraseAnnotations":t.eraseAnnotations?.();return;case "toggleInkMarkup":t.toggleInkMarkup?.();return;case "toggleBlackScreen":t.toggleBlank?.("black");return;case "toggleWhiteScreen":t.toggleBlank?.("white");break;}}var Zg=.1,Qg=8;function tr(e,t){let n=wd$1({getScale:t.getScale,minScale:Zg,maxScale:Qg,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:s=>{t.isSwipeEnabled()&&(s===-1?t.onNext():t.onPrevious());}}}),o=s=>n.onTouchStart(s),r=s=>n.onTouchMove(s),i=s=>n.onTouchEnd(s),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function or(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}function nr(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,s=Jn(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:r.autosave??false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:Jg(e),hiddenActions:r.hiddenActions},accountAuth:r.accountAuth,...hd(e)}),p=at(s.root,e.initialTheme??r.theme,[]);n.appendChild(s.root),s.statusBar?.setNotesExpanded(i.get().notesExpanded),s.statusBar?.setDirty(i.get().dirty),s.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),s.titleBar?.setDirty(i.get().dirty);let l=er(s.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation,isPresenting:()=>i.get().presenting,goToSlide:e.goToSlide,getSlideCount:()=>i.get().slides.length,setPointerTool:e.setPresentationPointerTool,eraseAnnotations:e.erasePresentationAnnotations,toggleInkMarkup:e.togglePresentationInkMarkup,toggleBlank:e.togglePresentationBlank}),m=tr(s.root,{getScale:()=>a.effectiveScale(),onPinchZoom:A=>i.set({zoom:A}),isSwipeEnabled:()=>{let A=i.get();return A.presenting||!A.editable},onNext:()=>{let A=i.get();kn({presenting:A.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:A.slides[A.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),d=t.createElement("button");d.type="button",d.setAttribute("data-pptx-end-of-show",""),d.className="pptxv-presentation-end",Object.assign(d.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let u=t.createElement("span");Object.assign(u.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),u.textContent=o("pptx.presentation.endOfSlideShow"),d.appendChild(u),d.addEventListener("click",A=>{A.stopPropagation(),e.next();});let x=()=>{let A=i.get(),S=A.presenting&&A.endOfShow;S&&d.parentElement!==s.root?s.root.appendChild(d):!S&&d.parentElement&&d.remove();},g=i.subscribe(x);x();let f=A=>{let S=i.get();!S.presenting||!(A.target instanceof Element)||A.target.closest('button, a, input, select, textarea, [role="dialog"]')||A.target.closest(".pptxv-stage")&&(kn({presenting:S.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:S.slides[S.currentSlide]})||e.next());};s.root.addEventListener("click",f);let v=()=>{s.root.removeEventListener("click",f),g(),d.remove();},b=or(s.root,A=>{i.set({presenting:A});}),E=null;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),E.observe(s.viewport)),{chrome:s,presentation:b,detachKeyboard:l,detachTouchGestures:m,detachPresentationClick:v,resizeObserver:E,appliedThemeVars:p}}function Jg(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function rr(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function ir(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToSlide(0),goToLastSlide:()=>e.goToSlide(e.getSlideCount()-1),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444"};e.updatePresenterSnapshot({pointer:{...n,tool:t}});},erasePresentationAnnotations:()=>e.updatePresenterSnapshot({inkStrokes:[]}),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t)}}function G(e){if(e.masterViewTarget){if(e.masterViewTab==="notes")return e.notesMaster?.elements??[];if(e.masterViewTab==="handout")return e.handoutMaster?.elements??[];let n=e.slideMasters[e.masterViewTarget.masterIndex];return e.masterViewTarget.layoutIndex===null?n?.elements??[]:n?.layouts?.[e.masterViewTarget.layoutIndex]?.elements??[]}let t=e.slides[e.currentSlide];return t?e.editTemplateMode?e.templateElementsBySlideId[t.id]??[]:t.elements:[]}function j(e,t){if(e.masterViewTarget){if(e.masterViewTab==="notes")return {notesMaster:e.notesMaster?{...e.notesMaster,elements:t}:void 0};if(e.masterViewTab==="handout")return {handoutMaster:e.handoutMaster?{...e.handoutMaster,elements:t}:void 0};let{masterIndex:o,layoutIndex:r}=e.masterViewTarget;return {slideMasters:e.slideMasters.map((i,a)=>a!==o?i:r===null?{...i,elements:t}:{...i,layouts:i.layouts?.map((s,p)=>p===r?{...s,elements:t}:s)})}}let n=e.slides[e.currentSlide];return n?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[n.id]:t}}:{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:t}:o)}:{slides:e.slides}}function te(e,t){return G(e).find(n=>n.id===t)}function ar(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(j(o,G(o).map(s=>s.id===r?{...s,...a}:s))),t.commitChange());}}function sr(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function nm(e,t,n){return e.map((o,r)=>r===t?{...j$1(o),elements:n(o.elements)}:o)}function pr(e,t,n){return nm(e,t,o=>o.filter(r=>r.id!==n))}function lo(e){return e.map(j$1)}function gt(e,t,n){return nm(e,t,o=>[...o,n])}function lr(e,t,n,o){return e.map((r,i)=>i===t?{...j$1(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function oe(e,t,n){return e.map((o,r)=>r===t?{...j$1(o),...n}:o)}function dr(e,t){return e.map(n=>({...j$1(n),...t}))}function cr(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s?.animations?.some(l=>l.elementId===r))return;let p=i(s.animations);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:p})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let l=na(p.animations??[],s,r,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let s=oa(a.animations,i);s.length!==a.animations.length&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{animations:s})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let m=(r==="entrance"?$$1:r==="exit"?aa:ba)(p.animations??[],s,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:m})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let s=[...a];return i.durationMs!==void 0&&(s=ea(s,r,i.durationMs)),i.delayMs!==void 0&&(s=fa(s,r,i.delayMs)),i.trigger!==void 0&&(s=ca(s,r,i.trigger)),i.direction!==void 0&&(s=ha(s,r,i.direction)),i.sequence!==void 0&&(s=ia(s,r,i.sequence)),i.timingCurve!==void 0&&(s=ga(s,r,i.timingCurve)),i.repeatCount!==void 0&&(s=ja(s,r,i.repeatCount)),i.repeatMode!==void 0&&(s=ka(s,r,i.repeatMode)),i.triggerShapeId!==void 0&&(s=da(s,r,i.triggerShapeId||void 0)),s});},reorderAnimation(r,i){o(r,a=>i==="up"?la(a,r):ma(a,r));},moveAnimation(r,i){o(r,a=>{let s=[...a].sort((m,d)=>(m.order??0)-(d.order??0)),p=s.findIndex(m=>m.elementId===r);if(p<0)return s;let[l]=s.splice(p,1);return s.splice(Math.max(0,Math.min(i,s.length)),0,l),s.map((m,d)=>({...m,order:d}))});}}}function rm(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function mr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return rm(e,za(r,n))}function ur(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return rm(e,Aa(r,n))}function xr(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function co(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function gr(e,t,n){return Ma(e,t,n)}function br(e,t,n){return Na(e,t,n)}function fr(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),s=a.selectedElementId,p=G(a);!a.editable||!s||!p||i(p,s)!==p&&(n.pushHistory(),t.set(j(a,i(p,s))),n.commitChange());};return {bringForward:()=>r(Sa),sendBackward:()=>r(Ta),bringToFront:()=>r(Qa),sendToBack:()=>r(Ra),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(s=>xr(s,i,a.canvasSize));return}n.pushHistory(),t.set(j(a,mr(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(j(a,ur(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>co(i,"horizontal")),flipVertical:()=>o(i=>co(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=gr(G(i),i.selectedElementIds,i.editTemplateMode?Ed$1(true,i.selectedElementIds[0]):Dd$1());a.groupId&&(n.pushHistory(),t.set({...j(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,s=G(i),p=n.selectedElement(i);if(!i.editable||!a||!s||!p||p.type!=="group")return;let l=p.children.map(d=>i.editTemplateMode?Ed$1(true,d.id||p.id):Dd$1()),m=br(s,a,l);m.childIds.length!==0&&(n.pushHistory(),t.set({...j(i,m.elements),selectedElementId:m.childIds.at(-1)??null,selectedElementIds:m.childIds}),n.commitChange());}}}function vr(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:im(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:im(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:oe(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function im(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function hr(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:Fd$1(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:Fd$1(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=Gd$1(r.element);n.pushHistory(),t.set({...j(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function yr(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,s)=>r||s===0?{...a,themePath:o}:a)}),n.commitChange()))();},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,o)}),n.commitChange());},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());}}}async function Sr(e,t){let n=new eb,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",Xe$1(t)),n.generateAsync({type:"blob"})}function am(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}var tb={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function ob(e){return e&&c(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function Cr(e,t=null,n=[],o=null,r=new Map){let i=ob(e),a$1=e?rb$1(e):void 0,s=e?pd(e):void 0,p=e?rd(e):void 0,l=e?td(e):void 0,m$1=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,canShape:io(e),canText:se(e),isImage:e!==void 0&&a(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:i.fillColor,strokeColor:i.strokeColor,strokeWidth:i.strokeWidth,shapeStyle:e&&c(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:i.fillOpacity,strokeOpacity:i.strokeOpacity,gradientEnabled:e!==void 0&&kd$1(e),gradient:e?jd$1(e):tb,vAlign:a$1?.vAlign??"top",textWrap:e?ub$1(e):"square",autoFitMode:e?vb$1(e):"none",characterSpacing:a$1?.characterSpacing??0,lineSpacing:a$1?.lineSpacing??1,lineSpacingExactPt:a$1?.lineSpacingExactPt??null,paragraphSpacingBefore:a$1?.paragraphSpacingBefore??0,paragraphSpacingAfter:a$1?.paragraphSpacingAfter??0,paragraphIndent:a$1?.paragraphIndent??0,paragraphMarginLeft:a$1?.paragraphMarginLeft??0,textDirection:a$1?.textDirection??"horizontal",textRtl:a$1?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:s?.brightness??0,imageContrast:s?.contrast??0,imageSaturation:s?.saturation??0,imageArtisticEffect:e&&a(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&a(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&a(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&a(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&a(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&a(e)?e.imageEffects?.colorWash:void 0,actionClick:e?.actionClick?m(e.actionClick,"click"):void 0,actionHover:e?.actionHover?m(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:p?.cropLeft??0,cropTop:p?.cropTop??0,cropRight:p?.cropRight??0,cropBottom:p?.cropBottom??0,tableHeaderRow:l?.firstRowHeader??false,tableBandedRows:l?.bandedRows??false,tableBandedColumns:l?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:l?.cellPadding??0,selectedTableCell:m$1?t:null,selectedTableCells:m$1?n:[],tableCellStyle:m$1?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(d=>d.height??32)??[]:[]}}function nb(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function sm(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r)return;o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen);let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:nb(t)}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(Cr(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls));let s=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,elements:s?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:s?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:s,colorScheme:t.colorScheme,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function pm(e){if(e.length===0)return null;if(e.length>1){let n=Ja(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function lm(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function wr(e){let t=null,n=s=>lm(s.clientX,s.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(s){!t||s.pointerId!==t.pointerId||t.points.push(n(s));}function i(s){if(!t||s.pointerId!==t.pointerId)return;t.points.push(n(s));let p=t;o(),t=null,e.onCommitStroke({points:p.points,color:e.getColor(),width:e.getWidth(),tool:p.tool});}function a(s){!t||s.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(s){if(s.button!==0)return;let p=e.getTool();if(p!=="select"){if(p==="eraser"){let l=ee(s.target,e.getStageRoot());l&&(s.preventDefault(),s.stopPropagation(),e.onEraseAt(l));return}s.preventDefault(),s.stopPropagation(),t={tool:p,pointerId:s.pointerId,points:[n(s)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function Er(e){let{store:t,editActions:n,interactions:o}=e,r=wr({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let s=t.get();a.dataset.drawTool=i(s)?s.drawTool:"select";},setTool(a){let s=t.get();s.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?s.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function rb(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function Tr(e,t){return e.map(n=>{let o=t(n);return o.replies?.length?{...o,replies:Tr(o.replies,t)}:o})}function dm(e,t){return e.filter(n=>n.id!==t).map(n=>n.replies?.length?{...n,replies:dm(n.replies,t)}:n)}function cm(e){let t=n=>{let o=e.store.get();!o.editable||!o.slides[o.currentSlide]||(e.ops.pushHistory(),e.store.set({slides:rb(o.slides,o.currentSlide,n)}),e.ops.commitChange());};return {addComment(n,o){let r=n.trim();if(!r)return null;let i=e.store.get();if(!i.editable||!i.slides[i.currentSlide])return null;let a=Dd$1();return t(s=>[...s,{id:a,text:r,author:"You",createdAt:new Date().toISOString(),resolved:false,elementId:o}]),a},addCommentReply(n,o){let r=o.trim();if(!r)return null;let i=e.store.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return null;let s=(a.comments??[]).find(m=>m.id===n);if(!s)return null;let p=Dd$1(),l={id:p,text:r,author:"You",createdAt:new Date().toISOString(),threadId:n,elementId:s.elementId};return t(m=>m.map(d=>d.id===n?{...d,replies:[...d.replies??[],l]}:d)),p},editComment(n,o){let r=o.trim();r&&t(i=>Tr(i,a=>a.id===n?{...a,text:r}:a));},deleteComment(n){t(o=>dm(o,n));},toggleCommentResolved(n){t(o=>Tr(o,r=>r.id===n?{...r,resolved:!r.resolved}:r));}}}function Pr(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=gd$1(o);i&&(n.pushHistory(),t.set({slides:gt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=sr(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:pr(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var ib={width:320,height:80},ab={width:600,height:250},sb={width:200,height:150},mm={width:240,height:0};function pe(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function Ar(e,t,n="rect"){let o,r;switch(e){case "text":o=f("Text",{fontSize:18,color:"#000000"}),r=ib;break;case "table":o={...Pa(3,3),id:l("table")},r=ab;break;case "shape":n==="connector"?(o=h({type:"straight",stroke:{color:"#000000",width:2}}),r=mm):(o=g(n),r=n==="line"?mm:sb);break}return o.width=r.width,o.height=r.height,pe(o,t),o}function pb(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function mo(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let s=typeof a.result=="string"?a.result:"";if(!s){n(null);return}let p=Math.round(t.width*.6),{width:l$1,height:m}=await pb(s,p),d={id:l("image"),type:"image",name:"Image",x:0,y:0,width:l$1,height:m,imageData:s};pe(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var lb={width:420,height:64},ze={width:640,height:360};function db(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||ze.width,i=o.videoHeight||ze.height;if(r>ze.width||i>ze.height){let a=Math.min(ze.width/r,ze.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(ze),o.src=t;})}function kr(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=i.type.startsWith("audio/")?"audio":i.type.startsWith("video/")?"video":null;if(!a){n(null);return}let s=new FileReader;s.onload=async()=>{let p=typeof s.result=="string"?s.result:"";if(!p){n(null);return}let l$1=a==="audio"?lb:await db(e,p),m={id:l("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:p,x:0,y:0,width:l$1.width,height:l$1.height};pe(m,t),n(m);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var um={width:400,height:80},xm={width:600,height:340},gm={width:200,height:40};function Ir(e,t){let n=Ad$1(e);return pe(n,t),n}function Lr(e,t,n){let o={id:l("smartart"),type:"smartArt",x:0,y:0,width:xm.width,height:xm.height,smartArtData:Vc$1(e,t,r=>l(`smartart-node-${r}`))};return pe(o,n),o}function Mr(e,t){let n="[Equation]",o={id:l("equation"),type:"shape",x:0,y:0,width:um.width,height:um.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return pe(o,t),o}function Dr(e,t){let n=Rc$1(e,l("actionbutton"));return n?(pe(n,t),n):null}function Hr(e,t){return Oa(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Rr(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:l("field"),type:"shape",x:0,y:0,width:gm.width,height:gm.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return pe(r,n),r}function bm(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,s)=>o.has(`${i}:${s}`)?{...a,style:{...a.style,...n}}:a)}))}}function fm(e,t,n){switch(n){case "insertRowAbove":return sa(e,t.row,"above");case "insertRowBelow":return sa(e,t.row,"below");case "deleteRow":return ta(e,t.row);case "insertColumnLeft":return ua(e,t.column,"left");case "insertColumnRight":return ua(e,t.column,"right");case "deleteColumn":return va(e,t.column)}}function vm(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100)),i=1-e.columnWidths[t],a=1-o;return {...e,columnWidths:e.columnWidths.map((s,p)=>p===t?o:i>0?s/i*a:s)}}function hm(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function ym(e,t){if(t.length<2)return e;let n=t.map(({row:l})=>l),o=t.map(({column:l})=>l),r=Math.min(...n),i=Math.max(...n),a=Math.min(...o),s=Math.max(...o);if(t.length!==(i-r+1)*(s-a+1))return e;let p=e.rows.map((l,m)=>({...l,cells:l.cells.map((d,u)=>m<r||m>i||u<a||u>s?d:m===r&&u===a?{...d,text:t.map(({row:x,column:g})=>e.rows[x]?.cells[g]?.text).filter(Boolean).join(" "),gridSpan:s>a?s-a+1:void 0,rowSpan:i>r?i-r+1:void 0}:{...d,text:"",hMerge:u>a||void 0,vMerge:m>r||void 0})}));return {...e,rows:p}}function Sm(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=wa(e,t.row,t.column);return i?{...e,rows:i.map((a,s)=>({...a,cells:a.cells.map((p,l)=>s>=t.row&&s<t.row+o&&l>=t.column&&l<t.column+r?{...p,hMerge:void 0,vMerge:void 0}:p)}))}:e}var cb={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Or(e){return {setTextVerticalAlign:t=>e(n=>tb$1(n,t)),setTextWrap:t=>e(n=>wb$1(n,t)),setAutoFitMode:t=>e(n=>xb$1(n,t)),setTextAdvanced:t=>e(n=>sb$1(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:zb$1(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>Te(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>Te(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>ld(n,t)),addGradientStop:(t,n)=>e(o=>md(o,t,n)),removeGradientStop:t=>e(n=>nd(n,t)??{}),updateGradientStop:(t,n)=>e(o=>od(o,t,n)),setImageBrightness:t=>e(n=>qd$1(n,{brightness:t})),setImageContrast:t=>e(n=>qd$1(n,{contrast:t})),setImageSaturation:t=>e(n=>qd$1(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>sd(o,{[cb[t]]:n})),setImageEffects:t=>e(n=>a(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n$1)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:n(n$1)})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>ud$1(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>ud$1(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>vd$1(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((s,p)=>p===n?{...s,style:{...s.style,...o}}:s)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:bm(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:fm(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:vm(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:hm(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:ym(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:Sm(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:q$1(o.smartArtData,t,n)}:{}),setSmartArtNodeStyle:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:u(o.smartArtData,t,n)}:{}),mutateSmartArtNode:(t$1,n)=>e(o$1=>{if(o$1.type!=="smartArt"||!o$1.smartArtData)return {};let r$1=o$1.smartArtData;return {smartArtData:n==="add"?o(r$1,"New item"):n==="addChild"?t(r$1,t$1,"New item"):n==="remove"?p(r$1,t$1):n==="promote"?r(r$1,t$1):s(r$1,t$1)}}),setSmartArtLayout:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:z(n.smartArtData,t)}:{}),setSmartArtColorScheme:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:{...n.smartArtData,colorScheme:t}}:{})}}function Fr(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let s=Wa(i.sections,i.slides,a,r),p=s.sections.find(l=>!i.sections.some(m=>m.id===l.id));return n(s.sections,s.slides),p?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),s=i.sections.find(l=>l.id===o);if(!i.editable||!s||!a||s.name===a)return;let p=Xa(i.sections,i.slides,o,a);n(p.sections,p.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=Ya(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?Za(i.sections,o):_a(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=$a(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function uo(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function Br(e){let{store:t,ops:n}=e;function o(r,i,a){let s=e.getHandler();s&&s.applyLayoutToSlide(r,i,[...t.get().slides]).then(p=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let m=[...l.slides];m[r]=p,t.set({slides:m}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=bb$1(i+1),s=uo([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:s,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i$1=r.slides[r.currentSlide];if(!r.editable||!i$1)return;n.pushHistory();let a=r.currentSlide+1,s={...j$1(i$1),id:ab$1()},p=r.templateElementsBySlideId[i$1.id]??[],l=uo([...r.slides.slice(0,a),s,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[s.id]:p.map(i)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=uo(r.slides.filter((p,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),s={...r.templateElementsBySlideId};delete s[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:s,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let s=a.currentSlide+1,p={...bb$1(s+1),layoutPath:r,...i?{layoutName:i}:{}},l=uo([...a.slides.slice(0,s),p,...a.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(s,r,p.id);},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide];!r.editable||!i?.layoutPath||o(r.currentSlide,i.layoutPath,i.id);}}}var mb=24;function xo(e,t){if(!se(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function go(e,t){let n=Ee(e).listType;return xo(e,{listType:n===t?"none":t})}function bo(e,t){let n=Ee(e).paragraphMarginLeft,o=Math.max(0,n+t*mb);return xo(e,{paragraphMarginLeft:o})}function Vr(e,t){return xo(e,{align:t})}function Nr(e,t){return xo(e,{lineSpacing:t})}function zr(e){return {toggleBold:()=>e(t=>je(t,"bold")),toggleItalic:()=>e(t=>je(t,"italic")),toggleUnderline:()=>e(t=>je(t,"underline")),toggleStrikethrough:()=>e(t=>je(t,"strikethrough")),toggleTextShadow:()=>e(t=>qn(t)),changeFontSize:t=>e(n=>Gn(n,t)),setFontSize:t=>e(n=>ao(n,t)),setFontFamily:t=>e(n=>Wn(n,t)),setTextColor:t=>e(n=>_n(n,t)),setHighlightColor:t=>e(n=>Un(n,t)),setCharacterSpacing:t=>e(n=>$n(n,t)),changeCase:t=>e(n=>Kn(n,t)),clearFormatting:()=>e(t=>jn(t)),toggleBulletList:()=>e(t=>go(t,"bullet")),toggleNumberedList:()=>e(t=>go(t,"numbered")),increaseIndent:()=>e(t=>bo(t,1)),decreaseIndent:()=>e(t=>bo(t,-1)),setTextAlign:t=>e(n=>Vr(n,t)),setLineSpacing:t=>e(n=>Nr(n,t))}}function Gr(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i){let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s)return;let p=Math.max(0,Math.round(r));if(n.pushHistory(),i){let l={type:o,durationMs:p};t.set({slides:dr(a.slides,{transition:l})});}else {let l={...s.transition,type:o,durationMs:p};t.set({slides:oe(a.slides,a.currentSlide,{transition:l})});}n.commitChange();}}}function _r(e){let{doc:t,store:n,ops:o}=e,r=ar(n,o),i=a=>{if(!a)return;let s=n.get();!s.editable||!s.slides[s.currentSlide]||(o.pushHistory(),n.set({slides:gt(s.slides,s.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...zr(r),...fr({store:n,ops:o,applyToSelected:r}),...hr({store:n,ops:o}),...Br({store:n,ops:o,getHandler:e.getHandler}),...vr({store:n,ops:o}),...Gr({store:n,ops:o}),...cr({store:n,ops:o}),...Or(r),...Pr({store:n,ops:o}),...yr({store:n,ops:o,getHandler:e.getHandler}),sections:Fr(n,o),comments:cm({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(s=>Te(s,{fillColor:a,fillMode:"solid"})),setShapeStroke:a=>r(s=>Te(s,{strokeColor:a})),setShapeStrokeWidth:a=>r(s=>Te(s,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(s=>Te(s,a)),setShapeType:a=>r(s=>s.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let s={};return a.x!==void 0&&Number.isFinite(a.x)&&(s.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(s.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(s.width=Math.max(k,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(s.height=Math.max(k,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(s.rotation=a.rotation),s});},insert(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Ar(a,p.canvasSize,s));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await mo(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await kr(t,a.canvasSize));},insertChart(a){let s=n.get();s.slides[s.currentSlide]&&i(Ir(a,s.canvasSize));},insertSmartArt(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Lr(a,s,p.canvasSize));},insertEquation(a){let s=n.get();s.slides[s.currentSlide]&&i(Mr(a,s.canvasSize));},updateEquation:(a,s)=>o.updateEquation(a,s),insertActionButton(a){let s=n.get();s.slides[s.currentSlide]&&i(Dr(a,s.canvasSize));},insertField(a,s){let p=n.get();if(!p.slides[p.currentSlide])return;let l=s??Hr(a,{slideNumber:p.currentSlide+1});i(Rr(a,l,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),toggleViewOption(a){let s=n.get();n.set({[a]:!s[a]});for(let p of t.querySelectorAll(".pptxv"))p.classList.toggle(`pptxv-${a}`,!s[a]);},addGuide(a){let s=n.get();n.set({guides:[...s.guides,Wc$1(`guide-${Date.now()}`,a,s.canvasSize)]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await mo(t,n.get().canvasSize);!a||a.type!=="image"||r(s=>s.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Ur(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?_c$1(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let p=_c$1(s.slides,r,{matchCase:a}),{slides:l,replacements:m}=$c$1(s.slides,p,0,i);return o(l,m),m},replaceAll(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let{slides:p,replacements:l}=ad(s.slides,r,i,{matchCase:a});return o(p,l),l}}}var Cm=1,wm=10,ub=new Set(["nw","ne","se","sw"]);function Em(e){return ub.has(e)}function Wr(e,t,n,o=k){if(!Em(n)||t.width<=0||t.height<=0)return e;let r=e.width/t.width,i=e.height/t.height,a=Math.abs(r-1)>=Math.abs(i-1)?r:i,s=t.width*a,p=t.height*a;if(s<o||p<o){let d=Math.max(o/t.width,o/t.height);s=t.width*d,p=t.height*d;}let l=n==="nw"||n==="sw",m=n==="nw"||n==="ne";return {x:l?t.x+t.width-s:t.x,y:m?t.y+t.height-p:t.y,width:s,height:p,rotation:e.rotation}}function $r(e,t){let n=t?wm:Cm;switch(e){case "ArrowLeft":return {dx:-n,dy:0};case "ArrowRight":return {dx:n,dy:0};case "ArrowUp":return {dx:0,dy:-n};case "ArrowDown":return {dx:0,dy:n};default:return null}}var xb=/^(?:INPUT|TEXTAREA|SELECT)$/u;function qr(e){return t=>{if(!e.isActive())return;let n=t.target instanceof HTMLElement?t.target:null;if(n&&(xb.test(n.tagName)||n.isContentEditable))return;let o=t.ctrlKey||t.metaKey,r=t.key;if(r==="Escape"&&e.cancelFormatPainter()){t.preventDefault();return}if(o&&(r==="z"||r==="Z")){t.preventDefault(),t.shiftKey?e.redo():e.undo();return}if(o&&(r==="y"||r==="Y")){t.preventDefault(),e.redo();return}if(o&&(r==="v"||r==="V")){t.preventDefault(),e.paste();return}if(e.getSelectedId()===null)return;if(r==="Escape"){t.preventDefault(),e.deselect();return}if(r==="Delete"||r==="Backspace"){t.preventDefault(),e.deleteSelected();return}if(o&&(r==="d"||r==="D")){t.preventDefault(),e.duplicateSelected();return}if(o&&(r==="c"||r==="C")){t.preventDefault(),e.copySelected();return}if(o&&(r==="x"||r==="X")){t.preventDefault(),e.cutSelected();return}let i=$r(r,t.shiftKey);i&&(t.preventDefault(),e.nudgeSelected(i.dx,i.dy));}}function Tm(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function Pm(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null}}function Am(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=te(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let s=a.tableData.rows.map((p,l)=>({...p,cells:p.cells.map((m,d)=>l===n&&d===o?{...m,text:r,textRuns:void 0}:m)}));e.store.set(j(i,G(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:s}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=te(o,t);!r||!b(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(j(o,G(o).map(i=>i.id===t&&b(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function Kr(e){return !e||!b(e)||e.locks?.noTextEdit?false:!e.textSegments?.some(t=>t.equationXml)}function jr(e,t){let n=b(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:Db$1(t,o,r)}}function bt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
7
7
  `;continue}(r.tagName==="DIV"||r.tagName==="P")&&t.length>0&&!t.endsWith(`
8
8
  `)&&(t+=`
9
9
  `),n(r);}};return n(e),t}function Yr(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,a=b(i)?i:void 0,s=a?.text??"",p=a?.textStyle?.fontSize,l=a?.textStyle?.fontFamily,m=uf$1(t,"div","pptxv-inline-editor",{left:`${o.x*r}px`,top:`${o.y*r}px`,width:`${o.width*r}px`,minHeight:`${o.height*r}px`,...typeof p=="number"?{fontSize:`${p*r}px`}:{},...l!==void 0?{fontFamily:l}:{}});m.contentEditable="true",m.spellcheck=e.spellCheck??false,m.dataset.inlineEditor="",m.setAttribute("role","textbox"),m.setAttribute("aria-multiline","true"),a?.textSegments?.length?a.textSegments.forEach((g,f)=>{let v=t.createElement("span");v.dataset.segIdx=String(f),v.textContent=g.text,m.appendChild(v);}):m.textContent=s;let d=false,u=g=>{d||(d=true,m.remove(),g!==null&&g!==s&&e.onCommit(g),e.onClose());};m.addEventListener("input",()=>e.onInput?.(bt(m))),m.addEventListener("blur",()=>u(bt(m))),m.addEventListener("keydown",g=>{g.stopPropagation(),g.key==="Escape"&&(g.preventDefault(),u(bt(m)));}),m.addEventListener("pointerdown",g=>g.stopPropagation());let x=()=>e.onSelectionChange?.(yb$1(a?.textSegments));return m.addEventListener("keyup",x),m.addEventListener("pointerup",x),n.appendChild(m),m.focus(),{el:m,commit:()=>u(bt(m)),cancel:()=>u(null)}}var gb=100,bb=800;function Xr(e){let{store:t}=e,n=new Ua({maxDepth:gb}),o=0,r=(u=t.get())=>u.selectedElementId?te(u,u.selectedElementId):void 0,i=(u,x=u?[u]:[])=>t.set(Pm(u,x)),a=()=>({slides:lo(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:ya(t.get().templateElementsBySlideId),slideMasters:structuredClone(t.get().slideMasters),notesMaster:structuredClone(t.get().notesMaster),handoutMaster:structuredClone(t.get().handoutMaster),handoutSlidesPerPage:t.get().handoutSlidesPerPage,presentationProperties:structuredClone(t.get().presentationProperties),headerFooter:structuredClone(t.get().headerFooter),customShows:structuredClone(t.get().customShows)}),s=()=>{n.record(a(),""),o=0,e.onHistoryChange();},p=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},l=(u,x)=>{let g=t.get(),f=G(g).map(v=>v.id===u?{...v,...x}:v);t.set(j(g,f));},m=u=>{u&&(t.set({slides:lo(u.slides),sections:structuredClone(u.sections),coreProperties:structuredClone(u.coreProperties),appProperties:structuredClone(u.appProperties),customProperties:structuredClone(u.customProperties),templateElementsBySlideId:ya(u.templateElementsBySlideId),slideMasters:structuredClone(u.slideMasters),notesMaster:structuredClone(u.notesMaster),handoutMaster:structuredClone(u.handoutMaster),handoutSlidesPerPage:u.handoutSlidesPerPage,presentationProperties:structuredClone(u.presentationProperties),headerFooter:structuredClone(u.headerFooter),customShows:structuredClone(u.customShows),interactionActive:false}),p());},d=Am({store:t,pushHistory:s,commitChange:p});return {selectedElement:r,select:i,pushHistory:s,commitChange:p,patchGeometry:l,deleteSelected(){let u=t.get(),x=u.selectedElementId;!u.editable||!x||!r(u)||(s(),t.set({...j(u,G(u).filter(g=>!u.selectedElementIds.includes(g.id))),selectedElementId:null,selectedElementIds:[]}),p());},duplicateSelected(){let u=t.get(),x=u.selectedElementId;if(!u.editable||!x)return null;let g=r(u);if(!g)return null;let f=C(g);return f.x+=20,f.y+=20,s(),t.set({...j(u,[...G(u),f]),selectedElementId:f.id,selectedElementIds:[f.id]}),p(),f.id},nudgeSelected(u,x){let g=t.get(),f=r(g),v=g.selectedElementId;if(!f||!v)return;let b=Date.now();b-o>bb&&s(),o=b,t.set(j(g,G(g).map(E=>E.id===v?{...E,x:f.x+u,y:f.y+x}:E))),p();},commitInlineText(u,x){let g=t.get(),f=te(g,u);f&&(s(),t.set(j(g,G(g).map(v=>v.id===u?{...v,...jr(f,x)}:v))),p());},commitNotes(u,x){let g=t.get(),f=g.slides[g.currentSlide];!g.editable||!f||f.notes===u&&x===void 0||(s(),t.set({slides:lr(g.slides,g.currentSlide,u,x)}),p());},setHandoutSlidesPerPage(u){Tm({store:t,pushHistory:s,commitChange:p},u);},applyFormatPainter(u,x){let g=t.get(),f=te(g,u),v=te(g,x);return !g.editable||!f||!v||u===x?false:(s(),t.set(j(g,G(g).map(b=>b.id===x?Cb$1(b,Bb$1(f)):b))),p(),true)},...d,updateDocumentProperties(u,x,g){t.get().editable&&(s(),t.set({coreProperties:structuredClone(u),appProperties:structuredClone(x),customProperties:structuredClone(g)}),p());},updatePresentationProperties(u){t.get().editable&&(s(),t.set({presentationProperties:structuredClone(u)}),p());},updateSections(u){t.get().editable&&(s(),t.set({sections:structuredClone(u)}),p());},updateHeaderFooter(u){t.get().editable&&(s(),t.set({headerFooter:structuredClone(u)}),p());},updateCustomShows(u){t.get().editable&&(s(),t.set({customShows:structuredClone(u)}),p());},undo(){m(n.undo(a())?.snapshot);},redo(){m(n.redo(a())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(u){n.setMaxDepth(u);},async save(u="pptx"){let x=e.getHandler();if(!x)throw new Error("No presentation is loaded.");let g=t.get(),f=await x.save(Jd$1(g.slides,g.templateElementsBySlideId),{sections:g.sections.length>0?g.sections:void 0,coreProperties:g.coreProperties,appProperties:g.appProperties,customProperties:g.customProperties.length>0?g.customProperties:void 0,headerFooter:g.headerFooter,presentationProperties:g.presentationProperties,customShows:g.customShows.length?g.customShows:void 0,slideMasters:g.slideMasters,notesMaster:g.notesMaster,handoutMaster:g.handoutMaster,outputFormat:u});return t.set({dirty:false}),f}}}var km=2;function Zr(e){let t=null,n=(l,m)=>({id:l,x:m.x,y:m.y,width:m.width,height:m.height,rotation:m.rotation??0});function o(l,m,d){let u=e.getScale(),x=Da(l.startBox,m,d,u);if(!x.rotation){let g=e.getSiblings(),f=cb$1(x.x,x.y,x.width,x.height,g,new Set([l.id]),[]);return [{...n(l.id,x),x:f.x,y:f.y},f.lines]}return [n(l.id,x),[]]}function r(l,m,d,u){let x=e.getScale(),g=l.handle;if(!g)return n(l.id,l.startBox);let f=Ea(l.startBox,g,m,d,x);return u&&(f=Wr(f,l.startBox,g)),n(l.id,f)}function i(l,m){let d=e.getScale()||1,u=e.getStageOrigin(),x={x:(m.clientX-u.left)/d,y:(m.clientY-u.top)/d},g=Fa(Ca(l.startBox),x);return m.shiftKey&&(g=Ga(g)),{...n(l.id,l.startBox),rotation:g}}function a(l){let m=t;if(!m||l.pointerId!==m.pointerId)return;let d=l.clientX-m.startClientX,u=l.clientY-m.startClientY;if(!m.moved){if(Math.abs(d)<=km&&Math.abs(u)<=km)return;m.moved=true,e.onStart(m.id,m.kind);}let x=[],g;m.kind==="move"?[g,x]=o(m,d,u):m.kind==="resize"?g=r(m,d,u,l.shiftKey):g=i(m,l),m.last=g,e.onPreview(g,x);}function s(l){let m=t;!m||l.pointerId!==m.pointerId||(p(),t=null,e.onEnd(m.moved?m.last:null,m.moved,m.id));}function p(){window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s);}return {begin(l,m,d,u){let x=e.getElementBox(m);!x||t||(d.preventDefault(),d.stopPropagation(),t={kind:l,id:m,pointerId:d.pointerId,startClientX:d.clientX,startClientY:d.clientY,startBox:{...x},handle:u,moved:false,last:null},window.addEventListener("pointermove",a),window.addEventListener("pointerup",s),window.addEventListener("pointercancel",s));},isActive(){return t!==null},dispose(){p(),t=null;}}}function Im(e){let{event:t,elementId:n,state:o,store:r,ops:i}=e;if(o.eyedropperActive){let m=t.target instanceof Element?t.target:null,d=m?getComputedStyle(m):null,u=d?.backgroundColor||d?.color;return u&&e.onEyedropper?.(u),r.set({eyedropperActive:false}),true}let a=t.target instanceof Element?t.target.closest("td"):null;if(!n||a?.dataset.rowIndex===void 0||a.dataset.cellIndex===void 0)return false;let s={row:Number(a.dataset.rowIndex),column:Number(a.dataset.cellIndex)},p=o.selectedTableCell,l=t.shiftKey&&o.selectedElementId===n&&p?fb(p,s):[s];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&p?p:s,selectedTableCells:l}),true}function Lm(e,t){return t?{...e,x:Math.round(e.x/10)*10,y:Math.round(e.y/10)*10}:e}function Mm(e){return e.snapToShape?G(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}function fb(e,t){return Array.from({length:Math.abs(t.row-e.row)+1},(n,o)=>Array.from({length:Math.abs(t.column-e.column)+1},(r,i)=>({row:Math.min(e.row,t.row)+o,column:Math.min(e.column,t.column)+i}))).flat()}function Dm(e,t,n){let o=e?.getBoundingClientRect();return o&&t>0?{x:(n.clientX-o.left)/t,y:(n.clientY-o.top)/t}:null}function Hm(e=300){let t=null;return (n,o,r)=>{if(n==="mouse"||!o)return t=null,false;let i=t!==null&&t.id===o&&r-t.time<e;return t=i?null:{id:o,time:r},i}}function Rm(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:a}=e,s=t.createElement("input");s.type="text",s.className="pptxv-inline-editor pptxv-table-cell-editor",s.dataset.inlineEditor="",s.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(s.style,{boxSizing:"border-box",width:"100%",height:"100%"});let p=t.createDocumentFragment();for(;n.firstChild;)p.appendChild(n.firstChild);n.appendChild(s);let l=false,m=u=>{u.composedPath().includes(s)||d(true);},d=u=>{l||(l=true,t.removeEventListener("pointerdown",m,true),u&&a.commitTableCell(o.id,r,i,s.value),n.isConnected?n.replaceChildren(u?t.createTextNode(s.value):p):s.remove());};return s.addEventListener("blur",()=>d(true)),s.addEventListener("pointerdown",u=>u.stopPropagation()),s.addEventListener("keydown",u=>{u.stopPropagation(),u.key==="Escape"?d(false):u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),d(true));}),t.addEventListener("pointerdown",m,true),s.focus(),s.select(),{close:d}}function fo(e){let t=e.elementId??ee(e.event.target,e.stage),n=t?te(e.state,t):void 0,o=n&&b(n)?n.textSegments?.find(i=>i.equationXml)?.equationXml:void 0;if(t&&o&&e.onEditEquation)return e.onEditEquation(t,o),{handled:true,tableSession:null};let r=e.cell??(e.event.target instanceof Element?e.event.target.closest("td"):null);return !r||n?.type!=="table"||!e.overlay?{handled:false,tableSession:null}:{handled:true,tableSession:Rm({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var vb=500;function hb(e,t){return e.pointerType!=="touch"?null:(e.target instanceof Element?e.target.closest("td"):null)??t.elementsFromPoint?.(e.clientX,e.clientY).find(o=>o.localName==="td")??null}function Om(e,t,n){let o=hb(e,t),r=ee(e.target,n)??ee(o,n);return {cell:o,id:r}}function Fm(){let e=null;return (t,n,o)=>{if(t.pointerType!=="touch"||!(t.target instanceof Element))return e=null,false;let r=o??t.target.closest("td");if(!r||!n)return e=null,false;let i=`${n}:${r.dataset.rowIndex}:${r.dataset.cellIndex}`,a=e?.key===i&&t.timeStamp-e.time<=vb;return e=a?null:{key:i,time:t.timeStamp},a}}function Bm(e){let t=Fm(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:a}=Om(o,e.doc,e.getStage());if(!i||!t(o,a,i))return;let s=fo({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:a,cell:i,onEditEquation:e.onEditEquation});s.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(s.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function Vm(e){let{doc:t,store:n,ops:o}=e,r=null,i=null,a=Bm({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:S=>i=S,onEditEquation:e.onEditEquation}),s=[],p=null,l="move",m=null,d=S=>{let h=n.get(),C=G(h).filter(P=>h.selectedElementIds.includes(P.id));if(C.length>1&&h.selectedElementIds.includes(S))return Ja(C)??void 0;let y=te(h,S);return y?{x:y.x,y:y.y,width:y.width,height:y.height,rotation:y.rotation??0}:void 0},u=Zr({getScale:e.getScale,getElementBox:d,getSiblings:()=>Mm(n.get()),getStageOrigin(){let S=e.getOverlay()?.root.getBoundingClientRect();return {left:S?.left??0,top:S?.top??0}},onStart(S,h){let C=n.get();l=h,s=G(C).filter(y=>C.selectedElementIds.includes(y.id)).map(({id:y,x:P,y:T,width:w,height:k,rotation:I})=>({id:y,x:P,y:T,width:w,height:k,rotation:I})),p=Ja(s),o.pushHistory(),n.set({interactionActive:true});},onPreview(S,h){if(S=Lm(S,n.get().snapToGrid),s.length>1&&p&&l!=="rotate"){let C=l==="move"?Ka(s,S.x-p.x,S.y-p.y):La(s,p,S);for(let y of C)o.patchGeometry(y.id,{...y,rotation:y.rotation??0});}else o.patchGeometry(S.id,S);e.getOverlay()?.setSnapLines(h,e.getScale());},onEnd(S,h,C){e.getOverlay()?.setSnapLines([],1),S&&s.length<=1&&o.patchGeometry(C,S),n.set({interactionActive:false}),h&&o.commitChange();}}),x=S=>Dm(e.getOverlay()?.root,e.getScale(),S),g=S=>{if(!m||S.pointerId!==m.pointerId)return;let h=x(S),C=n.get(),y=h?Ha({startX:m.startX,startY:m.startY,currentX:h.x,currentY:h.y},G(C)):[],P=m.additive?Ia(C.selectedElementIds,y):y;m.el.remove(),m=null,window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),o.select(P.at(-1)??null,P);},f=S=>{if(!m||S.pointerId!==m.pointerId)return;let h=x(S);h&&(m.el.style.left=`${Math.min(m.startX,h.x)*e.getScale()}px`,m.el.style.top=`${Math.min(m.startY,h.y)*e.getScale()}px`,m.el.style.width=`${Math.abs(h.x-m.startX)*e.getScale()}px`,m.el.style.height=`${Math.abs(h.y-m.startY)*e.getScale()}px`);},v=Hm(),b=S=>{i?.close(S),i=null;let h=r;r=null,S?h?.commit():h?.cancel();},E=S=>{let h=n.get(),C=te(h,S),y=e.getOverlay();!C||!Kr(C)||!y||r||(o.select(S),y.setEditing(true),r=Yr({doc:t,overlayRoot:y.root,box:{x:C.x,y:C.y,width:C.width,height:C.height,rotation:C.rotation??0},scale:e.getScale(),element:C,spellCheck:h.spellCheckEnabled,onInput:P=>e.onInlineTextInput?.(S,P),onCommit:P=>{e.flushInlineTextInput?.(),o.commitInlineText(S,P);},onSelectionChange:P=>n.set({selectedTextRange:P}),onClose(){r=null,e.getOverlay()?.setEditing(false);}}));},A=(S,h)=>{let C=n.get(),y=fo({event:S,state:C,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(y.handled){i=y.tableSession;return}h&&Hd$1(h,C.editTemplateMode)&&E(h);};return {onStagePointerDown(S){let h=n.get();if(!h.editable||h.presenting||S.button!==0)return;let C=ee(S.target,e.getStageRoot());if((r||i)&&b(true),Im({event:S,elementId:C,state:h,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(h.formatPainterSourceId){C&&Hd$1(C,h.editTemplateMode)&&o.applyFormatPainter(h.formatPainterSourceId,C),n.set({formatPainterSourceId:null});return}let y=C!==null&&Hd$1(C,h.editTemplateMode);if(v(S.pointerType,y?C:null,S.timeStamp||Date.now())){S.preventDefault(),A(S,C);return}if(!y){let P=x(S),T=e.getOverlay();if(!P||!T)return;let w=t.createElement("div");w.className="pptxv-marquee",T.root.appendChild(w),m={pointerId:S.pointerId,startX:P.x,startY:P.y,additive:S.shiftKey,el:w},window.addEventListener("pointermove",f),window.addEventListener("pointerup",g),window.addEventListener("pointercancel",g);return}if(S.shiftKey){let P=h.selectedElementIds.includes(C)?h.selectedElementIds.filter(T=>T!==C):[...h.selectedElementIds,C];o.select(P.at(-1)??null,P);return}(h.selectedElementId!==C||h.selectedElementIds.length!==1)&&o.select(C,[C]),u.begin("move",C,S);},onStagePointerMove(S){if(!e.onCursorMove)return;let h=e.getOverlay()?.root.getBoundingClientRect(),C=e.getScale();!h||!(C>0)||e.onCursorMove((S.clientX-h.left)/C,(S.clientY-h.top)/C);},onStageDblClick(S){let h=n.get();if(!h.editable||h.presenting||r||i)return;let C=ee(S.target,e.getStageRoot());A(S,C);},beginHandleGesture(S,h,C){let y=n.get().selectedElementId;y&&u.begin(S,y,h,C);},closeInline:b,inlineActive:()=>r!==null||i!==null,dispose(){b(false),a(),u.dispose(),m?.el.remove(),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g);}}}var Qr=24,yb={nw:"nwse-resize",n:"ns-resize",ne:"nesw-resize",e:"ew-resize",se:"nwse-resize",s:"ns-resize",sw:"nesw-resize",w:"ew-resize"},Sb={nw:{fx:0,fy:0},n:{fx:.5,fy:0},ne:{fx:1,fy:0},e:{fx:1,fy:.5},se:{fx:1,fy:1},s:{fx:.5,fy:1},sw:{fx:0,fy:1},w:{fx:0,fy:.5}};function Jr(e,t,n){let o=uf$1(e,"div","pptxv-editor-overlay"),r=uf$1(e,"div","pptxv-sel-box");r.hidden=true,o.appendChild(r);let i=uf$1(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-Qr}px`,height:`${Qr}px`});r.appendChild(i);let a=uf$1(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-Qr}px`});a.type="button",a.setAttribute("data-pptx-compact",""),a.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),a.addEventListener("pointerdown",p=>n.onRotatePointerDown(p)),r.appendChild(a);for(let p of Ba){let{fx:l,fy:m}=Sb[p],d=uf$1(e,"button","pptxv-sel-handle",{left:`${l*100}%`,top:`${m*100}%`,cursor:yb[p]});d.type="button",d.setAttribute("data-pptx-compact",""),d.dataset.handle=p,d.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:p})),d.addEventListener("pointerdown",u=>n.onHandlePointerDown(p,u)),r.appendChild(d);}let s=uf$1(e,"div","pptxv-snap-layer");return o.appendChild(s),{root:o,mount(p){(o.parentElement!==p||p.lastElementChild!==o)&&p.appendChild(o);},setBox(p,l){if(!p){r.hidden=true;return}r.hidden=false,r.style.left=`${p.x*l}px`,r.style.top=`${p.y*l}px`,r.style.width=`${p.width*l}px`,r.style.height=`${p.height*l}px`,r.style.borderWidth=`${l}px`,r.style.transform=p.rotation?`rotate(${p.rotation}deg)`:"none";},setSnapLines(p,l){s.replaceChildren();for(let m of p){let d=uf$1(e,"div",`pptxv-snap-line pptxv-snap-${m.axis==="v"?"v":"h"}`);m.axis==="v"?d.style.left=`${m.position*l}px`:d.style.top=`${m.position*l}px`,s.appendChild(d);}},setEditing(p){o.classList.toggle("is-editing",p);},destroy(){o.remove();}}}var Cb={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12"};function ei(e){let{doc:t,store:n}=e,o=null,r=null,i=null,a=()=>{let b={editable:n.get().editable,canUndo:s.canUndo(),canRedo:s.canRedo()};e.getChrome().ribbon?.setEditState(b),e.getChrome().titleBar?.setEditState(b),e.getChrome().mobileToolbar?.setEditState(b);},s=Xr({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>a()}),p=_r({doc:t,store:n,ops:s,getHandler:e.getHandler}),l=Ur({store:n,ops:s}),m=sm({store:n,getChrome:e.getChrome,selectedElement:b=>s.selectedElement(b)}),d=Vm({doc:t,store:n,ops:s,getScale:e.getScale,getOverlay:()=>o,getStageRoot:()=>r?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(b,E)=>e.getChrome().ribbon?.openEquationEditor(b,E),onEyedropper:b=>p.setShapeFill(b)}),u=Er({store:n,editActions:p,interactions:d,getScale:e.getScale,getStageOrigin(){let b=o?.root.getBoundingClientRect();return {left:b?.left??0,top:b?.top??0}},getStageRoot:()=>r?.querySelector(".pptxv-stage")??null}),x=()=>{if(m(),!o)return;let b=n.get(),E=b.editable&&!b.presenting?G(b).filter(A=>b.selectedElementIds.includes(A.id)):[];o.setBox(pm(E),e.getScale()),am(t,o.root,b.guides,e.getScale());},g=qr({isActive:()=>{let b=n.get();return b.editable&&!b.presenting&&!d.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>s.select(null),deleteSelected:()=>s.deleteSelected(),duplicateSelected:()=>{s.duplicateSelected();},copySelected:()=>p.copy(),cutSelected:()=>p.cut(),paste:()=>p.paste(),nudgeSelected:(b,E)=>s.nudgeSelected(b,E),undo:()=>s.undo(),redo:()=>s.redo(),cancelFormatPainter:()=>n.get().formatPainterSourceId?(n.set({formatPainterSourceId:null}),true):false}),f=()=>{d.closeInline(true),r?.removeEventListener("pointerdown",u.onStagePointerDown),r?.removeEventListener("pointermove",d.onStagePointerMove),r?.removeEventListener("dblclick",u.onStageDblClick),i?.removeEventListener("keydown",g),r=null,i=null,o?.destroy(),o=null;},v=n.subscribe((b,E)=>{if(b.currentSlide!==E.currentSlide&&(d.closeInline(true),b.selectedElementId)){s.select(null);return}if((b.slides!==E.slides||b.templateElementsBySlideId!==E.templateElementsBySlideId||b.slideMasters!==E.slideMasters||b.notesMaster!==E.notesMaster||b.handoutMaster!==E.handoutMaster)&&b.selectedElementId&&!s.selectedElement(b)){s.select(null);return}b.editable!==E.editable&&(b.editable||(d.closeInline(true),b.selectedElementId&&s.select(null)),a()),(b.drawTool!==E.drawTool||b.editable!==E.editable)&&u.syncCursor(r),x();});return {attachChrome(){f();let b=e.getChrome();o=Jr(t,e.getTranslator(),{onHandlePointerDown(E,A){d.beginHandleGesture("resize",A,E);},onRotatePointerDown(E){d.beginHandleGesture("rotate",E);}}),r=b.stageWrap,i=b.root,r.addEventListener("pointerdown",u.onStagePointerDown),r.addEventListener("pointermove",d.onStagePointerMove),r.addEventListener("dblclick",u.onStageDblClick),i.addEventListener("keydown",g),o.mount(r),a(),u.syncCursor(r),x();},detachChrome:f,onStageRendered(){o&&r&&(o.mount(r),x());},capturesKeyboard(){let b=n.get();return b.editable&&(b.selectedElementId!==null||d.inlineActive())},reset(){d.closeInline(false),u.dispose(),s.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",formatPainterSourceId:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),a();},setEditable(b){n.set({editable:b,...b?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>s.undo(),redo:()=>s.redo(),canUndo:()=>s.canUndo(),canRedo:()=>s.canRedo(),setHistoryDepth:b=>s.setHistoryDepth(b),deleteSelected:()=>s.deleteSelected(),duplicateSelected:()=>s.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:b=>s.select(b.at(-1)??null,b),applyElementPatch(b,E){let A=n.get();!A.editable||!G(A).some(S=>S.id===b)||(s.pushHistory(),n.set(j(A,G(A).map(S=>S.id===b?{...S,...E}:S))),s.commitChange());},commitSlides(b,E=n.get().currentSlide){n.get().editable&&(s.pushHistory(),n.set({slides:b,currentSlide:Math.max(0,Math.min(E,b.length-1)),selectedElementId:null,selectedElementIds:[]}),s.commitChange());},setDrawTool:b=>u.setTool(b),setDrawColor:b=>u.setColor(b),setDrawWidth:b=>u.setWidth(b),getEditActions:()=>p,getFindReplaceActions:()=>l,commitNotes:(b,E)=>s.commitNotes(b,E),setHandoutSlidesPerPage:b=>s.setHandoutSlidesPerPage(b),updateDocumentProperties:(b,E,A)=>s.updateDocumentProperties(b,E,A),updatePresentationProperties:b=>s.updatePresentationProperties(b),updateSections:b=>s.updateSections(b),updateHeaderFooter:b=>s.updateHeaderFooter(b),updateCustomShows:b=>s.updateCustomShows(b),save:b=>s.save(b),async downloadAs(b,E=`presentation.${b}`){let A=await s.save(b);Ve$1(new Blob([A],{type:Cb[b]}),E);},async downloadPptx(b="presentation.pptx"){await this.downloadAs("pptx",b);},async packageForSharing(b="presentation.pptx"){let E=await s.save("pptx"),A=await Sr(E,b);Ve$1(A,`${b.replace(/\.pptx$/iu,"")}-package.zip`);},destroy(){v(),d.dispose(),u.dispose(),f();}}}function wb(e,t){let{width:n,height:o}=Ze(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let a=e.ownerDocument.createElement("canvas");a.width=n,a.height=o;let s=a.getContext("2d");if(!s)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");s.drawImage(e,0,0,n,o),r=a;}let i=r.getContext("2d");if(!i)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");return {imageData:i.getImageData(0,0,n,o),width:n,height:o}}async function ti(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=1920,onProgress:i,signal:a}=t,s=e.store.get().slides.length;if(s===0)return;let p=Ye$1({totalSlides:s,slideDurationMs:n,slideTimingsMs:o}),l=[];for(let u of p){if(a?.aborted)throw cc$1();i?.(u.slideIndex,s);let x=await e.rasterizeSlide(u.slideIndex);l.push({...wb(x,r),delayCs:u.delayCs});}let m=_e$1(l,p[0].delayCs);i?.(s,s);let d=new ArrayBuffer(m.byteLength);new Uint8Array(d).set(m),Ve$1(new Blob([d],{type:"image/gif"}),`${e.baseName}.gif`);}function vo(e,t,n,o={}){return D.exportSlide(e,t,n,o)}function Nm(e,t={}){return D.exportAll(e,t)}function Eb(e){let t=window.open("","_blank","noopener,noreferrer");return t?(t.document.open(),t.document.write(e),t.document.close(),t.focus(),setTimeout(()=>{t.print();},300),true):false}async function ni(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,a=r??Eb,s=e.store.get(),p=s.slides,l=cf$1(i,p.length),m=ef$1(l.colorMode),d=df$1(l.slideRange,s.currentSlide,p.length,l.customRangeFrom,l.customRangeTo);if(l.printWhat==="outline"){let f=`<div class="outline-page">${gf$1(d,p)}</div>`;return a(oi("Outline",f,l,m))}if(d.length===0)return false;if(l.printWhat==="slides"){let{width:f,height:v}=s.canvasSize,b=[];for(let E=0;E<d.length;E++){if(o?.aborted)throw cc$1();n?.(E,d.length),b.push(vo(p[d[E]],f,v));}return n?.(d.length,d.length),a($e(b,f,v,{title:"Slides (Vector)",orientation:l.orientation,colorFilter:m}))}let u=[];for(let f=0;f<d.length;f++){if(o?.aborted)throw cc$1();n?.(f,d.length);let v=await e.rasterizeSlide(d[f]);u.push(v.toDataURL("image/png"));}if(n?.(d.length,d.length),l.printWhat==="notes"){let f=hf$1(u,d,p);return a(oi("Notes Pages",f,l,m))}let x=_if(u,d,l.slidesPerPage),g=`Handout ${l.slidesPerPage} per page`;return a(oi(g,x,l,m))}function oi(e,t,n,o){return jf({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides})}function Tb(e){return new Promise(t=>{setTimeout(t,e);})}async function Pb(e,t){let n=document.createElement("canvas");n.width=e[0].width,n.height=e[0].height;let o=n.getContext("2d");if(!o)throw new Error("[pptx-vanilla-viewer] video export failed: 2D context unavailable");let r=n.captureStream(t.fps),i=new MediaRecorder(r,{mimeType:mf$1([...lf$1]),videoBitsPerSecond:t.videoBitsPerSecond}),a=[];i.ondataavailable=m=>{m.data.size>0&&a.push(m.data);};let s=new Promise((m,d)=>{i.onstop=()=>{m();},i.onerror=()=>{d(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();let p=kf({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),l=nf$1(t.fps);for(let m of p){t.onRecordProgress?.(m.slideIndex,p.length);for(let d=0;d<m.frameCount;d++){if(t.signal?.aborted)throw i.stop(),cc$1();o.drawImage(e[m.slideIndex],0,0),await t.waitMs(l);}}return i.stop(),await s,new Blob(a,{type:"video/webm"})}async function ri(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:a,onRecordProgress:s,signal:p}=t,l=e.store.get().slides.length;if(l===0)return;let m=[];for(let u=0;u<l;u++){if(p?.aborted)throw cc$1();a?.(u,l),m.push(await e.rasterizeSlide(u));}let d=await Pb(m,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:s,signal:p,waitMs:e.waitMs??Tb});a?.(l,l),Ve$1(d,`${e.baseName}.webm`);}function Ab(e){if(e===void 0)return "presentation";let t=e.trim().replace(/\.(?:pptx|pdf|png|gif|webm)$/iu,"");return t===""?"presentation":t}function ii(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,baseName:Ab(e.fileName)};async function o(s,p){if(t)return s;t=true;try{return await p()}finally{t=false;}}async function r(s){let p=e.store.get(),l=s??p.currentSlide;if(!(l<0||l>=p.slides.length))return o(void 0,async()=>{let m=await e.rasterizeSlide(l);We(m.toDataURL("image/png"),`${n.baseName}-slide-${l+1}.png`);})}async function i(s){let p=e.store.get(),l=s??p.currentSlide;if(!(l<0||l>=p.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let m=await e.rasterizeSlide(l),d=await new Promise(u=>{m.toBlob(u,"image/png");});d&&await navigator.clipboard.write([new ClipboardItem({"image/png":d})]);})}async function a(s={}){let p=e.store.get();if(p.slides.length===0)return;let{onProgress:l,signal:m}=s;return o(void 0,async()=>{let{jsPDF:d}=await import('jspdf'),{width:u,height:x}=p.canvasSize,g=u>=x?"landscape":"portrait",f=new d({orientation:g,unit:"px",format:[u,x],compress:!0}),v=p.slides.length;for(let b=0;b<v;b++){if(m?.aborted)throw cc$1();l?.(b,v);let E=await e.rasterizeSlide(b);b>0&&f.addPage([u,x],g),f.addImage(E.toDataURL("image/png"),"PNG",0,0,u,x);}f.save(`${n.baseName}.pdf`);})}return {exportSlidePng:r,copySlideAsImage:i,exportPdf:a,exportGif:s=>o(void 0,()=>ti(n,s)),exportVideo:s=>o(void 0,()=>ri(n,s)),print:s=>o(false,()=>ni(n,s))}}async function ai(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await bf$1(r,i),af$1(i),typeof o=="function"&&o(r,i);}})}function kb(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function si(e){let t=uf$1(e.doc,"div","pptxv-export-stage",{position:"fixed",left:"-99999px",top:"0",pointerEvents:"none",opacity:"0"});t.setAttribute("aria-hidden","true"),e.container.appendChild(t);let n=e.waitForFrame??kb;async function o(r){let i=e.store.get(),a=i.slides[r];if(!a)throw new Error(`Export failed: no slide at index ${r}`);t.replaceChildren();let s=xf$1({document:e.doc,slide:a,canvasSize:i.canvasSize,mediaDataUrls:i.mediaDataUrls,registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.smartArt3D,presenting:false});return t.appendChild(s),await n(),ai(s,{backgroundColor:"#ffffff",scale:2,width:i.canvasSize.width,height:i.canvasSize.height,logging:false})}return {rasterizeSlide:o,destroy(){t.remove();}}}var ft=class{async exportSlidePng(t){return this.exporter.exportSlidePng(t)}async copySlideAsImage(t){return this.exporter.copySlideAsImage(t)}async exportPdf(t){return this.exporter.exportPdf(t)}async exportGif(t){return this.exporter.exportGif(t)}async exportVideo(t){return this.exporter.exportVideo(t)}async print(t){return this.exporter.print(t)}};function pi(e){let t=si(e),n=ii({store:e.store,rasterizeSlide:o=>t.rasterizeSlide(o)});return {exportSlidePng:o=>n.exportSlidePng(o),copySlideAsImage:o=>n.copySlideAsImage(o),exportPdf:o=>n.exportPdf(o),exportGif:o=>n.exportGif(o),exportVideo:o=>n.exportVideo(o),print:o=>n.print(o),destroy:()=>t.destroy()}}function Ib(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/gu,(n,o)=>{let r=t[o];return r===void 0?n:String(r)}):e}function vt(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let a=n?.[r]??o?.[r]??zf[r]??Af(r);return Ib(a,i)}}async function li(e){if(typeof e=="string"){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch presentation (${t.status}) from ${e}`);return t.arrayBuffer()}if(e instanceof Blob)return e.arrayBuffer();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}return e}async function ht(e){let t=new B,n=[];try{let o=await t.load(e),r=await Lb(t,o.slides,n),i=await Mb(t,o.slides);return {handler:t,slides:i,sections:o.sections??[],presentationProperties:o.presentationProperties??{},headerFooter:o.headerFooter??{},coreProperties:o.coreProperties,appProperties:o.appProperties,customProperties:o.customProperties??[],customShows:o.customShows??[],embeddedFonts:o.embeddedFonts??[],hasDigitalSignatures:o.hasDigitalSignatures??!1,digitalSignatureCount:o.digitalSignatureCount??0,isPasswordProtected:o.isPasswordProtected??!1,canvasSize:{width:o.width??N,height:o.height??O},mediaDataUrls:r,colorScheme:o.theme?.colorScheme,fontScheme:o.theme?.fontScheme,tableStyleMap:o.tableStyleMap,slideMasters:o.slideMasters??[],themeOptions:o.themeOptions??[],notesMaster:o.notesMaster,handoutMaster:o.handoutMaster,hasMacros:o.hasMacros??!1,notesCanvasSize:typeof o.notesWidthEmu=="number"&&typeof o.notesHeightEmu=="number"&&o.notesWidthEmu>0&&o.notesHeightEmu>0?{width:Math.round(o.notesWidthEmu/9525),height:Math.round(o.notesHeightEmu/9525)}:void 0,blobUrls:n}}catch(o){throw De(n),t.dispose(),o}}function De(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function Lb(e,t,n){let o=[];for(let i of t)L(i.elements,o);let r=new Map;return await Promise.all(o.map(async i=>{let a=i.mediaPath;if(!a){i.mediaMissing=true;return}try{if(i.mediaType==="audio"||i.mediaType==="video"){let p=await e.getMediaArrayBuffer(a);if(p){let l=i.mediaMimeType||"application/octet-stream",m=URL.createObjectURL(new Blob([p],{type:l}));n.push(m),r.set(a,m);}else i.mediaMissing=!0;}else {let p=await e.getImageData(a);p?r.set(a,p):i.mediaMissing=!0;}}catch{i.mediaMissing=true;}})),r}async function Mb(e,t){let{paths:n,refs:o}=M$1(t);if(n.size===0)return t;let r=new Map;await Promise.all(Array.from(n).map(async s=>{try{let p=await e.getImageData(s);p&&r.set(s,p);}catch{}}));let i=new Map;for(let s of o){let p=r.get(s.path);if(!p)continue;let l=i.get(s.element.id)??{};l[s.field]=p,i.set(s.element.id,l);}if(i.size===0)return t;let a=s=>{let p=false,l=s.map(m=>{let d=m,u=i.get(m.id);if(u&&(d={...m,...u}),d.type==="group"&&d.children?.length){let x=a(d.children);x!==d.children&&(d={...d,children:x});}return d!==m&&(p=true),d});return p?l:s};return t.map(s=>{let p=a(s.elements);return p===s.elements?s:{...s,elements:p}})}function ho(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let a of Object.keys(o))if(o[a]!==t[a]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let a of Array.from(n))a(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function yo(){return {slides:[],sections:[],presentationProperties:{},headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],embeddedFonts:[],hasDigitalSignatures:false,digitalSignatureCount:0,isPasswordProtected:false,templateElementsBySlideId:{},slideMasters:[],themeOptions:[],notesMaster:void 0,notesCanvasSize:void 0,handoutMaster:void 0,hasMacros:false,masterViewTab:"slides",handoutSlidesPerPage:4,masterViewTarget:null,canvasSize:{width:N,height:O},mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,tableStyleMap:void 0,currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,selectedElementId:null,selectedElementIds:[],selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,formatPainterSourceId:null,editTemplateMode:false,dirty:false,interactionActive:false,notesExpanded:false,inspectorOpen:true,remotePresences:[],cursors:[],followedClientId:null,clipboardPayload:null,drawTool:"select",drawColor:P,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,guides:[],eyedropperActive:false,spellCheckEnabled:false}}function Ge(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function zm(e){let{options:t,store:n}=e,o=null,r=[],i=0;function a(){De(r),De(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function s(p){let l=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let m=await li(p),d=await ht(m);if(l!==i){De(d.blobUrls),d.handler.dispose();return}a(),o=d.handler,r=d.blobUrls;let u=Id$1(d.slides);e.onContentApplying?.(),n.set({slides:u.slides,sections:d.sections,presentationProperties:d.presentationProperties,headerFooter:d.headerFooter,coreProperties:d.coreProperties,appProperties:d.appProperties,customProperties:d.customProperties,customShows:d.customShows,embeddedFonts:d.embeddedFonts,hasDigitalSignatures:d.hasDigitalSignatures,digitalSignatureCount:d.digitalSignatureCount,isPasswordProtected:d.isPasswordProtected,templateElementsBySlideId:u.templateElementsBySlideId,slideMasters:d.slideMasters,themeOptions:d.themeOptions,notesMaster:d.notesMaster,notesCanvasSize:d.notesCanvasSize,handoutMaster:d.handoutMaster,hasMacros:d.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:d.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:d.canvasSize,mediaDataUrls:d.mediaDataUrls,colorScheme:d.colorScheme,fontScheme:d.fontScheme,tableStyleMap:d.tableStyleMap,currentSlide:Ge(t.initialSlide??0,u.slides.length),loading:!1}),e.onContentApplied?.(),t.onLoad?.({slideCount:d.slides.length,canvasSize:d.canvasSize});}catch(m){if(l!==i)return;let d=e.getTranslator(),u=m instanceof x?d("pptx.security.currentlyProtected"):m instanceof Error?m.message:String(m);n.set({loading:false,error:u}),t.onError?.(u,m);}}return {load:s,releaseLoaded:a,getHandler:()=>o,invalidate:()=>{i++;}}}function Gm(e,t,n,o,r){t.querySelector("[data-pptx-comments-panel]")?.remove();let i=uf$1(e,"aside","pptxv-workspace-pane");i.dataset.pptxCommentsPanel="true";let a=uf$1(e,"header"),s=uf$1(e,"h2");s.textContent=n("pptx.toolbar.comments");let p=uf$1(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.common.close")),a.append(s,p),i.appendChild(a);let l=uf$1(e,"div","pptxv-workspace-list");if(!o.length){let u=uf$1(e,"p");u.textContent=n("pptx.comments.noneOnSlide"),l.appendChild(u);}for(let u of o){let x=uf$1(e,"article","pptxv-comment-card");x.classList.toggle("is-resolved",!!u.resolved);let g=uf$1(e,"strong");g.textContent=u.author??"You";let f=uf$1(e,"textarea");f.value=u.text,f.setAttribute("aria-label",n("pptx.comments.edit"));let v=uf$1(e,"div");for(let[b,E]of [[n("pptx.comments.save"),()=>r.editComment(u.id,f.value)],[n(u.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>r.toggleCommentResolved(u.id)],[n("pptx.comments.delete"),()=>r.deleteComment(u.id)]]){let A=uf$1(e,"button");A.type="button",A.textContent=b,A.addEventListener("click",E),v.appendChild(A);}x.append(g,f,v),l.appendChild(x);}let m=uf$1(e,"textarea");m.placeholder=n("pptx.comments.addPlaceholder");let d=uf$1(e,"button");d.type="button",d.textContent=n("pptx.comments.addComment"),d.addEventListener("click",()=>{r.addComment(m.value)&&i.remove();}),l.append(m,d),i.appendChild(l),p.addEventListener("click",()=>i.remove()),t.appendChild(i);}function _m(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=uf$1(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=uf$1(e,"header"),a=uf$1(e,"div"),s=uf$1(e,"h2");s.textContent=n("pptx.compare.title");let p=uf$1(e,"p");p.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),a.append(s,p);let l=uf$1(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.compare.close")),i.append(a,l),r.appendChild(i);let m=uf$1(e,"div","pptxv-compare-actions"),d=uf$1(e,"button");d.type="button",d.textContent=n("pptx.compare.acceptAll"),d.addEventListener("click",()=>{o.onAcceptAll(),r.remove();}),m.appendChild(d),r.appendChild(m);let u=uf$1(e,"div","pptxv-compare-list"),x=o.result.diffs.filter(g=>g.status!=="unchanged");if(x.length===0){let g=uf$1(e,"p");g.textContent=n("pptx.compare.noDifferences"),u.appendChild(g);}for(let g of x)u.appendChild(Db(e,n,g,o.onAccept));r.appendChild(u),t.appendChild(r),l.addEventListener("click",()=>r.remove());}function Db(e,t,n,o){let r=uf$1(e,"article","pptxv-compare-row"),i=uf$1(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${Hb(n.status)}`)}`;let a=uf$1(e,"p");a.textContent=n.changes.map(m=>m.description).join("; ")||i.textContent;let s=uf$1(e,"div"),p=uf$1(e,"button");p.type="button",p.textContent=t("pptx.compare.reject");let l=uf$1(e,"button");return l.type="button",l.textContent=t("pptx.compare.accept"),p.addEventListener("click",()=>{r.classList.add("is-resolved"),p.disabled=true,l.disabled=true;}),l.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),p.disabled=true,l.disabled=true;}),s.append(p,l),r.append(i,a,s),r}function Hb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e,t,n){let o=uf$1(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=uf$1(e,"section","pptxv-parity-dialog");r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true");let i=`pptxv-dialog-${crypto.randomUUID()}`;r.setAttribute("aria-labelledby",i);let a=uf$1(e,"header","pptxv-parity-header"),s=uf$1(e,"h2");s.id=i,s.textContent=n;let p=uf$1(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),a.append(s,p);let l=uf$1(e,"div","pptxv-parity-body"),m=uf$1(e,"footer","pptxv-parity-footer");r.append(a,l,m),e.body.append(o,r);let d=()=>{e.removeEventListener("keydown",u),o.remove(),r.remove();},u=x=>{x.key==="Escape"&&d();};return e.addEventListener("keydown",u),o.addEventListener("click",d),p.addEventListener("click",d),queueMicrotask(()=>p.focus()),{backdrop:o,dialog:r,body:l,footer:m,close:d}}function q(e,t,n,o,r=false){let i=uf$1(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function ge(e,t,n,o){let r=uf$1(e,"label","pptxv-parity-check"),i=e.createElement("input");return i.type="checkbox",i.checked=o,r.append(i,e.createTextNode(n)),t.appendChild(r),i}function Um(e,t,n,o,r,i){for(let a of o){let s=uf$1(e,"label","pptxv-parity-check"),p=e.createElement("input");p.type="radio",p.name=n,p.value=a.value,p.checked=a.value===r,p.addEventListener("change",()=>{p.checked&&i(a.value);}),s.append(p,e.createTextNode(a.label)),t.appendChild(s);}}function Wm(e,t,n,o,r){let i=uf$1(e,"div","pptxv-parity-swatch-row");for(let a of n){let s=e.createElement("button");s.type="button",s.className="pptxv-parity-swatch",s.classList.toggle("is-active",a.key===o);let p=uf$1(e,"span","pptxv-parity-swatch-preview");p.style.background=a.previewColor;let l=e.createElement("span");l.textContent=a.label,s.append(p,l),s.addEventListener("click",()=>r(a.key)),i.appendChild(s);}t.appendChild(i);}function $m(e,t,n,o,r,i){let a=ie(e,t,t("pptx.customShows.title")),s=structuredClone(n),p=uf$1(e,"div","pptxv-custom-shows");a.body.appendChild(p);let l=()=>{p.replaceChildren(),s.forEach(m=>{let d=uf$1(e,"article"),u=uf$1(e,"input");u.value=m.name,u.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),u.addEventListener("change",()=>{m.name=u.value.trim()||m.name;});let x=uf$1(e,"span");x.textContent=`${m.slideRIds.length}/${o.length}`;let g=uf$1(e,"button");g.type="button",g.textContent=t("pptx.slideShow.fromBeginning"),g.addEventListener("click",()=>{i(m),a.close();});let f=uf$1(e,"button");f.type="button",f.textContent=t("pptx.customShows.delete"),f.addEventListener("click",()=>{s=s.filter(({id:b})=>b!==m.id),l();});let v=uf$1(e,"div");o.forEach(b=>{let E=uf$1(e,"label","pptxv-parity-check"),A=e.createElement("input");A.type="checkbox",A.checked=m.slideRIds.includes(b.rId),A.addEventListener("change",()=>{m.slideRIds=A.checked?[...m.slideRIds,b.rId]:m.slideRIds.filter(S=>S!==b.rId),x.textContent=`${m.slideRIds.length}/${o.length}`;}),E.append(A,e.createTextNode(`${t("pptx.rehearse.slide")} ${b.slideNumber}`)),v.appendChild(E);}),d.append(u,x,g,f,v),p.appendChild(d);});};q(e,a.footer,t("pptx.customShows.createNew"),()=>{s.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:o.map(({rId:m})=>m)}),l();}),q(e,a.footer,t("common.cancel"),a.close),q(e,a.footer,t("common.ok"),()=>{r(s),a.close();},true),l();}function qm(e,t,n){let o=ie(e,t,t("pptx.headerFooter.title")),r={...n.value},i=ge(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),a=ge(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),s=ge(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),p=uf$1(e,"input");p.type="text",p.value=r.footerText??"",p.placeholder=t("pptx.headerFooter.footerPlaceholder"),p.hidden=!s.checked,o.body.appendChild(p),s.addEventListener("change",()=>{p.hidden=!s.checked;});let l=m=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:a.checked,hasFooter:s.checked,footerText:p.value},m),o.close();};q(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>l("all")),q(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>l("current"),true);}function Km(e,t,n,o){let r=ie(e,t,t("pptx.hyperlink.editTitle")),i=Xc$1(n),a=(l,m)=>{let d=uf$1(e,"label","pptxv-parity-select"),u=uf$1(e,"span");u.textContent=l;let x=uf$1(e,"input");return x.type="text",x.value=m,d.append(u,x),r.body.appendChild(d),x},s=a(t("pptx.hyperlink.urlLabel"),i.url);s.placeholder=t("pptx.hyperlink.urlPlaceholder");let p=a(t("pptx.hyperlink.tooltipLabel"),i.tooltip);q(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(Zc$1()),r.close();}),q(e,r.footer,t("common.cancel"),r.close),q(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(Yc$1(n,{url:s.value,tooltip:p.value})),r.close();},true);}function jm(e,t,n,o){let r=ie(e,t,t("pptx.print.title")),i=(g,f)=>{let v=uf$1(e,"label","pptxv-parity-select"),b=uf$1(e,"span");b.textContent=g;let E=e.createElement("select");for(let[A,S]of f){let h=e.createElement("option");h.value=A,h.textContent=S,E.appendChild(h);}return v.append(b,E),r.body.appendChild(v),E},a=i(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),s=uf$1(e,"div","pptxv-parity-range");s.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let l=e.createElement("input");l.type="number",l.min="1",l.max=String(n),l.value=String(n),s.append(p,e.createTextNode(t("pptx.slideShow.to")),l),r.body.appendChild(s),a.addEventListener("change",()=>{s.hidden=a.value!=="custom";});let m=i(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]),d=i(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),u=i(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["pureBlackWhite",t("pptx.print.blackAndWhite")]]),x=ge(e,r.body,t("pptx.print.frameSlides"),false);q(e,r.footer,t("common.cancel"),r.close),q(e,r.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(l.value),printWhat:m.value,orientation:d.value,colorMode:u.value,frameSlides:x.checked}),r.close();},true);}function Ym(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=uf$1(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=uf$1(e,"span"),a=uf$1(e,"strong"),s=uf$1(e,"span"),p={},l=performance.now(),m=l,d=0,u=0,x=false,g=S=>new Date(Math.max(0,S)).toISOString().slice(14,19),f=(S,h)=>{let C=uf$1(e,"button");return C.type="button",C.textContent=S,C.addEventListener("click",h),r.appendChild(C),C},v=f(n("pptx.rehearse.pause"),()=>{if(x=!x,x)d=performance.now();else {let S=performance.now()-d;u+=S,l+=S,m+=S;}v.textContent=n(x?"pptx.rehearse.resume":"pptx.rehearse.pause");}),b=()=>{p[o.currentSlide()]=Math.max(250,performance.now()-l-u),u=0;};f(n("pptx.presenter.next"),()=>{if(x)return;b();let S=o.currentSlide()+1;S<o.slideCount&&(o.navigate(S),l=performance.now());}),f(n("pptx.rehearse.saveTimings"),()=>{b(),o.onSave(p),r.remove();}),f(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,a,s);let E=window.setInterval(()=>{if(x)return;let S=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,a.textContent=`${n("pptx.rehearse.slideTime")}: ${g(S-l)}`,s.textContent=`${n("pptx.rehearse.totalTime")}: ${g(S-m)}`;},250),A=new MutationObserver(()=>{r.isConnected||(clearInterval(E),A.disconnect());});A.observe(t,{childList:true}),t.appendChild(r);}function Xm(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=uf$1(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=uf$1(e,"header"),a=uf$1(e,"h2");a.textContent=n("pptx.selectionPane.title");let s=uf$1(e,"button");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(a,s),r.appendChild(i);let p=uf$1(e,"div","pptxv-workspace-list");if(!o.elements.length){let l=uf$1(e,"p");l.textContent=n("pptx.selectionPane.empty"),p.appendChild(l);}[...o.elements].reverse().forEach((l,m)=>{let d=o.elements.length-m-1,u=uf$1(e,"div","pptxv-selection-row");u.draggable=true,u.dataset.index=String(d),u.classList.toggle("is-selected",o.selectedIds.includes(l.id));let x=uf$1(e,"span");x.textContent="\u2630";let g=uf$1(e,"button");g.type="button",g.textContent=Rb(l,d),g.addEventListener("click",()=>o.onSelect(l.id));let f=uf$1(e,"button");f.type="button",f.textContent=l.hidden?"\u25CB":"\u25C9",f.setAttribute("aria-label",n(l.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),f.addEventListener("click",()=>o.onToggleHidden(l.id)),u.addEventListener("dragstart",v=>v.dataTransfer?.setData("text/plain",String(d))),u.addEventListener("dragover",v=>v.preventDefault()),u.addEventListener("drop",v=>{v.preventDefault();let b=Number(v.dataTransfer?.getData("text/plain"));Number.isInteger(b)&&o.onReorder(b,d);}),u.append(x,g,f),p.appendChild(u);}),r.appendChild(p),s.addEventListener("click",()=>r.remove()),t.appendChild(r);}function Rb(e,t){return b(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function di(e){return new Date(Number.isFinite(e)?e:0).toISOString()}function Ob(e,t){let n=e.messages.map(o=>{let r=[],i=[];for(let a of Jf(o)){if(a.kind==="text"){r.push(a.text);continue}i.push({toolName:a.toolName,toolCallId:a.toolCallId,state:a.state,input:t?a.input:void 0,output:t?a.output:void 0,errorText:a.errorText});}return {role:o.role,text:r.join(`