pptx-vanilla-viewer 3.9.0 → 3.10.0

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.cjs CHANGED
@@ -1,7 +1,7 @@
1
- 'use strict';var chunkFGF6WJ3F_cjs=require('./chunk-FGF6WJ3F.cjs'),chunkIQ7MDPEN_cjs=require('./chunk-IQ7MDPEN.cjs'),chunk5YHVN3PP_cjs=require('./chunk-5YHVN3PP.cjs');require('./chunk-B5PFHICE.cjs');var lucide=require('lucide');function ts(e){let{store:t,editor:n}=e,o=(s,a)=>{let l=s(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(l,t.get().currentSlide);},r=()=>{let s=t.get();return {slides:s.slides,width:s.canvasSize.width,height:s.canvasSize.height,theme:s.colorScheme?{colorScheme:s.colorScheme}:void 0,sections:s.sections,presentationProperties:s.presentationProperties,customProperties:s.customProperties,coreProperties:s.coreProperties,appProperties:s.appProperties,viewProperties:s.viewProperties,tableStyleMap:s.tableStyleMap,tableStylesDefaultId:s.tableStylesDefaultId,tags:s.tagCollections}},i=chunkIQ7MDPEN_cjs.b;return {getDeckMeta(){let s=t.get();return {slideCount:s.slides.length,activeSlideIndex:s.currentSlide,title:dI(s.slides),width:s.canvasSize.width,height:s.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:s}=t.get();return s?{colorScheme:s}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:s=>e.goToSlide(s),selectElements(s,a){e.goToSlide(s),n.selectElements(a);},applySlidesUpdate:o,updateElement(s,a,l){o(p=>{let d=p[s]?.elements.find(u=>u.id===a);return d&&chunkIQ7MDPEN_cjs.p(d,l),p});},applyTheme:s=>e.applyThemeUpdates(s),getDeckData:()=>r(),applyDeckData(s,a){let l=r(),p=s(structuredClone(l));e.ensureEditable(),i(l.slides,p.slides)&&n.commitSlides(p.slides,t.get().currentSlide),(l.width!==p.width||l.height!==p.height)&&n.getEditActions().updateCanvasSize({width:p.width,height:p.height});let d=p.sections??l.sections??[];i(l.sections,d)&&n.updateSections(d);let u=p.presentationProperties??l.presentationProperties??{};i(l.presentationProperties,u)&&n.updatePresentationProperties(u);let m=p.coreProperties??l.coreProperties,g=p.appProperties??l.appProperties,x=p.customProperties??l.customProperties??[];(i(l.coreProperties,m)||i(l.appProperties,g)||i(l.customProperties,x))&&n.updateDocumentProperties(m??{},g??{},x),i(l.viewProperties,p.viewProperties)&&t.set({viewProperties:p.viewProperties}),i(l.tableStyleMap,p.tableStyleMap)&&n.getEditActions().updateTableStyleMap(p.tableStyleMap??{}),i(l.tableStylesDefaultId,p.tableStylesDefaultId)&&t.set({tableStylesDefaultId:p.tableStylesDefaultId});let b=p.tags??l.tags??[];i(l.tags,b)&&n.getEditActions().updateTagCollections(b);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function dI(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var cI=2600;function mI(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function os(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,s=null,a=false,l=null,p={text:"",nonce:0},d=()=>{for(let x of n)x();},u=()=>{let x=t.get();return chunkIQ7MDPEN_cjs.i({activeSlideIndex:x.currentSlide,selectedElementIds:x.selectedElementIds,selectedElementId:x.selectedElementId})},m=()=>r.length>0,g=t.subscribe((x,b)=>{(x.currentSlide!==b.currentSlide||x.selectedElementId!==b.selectedElementId||x.selectedElementIds!==b.selectedElementIds)&&d();});return {subscribe(x){return n.add(x),()=>n.delete(x)},getLiveTargets:u,getEffectiveTargets(){return m()?r:o&&o.length>0?o:u()},isPinned:()=>!m()&&o!==null,hasPicks:m,pinFocus(){o=u(),d();},clearPinnedFocus(){o=null,d();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),d();},stopPicking(){i=false,d();},addPick(x,b){r.some(v=>v.kind==="element"&&v.elementId===b)||(r=[...r,{kind:"element",slideIndex:x,elementId:b}],d());},clearPicks(){r=[],i=false,d();},getHighlights(){let x=[];for(let b of r)b.kind==="element"&&x.push({slideIndex:b.slideIndex,elementId:b.elementId,variant:"pick"});if(s)for(let b of s.elementIds)x.push({slideIndex:s.slideIndex,elementId:b,variant:"active"});return x},isAnimating:()=>a||r.length>0,flashToolTarget(x){s=x&&x.slideIndex!==void 0&&x.elementIds.length>0?{slideIndex:x.slideIndex,elementIds:x.elementIds}:null,a=true,l&&clearTimeout(l),l=setTimeout(()=>{s=null,a=false,l=null,d();},cI),d();},getPrefill:()=>p,askAboutSelection(){o=u(),p={text:"",nonce:p.nonce+1},e.requestOpen(),d();},fixElement(x,b){o=u(),p={text:x?mI(x,b):"",nonce:p.nonce+1},e.requestOpen(),d();},dispose(){l&&clearTimeout(l),g(),n.clear();}}}function H(e,t){let n=chunkIQ7MDPEN_cjs.w(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(chunkIQ7MDPEN_cjs.K(e,t.icon)):t.text!==void 0&&(n.classList.add("pptxv-btn-text"),n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=chunkIQ7MDPEN_cjs.w(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 uI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function He(e,t,n="#000000"){let o=chunkIQ7MDPEN_cjs.w(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)),t.onCommit&&r.addEventListener("change",()=>t.onCommit?.(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=uI(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function re(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field"),o=chunkIQ7MDPEN_cjs.w(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=Number.NaN,s=()=>{let a=Number.parseFloat(r.value);!Number.isFinite(a)||a===i||(i=a,t.onCommit(a));};return r.addEventListener("change",s),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&s();}),{el:n,input:r,setValue(a){let l=Math.round(a*100)/100;i=l,e.activeElement!==r&&(r.value=String(l));},setDisabled(a){r.disabled=a;}}}function WC(e,t,n){let o=chunkIQ7MDPEN_cjs.e(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 xI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ai-change-ghost",WC(i,"start",t.config));s.setAttribute("data-ai-change",i.kind),s.setAttribute("data-export-ignore","true"),r.appendChild(s);}return r}function gI(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 s=r[i],a=WC(o[i],"end",t.config);for(let[l,p]of Object.entries(a))s.style.setProperty(l,String(p));}}function $C(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,s=o.current(),a=0,l=0,p=()=>{a&&(cancelAnimationFrame(a),a=0),l&&(cancelAnimationFrame(l),l=0);},d=x=>{s&&((!i||!i.isConnected)&&(i=chunkIQ7MDPEN_cjs.w(t,"style","pptxv-ai-change-css"),(x??t.head).appendChild(i)),i.textContent=chunkIQ7MDPEN_cjs.d(s.config));},u=()=>{if(p(),r?.remove(),r=null,!s)return;let x=e.getStageRoot();if(!x)return;d(x.parentElement);let b=n.get().currentSlide,v=xI(t,s,b);if(!v)return;x.appendChild(v),r=v;let f=s;a=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{r&&gI(r,f,b);});});},m=n.subscribe(u),g=o.subscribe(x=>{s=x,x&&e.goToSlide(x.slideIndex),u();});return u(),{destroy(){p(),m(),g(),r?.remove(),r=null,i?.remove(),i=null;}}}function qC(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,s=null,a=()=>{s?.remove(),s=null;},l=u=>{let m=o.get().currentSlide,g=o.get().slides[m]?.elements.find(x=>x.id===u)??null;return o.set({selectedElementId:u,selectedElementIds:[u]}),g},p=(u,m,g)=>{let x=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-ai-menu-item");return x.type="button",x.append(chunkIQ7MDPEN_cjs.K(t,u),t.createTextNode(m)),x.addEventListener("click",()=>{g(),a();}),x},d=u=>{let m=o.get();if(m.editable&&!m.presenting)return;let g=chunk5YHVN3PP_cjs.Fm(u.target,e.getStageRoot());if(!g)return;u.preventDefault(),a();let x=l(g),b=o.get().currentSlide;s=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-ai-menu",{left:`${u.clientX}px`,top:`${u.clientY}px`}),s.setAttribute("role","menu"),s.append(p("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),p("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(x,b))),t.body.appendChild(s);let v=f=>{f instanceof KeyboardEvent&&f.key!=="Escape"||f.target instanceof Node&&s?.contains(f.target)||(a(),t.removeEventListener("pointerdown",v,true),t.removeEventListener("keydown",v,true));};t.addEventListener("pointerdown",v,true),t.addEventListener("keydown",v,true);};return i.addEventListener("contextmenu",d),{destroy(){i.removeEventListener("contextmenu",d),a();}}}function jC(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let l=e.getStageRoot();if(!l)return;o.isAnimating()?l.setAttribute("data-pptx-ai-active","true"):l.removeAttribute("data-pptx-ai-active");let p=n.get(),d=o.getHighlights().filter(x=>x.slideIndex===p.currentSlide);if(d.length===0)return;let u=p.slides[p.currentSlide]?.elements??[],m=new Map(u.map(x=>[x.id,x])),g=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-ai-hl-layer");for(let x of d){let b=m.get(x.elementId);if(!b)continue;let v=chunkIQ7MDPEN_cjs.w(t,"div",`pptxv-ai-hl pptxv-ai-hl-${x.variant}`,{left:`${b.x-3}px`,top:`${b.y-3}px`,width:`${b.width+6}px`,height:`${b.height+6}px`});g.appendChild(v);}l.appendChild(g),r=g;},s=n.subscribe(i),a=o.subscribe(i);return i(),{destroy(){s(),a(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function YC(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let s=chunk5YHVN3PP_cjs.Fm(i.target,e.getStageRoot());s&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,s));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function bI(e){return e.stageWrap.querySelector(".pptxv-stage")}function ns(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>bI(n),s=[],a=(f,S)=>{let y=H(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:S,onClick:()=>{v(!x);}});y.btn.setAttribute("aria-expanded","false"),f.appendChild(y.btn),s.push(y);};a(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&a(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let l=chunkIQ7MDPEN_cjs.w(t,"aside","pptxv-ai-panel");l.setAttribute("data-pptx-ai-panel",""),l.setAttribute("aria-label",o("pptx.ai.title")),l.hidden=true,(n.viewport.parentElement??n.root).appendChild(l);let p=jC({doc:t,store:e.store,controller:r,getStageRoot:i}),d=YC({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),u=qC({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),m=null,g=null,x=false,b=false,v=async f=>{x=f,l.hidden=!x;for(let S of s)S.setActive(x),S.btn.setAttribute("aria-expanded",String(x));if(!(!x||m||b)){b=true,l.classList.add("is-loading");try{let{createAiPanel:S}=await import('./ai-panel-OROOTY7Z.cjs');m=await S({host:l,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide,onClose:()=>{v(!1);}}),m.changeAnimator&&(g=$C({doc:t,store:e.store,animator:m.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{b=false,l.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){g?.destroy(),g=null,m?.destroy(),m=null,u.destroy(),d.destroy(),p.destroy(),r.dispose();for(let f of s)f.btn.remove();l.remove();}}}function Mr(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 XC(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),getCustomization:e.getCustomization,openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),clearSelection:()=>e.clearSelection(),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"),getCustomization:e.getCustomization,openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},saveAsPpt:()=>{e.downloadAs("ppt");},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},exportJson:()=>e.exportJson(),print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),toggleHideSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow(),showOptions:()=>e.presentationProperties(),updateShowOptions:o=>e.getEditActions().updatePresentationSettings(o)},edit:Mr(()=>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),armFreeformTool:o=>e.armFreeformTool?.(o),visibleDrawingTools:()=>chunk5YHVN3PP_cjs.Js.filter(o=>chunk5YHVN3PP_cjs.dr(e.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,o))},findReplace:Mr(()=>e.getFindReplaceActions()),design:{applyPresentationTheme:o=>e.applyPresentationTheme(o),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o)},transitions:{readDraft:()=>e.readTransitionDraft(),applyDraft:(o,r)=>e.getEditActions().applyTransitionDraft(o,r),readTransition:()=>e.readTransition(),applyChange:o=>e.getEditActions().applyTransitionChange(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(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o),updateTagCollections:o=>e.getEditActions().updateTagCollections(o),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),updateTableStyleMap:o=>e.getEditActions().updateTableStyleMap(o),deleteTableStyle:o=>e.getEditActions().deleteTableStyle(o),setTemplateBackground:(o,r)=>e.getEditActions().setTemplateBackground(o,r),getTemplateBackgroundColor:o=>e.getEditActions().getTemplateBackgroundColor(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),updateSlideSize:o=>e.getEditActions().updateSlideSize(o),applySlideSizeRescale:(o,r)=>e.getEditActions().applySlideSizeRescale(o,r),addComment:(o,r)=>{e.getEditActions().comments.addComment(o,void 0,r);},addCommentReply:(o,r,i)=>{e.getEditActions().comments.addCommentReply(o,r,i);},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),applyMotionPath:o=>e.getEditActions().applyMotionPath(o),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),setAnimationSound:(o,r)=>e.getEditActions().setAnimationSound(o,r),setAnimationStockSound:(o,r)=>e.getEditActions().setAnimationStockSound(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),toggleElementLock:()=>e.getEditActions().toggleElementLock(),setShapeFill:(o,r)=>e.getEditActions().setShapeFill(o,r),setShapeStroke:(o,r)=>e.getEditActions().setShapeStroke(o,r),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),pushRecentColor:o=>e.getEditActions().pushRecentColor(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),setAltText:o=>e.getEditActions().setAltText(o),setTitle:o=>e.getEditActions().setTitle(o),setOleName:o=>e.getEditActions().setOleName(o),setOleContent:o=>e.getEditActions().setOleContent(o),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),setTableData:(o,r)=>e.getEditActions().setTableData(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),replaceSmartArtData:o=>e.getEditActions().replaceSmartArtData(o),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 QC(e){return {showTitleBar:chunk5YHVN3PP_cjs.$q(e,"titleBar"),showStatusBar:chunk5YHVN3PP_cjs.$q(e,"statusBar"),showNotes:chunk5YHVN3PP_cjs.$q(e,"notes")}}function ZC(e,t){let n=e.visible&&chunk5YHVN3PP_cjs.$q(t,"quickAccessToolbar"),o=chunk5YHVN3PP_cjs.br(t,"print")?e.commandIds:e.commandIds.filter(r=>r!=="print");return {...e,visible:n,commandIds:o}}function JC(e){let t=chunk5YHVN3PP_cjs.er(e.customization),n=null,o=e,r=null,i=()=>{let a=t.getResolved();return n!==a&&(n=a,o={...e,hiddenActions:chunk5YHVN3PP_cjs._q(a,e.hiddenActions),showThumbnails:(e.showThumbnails??true)&&chunk5YHVN3PP_cjs.$q(a,"slidesPane"),showInspector:(e.showInspector??true)&&chunk5YHVN3PP_cjs.$q(a,"inspector")}),o},s=a=>{let l=t.getResolved();a.setConstraints({locked:l.lockedSettings,defaults:l.defaultSettings});};return {controller:t,getResolved:()=>t.getResolved(),getChromeOptions:i,isAiEnabled:()=>e.ai!==void 0&&chunk5YHVN3PP_cjs.ar(t.getResolved(),"ai"),isDialogAvailable:a=>chunk5YHVN3PP_cjs.br(t.getResolved(),a),bind(a,l){r?.(),s(a),r=t.subscribe(()=>{s(a),l();});},destroy(){r?.(),r=null;}}}function ew(e){return {goToSlide:t=>e.goToSlide(t),move:t=>t>0?e.next():e.prev(),endShow:()=>e.exitPresentation(),confirmUrl:t=>e.confirmExternalHyperlink?.(t)??true,lastViewed:()=>{let t=e.getPreviousPresentedSlide();t!==null&&e.goToSlide(t);},customShow:(t,n)=>e.customShowRunner.customShow(t,n),openFile:t=>{chunk5YHVN3PP_cjs.ad(t);},openPresentation:t=>{chunk5YHVN3PP_cjs.ad(t);},playMedia:t=>{chunk5YHVN3PP_cjs.Od(e.getStageRoot(),t);},oleVerb:(t,n)=>{let o=chunk5YHVN3PP_cjs.Cp(e.getCurrentSlide(),n,t);o&&(o.action==="download"?chunk5YHVN3PP_cjs.lt(o.url,o.fileName??"download"):chunk5YHVN3PP_cjs.mt(o.url));},runProgram:t=>{e.addRunProgramNotice(chunk5YHVN3PP_cjs.es(t));}}}function rs(e){return e.presenting&&e.animationBuildsComplete&&!chunk5YHVN3PP_cjs.bd(e.currentSlide)}function tw(e){return fI(e.target,e.currentSlide),chunk5YHVN3PP_cjs.ed(e.target,e.currentSlide,{slideCount:e.slideCount},e.runner)!=="advance"?false:!rs(e)}function fI(e,t){let n=chunk5YHVN3PP_cjs.ff(e,t);if(!n?.descriptor.click)return;let{element:o}=n,{style:r,clearStyle:i,durationMs:s}=n.descriptor.click;chunk5YHVN3PP_cjs.ef(o,r),!(typeof setTimeout>"u")&&setTimeout(()=>{chunk5YHVN3PP_cjs.ef(o,i);},s);}function vI(e){if(!(!e.presenting||e.endOfShow))return chunk5YHVN3PP_cjs.cd(e.slides[e.currentSlide],{useTimings:e.presentationProperties.advanceMode!=="manual"})}function ow(e){let t=e.setTimer??((d,u)=>setTimeout(d,u)),n=e.clearTimer??(d=>clearTimeout(d)),o,r=()=>{o!==void 0&&(n(o),o=void 0);},i=()=>{r();let d=vI(e.getState());d!==void 0&&(o=t(()=>{o=void 0;let u=e.getState().currentSlide;e.next(),e.getState().currentSlide===u&&i();},d));},s=()=>{let d=e.getState();return [d.presenting,d.endOfShow,d.currentSlide,d.presentationProperties.advanceMode??"",d.slides[d.currentSlide]?.transition?.advanceAfterMs??""].join("|")},a="",l=()=>{let d=s();d!==a&&(a=d,i());},p=e.subscribe(l);return l(),{cancel:r,rearm:i,detach:()=>{r(),p();}}}function nw(e){let t,n=false,o=()=>{let i=e.getPresenting();if(i!==n){if(n=i,i){t=chunk5YHVN3PP_cjs.On({root:e.root,onHidden:e.cancelAutoAdvance,onVisible:e.rearmAutoAdvance});return}t?.(),t=void 0,chunk5YHVN3PP_cjs.Nn();}},r=e.subscribe(o);return o(),()=>{r(),t?.(),t=void 0,n&&(n=false,chunk5YHVN3PP_cjs.Nn());}}function rw(e,t){let n=null,o=e.subscribe((r,i)=>{if(r.endOfShow&&!i.endOfShow&&n){let s=n;n=null,e.set({activeCustomShowId:s.showId,endOfShow:false}),t(s.index);return}i.presenting&&!r.presenting&&(n=null);});return {customShow(r,i){let s=e.get(),a=s.customShows.find(u=>u.id===r);if(!a)return;i&&(n={index:s.currentSlide,showId:s.activeCustomShowId});let l=chunk5YHVN3PP_cjs.Jp(s.presentationProperties,s.slides.length),p=chunk5YHVN3PP_cjs.Dp(s.slides,a,l);e.set({activeCustomShowId:r});let d=chunk5YHVN3PP_cjs.Kp(p);d!==void 0&&t(d);},dispose:o}}function Ro(e,t,n){for(let r of n)e.style.removeProperty(r);let o=chunk5YHVN3PP_cjs.Ea(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function is(e,t,n){let o=chunkIQ7MDPEN_cjs.w(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=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-accessibility-header"),i=chunkIQ7MDPEN_cjs.w(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-accessibility-close");s.type="button",s.textContent=t("pptx.accessibility.close"),s.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,s),o.appendChild(r);let a=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-accessibility-summary");o.appendChild(a);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-accessibility-list");l.setAttribute("role","list"),l.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(l);let p=()=>{o.hidden=true;};s.addEventListener("click",p);let d=u=>{let m=chunkIQ7MDPEN_cjs.w(e,"section",`pptxv-accessibility-group is-${u.severity}`),g=chunkIQ7MDPEN_cjs.w(e,"h3","pptxv-accessibility-group-title");g.textContent=`${u.label} (${u.issues.length})`,m.appendChild(g);for(let[x,b]of u.issues.entries()){let v=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=chunk5YHVN3PP_cjs.qm(b,x);let f=chunkIQ7MDPEN_cjs.w(e,"strong","pptxv-accessibility-issue-type");f.textContent=chunk5YHVN3PP_cjs.pm(b.type,h=>t(h));let S=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-accessibility-issue-message");S.textContent=b.message;let y=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-accessibility-issue-slide");y.textContent=t("pptx.notes.slideN",{n:b.slideIndex+1}),v.append(f,S,y),v.addEventListener("click",()=>n(b.slideIndex)),m.appendChild(v);}l.appendChild(m);};return {el:o,open(u){if(l.replaceChildren(),a.textContent=t("pptx.accessibility.issueCount",{count:u.length}),u.length===0){let m=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-accessibility-empty");m.textContent=t("pptx.accessibility.noIssuesFound"),l.appendChild(m);}else for(let m of chunk5YHVN3PP_cjs.om(u,g=>t(g)))d(m);o.hidden=false,s.focus();},close:p}}var iw=5;function aw(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compat-toasts");r.dataset.testid="pptx-compat-toasts",r.hidden=true,r.setAttribute("style",chunk5YHVN3PP_cjs.Jo());let i=0,s=0,a=()=>{r.setAttribute("style",chunk5YHVN3PP_cjs.Jo(i,s));};r.setAttribute("role","region"),r.setAttribute("aria-label",t("pptx.compatibility.toastTitle"));let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compat-toasts-list"),p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compat-toasts-overflow");p.hidden=true;let d=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-compat-toasts-dismiss-all");d.type="button",d.dataset.testid="pptx-compat-toasts-dismiss-all",d.textContent=t("pptx.compatibility.dismissAll"),d.addEventListener("click",o),r.append(l,p,d);function u(m){let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compat-toast");g.dataset.testid="pptx-compat-toast",g.dataset.code=m.code,g.dataset.severity=m.severity,g.setAttribute("role","status"),g.appendChild(chunkIQ7MDPEN_cjs.K(e,"alert"));let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compat-toast-body"),b=chunkIQ7MDPEN_cjs.w(e,"strong","pptxv-compat-toast-title");b.textContent=t("pptx.compatibility.toastTitle");let v=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-compat-toast-message");v.textContent=t(m.messageKey,m.params),x.append(b,v);let f=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-compat-toast-dismiss");return f.type="button",f.dataset.testid="pptx-compat-toast-dismiss",f.setAttribute("aria-label",t("pptx.compatibility.dismiss")),f.appendChild(chunkIQ7MDPEN_cjs.K(e,"close")),f.addEventListener("click",()=>n(m.id)),g.append(x,f),g}return {el:r,setBottomInset(m){s=m,a();},update(m,g=0){r.hidden=m.length===0,i=g,a(),l.replaceChildren(...m.slice(0,iw).map(u));let x=m.length-iw;p.hidden=x<=0,x>0&&(p.textContent=`+${x}`);}}}function sw(e,t,n,o){let r=n(t("pptx.accessibility.heading"));r.setAttribute("data-pptx-inspector-section","alt-text");let i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-accessibility-alt"),s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.elementAccessibility.altText");let a=e.createElement("textarea");a.rows=2,a.className="pptxv-accessibility-alt-input",a.placeholder=t("pptx.elementAccessibility.altTextPlaceholder"),a.setAttribute("aria-label",t("pptx.elementAccessibility.altText")),a.addEventListener("keydown",u=>u.stopPropagation()),a.addEventListener("change",()=>o.setAltText(a.value)),i.append(s,a),r.appendChild(i);let l=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-accessibility-title"),p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.elementAccessibility.title");let d=e.createElement("input");return d.type="text",d.className="pptxv-accessibility-title-input",d.placeholder=t("pptx.elementAccessibility.titlePlaceholder"),d.setAttribute("aria-label",t("pptx.elementAccessibility.title")),d.addEventListener("keydown",u=>u.stopPropagation()),d.addEventListener("change",()=>o.setTitle(d.value)),l.append(p,d),r.appendChild(l),{el:r,update(u){r.hidden=!u.hasSelection||!u.showAccessibilitySection,e.activeElement!==a&&(a.value=u.altText),e.activeElement!==d&&(d.value=u.title),a.disabled=!u.showAccessibilitySection,d.disabled=!u.showAccessibilitySection;}}}function Q(e){return e.createElement("pptx-ui-select")}function me(e){return e.createElement("pptx-ui-checkbox")}function he(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=Q(e);r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let s=e.createElement("option");s.value=i.value,s.textContent=i.label,r.appendChild(s);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function oe(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),o=me(e);o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunkIQ7MDPEN_cjs.w(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 Fe(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-range"),o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunkIQ7MDPEN_cjs.w(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 s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-range-readout"),a=t.formatValue??(p=>String(p)),l=()=>{s.textContent=a(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{l(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,s),n.appendChild(r),{el:n,setValue(p){e.activeElement!==i&&(i.value=String(p),l());},setDisabled(p){i.disabled=p;}}}function pw(e,t,n,o){let r=n(t("pptx.action.title")),i=lw(e,t,"click",o),s=lw(e,t,"hover",o);r.append(i.el,s.el);let a=1,l=[];return {el:r,setSlideCount(p){a=Math.max(1,p);},setCustomShows(p){l=p;},update(p){r.hidden=!p.hasSelection,i.update(p.actionClick,a,l),s.update(p.actionHover,a,l);}}}function lw(e,t,n,o){let r=e.createElement("fieldset");r.className="pptxv-action-fieldset";let i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let s=Q(e);s.setAttribute("aria-label",t(n==="click"?"pptx.action.onClick":"pptx.action.onHover"));for(let y of chunk5YHVN3PP_cjs.um){let h=e.createElement("option");h.value=y.value,h.textContent=t(y.labelKey),s.appendChild(h);}let a=e.createElement("input"),l=new Set(["url","openFile","openPresentation","runProgram"]),p=Q(e);p.dataset.testid="pptx-action-custom-show",p.setAttribute("aria-label",t("pptx.hyperlink.customShowLabel"));let d=e.createElement("option");d.value="",p.appendChild(d);let u=e.createElement("label");u.className="pptxv-action-return-row";let m=me(e);m.dataset.testid="pptx-action-custom-show-return",u.append(m,e.createTextNode(t("pptx.hyperlink.customShowReturn")));let g=1,x=[],b=y=>({url:l.has(y)?a.value:void 0,slideIndex:y==="slide"?chunk5YHVN3PP_cjs.wm(a.valueAsNumber,g):void 0,customShowId:y==="customShow"&&p.value||void 0,returnAfter:y==="customShow"?m.checked:void 0}),v=()=>{let y=s.value;o.setElementAction(n,{trigger:n,type:y,...b(y)});},f=()=>{let y=p.value;p.replaceChildren(d);for(let h of x){let C=e.createElement("option");C.value=h.id,C.textContent=h.name,p.appendChild(C);}p.value=x.some(h=>h.id===y)?y:"";},S=()=>{let y=s.value,h=y==="slide",C=y==="customShow";a.hidden=!(l.has(y)||h),a.type=h?"number":"url",a.placeholder=h?t("pptx.action.slideNumberPlaceholder"):"https://",h&&(a.min="1",a.max=String(Math.max(1,g)),a.step="1"),p.hidden=!C,u.hidden=!C;};return s.addEventListener("change",()=>{S();let y=s.value;chunk5YHVN3PP_cjs.vm(y,b(y))&&v();}),a.addEventListener("change",v),p.addEventListener("change",v),m.addEventListener("change",v),r.append(i,s,a,p,u),{el:r,update(y,h,C){g=Math.max(1,h),x=C,s.value=y?.type??"none",a.value=y?.type==="slide"?String((y.slideIndex??0)+1):y?.url??"",f(),p.value=y?.customShowId??"",m.checked=y?.returnAfter===true,S();}}}var Lt=null;function Mt(e,t=false){Oo(),!(typeof Audio>"u")&&(Lt=new Audio(e),Lt.loop=t,Lt.play().catch(()=>{}));}function Oo(){Lt&&(Lt.pause(),Lt.currentTime=0,Lt=null);}function as(e){if(e instanceof Element)return e.closest("[data-element-id]")?.dataset.elementId}function dw(e,t){let n=null;e.addEventListener("click",o=>{let r=t.getController(),i=as(o.target);if(!i||!r?.hasInteractiveSequence(i))return;let s=r.advanceInteractive(i);s&&(o.stopPropagation(),t.play(r,s));}),e.addEventListener("mouseover",o=>{let r=chunk5YHVN3PP_cjs.ff(o.target,t.getSlide()),i=r?.descriptor.hover?r.element:null;i!==n&&(n&&chunk5YHVN3PP_cjs.ef(n,chunk5YHVN3PP_cjs.df),n=i,i&&r?.descriptor.hover&&chunk5YHVN3PP_cjs.ef(i,r.descriptor.hover.enterStyle));let s=t.getController(),a=as(o.target);if(!a||!s?.hasHoverSequence(a))return;s.resetHover(a);let l=s.advanceHover(a);l&&t.play(s,l);}),e.addEventListener("mouseout",o=>{let r=o.relatedTarget;(!(r instanceof Node)||!e.contains(r))&&n&&(chunk5YHVN3PP_cjs.ef(n,chunk5YHVN3PP_cjs.df),n=null);let i=t.getController(),s=as(o.target);s&&i?.hasHoverSequence(s)&&i.resetHover(s);});}function ss(){let e=new Map,t=[],n={current:null},o=null,r=null,i=null,s=-1,a=false,l=null,p=new Map,d=null,u=false,m,g,x,b,v,f,S=()=>o?.interactiveTriggerShapeIds??new Set,y=()=>o?.hoverTriggerShapeIds??new Set,h=M=>{e.clear();for(let[D,I]of M)e.set(D,I);w();},C=()=>{let M=new Set;for(let[D,I]of e){(I.build||I.animatesFill||I.animatesStroke)&&M.add(D);let R=D.indexOf("::");R>0&&M.add(D.slice(0,R));}return Array.from(M)},w=()=>{if(!r)return;let M=C();M.length>0&&d?.(M),chunkFGF6WJ3F_cjs.c(r,e,S(),y());},A={setStates:M=>{h(M(new Map(e)));},timers:t,buildHandle:n,playSound:M=>{Mt(p.get(M)??M);},stopSound:Oo,frameRoot:()=>r},P=()=>{l&&(l(),l=null);},k=chunk5YHVN3PP_cjs.Fr(),T=()=>{chunk5YHVN3PP_cjs.Gr(A,k);},E=()=>{P(),T(),o=null,A.mediaTimeNodeElementIds=new Map,A.mediaBookmarkTimesMs=new Map,e.clear(),r=null,i=null;},L=(M,D,I=false)=>{if(o=chunk5YHVN3PP_cjs.de.fromSlide(M,{slideHeightPx:g?.height,slideWidthPx:g?.width,themeColorMap:x,pixelateMosaic:b}),A.mediaTimeNodeElementIds=chunk5YHVN3PP_cjs.Pd(M.nativeAnimations??[]),A.mediaBookmarkTimesMs=chunk5YHVN3PP_cjs.Qd(M.elements),chunkFGF6WJ3F_cjs.b(D,o.keyframesCss),h(o.computeStates()),u=false,I){u=o.hasMoreSteps(),o.completeAll(),h(o.computeStates());return}if(o.hasMoreSteps()){let R=o.peekNext();if(R?.autoAdvance){let O=o,B=window.setTimeout(()=>{let F=O.advance();F&&(chunk5YHVN3PP_cjs.Dr(O,F,A),chunk5YHVN3PP_cjs.Er(O,A));},R.autoAdvanceDelayMs??0);t.push(B);}}};return {elementStates:e,advance(){return chunk5YHVN3PP_cjs.Hr(o,A,k)},isComplete(){return !o||!o.hasMoreSteps()},isSeededCompleted(){return u},replayCurrentSlide(M){m&&(T(),L(m,M));},navigateToZoomTarget(M,D,I){return v=chunk5YHVN3PP_cjs.Lo(M,D,I),f=chunk5YHVN3PP_cjs.No(M.transitionDurationMs),M.targetSlideIndex},consumeZoomReturnOnAdvance(M){let D=v,I=chunk5YHVN3PP_cjs.Mo(M,void 0,D);if(I.returnedToZoom&&I.nextSlideIndex!==void 0)return v=I.excursion,f=chunk5YHVN3PP_cjs.No(D?.transitionDurationMs),I.nextSlideIndex},syncStage(M){P();let D=M.showWithAnimation!==false;if(!M.presenting||!M.slide||!D){T(),o=null,e.clear(),chunkFGF6WJ3F_cjs.b(M.doc,""),r=M.presenting?M.stage:null,i=M.presenting?M.stage:null,s=M.slideIndex,a&&!M.presenting&&(Oo(),v=void 0,f=void 0),a=M.presenting;return}chunkFGF6WJ3F_cjs.a(M.doc),p=M.mediaDataUrls??new Map,d=M.reRenderElements??null,r=M.stage,g=M.canvasSize,x=M.themeColorMap,b=M.pixelateMosaicAnimation;let I=!a,R=M.slideIndex!==s,O=m;m=M.slide,I||R||!o?(T(),L(M.slide,M.doc,M.seedCompleted===true)):w();let B=f;f=void 0;let F=M.slideIndex<s,V=B??(F?O?.transition:M.slide.transition);if(!I&&R&&i&&chunk5YHVN3PP_cjs.Br(V,_=>p.get(_),{play:Mt,stop:Oo}),!I&&R&&i&&V&&V.type&&V.type!=="none"){let _=M.stage.cloneNode(true);l=chunkFGF6WJ3F_cjs.d({doc:M.doc,stageWrap:M.stageWrap,outgoing:i,incoming:_,transition:V,outgoingSlide:O,incomingSlide:M.slide,onDone:()=>{l=null;}});}dw(M.stage,{getController:()=>o,play:(_,N)=>{chunk5YHVN3PP_cjs.Dr(_,N,A);},getSlide:()=>M.slide}),i=M.stage,s=M.slideIndex,a=true;},reset(){E(),s=-1,a=false;}}}function cw(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-after-animation-row"),i=chunkIQ7MDPEN_cjs.w(e,"label"),s=chunkIQ7MDPEN_cjs.w(e,"span");s.textContent=t("pptx.animation.afterAnimation");let a=Q(e);a.setAttribute("aria-label",t("pptx.animation.afterAnimation"));for(let u of chunk5YHVN3PP_cjs.rd){let m=e.createElement("option");m.value=u,m.textContent=t(`pptx.animation.afterAnimation.${u}`),a.appendChild(m);}a.addEventListener("change",()=>n(a.value)),i.append(s,a);let l=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-after-animation-color"),p=chunkIQ7MDPEN_cjs.w(e,"span");p.textContent=t("pptx.animation.afterAnimation.color");let d=e.createElement("input");return d.type="color",d.setAttribute("aria-label",t("pptx.animation.afterAnimation.color")),d.addEventListener("change",()=>o(d.value)),l.append(p,d),l.hidden=true,r.append(i,l),{el:r,update(u){a.value=u.action,a.disabled=!u.editable;let m=u.action==="dimToColor";l.hidden=!m,d.value=u.color??"#808080",d.disabled=!u.editable;}}}var mw=["fromTop","fromBottom","fromLeft","fromRight"],uw=[{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"}],xw=["none","untilNextClick","untilEndOfSlide"];function Dr(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-anim-field"),r=chunkIQ7MDPEN_cjs.w(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function nt(e,t,n,o,r){let i=Dr(e,t,r),s=Q(e);s.setAttribute("aria-label",t);for(let a of n){let l=e.createElement("option");l.value=a.value,l.textContent=a.label,s.appendChild(l);}return s.addEventListener("change",()=>o(s.value)),i.appendChild(s),s}function Rr(e,t,n,o,r){let i=Dr(e,t,r),s=e.createElement("input");return s.type="number",s.min=String(n.min),s.max=String(n.max),s.step=String(n.step),s.addEventListener("change",()=>o(s.valueAsNumber)),i.appendChild(s),s}function gw(e,t,n,o){let r=nt(e,t("pptx.animation.trigger.bookmarkLabel"),[],o,n);r.setAttribute("data-pptx-animation-bookmark-picker","");let i=r.parentElement;return {select:r,update(s,a){i.hidden=a?.trigger!=="onMediaBookmark";let l=chunk5YHVN3PP_cjs.fd(s),p=e.createElement("option");p.value="",p.textContent=t(l.length===0?"pptx.animation.trigger.noBookmarks":"pptx.animation.trigger.selectBookmark"),r.replaceChildren(p,...l.map(d=>{let u=e.createElement("option");return u.value=d.value,u.textContent=d.label,u})),r.value=chunk5YHVN3PP_cjs.gd(a),r.disabled||=l.length===0;}}}function Or(e){return chunk5YHVN3PP_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function bw(e,t){let n=t.find(o=>o.id===e.elementId);return n?Or(n):e.elementId.slice(0,8)}function yI(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function fw(e,t,n,o,r,i){let s=chunk5YHVN3PP_cjs.$c(o);n.replaceChildren(...o.map((a,l)=>{let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-anim-bar-seg");p.classList.add(`is-${yI(a)}`),p.classList.toggle("is-selected",a.elementId===i),p.style.left=`${s[l].leftPercent}%`,p.style.width=`${s[l].widthPercent}%`;let d=chunk5YHVN3PP_cjs.ud(a,t);return p.title=`${bw(a,r)} - ${d} (${a.durationMs??500}ms)`,p}));}function vw(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint");let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-animation-timeline-name"),a=n.map(l=>{let p=r.find(d=>d.id===l);return p?Or(p):l.slice(0,8)}).join(", ");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${a}`,i.append(s),i}function hw(e,t,n,o,r,i,s,a,l){let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-row");p.classList.toggle("is-selected",n.elementId===s);let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-animation-timeline-name");d.textContent=`${o+1}. ${bw(n,i)}`;let u=(m,g,x)=>{let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-btn");return b.type="button",b.textContent=g,b.setAttribute("aria-label",t(m==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),b.disabled=x,b.addEventListener("click",()=>l(n.elementId,m)),b};return p.append(d,u("up","\u2191",!a||o===0),u("down","\u2193",!a||o===r-1)),p}var ls="none",ps="current",yw="other";function Sw(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-effect-sound-row"),i=chunkIQ7MDPEN_cjs.w(e,"span");i.textContent=t("pptx.animation.sound");let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-effect-sound-controls"),a=Q(e);a.setAttribute("aria-label",t("pptx.animation.sound"));let l=e.createElement("option");l.value=ls,l.textContent=t("pptx.animation.sound.none");let p=e.createElement("option");p.value=ps;let d=e.createElement("option");d.value=yw,d.textContent=t("pptx.animation.sound.other"),a.append(l);for(let x of chunk5YHVN3PP_cjs.md){let b=e.createElement("option");b.value=x.id,b.textContent=t(x.i18nKey),a.append(b);}a.append(d);let u=e.createElement("button");u.type="button",u.className="pptxv-effect-sound-preview",u.setAttribute("aria-label",t("pptx.animation.sound.preview")),u.textContent="\u25B6",u.disabled=true;let m=e.createElement("input");m.type="file",m.accept="audio/*",m.setAttribute("aria-label",t("pptx.animation.sound.chooseFile")),m.className="pptxv-effect-sound-file-input",m.tabIndex=-1;let g;return a.addEventListener("change",()=>{let x=a.value;if(x===yw){m.click();return}if(x===ls){n(void 0);return}x!==ps&&o(x);}),m.addEventListener("change",()=>{let x=m.files?.[0];if(m.value="",!x)return;let b=new FileReader;b.onload=()=>{typeof b.result=="string"&&n({dataUrl:b.result,fileName:x.name});},b.readAsDataURL(x);}),u.addEventListener("click",()=>{if(!g)return;let x=chunk5YHVN3PP_cjs.nd(g);x&&Mt(x.dataUrl);}),s.append(a,u),r.append(i,s,m),{el:r,update(x){g=x.catalogueId,x.hasSound&&!x.catalogueId?(p.textContent=x.fileName??t("pptx.animation.sound.custom"),p.isConnected||a.insertBefore(p,l.nextSibling)):p.isConnected&&p.remove(),a.value=x.catalogueId??(x.hasSound?ps:ls),a.disabled=!x.editable,u.disabled=!x.catalogueId;}}}function Cw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-motion-path-row"),r=chunkIQ7MDPEN_cjs.w(e,"span");r.textContent=t("pptx.animation.motionPath.label");let i=Q(e);i.setAttribute("aria-label",t("pptx.animation.motionPath.label"));let s=e.createElement("option");s.value="none",s.textContent=t("pptx.animation.motionPath.none"),i.appendChild(s);let a=e.createElement("option");a.value="custom",a.textContent=t("pptx.animation.motionPath.custom");for(let p of chunk5YHVN3PP_cjs.Vd){let d=e.createElement("optgroup");d.label=t(chunk5YHVN3PP_cjs.Wd(p));for(let u of chunk5YHVN3PP_cjs.Yd(p)){let m=e.createElement("option");m.value=u.id,m.textContent=t(chunk5YHVN3PP_cjs.Xd(u.id)),d.appendChild(m);}i.appendChild(d);}i.addEventListener("change",()=>n(i.value));let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-motion-path-hint");return l.textContent=t("pptx.animation.motionPath.editHint"),l.hidden=true,o.append(r,i,l),{el:o,update(p){let d=chunk5YHVN3PP_cjs.Zd(p.motionPath),u=!!p.motionPath&&!d;u?a.parentElement!==i&&i.insertBefore(a,s.nextSibling):a.remove(),i.value=u?"custom":d??"none",i.disabled=!p.editable,l.hidden=!p.motionPath;}}}function ww(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(V=>V.elementId===r.selectedElementId),s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-anim-header"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-section-title");a.textContent=t("pptx.animation.title");let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-anim-preview-btn");l.type="button",l.textContent=t("pptx.animation.preview"),l.addEventListener("click",()=>chunk5YHVN3PP_cjs.fe(e,i())),s.append(a,l),o.appendChild(s);let p=(V,_,N)=>nt(e,t(_),[{value:"none",label:t("pptx.animation.none")},...N.map(W=>({value:W,label:t(`pptx.animation.preset.${W}`)}))],W=>n.setAnimationEffect(V,W),o),d=p("entrance","pptx.animation.entrance",chunk5YHVN3PP_cjs.Ic),u=p("emphasis","pptx.animation.emphasis",chunk5YHVN3PP_cjs.Kc),m=p("exit","pptx.animation.exit",chunk5YHVN3PP_cjs.Jc),g=Cw(e,t,V=>n.applyMotionPath(V));o.appendChild(g.el);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-anim-options");o.appendChild(x);let b=V=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,V);},v=Dr(e,t("pptx.animation.direction"),x);v.classList.add("pptxv-anim-direction");let f=mw.map(V=>{let _=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-anim-direction-btn");return _.type="button",_.textContent=t(`pptx.animation.direction.${V}`),_.addEventListener("click",()=>b({direction:V})),v.appendChild(_),{value:V,btn:_}}),S=nt(e,t("pptx.animation.sequence"),chunk5YHVN3PP_cjs.Mc.map(V=>({value:V,label:t(`pptx.animation.sequence.${V}`)})),V=>b({sequence:V}),x),y=Sw(e,t,V=>{r.selectedElementId&&n.setAnimationSound(r.selectedElementId,V);},V=>{r.selectedElementId&&n.setAnimationStockSound(r.selectedElementId,V);});x.appendChild(y.el);let h=cw(e,t,V=>b({afterAnimation:V}),V=>{b({afterAnimationColor:V}),n.pushRecentColor(V);});x.appendChild(h.el);let C=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-section-title");C.textContent=t("pptx.animation.timing"),x.appendChild(C);let w=nt(e,t("pptx.animation.trigger"),chunk5YHVN3PP_cjs.Lc.map(V=>({value:V,label:t(`pptx.animation.trigger.${V}`)})),V=>b({trigger:V,triggerShapeId:""}),x),A=nt(e,t("pptx.animation.trigger.shapeLabel"),[],V=>b({triggerShapeId:V}),x),P=A.parentElement,k=gw(e,t,x,V=>b({triggerBookmark:V})),T=Rr(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},V=>b({durationMs:V}),x),E=Rr(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},V=>b({delayMs:V}),x),L=nt(e,t("pptx.animation.timingCurve"),uw.map(V=>({value:V.value,label:t(V.labelKey)})),V=>b({timingCurve:V}),x),M=Rr(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},V=>b({repeatCount:V}),x),D=nt(e,t("pptx.animation.repeatUntil"),xw.map(V=>({value:V,label:t(`pptx.animation.repeatUntil.${V}`)})),V=>b({repeatMode:V}),x),I=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-anim-timeline"),R=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-section-title");R.textContent=t("pptx.animation.timelineBar");let O=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-anim-bar"),B=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-section-title");B.textContent=t("pptx.animation.timeline");let F=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-list");return I.append(R,O,B,F),o.appendChild(I),{el:o,update(V){if(r=V,o.hidden=!V.selectedElementId,o.hidden)return;let _=i(),N=!!(_?.entrance||_?.emphasis||_?.exit||_?.motionPath);d.value=_?.entrance??"none",u.value=_?.emphasis??"none",m.value=_?.exit??"none",g.update({motionPath:_?.motionPath,editable:V.editable}),l.hidden=!N,x.hidden=!N;let W=_?chunk5YHVN3PP_cjs.Hc([_],_.elementId):[],X=chunk5YHVN3PP_cjs.Gc(_,W);v.hidden=W.length===0;for(let{value:j,btn:Y}of f)Y.hidden=!W.includes(j),Y.classList.toggle("is-active",X===j),Y.disabled=!V.editable;S.value=_?.sequence??"asOne",y.update({...chunk5YHVN3PP_cjs.od(V.animations,V.selectedElementId??""),editable:V.editable}),h.update({action:_?.afterAnimation??"none",color:_?.afterAnimationColor,editable:V.editable}),w.value=_?.trigger??"onClick",P.hidden=w.value!=="onShapeClick",A.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...V.elements.filter(j=>j.id!==V.selectedElementId).map(j=>({id:j.id,label:Or(j)}))].map(j=>{let Y=e.createElement("option");return Y.value=j.id,Y.textContent=j.label,Y})),A.value=_?.triggerShapeId??"",T.value=String(_?.durationMs??450),E.value=String(_?.delayMs??0),L.value=chunk5YHVN3PP_cjs.Ec(_?.timingCurve),M.value=String(_?.repeatCount??1),D.value=_?.repeatMode??"none";for(let j of [d,u,m,S,w,A,L,D])j.disabled=!V.editable;T.disabled=E.disabled=M.disabled=!V.editable,k.select.disabled=!V.editable,k.update(V.elements,_);let ie=[...V.animations].sort((j,Y)=>(j.order??0)-(Y.order??0)),G=chunk5YHVN3PP_cjs.id(ie,V.animationTimelineAnchors??[]),K=new Map(ie.map(j=>[j.elementId,j]));I.hidden=G.length===0,fw(e,t,O,ie,V.elements,V.selectedElementId),F.replaceChildren(...G.flatMap((j,Y)=>{if(j.kind==="native")return [vw(e,t,j.targetIds,Y,V.elements)];let ue=K.get(j.elementId);return ue?[hw(e,t,ue,Y,G.length,V.elements,V.selectedElementId,V.editable,n.reorderAnimation)]:[]}));}}}function Ho(e,t,n){let o=e.createElement("label");return o.className="pptxv-exhaustive-field",o.textContent=t,n.setAttribute("aria-label",t),n.classList.add("pptxv-exhaustive-field-control"),o.appendChild(n),{label:o,control:n}}function Dt(e,t){return Ho(e,t,e.createElement("input"))}function ge(e,t){let n=Dt(e,t);return n.control.type="number",n}function We(e,t,n){let o=Dt(e,t);return o.control.type="color",n&&o.control.addEventListener("change",()=>n(o.control.value)),o}function ye(e,t){return Ho(e,t,me(e))}function to(e,t,n){let o=Q(e);return it(e,o,n.map(r=>[r,r])),Ho(e,t,o)}function Ve(e,t,n,o){let r=Q(e);return it(e,r,n.map(i=>[i.value,o(i.labelKey)])),Ho(e,t,r)}function rt(e,t,n,o,r){let i=Q(e);return it(e,i,n.map(s=>[s,chunk5YHVN3PP_cjs.Qb(o,s,r)])),Ho(e,t,i)}function it(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let s=e.createElement("option");return s.value=r,s.textContent=i,s})),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 ds(e){return e.split(",").map(Number).filter(Number.isFinite)}function oo(e,t){let{label:n,control:o}=ge(e,t("pptx.chart.dataPointIndex"));return o.min="1",o.value="1",{label:n,control:o,selected:()=>Math.max(0,(o.valueAsNumber||1)-1),subscribe:r=>o.addEventListener("change",r),setSelected:r=>{o.value=String(Math.max(0,r)+1);}}}function Ew(e,t,n,o=oo(e,t),r){let i=e.createElement("div");i.className="pptxv-chart-advanced";let s=to(e,t("pptx.chart.axis"),[]),a=ge(e,t("pptx.chart.axisMinimum")),l=ge(e,t("pptx.chart.axisMaximum")),p=ge(e,t("pptx.chart.majorUnit")),d=Ve(e,t("pptx.chart.displayUnits"),chunk5YHVN3PP_cjs.Kb,t),u=ye(e,t("pptx.chart.logScale")),m=ye(e,t("pptx.chart.reverseOrder")),g=ye(e,t("pptx.chart.majorGridlines")),x=to(e,t("pptx.chart.series"),[]),b=Ve(e,t("pptx.chart.trendlines"),chunk5YHVN3PP_cjs.Lb,t),v=ye(e,t("pptx.chart.trendlineEquation")),f=ye(e,t("pptx.chart.trendlineRSquared")),S=Ve(e,t("pptx.chart.errorBars"),chunk5YHVN3PP_cjs.Mb,t),y=ge(e,t("pptx.chart.errorBarAmount")),h=rt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"],chunk5YHVN3PP_cjs.Yb,t),C=ge(e,t("pptx.chart.markerSize")),w=We(e,t("pptx.chart.seriesColor"),r),A=We(e,t("pptx.chart.dataPointColor"),r),P=ge(e,t("pptx.chart.pointExplosion"));i.append(s.label,a.label,l.label,p.label,d.label,u.label,m.label,g.label,x.label,b.label,v.label,f.label,S.label,y.label,h.label,C.label,w.label,o.label,A.label,P.label);let k,T=()=>Math.max(0,s.control.selectedIndex),E=()=>Math.max(0,x.control.selectedIndex),L=()=>{if(!k)return;let I=[...k.axes??[]],R=I[T()]??{axisType:"valAx"};I[T()]={...R,min:Se(a.control),max:Se(l.control),majorUnit:Se(p.control),displayUnits:d.control.value||void 0,logScale:u.control.checked,orientation:m.control.checked?"maxMin":"minMax",majorGridlines:g.control.checked},n({...k,axes:I});},M=()=>{if(!k?.series[E()])return;let I=[...k.series],R=I[E()],O=b.control.value,B=S.control.value,F=o.selected(),V=R.dataPoints?.find(({idx:N})=>N===F),_=chunk5YHVN3PP_cjs.na(R.dataPoints,{...V??{idx:F},spPr:{...V?.spPr,fillColor:A.control.value},explosion:Se(P.control)});I[E()]={...R,color:w.control.value,trendlines:O?[{trendlineType:O,displayEq:v.control.checked,displayRSq:f.control.checked}]:[],errBars:B?[{direction:"y",barType:"both",valType:B,val:Se(y.control)}]:[],marker:{symbol:h.control.value,size:Se(C.control)},dataPoints:_},n({...k,series:I});};for(let I of [a.control,l.control,p.control,d.control,u.control,m.control,g.control])I.addEventListener("change",L);for(let I of [b.control,v.control,f.control,S.control,y.control,h.control,C.control,w.control,A.control,P.control])I.addEventListener("change",M);s.control.addEventListener("change",()=>k&&D(k)),x.control.addEventListener("change",()=>k&&D(k)),o.subscribe(()=>k&&D(k));let D=I=>{k=I,it(e,s.control,(I.axes??[]).map((F,V)=>[String(V),F.titleText??chunk5YHVN3PP_cjs.Qb(chunk5YHVN3PP_cjs.Wb,F.axisType,t)])),it(e,x.control,I.series.map((F,V)=>[String(V),F.name]));let R=I.axes?.[T()];Ce(a.control,R?.min),Ce(l.control,R?.max),Ce(p.control,R?.majorUnit),d.control.value=R?.displayUnits??"",u.control.checked=R?.logScale??false,m.control.checked=R?.orientation==="maxMin",g.control.checked=R?.majorGridlines??false;let O=I.series[E()];b.control.value=O?.trendlines?.[0]?.trendlineType??"",v.control.checked=O?.trendlines?.[0]?.displayEq??false,f.control.checked=O?.trendlines?.[0]?.displayRSq??false,S.control.value=O?.errBars?.[0]?.valType??"",Ce(y.control,O?.errBars?.[0]?.val),h.control.value=O?.marker?.symbol??"none",Ce(C.control,O?.marker?.size),w.control.value=O?.color??"#4472c4";let B=O?.dataPoints?.find(({idx:F})=>F===o.selected());A.control.value=B?.spPr?.fillColor??O?.color??"#4472c4",Ce(P.control,B?.explosion);};return {el:i,update:D}}var cs="pptxv-chart-grid-cell-highlight";function Tw(e,t,n,o=()=>true){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-chart-grid"),i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-chart-grid-toolbar"),s=e.createElement("table");s.className="pptxv-chart-grid-table";let a=(S,y,h)=>{let C=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-chart-grid-btn");return C.type="button",C.textContent=`+ ${S}`,C.title=y,C.setAttribute("aria-label",y),C.addEventListener("click",h),C},l,p=S=>{S&&n(S);},d=a(t("pptx.chart.cat"),t("pptx.chart.addCategory"),()=>{l&&p(chunk5YHVN3PP_cjs.dc(l));}),u=a(t("pptx.chart.seriesShort"),t("pptx.chart.addSeries"),()=>{l&&p(chunk5YHVN3PP_cjs.bc(l));});i.append(d,u),r.append(i,s);let m=(S,y,h,C)=>{let w=e.createElement("input");return w.type=S,w.className="pptxv-chart-grid-cell",w.value=y,w.setAttribute("aria-label",h),w.addEventListener("change",()=>C(w.value)),w.addEventListener("keydown",A=>A.stopPropagation()),w},g=(S,y)=>{let h=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-chart-grid-remove");return h.type="button",h.textContent="\xD7",h.title=S,h.setAttribute("aria-label",S),h.addEventListener("click",y),h},x=(S,y,h)=>{let C=[...S.series[y].values];for(;C.length<=h;)C.push(0);return {...S,series:S.series.map((w,A)=>A===y?{...w,values:C}:w)}},b=(S,y)=>{let h=e.createElement("thead"),C=e.createElement("tr"),w=e.createElement("th");return w.setAttribute("aria-label",t("pptx.chart.categories")),C.appendChild(w),S.series.forEach((A,P)=>{let k=e.createElement("th"),T=m("text",A.name,t("pptx.chart.seriesShort"),E=>n({...S,series:S.series.map((L,M)=>M===P?{...L,name:E}:L)}));y?.seriesIndex===P&&y.pointIndex===void 0&&T.classList.add(cs),k.appendChild(T),S.series.length>1&&k.appendChild(g(t("pptx.chart.removeSeries"),()=>p(chunk5YHVN3PP_cjs.cc(S,P)))),C.appendChild(k);}),h.appendChild(C),h},v=(S,y)=>{let h=e.createElement("tbody");return S.categories.forEach((C,w)=>{let A=e.createElement("tr"),P=e.createElement("td");P.appendChild(m("text",C,t("pptx.chart.categories"),k=>p(chunk5YHVN3PP_cjs.fc(S,w,k)))),S.categories.length>1&&P.appendChild(g(t("pptx.chart.removeCategory"),()=>p(chunk5YHVN3PP_cjs.ec(S,w,o())))),A.appendChild(P),S.series.forEach((k,T)=>{let E=e.createElement("td"),L=m("number",String(k.values[w]??0),`${k.name} value ${w+1}`,M=>{let D=w>=k.values.length?x(S,T,w):S;p(chunk5YHVN3PP_cjs.gc(D,T,w,M));});y?.seriesIndex===T&&y.pointIndex===w&&L.classList.add(cs),E.appendChild(L),A.appendChild(E);}),h.appendChild(A);}),h},f=null;return {el:r,update(S,y=null){if(l=S,r.hidden=!S,!S)return;s.textContent="",s.append(b(S,y),v(S,y));let h=y?`${y.seriesIndex}:${y.pointIndex??""}`:null;h!==null&&h!==f&&s.querySelector(`.${cs}`)?.scrollIntoView?.({block:"nearest",inline:"nearest"}),f=h;},setDisabled(S){d.disabled=S,u.disabled=S;for(let y of s.querySelectorAll("input"))y.disabled=S;}}}var SI=chunk5YHVN3PP_cjs.Ob.filter(e=>e.value!=="");function Pw(e,t,n){let o=to(e,t("pptx.chart.series"),[]),r=rt(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"],chunk5YHVN3PP_cjs.Ub,t),i=ye(e,t("pptx.chart.secondaryAxis")),s=rt(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"],chunk5YHVN3PP_cjs.Xb,t),a=ye(e,t("pptx.chart.showValue")),l=ye(e,t("pptx.chart.showCategory")),p=ye(e,t("pptx.chart.showSeriesName")),d=ye(e,t("pptx.chart.showPercentage")),u=ye(e,t("pptx.chart.showLeaderLines")),m=ge(e,t("pptx.chart.trendlineOrder")),g=ge(e,t("pptx.chart.trendlinePeriod")),x=ge(e,t("pptx.chart.forecastForward")),b=ge(e,t("pptx.chart.forecastBackward")),v=ge(e,t("pptx.chart.trendlineIntercept")),f=We(e,t("pptx.chart.trendlineColor"),n),S=rt(e,t("pptx.chart.errorBarDirection"),["x","y"],chunk5YHVN3PP_cjs.Zb,t),y=Ve(e,t("pptx.chart.errorBarType"),chunk5YHVN3PP_cjs.Nb,t),h=We(e,t("pptx.chart.errorBarColor"),n),C=ye(e,t("pptx.chart.noEndCap")),w=Dt(e,t("pptx.chart.customPlus")),A=Dt(e,t("pptx.chart.customMinus")),P=We(e,t("pptx.chart.markerFill"),n),k=We(e,t("pptx.chart.markerOutline"),n),T=Ve(e,t("pptx.chart.dataPointMarker"),SI,t),E=ge(e,t("pptx.chart.markerSize")),L=ye(e,t("pptx.chart.invertIfNegative")),M=to(e,t("pptx.chart.axis"),[]),D=Dt(e,t("pptx.chart.axisTitle")),I=ge(e,t("pptx.chart.minorUnit")),R=ye(e,t("pptx.chart.minorGridlines")),O=Dt(e,t("pptx.chart.numberFormat")),B=Ve(e,t("pptx.chart.tickLabelPosition"),chunk5YHVN3PP_cjs.Jb,t),F=We(e,t("pptx.chart.axisColor"),n),V=We(e,t("pptx.chart.axisFontColor"),n),_=ge(e,t("pptx.chart.axisFontSize"));return {series:o,axis:M,comboType:r,secondaryAxis:i,labelPosition:s,showValue:a,showCategory:l,showSeries:p,showPercent:d,leaderLines:u,trendOrder:m,trendPeriod:g,trendForward:x,trendBackward:b,trendIntercept:v,trendColor:f,errorDirection:S,errorBarType:y,errorColor:h,noEndCap:C,customPlus:w,customMinus:A,markerFill:P,markerLine:k,pointMarker:T,pointMarkerSize:E,pointInvert:L,axisTitle:D,minorUnit:I,minorGridlines:R,numberFormat:O,tickPosition:B,axisColor:F,axisFontColor:V,axisFontSize:_,seriesFields:[r,i,s,a,l,p,d,u,m,g,x,b,v,f,S,y,h,C,w,A,P,k,T,E,L],axisFields:[D,I,R,O,B,F,V,_]}}function Aw(e,t,n,o,r){let i=e.createElement("div");i.className="pptxv-chart-exhaustive";let{series:s,axis:a,comboType:l,secondaryAxis:p,labelPosition:d,showValue:u,showCategory:m,showSeries:g,showPercent:x,leaderLines:b,trendOrder:v,trendPeriod:f,trendForward:S,trendBackward:y,trendIntercept:h,trendColor:C,errorDirection:w,errorBarType:A,errorColor:P,noEndCap:k,customPlus:T,customMinus:E,markerFill:L,markerLine:M,pointMarker:D,pointMarkerSize:I,pointInvert:R,axisTitle:O,minorUnit:B,minorGridlines:F,numberFormat:V,tickPosition:_,axisColor:N,axisFontColor:W,axisFontSize:X,seriesFields:ie,axisFields:G}=Pw(e,t,r),K=o===void 0,j=o??oo(e,t);i.append(s.label,...K?[j.label]:[],...ie.map(({label:ne})=>ne),a.label,...G.map(({label:ne})=>ne));let Y,ue=()=>Math.max(0,s.control.selectedIndex),Te=()=>Math.max(0,a.control.selectedIndex),Me=()=>{let ne=Y?.series[ue()];if(!Y||!ne)return;let De=[...Y.series],Qe=ne.trendlines?.[0],Ze=ne.errBars?.[0],Je=j.selected(),zt=ne.dataPoints?.find(({idx:_e})=>_e===Je);De[ue()]={...ne,seriesChartType:l.control.value,axisId:chunk5YHVN3PP_cjs._r(Y,p.control.checked),trendlines:Qe?[{...Qe,order:Se(v.control),period:Se(f.control),forward:Se(S.control),backward:Se(y.control),intercept:Se(h.control),color:C.control.value}]:[],errBars:Ze?[{...Ze,direction:w.control.value,barType:A.control.value,color:P.control.value,noEndCap:k.control.checked,customPlus:ds(T.control.value),customMinus:ds(E.control.value)}]:[],marker:{...ne.marker??{symbol:"auto"},spPr:{fillColor:L.control.value,strokeColor:M.control.value}},dataPoints:chunk5YHVN3PP_cjs.na(ne.dataPoints,{...zt??{idx:Je},invertIfNegative:R.control.checked,marker:{...zt?.marker,symbol:D.control.value,size:Se(I.control)}})},n({...Y,series:De,style:{...Y.style,hasDataLabels:true,dataLabels:{...Y.style?.dataLabels,position:d.control.value,showValue:u.control.checked,showCategory:m.control.checked,showSeriesName:g.control.checked,showPercent:x.control.checked,showLeaderLines:b.control.checked}}});},Xo=()=>{let ne=Y?.axes?.[Te()];if(!Y||!ne)return;let De=[...Y.axes??[]];De[Te()]={...ne,titleText:O.control.value,minorUnit:Se(B.control),minorGridlines:F.control.checked,numFmt:{formatCode:V.control.value},tickLblPos:_.control.value,spPr:{...ne.spPr,strokeColor:N.control.value},fontColor:W.control.value,fontSize:Se(X.control)},n({...Y,axes:De});};for(let ne of ie)ne.control.addEventListener("change",Me);for(let ne of G)ne.control.addEventListener("change",Xo);s.control.addEventListener("change",()=>Y&&Tt(Y)),a.control.addEventListener("change",()=>Y&&Tt(Y)),j.subscribe(()=>Y&&Tt(Y));let Tt=ne=>{Y=ne,it(e,s.control,ne.series.map((Nt,Ci)=>[String(Ci),Nt.name])),it(e,a.control,(ne.axes??[]).map((Nt,Ci)=>[String(Ci),Nt.titleText??chunk5YHVN3PP_cjs.Qb(chunk5YHVN3PP_cjs.Wb,Nt.axisType,t)]));let De=ne.series[ue()],Qe=De?.trendlines?.[0],Ze=De?.errBars?.[0];l.control.value=De?.seriesChartType??ne.chartType,p.control.checked=chunk5YHVN3PP_cjs.Zr(ne,ue());let Je=ne.style?.dataLabels;d.control.value=Je?.position??"bestFit",u.control.checked=Je?.showValue??false,m.control.checked=Je?.showCategory??false,g.control.checked=Je?.showSeriesName??false,x.control.checked=Je?.showPercent??false,b.control.checked=Je?.showLeaderLines??false,Ce(v.control,Qe?.order),Ce(f.control,Qe?.period),Ce(S.control,Qe?.forward),Ce(y.control,Qe?.backward),Ce(h.control,Qe?.intercept),C.control.value=Qe?.color??"#4472c4",w.control.value=Ze?.direction??"y",A.control.value=Ze?.barType??"both",P.control.value=Ze?.color??"#000000",k.control.checked=Ze?.noEndCap??false,T.control.value=Ze?.customPlus?.join(", ")??"",E.control.value=Ze?.customMinus?.join(", ")??"",L.control.value=De?.marker?.spPr?.fillColor??"#4472c4",M.control.value=De?.marker?.spPr?.strokeColor??"#000000";let zt=De?.dataPoints?.find(({idx:Nt})=>Nt===j.selected());D.control.value=zt?.marker?.symbol??"none",Ce(I.control,zt?.marker?.size),R.control.checked=zt?.invertIfNegative??false;let _e=ne.axes?.[Te()];O.control.value=_e?.titleText??"",Ce(B.control,_e?.minorUnit),F.control.checked=_e?.minorGridlines??false,V.control.value=_e?.numFmt?.formatCode??"",_.control.value=_e?.tickLblPos??"nextTo",N.control.value=_e?.spPr?.strokeColor??"#000000",W.control.value=_e?.fontColor??"#000000",Ce(X.control,_e?.fontSize);};return {el:i,update:Tt}}function kw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-filters",o.hidden=true;let r=e.createElement("h5");r.textContent=t("pptx.chart.chartFilters");let i=e.createElement("div");i.className="pptxv-chart-filters-visible";let s=e.createElement("div");s.className="pptxv-chart-filters-hidden";let a=e.createElement("div");a.className="pptxv-chart-filters-ranges",o.append(r,i,s,a);let l,p=true;function d(h){let C=l&&chunk5YHVN3PP_cjs.hc(l,h);C&&n(C);}function u(h){let C=l&&chunk5YHVN3PP_cjs.ic(l,h);C&&n(C);}function m(h,C,w){l&&n({...l,series:l.series.map((A,P)=>P===h?chunk5YHVN3PP_cjs.jc(A,C,w):A)});}function g(h,C,w){let A=e.createElement("div");A.className=w?"pptxv-chart-filters-row is-filtered":"pptxv-chart-filters-row";let P=e.createElement("span");return P.className="pptxv-chart-filters-name",P.title=h,P.textContent=h,A.append(P,C),A}function x(h,C,w){let A=e.createElement("button");return A.type="button",A.dataset.testid=h,A.setAttribute("aria-label",C),A.title=C,A.textContent=C,A.disabled=!p,A.addEventListener("click",w),A}function b(h){i.replaceChildren(),!(h.series.length<=1)&&h.series.forEach((C,w)=>{let A=t("pptx.chart.hideSeries",{name:C.name}),P=x(`chart-series-hide-${w}`,A,()=>d(w));i.append(g(C.name,P,false));});}function v(h){s.replaceChildren(),(h.filteredSeries??[]).forEach((C,w)=>{let A=C.name??h.filteredSeriesTitle??t("pptx.chart.seriesShort"),P=t("pptx.chart.showSeries",{name:A}),k=x(`chart-series-show-${w}`,P,()=>u(w));s.append(g(A,k,true));});}function f(h){a.replaceChildren(),h.series.forEach((C,w)=>{let A=C.dataLabelOptions?.dataLabelsRange;if(!A)return;let P=e.createElement("div");P.className="pptxv-chart-filters-range";let k=e.createElement("div");k.className="pptxv-chart-filters-range-title",k.title=C.name,k.textContent=t("pptx.chart.valueFromCells",{name:C.name}),P.append(k),A.cache.forEach((T,E)=>{let L=e.createElement("label");L.className="pptxv-chart-filters-range-field";let M=e.createElement("span"),D=h.categories[E]??String(E);M.textContent=D;let I=e.createElement("input");I.type="text",I.value=T,I.disabled=!p,I.dataset.testid=`chart-dlbl-range-${w}-${E}`,I.setAttribute("aria-label",D),I.addEventListener("change",()=>m(w,E,I.value)),L.append(M,I),P.append(L);}),a.append(P);});}function S(h){l=h;let C=h.filteredSeries?.length??0,w=h.series.filter(A=>A.dataLabelOptions?.dataLabelsRange).length;if(o.hidden=C===0&&w===0&&h.series.length<=1,o.hidden){i.replaceChildren(),s.replaceChildren(),a.replaceChildren();return}b(h),v(h),f(h);}function y(){for(let h of o.querySelectorAll("button, input"))h.disabled=!p;}return {el:o,update:S,setEditable(h){p=h,y();}}}function Iw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-subtype";let r=Ve(e,t("pptx.chart.bar3DShapeLabel"),chunk5YHVN3PP_cjs.hs,t);r.control.dataset.testid="pptx-chart-bar3d-shape";let i=Ve(e,t("pptx.chart.radarStyleLabel"),chunk5YHVN3PP_cjs.is,t);i.control.dataset.testid="pptx-chart-radar-style";let s=Ve(e,t("pptx.chart.surfaceWireframeLabel"),chunk5YHVN3PP_cjs.js,t);s.control.dataset.testid="pptx-chart-surface-wireframe",o.append(r.label,i.label,s.label);let a;return r.control.addEventListener("change",()=>{a&&n({...a,...chunk5YHVN3PP_cjs.ks(a,r.control.value)});}),i.control.addEventListener("change",()=>{a&&n({...a,...chunk5YHVN3PP_cjs.ls(a,i.control.value)});}),s.control.addEventListener("change",()=>{a&&n({...a,...chunk5YHVN3PP_cjs.ms(a,s.control.value==="true")});}),{el:o,update:p=>{a=p,r.label.hidden=p.chartType!=="bar3D",i.label.hidden=p.chartType!=="radar",s.label.hidden=p.chartType!=="surface",r.control.value=p.barShape??"box",i.control.value=p.radarStyle??"standard",s.control.value=p.wireframe?"true":"false";}}}function at(e,t,n){let o=e.createElement("input");return o.type="number",o.step="0.01",o.min="0",o.max="1",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function Lw(e,t,n,o,r){let i=e.createElement("input");return i.type="number",i.step=o,i.value=String(t),i.setAttribute("aria-label",n),i.addEventListener("change",()=>r(Number(i.value))),i}function ms(e,t,n){let o=e.createElement("input");return o.type="number",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function us(e,t,n,o){let r=e.createElement("input");return r.type="text",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function xs(e,t,n,o){let r=me(e);return r.checked=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.checked)),r}function gs(e,t,n,o){let r=e.createElement("input");return r.type="color",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function Pe(e,t,...n){let o=e.createElement("span");return o.textContent=t,[o,...n]}function Mw(e,t,n,o,r,i,s,a){let l=e.createElement("div");l.className="pptxv-chart-usershape-anchor";let p=()=>Pe(e,t("pptx.chart.userShapeRotation"),Lw(e,n.rotation??0,t("pptx.chart.userShapeRotation"),"1",m=>s(n.path,m||void 0))),d=()=>[...Pe(e,t("pptx.arrange.flipHorizontally"),xs(e,n.flipH??false,t("pptx.arrange.flipHorizontally"),m=>a(n.path,{flipH:m}))),...Pe(e,t("pptx.arrange.flipVertically"),xs(e,n.flipV??false,t("pptx.arrange.flipVertically"),m=>a(n.path,{flipV:m})))];if(n.depth===0){let m=n.from;if(l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,m.x,g=>r(n.path,{from:{...m,x:g}})),at(e,m.y,g=>r(n.path,{from:{...m,y:g}})))),n.anchor==="rel"&&n.to){let g=n.to;l.append(...Pe(e,t("pptx.chart.userShapeTo"),at(e,g.x,x=>r(n.path,{to:{...g,x}})),at(e,g.y,x=>r(n.path,{to:{...g,y:x}}))));}if(n.anchor==="abs"&&n.ext){let g=n.ext;l.append(...Pe(e,t("pptx.chart.userShapeSize"),ms(e,g.cx,x=>r(n.path,{ext:{...g,cx:x}})),ms(e,g.cy,x=>r(n.path,{ext:{...g,cy:x}}))));}return l.append(...p(),...d()),l}let u=chunk5YHVN3PP_cjs.xc(o?.userShapes,n.path);return u&&l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,u.from.x,m=>i(n.path,{from:{...u.from,x:m},to:u.to})),at(e,u.from.y,m=>i(n.path,{from:{...u.from,y:m},to:u.to}))),...Pe(e,t("pptx.chart.userShapeTo"),at(e,u.to.x,m=>i(n.path,{from:u.from,to:{...u.to,x:m}})),at(e,u.to.y,m=>i(n.path,{from:u.from,to:{...u.to,y:m}}))),...p(),...d()),l}function Dw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-usershapes";let r=e.createElement("h5");r.textContent=t("pptx.chart.userShapes");let i=e.createElement("button");i.type="button",i.dataset.testid="chart-user-shape-add",i.textContent=t("pptx.chart.userShapeAddTextBox");let s=e.createElement("div");s.className="pptxv-chart-usershapes-header",s.append(r,i);let a=e.createElement("p");a.className="pptxv-chart-usershapes-empty",a.textContent=t("pptx.chart.userShapesEmpty");let l=e.createElement("div");l.className="pptxv-chart-usershapes-list",o.append(s,a,l);let p;i.addEventListener("click",()=>{p&&n({userShapes:chunk5YHVN3PP_cjs.qc(p.userShapes,chunk5YHVN3PP_cjs.pc())});});function d(y,h){p&&n({userShapes:chunk5YHVN3PP_cjs.sc(p.userShapes,y,h)});}function u(y,h){p&&n({userShapes:chunk5YHVN3PP_cjs.uc(p.userShapes,y,h)});}function m(y){p&&n({userShapes:chunk5YHVN3PP_cjs.tc(p.userShapes,y)});}function g(y,h){p&&n({userShapes:chunk5YHVN3PP_cjs.yc(p.userShapes,y,h)});}function x(y,h){p&&n({userShapes:chunk5YHVN3PP_cjs.vc(p.userShapes,y,h)});}function b(y,h){p&&n({userShapes:chunk5YHVN3PP_cjs.wc(p.userShapes,y,h)});}function v(y){if(!p)return;let h=chunk5YHVN3PP_cjs.zc(p.userShapes,y);h&&n({userShapes:chunk5YHVN3PP_cjs.Bc(p.userShapes,y,chunk5YHVN3PP_cjs.Ac(h))});}function f(y){let h=e.createElement("div");h.className="pptxv-chart-usershape-row",h.dataset.testid="chart-user-shape-row",h.dataset.chartUserShapePath=y.path.join(","),h.style.marginLeft=`${y.depth*12}px`;let C=e.createElement("span"),w=`pptx.chart.userShapeKind${y.kind.charAt(0).toUpperCase()}${y.kind.slice(1)}`;C.textContent=y.text?`${t(w)} - ${y.text}`:t(w);let A=e.createElement("button");A.type="button",A.dataset.testid="chart-user-shape-delete",A.setAttribute("aria-label",t("pptx.chart.userShapeDelete")),A.textContent="\u2715",A.addEventListener("click",()=>m(y.path));let P=e.createElement("div");if(P.className="pptxv-chart-usershape-top",P.append(C),y.isGroup){let k=e.createElement("button");k.type="button",k.dataset.testid="chart-user-shape-add-into-group",k.textContent=t("pptx.chart.userShapeAddIntoGroup"),k.addEventListener("click",()=>v(y.path)),P.append(k);}if(P.append(A),h.append(P),y.editableVisuals){let k=e.createElement("div");k.className="pptxv-chart-usershape-text",k.append(...Pe(e,t("pptx.chart.userShapeText"),us(e,y.text??"",t("pptx.chart.userShapeText"),E=>u(y.path,E)))),h.append(k);let T=e.createElement("div");T.className="pptxv-chart-usershape-colors",T.append(...Pe(e,t("pptx.chart.userShapeFill"),gs(e,y.fill??"#ffffff",t("pptx.chart.userShapeFill"),E=>d(y.path,{fill:E}))),...Pe(e,t("pptx.chart.userShapeStroke"),gs(e,y.stroke??"#000000",t("pptx.chart.userShapeStroke"),E=>d(y.path,{stroke:E})))),h.append(T);}if(y.editableAltText){let k=e.createElement("div");k.className="pptxv-chart-usershape-alt-text",k.append(...Pe(e,t("pptx.chart.userShapeAltText"),us(e,y.altText??"",t("pptx.chart.userShapeAltText"),T=>d(y.path,{altText:T})))),h.append(k);}return h.append(Mw(e,t,y,p,d,g,x,b)),h}function S(y){p=y,l.replaceChildren();let h=chunk5YHVN3PP_cjs.rc(y.userShapes);a.hidden=h.length>0;for(let C of h)l.append(f(C));}return {el:o,update:S}}var CI=chunk5YHVN3PP_cjs.Ib.map(e=>e.value),wI=["clustered","stacked","percentStacked"];function Ow(e,t,n,o){let r=n(t("pptx.chart.data")),i=Hw(e,"text",t("pptx.chart.title")),s=rt(e,t("pptx.chart.type"),CI,chunk5YHVN3PP_cjs.Ub,t),a=rt(e,t("pptx.chart.grouping"),wI,chunk5YHVN3PP_cjs.Vb,t),l=Tw(e,t,y=>o.setChartData(y),()=>o.getChartFollowDataPoint()),p=Rw(e,t("pptx.chart.showLegend")),d=Rw(e,t("pptx.chart.dataLabels")),u=oo(e,t),m=Ew(e,t,y=>o.setChartData(y),u,o.pushRecentColor),g=Aw(e,t,y=>o.setChartData(y),u,o.pushRecentColor),x=Iw(e,t,y=>o.setChartData(y)),b=kw(e,t,y=>o.setChartData(y)),v=Dw(e,t,y=>{f&&o.setChartData({...f,...y});});r.append(i.label,s.label,a.label,l.el,p.label,d.label,m.el,b.el,x.el,g.el,v.el);let f,S=()=>{if(!f)return;let y=s.control.value,h=y===f.chartType?f:chunk5YHVN3PP_cjs.Pb(f,{chartType:y});o.setChartData({...h,...chunk5YHVN3PP_cjs.ka(h,i.control.value),grouping:a.control.value,style:{...h.style,hasTitle:i.control.value.trim().length>0,hasLegend:p.control.checked,...d.control.checked!==(h.style?.hasDataLabels??false)?chunk5YHVN3PP_cjs.lc(h.style,d.control.checked):{hasDataLabels:d.control.checked}}});};for(let y of [i.control,s.control,a.control,p.control,d.control])y.addEventListener("change",S);return {el:r,update(y){r.hidden=!y.isChart,f=y.chartData,f&&(i.control.value=f.title??"",s.control.value=chunk5YHVN3PP_cjs.sa(f),a.control.value=f.grouping??"clustered",y.chartHighlightCell?.pointIndex!==void 0&&u.setSelected(y.chartHighlightCell.pointIndex),l.update(f,y.chartHighlightCell??null),p.control.checked=f.style?.hasLegend??false,d.control.checked=f.style?.hasDataLabels??false,m.update(f),b.update(f),x.update(f),g.update(f),v.update(f));},setEditable(y){b.setEditable(y);}}}function Hw(e,t,n){let o=e.createElement("label");o.textContent=n;let r=t==="checkbox"?me(e):e.createElement("input");return t!=="checkbox"&&(r.type=t),o.appendChild(r),{label:o,control:r}}function Rw(e,t){return Hw(e,"checkbox",t)}function Hr(e,t){let n=new Set(e.map(r=>r.id)),o=t.filter(r=>!n.has(r.id)).map(r=>({id:r.id,name:r.name,userId:"",providerId:""}));return [...e,...o]}function no(e){let{doc:t,t:n,field:o}=e,r=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-comment-mention-suggestions");r.dataset.testid="pptx-comment-mention-suggestions",r.hidden=true,r.setAttribute("role","listbox"),r.setAttribute("aria-label",n("pptx.comments.mentionSuggestions")),r.title=n("pptx.comments.mentionPlaceholder");let i=[],s=0,a=()=>{r.hidden=true,r.replaceChildren(),i=[];},l=x=>{let b=o.selectionStart??o.value.length,v=chunk5YHVN3PP_cjs.nn(o.value,e.getMentions(),b,x);o.value=v.text,o.setSelectionRange(v.caret,v.caret),e.onChange({text:v.text,mentions:v.mentions}),a(),o.focus();},p=()=>{r.replaceChildren(),i.forEach((x,b)=>{let v=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-comment-mention-option");v.type="button",v.dataset.testid="pptx-comment-mention-option",v.setAttribute("role","option"),v.setAttribute("aria-selected",String(b===s)),v.classList.toggle("is-active",b===s),v.textContent=x.name,v.addEventListener("mousedown",f=>{f.preventDefault(),l(x);}),r.appendChild(v);}),r.hidden=i.length===0;},d=()=>{let x=o.selectionStart??o.value.length,b=chunk5YHVN3PP_cjs.ln(o.value,x);if(!b){a();return}i=chunk5YHVN3PP_cjs.mn([...e.getAuthors()],b.query),s=0,p();},u=()=>d(),m=x=>{if(!(r.hidden||i.length===0))if(x.key==="ArrowDown")x.preventDefault(),s=(s+1)%i.length,p();else if(x.key==="ArrowUp")x.preventDefault(),s=(s-1+i.length)%i.length,p();else if(x.key==="Enter"||x.key==="Tab"){let b=i[s];b&&(x.preventDefault(),l(b));}else x.key==="Escape"&&(x.preventDefault(),a());},g=()=>a();return o.addEventListener("input",u),o.addEventListener("keydown",m),o.addEventListener("blur",g),{el:r,destroy(){o.removeEventListener("input",u),o.removeEventListener("keydown",m),o.removeEventListener("blur",g);}}}function Fw(e,t,n){e.textContent="";let o=e.ownerDocument,r=chunk5YHVN3PP_cjs.kn(t,n);if(r.length===0)return e.textContent=t,e;for(let i of r){if(i.kind!=="mention"){e.appendChild(o.createTextNode(i.text));continue}let s=o.createElement("span");s.className=chunk5YHVN3PP_cjs.jn,s.setAttribute(chunk5YHVN3PP_cjs.in,i.personId||""),i.authorName&&(s.title=i.authorName),s.textContent=i.text,e.appendChild(s);}return e}function Fr(e,t,n,o=()=>[]){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-list"),i=null,s="",a=null,l="",p=[],d=new Set,u=[],m=false,g=()=>{r.replaceChildren(...u.map(C=>h(C,m,0)));},x=(C,w)=>{let A=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-comment-action");return A.type="button",A.textContent=C,A.addEventListener("click",w),A},b=(C,w,A)=>{let P=e.createElement("textarea");return P.className="pptxv-inspector-comment-input",P.rows=2,P.value=C,P.placeholder=w,P.addEventListener("input",()=>A(P.value)),P},v=C=>{let w=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-edit"),A=b(s,"",k=>{s=k;});A.setAttribute("aria-label",t("pptx.comments.edit"));let P=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-actions");return P.append(x(t("pptx.comments.save"),()=>{s.trim()&&n.editComment(C.id,s.trim()),i=null,g();}),x(t("pptx.comments.cancel"),()=>{i=null,g();})),w.append(A,P),w},f=C=>{let w=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-reply-form"),A=b(l,t("pptx.comments.replyPlaceholder",{author:C.author||t("pptx.comments.unknownAuthor")}),T=>{l=T;});A.setAttribute("aria-label",t("pptx.comments.reply"));let P=no({doc:e,t,field:A,getAuthors:o,getMentions:()=>p,onChange:T=>{l=T.text,p=T.mentions;}}),k=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-actions");return k.append(x(t("pptx.comments.addReply"),()=>{l.trim()&&n.addCommentReply(C.id,l.trim(),p),P.destroy(),a=null,l="",p=[],g();}),x(t("pptx.comments.cancel"),()=>{P.destroy(),a=null,g();})),w.append(A,P.el,k),w},S=(C,w)=>{let A=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-actions");return A.appendChild(x(t("pptx.comments.edit"),()=>{i=C.id,s=C.text,g();})),w===0&&A.appendChild(x(t("pptx.comments.reply"),()=>{a=C.id,l="",p=[],g();})),A.append(x(t(C.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(C.id)),x(t("pptx.comments.delete"),()=>n.deleteComment(C.id))),A},y=(C,w,A)=>{let P=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-replies-wrap"),k=C.replies??[],T=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-comment-replies-toggle");if(T.type="button",T.textContent=t("pptx.comments.repliesCount",{count:k.length}),T.setAttribute("aria-expanded",String(!d.has(C.id))),T.addEventListener("click",()=>{d.has(C.id)?d.delete(C.id):d.add(C.id),g();}),P.appendChild(T),!d.has(C.id)){let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-replies");E.append(...k.map(L=>h(L,w,A+1))),P.appendChild(E);}return P};function h(C,w,A){let P=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment");P.classList.toggle("is-resolved",C.resolved===true),P.classList.toggle("is-reply",A>0);let k=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-meta");if(k.textContent=C.author||t("pptx.comments.unknownAuthor"),C.resolved){let T=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-comment-badge");T.textContent=t("pptx.comments.resolved"),k.appendChild(T);}if(P.appendChild(k),i===C.id)P.appendChild(v(C));else {let T=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-inspector-comment-text");Fw(T,C.text,C.mentions),P.appendChild(T),w&&P.appendChild(S(C,A));}return (C.replies??[]).length>0&&P.appendChild(y(C,w,A)),a===C.id&&P.appendChild(f(C)),P}return {el:r,update(C,w){u=C,m=w,g();}}}function Vw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comments"),r=[],i=Fr(e,t,n,()=>r);o.appendChild(i.el);let s=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-inspector-empty");s.textContent=t("pptx.comments.noComments"),o.appendChild(s);let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-comment-add"),l=e.createElement("textarea");l.className="pptxv-inspector-comment-input",l.rows=2,l.placeholder=t("pptx.comments.addCommentPlaceholder"),l.setAttribute("aria-label",t("pptx.comments.addComment"));let p=[],d=no({doc:e,t,field:l,getAuthors:()=>r,getMentions:()=>p,onChange:m=>{l.value=m.text,p=m.mentions;}}),u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-deck-btn");return u.type="button",u.textContent=t("pptx.comments.addComment"),u.addEventListener("click",()=>{let m=l.value.trim();m&&(n.addComment(m,p),l.value="",p=[]);}),a.append(l,d.el,u),o.appendChild(a),{el:o,update(m){r=m.commentMentionAuthors,s.hidden=m.comments.length>0,a.hidden=!m.editable,i.update(m.comments,m.editable);}}}function be(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-section"),o=chunkIQ7MDPEN_cjs.w(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=chunkIQ7MDPEN_cjs.w(e,"div");return n.appendChild(r),{el:n,body:r}}function ht(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-row"),o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function $e(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function Bw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.presentation")),i,s=he(e,{label:t("pptx.presentationSettings.showType"),webComponent:true,options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:g=>n.updatePresentationSettings({showType:g})}),a=oe(e,{label:t("pptx.presentationSettings.loopContinuously"),webComponent:true,onChange:g=>n.updatePresentationSettings({loopContinuously:g})}),l=oe(e,{label:t("pptx.presentationSettings.showNarration"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithNarration:g})}),p=oe(e,{label:t("pptx.presentationSettings.showAnimation"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithAnimation:g})}),d=oe(e,{label:t("pptx.presentationSettings.frameSlides"),webComponent:true,onChange:g=>n.updatePresentationSettings({printProperties:chunk5YHVN3PP_cjs.qk(i,g)})}),u=e.createElement("input");u.type="number",u.min="1",u.max="16",u.className="pptxv-field-input",u.setAttribute("aria-label",t("pptx.presentationSettings.slidesPerPage")),u.addEventListener("change",()=>{let g=Number.parseInt(u.value,10);Number.isFinite(g)&&n.updatePresentationSettings({printProperties:chunk5YHVN3PP_cjs.rk(i,g)});});let m=ht(e,t("pptx.presentationSettings.slidesPerPage"));return m.value.appendChild(u),r.append(s.el,a.el,l.el,p.el,d.el,m.el),{el:o,update(g){let x=g.presentationProperties;i=x.printProperties,s.setValue(x.showType??"presented"),a.setValue(!!x.loopContinuously),l.setValue(x.showWithNarration!==false),p.setValue(x.showWithAnimation!==false),d.setValue(chunk5YHVN3PP_cjs.pk(x.printProperties)),e.activeElement!==u&&(u.value=String(chunk5YHVN3PP_cjs.ok(x.printProperties)));for(let b of [s,a,l,p,d])b.setDisabled(!g.editable);u.disabled=!g.editable;}}}function zw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slide-size-rescale");o.hidden=true,o.setAttribute("role","group"),o.setAttribute("aria-label",t("pptx.slideSize.rescaleTitle"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slide-size-rescale-title");r.textContent=t("pptx.slideSize.rescaleTitle");let i=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-slide-size-rescale-description");i.textContent=t("pptx.slideSize.rescaleDescription");let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slide-size-rescale-buttons");function a(l,p,d,u){let m=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-slide-size-rescale-btn");return m.type="button",m.dataset.testid=l,m.title=t(d),m.textContent=t(p),m.addEventListener("click",()=>n(u)),m}return s.append(a("pptx-slide-size-rescale-maximize","pptx.slideSize.rescaleMaximize","pptx.slideSize.rescaleMaximizeHint","maximize"),a("pptx-slide-size-rescale-ensure-fit","pptx.slideSize.rescaleEnsureFit","pptx.slideSize.rescaleEnsureFitHint","ensureFit")),o.append(r,i,s),{el:o,show(){o.hidden=false;},hide(){o.hidden=true;}}}var Nw="__custom__";function EI(e,t){return e.widthEmu!==t.widthEmu||e.heightEmu!==t.heightEmu}var TI=[["landscape","pptx.slideSize.landscape"],["portrait","pptx.slideSize.portrait"]];function _w(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideSize.title")),i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.slideSize.presets");let a=Q(e);a.className="pptxv-field-select-input",a.dataset.pptxSlideSizePreset="true",a.setAttribute("aria-label",t("pptx.slideSize.presets"));let l=e.createElement("option");l.value=Nw,l.textContent=t("pptx.slideSize.customSize"),l.hidden=true,a.appendChild(l);for(let h of chunk5YHVN3PP_cjs.hj){let C=e.createElement("option");C.value=h.labelKey,C.textContent=t(`pptx.slideSize.preset.${h.labelKey}`),a.appendChild(C);}i.append(s,a),r.appendChild(i);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slide-size-orientation");p.setAttribute("role","group"),p.setAttribute("aria-label",t("pptx.slideSize.orientation"));let d=TI.map(([h,C])=>{let w=chunkIQ7MDPEN_cjs.w(e,"button");return w.type="button",w.dataset.pptxSlideSizeOrientation=h,w.textContent=t(C),p.appendChild(w),{value:h,button:w}});r.appendChild(p);let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(u);let m={width:0,height:0},g=re(e,{label:"W",min:1,onCommit:h=>n.updateCanvasSize({width:h,height:m.height})}),x=re(e,{label:"H",min:1,onCommit:h=>n.updateCanvasSize({width:m.width,height:h})});u.append(g.el,x.el);let b,v=zw(e,t,h=>{b&&n.applySlideSizeRescale(b,h),b=void 0,v.hide();});r.appendChild(v.el);let f=chunk5YHVN3PP_cjs.lj({current:void 0,canvas:{width:1,height:1}}),S=false;function y(h){if(!S||!EI(h,f.size)){n.updateSlideSize(h);return}b=h,v.show();}return a.addEventListener("change",()=>{let h=chunk5YHVN3PP_cjs.hj.find(C=>C.labelKey===a.value);h&&y(chunk5YHVN3PP_cjs.jj(h,f.orientation));}),d.forEach(({value:h,button:C})=>{C.addEventListener("click",()=>y(chunk5YHVN3PP_cjs.ij(f.size,h)));}),{el:o,update(h){m=h.canvasSize,f=chunk5YHVN3PP_cjs.lj({current:h.slideSize,canvas:h.canvasSize}),S=h.hasDeckElements,l.hidden=f.preset!==void 0,a.value=f.preset?.labelKey??Nw,a.disabled=!h.editable;for(let{value:C,button:w}of d){let A=f.orientation===C;w.classList.toggle("is-active",A),w.setAttribute("aria-pressed",String(A)),w.disabled=!h.editable;}g.setValue(h.canvasSize.width),x.setValue(h.canvasSize.height),g.setDisabled(!h.editable),x.setDisabled(!h.editable),b&&!h.editable&&(b=void 0,v.hide());}}}var bs={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 Gw(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.themeHeading")),i=Q(e);i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),a=$e(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),l=$e(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));s.append(a,l),r.appendChild(s);let p="";return {el:o,update(d){let u=d.themeOptions.map(g=>g.path).join(`
2
- `);if(u!==p){p=u;let g=i.value;if(i.replaceChildren(),d.themeOptions.length===0){let x=e.createElement("option");x.value="",x.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(x);}else {for(let x of d.themeOptions){let b=e.createElement("option");b.value=x.path,b.textContent=x.name||x.path.split("/").pop()||x.path,i.appendChild(b);}d.themeOptions.some(x=>x.path===g)&&(i.value=g);}}i.disabled=d.themeOptions.length===0;let m=!d.editable||!i.value;a.disabled=m,l.disabled=m;}}}function Uw(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeOverride.heading")),i,s=m=>{let g=i?.activeSlide;if(!g)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:m});return}let x=chunk5YHVN3PP_cjs.S(g,i.colorScheme,m);n.updateActiveSlide({clrMapOverride:x.clrMapOverride,backgroundColor:x.backgroundColor,elements:x.elements});},a=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),l=me(e);l.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),l.addEventListener("change",()=>{l.checked?s({...chunk5YHVN3PP_cjs.K}):s(void 0);});let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.themeOverride.enableOverride"),a.append(l,p),r.appendChild(a);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-override-rows");r.appendChild(d);let u=(m,g,x)=>{let b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-override-row"),v=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");v.textContent=bs[m],v.title=bs[m];let f=g[m]??chunk5YHVN3PP_cjs.K[m],S=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-override-swatch"),y=i?.colorScheme?.[f];typeof y=="string"&&y&&(S.style.backgroundColor=`#${y.replace(/^#/u,"")}`);let h=Q(e);h.className="pptxv-field-select-input",h.setAttribute("aria-label",bs[m]);for(let C of chunk5YHVN3PP_cjs.g){let w=e.createElement("option");w.value=C,w.textContent=chunk5YHVN3PP_cjs.Qb(chunk5YHVN3PP_cjs.Rb,C,t),h.appendChild(w);}return h.value=f,h.disabled=!x,h.addEventListener("change",()=>{let C={...g,[m]:h.value};for(let w of chunk5YHVN3PP_cjs.J)C[w]||(C[w]=chunk5YHVN3PP_cjs.K[w]);s(C);}),b.append(v,S,h),b};return {el:o,update(m){i=m,o.hidden=!m.activeSlide;let g=m.activeSlide?.clrMapOverride;if(l.checked=g!==void 0,l.disabled=!m.editable,d.replaceChildren(),g)for(let x of chunk5YHVN3PP_cjs.J)d.appendChild(u(x,g,m.editable));}}}function Kw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideBackground.templateBackgroundsHeading"));function i(s,a){let l=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-inspector-row"),p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=a,p.title=s.title;let d=e.createElement("input");d.type="color",d.value=chunk5YHVN3PP_cjs.ha(n.getTemplateBackgroundColor(s.path),"#ffffff"),d.addEventListener("change",()=>{n.setTemplateBackground(s.path,d.value),n.pushRecentColor(d.value);});let u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-value");return u.textContent=s.label,l.append(p,d,u),l}return {el:o,update(s){let a=s.editTemplateMode&&s.activeSlide?chunk5YHVN3PP_cjs.io(s.activeSlide,s.slideMasters,t("pptx.master.layout"),t("pptx.master.master")):{};o.hidden=!a.layout&&!a.master,r.replaceChildren(),a.layout&&r.appendChild(i(a.layout,t("pptx.master.layout"))),a.master&&r.appendChild(i(a.master,t("pptx.master.master")));}}}function Ww(e,t){chunkFGF6WJ3F_cjs.a(e);let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-preview"),o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-transition-preview-label");o.textContent=t("pptx.transition.preview");let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-transition-preview-stage");r.type="button",r.title=t("pptx.transition.preview"),r.setAttribute("aria-label",t("pptx.transition.preview"));let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-transition-preview-layer is-incoming");i.textContent="B";let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-transition-preview-layer is-outgoing");s.textContent="A",r.append(i,s),n.append(o,r);let a,l,p=()=>{i.style.animation="",s.style.animation="";},d=()=>{if(!a)return;let u=a.durationMs??500,m=chunk5YHVN3PP_cjs.fi(a.type,u,a.direction,a.orient,a.spokes,a.pattern);s.style.zIndex=m.outgoingOnTop?"2":"0",p(),r.offsetWidth,i.style.animation=m.incoming!=="none"?m.incoming:"",s.style.animation=m.outgoing!=="none"?m.outgoing:`pptx-tr-fade-out ${u}ms ease-in-out forwards`,clearTimeout(l),l=setTimeout(p,u+100);};return r.addEventListener("click",d),{el:n,update(u){a=u;let m=!!u&&u?.type!=="none"&&u?.type!=="cut";n.hidden=!m,m||(clearTimeout(l),p());}}}function $w(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.slideTransition")),i,s=false,a=E=>{let L={...i,...E};i=L,n.updateActiveSlide({transition:L});},l=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.transition.type");let d=Q(e);d.className="pptxv-field-select-input",d.setAttribute("aria-label",t("pptx.transition.type"));for(let E of chunk5YHVN3PP_cjs.ii){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),d.appendChild(L);}d.addEventListener("change",()=>a({type:d.value})),l.append(p,d);let u=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");m.textContent=t("pptx.transition.speed");let g=Q(e);g.className="pptxv-field-select-input",g.setAttribute("aria-label",t("pptx.transition.speed"));for(let E of chunk5YHVN3PP_cjs.ji){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),g.appendChild(L);}g.addEventListener("change",()=>a({speed:g.value})),u.append(m,g);let x=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),b=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");b.textContent=t("pptx.transition.morphOption");let v=Q(e);v.className="pptxv-field-select-input",v.setAttribute("aria-label",t("pptx.transition.morphOption"));for(let E of chunk5YHVN3PP_cjs.ki){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),v.appendChild(L);}v.addEventListener("change",()=>a({morphOption:v.value})),x.append(b,v);let f=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-directions"),S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-directions"),y=oe(e,{label:t("pptx.transition.thruBlk"),onChange:E=>a({thruBlk:E})}),h=re(e,{label:t("pptx.transition.duration"),min:0,max:1e4,step:10,onCommit:E=>a({durationMs:Math.max(0,Math.min(1e4,Math.round(E)))})}),C=re(e,{label:t("pptx.transition.spokes"),min:1,max:8,onCommit:E=>a({spokes:Math.max(1,Math.min(8,Math.round(E)))})}),w=oe(e,{label:t("pptx.transition.advanceOnClick"),onChange:E=>a({advanceOnClick:E})}),A=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-transition-sound"),P=Ww(e,t);r.append(l,f,S,y.el,C.el,h.el,u,x,w.el,A,P.el);let k=E=>{f.textContent="";let L=chunk5YHVN3PP_cjs.a[E];if(!L||L.length===0){f.hidden=true;return}f.hidden=false;let M=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label"),D=chunk5YHVN3PP_cjs.li.has(E);M.textContent=t(D?"pptx.transition.orientation":"pptx.transition.direction"),f.appendChild(M);let I=(F,V)=>{let _=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-transition-dir");_.type="button",_.textContent=V;let N=t(`pptx.transition.dir.${F}`);return _.title=N,_.setAttribute("aria-label",N),_.classList.toggle("is-active",(i?.direction??i?.orient)===F),_.disabled=!s,_.addEventListener("click",()=>a(D?{orient:F}:{direction:F})),_};if(D){let F=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-dir-row");for(let V of ["horz","vert"])F.appendChild(I(V,chunk5YHVN3PP_cjs.mi[V]??V));f.appendChild(F);return}let R=chunk5YHVN3PP_cjs.ni(L);if(R.some(F=>F.some(Boolean))){let F=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-dir-grid");for(let V of R)for(let _ of V)_===null?F.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-transition-dir-gap")):F.appendChild(I(_,chunk5YHVN3PP_cjs.mi[_]??_));f.appendChild(F);return}let B=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-dir-row");for(let F of L)B.appendChild(I(F,chunk5YHVN3PP_cjs.mi[F]??F));f.appendChild(B);},T=E=>{S.textContent="";let L=chunk5YHVN3PP_cjs.b[E];if(!L||L.length===0){S.hidden=true;return}S.hidden=false;let M=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");M.textContent=t("pptx.transition.pattern"),S.appendChild(M);let D=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-dir-row");for(let I of L){let R=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-transition-pattern-btn");R.type="button",R.textContent=t(`pptx.transition.pattern.${I}`),R.classList.toggle("is-active",(i?.pattern??L[0])===I),R.disabled=!s,R.addEventListener("click",()=>a({pattern:I})),D.appendChild(R);}S.appendChild(D);};return {el:o,update(E){s=E.editable,i=E.activeSlide?.transition,o.hidden=!E.activeSlide;let L=i?.type??"none";d.value=L,d.disabled=!E.editable,k(L),T(L),y.el.hidden=!chunk5YHVN3PP_cjs.c.has(L),y.setValue(i?.thruBlk===true),y.setDisabled(!E.editable),C.el.hidden=L!=="wheel",C.setValue(i?.spokes??4),C.setDisabled(!E.editable),h.setValue(Math.round(i?.durationMs??320)),h.setDisabled(!E.editable),g.value=i?.speed??"fast",g.disabled=!E.editable,x.hidden=L!=="morph",v.value=i?.morphOption??"byObject",v.disabled=!E.editable,w.setValue(i?.advanceOnClick!==false),w.setDisabled(!E.editable),A.hidden=!i?.soundFileName,A.textContent=i?.soundFileName?`${t("pptx.transition.sound")}: ${i.soundFileName}`:"",P.update(i);}}}function qw(e,t,n){let{el:o,body:r}=be(e,t("pptx.tags.title")),i=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tags-toggle");i.type="button";let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tags-toggle-label"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tags-count");i.append(s,a);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tags-list"),p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-tags-empty");p.textContent=t("pptx.tags.noTags");let d=$e(e,t("pptx.tags.addTag"),()=>n.updateTagCollections(chunk5YHVN3PP_cjs.Am(u)));r.append(i,l,p,d);let u=[],m=true,g=false,x=(f,S,y)=>{let h=e.createElement("input");return h.type="text",h.className="pptxv-tags-input",h.value=f,h.placeholder=S,h.setAttribute("aria-label",S),h.disabled=!g,h.addEventListener("change",()=>y(h.value)),h.addEventListener("keydown",C=>C.stopPropagation()),h},b=f=>{let S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tags-row");if(S.append(x(f.name,t("pptx.tags.name"),y=>n.updateTagCollections(chunk5YHVN3PP_cjs.ym(u,f.colIdx,f.tagIdx,"name",y))),x(f.value,t("pptx.tags.value"),y=>n.updateTagCollections(chunk5YHVN3PP_cjs.ym(u,f.colIdx,f.tagIdx,"value",y)))),g){let y=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tags-remove");y.type="button",y.textContent="\xD7",y.title=t("pptx.tags.deleteTag"),y.setAttribute("aria-label",t("pptx.tags.deleteTag")),y.addEventListener("click",()=>n.updateTagCollections(chunk5YHVN3PP_cjs.zm(u,f.colIdx,f.tagIdx))),S.appendChild(y);}return S},v=()=>{let f=chunk5YHVN3PP_cjs.xm(u);a.textContent=String(f.length),s.textContent=`${m?"\u25B8":"\u25BE"} ${t("pptx.tags.title")}`,i.setAttribute("aria-expanded",String(!m)),l.hidden=m||f.length===0,p.hidden=m||f.length>0,d.hidden=m||!g,d.disabled=!g,!m&&(l.textContent="",l.append(...f.map(b)));};return i.addEventListener("click",()=>{m=!m,v();}),{el:o,update(f){u=f.tagCollections,g=f.editable,v();}}}var jw={dk1:"pptx.themeEditor.colorDark1",lt1:"pptx.themeEditor.colorLight1",dk2:"pptx.themeEditor.colorDark2",lt2:"pptx.themeEditor.colorLight2",accent1:"pptx.themeEditor.colorAccent1",accent2:"pptx.themeEditor.colorAccent2",accent3:"pptx.themeEditor.colorAccent3",accent4:"pptx.themeEditor.colorAccent4",accent5:"pptx.themeEditor.colorAccent5",accent6:"pptx.themeEditor.colorAccent6",hlink:"pptx.themeEditor.colorHyperlink",folHlink:"pptx.themeEditor.colorFollowedLink"};function ro(e,t="#000000"){let n=typeof e=="string"?e.startsWith("#")?e:`#${e}`:"";return /^#[0-9a-fA-F]{6}$/u.test(n)?n:t}function Yw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-slots"),r=new Map;for(let i of chunk5YHVN3PP_cjs.g){let s=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-theme-slot"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-slot-label");a.textContent=t(jw[i]);let l=e.createElement("input");l.type="color",l.className="pptxv-theme-slot-input",l.setAttribute("aria-label",t(jw[i])),l.addEventListener("change",()=>n(i,l.value)),s.append(a,l),o.appendChild(s),r.set(i,l);}return {el:o,update(i,s){for(let[a,l]of r)l.value=ro(i[a]),l.disabled=!s;}}}function Xw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-presets"),r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");r.textContent=t("pptx.themeEditor.presetThemes");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-preset-grid");o.append(r,i);let s=[];for(let a of chunk5YHVN3PP_cjs.ao){let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-theme-preset");l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name);let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-preset-swatches");for(let u of ["accent1","accent2","accent3","accent4"]){let m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-preset-dot");m.style.background=ro(a.colorScheme[u],"#888888"),p.appendChild(m);}let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-preset-name");d.textContent=a.name,l.append(p,d),l.addEventListener("click",()=>n(a)),i.appendChild(l),s.push({node:l,preset:a});}return {el:o,update(a,l){for(let{node:p,preset:d}of s)p.classList.toggle("is-active",d.name===a),p.disabled=!l;}}}function fs(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-field-select"),r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");r.textContent=t;let i=Q(e);i.className="pptxv-field-select-input",i.setAttribute("aria-label",t);for(let s of chunk5YHVN3PP_cjs.co){let a=e.createElement("option");a.value=s,a.textContent=s,i.appendChild(a);}return i.addEventListener("change",()=>n(i.value)),o.append(r,i),{el:o,select:i}}function vs(e,t){if(!Array.from(e.options).some(n=>n.value===t)){let n=e.ownerDocument.createElement("option");n.value=t,n.textContent=t,e.appendChild(n);}e.value=t;}var hs="Calibri Light",ys="Calibri";function Vr(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeEditor.title")),i={colorScheme:void 0,major:hs,minor:ys,name:"Custom Theme"},s={...chunk5YHVN3PP_cjs.bo},a=hs,l=ys,p=false,d=false,u=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-theme-name"),m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");m.textContent=t("pptx.themeEditor.themeName");let g=e.createElement("input");g.type="text",g.className="pptxv-field-input",g.placeholder=t("pptx.themeEditor.themeNamePlaceholder"),g.setAttribute("aria-label",t("pptx.themeEditor.themeName")),g.addEventListener("keydown",T=>T.stopPropagation()),g.addEventListener("input",()=>{d=true;}),u.append(m,g);let x=Xw(e,t,T=>{s={...T.colorScheme},a=T.majorFont,l=T.minorFont,g.value=T.name,d=true,P();}),b=Yw(e,t,(T,E)=>{s={...s,[T]:E},d=true,P();}),v=fs(e,t("pptx.themeEditor.headingFont"),T=>{a=T,d=true,P();}),f=fs(e,t("pptx.themeEditor.bodyFont"),T=>{l=T,d=true,P();}),S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-preview"),y=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-preview-heading");y.textContent=t("pptx.themeEditor.headingSample");let h=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-preview-body");h.textContent=t("pptx.themeEditor.bodySample"),S.append(y,h);let C=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),w=$e(e,t("pptx.themeEditor.applyToPresentation"),()=>{let T={majorFont:{latin:a},minorFont:{latin:l}};n.applyThemeEdit({colorScheme:s,fontScheme:T,name:g.value}),d=false;}),A=$e(e,t("pptx.themeEditor.reset"),()=>{k(),d=false,P();});C.append(w,A),r.append(u,x.el,b.el,v.el,f.el,S,C);function P(){b.update(s,p),x.update(g.value,p),vs(v.select,a),vs(f.select,l),v.select.disabled=!p,f.select.disabled=!p,g.disabled=!p,w.disabled=!p,A.disabled=!p,S.style.background=ro(s.lt1,"#ffffff"),y.style.color=ro(s.dk2,"#000000"),y.style.fontFamily=a,h.style.color=ro(s.dk1,"#000000"),h.style.fontFamily=l;}function k(){s={...chunk5YHVN3PP_cjs.bo,...i.colorScheme??{}},a=i.major,l=i.minor,g.value=i.name;}return {el:o,update(T){p=T.editable,i={colorScheme:T.colorScheme,major:T.fontScheme?.majorFont?.latin??hs,minor:T.fontScheme?.minorFont?.latin??ys,name:T.themeName??"Custom Theme"},d||k(),P();}}}function PI(e,t){let{el:n,body:o}=be(e,t("pptx.documentProperties.notesHandoutHeading")),r=ht(e,t("pptx.documentProperties.notesSize")),i=ht(e,t("pptx.master.notesMasterTitle")),s=ht(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,s.el);let a=t("pptx.digitalSignatures.notAvailable"),l=p=>p===void 0?a:`${p} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(p){r.value.textContent=p.notesCanvasSize?`${p.notesCanvasSize.width} \xD7 ${p.notesCanvasSize.height}px`:a,i.value.textContent=l(p.notesPlaceholderCount),s.value.textContent=l(p.handoutPlaceholderCount);}}}function AI(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.documentHeading")),i=ht(e,t("pptx.properties.titleLabel")),s=ht(e,t("pptx.properties.author")),a=$e(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,s.el,a),{el:o,update(l){i.value.textContent=l.docTitle||"-",s.value.textContent=l.docAuthor||"-";}}}function Qw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-deck"),r=[Bw(e,t,n),Gw(e,t,n),Vr(e,t,n),Uw(e,t,n),Kw(e,t,n),$w(e,t,n),_w(e,t,n),PI(e,t),AI(e,t,n),qw(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let s of r)s.update(i);},setVisible(i){o.hidden=!i;}}}function kI(e){return chunk5YHVN3PP_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function Zw(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-elements"),r=chunkIQ7MDPEN_cjs.w(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-inspector-empty");return s.textContent=t("pptx.selectionPane.empty"),o.appendChild(s),{el:o,update(a){i.replaceChildren(),s.hidden=a.elements.length>0,[...a.elements].reverse().forEach((l,p)=>{let d=a.elements.length-p-1,u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-layer-row");u.type="button",u.title=`${l.type}: ${l.id}`,u.classList.toggle("is-selected",a.selectedIds.includes(l.id));let m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-layer-num");m.textContent=String(d+1);let g=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-layer-label");g.textContent=kI(l),u.append(m,g),u.addEventListener("click",()=>n(l.id)),i.appendChild(u);});}}}function Rt(e,t,n){let o=t("pptx.colorPicker.recentColors"),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-recent-colors");r.dataset.testid="pptx-color-recent",r.setAttribute("aria-label",o),r.hidden=true;let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-recent-colors-label");i.textContent=o,r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-swatch-grid pptxv-recent-colors-grid");r.appendChild(s);let a=false,l,p=new Map,d=()=>{for(let[u,m]of p)u.classList.toggle("is-selected",m===l);};return {el:r,setColors(u){s.replaceChildren(),p.clear();for(let m of u??[]){let g=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-swatch");g.type="button",g.setAttribute("data-pptx-compact",""),g.style.backgroundColor=m,g.title=m,g.setAttribute("aria-label",`Recent ${m}`),g.disabled=a,g.addEventListener("click",()=>n(m)),s.appendChild(g),p.set(g,m);}r.hidden=u.length===0,d();},setDisabled(u){a=u;for(let m of p.keys())m.disabled=u;},setSelected(u){l=u,d();}}}function Ie(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-swatch-grid");o.hidden=true;let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-swatch-grid-label");r.textContent=t("pptx.colorPicker.themeColors"),o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-swatch-grid-rows");o.appendChild(i);let s=false,a,l,p=chunk5YHVN3PP_cjs.xo(void 0),d=[],u=()=>{i.replaceChildren(),d.length=0;let m=chunk5YHVN3PP_cjs.Ao(p),g=chunk5YHVN3PP_cjs.yo(p,a,l);for(let x of m){let b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-swatch-grid-row");for(let v of x){if(!v){b.appendChild(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-swatch-grid-empty"));continue}let f=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-theme-swatch-grid-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v.hex,f.title=v.label,f.setAttribute("aria-label",v.label),f.disabled=s,f.classList.toggle("is-selected",v===g),f.addEventListener("click",()=>n(chunk5YHVN3PP_cjs.zo(v))),b.appendChild(f),d.push(f);}i.appendChild(b);}o.hidden=p.length===0;};return {el:o,setThemeColorMap(m){p=chunk5YHVN3PP_cjs.xo(m),u();},setSelected(m,g){a=m,l=g,u();},setDisabled(m){s=m;for(let g of d)g.disabled=m;}}}function Jw(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-connector-arrows";let r=chunk5YHVN3PP_cjs.dh.map(i=>{let s=II(e,t,n,i);return o.appendChild(s.select.parentElement),s});return {el:o,update(i){o.hidden=!i.isConnector;for(let{control:s,select:a}of r){let l=i.shapeStyle?.[s.styleKey];a.value=typeof l=="string"&&l.length>0?l:s.fallback,a.disabled=!i.canShape||!i.arrowheadsChangeable;}}}}function II(e,t,n,o){let r=Q(e);for(let s of o.values){let a=e.createElement("option");a.value=s,a.textContent=chunk5YHVN3PP_cjs.Qb(o.optionLabelKeys,s,t),r.appendChild(a);}r.addEventListener("change",()=>n.setShapeStyle(chunk5YHVN3PP_cjs.eh(o,r.value)));let i=e.createElement("label");return i.textContent=t(o.labelKey),r.setAttribute("aria-label",t(o.labelKey)),i.appendChild(r),{control:o,select:r}}function eE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-shape-effects"),r=he(e,{label:t("pptx.shape.type"),options:chunk5YHVN3PP_cjs.oo.map(f=>({value:f.type,label:t(f.i18nKey)})),onChange:f=>n.setShapeType(f)});o.appendChild(r.el);let i=(f,S,y)=>{let h=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-row"),C=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");C.textContent=f;let w=He(e,{label:f,onInput:A=>n.setShapeStyle({[S]:A}),onCommit:n.pushRecentColor},y);return h.append(C,w.el),o.appendChild(h),w},s=(f,S)=>{let y=re(e,{label:f,min:0,onCommit:h=>n.setShapeStyle({[S]:h})});return o.appendChild(y.el),y},a=i(t("pptx.textEffects.shadowColor"),"shadowColor","#000000"),l=s(t("pptx.textEffects.blur"),"shadowBlur"),p=s(t("pptx.shape.shadowDistance"),"shadowDistance"),d=oe(e,{label:t("pptx.effects.rotateWithShape"),onChange:f=>n.setShapeStyle({shadowRotateWithShape:f})});o.appendChild(d.el);let u=i(t("pptx.textEffects.glowColor"),"glowColor","#ffff00"),m=s(t("pptx.textEffects.glow"),"glowRadius"),g=s(t("pptx.shape.softEdges"),"softEdgeRadius"),x=oe(e,{label:t("pptx.textEffects.reflection"),onChange:f=>n.setShapeStyle({reflectionStartOpacity:f?.5:void 0})});o.appendChild(x.el);let b=Jw(e,t,n);o.appendChild(b.el);let v=[r,a,l,p,d,u,m,g,x];return {el:o,update(f){let S=f.shapeStyle??{};a.setValue(S.shadowColor??"#000000"),l.setValue(S.shadowBlur??0),p.setValue(S.shadowDistance??0),d.setValue(S.shadowRotateWithShape??true),u.setValue(S.glowColor??"#ffff00"),m.setValue(S.glowRadius??0),g.setValue(S.softEdgeRadius??0),x.setValue(!!S.reflectionStartOpacity),r.setValue(f.shapeType??"rect"),r.el.hidden=!f.shapeType,b.update(f);for(let y of v)y.setDisabled(!f.canShape);}}}var LI="pct20";function tE(e){return `${Math.round(e*100)}%`}function oE(e,t,n,o){let r=n(t("pptx.shape.fillStroke"));r.setAttribute("data-pptx-inspector-section","fill-stroke");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-row"),s=He(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),a=He(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.fill");let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.line"),i.append(l,s.el,p,a.el),r.appendChild(i);let d=Ie(e,t,N=>o.setShapeFill(N.hex,N.ref));r.appendChild(d.el);let u=Ie(e,t,N=>o.setShapeStroke(N.hex,N.ref));r.appendChild(u.el);let m=Rt(e,t,o.setShapeFill);r.appendChild(m.el);let g=Rt(e,t,o.setShapeStroke);r.appendChild(g.el);let x=re(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(x.el);let b=Fe(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:tE,onCommit:o.setFillOpacity});r.appendChild(b.el);let v=Fe(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:tE,onCommit:o.setStrokeOpacity});r.appendChild(v.el);let f=oe(e,{label:t("pptx.fill.gradient"),onChange(N){N?o.setGradientFill(I):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(f.el);let S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-gradient");r.appendChild(S);let y=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-row");S.appendChild(y);let h=H(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...I,type:"linear"})}),C=H(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...I,type:"radial"})});y.append(h.btn,C.btn);let w=re(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:N=>o.setGradientFill({...I,angle:N})});S.appendChild(w.el);let A=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-gradient-stops");S.appendChild(A);let P=H(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let N=I.stops,W=N[N.length-1]?.position??100,X=N[N.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((W+X)/2));}});S.appendChild(P.btn);let k=oe(e,{label:t("pptx.table.fillPattern"),onChange(N){N?o.setShapeStyle({fillMode:"pattern",fillPatternPreset:M,fillPatternBackgroundColor:D}):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(k.el);let T=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-pattern");r.appendChild(T);let E=he(e,{label:t("pptx.table.patternPreset"),options:chunk5YHVN3PP_cjs.ac.map(N=>({value:N.value,label:t(N.labelKey)})),onChange:N=>{M=N,o.setShapeStyle({fillMode:"pattern",fillPatternPreset:N});}});T.appendChild(E.el);let L=He(e,{label:t("pptx.table.patternBackground"),onInput:N=>{D=N,o.setShapeStyle({fillMode:"pattern",fillPatternBackgroundColor:N});},onCommit:o.pushRecentColor},"#ffffff");T.appendChild(L.el);let M=LI,D="#ffffff",I=chunk5YHVN3PP_cjs.Xm(),R=[],O=(N,W,X)=>{A.replaceChildren(),R=N.map((ie,G)=>{let K=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-row"),j=He(e,{label:t("pptx.gradient.stops"),onInput:Me=>o.updateGradientStop(G,{color:Me,colorRef:void 0}),onCommit:o.pushRecentColor},ie.color),Y=re(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:Me=>o.updateGradientStop(G,{position:Me})});Y.setValue(ie.position);let ue=H(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(G)});ue.setDisabled(N.length<=2),K.append(j.el,Y.el,ue.btn),A.appendChild(K);let Te=Ie(e,t,Me=>o.updateGradientStop(G,chunk5YHVN3PP_cjs.Bo(Me)));return Te.setThemeColorMap(W),Te.setSelected(ie.colorRef,ie.color),Te.setDisabled(!X),A.appendChild(Te.el),{color:j,theme:Te,position:Y,remove:ue}});},B=[s,a,x,b,v,f,k],F=[h,C,w,P],V=[E,L],_=eE(e,t,o);return r.appendChild(_.el),{el:r,update(N){r.hidden=!N.hasSelection||!N.canShape,s.setValue(N.fillColor),a.setValue(N.strokeColor),x.setValue(N.strokeWidth),b.setValue(N.fillOpacity),v.setValue(N.strokeOpacity),d.setThemeColorMap(N.themeColorMap),d.setSelected(N.fillColorRef,N.fillColor),d.setDisabled(!N.canShape),u.setThemeColorMap(N.themeColorMap),u.setSelected(N.strokeColorRef,N.strokeColor),u.setDisabled(!N.canShape),m.setColors(N.recentColors??[]),g.setColors(N.recentColors??[]),m.setDisabled(!N.canShape),g.setDisabled(!N.canShape),f.setValue(N.gradientEnabled),w.setValue(N.gradient.angle),I=N.gradient,O(N.gradient.stops,N.themeColorMap,N.canShape),S.hidden=!N.gradientEnabled,_.update(N);let W=N.shapeStyle?.fillMode==="pattern";k.setValue(W),M=N.shapeStyle?.fillPatternPreset??M,D=N.shapeStyle?.fillPatternBackgroundColor??D,E.setValue(M),L.setValue(D),T.hidden=!W;for(let X of B)X.setDisabled(!N.canShape);for(let X of F)X.setDisabled(!N.canShape||!N.gradientEnabled);for(let X of V)X.setDisabled(!N.canShape||!W);for(let X of R)X.color.setDisabled(!N.canShape),X.position.setDisabled(!N.canShape),X.remove.setDisabled(!N.canShape||N.gradient.stops.length<=2);}}}function nE(e,t,n){let o=n(t("pptx.elementType.group")),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-muted-text");return o.appendChild(r),{el:o,update(i){o.hidden=!i.isGroup,i.isGroup&&(r.textContent=i.groupChildCount!==void 0?t("pptx.group.childCount",{count:i.groupChildCount}):t("pptx.group.groupedElement"));}}}function rE(e,t,n,o){let r=n(t("pptx.inspector.image")),i=e.createElement("button");i.type="button",i.textContent=t("pptx.image.replaceImage"),i.addEventListener("click",o.replaceImage);let s=e.createElement("button");s.type="button",s.textContent=t("pptx.image.resetImage"),s.addEventListener("click",o.resetImage),r.append(i,s);let a=F=>`${Math.round(F)}%`,l=Fe(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:a,onCommit:o.setImageBrightness}),p=Fe(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:a,onCommit:o.setImageContrast}),d=Fe(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:a,onCommit:o.setImageSaturation});r.append(l.el,p.el,d.el);let u=e.createElement("label");u.textContent=t("pptx.image.artisticEffects");let m=Q(e);m.setAttribute("aria-label",t("pptx.image.artisticEffects"));for(let[F,V]of chunk5YHVN3PP_cjs.Xn){let _=e.createElement("option");_.value=F,_.textContent=t(V),m.appendChild(_);}m.addEventListener("change",()=>o.setImageEffects({artisticEffect:m.value==="none"?void 0:m.value})),u.appendChild(m);let g=Fe(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:a,onCommit:F=>o.setImageEffects({alphaModFix:100-F})}),x=Fe(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:a,onCommit:F=>o.setImageEffects({biLevel:F})}),b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-grid"),v={},f=(F,V)=>{let _=e.createElement("label");_.textContent=F;let N=e.createElement("input");return N.type="color",N.addEventListener("input",()=>o.setImageEffects({duotone:{color1:V==="color1"?N.value:v.color1?.value??"#000000",color2:V==="color2"?N.value:v.color2?.value??"#ffffff"}})),_.appendChild(N),b.appendChild(_),N},S=f(t("pptx.image.duotoneDark"),"color1"),y=f(t("pptx.image.duotoneLight"),"color2");v.color1=S,v.color2=y;for(let F of [S,y])F.addEventListener("change",()=>o.pushRecentColor(F.value));r.append(u,g.el,x.el,b);let h=me(e),C=e.createElement("input");C.type="color";let w=40,A=Fe(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:a,onCommit:F=>{w=F,o.setImageEffects({colorWash:{color:C.value,opacity:F}});}});h.addEventListener("change",()=>o.setImageEffects({colorWash:h.checked?{color:C.value,opacity:w}:void 0})),C.addEventListener("input",()=>o.setImageEffects({colorWash:{color:C.value,opacity:w}})),C.addEventListener("change",()=>o.pushRecentColor(C.value)),r.append(h,C,A.el);let P=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(P);let k=(F,V)=>{let _=re(e,{label:F,min:0,max:90,onCommit:N=>o.setImageCrop(V,N/100)});return P.appendChild(_.el),_},T=k(t("pptx.image.cropLeft"),"left"),E=k(t("pptx.image.cropTop"),"top"),L=k(t("pptx.image.cropRight"),"right"),M=k(t("pptx.image.cropBottom"),"bottom"),D=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-image-alt"),I=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");I.textContent=t("pptx.image.altText");let R=e.createElement("textarea");R.rows=2,R.className="pptxv-image-alt-input",R.placeholder=t("pptx.imageTransform.altTextPlaceholder"),R.setAttribute("aria-label",t("pptx.image.altText")),R.addEventListener("keydown",F=>F.stopPropagation()),R.addEventListener("change",()=>o.setAltText(R.value)),D.append(I,R),r.appendChild(D);let O=[l,p,d],B=[T,E,L,M];return {el:r,update(F){r.hidden=!F.hasSelection||!F.isImage,l.setValue(F.imageBrightness),p.setValue(F.imageContrast),d.setValue(F.imageSaturation),m.value=F.imageArtisticEffect,g.setValue(F.imageTransparency),x.setValue(F.imageBiLevel),S.value=F.imageDuotone1,y.value=F.imageDuotone2,h.checked=!!F.imageColorWash,C.value=F.imageColorWash?.color??"#0066cc",A.setValue(F.imageColorWash?.opacity??40),w=F.imageColorWash?.opacity??40,e.activeElement!==R&&(R.value=F.altText),R.disabled=!F.isImage,T.setValue(F.cropLeft*100),E.setValue(F.cropTop*100),L.setValue(F.cropRight*100),M.setValue(F.cropBottom*100);for(let V of [...O,g,x])V.setDisabled(!F.isImage);m.disabled=!F.isImage,S.disabled=!F.isImage,y.disabled=!F.isImage,i.disabled=!F.isImage,s.disabled=!F.isImage,h.disabled=!F.isImage,C.disabled=!F.isImage,A.setDisabled(!F.isImage);for(let V of B)V.setDisabled(!F.isImage||!F.croppable);}}}function iE(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline"),o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-times"),r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-media-timeline-time"),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-media-timeline-time");o.append(r,i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-bar"),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-region"),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-playhead"),p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-handle is-start"),d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-handle is-end"),u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-media-timeline-marks");s.append(a,u,l,p,d),n.append(o,s);let m={duration:0,trimStartMs:0,trimEndMs:0,canEdit:false},g=b=>{let v=s.getBoundingClientRect();return chunk5YHVN3PP_cjs.Tn(b,v.left,v.width,m.duration||1)};s.addEventListener("click",b=>{b.target===p||b.target===d||t.onSeek(g(b.clientX));});let x=(b,v)=>{b.addEventListener("pointerdown",f=>{if(!m.canEdit)return;f.preventDefault(),f.stopPropagation(),b.setPointerCapture(f.pointerId);let S=h=>{let C=chunk5YHVN3PP_cjs.Vn(v,g(h.clientX),m.duration,m.trimStartMs,m.trimEndMs);t.onTrimChange(Math.round(C.trimStartMs),Math.round(C.trimEndMs));},y=()=>{b.removeEventListener("pointermove",S),b.removeEventListener("pointerup",y),b.removeEventListener("pointercancel",y);};b.addEventListener("pointermove",S),b.addEventListener("pointerup",y),b.addEventListener("pointercancel",y);});};return x(p,"start"),x(d,"end"),{el:n,update(b){m=b;let v=chunk5YHVN3PP_cjs.Un(b.duration,b.trimStartMs,b.trimEndMs,b.currentTime),f=chunk5YHVN3PP_cjs.Sn(b.duration,b.trimEndMs);r.textContent=chunk5YHVN3PP_cjs.Rn(b.trimStartMs/1e3),i.textContent=chunk5YHVN3PP_cjs.Rn(f),a.style.left=`${v.startPercent}%`,a.style.width=`${Math.max(0,v.endPercent-v.startPercent)}%`,l.style.left=`${v.playheadPercent}%`,p.style.left=`${v.startPercent}%`,d.style.left=`${v.endPercent}%`,p.hidden=!b.canEdit,d.hidden=!b.canEdit,u.textContent="";let S=b.duration>0?b.duration:1;for(let y of b.bookmarks){let h=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-media-timeline-mark");h.type="button",h.style.left=`${Math.max(0,Math.min(100,y.time/S*100))}%`,h.title=y.label??"",h.setAttribute("aria-label",y.label||chunk5YHVN3PP_cjs.Rn(y.time)),h.addEventListener("click",C=>{C.stopPropagation(),t.onSeek(y.time);}),u.appendChild(h);}}}}function lE(e,t,n,o){let r=n(t("pptx.media.title")),i,s=()=>{let k=Number.isFinite(a.duration)?a.duration:0,T=i?.metadata?.duration??0;return (k||T)*1e3},a=e.createElement("video");a.controls=true,a.preload="metadata",a.className="pptxv-media-preview",a.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(a.duration)?a.duration:void 0,videoWidth:a.videoWidth||void 0,videoHeight:a.videoHeight||void 0}}),P();});let l=e.createElement("img");l.className="pptxv-media-poster",l.alt=t("pptx.media.posterFrame");let p=oe(e,{label:t("pptx.media.autoPlay"),onChange:k=>o.setMediaProperties({autoPlay:k})}),d=oe(e,{label:t("pptx.media.loop"),onChange:k=>o.setMediaProperties({loop:k})}),u=oe(e,{label:t("pptx.media.playAcrossSlides"),onChange:k=>o.setMediaProperties({playAcrossSlides:k})}),m=oe(e,{label:t("pptx.media.fullScreen"),onChange:k=>o.setMediaProperties({fullScreen:k})}),g=oe(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:k=>o.setMediaProperties({hideWhenNotPlaying:k})}),x=Fe(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:k=>`${Math.round(k)}%`,onCommit:k=>o.setMediaProperties({volume:k/100})}),b=he(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(k=>({value:String(k),label:`${k}x`})),onChange:k=>o.setMediaProperties({playbackSpeed:Number(k)})}),v=re(e,{label:t("pptx.media.trimStart"),min:0,onCommit:k=>o.setMediaProperties({trimStartMs:k})}),f=re(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:k=>o.setMediaProperties({trimEndMs:chunk5YHVN3PP_cjs.Qn(s(),k)})}),S=aE(e,t("pptx.media.bookmarks"));S.control.placeholder="12.5 | Intro",S.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:sE(S.control.value).map((k,T)=>{let[E,L=""]=k.split("|").map(M=>M.trim());return {id:`bookmark-${T+1}`,time:Number(E),label:L}}).filter(({time:k})=>Number.isFinite(k))}));let y=aE(e,t("pptx.media.captions"));y.control.placeholder="en | English | captions | captions.vtt",y.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:sE(y.control.value).map((k,T)=>{let[E="",L="",M="captions",D=""]=k.split("|").map(I=>I.trim());return {id:`caption-${T+1}`,language:E,label:L,kind:M,src:D||void 0}})}));let h=e.createElement("output");h.className="pptxv-media-metadata";let C=[p,d,u,m,g],w=false,A=iE(e,{onTrimChange:(k,T)=>{o.setMediaProperties({trimStartMs:k,trimEndMs:T}),v.setValue(k),f.setValue(chunk5YHVN3PP_cjs.Pn(s(),T));},onSeek:k=>{Number.isFinite(a.duration)&&(a.currentTime=k);}}),P=()=>{A.update({duration:Number.isFinite(a.duration)?a.duration:0,trimStartMs:i?.trimStartMs??0,trimEndMs:i?.trimEndMs??0,currentTime:a.currentTime||0,bookmarks:i?.bookmarks??[],canEdit:w});};return a.addEventListener("timeupdate",P),r.append(a,l,A.el,...C.map(({el:k})=>k),x.el,b.el,v.el,f.el,S.label,y.label,h),{el:r,update(k){r.hidden=!k.isMedia;let T=k.media;i=T,w=k.isMedia,P();let E=k.mediaPreviewUrl??"";a.src!==E&&(a.src=E),a.hidden=!E,a.poster=k.mediaPosterUrl??"",l.src=k.mediaPosterUrl??"",l.hidden=!k.mediaPosterUrl,p.setValue(T?.autoPlay??false),d.setValue(T?.loop??false),u.setValue(T?.playAcrossSlides??false),m.setValue(T?.fullScreen??false),g.setValue(T?.hideWhenNotPlaying??false),x.setValue((T?.volume??1)*100),b.setValue(String(T?.playbackSpeed??1)),v.setValue(T?.trimStartMs??0),f.setValue(chunk5YHVN3PP_cjs.Pn(s(),T?.trimEndMs??0)),S.control.value=(T?.bookmarks??[]).map(({time:L,label:M})=>`${L} | ${M}`).join(`
1
+ 'use strict';var chunkEHQE3K3X_cjs=require('./chunk-EHQE3K3X.cjs'),chunkQPYQDJ2Q_cjs=require('./chunk-QPYQDJ2Q.cjs'),chunkYOEVEUFZ_cjs=require('./chunk-YOEVEUFZ.cjs');require('./chunk-B5PFHICE.cjs');var lucide=require('lucide');function ts(e){let{store:t,editor:n}=e,o=(s,a)=>{let l=s(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(l,t.get().currentSlide);},r=()=>{let s=t.get();return {slides:s.slides,width:s.canvasSize.width,height:s.canvasSize.height,theme:s.colorScheme?{colorScheme:s.colorScheme}:void 0,sections:s.sections,presentationProperties:s.presentationProperties,customProperties:s.customProperties,coreProperties:s.coreProperties,appProperties:s.appProperties,viewProperties:s.viewProperties,tableStyleMap:s.tableStyleMap,tableStylesDefaultId:s.tableStylesDefaultId,tags:s.tagCollections}},i=chunkQPYQDJ2Q_cjs.b;return {getDeckMeta(){let s=t.get();return {slideCount:s.slides.length,activeSlideIndex:s.currentSlide,title:dI(s.slides),width:s.canvasSize.width,height:s.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:s}=t.get();return s?{colorScheme:s}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:s=>e.goToSlide(s),selectElements(s,a){e.goToSlide(s),n.selectElements(a);},applySlidesUpdate:o,updateElement(s,a,l){o(p=>{let d=p[s]?.elements.find(u=>u.id===a);return d&&chunkQPYQDJ2Q_cjs.p(d,l),p});},applyTheme:s=>e.applyThemeUpdates(s),getDeckData:()=>r(),applyDeckData(s,a){let l=r(),p=s(structuredClone(l));e.ensureEditable(),i(l.slides,p.slides)&&n.commitSlides(p.slides,t.get().currentSlide),(l.width!==p.width||l.height!==p.height)&&n.getEditActions().updateCanvasSize({width:p.width,height:p.height});let d=p.sections??l.sections??[];i(l.sections,d)&&n.updateSections(d);let u=p.presentationProperties??l.presentationProperties??{};i(l.presentationProperties,u)&&n.updatePresentationProperties(u);let m=p.coreProperties??l.coreProperties,g=p.appProperties??l.appProperties,x=p.customProperties??l.customProperties??[];(i(l.coreProperties,m)||i(l.appProperties,g)||i(l.customProperties,x))&&n.updateDocumentProperties(m??{},g??{},x),i(l.viewProperties,p.viewProperties)&&t.set({viewProperties:p.viewProperties}),i(l.tableStyleMap,p.tableStyleMap)&&n.getEditActions().updateTableStyleMap(p.tableStyleMap??{}),i(l.tableStylesDefaultId,p.tableStylesDefaultId)&&t.set({tableStylesDefaultId:p.tableStylesDefaultId});let b=p.tags??l.tags??[];i(l.tags,b)&&n.getEditActions().updateTagCollections(b);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function dI(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var cI=2600;function mI(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function os(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,s=null,a=false,l=null,p={text:"",nonce:0},d=()=>{for(let x of n)x();},u=()=>{let x=t.get();return chunkQPYQDJ2Q_cjs.i({activeSlideIndex:x.currentSlide,selectedElementIds:x.selectedElementIds,selectedElementId:x.selectedElementId})},m=()=>r.length>0,g=t.subscribe((x,b)=>{(x.currentSlide!==b.currentSlide||x.selectedElementId!==b.selectedElementId||x.selectedElementIds!==b.selectedElementIds)&&d();});return {subscribe(x){return n.add(x),()=>n.delete(x)},getLiveTargets:u,getEffectiveTargets(){return m()?r:o&&o.length>0?o:u()},isPinned:()=>!m()&&o!==null,hasPicks:m,pinFocus(){o=u(),d();},clearPinnedFocus(){o=null,d();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),d();},stopPicking(){i=false,d();},addPick(x,b){r.some(v=>v.kind==="element"&&v.elementId===b)||(r=[...r,{kind:"element",slideIndex:x,elementId:b}],d());},clearPicks(){r=[],i=false,d();},getHighlights(){let x=[];for(let b of r)b.kind==="element"&&x.push({slideIndex:b.slideIndex,elementId:b.elementId,variant:"pick"});if(s)for(let b of s.elementIds)x.push({slideIndex:s.slideIndex,elementId:b,variant:"active"});return x},isAnimating:()=>a||r.length>0,flashToolTarget(x){s=x&&x.slideIndex!==void 0&&x.elementIds.length>0?{slideIndex:x.slideIndex,elementIds:x.elementIds}:null,a=true,l&&clearTimeout(l),l=setTimeout(()=>{s=null,a=false,l=null,d();},cI),d();},getPrefill:()=>p,askAboutSelection(){o=u(),p={text:"",nonce:p.nonce+1},e.requestOpen(),d();},fixElement(x,b){o=u(),p={text:x?mI(x,b):"",nonce:p.nonce+1},e.requestOpen(),d();},dispose(){l&&clearTimeout(l),g(),n.clear();}}}function H(e,t){let n=chunkQPYQDJ2Q_cjs.w(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(chunkQPYQDJ2Q_cjs.K(e,t.icon)):t.text!==void 0&&(n.classList.add("pptxv-btn-text"),n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=chunkQPYQDJ2Q_cjs.w(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 uI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function He(e,t,n="#000000"){let o=chunkQPYQDJ2Q_cjs.w(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)),t.onCommit&&r.addEventListener("change",()=>t.onCommit?.(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=uI(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function re(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field"),o=chunkQPYQDJ2Q_cjs.w(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=Number.NaN,s=()=>{let a=Number.parseFloat(r.value);!Number.isFinite(a)||a===i||(i=a,t.onCommit(a));};return r.addEventListener("change",s),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&s();}),{el:n,input:r,setValue(a){let l=Math.round(a*100)/100;i=l,e.activeElement!==r&&(r.value=String(l));},setDisabled(a){r.disabled=a;}}}function WC(e,t,n){let o=chunkQPYQDJ2Q_cjs.e(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 xI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ai-change-ghost",WC(i,"start",t.config));s.setAttribute("data-ai-change",i.kind),s.setAttribute("data-export-ignore","true"),r.appendChild(s);}return r}function gI(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 s=r[i],a=WC(o[i],"end",t.config);for(let[l,p]of Object.entries(a))s.style.setProperty(l,String(p));}}function $C(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,s=o.current(),a=0,l=0,p=()=>{a&&(cancelAnimationFrame(a),a=0),l&&(cancelAnimationFrame(l),l=0);},d=x=>{s&&((!i||!i.isConnected)&&(i=chunkQPYQDJ2Q_cjs.w(t,"style","pptxv-ai-change-css"),(x??t.head).appendChild(i)),i.textContent=chunkQPYQDJ2Q_cjs.d(s.config));},u=()=>{if(p(),r?.remove(),r=null,!s)return;let x=e.getStageRoot();if(!x)return;d(x.parentElement);let b=n.get().currentSlide,v=xI(t,s,b);if(!v)return;x.appendChild(v),r=v;let f=s;a=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{r&&gI(r,f,b);});});},m=n.subscribe(u),g=o.subscribe(x=>{s=x,x&&e.goToSlide(x.slideIndex),u();});return u(),{destroy(){p(),m(),g(),r?.remove(),r=null,i?.remove(),i=null;}}}function qC(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,s=null,a=()=>{s?.remove(),s=null;},l=u=>{let m=o.get().currentSlide,g=o.get().slides[m]?.elements.find(x=>x.id===u)??null;return o.set({selectedElementId:u,selectedElementIds:[u]}),g},p=(u,m,g)=>{let x=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-ai-menu-item");return x.type="button",x.append(chunkQPYQDJ2Q_cjs.K(t,u),t.createTextNode(m)),x.addEventListener("click",()=>{g(),a();}),x},d=u=>{let m=o.get();if(m.editable&&!m.presenting)return;let g=chunkYOEVEUFZ_cjs.Fm(u.target,e.getStageRoot());if(!g)return;u.preventDefault(),a();let x=l(g),b=o.get().currentSlide;s=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-ai-menu",{left:`${u.clientX}px`,top:`${u.clientY}px`}),s.setAttribute("role","menu"),s.append(p("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),p("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(x,b))),t.body.appendChild(s);let v=f=>{f instanceof KeyboardEvent&&f.key!=="Escape"||f.target instanceof Node&&s?.contains(f.target)||(a(),t.removeEventListener("pointerdown",v,true),t.removeEventListener("keydown",v,true));};t.addEventListener("pointerdown",v,true),t.addEventListener("keydown",v,true);};return i.addEventListener("contextmenu",d),{destroy(){i.removeEventListener("contextmenu",d),a();}}}function jC(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let l=e.getStageRoot();if(!l)return;o.isAnimating()?l.setAttribute("data-pptx-ai-active","true"):l.removeAttribute("data-pptx-ai-active");let p=n.get(),d=o.getHighlights().filter(x=>x.slideIndex===p.currentSlide);if(d.length===0)return;let u=p.slides[p.currentSlide]?.elements??[],m=new Map(u.map(x=>[x.id,x])),g=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-ai-hl-layer");for(let x of d){let b=m.get(x.elementId);if(!b)continue;let v=chunkQPYQDJ2Q_cjs.w(t,"div",`pptxv-ai-hl pptxv-ai-hl-${x.variant}`,{left:`${b.x-3}px`,top:`${b.y-3}px`,width:`${b.width+6}px`,height:`${b.height+6}px`});g.appendChild(v);}l.appendChild(g),r=g;},s=n.subscribe(i),a=o.subscribe(i);return i(),{destroy(){s(),a(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function YC(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let s=chunkYOEVEUFZ_cjs.Fm(i.target,e.getStageRoot());s&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,s));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function bI(e){return e.stageWrap.querySelector(".pptxv-stage")}function ns(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>bI(n),s=[],a=(f,S)=>{let y=H(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:S,onClick:()=>{v(!x);}});y.btn.setAttribute("aria-expanded","false"),f.appendChild(y.btn),s.push(y);};a(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&a(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let l=chunkQPYQDJ2Q_cjs.w(t,"aside","pptxv-ai-panel");l.setAttribute("data-pptx-ai-panel",""),l.setAttribute("aria-label",o("pptx.ai.title")),l.hidden=true,(n.viewport.parentElement??n.root).appendChild(l);let p=jC({doc:t,store:e.store,controller:r,getStageRoot:i}),d=YC({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),u=qC({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),m=null,g=null,x=false,b=false,v=async f=>{x=f,l.hidden=!x;for(let S of s)S.setActive(x),S.btn.setAttribute("aria-expanded",String(x));if(!(!x||m||b)){b=true,l.classList.add("is-loading");try{let{createAiPanel:S}=await import('./ai-panel-CPIUVQ3N.cjs');m=await S({host:l,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide,onClose:()=>{v(!1);}}),m.changeAnimator&&(g=$C({doc:t,store:e.store,animator:m.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{b=false,l.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){g?.destroy(),g=null,m?.destroy(),m=null,u.destroy(),d.destroy(),p.destroy(),r.dispose();for(let f of s)f.btn.remove();l.remove();}}}function Mr(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 XC(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),getCustomization:e.getCustomization,openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),clearSelection:()=>e.clearSelection(),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"),getCustomization:e.getCustomization,openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},saveAsPpt:()=>{e.downloadAs("ppt");},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},exportJson:()=>e.exportJson(),print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),toggleHideSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow(),showOptions:()=>e.presentationProperties(),updateShowOptions:o=>e.getEditActions().updatePresentationSettings(o)},edit:Mr(()=>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),armFreeformTool:o=>e.armFreeformTool?.(o),visibleDrawingTools:()=>chunkYOEVEUFZ_cjs.Js.filter(o=>chunkYOEVEUFZ_cjs.dr(e.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,o))},findReplace:Mr(()=>e.getFindReplaceActions()),design:{applyPresentationTheme:o=>e.applyPresentationTheme(o),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o)},transitions:{readDraft:()=>e.readTransitionDraft(),applyDraft:(o,r)=>e.getEditActions().applyTransitionDraft(o,r),readTransition:()=>e.readTransition(),applyChange:o=>e.getEditActions().applyTransitionChange(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(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o),updateTagCollections:o=>e.getEditActions().updateTagCollections(o),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),updateTableStyleMap:o=>e.getEditActions().updateTableStyleMap(o),deleteTableStyle:o=>e.getEditActions().deleteTableStyle(o),setTemplateBackground:(o,r)=>e.getEditActions().setTemplateBackground(o,r),getTemplateBackgroundColor:o=>e.getEditActions().getTemplateBackgroundColor(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),updateSlideSize:o=>e.getEditActions().updateSlideSize(o),applySlideSizeRescale:(o,r)=>e.getEditActions().applySlideSizeRescale(o,r),addComment:(o,r)=>{e.getEditActions().comments.addComment(o,void 0,r);},addCommentReply:(o,r,i)=>{e.getEditActions().comments.addCommentReply(o,r,i);},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),applyMotionPath:o=>e.getEditActions().applyMotionPath(o),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),setAnimationSound:(o,r)=>e.getEditActions().setAnimationSound(o,r),setAnimationStockSound:(o,r)=>e.getEditActions().setAnimationStockSound(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),toggleElementLock:()=>e.getEditActions().toggleElementLock(),setShapeFill:(o,r)=>e.getEditActions().setShapeFill(o,r),setShapeStroke:(o,r)=>e.getEditActions().setShapeStroke(o,r),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),pushRecentColor:o=>e.getEditActions().pushRecentColor(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),setAltText:o=>e.getEditActions().setAltText(o),setTitle:o=>e.getEditActions().setTitle(o),setOleName:o=>e.getEditActions().setOleName(o),setOleContent:o=>e.getEditActions().setOleContent(o),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),setTableData:(o,r)=>e.getEditActions().setTableData(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),replaceSmartArtData:o=>e.getEditActions().replaceSmartArtData(o),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 QC(e){return {showTitleBar:chunkYOEVEUFZ_cjs.$q(e,"titleBar"),showStatusBar:chunkYOEVEUFZ_cjs.$q(e,"statusBar"),showNotes:chunkYOEVEUFZ_cjs.$q(e,"notes")}}function ZC(e,t){let n=e.visible&&chunkYOEVEUFZ_cjs.$q(t,"quickAccessToolbar"),o=chunkYOEVEUFZ_cjs.br(t,"print")?e.commandIds:e.commandIds.filter(r=>r!=="print");return {...e,visible:n,commandIds:o}}function JC(e){let t=chunkYOEVEUFZ_cjs.er(e.customization),n=null,o=e,r=null,i=()=>{let a=t.getResolved();return n!==a&&(n=a,o={...e,hiddenActions:chunkYOEVEUFZ_cjs._q(a,e.hiddenActions),showThumbnails:(e.showThumbnails??true)&&chunkYOEVEUFZ_cjs.$q(a,"slidesPane"),showInspector:(e.showInspector??true)&&chunkYOEVEUFZ_cjs.$q(a,"inspector")}),o},s=a=>{let l=t.getResolved();a.setConstraints({locked:l.lockedSettings,defaults:l.defaultSettings});};return {controller:t,getResolved:()=>t.getResolved(),getChromeOptions:i,isAiEnabled:()=>e.ai!==void 0&&chunkYOEVEUFZ_cjs.ar(t.getResolved(),"ai"),isDialogAvailable:a=>chunkYOEVEUFZ_cjs.br(t.getResolved(),a),bind(a,l){r?.(),s(a),r=t.subscribe(()=>{s(a),l();});},destroy(){r?.(),r=null;}}}function ew(e){return {goToSlide:t=>e.goToSlide(t),move:t=>t>0?e.next():e.prev(),endShow:()=>e.exitPresentation(),confirmUrl:t=>e.confirmExternalHyperlink?.(t)??true,lastViewed:()=>{let t=e.getPreviousPresentedSlide();t!==null&&e.goToSlide(t);},customShow:(t,n)=>e.customShowRunner.customShow(t,n),openFile:t=>{chunkYOEVEUFZ_cjs.ad(t);},openPresentation:t=>{chunkYOEVEUFZ_cjs.ad(t);},playMedia:t=>{chunkYOEVEUFZ_cjs.Od(e.getStageRoot(),t);},oleVerb:(t,n)=>{let o=chunkYOEVEUFZ_cjs.Cp(e.getCurrentSlide(),n,t);o&&(o.action==="download"?chunkYOEVEUFZ_cjs.lt(o.url,o.fileName??"download"):chunkYOEVEUFZ_cjs.mt(o.url));},runProgram:t=>{e.addRunProgramNotice(chunkYOEVEUFZ_cjs.es(t));}}}function rs(e){return e.presenting&&e.animationBuildsComplete&&!chunkYOEVEUFZ_cjs.bd(e.currentSlide)}function tw(e){return fI(e.target,e.currentSlide),chunkYOEVEUFZ_cjs.ed(e.target,e.currentSlide,{slideCount:e.slideCount},e.runner)!=="advance"?false:!rs(e)}function fI(e,t){let n=chunkYOEVEUFZ_cjs.ff(e,t);if(!n?.descriptor.click)return;let{element:o}=n,{style:r,clearStyle:i,durationMs:s}=n.descriptor.click;chunkYOEVEUFZ_cjs.ef(o,r),!(typeof setTimeout>"u")&&setTimeout(()=>{chunkYOEVEUFZ_cjs.ef(o,i);},s);}function vI(e){if(!(!e.presenting||e.endOfShow))return chunkYOEVEUFZ_cjs.cd(e.slides[e.currentSlide],{useTimings:e.presentationProperties.advanceMode!=="manual"})}function ow(e){let t=e.setTimer??((d,u)=>setTimeout(d,u)),n=e.clearTimer??(d=>clearTimeout(d)),o,r=()=>{o!==void 0&&(n(o),o=void 0);},i=()=>{r();let d=vI(e.getState());d!==void 0&&(o=t(()=>{o=void 0;let u=e.getState().currentSlide;e.next(),e.getState().currentSlide===u&&i();},d));},s=()=>{let d=e.getState();return [d.presenting,d.endOfShow,d.currentSlide,d.presentationProperties.advanceMode??"",d.slides[d.currentSlide]?.transition?.advanceAfterMs??""].join("|")},a="",l=()=>{let d=s();d!==a&&(a=d,i());},p=e.subscribe(l);return l(),{cancel:r,rearm:i,detach:()=>{r(),p();}}}function nw(e){let t,n=false,o=()=>{let i=e.getPresenting();if(i!==n){if(n=i,i){t=chunkYOEVEUFZ_cjs.On({root:e.root,onHidden:e.cancelAutoAdvance,onVisible:e.rearmAutoAdvance});return}t?.(),t=void 0,chunkYOEVEUFZ_cjs.Nn();}},r=e.subscribe(o);return o(),()=>{r(),t?.(),t=void 0,n&&(n=false,chunkYOEVEUFZ_cjs.Nn());}}function rw(e,t){let n=null,o=e.subscribe((r,i)=>{if(r.endOfShow&&!i.endOfShow&&n){let s=n;n=null,e.set({activeCustomShowId:s.showId,endOfShow:false}),t(s.index);return}i.presenting&&!r.presenting&&(n=null);});return {customShow(r,i){let s=e.get(),a=s.customShows.find(u=>u.id===r);if(!a)return;i&&(n={index:s.currentSlide,showId:s.activeCustomShowId});let l=chunkYOEVEUFZ_cjs.Jp(s.presentationProperties,s.slides.length),p=chunkYOEVEUFZ_cjs.Dp(s.slides,a,l);e.set({activeCustomShowId:r});let d=chunkYOEVEUFZ_cjs.Kp(p);d!==void 0&&t(d);},dispose:o}}function Ro(e,t,n){for(let r of n)e.style.removeProperty(r);let o=chunkYOEVEUFZ_cjs.Ea(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function is(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(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=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-accessibility-header"),i=chunkQPYQDJ2Q_cjs.w(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-accessibility-close");s.type="button",s.textContent=t("pptx.accessibility.close"),s.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,s),o.appendChild(r);let a=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-accessibility-summary");o.appendChild(a);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-accessibility-list");l.setAttribute("role","list"),l.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(l);let p=()=>{o.hidden=true;};s.addEventListener("click",p);let d=u=>{let m=chunkQPYQDJ2Q_cjs.w(e,"section",`pptxv-accessibility-group is-${u.severity}`),g=chunkQPYQDJ2Q_cjs.w(e,"h3","pptxv-accessibility-group-title");g.textContent=`${u.label} (${u.issues.length})`,m.appendChild(g);for(let[x,b]of u.issues.entries()){let v=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=chunkYOEVEUFZ_cjs.qm(b,x);let f=chunkQPYQDJ2Q_cjs.w(e,"strong","pptxv-accessibility-issue-type");f.textContent=chunkYOEVEUFZ_cjs.pm(b.type,h=>t(h));let S=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-accessibility-issue-message");S.textContent=b.message;let y=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-accessibility-issue-slide");y.textContent=t("pptx.notes.slideN",{n:b.slideIndex+1}),v.append(f,S,y),v.addEventListener("click",()=>n(b.slideIndex)),m.appendChild(v);}l.appendChild(m);};return {el:o,open(u){if(l.replaceChildren(),a.textContent=t("pptx.accessibility.issueCount",{count:u.length}),u.length===0){let m=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-accessibility-empty");m.textContent=t("pptx.accessibility.noIssuesFound"),l.appendChild(m);}else for(let m of chunkYOEVEUFZ_cjs.om(u,g=>t(g)))d(m);o.hidden=false,s.focus();},close:p}}var iw=5;function aw(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compat-toasts");r.dataset.testid="pptx-compat-toasts",r.hidden=true,r.setAttribute("style",chunkYOEVEUFZ_cjs.Jo());let i=0,s=0,a=()=>{r.setAttribute("style",chunkYOEVEUFZ_cjs.Jo(i,s));};r.setAttribute("role","region"),r.setAttribute("aria-label",t("pptx.compatibility.toastTitle"));let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compat-toasts-list"),p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compat-toasts-overflow");p.hidden=true;let d=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-compat-toasts-dismiss-all");d.type="button",d.dataset.testid="pptx-compat-toasts-dismiss-all",d.textContent=t("pptx.compatibility.dismissAll"),d.addEventListener("click",o),r.append(l,p,d);function u(m){let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compat-toast");g.dataset.testid="pptx-compat-toast",g.dataset.code=m.code,g.dataset.severity=m.severity,g.setAttribute("role","status"),g.appendChild(chunkQPYQDJ2Q_cjs.K(e,"alert"));let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compat-toast-body"),b=chunkQPYQDJ2Q_cjs.w(e,"strong","pptxv-compat-toast-title");b.textContent=t("pptx.compatibility.toastTitle");let v=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-compat-toast-message");v.textContent=t(m.messageKey,m.params),x.append(b,v);let f=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-compat-toast-dismiss");return f.type="button",f.dataset.testid="pptx-compat-toast-dismiss",f.setAttribute("aria-label",t("pptx.compatibility.dismiss")),f.appendChild(chunkQPYQDJ2Q_cjs.K(e,"close")),f.addEventListener("click",()=>n(m.id)),g.append(x,f),g}return {el:r,setBottomInset(m){s=m,a();},update(m,g=0){r.hidden=m.length===0,i=g,a(),l.replaceChildren(...m.slice(0,iw).map(u));let x=m.length-iw;p.hidden=x<=0,x>0&&(p.textContent=`+${x}`);}}}function sw(e,t,n,o){let r=n(t("pptx.accessibility.heading"));r.setAttribute("data-pptx-inspector-section","alt-text");let i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-accessibility-alt"),s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.elementAccessibility.altText");let a=e.createElement("textarea");a.rows=2,a.className="pptxv-accessibility-alt-input",a.placeholder=t("pptx.elementAccessibility.altTextPlaceholder"),a.setAttribute("aria-label",t("pptx.elementAccessibility.altText")),a.addEventListener("keydown",u=>u.stopPropagation()),a.addEventListener("change",()=>o.setAltText(a.value)),i.append(s,a),r.appendChild(i);let l=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-accessibility-title"),p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.elementAccessibility.title");let d=e.createElement("input");return d.type="text",d.className="pptxv-accessibility-title-input",d.placeholder=t("pptx.elementAccessibility.titlePlaceholder"),d.setAttribute("aria-label",t("pptx.elementAccessibility.title")),d.addEventListener("keydown",u=>u.stopPropagation()),d.addEventListener("change",()=>o.setTitle(d.value)),l.append(p,d),r.appendChild(l),{el:r,update(u){r.hidden=!u.hasSelection||!u.showAccessibilitySection,e.activeElement!==a&&(a.value=u.altText),e.activeElement!==d&&(d.value=u.title),a.disabled=!u.showAccessibilitySection,d.disabled=!u.showAccessibilitySection;}}}function Q(e){return e.createElement("pptx-ui-select")}function me(e){return e.createElement("pptx-ui-checkbox")}function he(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=Q(e);r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let s=e.createElement("option");s.value=i.value,s.textContent=i.label,r.appendChild(s);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function oe(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),o=me(e);o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunkQPYQDJ2Q_cjs.w(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 Fe(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-range"),o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunkQPYQDJ2Q_cjs.w(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 s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-range-readout"),a=t.formatValue??(p=>String(p)),l=()=>{s.textContent=a(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{l(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,s),n.appendChild(r),{el:n,setValue(p){e.activeElement!==i&&(i.value=String(p),l());},setDisabled(p){i.disabled=p;}}}function pw(e,t,n,o){let r=n(t("pptx.action.title")),i=lw(e,t,"click",o),s=lw(e,t,"hover",o);r.append(i.el,s.el);let a=1,l=[];return {el:r,setSlideCount(p){a=Math.max(1,p);},setCustomShows(p){l=p;},update(p){r.hidden=!p.hasSelection,i.update(p.actionClick,a,l),s.update(p.actionHover,a,l);}}}function lw(e,t,n,o){let r=e.createElement("fieldset");r.className="pptxv-action-fieldset";let i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let s=Q(e);s.setAttribute("aria-label",t(n==="click"?"pptx.action.onClick":"pptx.action.onHover"));for(let y of chunkYOEVEUFZ_cjs.um){let h=e.createElement("option");h.value=y.value,h.textContent=t(y.labelKey),s.appendChild(h);}let a=e.createElement("input"),l=new Set(["url","openFile","openPresentation","runProgram"]),p=Q(e);p.dataset.testid="pptx-action-custom-show",p.setAttribute("aria-label",t("pptx.hyperlink.customShowLabel"));let d=e.createElement("option");d.value="",p.appendChild(d);let u=e.createElement("label");u.className="pptxv-action-return-row";let m=me(e);m.dataset.testid="pptx-action-custom-show-return",u.append(m,e.createTextNode(t("pptx.hyperlink.customShowReturn")));let g=1,x=[],b=y=>({url:l.has(y)?a.value:void 0,slideIndex:y==="slide"?chunkYOEVEUFZ_cjs.wm(a.valueAsNumber,g):void 0,customShowId:y==="customShow"&&p.value||void 0,returnAfter:y==="customShow"?m.checked:void 0}),v=()=>{let y=s.value;o.setElementAction(n,{trigger:n,type:y,...b(y)});},f=()=>{let y=p.value;p.replaceChildren(d);for(let h of x){let C=e.createElement("option");C.value=h.id,C.textContent=h.name,p.appendChild(C);}p.value=x.some(h=>h.id===y)?y:"";},S=()=>{let y=s.value,h=y==="slide",C=y==="customShow";a.hidden=!(l.has(y)||h),a.type=h?"number":"url",a.placeholder=h?t("pptx.action.slideNumberPlaceholder"):"https://",h&&(a.min="1",a.max=String(Math.max(1,g)),a.step="1"),p.hidden=!C,u.hidden=!C;};return s.addEventListener("change",()=>{S();let y=s.value;chunkYOEVEUFZ_cjs.vm(y,b(y))&&v();}),a.addEventListener("change",v),p.addEventListener("change",v),m.addEventListener("change",v),r.append(i,s,a,p,u),{el:r,update(y,h,C){g=Math.max(1,h),x=C,s.value=y?.type??"none",a.value=y?.type==="slide"?String((y.slideIndex??0)+1):y?.url??"",f(),p.value=y?.customShowId??"",m.checked=y?.returnAfter===true,S();}}}var Lt=null;function Mt(e,t=false){Oo(),!(typeof Audio>"u")&&(Lt=new Audio(e),Lt.loop=t,Lt.play().catch(()=>{}));}function Oo(){Lt&&(Lt.pause(),Lt.currentTime=0,Lt=null);}function as(e){if(e instanceof Element)return e.closest("[data-element-id]")?.dataset.elementId}function dw(e,t){let n=null;e.addEventListener("click",o=>{let r=t.getController(),i=as(o.target);if(!i||!r?.hasInteractiveSequence(i))return;let s=r.advanceInteractive(i);s&&(o.stopPropagation(),t.play(r,s));}),e.addEventListener("mouseover",o=>{let r=chunkYOEVEUFZ_cjs.ff(o.target,t.getSlide()),i=r?.descriptor.hover?r.element:null;i!==n&&(n&&chunkYOEVEUFZ_cjs.ef(n,chunkYOEVEUFZ_cjs.df),n=i,i&&r?.descriptor.hover&&chunkYOEVEUFZ_cjs.ef(i,r.descriptor.hover.enterStyle));let s=t.getController(),a=as(o.target);if(!a||!s?.hasHoverSequence(a))return;s.resetHover(a);let l=s.advanceHover(a);l&&t.play(s,l);}),e.addEventListener("mouseout",o=>{let r=o.relatedTarget;(!(r instanceof Node)||!e.contains(r))&&n&&(chunkYOEVEUFZ_cjs.ef(n,chunkYOEVEUFZ_cjs.df),n=null);let i=t.getController(),s=as(o.target);s&&i?.hasHoverSequence(s)&&i.resetHover(s);});}function ss(){let e=new Map,t=[],n={current:null},o=null,r=null,i=null,s=-1,a=false,l=null,p=new Map,d=null,u=false,m,g,x,b,v,f,S=()=>o?.interactiveTriggerShapeIds??new Set,y=()=>o?.hoverTriggerShapeIds??new Set,h=M=>{e.clear();for(let[D,I]of M)e.set(D,I);w();},C=()=>{let M=new Set;for(let[D,I]of e){(I.build||I.animatesFill||I.animatesStroke)&&M.add(D);let R=D.indexOf("::");R>0&&M.add(D.slice(0,R));}return Array.from(M)},w=()=>{if(!r)return;let M=C();M.length>0&&d?.(M),chunkEHQE3K3X_cjs.c(r,e,S(),y());},A={setStates:M=>{h(M(new Map(e)));},timers:t,buildHandle:n,playSound:M=>{Mt(p.get(M)??M);},stopSound:Oo,frameRoot:()=>r},P=()=>{l&&(l(),l=null);},k=chunkYOEVEUFZ_cjs.Fr(),T=()=>{chunkYOEVEUFZ_cjs.Gr(A,k);},E=()=>{P(),T(),o=null,A.mediaTimeNodeElementIds=new Map,A.mediaBookmarkTimesMs=new Map,e.clear(),r=null,i=null;},L=(M,D,I=false)=>{if(o=chunkYOEVEUFZ_cjs.de.fromSlide(M,{slideHeightPx:g?.height,slideWidthPx:g?.width,themeColorMap:x,pixelateMosaic:b}),A.mediaTimeNodeElementIds=chunkYOEVEUFZ_cjs.Pd(M.nativeAnimations??[]),A.mediaBookmarkTimesMs=chunkYOEVEUFZ_cjs.Qd(M.elements),chunkEHQE3K3X_cjs.b(D,o.keyframesCss),h(o.computeStates()),u=false,I){u=o.hasMoreSteps(),o.completeAll(),h(o.computeStates());return}if(o.hasMoreSteps()){let R=o.peekNext();if(R?.autoAdvance){let O=o,B=window.setTimeout(()=>{let F=O.advance();F&&(chunkYOEVEUFZ_cjs.Dr(O,F,A),chunkYOEVEUFZ_cjs.Er(O,A));},R.autoAdvanceDelayMs??0);t.push(B);}}};return {elementStates:e,advance(){return chunkYOEVEUFZ_cjs.Hr(o,A,k)},isComplete(){return !o||!o.hasMoreSteps()},isSeededCompleted(){return u},replayCurrentSlide(M){m&&(T(),L(m,M));},navigateToZoomTarget(M,D,I){return v=chunkYOEVEUFZ_cjs.Lo(M,D,I),f=chunkYOEVEUFZ_cjs.No(M.transitionDurationMs),M.targetSlideIndex},consumeZoomReturnOnAdvance(M){let D=v,I=chunkYOEVEUFZ_cjs.Mo(M,void 0,D);if(I.returnedToZoom&&I.nextSlideIndex!==void 0)return v=I.excursion,f=chunkYOEVEUFZ_cjs.No(D?.transitionDurationMs),I.nextSlideIndex},syncStage(M){P();let D=M.showWithAnimation!==false;if(!M.presenting||!M.slide||!D){T(),o=null,e.clear(),chunkEHQE3K3X_cjs.b(M.doc,""),r=M.presenting?M.stage:null,i=M.presenting?M.stage:null,s=M.slideIndex,a&&!M.presenting&&(Oo(),v=void 0,f=void 0),a=M.presenting;return}chunkEHQE3K3X_cjs.a(M.doc),p=M.mediaDataUrls??new Map,d=M.reRenderElements??null,r=M.stage,g=M.canvasSize,x=M.themeColorMap,b=M.pixelateMosaicAnimation;let I=!a,R=M.slideIndex!==s,O=m;m=M.slide,I||R||!o?(T(),L(M.slide,M.doc,M.seedCompleted===true)):w();let B=f;f=void 0;let F=M.slideIndex<s,V=B??(F?O?.transition:M.slide.transition);if(!I&&R&&i&&chunkYOEVEUFZ_cjs.Br(V,_=>p.get(_),{play:Mt,stop:Oo}),!I&&R&&i&&V&&V.type&&V.type!=="none"){let _=M.stage.cloneNode(true);l=chunkEHQE3K3X_cjs.d({doc:M.doc,stageWrap:M.stageWrap,outgoing:i,incoming:_,transition:V,outgoingSlide:O,incomingSlide:M.slide,onDone:()=>{l=null;}});}dw(M.stage,{getController:()=>o,play:(_,N)=>{chunkYOEVEUFZ_cjs.Dr(_,N,A);},getSlide:()=>M.slide}),i=M.stage,s=M.slideIndex,a=true;},reset(){E(),s=-1,a=false;}}}function cw(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-after-animation-row"),i=chunkQPYQDJ2Q_cjs.w(e,"label"),s=chunkQPYQDJ2Q_cjs.w(e,"span");s.textContent=t("pptx.animation.afterAnimation");let a=Q(e);a.setAttribute("aria-label",t("pptx.animation.afterAnimation"));for(let u of chunkYOEVEUFZ_cjs.rd){let m=e.createElement("option");m.value=u,m.textContent=t(`pptx.animation.afterAnimation.${u}`),a.appendChild(m);}a.addEventListener("change",()=>n(a.value)),i.append(s,a);let l=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-after-animation-color"),p=chunkQPYQDJ2Q_cjs.w(e,"span");p.textContent=t("pptx.animation.afterAnimation.color");let d=e.createElement("input");return d.type="color",d.setAttribute("aria-label",t("pptx.animation.afterAnimation.color")),d.addEventListener("change",()=>o(d.value)),l.append(p,d),l.hidden=true,r.append(i,l),{el:r,update(u){a.value=u.action,a.disabled=!u.editable;let m=u.action==="dimToColor";l.hidden=!m,d.value=u.color??"#808080",d.disabled=!u.editable;}}}var mw=["fromTop","fromBottom","fromLeft","fromRight"],uw=[{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"}],xw=["none","untilNextClick","untilEndOfSlide"];function Dr(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-anim-field"),r=chunkQPYQDJ2Q_cjs.w(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function nt(e,t,n,o,r){let i=Dr(e,t,r),s=Q(e);s.setAttribute("aria-label",t);for(let a of n){let l=e.createElement("option");l.value=a.value,l.textContent=a.label,s.appendChild(l);}return s.addEventListener("change",()=>o(s.value)),i.appendChild(s),s}function Rr(e,t,n,o,r){let i=Dr(e,t,r),s=e.createElement("input");return s.type="number",s.min=String(n.min),s.max=String(n.max),s.step=String(n.step),s.addEventListener("change",()=>o(s.valueAsNumber)),i.appendChild(s),s}function gw(e,t,n,o){let r=nt(e,t("pptx.animation.trigger.bookmarkLabel"),[],o,n);r.setAttribute("data-pptx-animation-bookmark-picker","");let i=r.parentElement;return {select:r,update(s,a){i.hidden=a?.trigger!=="onMediaBookmark";let l=chunkYOEVEUFZ_cjs.fd(s),p=e.createElement("option");p.value="",p.textContent=t(l.length===0?"pptx.animation.trigger.noBookmarks":"pptx.animation.trigger.selectBookmark"),r.replaceChildren(p,...l.map(d=>{let u=e.createElement("option");return u.value=d.value,u.textContent=d.label,u})),r.value=chunkYOEVEUFZ_cjs.gd(a),r.disabled||=l.length===0;}}}function Or(e){return chunkYOEVEUFZ_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function bw(e,t){let n=t.find(o=>o.id===e.elementId);return n?Or(n):e.elementId.slice(0,8)}function yI(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function fw(e,t,n,o,r,i){let s=chunkYOEVEUFZ_cjs.$c(o);n.replaceChildren(...o.map((a,l)=>{let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-anim-bar-seg");p.classList.add(`is-${yI(a)}`),p.classList.toggle("is-selected",a.elementId===i),p.style.left=`${s[l].leftPercent}%`,p.style.width=`${s[l].widthPercent}%`;let d=chunkYOEVEUFZ_cjs.ud(a,t);return p.title=`${bw(a,r)} - ${d} (${a.durationMs??500}ms)`,p}));}function vw(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint");let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-animation-timeline-name"),a=n.map(l=>{let p=r.find(d=>d.id===l);return p?Or(p):l.slice(0,8)}).join(", ");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${a}`,i.append(s),i}function hw(e,t,n,o,r,i,s,a,l){let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-row");p.classList.toggle("is-selected",n.elementId===s);let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-animation-timeline-name");d.textContent=`${o+1}. ${bw(n,i)}`;let u=(m,g,x)=>{let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-btn");return b.type="button",b.textContent=g,b.setAttribute("aria-label",t(m==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),b.disabled=x,b.addEventListener("click",()=>l(n.elementId,m)),b};return p.append(d,u("up","\u2191",!a||o===0),u("down","\u2193",!a||o===r-1)),p}var ls="none",ps="current",yw="other";function Sw(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-effect-sound-row"),i=chunkQPYQDJ2Q_cjs.w(e,"span");i.textContent=t("pptx.animation.sound");let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-effect-sound-controls"),a=Q(e);a.setAttribute("aria-label",t("pptx.animation.sound"));let l=e.createElement("option");l.value=ls,l.textContent=t("pptx.animation.sound.none");let p=e.createElement("option");p.value=ps;let d=e.createElement("option");d.value=yw,d.textContent=t("pptx.animation.sound.other"),a.append(l);for(let x of chunkYOEVEUFZ_cjs.md){let b=e.createElement("option");b.value=x.id,b.textContent=t(x.i18nKey),a.append(b);}a.append(d);let u=e.createElement("button");u.type="button",u.className="pptxv-effect-sound-preview",u.setAttribute("aria-label",t("pptx.animation.sound.preview")),u.textContent="\u25B6",u.disabled=true;let m=e.createElement("input");m.type="file",m.accept="audio/*",m.setAttribute("aria-label",t("pptx.animation.sound.chooseFile")),m.className="pptxv-effect-sound-file-input",m.tabIndex=-1;let g;return a.addEventListener("change",()=>{let x=a.value;if(x===yw){m.click();return}if(x===ls){n(void 0);return}x!==ps&&o(x);}),m.addEventListener("change",()=>{let x=m.files?.[0];if(m.value="",!x)return;let b=new FileReader;b.onload=()=>{typeof b.result=="string"&&n({dataUrl:b.result,fileName:x.name});},b.readAsDataURL(x);}),u.addEventListener("click",()=>{if(!g)return;let x=chunkYOEVEUFZ_cjs.nd(g);x&&Mt(x.dataUrl);}),s.append(a,u),r.append(i,s,m),{el:r,update(x){g=x.catalogueId,x.hasSound&&!x.catalogueId?(p.textContent=x.fileName??t("pptx.animation.sound.custom"),p.isConnected||a.insertBefore(p,l.nextSibling)):p.isConnected&&p.remove(),a.value=x.catalogueId??(x.hasSound?ps:ls),a.disabled=!x.editable,u.disabled=!x.catalogueId;}}}function Cw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-motion-path-row"),r=chunkQPYQDJ2Q_cjs.w(e,"span");r.textContent=t("pptx.animation.motionPath.label");let i=Q(e);i.setAttribute("aria-label",t("pptx.animation.motionPath.label"));let s=e.createElement("option");s.value="none",s.textContent=t("pptx.animation.motionPath.none"),i.appendChild(s);let a=e.createElement("option");a.value="custom",a.textContent=t("pptx.animation.motionPath.custom");for(let p of chunkYOEVEUFZ_cjs.Vd){let d=e.createElement("optgroup");d.label=t(chunkYOEVEUFZ_cjs.Wd(p));for(let u of chunkYOEVEUFZ_cjs.Yd(p)){let m=e.createElement("option");m.value=u.id,m.textContent=t(chunkYOEVEUFZ_cjs.Xd(u.id)),d.appendChild(m);}i.appendChild(d);}i.addEventListener("change",()=>n(i.value));let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-motion-path-hint");return l.textContent=t("pptx.animation.motionPath.editHint"),l.hidden=true,o.append(r,i,l),{el:o,update(p){let d=chunkYOEVEUFZ_cjs.Zd(p.motionPath),u=!!p.motionPath&&!d;u?a.parentElement!==i&&i.insertBefore(a,s.nextSibling):a.remove(),i.value=u?"custom":d??"none",i.disabled=!p.editable,l.hidden=!p.motionPath;}}}function ww(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(V=>V.elementId===r.selectedElementId),s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-anim-header"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-section-title");a.textContent=t("pptx.animation.title");let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-anim-preview-btn");l.type="button",l.textContent=t("pptx.animation.preview"),l.addEventListener("click",()=>chunkYOEVEUFZ_cjs.fe(e,i())),s.append(a,l),o.appendChild(s);let p=(V,_,N)=>nt(e,t(_),[{value:"none",label:t("pptx.animation.none")},...N.map(W=>({value:W,label:t(`pptx.animation.preset.${W}`)}))],W=>n.setAnimationEffect(V,W),o),d=p("entrance","pptx.animation.entrance",chunkYOEVEUFZ_cjs.Ic),u=p("emphasis","pptx.animation.emphasis",chunkYOEVEUFZ_cjs.Kc),m=p("exit","pptx.animation.exit",chunkYOEVEUFZ_cjs.Jc),g=Cw(e,t,V=>n.applyMotionPath(V));o.appendChild(g.el);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-anim-options");o.appendChild(x);let b=V=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,V);},v=Dr(e,t("pptx.animation.direction"),x);v.classList.add("pptxv-anim-direction");let f=mw.map(V=>{let _=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-anim-direction-btn");return _.type="button",_.textContent=t(`pptx.animation.direction.${V}`),_.addEventListener("click",()=>b({direction:V})),v.appendChild(_),{value:V,btn:_}}),S=nt(e,t("pptx.animation.sequence"),chunkYOEVEUFZ_cjs.Mc.map(V=>({value:V,label:t(`pptx.animation.sequence.${V}`)})),V=>b({sequence:V}),x),y=Sw(e,t,V=>{r.selectedElementId&&n.setAnimationSound(r.selectedElementId,V);},V=>{r.selectedElementId&&n.setAnimationStockSound(r.selectedElementId,V);});x.appendChild(y.el);let h=cw(e,t,V=>b({afterAnimation:V}),V=>{b({afterAnimationColor:V}),n.pushRecentColor(V);});x.appendChild(h.el);let C=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-section-title");C.textContent=t("pptx.animation.timing"),x.appendChild(C);let w=nt(e,t("pptx.animation.trigger"),chunkYOEVEUFZ_cjs.Lc.map(V=>({value:V,label:t(`pptx.animation.trigger.${V}`)})),V=>b({trigger:V,triggerShapeId:""}),x),A=nt(e,t("pptx.animation.trigger.shapeLabel"),[],V=>b({triggerShapeId:V}),x),P=A.parentElement,k=gw(e,t,x,V=>b({triggerBookmark:V})),T=Rr(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},V=>b({durationMs:V}),x),E=Rr(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},V=>b({delayMs:V}),x),L=nt(e,t("pptx.animation.timingCurve"),uw.map(V=>({value:V.value,label:t(V.labelKey)})),V=>b({timingCurve:V}),x),M=Rr(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},V=>b({repeatCount:V}),x),D=nt(e,t("pptx.animation.repeatUntil"),xw.map(V=>({value:V,label:t(`pptx.animation.repeatUntil.${V}`)})),V=>b({repeatMode:V}),x),I=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-anim-timeline"),R=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-section-title");R.textContent=t("pptx.animation.timelineBar");let O=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-anim-bar"),B=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-section-title");B.textContent=t("pptx.animation.timeline");let F=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-list");return I.append(R,O,B,F),o.appendChild(I),{el:o,update(V){if(r=V,o.hidden=!V.selectedElementId,o.hidden)return;let _=i(),N=!!(_?.entrance||_?.emphasis||_?.exit||_?.motionPath);d.value=_?.entrance??"none",u.value=_?.emphasis??"none",m.value=_?.exit??"none",g.update({motionPath:_?.motionPath,editable:V.editable}),l.hidden=!N,x.hidden=!N;let W=_?chunkYOEVEUFZ_cjs.Hc([_],_.elementId):[],X=chunkYOEVEUFZ_cjs.Gc(_,W);v.hidden=W.length===0;for(let{value:j,btn:Y}of f)Y.hidden=!W.includes(j),Y.classList.toggle("is-active",X===j),Y.disabled=!V.editable;S.value=_?.sequence??"asOne",y.update({...chunkYOEVEUFZ_cjs.od(V.animations,V.selectedElementId??""),editable:V.editable}),h.update({action:_?.afterAnimation??"none",color:_?.afterAnimationColor,editable:V.editable}),w.value=_?.trigger??"onClick",P.hidden=w.value!=="onShapeClick",A.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...V.elements.filter(j=>j.id!==V.selectedElementId).map(j=>({id:j.id,label:Or(j)}))].map(j=>{let Y=e.createElement("option");return Y.value=j.id,Y.textContent=j.label,Y})),A.value=_?.triggerShapeId??"",T.value=String(_?.durationMs??450),E.value=String(_?.delayMs??0),L.value=chunkYOEVEUFZ_cjs.Ec(_?.timingCurve),M.value=String(_?.repeatCount??1),D.value=_?.repeatMode??"none";for(let j of [d,u,m,S,w,A,L,D])j.disabled=!V.editable;T.disabled=E.disabled=M.disabled=!V.editable,k.select.disabled=!V.editable,k.update(V.elements,_);let ie=[...V.animations].sort((j,Y)=>(j.order??0)-(Y.order??0)),G=chunkYOEVEUFZ_cjs.id(ie,V.animationTimelineAnchors??[]),K=new Map(ie.map(j=>[j.elementId,j]));I.hidden=G.length===0,fw(e,t,O,ie,V.elements,V.selectedElementId),F.replaceChildren(...G.flatMap((j,Y)=>{if(j.kind==="native")return [vw(e,t,j.targetIds,Y,V.elements)];let ue=K.get(j.elementId);return ue?[hw(e,t,ue,Y,G.length,V.elements,V.selectedElementId,V.editable,n.reorderAnimation)]:[]}));}}}function Ho(e,t,n){let o=e.createElement("label");return o.className="pptxv-exhaustive-field",o.textContent=t,n.setAttribute("aria-label",t),n.classList.add("pptxv-exhaustive-field-control"),o.appendChild(n),{label:o,control:n}}function Dt(e,t){return Ho(e,t,e.createElement("input"))}function ge(e,t){let n=Dt(e,t);return n.control.type="number",n}function We(e,t,n){let o=Dt(e,t);return o.control.type="color",n&&o.control.addEventListener("change",()=>n(o.control.value)),o}function ye(e,t){return Ho(e,t,me(e))}function to(e,t,n){let o=Q(e);return it(e,o,n.map(r=>[r,r])),Ho(e,t,o)}function Ve(e,t,n,o){let r=Q(e);return it(e,r,n.map(i=>[i.value,o(i.labelKey)])),Ho(e,t,r)}function rt(e,t,n,o,r){let i=Q(e);return it(e,i,n.map(s=>[s,chunkYOEVEUFZ_cjs.Qb(o,s,r)])),Ho(e,t,i)}function it(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let s=e.createElement("option");return s.value=r,s.textContent=i,s})),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 ds(e){return e.split(",").map(Number).filter(Number.isFinite)}function oo(e,t){let{label:n,control:o}=ge(e,t("pptx.chart.dataPointIndex"));return o.min="1",o.value="1",{label:n,control:o,selected:()=>Math.max(0,(o.valueAsNumber||1)-1),subscribe:r=>o.addEventListener("change",r),setSelected:r=>{o.value=String(Math.max(0,r)+1);}}}function Ew(e,t,n,o=oo(e,t),r){let i=e.createElement("div");i.className="pptxv-chart-advanced";let s=to(e,t("pptx.chart.axis"),[]),a=ge(e,t("pptx.chart.axisMinimum")),l=ge(e,t("pptx.chart.axisMaximum")),p=ge(e,t("pptx.chart.majorUnit")),d=Ve(e,t("pptx.chart.displayUnits"),chunkYOEVEUFZ_cjs.Kb,t),u=ye(e,t("pptx.chart.logScale")),m=ye(e,t("pptx.chart.reverseOrder")),g=ye(e,t("pptx.chart.majorGridlines")),x=to(e,t("pptx.chart.series"),[]),b=Ve(e,t("pptx.chart.trendlines"),chunkYOEVEUFZ_cjs.Lb,t),v=ye(e,t("pptx.chart.trendlineEquation")),f=ye(e,t("pptx.chart.trendlineRSquared")),S=Ve(e,t("pptx.chart.errorBars"),chunkYOEVEUFZ_cjs.Mb,t),y=ge(e,t("pptx.chart.errorBarAmount")),h=rt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"],chunkYOEVEUFZ_cjs.Yb,t),C=ge(e,t("pptx.chart.markerSize")),w=We(e,t("pptx.chart.seriesColor"),r),A=We(e,t("pptx.chart.dataPointColor"),r),P=ge(e,t("pptx.chart.pointExplosion"));i.append(s.label,a.label,l.label,p.label,d.label,u.label,m.label,g.label,x.label,b.label,v.label,f.label,S.label,y.label,h.label,C.label,w.label,o.label,A.label,P.label);let k,T=()=>Math.max(0,s.control.selectedIndex),E=()=>Math.max(0,x.control.selectedIndex),L=()=>{if(!k)return;let I=[...k.axes??[]],R=I[T()]??{axisType:"valAx"};I[T()]={...R,min:Se(a.control),max:Se(l.control),majorUnit:Se(p.control),displayUnits:d.control.value||void 0,logScale:u.control.checked,orientation:m.control.checked?"maxMin":"minMax",majorGridlines:g.control.checked},n({...k,axes:I});},M=()=>{if(!k?.series[E()])return;let I=[...k.series],R=I[E()],O=b.control.value,B=S.control.value,F=o.selected(),V=R.dataPoints?.find(({idx:N})=>N===F),_=chunkYOEVEUFZ_cjs.na(R.dataPoints,{...V??{idx:F},spPr:{...V?.spPr,fillColor:A.control.value},explosion:Se(P.control)});I[E()]={...R,color:w.control.value,trendlines:O?[{trendlineType:O,displayEq:v.control.checked,displayRSq:f.control.checked}]:[],errBars:B?[{direction:"y",barType:"both",valType:B,val:Se(y.control)}]:[],marker:{symbol:h.control.value,size:Se(C.control)},dataPoints:_},n({...k,series:I});};for(let I of [a.control,l.control,p.control,d.control,u.control,m.control,g.control])I.addEventListener("change",L);for(let I of [b.control,v.control,f.control,S.control,y.control,h.control,C.control,w.control,A.control,P.control])I.addEventListener("change",M);s.control.addEventListener("change",()=>k&&D(k)),x.control.addEventListener("change",()=>k&&D(k)),o.subscribe(()=>k&&D(k));let D=I=>{k=I,it(e,s.control,(I.axes??[]).map((F,V)=>[String(V),F.titleText??chunkYOEVEUFZ_cjs.Qb(chunkYOEVEUFZ_cjs.Wb,F.axisType,t)])),it(e,x.control,I.series.map((F,V)=>[String(V),F.name]));let R=I.axes?.[T()];Ce(a.control,R?.min),Ce(l.control,R?.max),Ce(p.control,R?.majorUnit),d.control.value=R?.displayUnits??"",u.control.checked=R?.logScale??false,m.control.checked=R?.orientation==="maxMin",g.control.checked=R?.majorGridlines??false;let O=I.series[E()];b.control.value=O?.trendlines?.[0]?.trendlineType??"",v.control.checked=O?.trendlines?.[0]?.displayEq??false,f.control.checked=O?.trendlines?.[0]?.displayRSq??false,S.control.value=O?.errBars?.[0]?.valType??"",Ce(y.control,O?.errBars?.[0]?.val),h.control.value=O?.marker?.symbol??"none",Ce(C.control,O?.marker?.size),w.control.value=O?.color??"#4472c4";let B=O?.dataPoints?.find(({idx:F})=>F===o.selected());A.control.value=B?.spPr?.fillColor??O?.color??"#4472c4",Ce(P.control,B?.explosion);};return {el:i,update:D}}var cs="pptxv-chart-grid-cell-highlight";function Tw(e,t,n,o=()=>true){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-chart-grid"),i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-chart-grid-toolbar"),s=e.createElement("table");s.className="pptxv-chart-grid-table";let a=(S,y,h)=>{let C=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-chart-grid-btn");return C.type="button",C.textContent=`+ ${S}`,C.title=y,C.setAttribute("aria-label",y),C.addEventListener("click",h),C},l,p=S=>{S&&n(S);},d=a(t("pptx.chart.cat"),t("pptx.chart.addCategory"),()=>{l&&p(chunkYOEVEUFZ_cjs.dc(l));}),u=a(t("pptx.chart.seriesShort"),t("pptx.chart.addSeries"),()=>{l&&p(chunkYOEVEUFZ_cjs.bc(l));});i.append(d,u),r.append(i,s);let m=(S,y,h,C)=>{let w=e.createElement("input");return w.type=S,w.className="pptxv-chart-grid-cell",w.value=y,w.setAttribute("aria-label",h),w.addEventListener("change",()=>C(w.value)),w.addEventListener("keydown",A=>A.stopPropagation()),w},g=(S,y)=>{let h=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-chart-grid-remove");return h.type="button",h.textContent="\xD7",h.title=S,h.setAttribute("aria-label",S),h.addEventListener("click",y),h},x=(S,y,h)=>{let C=[...S.series[y].values];for(;C.length<=h;)C.push(0);return {...S,series:S.series.map((w,A)=>A===y?{...w,values:C}:w)}},b=(S,y)=>{let h=e.createElement("thead"),C=e.createElement("tr"),w=e.createElement("th");return w.setAttribute("aria-label",t("pptx.chart.categories")),C.appendChild(w),S.series.forEach((A,P)=>{let k=e.createElement("th"),T=m("text",A.name,t("pptx.chart.seriesShort"),E=>n({...S,series:S.series.map((L,M)=>M===P?{...L,name:E}:L)}));y?.seriesIndex===P&&y.pointIndex===void 0&&T.classList.add(cs),k.appendChild(T),S.series.length>1&&k.appendChild(g(t("pptx.chart.removeSeries"),()=>p(chunkYOEVEUFZ_cjs.cc(S,P)))),C.appendChild(k);}),h.appendChild(C),h},v=(S,y)=>{let h=e.createElement("tbody");return S.categories.forEach((C,w)=>{let A=e.createElement("tr"),P=e.createElement("td");P.appendChild(m("text",C,t("pptx.chart.categories"),k=>p(chunkYOEVEUFZ_cjs.fc(S,w,k)))),S.categories.length>1&&P.appendChild(g(t("pptx.chart.removeCategory"),()=>p(chunkYOEVEUFZ_cjs.ec(S,w,o())))),A.appendChild(P),S.series.forEach((k,T)=>{let E=e.createElement("td"),L=m("number",String(k.values[w]??0),`${k.name} value ${w+1}`,M=>{let D=w>=k.values.length?x(S,T,w):S;p(chunkYOEVEUFZ_cjs.gc(D,T,w,M));});y?.seriesIndex===T&&y.pointIndex===w&&L.classList.add(cs),E.appendChild(L),A.appendChild(E);}),h.appendChild(A);}),h},f=null;return {el:r,update(S,y=null){if(l=S,r.hidden=!S,!S)return;s.textContent="",s.append(b(S,y),v(S,y));let h=y?`${y.seriesIndex}:${y.pointIndex??""}`:null;h!==null&&h!==f&&s.querySelector(`.${cs}`)?.scrollIntoView?.({block:"nearest",inline:"nearest"}),f=h;},setDisabled(S){d.disabled=S,u.disabled=S;for(let y of s.querySelectorAll("input"))y.disabled=S;}}}var SI=chunkYOEVEUFZ_cjs.Ob.filter(e=>e.value!=="");function Pw(e,t,n){let o=to(e,t("pptx.chart.series"),[]),r=rt(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"],chunkYOEVEUFZ_cjs.Ub,t),i=ye(e,t("pptx.chart.secondaryAxis")),s=rt(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"],chunkYOEVEUFZ_cjs.Xb,t),a=ye(e,t("pptx.chart.showValue")),l=ye(e,t("pptx.chart.showCategory")),p=ye(e,t("pptx.chart.showSeriesName")),d=ye(e,t("pptx.chart.showPercentage")),u=ye(e,t("pptx.chart.showLeaderLines")),m=ge(e,t("pptx.chart.trendlineOrder")),g=ge(e,t("pptx.chart.trendlinePeriod")),x=ge(e,t("pptx.chart.forecastForward")),b=ge(e,t("pptx.chart.forecastBackward")),v=ge(e,t("pptx.chart.trendlineIntercept")),f=We(e,t("pptx.chart.trendlineColor"),n),S=rt(e,t("pptx.chart.errorBarDirection"),["x","y"],chunkYOEVEUFZ_cjs.Zb,t),y=Ve(e,t("pptx.chart.errorBarType"),chunkYOEVEUFZ_cjs.Nb,t),h=We(e,t("pptx.chart.errorBarColor"),n),C=ye(e,t("pptx.chart.noEndCap")),w=Dt(e,t("pptx.chart.customPlus")),A=Dt(e,t("pptx.chart.customMinus")),P=We(e,t("pptx.chart.markerFill"),n),k=We(e,t("pptx.chart.markerOutline"),n),T=Ve(e,t("pptx.chart.dataPointMarker"),SI,t),E=ge(e,t("pptx.chart.markerSize")),L=ye(e,t("pptx.chart.invertIfNegative")),M=to(e,t("pptx.chart.axis"),[]),D=Dt(e,t("pptx.chart.axisTitle")),I=ge(e,t("pptx.chart.minorUnit")),R=ye(e,t("pptx.chart.minorGridlines")),O=Dt(e,t("pptx.chart.numberFormat")),B=Ve(e,t("pptx.chart.tickLabelPosition"),chunkYOEVEUFZ_cjs.Jb,t),F=We(e,t("pptx.chart.axisColor"),n),V=We(e,t("pptx.chart.axisFontColor"),n),_=ge(e,t("pptx.chart.axisFontSize"));return {series:o,axis:M,comboType:r,secondaryAxis:i,labelPosition:s,showValue:a,showCategory:l,showSeries:p,showPercent:d,leaderLines:u,trendOrder:m,trendPeriod:g,trendForward:x,trendBackward:b,trendIntercept:v,trendColor:f,errorDirection:S,errorBarType:y,errorColor:h,noEndCap:C,customPlus:w,customMinus:A,markerFill:P,markerLine:k,pointMarker:T,pointMarkerSize:E,pointInvert:L,axisTitle:D,minorUnit:I,minorGridlines:R,numberFormat:O,tickPosition:B,axisColor:F,axisFontColor:V,axisFontSize:_,seriesFields:[r,i,s,a,l,p,d,u,m,g,x,b,v,f,S,y,h,C,w,A,P,k,T,E,L],axisFields:[D,I,R,O,B,F,V,_]}}function Aw(e,t,n,o,r){let i=e.createElement("div");i.className="pptxv-chart-exhaustive";let{series:s,axis:a,comboType:l,secondaryAxis:p,labelPosition:d,showValue:u,showCategory:m,showSeries:g,showPercent:x,leaderLines:b,trendOrder:v,trendPeriod:f,trendForward:S,trendBackward:y,trendIntercept:h,trendColor:C,errorDirection:w,errorBarType:A,errorColor:P,noEndCap:k,customPlus:T,customMinus:E,markerFill:L,markerLine:M,pointMarker:D,pointMarkerSize:I,pointInvert:R,axisTitle:O,minorUnit:B,minorGridlines:F,numberFormat:V,tickPosition:_,axisColor:N,axisFontColor:W,axisFontSize:X,seriesFields:ie,axisFields:G}=Pw(e,t,r),K=o===void 0,j=o??oo(e,t);i.append(s.label,...K?[j.label]:[],...ie.map(({label:ne})=>ne),a.label,...G.map(({label:ne})=>ne));let Y,ue=()=>Math.max(0,s.control.selectedIndex),Te=()=>Math.max(0,a.control.selectedIndex),Me=()=>{let ne=Y?.series[ue()];if(!Y||!ne)return;let De=[...Y.series],Qe=ne.trendlines?.[0],Ze=ne.errBars?.[0],Je=j.selected(),zt=ne.dataPoints?.find(({idx:_e})=>_e===Je);De[ue()]={...ne,seriesChartType:l.control.value,axisId:chunkYOEVEUFZ_cjs._r(Y,p.control.checked),trendlines:Qe?[{...Qe,order:Se(v.control),period:Se(f.control),forward:Se(S.control),backward:Se(y.control),intercept:Se(h.control),color:C.control.value}]:[],errBars:Ze?[{...Ze,direction:w.control.value,barType:A.control.value,color:P.control.value,noEndCap:k.control.checked,customPlus:ds(T.control.value),customMinus:ds(E.control.value)}]:[],marker:{...ne.marker??{symbol:"auto"},spPr:{fillColor:L.control.value,strokeColor:M.control.value}},dataPoints:chunkYOEVEUFZ_cjs.na(ne.dataPoints,{...zt??{idx:Je},invertIfNegative:R.control.checked,marker:{...zt?.marker,symbol:D.control.value,size:Se(I.control)}})},n({...Y,series:De,style:{...Y.style,hasDataLabels:true,dataLabels:{...Y.style?.dataLabels,position:d.control.value,showValue:u.control.checked,showCategory:m.control.checked,showSeriesName:g.control.checked,showPercent:x.control.checked,showLeaderLines:b.control.checked}}});},Xo=()=>{let ne=Y?.axes?.[Te()];if(!Y||!ne)return;let De=[...Y.axes??[]];De[Te()]={...ne,titleText:O.control.value,minorUnit:Se(B.control),minorGridlines:F.control.checked,numFmt:{formatCode:V.control.value},tickLblPos:_.control.value,spPr:{...ne.spPr,strokeColor:N.control.value},fontColor:W.control.value,fontSize:Se(X.control)},n({...Y,axes:De});};for(let ne of ie)ne.control.addEventListener("change",Me);for(let ne of G)ne.control.addEventListener("change",Xo);s.control.addEventListener("change",()=>Y&&Tt(Y)),a.control.addEventListener("change",()=>Y&&Tt(Y)),j.subscribe(()=>Y&&Tt(Y));let Tt=ne=>{Y=ne,it(e,s.control,ne.series.map((Nt,Ci)=>[String(Ci),Nt.name])),it(e,a.control,(ne.axes??[]).map((Nt,Ci)=>[String(Ci),Nt.titleText??chunkYOEVEUFZ_cjs.Qb(chunkYOEVEUFZ_cjs.Wb,Nt.axisType,t)]));let De=ne.series[ue()],Qe=De?.trendlines?.[0],Ze=De?.errBars?.[0];l.control.value=De?.seriesChartType??ne.chartType,p.control.checked=chunkYOEVEUFZ_cjs.Zr(ne,ue());let Je=ne.style?.dataLabels;d.control.value=Je?.position??"bestFit",u.control.checked=Je?.showValue??false,m.control.checked=Je?.showCategory??false,g.control.checked=Je?.showSeriesName??false,x.control.checked=Je?.showPercent??false,b.control.checked=Je?.showLeaderLines??false,Ce(v.control,Qe?.order),Ce(f.control,Qe?.period),Ce(S.control,Qe?.forward),Ce(y.control,Qe?.backward),Ce(h.control,Qe?.intercept),C.control.value=Qe?.color??"#4472c4",w.control.value=Ze?.direction??"y",A.control.value=Ze?.barType??"both",P.control.value=Ze?.color??"#000000",k.control.checked=Ze?.noEndCap??false,T.control.value=Ze?.customPlus?.join(", ")??"",E.control.value=Ze?.customMinus?.join(", ")??"",L.control.value=De?.marker?.spPr?.fillColor??"#4472c4",M.control.value=De?.marker?.spPr?.strokeColor??"#000000";let zt=De?.dataPoints?.find(({idx:Nt})=>Nt===j.selected());D.control.value=zt?.marker?.symbol??"none",Ce(I.control,zt?.marker?.size),R.control.checked=zt?.invertIfNegative??false;let _e=ne.axes?.[Te()];O.control.value=_e?.titleText??"",Ce(B.control,_e?.minorUnit),F.control.checked=_e?.minorGridlines??false,V.control.value=_e?.numFmt?.formatCode??"",_.control.value=_e?.tickLblPos??"nextTo",N.control.value=_e?.spPr?.strokeColor??"#000000",W.control.value=_e?.fontColor??"#000000",Ce(X.control,_e?.fontSize);};return {el:i,update:Tt}}function kw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-filters",o.hidden=true;let r=e.createElement("h5");r.textContent=t("pptx.chart.chartFilters");let i=e.createElement("div");i.className="pptxv-chart-filters-visible";let s=e.createElement("div");s.className="pptxv-chart-filters-hidden";let a=e.createElement("div");a.className="pptxv-chart-filters-ranges",o.append(r,i,s,a);let l,p=true;function d(h){let C=l&&chunkYOEVEUFZ_cjs.hc(l,h);C&&n(C);}function u(h){let C=l&&chunkYOEVEUFZ_cjs.ic(l,h);C&&n(C);}function m(h,C,w){l&&n({...l,series:l.series.map((A,P)=>P===h?chunkYOEVEUFZ_cjs.jc(A,C,w):A)});}function g(h,C,w){let A=e.createElement("div");A.className=w?"pptxv-chart-filters-row is-filtered":"pptxv-chart-filters-row";let P=e.createElement("span");return P.className="pptxv-chart-filters-name",P.title=h,P.textContent=h,A.append(P,C),A}function x(h,C,w){let A=e.createElement("button");return A.type="button",A.dataset.testid=h,A.setAttribute("aria-label",C),A.title=C,A.textContent=C,A.disabled=!p,A.addEventListener("click",w),A}function b(h){i.replaceChildren(),!(h.series.length<=1)&&h.series.forEach((C,w)=>{let A=t("pptx.chart.hideSeries",{name:C.name}),P=x(`chart-series-hide-${w}`,A,()=>d(w));i.append(g(C.name,P,false));});}function v(h){s.replaceChildren(),(h.filteredSeries??[]).forEach((C,w)=>{let A=C.name??h.filteredSeriesTitle??t("pptx.chart.seriesShort"),P=t("pptx.chart.showSeries",{name:A}),k=x(`chart-series-show-${w}`,P,()=>u(w));s.append(g(A,k,true));});}function f(h){a.replaceChildren(),h.series.forEach((C,w)=>{let A=C.dataLabelOptions?.dataLabelsRange;if(!A)return;let P=e.createElement("div");P.className="pptxv-chart-filters-range";let k=e.createElement("div");k.className="pptxv-chart-filters-range-title",k.title=C.name,k.textContent=t("pptx.chart.valueFromCells",{name:C.name}),P.append(k),A.cache.forEach((T,E)=>{let L=e.createElement("label");L.className="pptxv-chart-filters-range-field";let M=e.createElement("span"),D=h.categories[E]??String(E);M.textContent=D;let I=e.createElement("input");I.type="text",I.value=T,I.disabled=!p,I.dataset.testid=`chart-dlbl-range-${w}-${E}`,I.setAttribute("aria-label",D),I.addEventListener("change",()=>m(w,E,I.value)),L.append(M,I),P.append(L);}),a.append(P);});}function S(h){l=h;let C=h.filteredSeries?.length??0,w=h.series.filter(A=>A.dataLabelOptions?.dataLabelsRange).length;if(o.hidden=C===0&&w===0&&h.series.length<=1,o.hidden){i.replaceChildren(),s.replaceChildren(),a.replaceChildren();return}b(h),v(h),f(h);}function y(){for(let h of o.querySelectorAll("button, input"))h.disabled=!p;}return {el:o,update:S,setEditable(h){p=h,y();}}}function Iw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-subtype";let r=Ve(e,t("pptx.chart.bar3DShapeLabel"),chunkYOEVEUFZ_cjs.hs,t);r.control.dataset.testid="pptx-chart-bar3d-shape";let i=Ve(e,t("pptx.chart.radarStyleLabel"),chunkYOEVEUFZ_cjs.is,t);i.control.dataset.testid="pptx-chart-radar-style";let s=Ve(e,t("pptx.chart.surfaceWireframeLabel"),chunkYOEVEUFZ_cjs.js,t);s.control.dataset.testid="pptx-chart-surface-wireframe",o.append(r.label,i.label,s.label);let a;return r.control.addEventListener("change",()=>{a&&n({...a,...chunkYOEVEUFZ_cjs.ks(a,r.control.value)});}),i.control.addEventListener("change",()=>{a&&n({...a,...chunkYOEVEUFZ_cjs.ls(a,i.control.value)});}),s.control.addEventListener("change",()=>{a&&n({...a,...chunkYOEVEUFZ_cjs.ms(a,s.control.value==="true")});}),{el:o,update:p=>{a=p,r.label.hidden=p.chartType!=="bar3D",i.label.hidden=p.chartType!=="radar",s.label.hidden=p.chartType!=="surface",r.control.value=p.barShape??"box",i.control.value=p.radarStyle??"standard",s.control.value=p.wireframe?"true":"false";}}}function at(e,t,n){let o=e.createElement("input");return o.type="number",o.step="0.01",o.min="0",o.max="1",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function Lw(e,t,n,o,r){let i=e.createElement("input");return i.type="number",i.step=o,i.value=String(t),i.setAttribute("aria-label",n),i.addEventListener("change",()=>r(Number(i.value))),i}function ms(e,t,n){let o=e.createElement("input");return o.type="number",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function us(e,t,n,o){let r=e.createElement("input");return r.type="text",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function xs(e,t,n,o){let r=me(e);return r.checked=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.checked)),r}function gs(e,t,n,o){let r=e.createElement("input");return r.type="color",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function Pe(e,t,...n){let o=e.createElement("span");return o.textContent=t,[o,...n]}function Mw(e,t,n,o,r,i,s,a){let l=e.createElement("div");l.className="pptxv-chart-usershape-anchor";let p=()=>Pe(e,t("pptx.chart.userShapeRotation"),Lw(e,n.rotation??0,t("pptx.chart.userShapeRotation"),"1",m=>s(n.path,m||void 0))),d=()=>[...Pe(e,t("pptx.arrange.flipHorizontally"),xs(e,n.flipH??false,t("pptx.arrange.flipHorizontally"),m=>a(n.path,{flipH:m}))),...Pe(e,t("pptx.arrange.flipVertically"),xs(e,n.flipV??false,t("pptx.arrange.flipVertically"),m=>a(n.path,{flipV:m})))];if(n.depth===0){let m=n.from;if(l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,m.x,g=>r(n.path,{from:{...m,x:g}})),at(e,m.y,g=>r(n.path,{from:{...m,y:g}})))),n.anchor==="rel"&&n.to){let g=n.to;l.append(...Pe(e,t("pptx.chart.userShapeTo"),at(e,g.x,x=>r(n.path,{to:{...g,x}})),at(e,g.y,x=>r(n.path,{to:{...g,y:x}}))));}if(n.anchor==="abs"&&n.ext){let g=n.ext;l.append(...Pe(e,t("pptx.chart.userShapeSize"),ms(e,g.cx,x=>r(n.path,{ext:{...g,cx:x}})),ms(e,g.cy,x=>r(n.path,{ext:{...g,cy:x}}))));}return l.append(...p(),...d()),l}let u=chunkYOEVEUFZ_cjs.xc(o?.userShapes,n.path);return u&&l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,u.from.x,m=>i(n.path,{from:{...u.from,x:m},to:u.to})),at(e,u.from.y,m=>i(n.path,{from:{...u.from,y:m},to:u.to}))),...Pe(e,t("pptx.chart.userShapeTo"),at(e,u.to.x,m=>i(n.path,{from:u.from,to:{...u.to,x:m}})),at(e,u.to.y,m=>i(n.path,{from:u.from,to:{...u.to,y:m}}))),...p(),...d()),l}function Dw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-usershapes";let r=e.createElement("h5");r.textContent=t("pptx.chart.userShapes");let i=e.createElement("button");i.type="button",i.dataset.testid="chart-user-shape-add",i.textContent=t("pptx.chart.userShapeAddTextBox");let s=e.createElement("div");s.className="pptxv-chart-usershapes-header",s.append(r,i);let a=e.createElement("p");a.className="pptxv-chart-usershapes-empty",a.textContent=t("pptx.chart.userShapesEmpty");let l=e.createElement("div");l.className="pptxv-chart-usershapes-list",o.append(s,a,l);let p;i.addEventListener("click",()=>{p&&n({userShapes:chunkYOEVEUFZ_cjs.qc(p.userShapes,chunkYOEVEUFZ_cjs.pc())});});function d(y,h){p&&n({userShapes:chunkYOEVEUFZ_cjs.sc(p.userShapes,y,h)});}function u(y,h){p&&n({userShapes:chunkYOEVEUFZ_cjs.uc(p.userShapes,y,h)});}function m(y){p&&n({userShapes:chunkYOEVEUFZ_cjs.tc(p.userShapes,y)});}function g(y,h){p&&n({userShapes:chunkYOEVEUFZ_cjs.yc(p.userShapes,y,h)});}function x(y,h){p&&n({userShapes:chunkYOEVEUFZ_cjs.vc(p.userShapes,y,h)});}function b(y,h){p&&n({userShapes:chunkYOEVEUFZ_cjs.wc(p.userShapes,y,h)});}function v(y){if(!p)return;let h=chunkYOEVEUFZ_cjs.zc(p.userShapes,y);h&&n({userShapes:chunkYOEVEUFZ_cjs.Bc(p.userShapes,y,chunkYOEVEUFZ_cjs.Ac(h))});}function f(y){let h=e.createElement("div");h.className="pptxv-chart-usershape-row",h.dataset.testid="chart-user-shape-row",h.dataset.chartUserShapePath=y.path.join(","),h.style.marginLeft=`${y.depth*12}px`;let C=e.createElement("span"),w=`pptx.chart.userShapeKind${y.kind.charAt(0).toUpperCase()}${y.kind.slice(1)}`;C.textContent=y.text?`${t(w)} - ${y.text}`:t(w);let A=e.createElement("button");A.type="button",A.dataset.testid="chart-user-shape-delete",A.setAttribute("aria-label",t("pptx.chart.userShapeDelete")),A.textContent="\u2715",A.addEventListener("click",()=>m(y.path));let P=e.createElement("div");if(P.className="pptxv-chart-usershape-top",P.append(C),y.isGroup){let k=e.createElement("button");k.type="button",k.dataset.testid="chart-user-shape-add-into-group",k.textContent=t("pptx.chart.userShapeAddIntoGroup"),k.addEventListener("click",()=>v(y.path)),P.append(k);}if(P.append(A),h.append(P),y.editableVisuals){let k=e.createElement("div");k.className="pptxv-chart-usershape-text",k.append(...Pe(e,t("pptx.chart.userShapeText"),us(e,y.text??"",t("pptx.chart.userShapeText"),E=>u(y.path,E)))),h.append(k);let T=e.createElement("div");T.className="pptxv-chart-usershape-colors",T.append(...Pe(e,t("pptx.chart.userShapeFill"),gs(e,y.fill??"#ffffff",t("pptx.chart.userShapeFill"),E=>d(y.path,{fill:E}))),...Pe(e,t("pptx.chart.userShapeStroke"),gs(e,y.stroke??"#000000",t("pptx.chart.userShapeStroke"),E=>d(y.path,{stroke:E})))),h.append(T);}if(y.editableAltText){let k=e.createElement("div");k.className="pptxv-chart-usershape-alt-text",k.append(...Pe(e,t("pptx.chart.userShapeAltText"),us(e,y.altText??"",t("pptx.chart.userShapeAltText"),T=>d(y.path,{altText:T})))),h.append(k);}return h.append(Mw(e,t,y,p,d,g,x,b)),h}function S(y){p=y,l.replaceChildren();let h=chunkYOEVEUFZ_cjs.rc(y.userShapes);a.hidden=h.length>0;for(let C of h)l.append(f(C));}return {el:o,update:S}}var CI=chunkYOEVEUFZ_cjs.Ib.map(e=>e.value),wI=["clustered","stacked","percentStacked"];function Ow(e,t,n,o){let r=n(t("pptx.chart.data")),i=Hw(e,"text",t("pptx.chart.title")),s=rt(e,t("pptx.chart.type"),CI,chunkYOEVEUFZ_cjs.Ub,t),a=rt(e,t("pptx.chart.grouping"),wI,chunkYOEVEUFZ_cjs.Vb,t),l=Tw(e,t,y=>o.setChartData(y),()=>o.getChartFollowDataPoint()),p=Rw(e,t("pptx.chart.showLegend")),d=Rw(e,t("pptx.chart.dataLabels")),u=oo(e,t),m=Ew(e,t,y=>o.setChartData(y),u,o.pushRecentColor),g=Aw(e,t,y=>o.setChartData(y),u,o.pushRecentColor),x=Iw(e,t,y=>o.setChartData(y)),b=kw(e,t,y=>o.setChartData(y)),v=Dw(e,t,y=>{f&&o.setChartData({...f,...y});});r.append(i.label,s.label,a.label,l.el,p.label,d.label,m.el,b.el,x.el,g.el,v.el);let f,S=()=>{if(!f)return;let y=s.control.value,h=y===f.chartType?f:chunkYOEVEUFZ_cjs.Pb(f,{chartType:y});o.setChartData({...h,...chunkYOEVEUFZ_cjs.ka(h,i.control.value),grouping:a.control.value,style:{...h.style,hasTitle:i.control.value.trim().length>0,hasLegend:p.control.checked,...d.control.checked!==(h.style?.hasDataLabels??false)?chunkYOEVEUFZ_cjs.lc(h.style,d.control.checked):{hasDataLabels:d.control.checked}}});};for(let y of [i.control,s.control,a.control,p.control,d.control])y.addEventListener("change",S);return {el:r,update(y){r.hidden=!y.isChart,f=y.chartData,f&&(i.control.value=f.title??"",s.control.value=chunkYOEVEUFZ_cjs.sa(f),a.control.value=f.grouping??"clustered",y.chartHighlightCell?.pointIndex!==void 0&&u.setSelected(y.chartHighlightCell.pointIndex),l.update(f,y.chartHighlightCell??null),p.control.checked=f.style?.hasLegend??false,d.control.checked=f.style?.hasDataLabels??false,m.update(f),b.update(f),x.update(f),g.update(f),v.update(f));},setEditable(y){b.setEditable(y);}}}function Hw(e,t,n){let o=e.createElement("label");o.textContent=n;let r=t==="checkbox"?me(e):e.createElement("input");return t!=="checkbox"&&(r.type=t),o.appendChild(r),{label:o,control:r}}function Rw(e,t){return Hw(e,"checkbox",t)}function Hr(e,t){let n=new Set(e.map(r=>r.id)),o=t.filter(r=>!n.has(r.id)).map(r=>({id:r.id,name:r.name,userId:"",providerId:""}));return [...e,...o]}function no(e){let{doc:t,t:n,field:o}=e,r=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-comment-mention-suggestions");r.dataset.testid="pptx-comment-mention-suggestions",r.hidden=true,r.setAttribute("role","listbox"),r.setAttribute("aria-label",n("pptx.comments.mentionSuggestions")),r.title=n("pptx.comments.mentionPlaceholder");let i=[],s=0,a=()=>{r.hidden=true,r.replaceChildren(),i=[];},l=x=>{let b=o.selectionStart??o.value.length,v=chunkYOEVEUFZ_cjs.nn(o.value,e.getMentions(),b,x);o.value=v.text,o.setSelectionRange(v.caret,v.caret),e.onChange({text:v.text,mentions:v.mentions}),a(),o.focus();},p=()=>{r.replaceChildren(),i.forEach((x,b)=>{let v=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-comment-mention-option");v.type="button",v.dataset.testid="pptx-comment-mention-option",v.setAttribute("role","option"),v.setAttribute("aria-selected",String(b===s)),v.classList.toggle("is-active",b===s),v.textContent=x.name,v.addEventListener("mousedown",f=>{f.preventDefault(),l(x);}),r.appendChild(v);}),r.hidden=i.length===0;},d=()=>{let x=o.selectionStart??o.value.length,b=chunkYOEVEUFZ_cjs.ln(o.value,x);if(!b){a();return}i=chunkYOEVEUFZ_cjs.mn([...e.getAuthors()],b.query),s=0,p();},u=()=>d(),m=x=>{if(!(r.hidden||i.length===0))if(x.key==="ArrowDown")x.preventDefault(),s=(s+1)%i.length,p();else if(x.key==="ArrowUp")x.preventDefault(),s=(s-1+i.length)%i.length,p();else if(x.key==="Enter"||x.key==="Tab"){let b=i[s];b&&(x.preventDefault(),l(b));}else x.key==="Escape"&&(x.preventDefault(),a());},g=()=>a();return o.addEventListener("input",u),o.addEventListener("keydown",m),o.addEventListener("blur",g),{el:r,destroy(){o.removeEventListener("input",u),o.removeEventListener("keydown",m),o.removeEventListener("blur",g);}}}function Fw(e,t,n){e.textContent="";let o=e.ownerDocument,r=chunkYOEVEUFZ_cjs.kn(t,n);if(r.length===0)return e.textContent=t,e;for(let i of r){if(i.kind!=="mention"){e.appendChild(o.createTextNode(i.text));continue}let s=o.createElement("span");s.className=chunkYOEVEUFZ_cjs.jn,s.setAttribute(chunkYOEVEUFZ_cjs.in,i.personId||""),i.authorName&&(s.title=i.authorName),s.textContent=i.text,e.appendChild(s);}return e}function Fr(e,t,n,o=()=>[]){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-list"),i=null,s="",a=null,l="",p=[],d=new Set,u=[],m=false,g=()=>{r.replaceChildren(...u.map(C=>h(C,m,0)));},x=(C,w)=>{let A=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-comment-action");return A.type="button",A.textContent=C,A.addEventListener("click",w),A},b=(C,w,A)=>{let P=e.createElement("textarea");return P.className="pptxv-inspector-comment-input",P.rows=2,P.value=C,P.placeholder=w,P.addEventListener("input",()=>A(P.value)),P},v=C=>{let w=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-edit"),A=b(s,"",k=>{s=k;});A.setAttribute("aria-label",t("pptx.comments.edit"));let P=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-actions");return P.append(x(t("pptx.comments.save"),()=>{s.trim()&&n.editComment(C.id,s.trim()),i=null,g();}),x(t("pptx.comments.cancel"),()=>{i=null,g();})),w.append(A,P),w},f=C=>{let w=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-reply-form"),A=b(l,t("pptx.comments.replyPlaceholder",{author:C.author||t("pptx.comments.unknownAuthor")}),T=>{l=T;});A.setAttribute("aria-label",t("pptx.comments.reply"));let P=no({doc:e,t,field:A,getAuthors:o,getMentions:()=>p,onChange:T=>{l=T.text,p=T.mentions;}}),k=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-actions");return k.append(x(t("pptx.comments.addReply"),()=>{l.trim()&&n.addCommentReply(C.id,l.trim(),p),P.destroy(),a=null,l="",p=[],g();}),x(t("pptx.comments.cancel"),()=>{P.destroy(),a=null,g();})),w.append(A,P.el,k),w},S=(C,w)=>{let A=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-actions");return A.appendChild(x(t("pptx.comments.edit"),()=>{i=C.id,s=C.text,g();})),w===0&&A.appendChild(x(t("pptx.comments.reply"),()=>{a=C.id,l="",p=[],g();})),A.append(x(t(C.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(C.id)),x(t("pptx.comments.delete"),()=>n.deleteComment(C.id))),A},y=(C,w,A)=>{let P=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-replies-wrap"),k=C.replies??[],T=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-comment-replies-toggle");if(T.type="button",T.textContent=t("pptx.comments.repliesCount",{count:k.length}),T.setAttribute("aria-expanded",String(!d.has(C.id))),T.addEventListener("click",()=>{d.has(C.id)?d.delete(C.id):d.add(C.id),g();}),P.appendChild(T),!d.has(C.id)){let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-replies");E.append(...k.map(L=>h(L,w,A+1))),P.appendChild(E);}return P};function h(C,w,A){let P=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment");P.classList.toggle("is-resolved",C.resolved===true),P.classList.toggle("is-reply",A>0);let k=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-meta");if(k.textContent=C.author||t("pptx.comments.unknownAuthor"),C.resolved){let T=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-comment-badge");T.textContent=t("pptx.comments.resolved"),k.appendChild(T);}if(P.appendChild(k),i===C.id)P.appendChild(v(C));else {let T=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-inspector-comment-text");Fw(T,C.text,C.mentions),P.appendChild(T),w&&P.appendChild(S(C,A));}return (C.replies??[]).length>0&&P.appendChild(y(C,w,A)),a===C.id&&P.appendChild(f(C)),P}return {el:r,update(C,w){u=C,m=w,g();}}}function Vw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comments"),r=[],i=Fr(e,t,n,()=>r);o.appendChild(i.el);let s=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-inspector-empty");s.textContent=t("pptx.comments.noComments"),o.appendChild(s);let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-comment-add"),l=e.createElement("textarea");l.className="pptxv-inspector-comment-input",l.rows=2,l.placeholder=t("pptx.comments.addCommentPlaceholder"),l.setAttribute("aria-label",t("pptx.comments.addComment"));let p=[],d=no({doc:e,t,field:l,getAuthors:()=>r,getMentions:()=>p,onChange:m=>{l.value=m.text,p=m.mentions;}}),u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-deck-btn");return u.type="button",u.textContent=t("pptx.comments.addComment"),u.addEventListener("click",()=>{let m=l.value.trim();m&&(n.addComment(m,p),l.value="",p=[]);}),a.append(l,d.el,u),o.appendChild(a),{el:o,update(m){r=m.commentMentionAuthors,s.hidden=m.comments.length>0,a.hidden=!m.editable,i.update(m.comments,m.editable);}}}function be(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-section"),o=chunkQPYQDJ2Q_cjs.w(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=chunkQPYQDJ2Q_cjs.w(e,"div");return n.appendChild(r),{el:n,body:r}}function ht(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-row"),o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function $e(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function Bw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.presentation")),i,s=he(e,{label:t("pptx.presentationSettings.showType"),webComponent:true,options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:g=>n.updatePresentationSettings({showType:g})}),a=oe(e,{label:t("pptx.presentationSettings.loopContinuously"),webComponent:true,onChange:g=>n.updatePresentationSettings({loopContinuously:g})}),l=oe(e,{label:t("pptx.presentationSettings.showNarration"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithNarration:g})}),p=oe(e,{label:t("pptx.presentationSettings.showAnimation"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithAnimation:g})}),d=oe(e,{label:t("pptx.presentationSettings.frameSlides"),webComponent:true,onChange:g=>n.updatePresentationSettings({printProperties:chunkYOEVEUFZ_cjs.qk(i,g)})}),u=e.createElement("input");u.type="number",u.min="1",u.max="16",u.className="pptxv-field-input",u.setAttribute("aria-label",t("pptx.presentationSettings.slidesPerPage")),u.addEventListener("change",()=>{let g=Number.parseInt(u.value,10);Number.isFinite(g)&&n.updatePresentationSettings({printProperties:chunkYOEVEUFZ_cjs.rk(i,g)});});let m=ht(e,t("pptx.presentationSettings.slidesPerPage"));return m.value.appendChild(u),r.append(s.el,a.el,l.el,p.el,d.el,m.el),{el:o,update(g){let x=g.presentationProperties;i=x.printProperties,s.setValue(x.showType??"presented"),a.setValue(!!x.loopContinuously),l.setValue(x.showWithNarration!==false),p.setValue(x.showWithAnimation!==false),d.setValue(chunkYOEVEUFZ_cjs.pk(x.printProperties)),e.activeElement!==u&&(u.value=String(chunkYOEVEUFZ_cjs.ok(x.printProperties)));for(let b of [s,a,l,p,d])b.setDisabled(!g.editable);u.disabled=!g.editable;}}}function zw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slide-size-rescale");o.hidden=true,o.setAttribute("role","group"),o.setAttribute("aria-label",t("pptx.slideSize.rescaleTitle"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slide-size-rescale-title");r.textContent=t("pptx.slideSize.rescaleTitle");let i=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-slide-size-rescale-description");i.textContent=t("pptx.slideSize.rescaleDescription");let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slide-size-rescale-buttons");function a(l,p,d,u){let m=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-slide-size-rescale-btn");return m.type="button",m.dataset.testid=l,m.title=t(d),m.textContent=t(p),m.addEventListener("click",()=>n(u)),m}return s.append(a("pptx-slide-size-rescale-maximize","pptx.slideSize.rescaleMaximize","pptx.slideSize.rescaleMaximizeHint","maximize"),a("pptx-slide-size-rescale-ensure-fit","pptx.slideSize.rescaleEnsureFit","pptx.slideSize.rescaleEnsureFitHint","ensureFit")),o.append(r,i,s),{el:o,show(){o.hidden=false;},hide(){o.hidden=true;}}}var Nw="__custom__";function EI(e,t){return e.widthEmu!==t.widthEmu||e.heightEmu!==t.heightEmu}var TI=[["landscape","pptx.slideSize.landscape"],["portrait","pptx.slideSize.portrait"]];function _w(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideSize.title")),i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.slideSize.presets");let a=Q(e);a.className="pptxv-field-select-input",a.dataset.pptxSlideSizePreset="true",a.setAttribute("aria-label",t("pptx.slideSize.presets"));let l=e.createElement("option");l.value=Nw,l.textContent=t("pptx.slideSize.customSize"),l.hidden=true,a.appendChild(l);for(let h of chunkYOEVEUFZ_cjs.hj){let C=e.createElement("option");C.value=h.labelKey,C.textContent=t(`pptx.slideSize.preset.${h.labelKey}`),a.appendChild(C);}i.append(s,a),r.appendChild(i);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slide-size-orientation");p.setAttribute("role","group"),p.setAttribute("aria-label",t("pptx.slideSize.orientation"));let d=TI.map(([h,C])=>{let w=chunkQPYQDJ2Q_cjs.w(e,"button");return w.type="button",w.dataset.pptxSlideSizeOrientation=h,w.textContent=t(C),p.appendChild(w),{value:h,button:w}});r.appendChild(p);let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(u);let m={width:0,height:0},g=re(e,{label:"W",min:1,onCommit:h=>n.updateCanvasSize({width:h,height:m.height})}),x=re(e,{label:"H",min:1,onCommit:h=>n.updateCanvasSize({width:m.width,height:h})});u.append(g.el,x.el);let b,v=zw(e,t,h=>{b&&n.applySlideSizeRescale(b,h),b=void 0,v.hide();});r.appendChild(v.el);let f=chunkYOEVEUFZ_cjs.lj({current:void 0,canvas:{width:1,height:1}}),S=false;function y(h){if(!S||!EI(h,f.size)){n.updateSlideSize(h);return}b=h,v.show();}return a.addEventListener("change",()=>{let h=chunkYOEVEUFZ_cjs.hj.find(C=>C.labelKey===a.value);h&&y(chunkYOEVEUFZ_cjs.jj(h,f.orientation));}),d.forEach(({value:h,button:C})=>{C.addEventListener("click",()=>y(chunkYOEVEUFZ_cjs.ij(f.size,h)));}),{el:o,update(h){m=h.canvasSize,f=chunkYOEVEUFZ_cjs.lj({current:h.slideSize,canvas:h.canvasSize}),S=h.hasDeckElements,l.hidden=f.preset!==void 0,a.value=f.preset?.labelKey??Nw,a.disabled=!h.editable;for(let{value:C,button:w}of d){let A=f.orientation===C;w.classList.toggle("is-active",A),w.setAttribute("aria-pressed",String(A)),w.disabled=!h.editable;}g.setValue(h.canvasSize.width),x.setValue(h.canvasSize.height),g.setDisabled(!h.editable),x.setDisabled(!h.editable),b&&!h.editable&&(b=void 0,v.hide());}}}var bs={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 Gw(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.themeHeading")),i=Q(e);i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),a=$e(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),l=$e(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));s.append(a,l),r.appendChild(s);let p="";return {el:o,update(d){let u=d.themeOptions.map(g=>g.path).join(`
2
+ `);if(u!==p){p=u;let g=i.value;if(i.replaceChildren(),d.themeOptions.length===0){let x=e.createElement("option");x.value="",x.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(x);}else {for(let x of d.themeOptions){let b=e.createElement("option");b.value=x.path,b.textContent=x.name||x.path.split("/").pop()||x.path,i.appendChild(b);}d.themeOptions.some(x=>x.path===g)&&(i.value=g);}}i.disabled=d.themeOptions.length===0;let m=!d.editable||!i.value;a.disabled=m,l.disabled=m;}}}function Uw(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeOverride.heading")),i,s=m=>{let g=i?.activeSlide;if(!g)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:m});return}let x=chunkYOEVEUFZ_cjs.S(g,i.colorScheme,m);n.updateActiveSlide({clrMapOverride:x.clrMapOverride,backgroundColor:x.backgroundColor,elements:x.elements});},a=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),l=me(e);l.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),l.addEventListener("change",()=>{l.checked?s({...chunkYOEVEUFZ_cjs.K}):s(void 0);});let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.themeOverride.enableOverride"),a.append(l,p),r.appendChild(a);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-override-rows");r.appendChild(d);let u=(m,g,x)=>{let b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-override-row"),v=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");v.textContent=bs[m],v.title=bs[m];let f=g[m]??chunkYOEVEUFZ_cjs.K[m],S=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-override-swatch"),y=i?.colorScheme?.[f];typeof y=="string"&&y&&(S.style.backgroundColor=`#${y.replace(/^#/u,"")}`);let h=Q(e);h.className="pptxv-field-select-input",h.setAttribute("aria-label",bs[m]);for(let C of chunkYOEVEUFZ_cjs.g){let w=e.createElement("option");w.value=C,w.textContent=chunkYOEVEUFZ_cjs.Qb(chunkYOEVEUFZ_cjs.Rb,C,t),h.appendChild(w);}return h.value=f,h.disabled=!x,h.addEventListener("change",()=>{let C={...g,[m]:h.value};for(let w of chunkYOEVEUFZ_cjs.J)C[w]||(C[w]=chunkYOEVEUFZ_cjs.K[w]);s(C);}),b.append(v,S,h),b};return {el:o,update(m){i=m,o.hidden=!m.activeSlide;let g=m.activeSlide?.clrMapOverride;if(l.checked=g!==void 0,l.disabled=!m.editable,d.replaceChildren(),g)for(let x of chunkYOEVEUFZ_cjs.J)d.appendChild(u(x,g,m.editable));}}}function Kw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideBackground.templateBackgroundsHeading"));function i(s,a){let l=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-inspector-row"),p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=a,p.title=s.title;let d=e.createElement("input");d.type="color",d.value=chunkYOEVEUFZ_cjs.ha(n.getTemplateBackgroundColor(s.path),"#ffffff"),d.addEventListener("change",()=>{n.setTemplateBackground(s.path,d.value),n.pushRecentColor(d.value);});let u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-value");return u.textContent=s.label,l.append(p,d,u),l}return {el:o,update(s){let a=s.editTemplateMode&&s.activeSlide?chunkYOEVEUFZ_cjs.io(s.activeSlide,s.slideMasters,t("pptx.master.layout"),t("pptx.master.master")):{};o.hidden=!a.layout&&!a.master,r.replaceChildren(),a.layout&&r.appendChild(i(a.layout,t("pptx.master.layout"))),a.master&&r.appendChild(i(a.master,t("pptx.master.master")));}}}function Ww(e,t){chunkEHQE3K3X_cjs.a(e);let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-preview"),o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-transition-preview-label");o.textContent=t("pptx.transition.preview");let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-transition-preview-stage");r.type="button",r.title=t("pptx.transition.preview"),r.setAttribute("aria-label",t("pptx.transition.preview"));let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-transition-preview-layer is-incoming");i.textContent="B";let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-transition-preview-layer is-outgoing");s.textContent="A",r.append(i,s),n.append(o,r);let a,l,p=()=>{i.style.animation="",s.style.animation="";},d=()=>{if(!a)return;let u=a.durationMs??500,m=chunkYOEVEUFZ_cjs.fi(a.type,u,a.direction,a.orient,a.spokes,a.pattern);s.style.zIndex=m.outgoingOnTop?"2":"0",p(),r.offsetWidth,i.style.animation=m.incoming!=="none"?m.incoming:"",s.style.animation=m.outgoing!=="none"?m.outgoing:`pptx-tr-fade-out ${u}ms ease-in-out forwards`,clearTimeout(l),l=setTimeout(p,u+100);};return r.addEventListener("click",d),{el:n,update(u){a=u;let m=!!u&&u?.type!=="none"&&u?.type!=="cut";n.hidden=!m,m||(clearTimeout(l),p());}}}function $w(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.slideTransition")),i,s=false,a=E=>{let L={...i,...E};i=L,n.updateActiveSlide({transition:L});},l=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.transition.type");let d=Q(e);d.className="pptxv-field-select-input",d.setAttribute("aria-label",t("pptx.transition.type"));for(let E of chunkYOEVEUFZ_cjs.ii){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),d.appendChild(L);}d.addEventListener("change",()=>a({type:d.value})),l.append(p,d);let u=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");m.textContent=t("pptx.transition.speed");let g=Q(e);g.className="pptxv-field-select-input",g.setAttribute("aria-label",t("pptx.transition.speed"));for(let E of chunkYOEVEUFZ_cjs.ji){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),g.appendChild(L);}g.addEventListener("change",()=>a({speed:g.value})),u.append(m,g);let x=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),b=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");b.textContent=t("pptx.transition.morphOption");let v=Q(e);v.className="pptxv-field-select-input",v.setAttribute("aria-label",t("pptx.transition.morphOption"));for(let E of chunkYOEVEUFZ_cjs.ki){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),v.appendChild(L);}v.addEventListener("change",()=>a({morphOption:v.value})),x.append(b,v);let f=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-directions"),S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-directions"),y=oe(e,{label:t("pptx.transition.thruBlk"),onChange:E=>a({thruBlk:E})}),h=re(e,{label:t("pptx.transition.duration"),min:0,max:1e4,step:10,onCommit:E=>a({durationMs:Math.max(0,Math.min(1e4,Math.round(E)))})}),C=re(e,{label:t("pptx.transition.spokes"),min:1,max:8,onCommit:E=>a({spokes:Math.max(1,Math.min(8,Math.round(E)))})}),w=oe(e,{label:t("pptx.transition.advanceOnClick"),onChange:E=>a({advanceOnClick:E})}),A=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-transition-sound"),P=Ww(e,t);r.append(l,f,S,y.el,C.el,h.el,u,x,w.el,A,P.el);let k=E=>{f.textContent="";let L=chunkYOEVEUFZ_cjs.a[E];if(!L||L.length===0){f.hidden=true;return}f.hidden=false;let M=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label"),D=chunkYOEVEUFZ_cjs.li.has(E);M.textContent=t(D?"pptx.transition.orientation":"pptx.transition.direction"),f.appendChild(M);let I=(F,V)=>{let _=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-transition-dir");_.type="button",_.textContent=V;let N=t(`pptx.transition.dir.${F}`);return _.title=N,_.setAttribute("aria-label",N),_.classList.toggle("is-active",(i?.direction??i?.orient)===F),_.disabled=!s,_.addEventListener("click",()=>a(D?{orient:F}:{direction:F})),_};if(D){let F=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-dir-row");for(let V of ["horz","vert"])F.appendChild(I(V,chunkYOEVEUFZ_cjs.mi[V]??V));f.appendChild(F);return}let R=chunkYOEVEUFZ_cjs.ni(L);if(R.some(F=>F.some(Boolean))){let F=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-dir-grid");for(let V of R)for(let _ of V)_===null?F.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-transition-dir-gap")):F.appendChild(I(_,chunkYOEVEUFZ_cjs.mi[_]??_));f.appendChild(F);return}let B=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-dir-row");for(let F of L)B.appendChild(I(F,chunkYOEVEUFZ_cjs.mi[F]??F));f.appendChild(B);},T=E=>{S.textContent="";let L=chunkYOEVEUFZ_cjs.b[E];if(!L||L.length===0){S.hidden=true;return}S.hidden=false;let M=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");M.textContent=t("pptx.transition.pattern"),S.appendChild(M);let D=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-dir-row");for(let I of L){let R=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-transition-pattern-btn");R.type="button",R.textContent=t(`pptx.transition.pattern.${I}`),R.classList.toggle("is-active",(i?.pattern??L[0])===I),R.disabled=!s,R.addEventListener("click",()=>a({pattern:I})),D.appendChild(R);}S.appendChild(D);};return {el:o,update(E){s=E.editable,i=E.activeSlide?.transition,o.hidden=!E.activeSlide;let L=i?.type??"none";d.value=L,d.disabled=!E.editable,k(L),T(L),y.el.hidden=!chunkYOEVEUFZ_cjs.c.has(L),y.setValue(i?.thruBlk===true),y.setDisabled(!E.editable),C.el.hidden=L!=="wheel",C.setValue(i?.spokes??4),C.setDisabled(!E.editable),h.setValue(Math.round(i?.durationMs??320)),h.setDisabled(!E.editable),g.value=i?.speed??"fast",g.disabled=!E.editable,x.hidden=L!=="morph",v.value=i?.morphOption??"byObject",v.disabled=!E.editable,w.setValue(i?.advanceOnClick!==false),w.setDisabled(!E.editable),A.hidden=!i?.soundFileName,A.textContent=i?.soundFileName?`${t("pptx.transition.sound")}: ${i.soundFileName}`:"",P.update(i);}}}function qw(e,t,n){let{el:o,body:r}=be(e,t("pptx.tags.title")),i=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tags-toggle");i.type="button";let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tags-toggle-label"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tags-count");i.append(s,a);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tags-list"),p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-tags-empty");p.textContent=t("pptx.tags.noTags");let d=$e(e,t("pptx.tags.addTag"),()=>n.updateTagCollections(chunkYOEVEUFZ_cjs.Am(u)));r.append(i,l,p,d);let u=[],m=true,g=false,x=(f,S,y)=>{let h=e.createElement("input");return h.type="text",h.className="pptxv-tags-input",h.value=f,h.placeholder=S,h.setAttribute("aria-label",S),h.disabled=!g,h.addEventListener("change",()=>y(h.value)),h.addEventListener("keydown",C=>C.stopPropagation()),h},b=f=>{let S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tags-row");if(S.append(x(f.name,t("pptx.tags.name"),y=>n.updateTagCollections(chunkYOEVEUFZ_cjs.ym(u,f.colIdx,f.tagIdx,"name",y))),x(f.value,t("pptx.tags.value"),y=>n.updateTagCollections(chunkYOEVEUFZ_cjs.ym(u,f.colIdx,f.tagIdx,"value",y)))),g){let y=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tags-remove");y.type="button",y.textContent="\xD7",y.title=t("pptx.tags.deleteTag"),y.setAttribute("aria-label",t("pptx.tags.deleteTag")),y.addEventListener("click",()=>n.updateTagCollections(chunkYOEVEUFZ_cjs.zm(u,f.colIdx,f.tagIdx))),S.appendChild(y);}return S},v=()=>{let f=chunkYOEVEUFZ_cjs.xm(u);a.textContent=String(f.length),s.textContent=`${m?"\u25B8":"\u25BE"} ${t("pptx.tags.title")}`,i.setAttribute("aria-expanded",String(!m)),l.hidden=m||f.length===0,p.hidden=m||f.length>0,d.hidden=m||!g,d.disabled=!g,!m&&(l.textContent="",l.append(...f.map(b)));};return i.addEventListener("click",()=>{m=!m,v();}),{el:o,update(f){u=f.tagCollections,g=f.editable,v();}}}var jw={dk1:"pptx.themeEditor.colorDark1",lt1:"pptx.themeEditor.colorLight1",dk2:"pptx.themeEditor.colorDark2",lt2:"pptx.themeEditor.colorLight2",accent1:"pptx.themeEditor.colorAccent1",accent2:"pptx.themeEditor.colorAccent2",accent3:"pptx.themeEditor.colorAccent3",accent4:"pptx.themeEditor.colorAccent4",accent5:"pptx.themeEditor.colorAccent5",accent6:"pptx.themeEditor.colorAccent6",hlink:"pptx.themeEditor.colorHyperlink",folHlink:"pptx.themeEditor.colorFollowedLink"};function ro(e,t="#000000"){let n=typeof e=="string"?e.startsWith("#")?e:`#${e}`:"";return /^#[0-9a-fA-F]{6}$/u.test(n)?n:t}function Yw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-slots"),r=new Map;for(let i of chunkYOEVEUFZ_cjs.g){let s=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-theme-slot"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-slot-label");a.textContent=t(jw[i]);let l=e.createElement("input");l.type="color",l.className="pptxv-theme-slot-input",l.setAttribute("aria-label",t(jw[i])),l.addEventListener("change",()=>n(i,l.value)),s.append(a,l),o.appendChild(s),r.set(i,l);}return {el:o,update(i,s){for(let[a,l]of r)l.value=ro(i[a]),l.disabled=!s;}}}function Xw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-presets"),r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");r.textContent=t("pptx.themeEditor.presetThemes");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-preset-grid");o.append(r,i);let s=[];for(let a of chunkYOEVEUFZ_cjs.ao){let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-theme-preset");l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name);let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-preset-swatches");for(let u of ["accent1","accent2","accent3","accent4"]){let m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-preset-dot");m.style.background=ro(a.colorScheme[u],"#888888"),p.appendChild(m);}let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-preset-name");d.textContent=a.name,l.append(p,d),l.addEventListener("click",()=>n(a)),i.appendChild(l),s.push({node:l,preset:a});}return {el:o,update(a,l){for(let{node:p,preset:d}of s)p.classList.toggle("is-active",d.name===a),p.disabled=!l;}}}function fs(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-field-select"),r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");r.textContent=t;let i=Q(e);i.className="pptxv-field-select-input",i.setAttribute("aria-label",t);for(let s of chunkYOEVEUFZ_cjs.co){let a=e.createElement("option");a.value=s,a.textContent=s,i.appendChild(a);}return i.addEventListener("change",()=>n(i.value)),o.append(r,i),{el:o,select:i}}function vs(e,t){if(!Array.from(e.options).some(n=>n.value===t)){let n=e.ownerDocument.createElement("option");n.value=t,n.textContent=t,e.appendChild(n);}e.value=t;}var hs="Calibri Light",ys="Calibri";function Vr(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeEditor.title")),i={colorScheme:void 0,major:hs,minor:ys,name:"Custom Theme"},s={...chunkYOEVEUFZ_cjs.bo},a=hs,l=ys,p=false,d=false,u=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-theme-name"),m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");m.textContent=t("pptx.themeEditor.themeName");let g=e.createElement("input");g.type="text",g.className="pptxv-field-input",g.placeholder=t("pptx.themeEditor.themeNamePlaceholder"),g.setAttribute("aria-label",t("pptx.themeEditor.themeName")),g.addEventListener("keydown",T=>T.stopPropagation()),g.addEventListener("input",()=>{d=true;}),u.append(m,g);let x=Xw(e,t,T=>{s={...T.colorScheme},a=T.majorFont,l=T.minorFont,g.value=T.name,d=true,P();}),b=Yw(e,t,(T,E)=>{s={...s,[T]:E},d=true,P();}),v=fs(e,t("pptx.themeEditor.headingFont"),T=>{a=T,d=true,P();}),f=fs(e,t("pptx.themeEditor.bodyFont"),T=>{l=T,d=true,P();}),S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-preview"),y=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-preview-heading");y.textContent=t("pptx.themeEditor.headingSample");let h=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-preview-body");h.textContent=t("pptx.themeEditor.bodySample"),S.append(y,h);let C=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),w=$e(e,t("pptx.themeEditor.applyToPresentation"),()=>{let T={majorFont:{latin:a},minorFont:{latin:l}};n.applyThemeEdit({colorScheme:s,fontScheme:T,name:g.value}),d=false;}),A=$e(e,t("pptx.themeEditor.reset"),()=>{k(),d=false,P();});C.append(w,A),r.append(u,x.el,b.el,v.el,f.el,S,C);function P(){b.update(s,p),x.update(g.value,p),vs(v.select,a),vs(f.select,l),v.select.disabled=!p,f.select.disabled=!p,g.disabled=!p,w.disabled=!p,A.disabled=!p,S.style.background=ro(s.lt1,"#ffffff"),y.style.color=ro(s.dk2,"#000000"),y.style.fontFamily=a,h.style.color=ro(s.dk1,"#000000"),h.style.fontFamily=l;}function k(){s={...chunkYOEVEUFZ_cjs.bo,...i.colorScheme??{}},a=i.major,l=i.minor,g.value=i.name;}return {el:o,update(T){p=T.editable,i={colorScheme:T.colorScheme,major:T.fontScheme?.majorFont?.latin??hs,minor:T.fontScheme?.minorFont?.latin??ys,name:T.themeName??"Custom Theme"},d||k(),P();}}}function PI(e,t){let{el:n,body:o}=be(e,t("pptx.documentProperties.notesHandoutHeading")),r=ht(e,t("pptx.documentProperties.notesSize")),i=ht(e,t("pptx.master.notesMasterTitle")),s=ht(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,s.el);let a=t("pptx.digitalSignatures.notAvailable"),l=p=>p===void 0?a:`${p} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(p){r.value.textContent=p.notesCanvasSize?`${p.notesCanvasSize.width} \xD7 ${p.notesCanvasSize.height}px`:a,i.value.textContent=l(p.notesPlaceholderCount),s.value.textContent=l(p.handoutPlaceholderCount);}}}function AI(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.documentHeading")),i=ht(e,t("pptx.properties.titleLabel")),s=ht(e,t("pptx.properties.author")),a=$e(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,s.el,a),{el:o,update(l){i.value.textContent=l.docTitle||"-",s.value.textContent=l.docAuthor||"-";}}}function Qw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-deck"),r=[Bw(e,t,n),Gw(e,t,n),Vr(e,t,n),Uw(e,t,n),Kw(e,t,n),$w(e,t,n),_w(e,t,n),PI(e,t),AI(e,t,n),qw(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let s of r)s.update(i);},setVisible(i){o.hidden=!i;}}}function kI(e){return chunkYOEVEUFZ_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function Zw(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-elements"),r=chunkQPYQDJ2Q_cjs.w(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-inspector-empty");return s.textContent=t("pptx.selectionPane.empty"),o.appendChild(s),{el:o,update(a){i.replaceChildren(),s.hidden=a.elements.length>0,[...a.elements].reverse().forEach((l,p)=>{let d=a.elements.length-p-1,u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-layer-row");u.type="button",u.title=`${l.type}: ${l.id}`,u.classList.toggle("is-selected",a.selectedIds.includes(l.id));let m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-layer-num");m.textContent=String(d+1);let g=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-layer-label");g.textContent=kI(l),u.append(m,g),u.addEventListener("click",()=>n(l.id)),i.appendChild(u);});}}}function Rt(e,t,n){let o=t("pptx.colorPicker.recentColors"),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-recent-colors");r.dataset.testid="pptx-color-recent",r.setAttribute("aria-label",o),r.hidden=true;let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-recent-colors-label");i.textContent=o,r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-swatch-grid pptxv-recent-colors-grid");r.appendChild(s);let a=false,l,p=new Map,d=()=>{for(let[u,m]of p)u.classList.toggle("is-selected",m===l);};return {el:r,setColors(u){s.replaceChildren(),p.clear();for(let m of u??[]){let g=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-swatch");g.type="button",g.setAttribute("data-pptx-compact",""),g.style.backgroundColor=m,g.title=m,g.setAttribute("aria-label",`Recent ${m}`),g.disabled=a,g.addEventListener("click",()=>n(m)),s.appendChild(g),p.set(g,m);}r.hidden=u.length===0,d();},setDisabled(u){a=u;for(let m of p.keys())m.disabled=u;},setSelected(u){l=u,d();}}}function Ie(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-swatch-grid");o.hidden=true;let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-swatch-grid-label");r.textContent=t("pptx.colorPicker.themeColors"),o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-swatch-grid-rows");o.appendChild(i);let s=false,a,l,p=chunkYOEVEUFZ_cjs.xo(void 0),d=[],u=()=>{i.replaceChildren(),d.length=0;let m=chunkYOEVEUFZ_cjs.Ao(p),g=chunkYOEVEUFZ_cjs.yo(p,a,l);for(let x of m){let b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-swatch-grid-row");for(let v of x){if(!v){b.appendChild(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-swatch-grid-empty"));continue}let f=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-theme-swatch-grid-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v.hex,f.title=v.label,f.setAttribute("aria-label",v.label),f.disabled=s,f.classList.toggle("is-selected",v===g),f.addEventListener("click",()=>n(chunkYOEVEUFZ_cjs.zo(v))),b.appendChild(f),d.push(f);}i.appendChild(b);}o.hidden=p.length===0;};return {el:o,setThemeColorMap(m){p=chunkYOEVEUFZ_cjs.xo(m),u();},setSelected(m,g){a=m,l=g,u();},setDisabled(m){s=m;for(let g of d)g.disabled=m;}}}function Jw(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-connector-arrows";let r=chunkYOEVEUFZ_cjs.dh.map(i=>{let s=II(e,t,n,i);return o.appendChild(s.select.parentElement),s});return {el:o,update(i){o.hidden=!i.isConnector;for(let{control:s,select:a}of r){let l=i.shapeStyle?.[s.styleKey];a.value=typeof l=="string"&&l.length>0?l:s.fallback,a.disabled=!i.canShape||!i.arrowheadsChangeable;}}}}function II(e,t,n,o){let r=Q(e);for(let s of o.values){let a=e.createElement("option");a.value=s,a.textContent=chunkYOEVEUFZ_cjs.Qb(o.optionLabelKeys,s,t),r.appendChild(a);}r.addEventListener("change",()=>n.setShapeStyle(chunkYOEVEUFZ_cjs.eh(o,r.value)));let i=e.createElement("label");return i.textContent=t(o.labelKey),r.setAttribute("aria-label",t(o.labelKey)),i.appendChild(r),{control:o,select:r}}function eE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-shape-effects"),r=he(e,{label:t("pptx.shape.type"),options:chunkYOEVEUFZ_cjs.oo.map(f=>({value:f.type,label:t(f.i18nKey)})),onChange:f=>n.setShapeType(f)});o.appendChild(r.el);let i=(f,S,y)=>{let h=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-row"),C=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");C.textContent=f;let w=He(e,{label:f,onInput:A=>n.setShapeStyle({[S]:A}),onCommit:n.pushRecentColor},y);return h.append(C,w.el),o.appendChild(h),w},s=(f,S)=>{let y=re(e,{label:f,min:0,onCommit:h=>n.setShapeStyle({[S]:h})});return o.appendChild(y.el),y},a=i(t("pptx.textEffects.shadowColor"),"shadowColor","#000000"),l=s(t("pptx.textEffects.blur"),"shadowBlur"),p=s(t("pptx.shape.shadowDistance"),"shadowDistance"),d=oe(e,{label:t("pptx.effects.rotateWithShape"),onChange:f=>n.setShapeStyle({shadowRotateWithShape:f})});o.appendChild(d.el);let u=i(t("pptx.textEffects.glowColor"),"glowColor","#ffff00"),m=s(t("pptx.textEffects.glow"),"glowRadius"),g=s(t("pptx.shape.softEdges"),"softEdgeRadius"),x=oe(e,{label:t("pptx.textEffects.reflection"),onChange:f=>n.setShapeStyle({reflectionStartOpacity:f?.5:void 0})});o.appendChild(x.el);let b=Jw(e,t,n);o.appendChild(b.el);let v=[r,a,l,p,d,u,m,g,x];return {el:o,update(f){let S=f.shapeStyle??{};a.setValue(S.shadowColor??"#000000"),l.setValue(S.shadowBlur??0),p.setValue(S.shadowDistance??0),d.setValue(S.shadowRotateWithShape??true),u.setValue(S.glowColor??"#ffff00"),m.setValue(S.glowRadius??0),g.setValue(S.softEdgeRadius??0),x.setValue(!!S.reflectionStartOpacity),r.setValue(f.shapeType??"rect"),r.el.hidden=!f.shapeType,b.update(f);for(let y of v)y.setDisabled(!f.canShape);}}}var LI="pct20";function tE(e){return `${Math.round(e*100)}%`}function oE(e,t,n,o){let r=n(t("pptx.shape.fillStroke"));r.setAttribute("data-pptx-inspector-section","fill-stroke");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-row"),s=He(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),a=He(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.fill");let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.line"),i.append(l,s.el,p,a.el),r.appendChild(i);let d=Ie(e,t,N=>o.setShapeFill(N.hex,N.ref));r.appendChild(d.el);let u=Ie(e,t,N=>o.setShapeStroke(N.hex,N.ref));r.appendChild(u.el);let m=Rt(e,t,o.setShapeFill);r.appendChild(m.el);let g=Rt(e,t,o.setShapeStroke);r.appendChild(g.el);let x=re(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(x.el);let b=Fe(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:tE,onCommit:o.setFillOpacity});r.appendChild(b.el);let v=Fe(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:tE,onCommit:o.setStrokeOpacity});r.appendChild(v.el);let f=oe(e,{label:t("pptx.fill.gradient"),onChange(N){N?o.setGradientFill(I):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(f.el);let S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-gradient");r.appendChild(S);let y=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-row");S.appendChild(y);let h=H(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...I,type:"linear"})}),C=H(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...I,type:"radial"})});y.append(h.btn,C.btn);let w=re(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:N=>o.setGradientFill({...I,angle:N})});S.appendChild(w.el);let A=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-gradient-stops");S.appendChild(A);let P=H(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let N=I.stops,W=N[N.length-1]?.position??100,X=N[N.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((W+X)/2));}});S.appendChild(P.btn);let k=oe(e,{label:t("pptx.table.fillPattern"),onChange(N){N?o.setShapeStyle({fillMode:"pattern",fillPatternPreset:M,fillPatternBackgroundColor:D}):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(k.el);let T=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-pattern");r.appendChild(T);let E=he(e,{label:t("pptx.table.patternPreset"),options:chunkYOEVEUFZ_cjs.ac.map(N=>({value:N.value,label:t(N.labelKey)})),onChange:N=>{M=N,o.setShapeStyle({fillMode:"pattern",fillPatternPreset:N});}});T.appendChild(E.el);let L=He(e,{label:t("pptx.table.patternBackground"),onInput:N=>{D=N,o.setShapeStyle({fillMode:"pattern",fillPatternBackgroundColor:N});},onCommit:o.pushRecentColor},"#ffffff");T.appendChild(L.el);let M=LI,D="#ffffff",I=chunkYOEVEUFZ_cjs.Xm(),R=[],O=(N,W,X)=>{A.replaceChildren(),R=N.map((ie,G)=>{let K=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-row"),j=He(e,{label:t("pptx.gradient.stops"),onInput:Me=>o.updateGradientStop(G,{color:Me,colorRef:void 0}),onCommit:o.pushRecentColor},ie.color),Y=re(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:Me=>o.updateGradientStop(G,{position:Me})});Y.setValue(ie.position);let ue=H(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(G)});ue.setDisabled(N.length<=2),K.append(j.el,Y.el,ue.btn),A.appendChild(K);let Te=Ie(e,t,Me=>o.updateGradientStop(G,chunkYOEVEUFZ_cjs.Bo(Me)));return Te.setThemeColorMap(W),Te.setSelected(ie.colorRef,ie.color),Te.setDisabled(!X),A.appendChild(Te.el),{color:j,theme:Te,position:Y,remove:ue}});},B=[s,a,x,b,v,f,k],F=[h,C,w,P],V=[E,L],_=eE(e,t,o);return r.appendChild(_.el),{el:r,update(N){r.hidden=!N.hasSelection||!N.canShape,s.setValue(N.fillColor),a.setValue(N.strokeColor),x.setValue(N.strokeWidth),b.setValue(N.fillOpacity),v.setValue(N.strokeOpacity),d.setThemeColorMap(N.themeColorMap),d.setSelected(N.fillColorRef,N.fillColor),d.setDisabled(!N.canShape),u.setThemeColorMap(N.themeColorMap),u.setSelected(N.strokeColorRef,N.strokeColor),u.setDisabled(!N.canShape),m.setColors(N.recentColors??[]),g.setColors(N.recentColors??[]),m.setDisabled(!N.canShape),g.setDisabled(!N.canShape),f.setValue(N.gradientEnabled),w.setValue(N.gradient.angle),I=N.gradient,O(N.gradient.stops,N.themeColorMap,N.canShape),S.hidden=!N.gradientEnabled,_.update(N);let W=N.shapeStyle?.fillMode==="pattern";k.setValue(W),M=N.shapeStyle?.fillPatternPreset??M,D=N.shapeStyle?.fillPatternBackgroundColor??D,E.setValue(M),L.setValue(D),T.hidden=!W;for(let X of B)X.setDisabled(!N.canShape);for(let X of F)X.setDisabled(!N.canShape||!N.gradientEnabled);for(let X of V)X.setDisabled(!N.canShape||!W);for(let X of R)X.color.setDisabled(!N.canShape),X.position.setDisabled(!N.canShape),X.remove.setDisabled(!N.canShape||N.gradient.stops.length<=2);}}}function nE(e,t,n){let o=n(t("pptx.elementType.group")),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-muted-text");return o.appendChild(r),{el:o,update(i){o.hidden=!i.isGroup,i.isGroup&&(r.textContent=i.groupChildCount!==void 0?t("pptx.group.childCount",{count:i.groupChildCount}):t("pptx.group.groupedElement"));}}}function rE(e,t,n,o){let r=n(t("pptx.inspector.image")),i=e.createElement("button");i.type="button",i.textContent=t("pptx.image.replaceImage"),i.addEventListener("click",o.replaceImage);let s=e.createElement("button");s.type="button",s.textContent=t("pptx.image.resetImage"),s.addEventListener("click",o.resetImage),r.append(i,s);let a=F=>`${Math.round(F)}%`,l=Fe(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:a,onCommit:o.setImageBrightness}),p=Fe(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:a,onCommit:o.setImageContrast}),d=Fe(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:a,onCommit:o.setImageSaturation});r.append(l.el,p.el,d.el);let u=e.createElement("label");u.textContent=t("pptx.image.artisticEffects");let m=Q(e);m.setAttribute("aria-label",t("pptx.image.artisticEffects"));for(let[F,V]of chunkYOEVEUFZ_cjs.Xn){let _=e.createElement("option");_.value=F,_.textContent=t(V),m.appendChild(_);}m.addEventListener("change",()=>o.setImageEffects({artisticEffect:m.value==="none"?void 0:m.value})),u.appendChild(m);let g=Fe(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:a,onCommit:F=>o.setImageEffects({alphaModFix:100-F})}),x=Fe(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:a,onCommit:F=>o.setImageEffects({biLevel:F})}),b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-grid"),v={},f=(F,V)=>{let _=e.createElement("label");_.textContent=F;let N=e.createElement("input");return N.type="color",N.addEventListener("input",()=>o.setImageEffects({duotone:{color1:V==="color1"?N.value:v.color1?.value??"#000000",color2:V==="color2"?N.value:v.color2?.value??"#ffffff"}})),_.appendChild(N),b.appendChild(_),N},S=f(t("pptx.image.duotoneDark"),"color1"),y=f(t("pptx.image.duotoneLight"),"color2");v.color1=S,v.color2=y;for(let F of [S,y])F.addEventListener("change",()=>o.pushRecentColor(F.value));r.append(u,g.el,x.el,b);let h=me(e),C=e.createElement("input");C.type="color";let w=40,A=Fe(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:a,onCommit:F=>{w=F,o.setImageEffects({colorWash:{color:C.value,opacity:F}});}});h.addEventListener("change",()=>o.setImageEffects({colorWash:h.checked?{color:C.value,opacity:w}:void 0})),C.addEventListener("input",()=>o.setImageEffects({colorWash:{color:C.value,opacity:w}})),C.addEventListener("change",()=>o.pushRecentColor(C.value)),r.append(h,C,A.el);let P=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(P);let k=(F,V)=>{let _=re(e,{label:F,min:0,max:90,onCommit:N=>o.setImageCrop(V,N/100)});return P.appendChild(_.el),_},T=k(t("pptx.image.cropLeft"),"left"),E=k(t("pptx.image.cropTop"),"top"),L=k(t("pptx.image.cropRight"),"right"),M=k(t("pptx.image.cropBottom"),"bottom"),D=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-image-alt"),I=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");I.textContent=t("pptx.image.altText");let R=e.createElement("textarea");R.rows=2,R.className="pptxv-image-alt-input",R.placeholder=t("pptx.imageTransform.altTextPlaceholder"),R.setAttribute("aria-label",t("pptx.image.altText")),R.addEventListener("keydown",F=>F.stopPropagation()),R.addEventListener("change",()=>o.setAltText(R.value)),D.append(I,R),r.appendChild(D);let O=[l,p,d],B=[T,E,L,M];return {el:r,update(F){r.hidden=!F.hasSelection||!F.isImage,l.setValue(F.imageBrightness),p.setValue(F.imageContrast),d.setValue(F.imageSaturation),m.value=F.imageArtisticEffect,g.setValue(F.imageTransparency),x.setValue(F.imageBiLevel),S.value=F.imageDuotone1,y.value=F.imageDuotone2,h.checked=!!F.imageColorWash,C.value=F.imageColorWash?.color??"#0066cc",A.setValue(F.imageColorWash?.opacity??40),w=F.imageColorWash?.opacity??40,e.activeElement!==R&&(R.value=F.altText),R.disabled=!F.isImage,T.setValue(F.cropLeft*100),E.setValue(F.cropTop*100),L.setValue(F.cropRight*100),M.setValue(F.cropBottom*100);for(let V of [...O,g,x])V.setDisabled(!F.isImage);m.disabled=!F.isImage,S.disabled=!F.isImage,y.disabled=!F.isImage,i.disabled=!F.isImage,s.disabled=!F.isImage,h.disabled=!F.isImage,C.disabled=!F.isImage,A.setDisabled(!F.isImage);for(let V of B)V.setDisabled(!F.isImage||!F.croppable);}}}function iE(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline"),o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-times"),r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-media-timeline-time"),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-media-timeline-time");o.append(r,i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-bar"),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-region"),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-playhead"),p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-handle is-start"),d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-handle is-end"),u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-media-timeline-marks");s.append(a,u,l,p,d),n.append(o,s);let m={duration:0,trimStartMs:0,trimEndMs:0,canEdit:false},g=b=>{let v=s.getBoundingClientRect();return chunkYOEVEUFZ_cjs.Tn(b,v.left,v.width,m.duration||1)};s.addEventListener("click",b=>{b.target===p||b.target===d||t.onSeek(g(b.clientX));});let x=(b,v)=>{b.addEventListener("pointerdown",f=>{if(!m.canEdit)return;f.preventDefault(),f.stopPropagation(),b.setPointerCapture(f.pointerId);let S=h=>{let C=chunkYOEVEUFZ_cjs.Vn(v,g(h.clientX),m.duration,m.trimStartMs,m.trimEndMs);t.onTrimChange(Math.round(C.trimStartMs),Math.round(C.trimEndMs));},y=()=>{b.removeEventListener("pointermove",S),b.removeEventListener("pointerup",y),b.removeEventListener("pointercancel",y);};b.addEventListener("pointermove",S),b.addEventListener("pointerup",y),b.addEventListener("pointercancel",y);});};return x(p,"start"),x(d,"end"),{el:n,update(b){m=b;let v=chunkYOEVEUFZ_cjs.Un(b.duration,b.trimStartMs,b.trimEndMs,b.currentTime),f=chunkYOEVEUFZ_cjs.Sn(b.duration,b.trimEndMs);r.textContent=chunkYOEVEUFZ_cjs.Rn(b.trimStartMs/1e3),i.textContent=chunkYOEVEUFZ_cjs.Rn(f),a.style.left=`${v.startPercent}%`,a.style.width=`${Math.max(0,v.endPercent-v.startPercent)}%`,l.style.left=`${v.playheadPercent}%`,p.style.left=`${v.startPercent}%`,d.style.left=`${v.endPercent}%`,p.hidden=!b.canEdit,d.hidden=!b.canEdit,u.textContent="";let S=b.duration>0?b.duration:1;for(let y of b.bookmarks){let h=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-media-timeline-mark");h.type="button",h.style.left=`${Math.max(0,Math.min(100,y.time/S*100))}%`,h.title=y.label??"",h.setAttribute("aria-label",y.label||chunkYOEVEUFZ_cjs.Rn(y.time)),h.addEventListener("click",C=>{C.stopPropagation(),t.onSeek(y.time);}),u.appendChild(h);}}}}function lE(e,t,n,o){let r=n(t("pptx.media.title")),i,s=()=>{let k=Number.isFinite(a.duration)?a.duration:0,T=i?.metadata?.duration??0;return (k||T)*1e3},a=e.createElement("video");a.controls=true,a.preload="metadata",a.className="pptxv-media-preview",a.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(a.duration)?a.duration:void 0,videoWidth:a.videoWidth||void 0,videoHeight:a.videoHeight||void 0}}),P();});let l=e.createElement("img");l.className="pptxv-media-poster",l.alt=t("pptx.media.posterFrame");let p=oe(e,{label:t("pptx.media.autoPlay"),onChange:k=>o.setMediaProperties({autoPlay:k})}),d=oe(e,{label:t("pptx.media.loop"),onChange:k=>o.setMediaProperties({loop:k})}),u=oe(e,{label:t("pptx.media.playAcrossSlides"),onChange:k=>o.setMediaProperties({playAcrossSlides:k})}),m=oe(e,{label:t("pptx.media.fullScreen"),onChange:k=>o.setMediaProperties({fullScreen:k})}),g=oe(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:k=>o.setMediaProperties({hideWhenNotPlaying:k})}),x=Fe(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:k=>`${Math.round(k)}%`,onCommit:k=>o.setMediaProperties({volume:k/100})}),b=he(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(k=>({value:String(k),label:`${k}x`})),onChange:k=>o.setMediaProperties({playbackSpeed:Number(k)})}),v=re(e,{label:t("pptx.media.trimStart"),min:0,onCommit:k=>o.setMediaProperties({trimStartMs:k})}),f=re(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:k=>o.setMediaProperties({trimEndMs:chunkYOEVEUFZ_cjs.Qn(s(),k)})}),S=aE(e,t("pptx.media.bookmarks"));S.control.placeholder="12.5 | Intro",S.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:sE(S.control.value).map((k,T)=>{let[E,L=""]=k.split("|").map(M=>M.trim());return {id:`bookmark-${T+1}`,time:Number(E),label:L}}).filter(({time:k})=>Number.isFinite(k))}));let y=aE(e,t("pptx.media.captions"));y.control.placeholder="en | English | captions | captions.vtt",y.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:sE(y.control.value).map((k,T)=>{let[E="",L="",M="captions",D=""]=k.split("|").map(I=>I.trim());return {id:`caption-${T+1}`,language:E,label:L,kind:M,src:D||void 0}})}));let h=e.createElement("output");h.className="pptxv-media-metadata";let C=[p,d,u,m,g],w=false,A=iE(e,{onTrimChange:(k,T)=>{o.setMediaProperties({trimStartMs:k,trimEndMs:T}),v.setValue(k),f.setValue(chunkYOEVEUFZ_cjs.Pn(s(),T));},onSeek:k=>{Number.isFinite(a.duration)&&(a.currentTime=k);}}),P=()=>{A.update({duration:Number.isFinite(a.duration)?a.duration:0,trimStartMs:i?.trimStartMs??0,trimEndMs:i?.trimEndMs??0,currentTime:a.currentTime||0,bookmarks:i?.bookmarks??[],canEdit:w});};return a.addEventListener("timeupdate",P),r.append(a,l,A.el,...C.map(({el:k})=>k),x.el,b.el,v.el,f.el,S.label,y.label,h),{el:r,update(k){r.hidden=!k.isMedia;let T=k.media;i=T,w=k.isMedia,P();let E=k.mediaPreviewUrl??"";a.src!==E&&(a.src=E),a.hidden=!E,a.poster=k.mediaPosterUrl??"",l.src=k.mediaPosterUrl??"",l.hidden=!k.mediaPosterUrl,p.setValue(T?.autoPlay??false),d.setValue(T?.loop??false),u.setValue(T?.playAcrossSlides??false),m.setValue(T?.fullScreen??false),g.setValue(T?.hideWhenNotPlaying??false),x.setValue((T?.volume??1)*100),b.setValue(String(T?.playbackSpeed??1)),v.setValue(T?.trimStartMs??0),f.setValue(chunkYOEVEUFZ_cjs.Pn(s(),T?.trimEndMs??0)),S.control.value=(T?.bookmarks??[]).map(({time:L,label:M})=>`${L} | ${M}`).join(`
3
3
  `),y.control.value=(T?.captionTracks??[]).map(({language:L,label:M,kind:D,src:I})=>`${L} | ${M} | ${D} | ${I??""}`).join(`
4
- `),h.textContent=T?.metadata?`${T.metadata.duration??0}s, ${T.metadata.videoWidth??0} x ${T.metadata.videoHeight??0}, ${T.metadata.codecInfo??T.mediaMimeType??""}`:T?.mediaMimeType??"";for(let L of [...C,x,b,v,f])L.setDisabled(!k.isMedia);S.control.disabled=!k.isMedia,y.control.disabled=!k.isMedia;}}}function aE(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 sE(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function we(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunkIQ7MDPEN_cjs.w(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 s=chunkIQ7MDPEN_cjs.w(e,"header","pptxv-parity-header"),a=chunkIQ7MDPEN_cjs.w(e,"h2");a.id=i,a.textContent=n;let l=chunkIQ7MDPEN_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.common.close")),s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-parity-body"),d=chunkIQ7MDPEN_cjs.w(e,"footer","pptxv-parity-footer");r.append(s,p,d),e.body.append(o,r);let u=()=>{e.removeEventListener("keydown",m),o.remove(),r.remove();},m=g=>{g.key==="Escape"&&u();};return e.addEventListener("keydown",m),o.addEventListener("click",u),l.addEventListener("click",u),queueMicrotask(()=>l.focus()),{backdrop:o,dialog:r,heading:a,body:p,footer:d,close:u}}function ae(e,t,n,o,r=false){let i=chunkIQ7MDPEN_cjs.w(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function qe(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(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 Br(e,t,n,o,r,i){for(let s of o){let a=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-check"),l=e.createElement("input");l.type="radio",l.name=n,l.value=s.value,l.checked=s.value===r,l.addEventListener("change",()=>{l.checked&&i(s.value);}),a.append(l,e.createTextNode(s.label)),t.appendChild(a);}}function pE(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-parity-swatch-row");for(let s of n){let a=e.createElement("button");a.type="button",a.className="pptxv-parity-swatch",a.classList.toggle("is-active",s.key===o);let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-parity-swatch-preview");l.style.background=s.previewColor;let p=e.createElement("span");p.textContent=s.label,a.append(l,p),a.addEventListener("click",()=>r(s.key)),i.appendChild(a);}t.appendChild(i);}function zr(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-ole-edit-empty");return n.textContent=t,n}function dE(e,t,n,o){if(!n||n.rows.length===0)return zr(e,t("pptx.ole.editDialog.emptySheet"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-edit-table-wrap"),i=chunkIQ7MDPEN_cjs.w(e,"table","pptxv-ole-edit-table"),s=e.createElement("tbody");return n.rows.forEach((a,l)=>{let p=e.createElement("tr");a.cells.forEach((d,u)=>{let m=e.createElement("td"),g=e.createElement("input");g.type="text",g.value=d.value,g.setAttribute("aria-label",t("pptx.ole.editDialog.cellEditLabel")),g.addEventListener("keydown",x=>x.stopPropagation()),g.addEventListener("blur",()=>{g.value!==d.value&&o(l,u,g.value);}),m.appendChild(g),p.appendChild(m);}),s.appendChild(p);}),i.appendChild(s),r.appendChild(i),r}function cE(e,t,n,o){if(!n||n.length===0)return zr(e,t("pptx.ole.editDialog.emptyDocument"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-edit-paragraphs");return n.forEach((i,s)=>{let a=e.createElement("textarea");a.rows=2,a.value=i,a.addEventListener("keydown",l=>l.stopPropagation()),a.addEventListener("blur",()=>{a.value!==i&&o(s,a.value);}),r.appendChild(a);}),r}function mE(e,t,n,o){if(!n||n.length===0)return zr(e,t("pptx.ole.editDialog.deckEmpty"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-edit-deck");for(let i of n){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-edit-deck-slide"),a=e.createElement("span");a.className="pptxv-ole-edit-deck-caption",a.textContent=t("pptx.ole.editDialog.deckSlideLabel",{number:i.index+1}),s.appendChild(a),i.elements.length===0&&s.appendChild(zr(e,t("pptx.ole.editDialog.deckEmpty")));for(let l of i.elements){let p=e.createElement("input");p.type="text",p.value=l.text,p.addEventListener("keydown",d=>d.stopPropagation()),p.addEventListener("blur",()=>{p.value!==l.text&&o(i.index,l.elementId,p.value);}),s.appendChild(p);}r.appendChild(s);}return r}function uE(e,t,n,o){let r=chunk5YHVN3PP_cjs.Wf(n),i=we(e,t,t(r.titleKey));i.dialog.classList.add("pptxv-ole-edit-dialog");let s=n,a=y=>{s=y,y.oleContentDirty&&o.onUpdateElement(chunk5YHVN3PP_cjs.Xf(y));},l=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-ole-edit-loading");l.textContent=t("pptx.ole.editDialog.loading");let p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-ole-edit-error");p.textContent=t("pptx.ole.editDialog.saveError"),p.hidden=true;let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-edit-content");i.body.append(l,p,d);let u=()=>i.dialog.isConnected,m=()=>{u()&&(p.hidden=false);},g=y=>{u()&&d.replaceChildren(dE(e,t,y,(h,C,w)=>{(async()=>{try{let A=await chunk5YHVN3PP_cjs.y(s,{row:h,col:C,value:w});a(A);let P=await chunk5YHVN3PP_cjs.u(A);g(P);}catch{m();}})();}));},x=y=>{u()&&d.replaceChildren(cE(e,t,y,(h,C)=>{(async()=>{try{let w=await chunk5YHVN3PP_cjs.z(s,h,C);a(w);let A=await chunk5YHVN3PP_cjs.v(w);x(A);}catch{m();}})();}));},b=y=>{u()&&d.replaceChildren(mE(e,t,y,(h,C,w)=>{(async()=>{try{let A=await chunk5YHVN3PP_cjs.x(s,h,C,w);a(A);let P=await chunk5YHVN3PP_cjs.w(A);b(P);}catch{m();}})();}));},v=()=>{let y=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-ole-edit-empty");y.textContent=t("pptx.ole.editDialog.unsupported"),d.replaceChildren(y);};(async()=>{let y=r.contentTab?.kind;try{y==="sheet"?g(await chunk5YHVN3PP_cjs.u(n)):y==="document"?x(await chunk5YHVN3PP_cjs.v(n)):y==="deck"?b(await chunk5YHVN3PP_cjs.w(n)):v();}catch{m();}finally{l.hidden=true;}})();let S=e.createElement("input");S.type="file",S.hidden=true,S.addEventListener("change",()=>{let y=S.files?.[0];S.value="",y&&(async()=>{try{let h=new Uint8Array(await y.arrayBuffer()),C=await chunk5YHVN3PP_cjs.A(s,h,y.name);a(C),i.close();}catch{m();}})();}),i.footer.appendChild(S),ae(e,i.footer,t("pptx.ole.editDialog.replaceFile"),()=>S.click()),ae(e,i.footer,t("pptx.ole.editDialog.save"),()=>i.close(),true);}function xE(e,t,n,o){let r=n(t("pptx.ole.title"));r.classList.add("pptxv-ole-info");let i,s=e.createElement("button");s.type="button",s.textContent=t("pptx.ole.editContent"),s.addEventListener("click",()=>{i&&uE(e,t,i,{onUpdateElement:x=>o.setOleContent(x)});}),r.appendChild(s);let a=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-ole-name"),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.ole.objectName");let p=e.createElement("input");p.type="text",p.placeholder=t("pptx.ole.objectNamePlaceholder"),p.setAttribute("aria-label",t("pptx.ole.objectName")),p.addEventListener("keydown",x=>x.stopPropagation()),p.addEventListener("change",()=>o.setOleName(p.value)),a.append(l,p),r.appendChild(a);let d=x=>{let b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ole-row"),v=chunkIQ7MDPEN_cjs.w(e,"span");v.textContent=x;let f=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-ole-value");return b.append(v,f),r.appendChild(b),{row:b,value:f}},u=d(t("pptx.ole.type")),m=d(t("pptx.ole.fileName")),g=d(t("pptx.ole.linkStatus"));return g.value.classList.add("pptxv-ole-badge"),{el:r,update(x){r.hidden=!x.isOle,x.isOle&&(i=x.oleElement,s.hidden=x.isLocked||x.oleIsLinked,e.activeElement!==p&&(p.value=x.oleName??""),u.value.textContent=chunk5YHVN3PP_cjs.t(x.oleObjectType),m.row.hidden=!x.oleFileName,m.value.textContent=x.oleFileName??"",m.value.title=x.oleFileName??"",g.value.textContent=t(x.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),g.value.classList.toggle("is-linked",x.oleIsLinked));}}}function gE(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize"));i.setAttribute("data-pptx-inspector-section","transform");let s=i.querySelector(".pptxv-inspector-section-title"),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-lock-row");s?(i.insertBefore(a,s),a.appendChild(s)):i.insertBefore(a,i.firstChild);let l=H(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});a.appendChild(l.btn);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-grid");i.appendChild(p);let d=(f,S,y)=>{let h=re(e,{label:f,min:y,onCommit:C=>o({[S]:C})});return p.appendChild(h.el),h},u=d(t("pptx.arrange.x"),"x"),m=d(t("pptx.arrange.y"),"y"),g=d(t("pptx.arrange.width"),"width",1),x=d(t("pptx.arrange.height"),"height",1),b=d(t("pptx.arrange.rotation"),"rotation"),v=[u,m,g,x,b];return {el:i,update(f){i.hidden=!f.hasSelection,u.setValue(f.x),m.setValue(f.y),g.setValue(f.width),x.setValue(f.height),b.setValue(f.rotation);for(let y of v)y.setDisabled(!f.hasSelection);l.setActive(f.isLocked),l.setDisabled(!f.hasSelection);let S=t(f.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");l.btn.title=S,l.btn.setAttribute("aria-label",S),l.btn.replaceChildren(chunkIQ7MDPEN_cjs.K(e,f.isLocked?"lock":"lock-open"));}}}function bE(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-quick-styles"),s=[];for(let a of chunk5YHVN3PP_cjs.Zn){let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-quick-style");if(l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name),l.style.background=a.style.fillGradient||a.style.fillColor||"transparent",a.style.strokeColor&&(l.style.border=`${a.style.strokeWidth??1}px solid ${a.style.strokeColor}`),a.style.shadowColor){let p=a.style.shadowOffsetX??2,d=a.style.shadowOffsetY??2;l.style.boxShadow=`${p}px ${d}px ${a.style.shadowBlur??4}px ${a.style.shadowColor}`;}l.addEventListener("click",()=>o.setShapeStyle(a.style)),i.appendChild(l),s.push(l);}return r.appendChild(i),{el:r,update(a){r.hidden=!a.canShape;for(let l of s)l.disabled=!a.canShape;}}}var MI=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function fE(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-layout-grid"),a=new Map;for(let S of chunk5YHVN3PP_cjs.N){let y=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-layout-button");y.type="button",y.dataset.testid=`smartart-layout-${S}`,y.textContent=chunk5YHVN3PP_cjs.Qb(chunk5YHVN3PP_cjs.Tb,S,t),y.addEventListener("click",()=>o.setSmartArtLayout(S)),a.set(S,y),s.appendChild(y);}r.appendChild(s);let l=he(e,{label:t("pptx.smartart.colorScheme"),options:MI.map(S=>({value:S,label:chunk5YHVN3PP_cjs.Qb(chunk5YHVN3PP_cjs.Sb,S,t)})),onChange:o.setSmartArtColorScheme}),p=l.el.querySelector("pptx-ui-select");p&&(p.dataset.testid="smartart-color-scheme"),r.appendChild(l.el);let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-nodes"),m=e.createElement("button");m.type="button",m.textContent=t("pptx.smartart.addItem"),m.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(m,u);let g,x=null;function b(S,y){let h=g;if(!h)return;let C=h.nodes.find(T=>T.id===y),w=S.currentTarget.value,A=!w,P=chunk5YHVN3PP_cjs.E(h,y,w),k=w!==C?.text;if(S.key==="Enter"){S.preventDefault();let T=chunk5YHVN3PP_cjs.Wi(P,y);T?(x=T.focusNodeId??null,o.replaceSmartArtData(T.data)):k&&o.replaceSmartArtData(P);}else if((S.key==="Backspace"||S.key==="Delete")&&A){if(!C?.parentId&&!chunk5YHVN3PP_cjs.Ui(h.resolvedLayoutType,chunk5YHVN3PP_cjs.Vi(h)))return;S.preventDefault();let E=chunk5YHVN3PP_cjs.Xi(h,y);E&&(x=E.focusNodeId??null,o.replaceSmartArtData(E.data));}else if(S.key==="Tab"&&!S.shiftKey){S.preventDefault();let T=chunk5YHVN3PP_cjs.Yi(P,y);T?(x=y,o.replaceSmartArtData(T)):k&&o.replaceSmartArtData(P);}else if(S.key==="Tab"&&S.shiftKey){S.preventDefault();let T=chunk5YHVN3PP_cjs.Zi(P,y);T?(x=y,o.replaceSmartArtData(T)):k&&o.replaceSmartArtData(P);}}let v="",f=S=>{let y=S.smartArtData;g=y;let h=y?.nodes.map(C=>C.id).join("|")??"";if(h===v){let C=u.querySelectorAll('[data-testid="smartart-node-text"]');y?.nodes.forEach((w,A)=>{let P=C[A];P&&e.activeElement!==P&&(P.value=w.text);});return}v=h,u.replaceChildren();for(let[C,w]of (y?.nodes??[]).entries()){let A=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-smartart-node"),P=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-smartart-node-index");P.textContent=String(C+1);let k=e.createElement("input");k.type="text",k.className="pptxv-smartart-node-input",k.dataset.testid="smartart-node-text",k.dataset.nodeId=w.id,k.setAttribute("aria-label",`${t("pptx.smartart.item")} ${C+1}`),k.value=w.text,k.addEventListener("change",()=>o.setSmartArtNodeText(w.id,k.value)),k.addEventListener("keydown",I=>b(I,w.id));let T=e.createElement("input");T.type="color",T.value=w.style?.fillColor??"#3b82f6",T.title=t("pptx.inspector.fill"),T.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fillColor:T.value})),T.addEventListener("change",()=>o.pushRecentColor(T.value));let E=e.createElement("input");E.type="color",E.value=w.style?.fontColor??"#ffffff",E.title=t("pptx.table.color"),E.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fontColor:E.value})),E.addEventListener("change",()=>o.pushRecentColor(E.value));let L=e.createElement("button");L.type="button",L.textContent="B",L.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{bold:!w.style?.bold}));let M=e.createElement("button");M.type="button",M.textContent="I",M.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{italic:!w.style?.italic}));let D=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-smartart-hierarchy");for(let[I,R]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let O=e.createElement("button");O.type="button",O.textContent=t(R),O.addEventListener("click",()=>o.mutateSmartArtNode(w.id,I)),D.appendChild(O);}A.append(P,k,T,E,L,M,D),u.appendChild(A);}};return {el:r,update(S){r.hidden=!S.isSmartArt;let y=S.smartArtData?.resolvedLayoutType;for(let[h,C]of a)C.disabled=!S.isSmartArt,C.classList.toggle("is-active",h===y),C.setAttribute("aria-pressed",String(h===y));if(l.setValue(S.smartArtData?.colorScheme??"colorful1"),l.setDisabled(!S.isSmartArt),m.disabled=!S.isSmartArt,f(S),x){let h=x;x=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${h}"]`)?.focus();}}}}function vE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-header"),i=chunkIQ7MDPEN_cjs.w(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-toolbar");r.append(i,s);let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-scroll"),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-body");l.setAttribute("role","grid"),a.appendChild(l),o.append(r,a);let p,d,u=true,m=T=>{!p||T===p||!T.tableData||n.setTableData(T.tableData,T.rawXml);},g=(T,E,L)=>{let M=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-table-grid-btn");return M.type="button",M.textContent=t(`pptx.tableDataEditor.${T}`),M.title=t(`pptx.tableDataEditor.${E}`),M.addEventListener("click",()=>{p&&m(L(p));}),M},x=g("addRowLabel","addRowTitle",chunk5YHVN3PP_cjs.ze),b=g("removeRowLabel","removeRowTitle",chunk5YHVN3PP_cjs.Ae),v=g("addColumnLabel","addColumnTitle",chunk5YHVN3PP_cjs.Be),f=g("removeColumnLabel","removeColumnTitle",chunk5YHVN3PP_cjs.Ce);s.append(x,b,v,f);let S=T=>{let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-head");E.setAttribute("role",T.role),T.role==="rowheader"&&E.classList.add("pptxv-table-grid-gutter");let L=e.createElement("span");if(L.textContent=T.text,E.appendChild(L),u&&T.canRemove){let M=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-table-grid-remove");M.type="button",M.textContent="\xD7",M.title=T.removeLabel,M.setAttribute("aria-label",T.removeLabel),M.addEventListener("click",T.onRemove),E.appendChild(M);}return E},y=T=>{let E=e.createElement("input");return E.type="text",E.className="pptxv-table-grid-input",E.value=T.text,E.disabled=!u,E.dataset.pptxRow=String(T.rowIndex),E.dataset.pptxCol=String(T.colIndex),E.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:T.rowIndex+1,column:T.colIndex+1})),E.addEventListener("change",()=>{p&&m(chunk5YHVN3PP_cjs.ue(p,T.rowIndex,T.colIndex,E.value));}),E.addEventListener("keydown",L=>L.stopPropagation()),E},h=(T,E)=>S({role:"columnheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunk5YHVN3PP_cjs.ye(p,T));}}),C=(T,E)=>S({role:"rowheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunk5YHVN3PP_cjs.we(p,T));}}),w=T=>{let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-row");E.setAttribute("role","row");let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");L.setAttribute("role","columnheader"),E.appendChild(L);for(let M of T.colIndices)E.appendChild(h(M,T.canRemoveColumn));return E},A=T=>{l.textContent="",l.appendChild(w(T));for(let E of T.rows){let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-row");L.setAttribute("role","row"),L.appendChild(C(E.rowIndex,T.canRemoveRow));for(let M of E.cells){let D=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(y(M)),L.appendChild(D);}l.appendChild(L);}},P=()=>{let T=e.activeElement;if(!T||T.tagName!=="INPUT"||!l.contains(T))return null;let{pptxRow:E,pptxCol:L}=T.dataset;return E!==void 0&&L!==void 0?[E,L]:null},k=()=>{s.hidden=!u;for(let T of l.querySelectorAll("input"))T.disabled=!u;for(let T of l.querySelectorAll(".pptxv-table-grid-remove"))T.hidden=!u;};return {el:o,update(T){p=T.tableElement;let E=p?chunk5YHVN3PP_cjs.te(p):void 0,L=T.hasSelection&&T.isTable&&E!==void 0&&E.rowCount>0&&E.colCount>0;if(o.hidden=!L,!L||!E||!p){d=void 0,l.textContent="";return}if(s.hidden=!u,x.disabled=!u,v.disabled=!u,b.disabled=!u||!E.canRemoveRow,f.disabled=!u||!E.canRemoveColumn,p.tableData===d)return;let M=P();d=p.tableData,A(E),M&&l.querySelector(`input[data-pptx-row="${M[0]}"][data-pptx-col="${M[1]}"]`)?.focus();},setEditable(T){u=T,k(),d=void 0;}}}function hE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tsef"),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tsef-group"),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tsef-hdg");i.textContent=t("pptx.tableStyleEditor.fillSection");let s=e.createElement("input");s.type="color",s.addEventListener("input",()=>n({kind:"fillColor",hex:s.value,ref:void 0}));let a=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-tsef-check"),l=me(e);l.addEventListener("change",()=>n({kind:"fillNone",noFill:l.checked})),a.append(l,e.createTextNode(t("pptx.tableStyleEditor.noFill")));let p=Ie(e,t,h=>n({kind:"fillColor",hex:h.hex,ref:h.ref}));r.append(i,s,a,p.el);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tsef-group"),u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tsef-hdg");u.textContent=t("pptx.tableStyleEditor.textSection");let m=Ss(e,t("pptx.format.bold"),()=>n({kind:"textBold",value:!m.classList.contains("active")})),g=Ss(e,t("pptx.format.italic"),()=>n({kind:"textItalic",value:!g.classList.contains("active")})),x=Ss(e,t("pptx.format.underline"),()=>n({kind:"textUnderline",value:!x.classList.contains("active")})),b=e.createElement("input");b.type="color",b.addEventListener("input",()=>n({kind:"textColor",hex:b.value,ref:void 0}));let v=Ie(e,t,h=>n({kind:"textColor",hex:h.hex,ref:h.ref}));d.append(u,m,g,x,b,v.el);let f=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tsef-group"),S=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tsef-hdg");S.textContent=t("pptx.tableStyleEditor.bordersSection");let y=new Map;for(let h of chunk5YHVN3PP_cjs.rs){let C=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tsef-border-row"),w=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tsef-side-lbl");w.textContent=t(chunk5YHVN3PP_cjs.ss[h]);let A=e.createElement("input");A.type="color",A.addEventListener("input",()=>n({kind:"borderColor",side:h,hex:A.value,ref:void 0}));let P=e.createElement("input");P.type="number",P.min="0",P.max="20",P.addEventListener("change",()=>n({kind:"borderWidth",side:h,width:Number(P.value)}));let k=Q(e);for(let L of chunk5YHVN3PP_cjs.ts){let M=e.createElement("option");M.value=L,M.textContent=L,k.appendChild(M);}k.addEventListener("change",()=>n({kind:"borderDash",side:h,dash:k.value}));let T=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-tsef-check"),E=me(e);E.addEventListener("change",()=>n({kind:"borderNone",side:h,noFill:E.checked})),T.append(E,e.createTextNode(t("pptx.tableStyleEditor.noBorder"))),C.append(w,A,P,k,T),f.appendChild(C),y.set(h,{color:A,width:P,dash:k,noFill:E});}return o.append(r,d,f),{el:o,update(h,C,w){if(s.value=h.fill.color.hex,s.disabled=!w,l.checked=h.fill.noFill,l.disabled=!w,p.setThemeColorMap(C),p.setSelected(h.fill.color.ref,h.fill.color.hex),p.setDisabled(!w),d.hidden=!h.hasTextAndBorders,f.hidden=!h.hasTextAndBorders,!!h.hasTextAndBorders){m.classList.toggle("active",h.text.bold),g.classList.toggle("active",h.text.italic),x.classList.toggle("active",h.text.underline);for(let A of [m,g,x])A.disabled=!w;b.value=h.text.color.hex,b.disabled=!w,v.setThemeColorMap(C),v.setSelected(h.text.color.ref,h.text.color.hex),v.setDisabled(!w);for(let[A,P]of y){let k=h.borders[A];P.color.value=k.color.hex,P.color.disabled=!w,P.width.value=String(k.width),P.width.disabled=!w,P.dash.value=k.dash,P.dash.disabled=!w,P.noFill.checked=k.noFill,P.noFill.disabled=!w;}}}}}function Ss(e,t,n){let o=e.createElement("button");return o.type="button",o.className="pptxv-tsef-toggle",o.textContent=t,o.addEventListener("click",n),o}function yE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse"),r=e.createElement("button");r.type="button",r.className="pptxv-tse-btn",r.textContent=t("pptx.tableStyleEditor.editButton");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse-panel");i.dataset.testid="table-style-editor",i.hidden=true,o.append(r,i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse-header"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tse-heading");a.textContent=t("pptx.tableStyleEditor.title");let l=e.createElement("button");l.type="button",l.textContent=t("pptx.tableStyleEditor.close"),l.addEventListener("click",()=>h(false)),s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse-empty");p.textContent=t("pptx.tableStyleEditor.noStyleSelected");let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse-parts"),u=new Map,m="wholeTbl";chunk5YHVN3PP_cjs.qs.forEach(w=>{let A=e.createElement("button");A.type="button",A.textContent=t(w.labelKey),A.addEventListener("click",()=>{m=w.id,C();}),u.set(w.id,A),d.appendChild(A);});let g=hE(e,t,w=>{let A=n.getTableStyleMap(),P=A?.[chunk5YHVN3PP_cjs.V(f)];if(!A||!P)return;let{entry:k}=chunk5YHVN3PP_cjs.vs(P,m,w);n.onStyleMapChange({...A,[k.styleId]:k});}),x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tse-actions"),b=e.createElement("button");b.type="button",b.textContent=t("pptx.tableStyleEditor.newFromCurrent"),b.addEventListener("click",()=>{let w=n.getTableStyleMap(),A=w?.[chunk5YHVN3PP_cjs.V(f)],P=e.defaultView?.prompt(t("pptx.tableStyleEditor.newStyleNamePrompt"),A?`${A.styleName??""} Copy`.trim():"");if(!P)return;let k={...w??{}},T=chunk5YHVN3PP_cjs.W(k,{styleName:P,basedOn:A});chunk5YHVN3PP_cjs.X(k,T),n.onStyleMapChange(k),f=T.styleId,n.onAssignStyle?.(T.styleId),C();});let v=e.createElement("button");v.type="button",v.textContent=t("pptx.tableStyleEditor.deleteStyle"),v.addEventListener("click",()=>{let w=n.getTableStyleMap(),A=w?.[chunk5YHVN3PP_cjs.V(f)];if(!w||!A||!e.defaultView?.confirm(t("pptx.tableStyleEditor.deleteConfirm")))return;let P={...w};chunk5YHVN3PP_cjs.Y(P,A.styleId),n.onStyleMapChange(P),n.onDeleteStyle(A.styleId),h(false);}),x.append(b,v),i.append(s,p,d,g.el,x);let f="",S=true,y=false;function h(w){y=w,i.hidden=!y,y&&C();}function C(){let w=n.getTableStyleMap(),A=f?w?.[f]:void 0;p.hidden=!!A,d.hidden=!A,g.el.hidden=!A,v.hidden=!A,b.textContent=t(A?"pptx.tableStyleEditor.newFromCurrent":"pptx.tableStyleEditor.newStyle");for(let[P,k]of u)k.classList.toggle("active",P===m),k.disabled=!S;if(b.disabled=!S,v.disabled=!S,A){let P=chunk5YHVN3PP_cjs.us(A,m,n.getThemeColorMap());P&&g.update(P,n.getThemeColorMap(),S);}}return r.addEventListener("click",()=>h(!y)),{el:o,update(w,A){f=w?chunk5YHVN3PP_cjs.V(w):"",S=A,r.disabled=!A,y&&C();}}}var DI=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function SE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=A=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],A);},s=(A,P,k)=>{let T=e.createElement("label");T.textContent=A;let E=Q(e);E.setAttribute("aria-label",A);for(let L of P){let M=e.createElement("option");M.value=L,M.textContent=k?chunk5YHVN3PP_cjs.Qb(k,L,t):L,E.appendChild(M);}return T.appendChild(E),o.appendChild(T),E},a=A=>{let P=e.createElement("label");P.textContent=A;let k=e.createElement("input");return k.type="color",k.addEventListener("change",()=>n.pushRecentColor(k.value)),P.appendChild(k),o.appendChild(P),k},l=s(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),p=s(t("pptx.table.gradientType"),["linear","radial"]),d=e.createElement("input");d.type="number",d.min="0",d.max="360",d.title=t("pptx.table.gradientAngle"),o.appendChild(d);let u=a(t("pptx.table.gradientStart")),m=a(t("pptx.table.gradientEnd")),g=s(t("pptx.table.patternPreset"),DI,chunk5YHVN3PP_cjs.$b),x=a(t("pptx.table.patternForeground")),b=a(t("pptx.table.patternBackground")),v=s(t("pptx.table.cellBorders"),["top","right","bottom","left"]),f=a(t("pptx.table.borderColor")),S=e.createElement("input");S.type="number",S.min="0",S.max="20",S.title=t("pptx.table.borderWidth"),o.appendChild(S);let y=()=>i({fillMode:"gradient",gradientFillType:p.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:m.value,position:100}]});l.addEventListener("change",()=>i({fillMode:l.value}));for(let A of [p,d,u,m])A.addEventListener("change",y);let h=()=>i({fillMode:"pattern",patternFillPreset:g.value,patternFillForeground:x.value,patternFillBackground:b.value});for(let A of [g,x,b])A.addEventListener("change",h);let C=()=>{let A=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${A}Color`]:f.value,[`border${A}Width`]:Number(S.value)});};for(let A of [v,f,S])A.addEventListener("change",C);let w=o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox");return {el:o,update(A){r=A,o.hidden=!A.selectedTableCell;let P=A.tableCellStyle??{};l.value=P.fillMode??"solid",p.value=P.gradientFillType??"linear",d.value=String(P.gradientFillAngle??90),u.value=P.gradientFillStops?.[0]?.color??"#ff0000",m.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",g.value=P.patternFillPreset??"ltDnDiag",x.value=P.patternFillForeground??"#000000",b.value=P.patternFillBackground??"#ffffff";let k=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;f.value=String(P[`border${k}Color`]??"#374151"),S.value=String(P[`border${k}Width`]??1);for(let T of w)T.disabled=!A.isTable;}}}var RI={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},OI={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function Cs(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function CE(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,s=[],a=L=>{i&&n.setTableCellStyles(s.length>0?s:[i],L);},l=(L,M)=>{let D=e.createElement("label"),I=e.createElement("span");return I.textContent=L,M.setAttribute("aria-label",L),D.append(I,M),o.appendChild(D),D},p=(L,M)=>{let D=e.createElement("input");return D.type="number",D.addEventListener("change",()=>M(Number(D.value))),l(L,D),D},d=(L,M)=>{let D=e.createElement("input");return D.type="color",D.addEventListener("input",()=>a({[M]:D.value})),D.addEventListener("change",()=>n.pushRecentColor(D.value)),l(L,D),D},u=(L,M,D,I)=>{let R=e.createElement("input");R.type="color",R.addEventListener("input",()=>a({[M]:R.value,[D]:void 0})),R.addEventListener("change",()=>n.pushRecentColor(R.value)),l(L,R);let O=Ie(e,t,B=>a(I(B)));return o.appendChild(O.el),{input:R,theme:O}},m=(L,M)=>{let D=me(e);return D.addEventListener("change",()=>a({[M]:D.checked})),l(L,D),D},g=(L,M,D,I)=>{let R=Q(e);for(let O of M){let B=e.createElement("option");B.value=O,B.textContent=chunk5YHVN3PP_cjs.Qb(D,O,t),R.appendChild(B);}return R.addEventListener("change",()=>I(R.value)),l(L,R),R},x=p(t("pptx.table.fontSize"),L=>a({fontSize:L})),{input:b,theme:v}=u(t("pptx.table.color"),"color","colorRef",chunk5YHVN3PP_cjs.Do),{input:f,theme:S}=u(t("pptx.table.background"),"backgroundColor","backgroundColorRef",chunk5YHVN3PP_cjs.Co),y=d(t("pptx.table.cellBorders"),"borderColor"),h=p(t("pptx.table.borderWidth"),L=>a({borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L})),C=p(t("pptx.table.cellPadding"),L=>a({marginLeft:L,marginRight:L,marginTop:L,marginBottom:L})),w=m(t("pptx.format.bold"),"bold"),A=m(t("pptx.format.italic"),"italic"),P=m(t("pptx.format.underline"),"underline"),k=g(t("pptx.table.alignment"),["left","center","right"],RI,L=>a({align:L})),T=g(t("pptx.table.verticalAlignment"),["top","middle","bottom"],OI,L=>a({vAlign:L})),E=[x,b,f,y,h,C,w,A,P,k,T];return {el:o,update(L){if(i=L.selectedTableCell,s=L.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let M=L.tableCellStyle??{};x.value=String(M.fontSize??14),b.value=Cs(M.color,"#000000"),f.value=Cs(M.backgroundColor,"#ffffff"),y.value=Cs(M.borderColor,"#374151"),v.setThemeColorMap(L.themeColorMap),v.setSelected(M.colorRef,M.color),v.setDisabled(!L.isTable),S.setThemeColorMap(L.themeColorMap),S.setSelected(M.backgroundColorRef,M.backgroundColor),S.setDisabled(!L.isTable),h.value=String(M.borderTopWidth??1),C.value=String(M.marginLeft??4),w.checked=!!M.bold,A.checked=!!M.italic,P.checked=!!M.underline,k.value=M.align??"left",T.value=M.vAlign??"top";for(let D of E)D.disabled=!L.isTable;}}}function wE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(u,m)=>{let g=e.createElement("button");return g.type="button",g.textContent=u,g.addEventListener("click",()=>r&&m(r)),o.appendChild(g),g},s=u=>u.selectedTableCell,a=u=>m=>{let g=s(m);g&&n.mutateTableStructure(g,u);},l=[i(t("pptx.table.insertAbove"),a("insertRowAbove")),i(t("pptx.table.insertBelow"),a("insertRowBelow")),i(t("pptx.table.deleteRow"),a("deleteRow")),i(t("pptx.table.insertLeft"),a("insertColumnLeft")),i(t("pptx.table.insertRight"),a("insertColumnRight")),i(t("pptx.table.deleteColumn"),a("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let m=s(u);m&&n.splitTableCell(m);})],p=e.createElement("input");p.type="number",p.min="5",p.max="95",p.title=t("pptx.table.columnWidths"),p.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableColumnWidth(u.column,Number(p.value));});let d=e.createElement("input");return d.type="number",d.min="1",d.title=t("pptx.table.rowHeights"),d.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(p,d),{el:o,update(u){r=u;let m=s(u);o.hidden=!m,p.value=m?String(Math.round((u.tableColumnWidths[m.column]??0)*100)):"",d.value=m?String(u.tableRowHeights[m.row]??32):"";for(let g of l)g.disabled=!m;l[6].disabled=u.selectedTableCells.length<2,p.disabled=!m,d.disabled=!m;}}}function EE(e,t,n,o,r){let i=n(t("pptx.inspector.table")),s=oe(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=oe(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),l=oe(e,{label:t("pptx.table.bandedColumns"),onChange:E=>o.setTableOptions({bandedColumns:E})}),p=oe(e,{label:t("pptx.table.totalRow"),onChange:E=>o.setTableOptions({lastRow:E})}),d=oe(e,{label:t("pptx.table.firstColumn"),onChange:E=>o.setTableOptions({firstCol:E})}),u=oe(e,{label:t("pptx.table.lastColumn"),onChange:E=>o.setTableOptions({lastCol:E})}),m=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:E=>o.setTableOptions({rtl:E})});i.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el);let g,x=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-table-presets-label");x.textContent=t("pptx.table.stylePresets");let b=E=>{g&&o.setTableOptions({rows:chunk5YHVN3PP_cjs.Fe(g,E)});},v=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-table-presets-grid");v.append(...chunk5YHVN3PP_cjs.Ee.map(E=>{let L=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-table-preset-swatch");L.type="button",L.title=E.label,L.setAttribute("aria-label",E.label);let M=chunkIQ7MDPEN_cjs.w(e,"span");M.style.background=E.headerBg;let D=chunkIQ7MDPEN_cjs.w(e,"span");D.style.background=E.bandBg;let I=chunkIQ7MDPEN_cjs.w(e,"span");return I.style.borderTopColor=E.borderColor,L.append(M,D,I),L.addEventListener("click",()=>b(E)),L})),i.append(x,v);let f=re(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});i.appendChild(f.el);let S=e.createElement("input");S.placeholder=t("pptx.table.styleId"),S.addEventListener("change",()=>o.setTableOptions({tableStyleId:S.value}));let y=e.createElement("input");y.type="color",y.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:y.value})),y.addEventListener("change",()=>o.pushRecentColor(y.value));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{borderColor:h.value})),h.addEventListener("change",()=>o.pushRecentColor(h.value)),i.append(S,y,h);let C=r?yE(e,t,r):void 0;C&&i.appendChild(C.el);let w=CE(e,t,o),A=SE(e,t,o),P=wE(e,t,o);i.append(w.el,A.el,P.el);let k=[s,a,l,p,d,u,m],T=[f];return {el:i,update(E){i.hidden=!E.hasSelection||!E.isTable,g=E.tableElement?.tableData;for(let L of v.children)L.disabled=!E.isTable;s.setValue(E.tableHeaderRow),a.setValue(E.tableBandedRows),l.setValue(E.tableBandedColumns),p.setValue(E.tableLastRow),d.setValue(E.tableFirstCol),u.setValue(E.tableLastCol),m.setValue(E.tableRtl),f.setValue(E.tableCellPadding),S.value=E.tableStyleId,y.value=E.tableCellBackground,h.value=E.tableCellBorder,w.update(E),A.update(E),P.update(E);for(let L of k)L.setDisabled(!E.isTable);S.disabled=!E.isTable,y.disabled=!E.isTable,h.disabled=!E.isTable,C?.update(E.isTable?E.tableStyleId:void 0,E.isTable);for(let L of T)L.setDisabled(!E.isTable);}}}var PE=12700;function ws(e){return e?Math.round(e/PE):0}function Nr(e){return Math.round(e*PE)}function Es(e,t,n){return Math.max(t,Math.min(n,e))}function TE(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-text3d-bevel"),s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-text3d-bevel-label");s.textContent=n;let a=he(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunk5YHVN3PP_cjs._n.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),l=re(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Nr(Es(d,0,50))})}),p=re(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Nr(Es(d,0,50))})});return i.append(s,a.el,l.el,p.el),{el:i,update(d,u){a.setValue(d?.[r.type]??"none"),l.setValue(ws(d?.[r.width])),p.setValue(ws(d?.[r.height])),a.setDisabled(u),l.setDisabled(u),p.setDisabled(u);}}}function AE(e,t,n,o){let r=n(t("pptx.text3d.title")),i,s=v=>{i={...i,...v},o.setTextStyle({text3d:i});},a=oe(e,{label:t("pptx.text3d.extrusion"),onChange:v=>{v?s({extrusionHeight:Nr(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-text3d-options"),p=re(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:v=>s({extrusionHeight:Nr(Es(v,0,100))})}),d=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field pptxv-text3d-color"),u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");u.textContent=t("pptx.text3d.extrusionColor");let m=e.createElement("input");m.type="color",m.setAttribute("aria-label",t("pptx.text3d.extrusionColor")),m.addEventListener("change",()=>{s({extrusionColor:m.value}),o.pushRecentColor(m.value);}),d.append(u,m);let g=TE(e,t,t("pptx.text3d.bevelTop"),s,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),x=TE(e,t,t("pptx.text3d.bevelBottom"),s,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),b=he(e,{label:t("pptx.text3d.material"),options:chunk5YHVN3PP_cjs.$n.map(({value:v,label:f})=>({value:v||"",label:f})),onChange:v=>s({presetMaterial:v||void 0})});return l.append(p.el,d,g.el,x.el,b.el),r.append(a.el,l),{el:r,update(v){r.hidden=!v.canText,i=v.textStyle?.text3d;let f=!!(i?.extrusionHeight&&i.extrusionHeight>0);a.setValue(f),a.setDisabled(!v.canText),l.hidden=!f,p.setValue(ws(i?.extrusionHeight)),p.setDisabled(!f),m.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",m.disabled=!f,g.update(i,!f),x.update(i,!f),b.setValue(i?.presetMaterial??""),b.setDisabled(!f);}}}function kE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=T=>n.setTextStyle(T,r?.selectedTextRange),s=T=>n.setTextStyle(T),a=(T,E)=>{let L=e.createElement("label");L.textContent=T,E.setAttribute("aria-label",T),L.appendChild(E),o.appendChild(L);},l=(T,E,L=0,M=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(L),D.addEventListener("change",()=>(M?s:i)({[E]:Number(D.value)})),a(T,D),D},p=(T,E)=>{let L=e.createElement("input");return L.type="color",L.addEventListener("input",()=>i({[E]:L.value})),L.addEventListener("change",()=>n.pushRecentColor(L.value)),a(T,L),L},d=(T,E)=>{let L=me(e);return L.addEventListener("change",()=>i({[E]:L.checked})),a(T,L),L},u=l(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let m=l(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),g=p(t("pptx.textEffects.outline"),"textOutlineColor"),x=l(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),b=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=p(t("pptx.textEffects.shadowColor"),"textShadowColor"),f=l(t("pptx.textEffects.blur"),"textShadowBlur"),S=p(t("pptx.textEffects.glowColor"),"textGlowColor"),y=l(t("pptx.textEffects.glow"),"textGlowRadius"),h=d(t("pptx.textEffects.reflection"),"textReflection"),C=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),w=p(t("pptx.text.highlightColor"),"highlightColor"),A=Q(e);for(let T of chunk5YHVN3PP_cjs.Yn){let E=e.createElement("option");E.value=T.value,E.textContent=T.label,A.appendChild(E);}A.addEventListener("change",()=>s({textWarpPreset:A.value==="textNoShape"?void 0:A.value})),a(t("pptx.textEffects.transform"),A);let P=l(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),k=Array.from(o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox"));return {el:o,update(T){r=T,o.hidden=!T.canText;let E=T.textStyle??{};u.value=String(E.columnCount??1),m.value=String(E.columnSpacing??0),g.value=E.textOutlineColor??"#000000",x.value=String(E.textOutlineWidth??0),b.checked=!!E.textShadowOpacity,v.value=E.textShadowColor??"#000000",f.value=String(E.textShadowBlur??4),S.value=E.textGlowColor??"#ffff00",y.value=String(E.textGlowRadius??0),h.checked=!!E.textReflection,C.checked=!!E.strikethrough,w.value=E.highlightColor??"#ffff00",A.value=E.textWarpPreset??"textNoShape",P.value=String(E.textWarpAdj??5e4);for(let L of k)L.disabled=!T.canText;}}}function IE(e,t,n,o){let r=n(t("pptx.inspector.text")),i=e.createElement("div");i.className="pptxv-inspector-row";let s=e.createElement("span");s.className="pptxv-inspector-row-label",s.textContent=t("pptx.textPanel.color");let a=He(e,{label:t("pptx.textPanel.color"),onInput:T=>o.setTextStyle({color:T,colorRef:void 0}),onCommit:o.pushRecentColor},"#000000");i.append(s,a.el),r.appendChild(i);let l=Ie(e,t,T=>o.setTextStyle({color:T.hex,colorRef:T.ref}));r.appendChild(l.el);let p=Rt(e,t,T=>{o.setTextStyle({color:T,colorRef:void 0}),o.pushRecentColor(T);});r.appendChild(p.el);let d=he(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(d.el);let u=oe(e,{label:t("pptx.textAdvanced.wrapText"),onChange:T=>o.setTextWrap(T?"square":"none")});r.appendChild(u.el);let m=he(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(m.el);let g=(T,E,L)=>re(e,{label:T,min:L,onCommit:M=>o.setTextAdvanced({[E]:M})}),x=g(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),b=g(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),v=g(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),f=g(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),S=g(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),y=g(t("pptx.textAdvanced.indent"),"paragraphIndent"),h=g(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),C=he(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(T=>({value:T,label:t(`pptx.textAdvanced.direction.${T}`)})),onChange:T=>o.setTextAdvanced({textDirection:T})}),w=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:T=>o.setTextAdvanced({rtl:T})}),A=[x,b,v,f,S,y,h];r.append(...A.map(({el:T})=>T),C.el,w.el);let P=kE(e,t,o);r.appendChild(P.el);let k=[a,d,u,m,...A,C,w];return {el:r,update(T){r.hidden=!T.hasSelection||!T.canText,a.setValue(T.textStyle?.color),l.setThemeColorMap(T.themeColorMap),l.setSelected(T.textStyle?.colorRef,T.textStyle?.color),l.setDisabled(!T.canText),p.setColors(T.recentColors??[]),p.setDisabled(!T.canText),d.setValue(T.vAlign),u.setValue(T.textWrap==="square"),m.setValue(T.autoFitMode),x.setValue(T.characterSpacing),b.setValue(T.lineSpacing),v.setValue(T.lineSpacingExactPt??0),f.setValue(T.paragraphSpacingBefore),S.setValue(T.paragraphSpacingAfter),y.setValue(T.paragraphIndent),h.setValue(T.paragraphMarginLeft),C.setValue(T.textDirection),w.setValue(T.textRtl),P.update(T);for(let E of k)E.setDisabled(!T.canText);}}}function _r(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,s=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let R of s){let O=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-inspector-tab");O.type="button",O.setAttribute("role","tab"),O.textContent=R.label,O.addEventListener("click",()=>m(R.id)),r.appendChild(O),i.set(R.id,O);}let a=Zw(e,t,R=>n.selectElement(R));a.el.classList.add("pptxv-inspector-body"),o.appendChild(a.el);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-body");o.appendChild(l);let p=Vw(e,t,n);p.el.classList.add("pptxv-inspector-body"),o.appendChild(p.el);let d=ww(e,t,n);o.appendChild(d.el);let u="properties",m=R=>{u=R;for(let[O,B]of i)B.classList.toggle("is-active",O===R),B.setAttribute("aria-selected",String(O===R));a.el.hidden=R!=="elements",l.hidden=R!=="properties",p.el.hidden=R!=="comments";},g=Qw(e,t,n);l.appendChild(g.el);let x=R=>{let O=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-inspector-section"),B=chunkIQ7MDPEN_cjs.w(e,"h4","pptxv-inspector-section-title");return B.textContent=R,O.appendChild(B),l.appendChild(O),O},b=gE(e,t,x,n.setGeometry,n.toggleElementLock),v=nE(e,t,x),f=xE(e,t,x,n),S=oE(e,t,x,n),y=bE(e,t,x,n),h=IE(e,t,x,n),C=AE(e,t,x,n),w=rE(e,t,x,n),A=sw(e,t,x,n),P=vE(e,t,n);l.appendChild(P.el);let T=EE(e,t,x,n,{getTableStyleMap:()=>n.getTableStyleMap(),getThemeColorMap:()=>n.getThemeColorMap(),onStyleMapChange:R=>n.updateTableStyleMap(R),onDeleteStyle:R=>n.deleteTableStyle(R),onAssignStyle:R=>n.setTableOptions(chunk5YHVN3PP_cjs.wp(R))}),E=fE(e,t,x,n),L=pw(e,t,x,n),M=Ow(e,t,x,n),D=lE(e,t,x,n),I=[b,v,f,S,y,h,C,w,A,P,T,E,L,M,D];return m(u),{el:o,update(R){g.setVisible(!R.hasSelection);for(let O of I)O.update(R);},updateDeck(R){L.setSlideCount(R.slideCount),L.setCustomShows(R.customShows),a.update(R),p.update(R),g.update(R),d.update({editable:R.editable,selectedElementId:R.selectedElementId,elements:R.elements,animations:R.activeSlide?.animations??[],animationTimelineAnchors:R.activeSlide?.animationTimelineAnchors??[]});},setEditable(R){o.hidden=!R,P.setEditable(R),M.setEditable(R);}}}var LE=128,HI=[1,2,3,4,6,9],FI={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 Ts(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-master-card"),s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-card-label");s.textContent=t("pptx.master.notesMasterBackground");let a=chunkIQ7MDPEN_cjs.w(e,"input","pptxv-master-background");a.type="color",a.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",a.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),a.addEventListener("input",()=>r(a.value)),i.append(s,a),n.appendChild(i);}function ME(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-master-card"),s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-card-label");if(s.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(s),o.length===0){let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-empty");a.textContent=t("pptx.master.noPlaceholders"),i.appendChild(a);}for(let a of o){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-placeholder"),p=chunkIQ7MDPEN_cjs.w(e,"span",`pptxv-master-dot is-${r}`);l.append(p,e.createTextNode(t(FI[a.type]??a.type))),i.appendChild(l);}n.appendChild(i);}function VI(e,t){return chunk5YHVN3PP_cjs.fp({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function BI(e,t,n,o,r){if(o.length===0)return;let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-crud");for(let s of o){let a=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-master-crud-btn");a.type="button",a.dataset.testid=`pptx-master-crud-${s.id}`,a.textContent=t(s.labelKey),a.disabled=!s.enabled,s.disabledReasonKey&&(a.title=t(s.disabledReasonKey)),a.addEventListener("click",()=>r(s.id)),i.appendChild(a);}n.appendChild(i);}function zI(e,t,n,o){o.editable&&(Ts(e,t,n,chunk5YHVN3PP_cjs.ip({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange),BI(e,t,n,o.crudActions,o.onCrudAction));let r=LE/Math.max(o.canvasSize.width,1);for(let[i,s]of o.masters.entries()){let a=[{layoutIndex:null,label:s.name||t("pptx.master.master")},...s.layouts?.map((l,p)=>({layoutIndex:p,label:l.name||t("pptx.master.layout")}))??[]];for(let l of a){let p=chunkIQ7MDPEN_cjs.w(e,"button",`pptxv-master-thumb${l.layoutIndex===null?"":" is-layout"}`);p.type="button",p.setAttribute("aria-label",l.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===l.layoutIndex;p.classList.toggle("is-active",d),d&&p.setAttribute("aria-current","page");let u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-master-thumb-name");u.textContent=l.label;let m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-master-thumb-frame");m.style.width=`${LE}px`,m.style.height=`${Math.round(o.canvasSize.height*r)}px`,m.appendChild(o.renderStage(VI(s,l.layoutIndex),r)),p.append(u,m),p.addEventListener("click",()=>o.onSelect(i,l.layoutIndex)),n.appendChild(p);}}}function Ps(e,t){let n=chunkIQ7MDPEN_cjs.w(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=chunkIQ7MDPEN_cjs.w(e,"header","pptxv-master-header"),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-master-collapse");s.type="button",s.textContent="\u2039",s.title=t("pptx.masterView.collapse"),s.setAttribute("aria-label",t("pptx.masterView.collapse")),s.addEventListener("click",o.onCollapse),r.append(i,s);let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-tabs");a.setAttribute("role","tablist");for(let[p,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===p)),u.classList.toggle("is-active",o.tab===p),u.addEventListener("click",()=>o.onTabChange(p)),a.appendChild(u);}let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-body");if(l.setAttribute("role","tabpanel"),o.tab==="slides")zI(e,t,l,o);else if(o.tab==="notes")o.notesMasterPresent?(Ts(e,t,l,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),ME(e,t,l,o.notesPlaceholders??[],"notes")):(l.textContent=t("pptx.master.noNotesMaster"),l.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)l.textContent=t("pptx.master.noHandoutMaster"),l.classList.add("pptxv-master-empty");else {let p=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-master-card"),d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-counts");for(let m of HI){let g=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-master-count");g.type="button",g.textContent=String(m),g.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===m)),g.classList.toggle("is-active",o.handoutSlidesPerPage===m),g.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(m)),u.appendChild(g);}p.append(d,u),l.appendChild(p),Ts(e,t,l,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),ME(e,t,l,o.handoutPlaceholders??[],"handout");}n.append(r,a,l);},setVisible(o){n.hidden=!o;}}}var DE=148;function As(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-actions"),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-sheet-host");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true");let l=e.createElement("button");l.type="button",l.className="pptxv-mobile-sheet-backdrop",l.setAttribute("aria-label",t("pptx.settings.close"));let p=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-mobile-sheet"),d=chunkIQ7MDPEN_cjs.w(e,"header","pptxv-mobile-sheet-header"),u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-sheet-handle"),m=e.createElement("strong");d.append(u,m);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-sheet-body");p.append(d,g),a.append(l,p),a.hidden=true,s.appendChild(a);let x=null,b=0,v=[],f=[],S=true,y=false,h=null,C=960,w=540,A=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(A,r);let P=()=>{r&&A?.parentNode&&A.parentNode.insertBefore(r,A.nextSibling);},k=()=>{x=null,a.hidden=true,p.style.transform="",P();for(let O of M.querySelectorAll("button"))O.setAttribute("aria-pressed","false");};l.addEventListener("click",k);let T=chunk5YHVN3PP_cjs.sn((O,B)=>{p.style.transform=O>0?`translateY(${O}px)`:"",p.style.transition=B?"none":"";},k),E=O=>({clientY:O.clientY,pointerId:O.pointerId,currentTarget:d});d.addEventListener("pointerdown",O=>T.pointerDown(E(O))),d.addEventListener("pointermove",O=>T.pointerMove(E(O))),d.addEventListener("pointerup",O=>T.pointerUp(E(O))),d.addEventListener("pointercancel",O=>T.cancel(E(O)));let L=O=>{if(g.replaceChildren(),m.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),a.setAttribute("aria-label",m.textContent),O==="slides"){let B=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-slide-list"),F=DE/Math.max(C,1);for(let V=0;V<v.length;V+=1){let _=e.createElement("button");_.type="button";let N=chunk5YHVN3PP_cjs.yt(v[V],V);_.setAttribute("aria-label",N),_.classList.toggle("is-active",V===b),V===b&&_.setAttribute("aria-current","true");let W=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-slide-num");if(W.textContent=String(V+1),_.appendChild(W),h){let X=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-slide-frame",{width:`${DE}px`,height:`${Math.round(w*F)}px`});X.appendChild(h(v[V],F)),_.appendChild(X);}else {let X=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-slide-title");X.textContent=N,_.appendChild(X);}_.addEventListener("click",()=>{o(V),k();}),B.appendChild(_);}g.appendChild(B);}else if(O==="insert"){let B=[[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[F,V]of B){let _=e.createElement("button");_.type="button",_.textContent=F,_.addEventListener("click",V),g.appendChild(_);}}else if(O==="inspector"&&r)g.appendChild(r);else if(O==="comments"){f.length===0&&(g.textContent=t("pptx.comments.noneOnSlide"));for(let _ of f){let N=chunkIQ7MDPEN_cjs.w(e,"article","pptxv-mobile-comment"),W=e.createElement("textarea");W.value=_.text,W.setAttribute("aria-label",t("pptx.comments.edit"));let X=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-comment-actions"),ie=e.createElement("button");ie.type="button",ie.textContent=t("pptx.comments.save"),ie.addEventListener("click",()=>n.edit.comments.editComment(_.id,W.value));let G=e.createElement("button");G.type="button",G.textContent=_.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),G.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(_.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(_.id)),X.append(ie,G,K),N.append(W,X),g.appendChild(N);}let B=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-comment-add"),F=e.createElement("textarea");F.placeholder=t("pptx.comments.addPlaceholder"),F.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let V=e.createElement("button");V.type="button",V.textContent=t("pptx.comments.addComment"),V.addEventListener("click",()=>{n.edit.comments.addComment(F.value)&&(F.value="");}),B.append(F,V),g.appendChild(B);}else {let B=[[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[F,V,_]of B){if(_&&chunk5YHVN3PP_cjs.cq(_,i))continue;let N=e.createElement("button");N.type="button",N.textContent=F,N.addEventListener("click",V),g.appendChild(N);}}},M=e.createElement("nav");M.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=O=>{if(x=chunk5YHVN3PP_cjs.Pm(x,O),!x){k();return}L(x),a.hidden=false;for(let B of M.querySelectorAll("button"))B.setAttribute("aria-pressed",String(B.dataset.mobileAction===x));},I={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let O of chunk5YHVN3PP_cjs.Qm({slideCount:0})){let B=O.key;if(B==="notes"&&chunk5YHVN3PP_cjs.cq("notes",i))continue;let F=e.createElement("button");F.type="button",F.dataset.mobileAction=B,B==="notes"&&F.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),F.appendChild(chunkIQ7MDPEN_cjs.K(e,I[B]));let V=chunkIQ7MDPEN_cjs.w(e,"span");V.textContent=t(B==="inspector"?"pptx.field.format":`pptx.${B==="slides"?"sections.slides":B==="comments"?"toolbar.comments":B==="insert"?"mobileBar.insert":"notes.title"}`),F.appendChild(V),F.addEventListener("click",()=>{if(B==="notes"){n.nav.toggleNotes();return}if(B==="insert"){n.insert.insert("text");return}D(B);}),M.appendChild(F);}s.appendChild(M);let R=()=>{let O=chunk5YHVN3PP_cjs.Qm({slideCount:v.length});for(let B of O){let F=M.querySelector(`button[data-mobile-action='${B.key}']`);if(!F)continue;let V=B.key==="insert"||B.key==="inspector"||B.key==="comments";F.disabled=B.disabled||V&&!S||B.key==="inspector"&&!r,F.setAttribute("aria-pressed",String(B.key==="notes"?y:B.key===x));}};return {el:s,update(O,B,F){b=O,v=B,f=F,x&&L(x),R();},setThumbnailRenderer(O,B,F){h=O,C=B,w=F,x==="slides"&&L(x);},toggle:D,close:k,setEditable(O){S=O,!S&&x&&["insert","inspector","comments"].includes(x)&&k(),R();},setNotesExpanded(O){y=O,R();}}}function ks(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=H(e,{label:t("pptx.mobileToolbar.menu"),icon:"menu",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),s=chunk5YHVN3PP_cjs.cq("undo",o)?null:H(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),a=chunk5YHVN3PP_cjs.cq("redo",o)?null:H(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-toolbar-spacer"),p=H(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunk5YHVN3PP_cjs.cq("fullscreen",o)?null:H(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-toolbar-ai"),m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...s?[s.btn]:[],...a?[a.btn]:[],l,u,p.btn,...d?[d.btn]:[],m),{el:r,collaborationHost:m,aiHost:u,setEditState({editable:g,canUndo:x,canRedo:b}){for(let v of [i.btn,s?.btn,a?.btn])v&&(v.hidden=!g);m.hidden=!g,u.hidden=!g,s?.setDisabled(!x),a?.setDisabled(!b);}}}function Is(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-notes"),i=chunkIQ7MDPEN_cjs.w(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 s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-notes-title");s.textContent=t("pptx.notes.title"),i.appendChild(s);let a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-notes-chevron");a.setAttribute("aria-hidden","true"),i.appendChild(a);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-notes-body");l.id="slide-notes-content",r.appendChild(l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-notes-toolbar");l.appendChild(p);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",p.appendChild(d);let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-notes-rich-editor");u.contentEditable="true",u.setAttribute("role","textbox"),u.setAttribute("aria-multiline","true"),u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),l.appendChild(u);let m=e.createElement("textarea");m.className="pptxv-notes-textarea",m.name="slide-notes",m.spellcheck=true,m.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),l.appendChild(m);let g=false,x=null,b=false,v=chunk5YHVN3PP_cjs.tg(),f=[],S,y,h=k=>{v=k,u.hidden=!v,m.hidden=v,p.hidden=!b,d.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(v));},C=()=>{if(!b)return;let k=chunk5YHVN3PP_cjs.ug(u);f=k.segments,o(k.text,k.segments);},w=(k,T,E)=>{let L=e.createElement("button");L.type="button",L.className="pptxv-notes-tool",L.textContent=k,L.title=T,L.setAttribute("aria-label",T),L.addEventListener("mousedown",M=>M.preventDefault()),L.addEventListener("click",()=>{u.focus(),E(),C();}),p.insertBefore(L,d);};w("B",t("pptx.notes.bold"),()=>chunk5YHVN3PP_cjs.wg("bold")),w("I",t("pptx.notes.italic"),()=>chunk5YHVN3PP_cjs.wg("italic")),w("U",t("pptx.notes.underline"),()=>chunk5YHVN3PP_cjs.wg("underline")),w("S",t("pptx.notes.strikethrough"),()=>chunk5YHVN3PP_cjs.wg("strikeThrough")),w("\u2022",t("pptx.notes.bulletList"),()=>{f=chunk5YHVN3PP_cjs.vg(u,f,"bullet").segments,u.innerHTML=chunk5YHVN3PP_cjs.qg(f);}),w("1.",t("pptx.notes.numberedList"),()=>{f=chunk5YHVN3PP_cjs.vg(u,f,"numbered").segments,u.innerHTML=chunk5YHVN3PP_cjs.qg(f);}),w("\u2192",t("pptx.notes.indent"),()=>{f=chunk5YHVN3PP_cjs.vg(u,f,"indent").segments,u.innerHTML=chunk5YHVN3PP_cjs.qg(f);}),w("\u2190",t("pptx.notes.outdent"),()=>{f=chunk5YHVN3PP_cjs.vg(u,f,"outdent").segments,u.innerHTML=chunk5YHVN3PP_cjs.qg(f);}),w("\u2197",t("pptx.notes.insertLink"),()=>{let k=e.getSelection()?.toString()??"",T=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!T)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),k)??k;chunk5YHVN3PP_cjs.yg(chunk5YHVN3PP_cjs.xg(T),E);}),w("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!S)return;let k=chunk5YHVN3PP_cjs.zg([S],L=>t("pptx.notes.slideN",{n:L}),y),T=e.createElement("iframe");T.setAttribute("aria-hidden","true"),T.setAttribute("sandbox","allow-same-origin"),T.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(T);let E=T.contentWindow?.document;if(!E){T.remove();return}E.open(),E.write(k),E.close(),setTimeout(()=>{T.contentWindow?.focus(),T.contentWindow?.print(),setTimeout(()=>T.remove(),1e3);},200);}),d.addEventListener("click",()=>{v?(C(),m.value=chunk5YHVN3PP_cjs.pg(f)):(f=chunk5YHVN3PP_cjs.og(m.value),u.innerHTML=chunk5YHVN3PP_cjs.qg(f)),h(!v);});let A=()=>{b&&o(m.value);};m.addEventListener("change",A),m.addEventListener("blur",A),u.addEventListener("blur",C);let P=()=>{r.dataset.collapsed=g?"false":"true",i.setAttribute("aria-expanded",String(g)),l.hidden=!g,a.textContent=g?"\u25BE":"\u25B8";};return P(),h(v),{el:r,update({slide:k,editable:T,notesStyle:E}){b=T,S=k,y=E;let L=k!==void 0;m.disabled=!L,m.readOnly=!b,u.contentEditable=String(b&&L),p.hidden=!b,m.placeholder=t(L?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let M=k?.id??null;M!==x&&(x=M,f=chunk5YHVN3PP_cjs.sg(k,E),m.value=chunk5YHVN3PP_cjs.pg(f),u.innerHTML=chunk5YHVN3PP_cjs.qg(f));},setExpanded(k){g=k,P();}}}function RE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-present-swatch");s.type="button",s.dataset.pptxPresentSwatch=i,s.style.backgroundColor=i;let a=t(n.swatchLabelKey,{color:i});return s.title=a,s.setAttribute("aria-label",a),s.addEventListener("click",l=>{l.stopPropagation(),n.onPick(i);}),o.appendChild(s),{color:i,swatch:s}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let s of r){let a=s.color===i;s.swatch.classList.toggle("is-selected",a),s.swatch.setAttribute("aria-pressed",String(a));}}}}function je(e,t,n){let o=H(e,{label:t(n.labelKey),icon:n.icon,className:`pptxv-present-btn${n.className?` ${n.className}`:""}`,onClick:n.onClick});return o.btn.dataset.pptxPresentControl=n.id,o}function NI(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-group"),r=je(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let s=je(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),a=RE(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,s.btn,a.el),{el:o,toggle:r,palette:a,bar:i}}function OE(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-toolbar-wrap");for(let[P,k]of Object.entries(chunk5YHVN3PP_cjs.Ok()))r.style.setProperty(P,k);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-toolbar");i.setAttribute("data-pptx-present-toolbar",""),i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria")),r.appendChild(i);let s=P=>{let k=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-divider");return k.dataset.pptxPresentControl=P,k},a=je(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-present-counter");l.dataset.pptxPresentControl="counter";let p=je(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-timer");d.dataset.pptxPresentControl="timer",d.title=t("pptx.presenter.elapsed"),d.setAttribute("aria-label",t("pptx.presenter.elapsed"));let u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-present-elapsed");d.append(chunkIQ7MDPEN_cjs.K(e,"timer"),u);let m=je(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),g=null,x=()=>{f.palette.setOpen(g==="pen"),S.palette.setOpen(g==="highlighter");},b=()=>{g=null,x();},v=P=>NI(e,t,{...P,onSelect:()=>{b(),n.setTool(P.id);},onPick:k=>{b(),n.setColor(k),n.setTool(P.id),o(P.id,k);},onCaret:()=>{g=g===P.id?null:P.id,x();}}),f=v({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunk5YHVN3PP_cjs.Kk,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),S=v({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunk5YHVN3PP_cjs.Lk,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),y=je(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{b(),n.setTool("eraser");}}),h=je(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{b(),n.toggleBlackboard();}}),C=je(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),w=je(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),A=je(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(a.btn,l,p.btn,s("divider-navigation"),d,s("divider-timer"),m.btn,f.el,S.el,y.btn,h.btn,C.btn,s("divider-tools"),w.btn,A.btn);for(let P of ["pointerdown","click"])i.addEventListener(P,k=>k.stopPropagation());return {wrap:r,bar:i,previous:a,counter:l,next:p,elapsedText:u,laser:m,pen:f,highlighter:S,eraser:y,blackboard:h,clear:C,presenterView:w,end:A,closePalettes:b}}function Ls(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunk5YHVN3PP_cjs.Kk[0]??"#ff0000",s=chunk5YHVN3PP_cjs.Lk[0]??"#ffff00",a=OE(e,t,o,(A,P)=>{A==="pen"?i=P:s=P,d();}),{wrap:l,bar:p}=a;function d(){a.counter.textContent=chunk5YHVN3PP_cjs.Nk(r.current,r.total),a.previous.setDisabled(r.current<=0),a.next.setDisabled(r.current>=r.total-1),a.laser.setActive(r.tool==="laser"),a.pen.toggle.setActive(r.tool==="pen"),a.highlighter.toggle.setActive(r.tool==="highlighter"),a.eraser.setActive(r.tool==="eraser"),a.blackboard.setActive(chunk5YHVN3PP_cjs.Rk(r.blackout,r.tool)),a.clear.setDisabled(!r.hasAnnotations),a.presenterView.setActive(r.presenterViewActive),a.pen.bar.style.backgroundColor=i,a.highlighter.bar.style.backgroundColor=s,a.pen.palette.setValue(i),a.highlighter.palette.setValue(s);}let u=null,m=false,g=false,x=0,b=null,v=A=>{m=A,l.style.opacity=A?"1":"0",l.style.pointerEvents=A?"auto":"none";},f=()=>{u!==null&&(window.clearTimeout(u),u=null);},S=()=>{f(),u=window.setTimeout(()=>{g||v(false);},chunk5YHVN3PP_cjs.Jk);},y=A=>{let P=n.getBoundingClientRect();if(chunk5YHVN3PP_cjs.Mk(A.clientY,P.height,P.top)){v(true),S();return}v(true),S();},h=A=>{A.target instanceof Node&&!p.contains(A.target)&&a.closePalettes();};l.addEventListener("mouseenter",()=>{g=true,f(),v(true);}),l.addEventListener("mouseleave",()=>{g=false,S();});let C=()=>{a.elapsedText.textContent=chunk5YHVN3PP_cjs.fk(x===0?0:Date.now()-x);},w=()=>{e.removeEventListener("mousemove",y),e.removeEventListener("mousedown",h),f(),b!==null&&(window.clearInterval(b),b=null),x=0,g=false,a.closePalettes(),C(),v(false);};return v(false),C(),d(),{el:l,update(A){Object.assign(r,A),d();},setPresenting(A){if(!A){w();return}x=Date.now(),C(),b??=window.setInterval(C,1e3),e.addEventListener("mousemove",y),e.addEventListener("mousedown",h),v(true),S();},toggleVisible(){if(m){f(),v(false);return}v(true),S();},dispose(){w(),l.remove();}}}function Ms(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=H(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),s=!chunk5YHVN3PP_cjs.cq("navigation",o),a=s?H(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,l=s?H(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-presentation-touch-counter");p.setAttribute("aria-live","polite");for(let d of [i.btn,a?.btn,l?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...a?[a.btn]:[],...l?[l.btn]:[],p),{el:r,update(d,u){let m=chunk5YHVN3PP_cjs.rn(d,u);a?.setDisabled(m.previousDisabled),l?.setDisabled(m.nextDisabled),p.textContent=m.counterLabel;}}}function Ds(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-protected-view");o.hidden=true,o.setAttribute("role","alert"),o.appendChild(chunkIQ7MDPEN_cjs.K(e,"lock"));let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-protected-view-text"),i=chunkIQ7MDPEN_cjs.w(e,"strong");i.textContent=t("pptx.security.protectedViewTitle"),r.append(i,": ",t("pptx.options.trust.protectedViewInfo"));let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-protected-view-enable");return s.type="button",s.textContent=t("pptx.security.enableEditing"),s.addEventListener("click",n),o.append(r,s),{el:o,setActive(a){o.hidden=!a;}}}function HE(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-readonly-banner");s.dataset.testid="pptx-readonly-banner",s.hidden=true,s.setAttribute("role","alert"),s.appendChild(chunkIQ7MDPEN_cjs.K(e,"lock"));let a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-readonly-banner-text"),l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-readonly-banner-edit");l.type="button",l.dataset.testid="pptx-readonly-edit-anyway",l.textContent=t("pptx.readOnly.editAnyway"),l.addEventListener("click",n);let p=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-readonly-banner-dismiss");p.type="button",p.dataset.testid="pptx-readonly-dismiss",p.setAttribute("aria-label",t("pptx.readOnly.dismiss")),p.appendChild(chunkIQ7MDPEN_cjs.K(e,"close")),p.addEventListener("click",o);let d=chunkIQ7MDPEN_cjs.w(e,"form","pptxv-readonly-banner-password-form");d.dataset.testid="pptx-readonly-password-form",d.hidden=true;let u=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-sr-only");u.textContent=t("pptx.readOnly.passwordLabel"),u.setAttribute("for","pptxv-readonly-password-input");let m=chunkIQ7MDPEN_cjs.w(e,"input","pptxv-readonly-banner-password-input");m.id="pptxv-readonly-password-input",m.type="password",m.dataset.testid="pptx-readonly-password-input",m.placeholder=t("pptx.readOnly.passwordPlaceholder");let g=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-readonly-banner-unlock");g.type="submit",g.dataset.testid="pptx-readonly-unlock",g.textContent=t("pptx.readOnly.unlock");let x=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-readonly-banner-password-cancel");x.type="button",x.dataset.testid="pptx-readonly-password-cancel",x.textContent=t("pptx.common.cancel"),x.addEventListener("click",i);let b=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-readonly-banner-password-error");return b.dataset.testid="pptx-readonly-password-error",b.setAttribute("role","alert"),b.id="pptxv-readonly-password-error",b.hidden=true,d.addEventListener("submit",v=>{v.preventDefault(),r(m.value);}),d.append(u,m,g,x,b),s.append(a,l,p,d),{el:s,update(v,f,S){let y=v!==null&&!f;if(s.hidden=!y,!y||!v)return;s.dataset.kind=v.kind??"",a.textContent=t(v.messageKey);let h=S.promptOpen;if(l.hidden=h,p.hidden=h,d.hidden=!h,!h)return;m.disabled=S.checking,g.disabled=S.checking;let C=S.error!==null;m.setAttribute("aria-invalid",String(C)),m.setAttribute("aria-describedby",C?b.id:""),C||m.removeAttribute("aria-describedby"),b.hidden=!C,C&&(b.textContent=t(S.error==="wrong-password"?"pptx.readOnly.wrongPassword":"pptx.readOnly.unsupportedAlgorithm"));}}}function FE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let s=chunkIQ7MDPEN_cjs.w(e,"header","pptxv-eqdlg-header"),a=chunkIQ7MDPEN_cjs.w(e,"h2");a.textContent=t("pptx.equation.insertTitle");let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-eqdlg-close");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.settings.close")),s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-eqdlg-preview"),d=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-eqdlg-field"),u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-eqdlg-label");u.textContent=t("pptx.equation.latexInput");let m=e.createElement("textarea");m.className="pptxv-eqdlg-input",m.rows=3,m.placeholder="\\frac{a}{b} + \\sqrt{c}",m.spellcheck=false;let g=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-eqdlg-hint");g.textContent=t("pptx.equation.latexHint"),d.append(u,m,g);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-eqdlg-field"),b=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-eqdlg-label");b.textContent=t("pptx.equation.templates");let v=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-eqdlg-grid"),f=[],S=chunk5YHVN3PP_cjs.Hb();for(let[M,D]of chunk5YHVN3PP_cjs.Eb.entries()){let I=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-eqdlg-template");I.type="button",I.title=t(D.i18nKey);let R=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-eqdlg-template-math");R.innerHTML=S[M]??"";let O=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-eqdlg-template-label");O.textContent=t(D.i18nKey),I.append(R,O),I.addEventListener("click",()=>{m.value=D.latex,k(),m.focus();}),v.appendChild(I),f.push(I);}x.append(b,v);let y=()=>{let M=m.value.trim();if(!M)return null;try{let D=chunk5YHVN3PP_cjs.Db(M);return Object.keys(D).length>0?D:null}catch{return null}},h=true,C,w=chunkIQ7MDPEN_cjs.w(e,"footer","pptxv-eqdlg-footer"),A=H(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>E(false)}),P=H(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let M=y();M&&(n(M,C),m.value="",k(),E(false));}});P.btn.classList.add("is-primary"),w.append(A.btn,P.btn),i.append(s,p,d,x,w),o.append(r,i);let k=()=>{let M=chunk5YHVN3PP_cjs.Gb(m.value);M?(p.classList.remove("is-empty"),p.innerHTML=M):(p.classList.add("is-empty"),p.textContent=t("pptx.equation.previewPlaceholder"));let D=m.value;for(let[I,R]of f.entries())R.classList.toggle("is-active",chunk5YHVN3PP_cjs.Eb[I]?.latex===D);P.setDisabled(!h||y()===null);};m.addEventListener("input",k),o.addEventListener("keydown",M=>{M.stopPropagation(),M.key==="Escape"?E(false):M.key==="Enter"&&(M.ctrlKey||M.metaKey)&&(M.preventDefault(),P.btn.click());}),r.addEventListener("click",()=>E(false)),l.addEventListener("click",()=>E(false));let T=false,E=M=>{T=M,o.hidden=!T,T?m.focus():C=void 0;},L=()=>{let M=C!==void 0,D=t(M?"pptx.equation.editTitle":"pptx.equation.insertTitle"),I=t(M?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),a.textContent=D,P.btn.textContent=I,P.btn.title=I,P.btn.setAttribute("aria-label",I);};return k(),{el:o,toggle:()=>{T||(C=void 0,m.value="",L(),k()),E(!T);},setOpen:E,isOpen:()=>T,setEditable(M){h=M,m.disabled=!M,P.setDisabled(!M||y()===null);},openEdit(M,D){C=M,m.value=chunk5YHVN3PP_cjs.Cb(D),L(),k(),E(true);}}}function Rs(e,t,n){let o=chunkIQ7MDPEN_cjs.w(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 s=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-findreplace-checkbox"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),s.append(a,e.createTextNode(t("pptx.findReplace.matchCase")));let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-findreplace-status");l.setAttribute("aria-live","polite");let p=()=>{let f=n.search(r.value,a.checked);l.textContent=f>0?t("pptx.findReplace.matchCount",{current:1,total:f}):t("pptx.findReplace.noMatches");},d=H(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:p}),u=H(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,a.checked),p();}}),m=H(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,a.checked),p();}}),g=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",p),r.addEventListener("keydown",f=>{f.key==="Escape"&&(f.stopPropagation(),v(false));});let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-findreplace-row");x.append(r,i,s,d.btn,u.btn,m.btn,g.btn),o.append(x,l);let b=false,v=f=>{b=f,o.hidden=!b,b&&r.focus();};return {el:o,toggle:()=>v(!b),setOpen:v,isOpen:()=>b,setEditable(f){i.disabled=!f,u.setDisabled(!f),m.setDisabled(!f);}}}function VE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=He(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:g=>n.setSlideBackgroundColor(g),onCommit:g=>n.pushRecentColor?.(g)},"#ffffff"),i=H(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),s=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-format-background-row"),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-format-background-label");l.textContent=t("pptx.slideBackground.colour"),a.append(l,r.el,i.btn,s.btn),o.appendChild(a);let p=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-format-background-hide-row"),d=e.createElement("input");d.type="checkbox",d.addEventListener("change",()=>{n.setHideBackgroundGraphics(d.checked);}),p.append(d,e.createTextNode(t("pptx.slideBackground.hideBackgroundGraphics"))),o.appendChild(p);let u=false,m=g=>{u=g,o.hidden=!u;};return {el:o,toggle:()=>m(!u),setOpen:m,isOpen:()=>u,setEditable(g){r.setDisabled(!g),i.setDisabled(!g);}}}function Fo(e,t,n){if(!t)return n;let o=e(t);return o&&o!==t?o:n}function Os(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-gallery-tile");i.type="button",i.setAttribute(chunk5YHVN3PP_cjs.ur,n.id),i.setAttribute("aria-pressed",String(n.applied)),i.classList.toggle("is-applied",n.applied);let s=chunk5YHVN3PP_cjs.yr(n,t);return i.title=s,i.setAttribute("aria-label",s),i.innerHTML=n.previewSvg,i.disabled=o,i.addEventListener("mousedown",a=>a.preventDefault()),i.addEventListener("click",()=>r(n)),i}function _I(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-gallery-section");if(i.dataset.gallerySection=n.id,n.titleKey||n.title){let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-gallery-heading");a.textContent=Fo(t,n.titleKey,n.title??""),i.appendChild(a);}let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-gallery-grid");s.style.gridTemplateColumns=`repeat(${Math.max(1,n.columns)}, max-content)`;for(let a of n.items)s.appendChild(Os(e,t,a,o,r));return i.appendChild(s),i}function BE(e,t,n,o,r,i){n.replaceChildren(...o.sections.filter(s=>s.items.length>0).map(s=>_I(e,t,s,r,i)));}var GI=4;function Ye(e,t,n){let o=()=>{let{top:r,left:i,right:s}=chunk5YHVN3PP_cjs.bl(t.getBoundingClientRect(),{alignRight:n?.alignRight});e.style.position="fixed",e.style.margin="0",e.style.top=`${r+GI}px`,e.style.left=i===null?"auto":`${i}px`,e.style.right=s===null?"auto":`${s}px`;};return o(),window.addEventListener("resize",o),document.addEventListener("scroll",o,true),{update:o,destroy(){window.removeEventListener("resize",o),document.removeEventListener("scroll",o,true);}}}var UI={shapeStyles:"paintbrush",shapeEffects:"sparkles",wordArtStyles:"font-color",pictureStyles:"image",bullets:"bullet-list",numbering:"numbered-list",tableStyles:"table",chartStyles:"chart",chartColors:"paintbrush",chartQuickLayout:"layout",smartArtStyles:"smart-art",smartArtColors:"paintbrush",themeColors:"paintbrush",themeFonts:"font-color"};function st(e,t,n,o,r={}){let i=n.mode==="inline",s=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-gallery${i?" pptxv-gallery-inline":""}`);r.chevronOnly||s.setAttribute(chunk5YHVN3PP_cjs.Wq,n.control);let a=i?chunkIQ7MDPEN_cjs.w(e,"div","pptxv-gallery-strip"):null,l=chunkIQ7MDPEN_cjs.w(e,"button",i?"pptxv-gallery-more":`pptxv-dropdown-trigger pptxv-gallery-trigger${r.chevronOnly?" pptxv-gallery-chevron":""}`);l.type="button",l.setAttribute(chunk5YHVN3PP_cjs.sr,n.gallery),l.setAttribute("aria-haspopup","true"),l.setAttribute("aria-expanded","false");let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-dropdown-text");!i&&!r.chevronOnly&&l.append(chunkIQ7MDPEN_cjs.K(e,UI[n.gallery]),p),l.appendChild(chunkIQ7MDPEN_cjs.K(e,"chevron-down"));let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-gallery-popup");d.setAttribute(chunk5YHVN3PP_cjs.tr,n.gallery),d.setAttribute("role","dialog"),d.hidden=true,a&&s.appendChild(a),s.append(l);let u=null,m=true,g=null,x=true,b=h=>{s.contains(h.target)||f(false);};function v(){x&&u&&(BE(e,t,d,u,m,S),x=false);}function f(h){let C=h&&!m;C&&v(),d.hidden=!C,C?s.append(d):d.remove(),l.setAttribute("aria-expanded",String(C)),l.classList.toggle("is-active",C),g?.destroy(),g=C?Ye(d,l):null,e.removeEventListener("pointerdown",b),C&&e.addEventListener("pointerdown",b);}let S=h=>{f(false),o.pick(n.gallery,h.id),chunk5YHVN3PP_cjs.Gl(s.closest(".pptxv"));};l.addEventListener("mousedown",h=>h.preventDefault()),l.addEventListener("click",h=>{h.stopPropagation(),f(d.hidden===true);}),s.addEventListener("keydown",h=>{h.key==="Escape"&&d.hidden!==true&&(h.stopPropagation(),f(false),l.focus());});let y={el:s,trigger:l,popup:d,isOpen:()=>d.hidden!==true,close:()=>f(false),refresh(h,C){u=chunk5YHVN3PP_cjs.lr(n.gallery,h),m=!C||u.disabled||!chunk5YHVN3PP_cjs.xr(u);let w=Fo(t,u.labelKey,u.label);p.textContent=w;let A=i?t("pptx.gallery.more",{name:w}):w;l.title=A,l.setAttribute("aria-label",A),l.disabled=m,s.classList.toggle("is-disabled",m),a?.replaceChildren(...chunk5YHVN3PP_cjs.wr(u).map(P=>Os(e,t,P,m,S))),x=true,d.hidden!==true&&v(),m?f(false):g?.update();}};return o.register(y),y}function Hs(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");o.setAttribute(chunk5YHVN3PP_cjs.Vq,t);let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row"),i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");return i.textContent=n,o.append(r,i),{el:o,row:r}}function KI(e,t,n,o){let r=Hs(e,n.group,Fo(t,n.labelKey,n.label));for(let i of n.galleries)r.row.appendChild(st(e,t,i,o).el);return r.el}function zE(e,t,n){let o=new Map;for(let{id:r}of chunk5YHVN3PP_cjs.aq){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content pptxv-ribbon-contextual-content");i.dataset.ribbonContextualPane=r;for(let s of chunk5YHVN3PP_cjs.nr[r])i.appendChild(KI(e,t,s,n));o.set(r,i);}return o}function NE(e,t,n){for(let[o,r]of t)n.includes(o)?r.parentElement!==e&&e.appendChild(r):r.remove();}var _E={element:null};function yt(e){let t=[],n=_E,o=false,r=[],i=()=>{for(let s of t)s.refresh(n,o);};return {context:()=>n,register(s){t.push(s),s.refresh(n,o);},sync(s,a){let l=s??_E,p=[l.element,l.theme?.colorScheme,l.theme?.fontScheme,l.theme?.name,l.resolveStyleMatrix!==void 0,a];n=l,o=a,!(p.length===r.length&&p.every((d,u)=>d===r[u]))&&(r=p,i());},pick(s,a){let l=chunk5YHVN3PP_cjs.mr(s,a,n);l&&e(l);},closeAll(){for(let s of t)s.close();}}}function GE(e,t,n){let o=chunk5YHVN3PP_cjs.gg(t);if(!o||!("textSegments"in t))return;let r=chunk5YHVN3PP_cjs.Bh(t.textSegments);if(chunk5YHVN3PP_cjs.hg(e)!==r)return false;let i=chunk5YHVN3PP_cjs.ys(e,r),s=e.ownerDocument.createElement("div");return s.dataset.pptxTextFlow="",chunk5YHVN3PP_cjs.Mh(s,o)?(e.replaceChildren(s),n(s,o),i&&chunk5YHVN3PP_cjs.ig(o,s,i),true):false}function UE(e){let t=Array.from(e.childNodes).filter(n=>n.nodeType===3?(n.nodeValue??"").length>0:n instanceof HTMLElement&&!n.hasAttribute("data-pptx-bullet-marker"));return t.length!==1||!(t[0]instanceof HTMLElement)?false:t[0].tagName==="BR"||UE(t[0])}function WI(e){return (e.matches("[data-seg-idx]")&&!e.hasAttribute("data-pptx-bullet-marker")?e:e.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])"))?.dataset.segIdx}function KE(e,t){let o=e.getSelection()?.anchorNode,i=(o?.nodeType===Node.ELEMENT_NODE?o:o?.parentElement)?.closest("[data-seg-idx]");if(!i||!t.contains(i))return;let s=i.closest("div, p"),a=s?.hasAttribute("data-pptx-text-flow"),l=a&&s?.previousElementSibling?.hasAttribute("data-pptx-text-flow")&&s.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])")===i,p=s&&s!==t&&(!a||l)&&t.contains(s)?s:i,d=p.previousElementSibling,u=d instanceof HTMLElement&&WI(d)===i.dataset.segIdx&&UE(d)?d:p;u.dataset.pptxParagraphStart="";}function WE(e,t,n){let o=e.ownerDocument,r=e;if(t?.length){let i=o.createElement("div");i.dataset.pptxTextFlow="",r=i,t.forEach((s,a)=>{let l=o.createElement("span");l.dataset.segIdx=String(a),chunk5YHVN3PP_cjs.ag(s)&&(l.dataset.pptxBulletMarker="",l.contentEditable="false");let p=a>0&&chunk5YHVN3PP_cjs.ag(t[a-1]),d=s.bulletInfo&&!s.bulletInfo.none;s.text.length===0&&a===t.length-1&&(p||d)?(l.dataset.pptxEmptyRun="",l.appendChild(o.createElement("br"))):l.textContent=s.text,i.appendChild(l);}),e.appendChild(i);}else e.textContent=n;return r}function Gr(e,t,n){let o=chunk5YHVN3PP_cjs.e(e)?e:void 0,r=o?.textSegments,i=o?.textStyle,s=n?.elementId===e.id?chunk5YHVN3PP_cjs.Qr(n,t):void 0;return {text:t,textSegments:s?.textSegments??chunk5YHVN3PP_cjs.oh(t,r,i)}}function Fs(e,t){if(chunk5YHVN3PP_cjs.e(e))return chunk5YHVN3PP_cjs.Eg(e.textStyle,e.height,t)}function Vs(e,t){return chunk5YHVN3PP_cjs.e(e)?chunk5YHVN3PP_cjs.Fg(e.textStyle,e.height,t):"unchanged"}function Ur(e){return !e||!chunk5YHVN3PP_cjs.e(e)||!chunk5YHVN3PP_cjs._e(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function io(){if(typeof document>"u")return;let e=document.querySelector("[data-inline-editor]");return e?chunk5YHVN3PP_cjs.hg(e):void 0}function Kr(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,s=chunk5YHVN3PP_cjs.e(i)?i:void 0,a=s?.text??"",l=s?.textStyle?.fontSize,p=s?.textStyle?.fontFamily,d=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-inline-editor pptxv-inline-text-editor",{...chunkIQ7MDPEN_cjs.z(i),...typeof l=="number"?{fontSize:`${l}px`}:{},...p!==void 0?{fontFamily:p}:{},left:`${o.x*r}px`,top:`${o.y*r}px`,width:`${o.width}px`,height:`${o.height}px`,transform:`scale(${r})`,transformOrigin:"top left"});d.contentEditable="true",d.spellcheck=e.spellCheck??false,d.dataset.inlineEditor="",d.setAttribute("role","textbox"),d.setAttribute("aria-multiline","true");let u=d,m=!!e.collaboration?.patcher.isActive(),g=m?void 0:chunk5YHVN3PP_cjs.gg(i),x,b;g?(u=t.createElement("div"),u.dataset.pptxTextFlow="",chunk5YHVN3PP_cjs.Mh(u,g),d.append(u)):m||(u=WE(d,s?.textSegments,a));let v=chunk5YHVN3PP_cjs.hg(d),f=false,S=()=>{let w=x?.read();return w?.kind==="supported"?w.snapshot:void 0},y=w=>{if(f)return;let A=x?.read();if(w!==null&&m&&A?.kind==="unsupported"&&(A.reason==="composition-active"||A.reason==="input-active"))return;let P=A?.kind==="supported"?A.snapshot:void 0;m&&!P&&(w=null),w!==null&&P&&(w=P.text),f=true,d.contains(t.activeElement)&&chunk5YHVN3PP_cjs.Hl(d),w!==null&&(P?chunk5YHVN3PP_cjs.Rr(i,w,P):w!==v)&&(P?e.onCommit(w,P):e.onCommit(w)),x?.dispose(),d.remove(),e.onClose();};d.addEventListener("input",w=>{if(x){x.refresh();return}w.inputType==="insertParagraph"&&KE(t,d),e.onInput?.(chunk5YHVN3PP_cjs.hg(d));}),d.addEventListener("blur",()=>y(chunk5YHVN3PP_cjs.hg(d))),d.addEventListener("keydown",w=>{if(e.onLiveFormatKey?.(w)){w.preventDefault(),w.stopPropagation();return}w.stopPropagation(),w.key==="Escape"&&(w.preventDefault(),y(chunk5YHVN3PP_cjs.hg(d)));}),d.addEventListener("pointerdown",w=>w.stopPropagation());let h=()=>{let w=x?.readSelection();e.onSelectionChange?.(w?w.kind==="supported"?w.selection:null:chunk5YHVN3PP_cjs.lg(s?.textSegments));};d.addEventListener("keyup",h),d.addEventListener("pointerup",h);let C=(w,A)=>{d.style.textDecoration="none",d.style.textDecorationLine="none",u=w,x=chunk5YHVN3PP_cjs.jg(w,A,{isCurrent:()=>!f&&d.isConnected,onRead:P=>e.onInput?.(P.kind==="supported"?P.snapshot.text:P.text,P.kind==="supported"?P.snapshot:void 0)});};return n.appendChild(d),m?(b=chunk5YHVN3PP_cjs.Nh(d,i,{...e.collaboration,onCancel:()=>y(null)}),x=b,b||y(null)):g&&C(u,g),f||d.focus(),f||chunk5YHVN3PP_cjs.Sg(u),{el:d,checkModel:b?.checkModel,readAccepted:b?.readAccepted,activateList:w=>!f&&(!!x||GE(d,w,C)),readSnapshot:S,readList:()=>x?.read(),formatSnapshot:w=>x?.format(w).kind==="supported",commit:()=>y(chunk5YHVN3PP_cjs.hg(d)),cancel:()=>y(null)}}var $I=24,qI=1,jI=400;function Le(e){return e!==void 0&&chunk5YHVN3PP_cjs.e(e)}function Wr(e){return e!==void 0&&chunk5YHVN3PP_cjs.f(e)}function lt(e){let t=Le(e)?e.textStyle:void 0,n=Le(e)?e.textSegments?.find(i=>i.text)?.style:void 0,o=t?.fontSize??n?.fontSize,r=Le(e)?chunk5YHVN3PP_cjs.bg(e):"none";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:o===void 0?$I:chunk5YHVN3PP_cjs.fh(o),fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,colorRef:t?.colorRef??n?.colorRef,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:r==="mixed"?"none":r,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function St(e,t){if(!Le(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>chunk5YHVN3PP_cjs.cg(r,t));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function ao(e,t){let n=lt(e);return St(e,{[t]:!n[t]})}function Vo(e,t){let n=Math.min(jI,Math.max(qI,t));return St(e,{fontSize:chunk5YHVN3PP_cjs.gh(n)})}function Bs(e,t){return Vo(e,lt(e).fontSize+t)}function $E(e,t){return Vo(e,chunk5YHVN3PP_cjs.ih(lt(e).fontSize,t))}function zs(e,t,n){return St(e,{color:t,colorRef:n})}function Ns(e,t){return St(e,{highlightColor:t})}function pt(e,t){return Wr(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function _s(e,t){return St(e,{fontFamily:t})}function Gs(e,t){return St(e,{characterSpacing:t})}var YI={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Us(e){let t=lt(e).hasTextShadow;return St(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:YI)}function Ks(e,t){if(!Le(e)||!e.textSegments)return {};let n=io(),o=n!==void 0?chunk5YHVN3PP_cjs.oh(n,e.textSegments,e.textStyle):e.textSegments,r=chunk5YHVN3PP_cjs.Tg(o,null,t);return {textSegments:r,text:r.map(i=>i.text).join("")}}function Ws(e){return St(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})}function se(e,t){return e.setAttribute(chunk5YHVN3PP_cjs.Vq,t),e}function z(e,t){return e.setAttribute(chunk5YHVN3PP_cjs.Wq,t),e}function qE(e,...t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-contents");return n.append(...t),n}function q(e,t,...n){return se(qE(e,...n),t)}function Ot(e,t,...n){return z(qE(e,...n),t)}function jE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-arrange-extras"),r=H(e,{label:t("pptx.contextMenu.group"),icon:"group",onClick:n.groupSelected}),i=H(e,{label:t("pptx.contextMenu.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),s=e.createElement("input");return s.type="number",s.className="pptxv-field-input pptxv-arrange-stroke",s.min="0",s.max="120",s.step="0.5",s.value=String(chunk5YHVN3PP_cjs.Ur),s.title=t("pptx.ribbon.strokeWidth"),s.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),s.addEventListener("keydown",a=>a.stopPropagation()),s.addEventListener("change",()=>{let a=Number.parseFloat(s.value);Number.isFinite(a)&&n.setStrokeWidth(Math.max(0,a));}),z(r.btn,"home.arrange.group"),z(i.btn,"home.arrange.ungroup"),z(s,"home.arrange.outlineWidth"),o.append(r.btn,i.btn,s),{el:o,update({editable:a,selectedCount:l,selectionGroupable:p,selectedElement:d}){let u=d??null;r.setDisabled(!chunk5YHVN3PP_cjs.Vr(a,l,p)),i.setDisabled(!chunk5YHVN3PP_cjs.Wr(a,u)),s.disabled=!chunk5YHVN3PP_cjs.Xr(a,u);let m=chunk5YHVN3PP_cjs.Yr(u);e.activeElement!==s&&(s.value=String(m));}}}function $s(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown"),o=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-dropdown-trigger");if(o.type="button",o.title=t.label,o.setAttribute("aria-label",t.label),o.setAttribute("aria-haspopup","menu"),o.setAttribute("aria-expanded","false"),o.dataset.pptxRibbonControl=t.control,t.icon&&o.appendChild(chunkIQ7MDPEN_cjs.K(e,t.icon)),t.text){let a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-dropdown-text");a.textContent=t.text,o.appendChild(a);}o.appendChild(chunkIQ7MDPEN_cjs.K(e,"chevron-down"));let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t.label),r.hidden=true,n.append(o,r);let i=null,s=a=>{r.hidden=!a,o.setAttribute("aria-expanded",String(a)),o.classList.toggle("is-active",a),i?.destroy(),i=a?Ye(r,o):null;};for(let a of t.items){if(a.groupLabel){let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown-group");p.setAttribute("role","presentation"),p.textContent=a.groupLabel,r.appendChild(p);}let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-dropdown-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,Object.assign(l.dataset,a.dataset??{}),l.addEventListener("click",()=>{s(false),a.run(),l.blur(),chunk5YHVN3PP_cjs.Gl(n.closest(".pptxv"));}),r.appendChild(l);}return o.addEventListener("click",a=>{a.stopPropagation(),s(r.hidden===true);}),e.addEventListener("pointerdown",a=>{!r.hidden&&!n.contains(a.target)&&s(false);}),{el:n,trigger:o,setDisabled(a,l){o.disabled=a,o.title=a&&l?l:t.label,a&&s(false);},close:()=>s(false)}}var YE="pptx.image.cropHint";function XE(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-arrange-extras"),i=chunk5YHVN3PP_cjs.cq("mergeShapes",o)?null:$s(e,{label:t(chunk5YHVN3PP_cjs.Nl),icon:"merge-shapes",control:"merge-shapes",items:chunk5YHVN3PP_cjs.Pl.map(l=>({label:t(l.labelKey),dataset:{pptxMergeOp:l.operation},run:()=>n.mergeShapes(l.operation)}))});i&&(z(i.el,"home.arrange.mergeShapes"),r.appendChild(i.el));let s=null,a=null;if(!chunk5YHVN3PP_cjs.cq("crop",o)){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-arrange-extras");l.dataset.pptxCropControls="true",s=H(e,{label:t(chunk5YHVN3PP_cjs.bt),icon:"crop",onClick:n.toggleCropMode}),s.btn.dataset.pptxRibbonControl="crop";let p=null,d=chunk5YHVN3PP_cjs.Ss.map(u=>{let m=u.group!==p?t(chunk5YHVN3PP_cjs.Ts[u.group]):void 0;return p=u.group,{label:u.id,groupLabel:m,dataset:{pptxCropAspect:u.id},run:()=>n.cropToAspect(u.ratioWidth,u.ratioHeight)}});d.push({label:t(chunk5YHVN3PP_cjs.ct),dataset:{pptxCropAction:"fill"},run:n.cropFill},{label:t(chunk5YHVN3PP_cjs.dt),dataset:{pptxCropAction:"fit"},run:n.cropFit}),a=$s(e,{label:t(chunk5YHVN3PP_cjs.et),control:"crop-menu",items:d}),z(l,"home.arrange.crop"),l.append(s.btn,a.el),r.appendChild(l);}return {el:r,update({editable:l,canMergeShapes:p,canCrop:d,cropActive:u}){if(i?.setDisabled(!(l&&p),t(chunk5YHVN3PP_cjs.Ol)),s){let m=l&&(d||u);s.setDisabled(!m),s.btn.title=t(m?chunk5YHVN3PP_cjs.bt:YE),s.setActive(u);}a?.setDisabled(!(l&&(d||u)),t(YE));}}}var XI=[{edge:"left",label:"left",icon:"align-left"},{edge:"centerH",label:"center",icon:"align-center"},{edge:"right",label:"right",icon:"align-right"},{edge:"top",label:"top",icon:"align-top"},{edge:"middle",label:"middle",icon:"align-middle"},{edge:"bottom",label:"bottom",icon:"align-bottom"}],QE=3;function ZE(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(r,"home.arrange");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.arrange.groupLabel"),r.appendChild(s);let a=XI.map(C=>H(e,{label:t(chunkIQ7MDPEN_cjs.F[C.label]),icon:C.icon,onClick:()=>n.alignElements(C.edge)})),l=H(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),p=H(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),d=H(e,{label:t("pptx.arrange.format"),icon:"copy",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});d.btn.title=t("pptx.arrange.formatPainter");let u=H(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),m=H(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),g=H(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),x=H(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),b=H(e,{label:t("pptx.arrange.back"),icon:"send-back",onClick:n.sendToBack});b.btn.title=t("pptx.arrange.sendToBack");let v=H(e,{label:t("pptx.arrange.front"),icon:"bring-front",onClick:n.bringToFront});v.btn.title=t("pptx.arrange.bringToFront");let f=H(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",textLabel:t("pptx.arrange.duplicate"),onClick:n.duplicate}),S=H(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),y=jE(e,t,n),h=XE(e,t,n,o);return z(u.btn,"home.arrange.flipHorizontal"),z(m.btn,"home.arrange.flipVertical"),z(g.btn,"home.arrange.sendBackward"),z(x.btn,"home.arrange.bringForward"),z(b.btn,"home.arrange.sendToBack"),z(v.btn,"home.arrange.bringToFront"),z(f.btn,"home.arrange.duplicate"),z(S.btn,"home.arrange.delete"),i.append(Ot(e,"home.arrange.align",...a.map(C=>C.btn),l.btn,p.btn),d.btn,u.btn,m.btn,y.el,h.el,g.btn,x.btn,b.btn,v.btn,f.btn,S.btn),{el:r,update({editable:C,hasSelection:w,formatPainterActive:A,selectedCount:P,selectionGroupable:k,selectedElement:T,canMergeShapes:E=false,canCrop:L=false,cropActive:M=false}){let D=C&&w;for(let I of [...a,u,m,g,x,b,v,f,S])I.setDisabled(!D);y.update({editable:C,selectedCount:P,selectionGroupable:k,selectedElement:T}),h.update({editable:C,canMergeShapes:E,canCrop:L,cropActive:M}),d.setDisabled(!C||!w&&!A),d.btn.dataset.active=String(A),l.setDisabled(!C||P<QE),p.setDisabled(!C||P<QE);}}}function JE(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(o,"home.clipboard");let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let s=H(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),a=H(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),l=H(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),p=H(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return p.btn.dataset.testid="format-painter-toggle",z(s.btn,"home.clipboard.paste"),z(a.btn,"home.clipboard.cut"),z(l.btn,"home.clipboard.copy"),z(p.btn,"home.clipboard.formatPainter"),r.append(s.btn,a.btn,l.btn,p.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:m,formatPainterActive:g}){s.setDisabled(!m||!u),a.setDisabled(!m||!d),l.setDisabled(!d),p.setDisabled(!m||!d&&!g),p.btn.dataset.active=String(g);}}}function xe(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown"),o=chunkIQ7MDPEN_cjs.w(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=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkIQ7MDPEN_cjs.K(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let s=false,a,l=new Map,p=null,d=b=>{s=b,i.hidden=!b,o.setAttribute("aria-expanded",String(b)),o.classList.toggle("is-active",b),b?(p?.destroy(),p=Ye(i,o)):(p?.destroy(),p=null);},u=()=>{for(let[b,v]of l){let f=a!==void 0&&v===a;b.classList.toggle("is-selected",f),b.setAttribute("aria-selected",String(f));}},m=null,g=b=>JSON.stringify(b.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),x=b=>{i.replaceChildren(),l.clear();for(let v of b){if(v.groupLabel){let S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-dropdown-group");S.setAttribute("role","presentation"),S.textContent=v.groupLabel,i.appendChild(S);}let f=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-dropdown-item");if(f.type="button",f.setAttribute("role","option"),f.setAttribute("aria-selected","false"),f.textContent=v.label,v.hint){let S=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-dropdown-item-hint");S.textContent=v.hint,f.appendChild(S);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{d(false),t.onSelect(v.value);}),i.appendChild(f),l.set(f,v.value);}u();};return x(t.items),o.addEventListener("click",b=>{b.stopPropagation(),d(!s);}),e.addEventListener("pointerdown",b=>{s&&!n.contains(b.target)&&d(false);}),{el:n,setDisabled(b){o.disabled=b,b&&d(false);},setTriggerText(b){r.textContent=b;},setSelected(b){a=b,u();},setItems(b){let v=g(b);v!==m&&(m=v,x(b),u());},close:()=>d(false)}}var so=chunk5YHVN3PP_cjs.wo;function QI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function dt(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-swatch-picker"),r=chunkIQ7MDPEN_cjs.w(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(chunkIQ7MDPEN_cjs.K(e,n.icon));let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-swatch-menu");s.hidden=true,o.appendChild(s);let a=null;if(n.onSelectTheme){let y=n.onSelectTheme;a=Ie(e,t,C=>{v(false),y(C);}),s.appendChild(a.el);let h=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-swatch-standard-label");h.textContent=t("pptx.colorPicker.standardColors"),s.appendChild(h);}let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-swatch-grid");s.appendChild(l);let p=Rt(e,t,y=>{v(false),n.onSelect(y);});s.appendChild(p.el);let d=n.fallback,u,m=new Map,g=()=>{for(let[y,h]of m)y.classList.toggle("is-selected",h===d);p.setSelected(d),a?.setSelected(u,d),i.style.backgroundColor=d;},x=false,b=null,v=y=>{x=y,s.hidden=!y,r.setAttribute("aria-expanded",String(y)),r.classList.toggle("is-active",y),y?(b?.destroy(),b=Ye(s,r)):(b?.destroy(),b=null);};for(let y of n.swatches){let h=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=y,h.setAttribute("aria-label",y),h.addEventListener("click",()=>{v(false),n.onSelect(y);}),l.appendChild(h),m.set(h,y);}let f=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-swatch-custom");f.textContent=t("pptx.ribbon.customColour");let S=e.createElement("input");return S.type="color",S.className="pptxv-swatch-custom-input",S.addEventListener("input",()=>n.onSelect(S.value)),f.appendChild(S),s.appendChild(f),r.addEventListener("click",y=>{y.stopPropagation(),v(!x);}),e.addEventListener("pointerdown",y=>{x&&!o.contains(y.target)&&v(false);}),g(),{el:o,setValue(y){d=QI(y,n.fallback),S.value=d,g();},setDisabled(y){r.disabled=y,p.setDisabled(y),a?.setDisabled(y),y&&v(false);},setRecentColors(y){p.setColors(y);},setThemeColorMap(y){a?.setThemeColorMap(y);},setSelectedRef(y){u=y,g();}}}var ZI=12;function eT(e,t,n,o=yt(()=>{})){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(r,"home.drawing");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.groupDrawing"),r.appendChild(s);let a=xe(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunk5YHVN3PP_cjs.oo.slice(0,ZI).map(x=>({label:t(x.i18nKey),value:x.type})),onSelect:x=>n.insertShape(x)}),l=xe(e,{triggerLabel:t("pptx.ribbon.arrange"),triggerText:t("pptx.ribbon.arrange"),icon:"bring-front",items:[{label:t("pptx.contextMenu.bringForward"),value:n.bringForward},{label:t("pptx.contextMenu.sendBackward"),value:n.sendBackward},{label:t("pptx.contextMenu.bringToFront"),value:n.bringToFront},{label:t("pptx.contextMenu.sendToBack"),value:n.sendToBack},{label:t("pptx.ribbon.group"),value:n.groupSelected},{label:t("pptx.ribbon.ungroup"),value:n.ungroupSelected}],onSelect:x=>x()}),p=dt(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:chunk5YHVN3PP_cjs.Ki,fallback:"#ffffff",onSelect:x=>n.setShapeFill(x),onSelectTheme:x=>n.setShapeFill(x.hex,x.ref)}),d=dt(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:chunk5YHVN3PP_cjs.Ki,fallback:"#000000",onSelect:x=>n.setShapeStroke(x),onSelectTheme:x=>n.setShapeStroke(x.hex,x.ref)}),u=x=>{let b=chunk5YHVN3PP_cjs.or.find(v=>v.control===x);if(!b)throw new Error(`Missing fixed gallery placement ${x}`);return b},m=st(e,t,u("home.drawing.quickStyles"),o),g=st(e,t,u("home.drawing.shapeEffects"),o);return z(a.el,"home.drawing.shapes"),z(l.el,"home.drawing.arrange"),z(p.el,"home.drawing.shapeFill"),z(d.el,"home.drawing.shapeOutline"),i.append(a.el,l.el,m.el,p.el,d.el,g.el),{el:r,update({editable:x,hasSelection:b,recentColors:v,themeColorMap:f,fillColor:S,fillColorRef:y,strokeColor:h,strokeColorRef:C}){a.setDisabled(!x);let w=x&&b;l.setDisabled(!w),p.setDisabled(!w),d.setDisabled(!w),p.setRecentColors(v??[]),d.setRecentColors(v??[]),p.setThemeColorMap(f),d.setThemeColorMap(f),p.setSelectedRef(y),d.setSelectedRef(C),S!==void 0&&p.setValue(S),h!==void 0&&d.setValue(h);}}}function tT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(o,"home.editing");let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let s=H(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),a=H(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),l=JI(e,t,n);return z(s.btn,"home.editing.find"),z(a.btn,"home.editing.replace"),z(l.el,"home.editing.select"),r.append(s.btn,a.btn,l.el),{el:o,update({editable:p}){l.setDisabled(!p);}}}function JI(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu-host"),r=H(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>a(!s)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let s=false,a=p=>{s=p,i.hidden=!p,r.btn.setAttribute("aria-expanded",String(p)),r.btn.classList.toggle("is-active",p);},l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-primary-menu-item");return l.type="button",l.textContent=t("pptx.editing.selectAll"),l.addEventListener("mousedown",p=>p.preventDefault()),l.addEventListener("click",()=>{a(false),n.selectAll();}),i.appendChild(l),e.addEventListener("pointerdown",p=>{s&&!o.contains(p.target)&&a(false);}),o.append(r.btn,i),{el:o,setDisabled(p){r.btn.disabled=p,l.disabled=p,p&&a(false);}}}var oT=2;function nT(e,t){return chunk5YHVN3PP_cjs.po(t).flatMap(n=>n.entries.map((o,r)=>({label:o.family,value:o.family,style:{fontFamily:o.family},...r===0?{groupLabel:e(n.labelKey)}:{},...o.themeRole?{hint:e(`pptx.font.role.${o.themeRole}`)}:{}})))}function rT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(o,"home.font");let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let s=xe(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:nT(t,{}),onSelect:n.setFontFamily});s.el.classList.add("pptxv-font-family-dd");let a=xe(e,{triggerLabel:t("pptx.ribbon.fontSize"),triggerText:"24",items:chunk5YHVN3PP_cjs.hh.map(w=>({label:String(w),value:w})),onSelect:n.setFontSize});a.el.classList.add("pptxv-font-size-dd");let l=H(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),p=H(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),d=H(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),u=H(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),m=H(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),g=H(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-oT)}),x=H(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(oT)}),b=H(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),v=xe(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunk5YHVN3PP_cjs.jh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.setCharacterSpacing});v.el.querySelector(".pptxv-dropdown-text")?.remove();let f=xe(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunk5YHVN3PP_cjs.lh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.changeCase});f.el.querySelector(".pptxv-dropdown-text")?.remove();let S=dt(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:so,fallback:"#000000",onSelect:n.setTextColor,onSelectTheme:w=>n.setTextColor(w.hex,w.ref)}),y=dt(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:so,fallback:"#ffff00",onSelect:n.setHighlightColor});z(s.el,"home.font.fontFamily"),z(a.el,"home.font.fontSize"),z(g.btn,"home.font.decreaseFontSize"),z(x.btn,"home.font.increaseFontSize"),z(l.btn,"home.font.bold"),z(p.btn,"home.font.italic"),z(d.btn,"home.font.underline"),z(u.btn,"home.font.strikethrough"),z(m.btn,"home.font.shadow"),z(b.btn,"home.font.clearFormatting"),z(v.el,"home.font.characterSpacing"),z(f.el,"home.font.changeCase"),z(S.el,"home.font.fontColor"),z(y.el,"home.font.highlightColor"),r.append(s.el,a.el,g.btn,x.btn,l.btn,p.btn,d.btn,u.btn,m.btn,b.btn,v.el,f.el,S.el,y.el);let h=[l,p,d,u],C=[g,x,l,p,d,u,m,b,v,f,S,y];return {el:o,update({canFormat:w,editable:A,text:P,themeFonts:k,embeddedFontFamilies:T,customFontFamilies:E,recentColors:L,themeColorMap:M}){s.setItems(nT(t,{themeFonts:k,embeddedFonts:T,customFonts:E})),l.setActive(P.bold),p.setActive(P.italic),d.setActive(P.underline),u.setActive(P.strikethrough),m.setActive(P.hasTextShadow),s.setTriggerText(P.fontFamily??chunk5YHVN3PP_cjs.qo(P.placeholderType,k)),s.setSelected(P.fontFamily),a.setTriggerText(String(P.fontSize)),a.setSelected(P.fontSize),S.setValue(P.color),y.setValue(P.highlightColor),S.setRecentColors(L??[]),y.setRecentColors(L??[]),S.setThemeColorMap(M),S.setSelectedRef(P.colorRef),s.setDisabled(!A||!w),a.setDisabled(!A||!w);for(let D of C)D.setDisabled(!A||!w);for(let D of h)(!A||!w)&&D.setActive(false);}}}var eL=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],tL=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],qs=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft",control:"home.paragraph.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter",control:"home.paragraph.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight",control:"home.paragraph.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify",control:"home.paragraph.justify"}];function iT(e,t,n,o,r){let i=chunk5YHVN3PP_cjs.or.find(a=>a.control===o),s=z(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-split-gallery"),o);return s.appendChild(n),i&&s.appendChild(st(e,t,i,r,{chevronOnly:true}).el),s}function aT(e,t,n,o=yt(()=>{})){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(r,"home.paragraph");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.paragraph"),r.appendChild(s);let a=H(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),l=H(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList});for(let{btn:v}of [a,l])v.addEventListener("mousedown",f=>f.preventDefault());let p=H(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),d=H(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),u=qs.map(v=>H(e,{label:t(v.labelKey),icon:v.icon,onClick:()=>n.setTextAlign(v.align)})),m=xe(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunk5YHVN3PP_cjs.kh.map(v=>({label:v.label,value:v.value})),onSelect:n.setLineSpacing});m.el.querySelector(".pptxv-dropdown-text")?.remove();let g=xe(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"change-case",items:eL.map(v=>({label:t(v.labelKey),value:v.value})),onSelect:n.setTextDirection});g.el.querySelector(".pptxv-dropdown-text")?.remove();let x=xe(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:tL.map(v=>({label:t(v.labelKey),value:v.count})),onSelect:n.setColumnCount});x.el.querySelector(".pptxv-dropdown-text")?.remove(),z(p.btn,"home.paragraph.decreaseIndent"),z(d.btn,"home.paragraph.increaseIndent");for(let[v,f]of qs.entries())z(u[v].btn,f.control);z(m.el,"home.paragraph.lineSpacing"),z(g.el,"home.paragraph.textDirection"),z(x.el,"home.paragraph.columns"),i.append(iT(e,t,a.btn,"home.paragraph.bullets",o),iT(e,t,l.btn,"home.paragraph.numbering",o),p.btn,d.btn,...u.map(v=>v.btn),m.el,g.el,x.el);let b=[a,l,p,d,...u,m,g,x];return {el:r,update({canFormat:v,editable:f,text:S}){a.setActive(S.listType==="bullet"),l.setActive(S.listType==="numbered");for(let[y,h]of qs.entries())u[y].setActive(S.align===h.align);m.setSelected(S.lineSpacing);for(let y of b)y.setDisabled(!f||!v);}}}var js=1280,Ys=720,lT=144,pT=lT/js,oL=Math.round(Ys*pT),sT;function dT(e,t,n,o){sT??=chunkIQ7MDPEN_cjs.J();let r=chunk5YHVN3PP_cjs.Jf(n,{slideWidth:js,slideHeight:Ys,...o?{scheme:o}:{},idFor:a=>`tpl-preview-${n}-${a}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-preview",{width:`${lT}px`,height:`${oL}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return s.setAttribute("aria-hidden","true"),s.appendChild(chunkIQ7MDPEN_cjs.A({document:e,slide:i,canvasSize:{width:js,height:Ys},mediaDataUrls:new Map,registry:sT,t,scale:pT})),s}function cT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.slideTemplates.galleryTitle")),i.tabIndex=-1;let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog-header"),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog-heading"),l=chunkIQ7MDPEN_cjs.w(e,"h2");l.textContent=t("pptx.slideTemplates.galleryTitle");let p=chunkIQ7MDPEN_cjs.w(e,"p");p.textContent=t("pptx.slideTemplates.galleryDescription"),a.append(l,p);let d=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",s.append(a,d);let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog-body"),m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(m);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tpl-dialog-footer"),x=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tpl-dialog-cancel");x.type="button",x.textContent=t("pptx.slideTemplates.cancel");let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tpl-dialog-insert");b.type="button",b.textContent=t("pptx.slideTemplates.insert"),b.disabled=true,g.append(x,b),i.append(s,u,g),o.append(r,i);let v,f=null;function S(A){v=A,b.disabled=false;for(let P of m.querySelectorAll('[role="option"]')){let k=P.dataset.templateId===A;P.setAttribute("aria-selected",String(k)),P.classList.toggle("is-selected",k);}}function y(A){A&&(n.onInsert(A),C());}function h(){let A=n.getScheme?.();m.replaceChildren();for(let P of chunk5YHVN3PP_cjs.If){let k=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tpl-option");k.type="button",k.dataset.templateId=P.id,k.setAttribute("role","option"),k.setAttribute("aria-selected",String(v===P.id)),k.setAttribute("aria-label",t(P.nameKey)),k.title=t(P.descriptionKey),k.classList.toggle("is-selected",v===P.id),k.appendChild(dT(e,t,P.id,A));let T=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tpl-option-label");T.textContent=t(P.nameKey),k.append(T),k.addEventListener("click",()=>S(P.id)),k.addEventListener("dblclick",()=>y(P.id)),m.appendChild(k);}}function C(){o.hidden||(o.hidden=true,f?.focus(),f=null);}function w(A){if(A.key==="Escape"){A.preventDefault(),C();return}if(A.key!=="Tab")return;let P=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(P.length===0)return;let k=P[0],T=P[P.length-1];A.shiftKey&&e.activeElement===k?(A.preventDefault(),T.focus()):!A.shiftKey&&e.activeElement===T&&(A.preventDefault(),k.focus());}return r.addEventListener("click",C),d.addEventListener("click",C),x.addEventListener("click",C),b.addEventListener("click",()=>y(v)),o.addEventListener("keydown",w),{el:o,open(A){let P=e.defaultView?.HTMLElement;f=P&&e.activeElement instanceof P?e.activeElement:null,h(),o.parentElement!==A&&A.appendChild(o),o.hidden=false,i.focus();},close:C}}var nL=128,rL=72;function mT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu pptxv-layout-menu");o.dataset.testid="layout-gallery-menu",o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);});let s=null;return {el:o,setItems(a,l){let p=JSON.stringify([a.map(d=>[d.path,d.name]),l.currentLayoutPath??"",a.map(d=>l.previews.get(d.path)?1:0)]);if(p!==s){s=p,o.replaceChildren();for(let d of a){let u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunk5YHVN3PP_cjs.vo(d,l.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(iL(e,l.previews.get(d.path),l.renderPreview));let m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-layout-tile-name");m.textContent=d.name,u.appendChild(m),u.title=d.name,u.addEventListener("click",()=>{i(false),n(d);}),o.appendChild(u);}}},toggle:()=>i(!r),close:()=>i(false)}}function iL(e,t,n){let o=chunk5YHVN3PP_cjs.uo(t,nL,rL),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-layout-tile-thumb");r.style.width=`${o.boxWidth}px`,r.style.height=`${o.boxHeight}px`,r.style.backgroundColor=o.backgroundColor;let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-layout-tile-surface");i.style.width=`${o.surfaceWidth}px`,i.style.height=`${o.surfaceHeight}px`,i.style.transform=`scale(${o.scale})`;let s=t&&n?n(t,o):void 0;s&&i.appendChild(s);for(let a of o.frames){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-layout-tile-frame");l.style.left=`${a.left}px`,l.style.top=`${a.top}px`,l.style.width=`${a.width}px`,l.style.height=`${a.height}px`,l.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(l);}return r.appendChild(i),r}function uT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(o,"home.slides");let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slides-split"),a=H(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-slides-caret");l.type="button",l.title=t("pptx.home.chooseLayout"),l.setAttribute("aria-label",t("pptx.home.chooseLayout")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkIQ7MDPEN_cjs.K(e,"chevron-down"));let p=mT(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a.btn,l,p.el);let d=cT(e,t,{onInsert:f=>n.insertSlideFromTemplate(f),getScheme:()=>n.getTemplateScheme?.()}),u=H(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let f=u.btn.closest(".pptxv")??e.body;d.open(f);}}),m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-slides-menu-host"),g=H(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>x.toggle()});g.btn.setAttribute("aria-haspopup","menu");let x=mT(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));m.append(g.btn,x.el);let b=H(e,{label:t("pptx.animations.reset"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});b.btn.title=t("pptx.sections.resetSlideTitle");let v=H(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return v.btn.title=t("pptx.sections.addSection"),z(s,"home.slides.newSlide"),z(u.btn,"home.slides.slideTemplates"),z(m,"home.slides.layout"),z(b.btn,"home.slides.reset"),z(v.btn,"home.slides.section"),r.append(s,u.btn,m,b.btn,v.btn),{el:o,update({editable:f,slideCount:S,layouts:y,layoutPreviews:h,currentLayoutPath:C}){let w=y.length>0,A=h??new Map;p.setItems(y,{previews:A,renderPreview:n.renderLayoutPreview}),x.setItems(y,{previews:A,currentLayoutPath:C,renderPreview:n.renderLayoutPreview}),a.setDisabled(!f),l.hidden=!w,l.disabled=!f,u.setDisabled(!f),g.setDisabled(!f||!w),b.setDisabled(!f||S===0),v.setDisabled(!f||S===0),f||(p.close(),x.close(),d.close());}}}var aL=100;function xT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=n.galleryHub??yt(g=>r.applyRibbonGalleryResult(g)),s=JE(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=uT(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,insertSlideFromTemplate:r.insertSlideFromTemplate,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName")),getTemplateScheme:()=>r.getTemplateScheme(),renderLayoutPreview:(g,x)=>chunkIQ7MDPEN_cjs.A({document:e,slide:{id:`layout-preview-${g.path}`,rId:"",slideNumber:0,elements:g.elements.slice(0,aL),backgroundColor:x.backgroundColor},canvasSize:{width:x.surfaceWidth,height:x.surfaceHeight},mediaDataUrls:new Map,registry:chunkIQ7MDPEN_cjs.J(),t})}),l=rT(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=aT(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing,setTextDirection:r.setTextDirection,setColumnCount:r.setColumnCount},i),d=tT(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),u=eT(e,t,{insertShape:g=>r.insert("shape",g),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke},i),m=ZE(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,setStrokeWidth:r.setShapeStrokeWidth,toggleFormatPainter:r.toggleFormatPainter,duplicate:r.duplicateSelected,delete:r.deleteSelected,mergeShapes:r.mergeShapes,toggleCropMode:r.toggleCropMode,cropToAspect:r.cropToAspect,cropFill:r.cropFill,cropFit:r.cropFit},n.hiddenActions);return o.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el),{el:o,update({editable:g,selectedElement:x,hasClipboard:b,slideCount:v,selectedCount:f,selectionGroupable:S,formatPainterActive:y,layouts:h,layoutPreviews:C,currentLayoutPath:w,themeFonts:A,embeddedFontFamilies:P,customFontFamilies:k,recentColors:T,themeColorMap:E,canMergeShapes:L,canCrop:M,cropActive:D}){let I=Le(x),R=lt(x),O=x!==void 0,B=x&&chunk5YHVN3PP_cjs.f(x)?x.shapeStyle:void 0;s.update({hasSelection:O,hasClipboard:b,editable:g,formatPainterActive:y}),a.update({editable:g,slideCount:v,layouts:h,layoutPreviews:C,currentLayoutPath:w}),l.update({canFormat:I,editable:g,text:R,themeFonts:A,embeddedFontFamilies:P,customFontFamilies:k,recentColors:T,themeColorMap:E}),p.update({canFormat:I,editable:g,text:R}),d.update({editable:g}),u.update({editable:g,hasSelection:O,recentColors:T,themeColorMap:E,fillColor:B?.fillColor,fillColorRef:B?.fillColorRef,strokeColor:B?.strokeColor,strokeColorRef:B?.strokeColorRef}),m.update({editable:g,hasSelection:O,formatPainterActive:y,selectedCount:f,selectionGroupable:S,selectedElement:x,canMergeShapes:L,canCrop:M,cropActive:D});}}}function gT(e,t,n){return {editable:e,selectedElement:t,hasClipboard:n.hasClipboard,formatPainterActive:n.formatPainterActive??false,slideCount:n.slideCount,selectedCount:n.selectedCount??0,selectionGroupable:n.selectionGroupable??true,layouts:n.layouts??[],layoutPreviews:n.layoutPreviews,currentLayoutPath:n.currentLayoutPath,themeFonts:n.themeFonts,embeddedFontFamilies:n.embeddedFontFamilies,customFontFamilies:n.customFontFamilies,recentColors:n.recentColors??[],themeColorMap:n.themeColorMap,canMergeShapes:n.canMergeShapes,canCrop:n.canCrop,cropActive:n.cropActive}}function Xs(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,s=a=>{i=a,r.hidden=!a,o?.(a);};for(let a of n){a.separatorBefore&&r.appendChild(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu-sep"));let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-primary-menu-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,l.addEventListener("click",()=>{s(false),a.run();}),r.appendChild(l);}return e.addEventListener("pointerdown",a=>{i&&!r.parentElement?.contains(a.target)&&s(false);}),{el:r,toggle:()=>s(!i),close:()=>s(false),isOpen:()=>i}}function bT(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 chunk5YHVN3PP_cjs.cq("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function fT(e,t,n){let{file:o,nav:r}=t,i=o.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,s=[];chunk5YHVN3PP_cjs.cq("export",n)||s.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.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()},{label:e("pptx.file.saveAsPptTooltip"),run:()=>o.saveAsPpt()});let a=chunk5YHVN3PP_cjs.br(i,"print");return a&&s.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true}),s.push({label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage(),separatorBefore:!a},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true}),chunk5YHVN3PP_cjs.br(i,"options")&&s.push({label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")}),s.push({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()}),s}function vT(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-primary"),i=H(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-present-split"),a=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-present-main");a.type="button",a.title=t("pptx.present.presentTooltip"),a.textContent=t("pptx.toolbar.present"),a.addEventListener("click",()=>n.slideShow.startFromCurrent());let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-present-caret");l.type="button",l.title=t("pptx.present.optionsTooltip"),l.setAttribute("aria-label",t("pptx.present.optionsTooltip")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkIQ7MDPEN_cjs.K(e,"chevron-down"));let p=Xs(e,t("pptx.present.optionsTooltip"),bT(t,n,o),f=>{l.classList.toggle("is-active",f),l.setAttribute("aria-expanded",String(f));});l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a,l,p.el),r.appendChild(s);let d=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent=t("pptx.customShows.addShow"),d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-primary-sep"));let u=H(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(u.btn);let m=H(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()}),g=n.nav.getCustomization?.()??chunk5YHVN3PP_cjs.Zq;chunk5YHVN3PP_cjs.br(g,"options")&&r.appendChild(m.btn);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-primary-menu-host"),b=Xs(e,t("pptx.ribbon.moreActions"),fT(t,n,o)),v=H(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>b.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),x.append(v.btn,b.el),r.appendChild(x),{el:r,setEditState({editable:f}){r.hidden=!f,f||(p.close(),b.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var Bo=[{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"}],$r="home";function Qs(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let s=new Map,a=new Map;for(let x of chunk5YHVN3PP_cjs.dq(Bo,o)){let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-ribbon-tab");x.id==="file"&&b.classList.add("pptxv-ribbon-tab-file"),b.type="button",b.setAttribute("role","tab");let v=t(x.labelKey);b.textContent=v,b.addEventListener("click",()=>n(x.id)),i.appendChild(b),s.set(x.id,b),a.set(x.id,v);}let l=new Map,p=[],d=null,u=null,m=()=>{let x=[...s,...l];for(let[b,v]of x){let f=b===d;v.classList.toggle("is-active",f),v.setAttribute("aria-selected",String(f));}},g=x=>{if(!(x.length===p.length&&x.every((b,v)=>p[v]===b))){p=[...x];for(let b of l.values())b.remove();l.clear();for(let b of x){let v=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-ribbon-tab pptxv-ribbon-tab-contextual");v.type="button",v.setAttribute("role","tab"),v.setAttribute(chunk5YHVN3PP_cjs.vr,b),v.textContent=t(chunk5YHVN3PP_cjs.qr(b)),v.addEventListener("click",()=>n(b)),i.insertBefore(v,u),l.set(b,v);}m();}};if(r){u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tabrow-spacer"),i.appendChild(u);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-tabrow-actions");if(!chunk5YHVN3PP_cjs.cq("record",o)){let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-tabrow-record");b.type="button",b.title=t("pptx.titleBar.record"),b.setAttribute("aria-label",t("pptx.titleBar.record"));let v=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-tabrow-record-dot");v.setAttribute("aria-hidden","true");let f=chunkIQ7MDPEN_cjs.w(e,"span");f.textContent=t("pptx.titleBar.record"),b.append(v,f),b.addEventListener("click",()=>r.startRecording()),x.appendChild(b);}i.appendChild(x);}return {el:i,setActive(x){d=x,m();},setContextualTabs:g,setHiddenTabs(x){for(let[b,v]of s)v.hidden=b!=="file"&&x.has(b);},applyScreenTips(x){for(let[b,v]of s){let f=x(a.get(b)??"");f?v.title=f:v.removeAttribute("title");}}}}var sL=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunk5YHVN3PP_cjs.Ic},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunk5YHVN3PP_cjs.Kc},{group:"exit",labelKey:"pptx.animation.exit",presets:chunk5YHVN3PP_cjs.Jc}];function hT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of sL){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-gallery-column"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-animation-gallery-caption");a.textContent=t(i.labelKey);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-gallery-items");for(let p of i.presets){let d=t(`pptx.animation.preset.${p}`),u=H(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,p)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function zo(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 No(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");i.setAttribute("aria-label",t(n));for(let s of o){let a=e.createElement("option");a.value=s,a.textContent=t(`${n}.${s}`),i.appendChild(a);}return r.appendChild(i),{label:r,select:i}}function yT(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint"),i.addEventListener("dragover",a=>a.preventDefault()),i.addEventListener("drop",a=>{a.preventDefault();let l=a.dataTransfer?.getData("text/plain");l&&r.moveAnimation(l,o);});let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-animation-timeline-name");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${n.join(", ")}`,i.append(s),i}function ST(e,t,n,o,r,i,s,a){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-row");l.draggable=s,l.addEventListener("dragstart",m=>m.dataTransfer?.setData("text/plain",n.elementId)),l.addEventListener("dragover",m=>m.preventDefault()),l.addEventListener("drop",m=>{m.preventDefault();let g=m.dataTransfer?.getData("text/plain");g&&a.moveAnimation(g,o);}),l.classList.toggle("is-selected",n.elementId===i);let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-animation-timeline-name");p.textContent=`${o+1}. ${chunk5YHVN3PP_cjs.ud(n,t)}`;let d=H(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>a.reorderAnimation(n.elementId,"up")}),u=H(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>a.reorderAnimation(n.elementId,"down")});return d.setDisabled(!s||o===0),u.setDisabled(!s||o===r-1),l.append(p,d.btn,u.btn),l}function CT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(o,"animations.advancedAnimation");let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let s=H(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),a=H(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunk5YHVN3PP_cjs._d)}),l=H(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),p=H(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});p.btn.title=t("pptx.animations.openPanelTooltip");let d=H(e,{label:t("pptx.animations.trigger"),icon:"cursor",textLabel:t("pptx.animations.trigger"),onClick:n.openAnimationPanel}),u=H(e,{label:t("pptx.animations.painter"),icon:"copy",textLabel:t("pptx.animations.painter"),onClick:()=>{}}),m=H(e,{label:t("pptx.animations.remove"),icon:"trash",textLabel:t("pptx.animations.remove"),onClick:n.removeAnimation});m.btn.title=t("pptx.animations.removeTooltip"),z(l.btn,"animations.animation.effectOptions"),z(p.btn,"animations.advancedAnimation.animationPane"),z(d.btn,"animations.advancedAnimation.trigger"),z(u.btn,"animations.advancedAnimation.animationPainter"),z(m.btn,"animations.advancedAnimation.remove"),r.append(s.btn,a.btn,l.btn,p.btn,d.btn,u.btn,m.btn);let g=[s,a,l,d,m];return {el:o,setDisabled(x){for(let b of g)b.setDisabled(x);u.setDisabled(true);}}}var wT=0;function ET(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup");se(n,"animations.timing");let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),wT+=1;let i=`pptx-animation-start-${wT}`,s=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-field-label");s.htmlFor=i,s.textContent=t("pptx.animations.start");let a=e.createElement("select");a.id=i,a.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),a.appendChild(u);}let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.animations.duration");let p=e.createElement("input");return p.type="number",p.min="0",p.step="0.1",p.value="0.5",p.disabled=true,p.setAttribute("aria-label",t("pptx.animations.duration")),o.append(Ot(e,"animations.timing.start",s,a),Ot(e,"animations.timing.duration",l,p)),{el:n}}function TT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunk5YHVN3PP_cjs.Vd){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-motion-path-gallery-column"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-motion-path-gallery-caption");a.textContent=t(chunk5YHVN3PP_cjs.Wd(i));let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-motion-path-gallery-items");for(let p of chunk5YHVN3PP_cjs.Yd(i)){let d=t(chunk5YHVN3PP_cjs.Xd(p.id)),u=H(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(p.id)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function PT(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),i,s=()=>{chunk5YHVN3PP_cjs.fe(e,i);},a=H(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:s});a.btn.title=t("pptx.animations.previewTooltip");let l=se(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup"),"animations.preview");z(a.btn,"animations.preview.preview");let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");p.appendChild(a.btn);let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),l.append(p,d),r.appendChild(l);let u=se(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup"),"animations.animation"),m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");m.textContent=t("pptx.animations.animation");let g=hT(e,t,(O,B)=>n.addAnimation(O,B));z(g.el,"animations.animation.gallery"),u.append(g.el,m),r.appendChild(u);let x=se(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup"),"animations.motionPath"),b=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");b.textContent=t("pptx.animation.motionPath");let v=TT(e,t,O=>n.applyMotionPath(O));z(v.el,"animations.motionPath.gallery"),x.append(v.el,b),r.appendChild(x);let f=CT(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(f.el),r.appendChild(ET(e,t).el);let S=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline"),y=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");y.textContent=t("pptx.animation.timeline");let h=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timeline-list"),C=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-animation-timing-controls"),w=e.createElement("select");w.setAttribute("aria-label",t("pptx.animation.trigger"));let A=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let O of A){let B=e.createElement("option");B.value=O,B.textContent=t(`pptx.animation.trigger.${O}`),w.appendChild(B);}let P=zo(e,t("pptx.animation.duration"),500),k=zo(e,t("pptx.animation.delay"),0),T=No(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),E=No(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),L=No(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),M=No(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=zo(e,t("pptx.animation.repeatCount"),1),I=zo(e,t("pptx.animations.triggerShape"),0);I.input.type="text",I.input.min="",I.input.max="",C.append(w,P.label,k.label,T.label,E.label,L.label,D.label,M.label,I.label),S.append(y,h,C),r.appendChild(S);let R=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:w.value,durationMs:P.input.valueAsNumber,delayMs:k.input.valueAsNumber,direction:T.select.value,sequence:E.select.value,timingCurve:L.select.value,repeatCount:D.input.valueAsNumber,repeatMode:M.select.value,triggerShapeId:w.value==="onShapeClick"?I.input.value:void 0});};for(let O of [w,T.select,E.select,L.select,M.select])O.addEventListener("change",R);return P.input.addEventListener("change",R),k.input.addEventListener("change",R),D.input.addEventListener("change",R),I.input.addEventListener("change",R),{el:r,update({editable:O,hasSelection:B,selectedElementId:F,animations:V,animationTimelineAnchors:_}){let N=!O||!B;g.setDisabled(N),v.setDisabled(N),a.setDisabled(N),f.setDisabled(N);let W=[...V].sort((K,j)=>(K.order??0)-(j.order??0));i=W.find(({elementId:K})=>K===F);let X=chunk5YHVN3PP_cjs.id(W,_??[]),ie=new Map(W.map(K=>[K.elementId,K]));h.replaceChildren(...X.flatMap((K,j)=>{if(K.kind==="native")return [yT(e,t,K.targetIds,j,n)];let Y=ie.get(K.elementId);return Y?[ST(e,t,Y,j,X.length,F,O,n)]:[]})),S.hidden=W.length===0,C.hidden=!i,w.value=i?.trigger??"onClick",I.input.value=i?.triggerShapeId??"",I.label.hidden=w.value!=="onShapeClick",P.input.value=String(i?.durationMs??500),k.input.value=String(i?.delayMs??0);let G=i?chunk5YHVN3PP_cjs.Hc([i],i.elementId):[];T.label.hidden=G.length===0;for(let K of T.select.options)K.hidden=!G.includes(K.value);T.select.value=chunk5YHVN3PP_cjs.Gc(i,G)??"fromBottom",E.select.value=i?.sequence??"asOne",L.select.value=chunk5YHVN3PP_cjs.Ec(i?.timingCurve),M.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let K of [w,P.input,k.input,T.select,E.select,L.select,M.select,D.input,I.input])K.disabled=!O;}}}function AT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-gallery-host"),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-theme-gallery");r.hidden=true,t.btn.title=n,t.btn.setAttribute("aria-haspopup","true"),t.btn.setAttribute("aria-expanded","false");let i=false,s=null,a=l=>{i=l,r.hidden=!l,t.btn.setAttribute("aria-expanded",String(l)),s?.destroy(),s=l?Ye(r,t.btn):null;};return t.btn.addEventListener("click",l=>{l.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",l=>{i&&!o.contains(l.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function lL(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function kT(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),a=AT(e,H(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle"));a.gallery.setAttribute("role","menu"),a.gallery.setAttribute("aria-label",t("pptx.themes.gallery.ariaLabel"));let l=chunk5YHVN3PP_cjs.Ja.map(x=>{let b=H(e,{label:x.name,text:x.name,onClick:()=>{n.applyPresentationTheme(x.id),a.close();}});return b.btn.setAttribute("role","menuitemradio"),b.btn.setAttribute("aria-checked","false"),b.btn.dataset.themePreset=x.id,a.gallery.appendChild(lL(e,b,`linear-gradient(135deg, ${x.colorScheme.accent1}, ${x.colorScheme.accent2})`)),b}),p=AT(e,H(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{}}),t("pptx.ribbon.editThemeTitle"));p.gallery.classList.add("pptxv-deck-theme-editor"),p.gallery.dataset.deckThemeEditor="";let d=null,u={editable:false,colorScheme:void 0,fontScheme:void 0,themeName:void 0};p.button.btn.addEventListener("click",()=>{d||(d=Vr(e,t,{applyThemeEdit:x=>{n.applyThemeEdit(x),p.close();}}),d.update(u),p.gallery.appendChild(d.el));});let m=H(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});m.btn.title=t("pptx.ribbon.slideSizeTitle");let g=H(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});if(g.btn.title=t("pptx.ribbon.formatBackgroundTitle"),z(a.el,"design.themes.browseThemes"),z(p.el,"design.themes.editTheme"),z(m.btn,"design.customize.slideSize"),z(g.btn,"design.customize.formatBackground"),s.appendChild(q(e,"design.themes",a.el,p.el)),i){let x=Hs(e,"design.variants",t("pptx.ribbon.groupVariants"));for(let b of chunk5YHVN3PP_cjs.or)b.control.startsWith("design.variants.")&&x.row.appendChild(st(e,t,b,i).el);s.appendChild(x.el),i.register({refresh(b,v){let f=chunk5YHVN3PP_cjs.Ka(b.theme)?.id;for(let S of l)S.btn.setAttribute("aria-checked",String(S.btn.dataset.themePreset===f));u={editable:v,colorScheme:b.theme?.colorScheme,fontScheme:b.theme?.fontScheme,themeName:b.theme?.name},d?.update(u);},close(){}});}return s.appendChild(q(e,"design.customize",m.btn,g.btn)),{el:s,setEditable(x){a.button.setDisabled(!x),p.button.setDisabled(!x),g.setDisabled(!x);for(let b of l)b.setDisabled(!x);x||(a.close(),p.close());}}}var pL=[1,2,3,4,6,8,12,16],Zs=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select",control:"draw.tools.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen",control:"draw.tools.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter",control:"draw.tools.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser",control:"draw.tools.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function IT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=se(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.draw"),r.appendChild(s);let a=Zs.map(g=>H(e,{label:t(g.labelKey),icon:g.icon,onClick:()=>n.setTool(g.tool)}));for(let[g,x]of Zs.entries())x.control&&z(a[g].btn,x.control);i.append(...a.map(g=>g.btn)),o.appendChild(r);let l=se(chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rgroup-row");l.appendChild(p);let d=dt(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:so,fallback:"#000000",onSelect:g=>n.setColor(g)}),u=xe(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:pL.map(g=>({label:`${g} px`,value:g})),onSelect:g=>n.setWidth(g)});z(d.el,"draw.tools.penColor"),z(u.el,"draw.tools.penWidth"),p.append(d.el,u.el),o.appendChild(l);let m=[...a,d,u];return {el:o,setEditable(g){for(let x of m)x.setDisabled(!g);},update(g){for(let[x,b]of Zs.entries())a[x].setActive(g.tool===b.tool);d.setValue(g.color),d.setRecentColors(g.recentColors??[]),u.setSelected(g.width),u.setTriggerText(`${g.width} px`);}}}var LT="3.8.0";function MT(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-account");n.appendChild(r);let i={...chunk5YHVN3PP_cjs.Wp,...chunk5YHVN3PP_cjs.Up().profile};r.appendChild(cL(e,t,i,a=>{i=a,chunk5YHVN3PP_cjs.$p(i);}));let s=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-account-section");r.appendChild(s),mL(e,t,s),r.appendChild(uL(e,t)),o?.enabled&&r.appendChild(xL(e,t,o));}function cL(e,t,n,o){let r=n,i=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-account-section"),s=e.createElement("h2");s.textContent=t("pptx.account.profile.title"),i.appendChild(s);let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-account-profile-row"),l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-account-avatar"),p=()=>{l.textContent=chunk5YHVN3PP_cjs.Yp(r),l.style.background=r.avatarColor;};p();let d=e.createElement("label");d.className="pptxv-account-name-field";let u=e.createElement("span");u.textContent=t("pptx.account.profile.nameLabel");let m=e.createElement("input");m.type="text",m.placeholder=t("pptx.account.profile.namePlaceholder"),m.value=r.displayName,m.addEventListener("input",()=>{r={...r,displayName:m.value},p(),o(r);}),d.append(u,m),a.append(l,d),i.appendChild(a);let g=e.createElement("p");g.className="pptxv-account-swatch-label",g.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(g);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-parity-swatch-row"),b=(v,f)=>{r={...r,avatarColor:f},p();for(let S of x.querySelectorAll("button"))S.classList.toggle("is-active",S===v);o(r);};for(let v of chunk5YHVN3PP_cjs.Xp){let f=e.createElement("button");f.type="button",f.className="pptxv-account-color-swatch",f.classList.toggle("is-active",v===r.avatarColor),f.style.background=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>b(f,v)),x.appendChild(f);}return i.appendChild(x),i}function mL(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 s=e.createElement("button");s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.storage.clear"),n.appendChild(s);let a=e.createElement("p");a.className="pptxv-account-notice",a.hidden=true,n.appendChild(a);async function l(){let p=await chunk5YHVN3PP_cjs.Zp();r.textContent=p.presentationCount>0?t("pptx.account.storage.usage",{count:p.presentationCount,size:chunk5YHVN3PP_cjs.ap(p.totalBytes)}):t("pptx.account.storage.usageEmpty");}l(),s.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunk5YHVN3PP_cjs._p(),a.hidden=false,a.textContent=t("pptx.account.storage.clearedNotice"),await l()))();});}function uL(e,t){let n=chunkIQ7MDPEN_cjs.w(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:LT}),n.appendChild(i),n}function xL(e,t,n){let o=chunkIQ7MDPEN_cjs.w(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 a=e.createElement("p");return a.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(a),o}let s=e.createElement("button");return s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.signIn.button"),s.addEventListener("click",()=>n.onSignIn()),o.appendChild(s),o}var kL={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},DT="http://www.w3.org/2000/svg";function RT(e,t){return _o(e,kL[t],17)}function _o(e,t,n){let o=e.createElementNS(DT,"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 s=e.createElementNS(DT,r);for(let[a,l]of Object.entries(i))l!==void 0&&s.setAttribute(a,String(l));o.appendChild(s);}return o}function Ct(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 Js(e,t,n,o){let r=Ct(e,"",n,o);return r.appendChild(RT(e,t)),r}function OT(e,t,n,o){let r=Js(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var KL={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,saveAsPpt:lucide.Database,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus};function FT(e,t,n,o,r,i,s,a=chunk5YHVN3PP_cjs.Zq){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-bs-actions");if(t==="export"&&chunk5YHVN3PP_cjs.cq("export",s))return l;let p={protect:n.openPasswordProtection,inspect:n.openDocumentProperties,embedFonts:n.openFontEmbedding,signatures:n.openDigitalSignatures,versionHistory:n.openVersionHistory,saveAsPptx:n.save,saveAsPpsx:n.saveAsPpsx,saveAsPptm:n.saveAsPptm,saveAsPpt:n.saveAsPpt,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare};for(let d of chunk5YHVN3PP_cjs.kr(chunk5YHVN3PP_cjs.bp(t),a)){if(d.id==="saveAsPptm"&&!o)continue;let u=p[d.id],m=Ct(e,"",()=>r(()=>u?.())),g=e.createElement("b");g.appendChild(_o(e,KL[d.id],22));let x=e.createElement("span"),b=e.createElement("strong");b.textContent=i(d.titleKey);let v=e.createElement("small");v.textContent=i(d.bodyKey),x.append(b,v),m.append(g,x),l.appendChild(m);}return l}function el(e,t){let n=e.createElement("span");return n.textContent=t,n}function VT(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-backstage");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",t("pptx.backstage.title"));let a=e.createElement("aside"),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-bs-back-row"),p=Js(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back")),l.append(p);let d=e.createElement("nav");a.append(l,d);let u=e.createElement("main");s.append(a,u);let m=n.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,g=chunk5YHVN3PP_cjs.jr(chunk5YHVN3PP_cjs.Wo,m),x=g.some(E=>E.id==="home")?"home":g[0]?.id??"home",b=false,v="",f=[];(async()=>{f=await chunk5YHVN3PP_cjs.Zo(t,n.getRecentPresentationsCount());let E=u.querySelector(".pptxv-bs-recent");E&&A(E);})();function S(E){E?.(),E&&o();}function y(E){if(E==="close")return o();if(E==="save")return S(n.save);if(E==="options")return S(n.openSettings);x=E,T();}function h(){d.replaceChildren();for(let E of g){E.group&&!d.querySelector("i")&&d.appendChild(e.createElement("i"));let L=OT(e,E.id,t(E.labelKey),()=>y(E.id));L.setAttribute("data-pptx-backstage-nav-item",""),L.classList.toggle("active",x===E.id),x===E.id&&L.setAttribute("aria-current","page"),d.appendChild(L);}}function C(){let E=e.createElement("h2");E.textContent=t("pptx.backstage.newHeading");let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-bs-templates");for(let M of chunk5YHVN3PP_cjs.Xo){let D=Ct(e,"",()=>S(()=>n.createPresentation(M.id))),I=e.createElement("b");I.style.background=M.preview;let R=e.createElement("strong");R.textContent=t(M.nameKey);let O=e.createElement("small");O.textContent=t(M.descriptionKey),D.append(I,R,O),L.appendChild(D);}u.append(E,L);}function w(){let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-bs-recent"),L=e.createElement("pptx-ui-search");L.className="pptxv-bs-search",L.setAttribute("data-pptx-search-surface",""),L.setAttribute("data-pptx-search-input",""),L.placeholder=t("pptx.backstage.searchPlaceholder"),L.setAttribute("aria-label",L.placeholder),L.value=v,L.addEventListener("input",()=>{v=L.value,A(E);}),u.appendChild(L),x==="open"&&u.appendChild(Ct(e,t("pptx.backstage.browseDevice"),()=>S(n.openFile),"pptxv-bs-primary"));let M=e.createElement("h2");M.textContent=t("pptx.backstage.recentHeading"),A(E),u.append(M,E);}function A(E){let L=e.createElement("header");L.replaceChildren(el(e,t("pptx.backstage.columnName")),el(e,t("pptx.backstage.columnModified")),el(e,t("pptx.backstage.columnSize"))),E.replaceChildren(L);let M=v.trim().toLowerCase(),D=M?f.filter(I=>`${I.name} ${I.location}`.toLowerCase().includes(M)):f;for(let I of D){let R=Ct(e,"",()=>S(()=>n.openRecentFile(I.key))),O=chunkIQ7MDPEN_cjs.w(e,"span","name"),B=e.createElement("b");B.textContent="P";let F=e.createElement("span"),V=e.createElement("strong");V.textContent=I.name;let _=e.createElement("small");_.textContent=I.location,F.append(V,_),O.append(B,F);let N=e.createElement("span");N.textContent=chunk5YHVN3PP_cjs.$o(I.timestamp,Date.now(),t);let W=e.createElement("span");W.textContent=chunk5YHVN3PP_cjs.ap(I.size),R.append(O,N,W),E.appendChild(R);}if(!D.length){let I=e.createElement("p");I.textContent=t("pptx.backstage.noRecent"),E.appendChild(I);}}function P(){u.appendChild(FT(e,x,n,b,S,t,r,m));}function k(){let E=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-bs-card"),L=e.createElement("b");L.appendChild(_o(e,lucide.Settings,24));let M=e.createElement("h2");M.textContent=t("pptx.backstage.optionsTitle");let D=e.createElement("p");D.textContent=t("pptx.backstage.optionsBody"),E.append(L,M,D),E.appendChild(Ct(e,t("pptx.backstage.openOptions"),()=>S(n.openSettings),"pptxv-bs-primary")),u.appendChild(E);}function T(){h(),u.replaceChildren();let E=e.createElement("h1");E.textContent=t(x==="home"?"pptx.backstage.greeting":chunk5YHVN3PP_cjs.Wo.find(M=>M.id===x)?.labelKey??"pptx.backstage.nav.home"),u.appendChild(E),(x==="home"||x==="new")&&C(),(x==="home"||x==="open")&&w(),["info","saveAs","print","share","export"].includes(x)&&P(),x==="options"&&k(),x==="account"&&MT(e,t,u,i);let L=e.createElement("footer");L.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,u.appendChild(L);}return T(),{el:s,setHasMacros(E){b=E,x==="saveAs"&&T();}}}function BT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=q(e,"help.help");o.appendChild(r);let i=H(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")}),s=H(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),a=H(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});return z(i.btn,"help.help.options"),z(s.btn,"help.help.keyboardShortcuts"),z(a.btn,"help.help.accessibility"),chunk5YHVN3PP_cjs.br(n.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,"options")&&r.append(i.btn,s.btn),r.append(a.btn),o}function zT(e,t,n){let o=xe(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunk5YHVN3PP_cjs._l.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 qr(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-select-button"),o=e.createElement("select");o.className="pptxv-select-button-select",o.title=t.selectLabel,o.setAttribute("aria-label",t.selectLabel);for(let[a,l]of t.items.entries()){let p=e.createElement("option");p.value=String(a),p.textContent=l.label,o.appendChild(p);}n.appendChild(o);let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-btn pptxv-btn-pill pptxv-select-button-commit");r.type="button",r.title=t.buttonTitle??t.buttonLabel,r.setAttribute("aria-label",t.buttonLabel),t.icon&&r.appendChild(chunkIQ7MDPEN_cjs.K(e,t.icon));let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let s=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let a=s();a!==void 0&&t.onCommit(a);}),{el:n,setDisabled(a){r.disabled=a;},value:s}}function NT(e,t,n){return qr(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunk5YHVN3PP_cjs.tn.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var $L=[{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 _T(e,t,n){let o=xe(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:$L.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}var qL={freeformShape:"pen",curve:"shapes"};function GT(e,t,n,o){let r=null,i=n.map(s=>{let a=t(chunk5YHVN3PP_cjs.Ks[s]),l=H(e,{label:a,icon:qL[s],textLabel:a,onClick:()=>o(r===s?null:s)});return l.btn.dataset.pptxDrawingTool=s,l.setActive(false),{tool:s,handle:l}});return {buttons:i.map(({handle:s})=>s.btn),setActive(s){r=s;for(let{tool:a,handle:l}of i)l.setActive(a===s);},setDisabled(s){for(let{handle:a}of i)a.setDisabled(s);}}}function UT(e,t,n){let o=H(e,{label:t("pptx.hyperlinkDialog.title"),icon:"link",textLabel:t("pptx.hyperlinkDialog.title"),onClick:n});return o.setDisabled(true),o}function KT(e,t,n){return qr(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunk5YHVN3PP_cjs.oo.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var tl=600,ol=340,WT=64;function $T(e,t,n){let o=WT/tl,r=Math.round(ol*o),i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-option-preview",{width:`${WT}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let s=chunkIQ7MDPEN_cjs.w(e,"div",void 0,{width:`${tl}px`,height:`${ol}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(s);let a=chunk5YHVN3PP_cjs.no(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[a]},canvasSize:{width:tl,height:ol},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,barChart3D:false,lineChart3D:false,areaChart3D:false,pieChart3D:false,presenting:false,registry:chunkIQ7MDPEN_cjs.u(),renderElement:()=>null},u=chunkIQ7MDPEN_cjs.H(a,0,d);return u&&s.appendChild(u),i}function qT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkIQ7MDPEN_cjs.w(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 s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-dialog-header"),a=chunkIQ7MDPEN_cjs.w(e,"h2");a.textContent=t("pptx.smartart.insertTitle");let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-dialog-close");l.type="button",l.setAttribute("aria-label",t("pptx.smartart.close")),l.textContent="\xD7",s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-dialog-body"),d=chunkIQ7MDPEN_cjs.w(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-gallery"),m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(m),p.append(d,u);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-smartart-dialog-footer"),x=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-dialog-cancel");x.type="button",x.textContent=t("pptx.smartart.cancel");let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-dialog-insert");b.type="button",b.textContent=t("pptx.smartart.insert"),b.disabled=true,g.append(x,b),i.append(s,p,g),o.append(r,i);let v="list",f,S=null;function y(k){f=k,b.disabled=false;for(let T of m.querySelectorAll('[role="option"]')){let E=T.dataset.layout===k.layout;T.setAttribute("aria-selected",String(E)),T.classList.toggle("is-selected",E);}}function h(k){k&&(n(k.layout,k.defaultItems),A());}function C(){m.replaceChildren();for(let k of chunk5YHVN3PP_cjs.$l.filter(T=>T.category===v)){let T=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-option");T.type="button",T.dataset.layout=k.layout,T.setAttribute("role","option"),T.setAttribute("aria-selected",String(f?.layout===k.layout)),T.classList.toggle("is-selected",f?.layout===k.layout);let E=$T(e,t,k.layout),L=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-smartart-option-label");L.textContent=t(k.labelKey),T.append(E,L),T.addEventListener("click",()=>y(k)),T.addEventListener("dblclick",()=>h(k)),m.appendChild(T);}}function w(k){v=k,f=void 0,b.disabled=true;for(let T of d.querySelectorAll("button")){let E=T.dataset.category===k;T.classList.toggle("is-active",E),T.setAttribute("aria-pressed",String(E));}C();}for(let k of chunk5YHVN3PP_cjs.am){let T=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-smartart-category");T.type="button",T.dataset.category=k.id,T.textContent=t(k.labelKey),T.addEventListener("click",()=>w(k.id)),d.appendChild(T);}w(v);function A(){o.hidden||(o.hidden=true,S?.focus(),S=null);}function P(k){if(k.key==="Escape"){k.preventDefault(),A();return}if(k.key!=="Tab")return;let T=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(T.length===0)return;let E=T[0],L=T[T.length-1];k.shiftKey&&e.activeElement===E?(k.preventDefault(),L.focus()):!k.shiftKey&&e.activeElement===L&&(k.preventDefault(),E.focus());}return r.addEventListener("click",A),l.addEventListener("click",A),x.addEventListener("click",A),b.addEventListener("click",()=>h(f)),o.addEventListener("keydown",P),{el:o,open(k){let T=e.defaultView?.HTMLElement;S=T&&e.activeElement instanceof T?e.activeElement:null,o.parentElement!==k&&k.appendChild(o),o.hidden=false,i.focus();},close:A}}function jT(e,t,n){let o=qT(e,t,n),r=H(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();}}}function YT(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content");s.classList.add("pptxv-ribbon-insert-content");let a=H(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),l=KT(e,t,C=>n.insert("shape",C)),p=GT(e,t,n.armFreeformTool?n.visibleDrawingTools?.()??[]:[],C=>n.armFreeformTool?.(C)),d=H(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),u=H(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});u.btn.title=t("pptx.ribbon.insertMedia");let m=H(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),g=NT(e,t,C=>n.insertChart(C)),x=jT(e,t,(C,w)=>n.insertSmartArt(C,w)),b=H(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});b.btn.title=t("pptx.insert.insertEquation");let v=zT(e,t,C=>n.insertActionButton(C)),f=_T(e,t,C=>n.insertField(C)),S=UT(e,t,i),y=H(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});z(a.btn,"insert.text.textBox"),z(l.el,"insert.illustrations.shapes"),z(d.btn,"insert.images.pictures"),z(u.btn,"insert.media.media"),z(m.btn,"insert.tables.table"),z(g.el,"insert.illustrations.chart"),z(x.el,"insert.illustrations.smartArt"),z(b.btn,"insert.symbols.equation"),z(v.el,"insert.links.action"),z(f.el,"insert.text.field"),z(S.btn,"insert.links.link"),s.append(q(e,"insert.text",a.btn),q(e,"insert.illustrations",l.el,...p.buttons),q(e,"insert.images",d.btn),q(e,"insert.media",u.btn),q(e,"insert.tables",m.btn),q(e,"insert.illustrations",g.el,x.el),q(e,"insert.symbols",b.btn),q(e,"insert.links",v.el),q(e,"insert.text",f.el),q(e,"insert.links",S.btn),q(e,"insert.text",y.btn));let h=[a,l,p,d,u,m,g,x,b,v,f,y];return {el:s,setEditable(C){for(let w of h)w.setDisabled(!C);},setHasSelection(C){S.setDisabled(!C);},setFreeformTool(C){p.setActive(C);}}}function XT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=p=>{let d=H(e,{label:t(p),text:t(p),onClick:()=>{}});return d.setDisabled(true),d.btn},s=i("pptx.record.cameo"),a=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),l=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,q(e,"record.camera",z(s,"record.camera.cameo")),q(e,"record.record",z(a.btn,"record.record.fromBeginning"),z(l.btn,"record.record.fromCurrent")),q(e,"record.manage",z(i("pptx.record.clear"),"record.manage.clear"),z(i("pptx.record.resetToCameo"),"record.manage.reset")),q(e,"record.help",z(i("pptx.record.learnMore"),"record.help.learnMore"))),o}function QT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=(g,x)=>H(e,{label:t(g),text:t(g),onClick:x}).btn,i=g=>{let x=H(e,{label:t(g),text:t(g),onClick:()=>{}});return x.setDisabled(true),x.btn},s=r("pptx.review.spelling",n.toggleSpellCheck);s.title=t("pptx.review.toggleSpellCheck");let a=H(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});a.btn.title=t("pptx.review.accessibilityCheckTooltip");let l=r("pptx.review.language",()=>n.openSettings("general"));l.title=t("pptx.review.languageTooltip");let p=H(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});p.btn.title=t("pptx.ribbon.compareTitle");let d=r("pptx.toolbar.comments",n.openComments);d.title=t("pptx.review.toggleComments");let u=r("pptx.review.showComments",n.openComments),m=(g,x)=>z(i(g),x);return o.append(q(e,"review.proofing",z(s,"review.proofing.spelling"),m("pptx.review.thesaurus","review.proofing.thesaurus")),q(e,"review.accessibility",z(a.btn,"review.accessibility.check")),q(e,"review.language",m("pptx.review.translate","review.language.translate"),l),q(e,"review.compare",m("pptx.review.markAllRead","review.compare.markAllRead"),z(p.btn,"review.compare.compare")),q(e,"review.comments",z(d,"review.comments.newComment"),m("pptx.common.delete","review.comments.delete"),m("pptx.common.previous","review.comments.previous"),m("pptx.common.next","review.comments.next"),z(u,"review.comments.showComments")),q(e,"review.protect",m("pptx.review.readOnly","review.protect.readOnly"),m("pptx.review.restrictPermission","review.protect.restrictPermission")),q(e,"review.ink",m("pptx.review.hideInk","review.ink.hideInk"))),chunk5YHVN3PP_cjs.br(n.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,"options")||l.remove(),{el:o,setEditable:g=>p.setDisabled(!g)}}function jL(e,t,n,o){let r=t(n.labelKey),i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-show-option"),s=e.createElement("input");return s.type="checkbox",s.disabled=n.unsupported,s.setAttribute("aria-label",r),n.unsupported||s.addEventListener("change",()=>{let a=chunk5YHVN3PP_cjs.Gi(n.id,s.checked);a&&o.updateShowOptions(a);}),i.append(s,e.createTextNode(r)),{el:i,descriptor:n,input:s}}function ZT(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning});i.btn.title=t("pptx.slideShow.fromBeginningTooltip");let s=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent});s.btn.title=t("pptx.slideShow.fromCurrentTooltip");let a=H(e,{label:t("pptx.slideShow.presenterView"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView});a.btn.title=t("pptx.slideShow.presenterViewTooltip");let l=H(e,{label:t("pptx.slideShow.customShow"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),p=chunk5YHVN3PP_cjs.cq("broadcast",o)?null:H(e,{label:t("pptx.slideShow.broadcast"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast});p&&(z(p.btn,"slideShow.present.broadcast"),p.btn.title=t("pptx.slideShow.broadcastTooltip"));let d=H(e,{label:t("pptx.slideShow.rehearseCoach"),text:t("pptx.slideShow.rehearseCoach"),onClick:()=>{}});d.setDisabled(true);let u=H(e,{label:t("pptx.slideShow.setUp"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp});u.btn.title=t("pptx.slideShow.setUpTooltip");let m=H(e,{label:t("pptx.slideShow.hideSlide"),text:t("pptx.slideShow.hideSlide"),onClick:()=>n.toggleHideSlide()});m.btn.setAttribute("aria-pressed","false");let g=H(e,{label:t("pptx.slideShow.rehearseTimings"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal});g.btn.title=t("pptx.slideShow.rehearseTimingsTooltip");let x=H(e,{label:t("pptx.titleBar.record"),text:t("pptx.titleBar.record"),onClick:n.startRehearsal}),b=H(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles});b.btn.title=t("pptx.slideShow.subtitlesTooltip");let v=H(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings}),f=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-show-options"),S=chunk5YHVN3PP_cjs.Ei.map(h=>jL(e,t,h,n));f.append(...S.map(h=>h.el));let y=()=>{let h=n.showOptions();for(let C of S)C.input.checked=C.descriptor.unsupported?false:chunk5YHVN3PP_cjs.Fi(h,C.descriptor.id);};return y(),z(i.btn,"slideShow.startSlideShow.fromBeginning"),z(s.btn,"slideShow.startSlideShow.fromCurrent"),z(a.btn,"slideShow.present.presenterView"),z(l.btn,"slideShow.startSlideShow.customShow"),z(d.btn,"slideShow.setUp.rehearseWithCoach"),z(u.btn,"slideShow.setUp.setUpSlideShow"),z(m.btn,"slideShow.setUp.hideSlide"),z(g.btn,"slideShow.setUp.rehearseTimings"),z(x.btn,"slideShow.setUp.record"),z(b.btn,"slideShow.captions.subtitles"),z(v.btn,"slideShow.captions.subtitleSettings"),r.append(q(e,"slideShow.startSlideShow",i.btn,s.btn),q(e,"slideShow.present",a.btn),q(e,"slideShow.startSlideShow",l.btn),q(e,"slideShow.present",...p?[p.btn]:[]),q(e,"slideShow.setUp",d.btn,u.btn,m.btn,g.btn,x.btn),f,q(e,"slideShow.captions",b.btn,v.btn)),{el:r,syncOptions:y,setSubtitlesVisible:h=>b.setActive(h),setHideSlideActive:h=>{m.setActive(h),m.btn.setAttribute("aria-pressed",String(h));}}}function JT(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-advance"),r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-transition-advance-row"),s=e.createElement("input");s.type="checkbox",s.checked=true,s.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(s,e.createTextNode(t("pptx.ribbon.onMouseClick")));let a=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-transition-advance-row"),l=e.createElement("input");l.type="checkbox",l.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let p=e.createElement("input");p.type="text",p.className="pptxv-transition-advance-seconds",p.value=chunk5YHVN3PP_cjs.zi,p.disabled=true,p.title=t("pptx.ribbon.advanceAfterSeconds"),p.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),a.append(l,e.createTextNode(t("pptx.ribbon.afterDuration")),p);let d=()=>({advanceOnClick:s.checked,advanceAfter:l.checked,advanceAfterText:p.value}),u=false,m=()=>{p.disabled=u||!l.checked;};return s.addEventListener("change",()=>n(d())),l.addEventListener("change",()=>{m(),n(d());}),p.addEventListener("change",()=>n(d())),p.addEventListener("keydown",g=>g.stopPropagation()),z(i,"transitions.timing.advanceOnClick"),z(a,"transitions.timing.advanceAfter"),o.append(i,a),{el:o,setValue(g){s.checked=g.advanceOnClick,l.checked=g.advanceAfter,e.activeElement!==p&&(p.value=g.advanceAfterText),m();},setDisabled(g){u=g,s.disabled=g,l.disabled=g,m();}}}function YL(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function eP(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunk5YHVN3PP_cjs.Ai},s=H(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunk5YHVN3PP_cjs.Li(chunk5YHVN3PP_cjs.Ci(void 0,i),e)});s.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(s.btn);let a=H(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});a.btn.title=t("pptx.ribbon.applyTransitionToAll");function l(){for(let C of m)C.handle.setActive(C.type===i.type);}let p=C=>{i={...i,...C},l(),n.applyDraft(i,false);},d=JT(e,t,C=>p(C)),u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-transition-gallery"),m=chunk5YHVN3PP_cjs.yi.map(C=>{let w=H(e,{label:t(C.labelKey),text:t(C.labelKey),onClick:()=>p({type:C.type})});return u.appendChild(w.btn),{type:C.type,handle:w}});r.appendChild(u);let g=re(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:C=>p({durationSec:Math.max(0,C)})});g.setValue(i.durationSec),g.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(g.el);let x=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-transition-sound"),b=e.createElement("select");b.setAttribute("aria-label",t("pptx.ribbon.sound"));let v=e.createElement("input");v.type="file",v.accept="audio/*",v.style.display="none";let f=e.createElement("button");f.type="button",f.className="pptxv-transition-sound-preview",f.setAttribute("aria-label",t("pptx.animation.sound.preview")),f.textContent="\u25B6",f.disabled=true,x.append(e.createTextNode(t("pptx.ribbon.sound")),b,f,v),r.appendChild(x);function S(){let C=n.readTransition();b.replaceChildren();for(let w of chunk5YHVN3PP_cjs.ri(C)){let A=e.createElement("option");A.value=w.value,A.textContent=w.i18nKey?t(w.i18nKey):w.label??"",b.appendChild(A);}b.value=chunk5YHVN3PP_cjs.si(C),f.disabled=!chunk5YHVN3PP_cjs.vi(C);}S(),b.addEventListener("change",()=>{if(b.value===chunk5YHVN3PP_cjs.qi){v.click(),b.value=chunk5YHVN3PP_cjs.si(n.readTransition());return}if(b.value===chunk5YHVN3PP_cjs.pi){n.applyChange(chunk5YHVN3PP_cjs.wi());return}let C=chunk5YHVN3PP_cjs.ui(b.value);C&&n.applyChange(C);}),f.addEventListener("click",()=>{let C=chunk5YHVN3PP_cjs.vi(n.readTransition());if(!C)return;let w=chunk5YHVN3PP_cjs.nd(C);w&&Mt(w.dataUrl);}),v.addEventListener("change",()=>{let C=v.files?.[0];v.value="",C&&chunk5YHVN3PP_cjs.xi(C).then(w=>{w&&n.applyChange(chunk5YHVN3PP_cjs.ti({name:C.name,dataUrl:w}));});}),r.appendChild(a.btn),r.appendChild(d.el);let y=H(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});y.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(y.btn),z(s.btn,"transitions.preview.preview"),z(u,"transitions.transitionToThisSlide.gallery"),z(g.el,"transitions.timing.duration"),z(x,"transitions.timing.sound"),z(a.btn,"transitions.timing.applyToAll"),r.replaceChildren(q(e,"transitions.preview",s.btn),q(e,"transitions.transitionToThisSlide",u),q(e,"transitions.timing",g.el,x,a.btn,d.el),y.btn);let h=()=>{l(),g.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){S();let C=n.readDraft()??chunk5YHVN3PP_cjs.Ai;YL(C,i)||(i=C,h());},setEditable(C){for(let w of m)w.handle.setDisabled(!C);g.setDisabled(!C),b.disabled=!C,a.setDisabled(!C),d.setDisabled(!C);}}}function tP(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=(T,E)=>H(e,{label:t(T),text:t(T),onClick:E}),s=T=>{let E=i(T,()=>{});return E.setDisabled(true),E.btn},a=i("pptx.view.normal",n.normalView);a.btn.title=t("pptx.statusBar.normalView");let l=i("pptx.slideSorter.title",n.openSlideSorter);l.btn.title=t("pptx.view.slideSorterTooltip");let p=i("pptx.view.outlineView",n.openOutlineView);p.btn.title=t("pptx.view.outlineViewTooltip");let d=i("pptx.view.readingView",n.openReadingView),u=i("pptx.master.title",()=>n.toggleMasterView?.());u.btn.title=t("pptx.view.slideMasterTooltip");let m=i("pptx.ruler.rulers",()=>n.toggleViewOption("showRulers")),g=i("pptx.grid.grid",()=>n.toggleViewOption("showGrid")),x=i("pptx.view.guides",()=>n.toggleViewOption("showGuides"));x.btn.title=t("pptx.ribbon.toggleGuides");let b=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),v=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),f=i("pptx.view.selection",n.openSelectionPane);f.btn.title=t("pptx.selectionPane.title");let S=i("pptx.ribbon.eyedropper",n.activateEyedropper);S.btn.title=t("pptx.view.eyedropperTooltip");let y=i("pptx.view.hGuide",()=>n.addGuide("h"));y.btn.title=t("pptx.view.addHorizontalGuide");let h=i("pptx.view.vGuide",()=>n.addGuide("v"));h.btn.title=t("pptx.view.addVerticalGuide");let C=!chunk5YHVN3PP_cjs.cq("zoom",o),w=C?i("pptx.view.zoomToFit",n.zoomToFit):null;w&&(w.btn.title=t("pptx.view.zoomToFitTooltip"));let A=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());A.btn.dataset.testid="template-edit-toggle",A.btn.title=t("pptx.view.templateEditingTooltip");let P=(T,E)=>z(T.btn,E),k=(T,E)=>z(s(T),E);return r.append(q(e,"view.presentationViews",P(a,"view.presentationViews.normal"),P(l,"view.presentationViews.slideSorter"),P(p,"view.presentationViews.outline"),P(d,"view.presentationViews.readingView")),q(e,"view.masterViews",P(u,"view.masterViews.slideMaster"),k("pptx.master.handoutMasterTitle","view.masterViews.handoutMaster"),k("pptx.master.notesMasterTitle","view.masterViews.notesMaster")),q(e,"view.show",P(m,"view.show.ruler"),P(g,"view.show.gridlines"),P(x,"view.show.guides"),P(b,"view.show.snapToGrid"),P(f,"view.show.selectionPane"),P(S,"view.show.eyedropper"),P(v,"view.show.snapToShape"),Ot(e,"view.show.addGuide",y.btn,h.btn)),q(e,"view.zoom",...C?[k("pptx.slideSorter.zoom","view.zoom.zoom"),w?.btn??[]].flat():[]),q(e,"view.window",P(A,"view.window.templateEditing"),k("pptx.view.macros","view.window.macros"))),w&&z(w.btn,"view.zoom.fitToWindow"),{el:r,setEditable(T){A.setDisabled(!T),u.setDisabled(!T),S.setDisabled(!T);},setViewOptions(T){m.setActive(T.showRulers),g.setActive(T.showGrid),x.setActive(T.showGuides),b.setActive(T.snapToGrid),v.setActive(T.snapToShape);},setTemplateEditing(T){let E=t(T?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");A.btn.textContent=E,A.btn.title=t("pptx.view.templateEditingTooltip"),A.btn.setAttribute("aria-label",E),A.setActive(T);}}}function jr(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let s=vT(e,t,n,o);i.append(s.el);let a=Qs(e,t,G=>O(G),o,{startRecording:()=>n.slideShow.startRehearsal()});a.el.hidden=true,i.appendChild(a.el);let l=Rs(e,t,n.findReplace);i.appendChild(l.el);let p=FE(e,t,(G,K)=>K?n.edit.updateEquation(K,G):n.insert.insertEquation(G));i.appendChild(p.el);let d=VE(e,t,n.edit);i.appendChild(d.el);let u=yt(G=>n.edit.applyRibbonGalleryResult(G)),m=G=>chunk5YHVN3PP_cjs.cq(G,o),g=m("file")?null:VT(e,t,n.file,()=>O("home"),o,r),x=m("home")?null:xT(e,t,{edit:n.edit,onToggleFindReplace:()=>l.toggle(),hiddenActions:o,galleryHub:u}),b=m("insert")?null:YT(e,t,n.insert,()=>p.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=m("draw")?null:IT(e,t,n.draw),f=false,S=()=>n.nav.toggleInspector?.(),y=()=>{n.nav.clearSelection?.(),f||S();},h=m("design")?null:kT(e,t,n.design,()=>d.toggle(),y,u),C=m("transitions")?null:eP(e,t,n.transitions,S),w=m("animations")?null:PT(e,t,n.edit,S),A=m("slideShow")?null:ZT(e,t,n.slideShow,o),P=m("record")?null:XT(e,t,n.slideShow),k=m("review")?null:QT(e,t,n.nav),T=m("view")?null:tP(e,t,n.nav,o),E=m("help")?null:BT(e,t,n.nav),L={file:g?.el,home:x?.el,insert:b?.el,draw:v?.el,design:h?.el,transitions:C?.el,animations:w?.el,slideShow:A?.el,record:P??void 0,review:k?.el,view:T?.el,help:E??void 0},M=chunk5YHVN3PP_cjs.dq(Bo,o);for(let G of M){let K=L[G.id];K&&(K.hidden=true,i.appendChild(K));}let D=zE(e,t,u);for(let[G,K]of D)K.hidden=true,L[G]=K;let I=M.find(G=>G.id===$r)?.id??M[0]?.id??$r,R=I;function O(G){if(L[G]){G!==R&&u.closeAll(),R=G,a.setActive(G);for(let K of Object.keys(L)){let j=L[K];j&&(j.hidden=K!==G);}}}O(R);let B,F={hasClipboard:false,slideCount:0,selectedCount:0},V=()=>{let G=chunk5YHVN3PP_cjs.pr(B??null,n.nav.getCustomization?.());a.setContextualTabs(G),NE(i,D,G);let K=chunk5YHVN3PP_cjs.rr(R,G,I);K!==R&&O(K);},_=()=>{u.sync(F.galleryContext,W),V(),x?.update(gT(W,B,F));},N=()=>{w?.update({editable:W,hasSelection:B!==void 0,selectedElementId:F.selectedElementId,animations:F.animations??[],animationTimelineAnchors:F.animationTimelineAnchors??[]});},W=false,X=new Set;return {el:i,update(){},setEditState(G){s.setEditState(G),a.el.hidden=!G.editable;},setNotesExpanded(){},setAutosaveStatus:(G,K)=>s.setAutosaveStatus(G,K),setEditable(G){W=G,k?.setEditable(G),T?.setEditable(G),b?.setEditable(G),v?.setEditable(G),l.setEditable(G),p.setEditable(G),d.setEditable(G),h?.setEditable(G),C?.setEditable(G),C?.sync(),A?.syncOptions(),_(),N();},setDrawState:G=>{v?.update(G),b?.setFreeformTool(G.freeformTool??null);},setTemplateEditing:G=>T?.setTemplateEditing(G),setViewOptions:G=>T?.setViewOptions(G),setHasMacros:G=>g?.setHasMacros(G),setSubtitlesVisible:G=>A?.setSubtitlesVisible(G),setHideSlideActive:G=>A?.setHideSlideActive(G),setInspectorOpen:G=>{f=G,s.setInspectorOpen(G);},toggleFindReplace:()=>l.toggle(),openEquationEditor:(G,K)=>p.openEdit(G,K),showDefaultTab:()=>O(I),setHiddenOptionTabs:G=>{if(X=new Set(G.filter(K=>K!=="file")),a.setHiddenTabs(X),X.has(R)){let K=X.has("home")?M.find(j=>!X.has(j.id))?.id:"home";K&&O(K);}},applyScreenTips:G=>a.applyScreenTips(G),updateSelection(G,K){B=G,F=K,b?.setHasSelection(G!==void 0),_(),N();}}}var oP=0;function XL(){return oP+=1,`pptxv-ribbon-${oP}`}function nP(e,t,n){let o=XL();t.setAttribute(chunk5YHVN3PP_cjs.Xq,o);let r=e.createElement("style");r.dataset.pptxRibbonCustomization="";let i=s=>{r.textContent=chunk5YHVN3PP_cjs.Yq(s??chunk5YHVN3PP_cjs.Zq,o);};return i(n),t.appendChild(r),{el:r,token:o,update:i}}function rP(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-run-program-notices");o.dataset.testid="pptx-run-program-notices",o.hidden=true,o.setAttribute("style",chunk5YHVN3PP_cjs.Jo()),o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.hyperlink.actionRunProgram"));let r=chunk5YHVN3PP_cjs.Tj(typeof navigator>"u"?void 0:navigator);function i(s){let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-run-program-notice");a.dataset.testid="pptx-run-program-notice",a.dataset.target=s.target,a.setAttribute("role","status");let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-run-program-notice-message");if(l.textContent=t(s.messageKey,{target:s.target}),a.appendChild(l),r){let d=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-run-program-notice-copy");d.type="button",d.dataset.testid="pptx-run-program-notice-copy",d.textContent=t(s.copyLabelKey),d.addEventListener("click",()=>{navigator.clipboard.writeText(s.target);}),a.appendChild(d);}let p=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-run-program-notice-dismiss");return p.type="button",p.dataset.testid="pptx-run-program-notice-dismiss",p.setAttribute("aria-label",t("pptx.compatibility.dismiss")),p.appendChild(chunkIQ7MDPEN_cjs.K(e,"close")),p.addEventListener("click",()=>n(s.id)),a.appendChild(p),a}return {el:o,update(s){o.hidden=s.length===0,o.replaceChildren(...s.map(i));}}}function nl(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-shortcuts-panel");n.hidden=true,n.dataset.pptxShortcutsPanel="true",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false"),n.setAttribute("aria-label",t("pptx.shortcuts.title"));let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-shortcuts-header"),r=chunkIQ7MDPEN_cjs.w(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-shortcuts-close");i.type="button",i.textContent=t("pptx.shortcuts.close"),i.setAttribute("aria-label",t("pptx.common.close")),o.append(r,i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-shortcuts-list");for(let l of chunk5YHVN3PP_cjs.yp){let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-shortcuts-row"),d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-shortcuts-action");d.textContent=t(l.actionKey);let u=chunkIQ7MDPEN_cjs.w(e,"kbd","pptxv-shortcuts-keys");u.textContent=l.shortcut,p.append(d,u),s.appendChild(p);}n.append(o,s);let a=()=>{n.hidden=true;};return i.addEventListener("click",a),{el:n,toggle(){n.hidden=!n.hidden;},close:a,isOpen:()=>!n.hidden}}function iP(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-statusbar"),s=()=>{let P=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-counter");a.setAttribute("aria-live","polite");let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-text");l.textContent=t("pptx.statusBar.language");let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(a,s(),l,s(),p),i.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-spacer"));let d=false,u="",m="idle",g=()=>{p.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),p.classList.toggle("is-saving",m==="saving"),p.classList.toggle("is-error",m==="error");};g();let x=!chunk5YHVN3PP_cjs.cq("notes",o),b=!chunk5YHVN3PP_cjs.cq("fullscreen",o),v=!chunk5YHVN3PP_cjs.cq("zoom",o),f=null;if(x){f=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),f.type="button",f.title=t("pptx.statusBar.toggleNotes"),f.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),f.setAttribute("aria-pressed","false"),f.setAttribute("data-pptx-compact",""),f.appendChild(QL(e,"sticky-note"));let P=chunkIQ7MDPEN_cjs.w(e,"span");P.textContent=t("pptx.notes.title"),f.appendChild(P),f.addEventListener("click",n.toggleNotes);}let S=H(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});S.btn.setAttribute("data-pptx-compact","");let y=H(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});y.btn.setAttribute("data-pptx-compact","");let h=b?H(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;h?.btn.setAttribute("data-pptx-compact","");let C=null,w=null,A=null;return v&&(C=H(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),C.btn.setAttribute("data-pptx-compact",""),w=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-statusbar-zoom"),w.type="button",w.title=t("pptx.statusBar.zoomToFit"),w.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),w.setAttribute("data-pptx-compact",""),w.addEventListener("click",n.zoomToFit),A=H(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),A.btn.setAttribute("data-pptx-compact","")),i.append(...f?[f]:[],s(),S.btn,y.btn,...h?[h.btn]:[],...[],s(),...C&&w&&A?[C.btn,w,A.btn]:[]),{el:i,update({current:P,total:k,zoomPercent:T}){a.textContent=k>0?t("pptx.statusBar.slideOf",{current:P+1,total:k}):t("pptx.statusBar.noSlides"),w&&(w.textContent=`${Math.round(T)}%`);},setNotesExpanded(P){f?.setAttribute("aria-pressed",String(P)),f?.classList.toggle("is-active",P);},setSaveStatus(P,k){u=P,m=k,g();},setDirty(P){d=P,g();},setPresenting(P){S.btn.classList.toggle("is-active",!P),h?.btn.classList.toggle("is-active",P);}}}function QL(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-statusbar-icon");return n.appendChild(ZL(e,t)),n}function ZL(e,t){return chunkIQ7MDPEN_cjs.K(e,t)}function Yr(e){return e.masterViewTarget?{document:{slideMasters:e.slideMasters,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster},target:{tab:e.masterViewTab,masterIndex:e.masterViewTarget.masterIndex,layoutIndex:e.masterViewTarget.layoutIndex}}:null}function U(e){let t=Yr(e);if(t)return chunk5YHVN3PP_cjs.gp(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function aP(e,t){return Yr(e)||!e.editTemplateMode||chunk5YHVN3PP_cjs.Le(t)?U(e):e.slides[e.currentSlide]?.elements??[]}function sP(e,t,n){return Yr(e)||!e.editTemplateMode||chunk5YHVN3PP_cjs.Le(t)?Z(e,n):{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:n}:o)}}function Z(e,t){let n=Yr(e);if(n){let r=chunk5YHVN3PP_cjs.hp(n.document,n.target,t);return r?.slideMasters?{slideMasters:r.slideMasters}:r?.notesMaster?{notesMaster:r.notesMaster}:r?.handoutMaster?{handoutMaster:r.handoutMaster}:{slideMasters:e.slideMasters}}let o=e.slides[e.currentSlide];return o?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[o.id]:t}}:{slides:e.slides.map((r,i)=>i===e.currentSlide?{...r,elements:t}:r)}:{slides:e.slides}}function J(e,t){return U(e).find(n=>n.id===t)}function Go(e){return chunk5YHVN3PP_cjs.ns({mruColors:e.presentationProperties.mruColors})}function ct(e,t){let n=e.get(),o=Go(n),r=chunk5YHVN3PP_cjs.os(o,t);r!==o&&e.set({presentationProperties:{...n.presentationProperties,...chunk5YHVN3PP_cjs.ps(r)}});}function JL(e){return e&&chunk5YHVN3PP_cjs.f(e)?{fillColor:e.shapeStyle?.fillColor,fillColorRef:e.shapeStyle?.fillColorRef,strokeColor:e.shapeStyle?.strokeColor,strokeColorRef:e.shapeStyle?.strokeColorRef,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,fillColorRef:void 0,strokeColor:void 0,strokeColorRef:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function rl(e,t=null,n=[],o=null,r=new Map,i=null,s=[],a=void 0){let l=JL(e),p=e?chunk5YHVN3PP_cjs.Lg(e):void 0,d=e?chunk5YHVN3PP_cjs.Ym(e):void 0,u=e?chunk5YHVN3PP_cjs._m(e):void 0,m=e?chunk5YHVN3PP_cjs.an(e):void 0,g=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunk5YHVN3PP_cjs.af(e),croppable:chunk5YHVN3PP_cjs._e(e,"crop"),arrowheadsChangeable:chunk5YHVN3PP_cjs._e(e,"changeArrowheads"),canShape:Wr(e),canText:Le(e),isImage:e!==void 0&&chunk5YHVN3PP_cjs.d(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,isGroup:e?.type==="group",groupChildCount:e?.type==="group"&&Array.isArray(e.children)?e.children.length:void 0,isOle:e?.type==="ole",oleObjectType:e?.type==="ole"?e.oleObjectType:void 0,oleFileName:e?.type==="ole"?e.fileName:void 0,oleIsLinked:e?.type==="ole"&&e.isLinked===true,oleName:e?.type==="ole"?e.oleName:void 0,oleElement:e?.type==="ole"?e:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:l.fillColor,fillColorRef:l.fillColorRef,strokeColor:l.strokeColor,strokeColorRef:l.strokeColorRef,strokeWidth:l.strokeWidth,shapeStyle:e&&chunk5YHVN3PP_cjs.f(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:l.fillOpacity,strokeOpacity:l.strokeOpacity,gradientEnabled:e!==void 0&&chunk5YHVN3PP_cjs.Sm(e),gradient:e?chunk5YHVN3PP_cjs.Rm(e):chunk5YHVN3PP_cjs.Xm(),vAlign:p?.vAlign??"top",textWrap:e?chunk5YHVN3PP_cjs.Og(e):"square",autoFitMode:e?chunk5YHVN3PP_cjs.Pg(e):"none",characterSpacing:p?.characterSpacing??0,lineSpacing:p?.lineSpacing??1,lineSpacingExactPt:p?.lineSpacingExactPt??null,paragraphSpacingBefore:p?.paragraphSpacingBefore??0,paragraphSpacingAfter:p?.paragraphSpacingAfter??0,paragraphIndent:p?.paragraphIndent??0,paragraphMarginLeft:p?.paragraphMarginLeft??0,textDirection:p?.textDirection??"horizontal",textRtl:p?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:d?.brightness??0,imageContrast:d?.contrast??0,imageSaturation:d?.saturation??0,imageArtisticEffect:e&&chunk5YHVN3PP_cjs.d(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunk5YHVN3PP_cjs.d(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunk5YHVN3PP_cjs.d(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunk5YHVN3PP_cjs.d(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunk5YHVN3PP_cjs.d(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunk5YHVN3PP_cjs.d(e)?e.imageEffects?.colorWash:void 0,altText:e?chunk5YHVN3PP_cjs.Dm(e).altText:"",title:e?chunk5YHVN3PP_cjs.Dm(e).title:"",showAccessibilitySection:e!==void 0&&chunk5YHVN3PP_cjs.Em(e),chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunk5YHVN3PP_cjs.r(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunk5YHVN3PP_cjs.r(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:u?.cropLeft??0,cropTop:u?.cropTop??0,cropRight:u?.cropRight??0,cropBottom:u?.cropBottom??0,tableHeaderRow:m?.firstRowHeader??false,tableBandedRows:m?.bandedRows??false,tableBandedColumns:m?.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:m?.cellPadding??0,selectedTableCell:g?t:null,selectedTableCells:g?n:[],tableCellStyle:g?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(x=>x.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0,recentColors:s,themeColorMap:a}}function eM(e){let t=U(e);return e.selectedElementIds.every(n=>chunk5YHVN3PP_cjs._e(t.find(o=>o.id===n)??null,"group"))}function tM(e){let t=U(e);return e.selectedElementIds.map(n=>t.find(o=>o.id===n)).filter(n=>n!==void 0)}function Uo(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 oM(e,t,n){return {element:t??null,themeColorMap:e.colorScheme?chunk5YHVN3PP_cjs.P(e.colorScheme):void 0,theme:{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme},resolveStyleMatrix:n?o=>n.resolveStyleMatrixReferences(o):void 0}}function lP(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||(o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen),t.presenting))return;let s=i?e.selectedElement(t):void 0;o?.updateSelection(s,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,selectionGroupable:eM(t),formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],animationTimelineAnchors:t.slides[t.currentSlide]?.animationTimelineAnchors??[],layouts:Uo(t),layoutPreviews:e.layoutPreviews?.(),currentLayoutPath:t.slides[t.currentSlide]?.layoutPath,themeFonts:{heading:t.fontScheme?.majorFont?.latin,body:t.fontScheme?.minorFont?.latin},embeddedFontFamilies:t.embeddedFonts.map(l=>l.name),customFontFamilies:t.customFontFamilies,recentColors:Go(t),themeColorMap:t.colorScheme?chunk5YHVN3PP_cjs.P(t.colorScheme):void 0,canMergeShapes:i&&chunk5YHVN3PP_cjs.Kl(tM(t)),canCrop:t.selectedElementIds.length===1&&chunk5YHVN3PP_cjs.Ys(s),cropActive:t.cropSession!==null,galleryContext:oM(t,s,e.getHandler?.())}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth,recentColors:Go(t),freeformTool:t.freeformTool}),r?.update(rl(s,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection,Go(t),t.colorScheme?chunk5YHVN3PP_cjs.P(t.colorScheme):void 0));let a=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,hasDeckElements:t.slides.some(l=>l.elements.length>0),elements:a?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:s?.id,comments:a?.comments??[],commentMentionAuthors:Hr(t.modernCommentAuthors,t.commentAuthors),customShows:t.customShows,docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:a,editTemplateMode:t.editTemplateMode,slideMasters:t.slideMasters,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.themeName,tagCollections:t.tagCollections,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function pP(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk5YHVN3PP_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function dP(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=()=>{o?.remove(),o=null,r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(p,d,u)=>{r?.remove();let m=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu",{left:`${d}px`,top:`${u}px`});m.setAttribute("role","menu"),m.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));for(let g of Uo(n.get())){let x=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-context-menu-item");x.type="button",x.setAttribute("role","menuitem"),x.textContent=g.name,x.addEventListener("click",()=>{n.set({currentSlide:p}),e.getEditActions().applyLayout(g.path),s();}),m.appendChild(x);}(e.host.closest(".pptxv")??t.body).appendChild(m),pP(m,t,d,u),r=m;},l=(p,d,u)=>{let m=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-context-menu-item");return m.type="button",m.setAttribute("role","menuitem"),m.textContent=p.countLabelKey?e.getTranslator()(p.labelKey,{count:u}):e.getTranslator()(p.labelKey),m.disabled=p.disabled===true,m.addEventListener("click",()=>{switch(p.id){case "new-slide":s(),e.addSlideAfter(d.index);break;case "duplicate":s(),e.duplicateSlides(d.selectedIndexes);break;case "delete":s(),e.deleteSlides(d.selectedIndexes);break;case "layout":o?.remove(),o=null,a(d.index,d.x,d.y);break;case "hide":s(),e.toggleHideSlides(d.selectedIndexes);break;case "add-section":s(),e.getEditActions().sections.addSection(e.getTranslator()("pptx.sections.defaultName"),d.index);break;default:s();}}),m};return {open(p,d){s();let u=p.selectedIndexes.map(g=>d[g]).filter(g=>!!g),m=chunk5YHVN3PP_cjs.Fl({selectedCount:u.length,hasHiddenInSelection:u.some(g=>g.hidden),hasVisibleInSelection:u.some(g=>!g.hidden),wouldDeleteAllSlides:u.length>=d.length});o=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu",{left:`${p.x}px`,top:`${p.y}px`}),o.dataset.pptxContextMenu="true",o.dataset.pptxSlidePaneContextMenu="true",o.setAttribute("role","menu"),o.setAttribute("aria-label",e.getTranslator()("pptx.slidesPane.contextMenu.newSlide"));for(let g of m){if(g.separatorBefore){let x=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu-separator");x.setAttribute("role","separator"),o.appendChild(x);}o.appendChild(l(g,p,u.length));}(e.host.closest(".pptxv")??t.body).appendChild(o),pP(o,t,p.x,p.y),i=g=>{if(g instanceof KeyboardEvent&&g.key!=="Escape")return;let x=g.target;x instanceof Node&&(o?.contains(x)||r?.contains(x))||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},close:s,destroy:s}}function cP(){let e=[],t=null;return {isSelected(n){return e.includes(n)},onClick(n,o,r){let i=chunk5YHVN3PP_cjs.El({clickedId:o,orderedIds:r,selectedIds:e,anchorId:t,ctrlKey:n.ctrlKey,metaKey:n.metaKey,shiftKey:n.shiftKey});e=i.selectedIds,t=i.anchorId;},openContextMenu(n,o,r,i){let s=i[r];if(s===void 0)return null;let l=(e.length>0&&e.includes(s)?e:[s]).map(p=>i.indexOf(p)).filter(p=>p!==-1);return {x:n,y:o,index:r,selectedIndexes:l}}}}function mP(e){let{doc:t,t:n,actions:o}=e,r=chunk5YHVN3PP_cjs.yf(e.sections,e.slides);return r.map((i,s)=>{let a=chunkIQ7MDPEN_cjs.w(t,"section","pptxv-thumb-section"),l=chunkIQ7MDPEN_cjs.w(t,"header","pptxv-thumb-section-header"),p=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-thumb-section-toggle");if(p.type="button",p.setAttribute("aria-expanded",String(!i.section?.collapsed)),p.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(a.dataset.sectionId=i.section.id,p.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunkIQ7MDPEN_cjs.w(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,l.appendChild(d);}if(l.appendChild(p),i.section&&o){let d=chunkIQ7MDPEN_cjs.w(t,"span","pptxv-thumb-section-actions"),u=(m,g,x,b=false)=>{let v=chunkIQ7MDPEN_cjs.w(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=m,v.setAttribute("aria-label",m),v.textContent=g,v.disabled=b,v.addEventListener("click",x),d.appendChild(v);};u(n("pptx.sections.rename"),"\u270E",()=>{let m=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);m!=null&&o.rename(i.section.id,m);}),u(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),s===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),s===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),l.appendChild(d);}if(a.appendChild(l),!i.section?.collapsed){let d=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,m)=>d.appendChild(e.buildSlide(u,i.slideIndexes[m]))),a.appendChild(d);}return a})}var Ko=128;function il(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-thumbs");i.setAttribute("role","navigation"),i.setAttribute("aria-label",t("pptx.sections.slides"));let s=cP(),a=r?dP({doc:e,store:r.store,getTranslator:()=>t,getEditActions:r.getEditActions,addSlideAfter:r.addSlideAfter,duplicateSlides:r.duplicateSlides,deleteSlides:r.deleteSlides,toggleHideSlides:r.toggleHideSlides,host:i}):null;i.addEventListener("keydown",P=>{if(P.key!=="Enter"||!r)return;let k=P.target;k instanceof HTMLElement&&k.dataset.slideIndex!==void 0&&(P.preventDefault(),r.addSlideAfter(x));});let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-thumbs-list");i.appendChild(l);let p=null,d=false,u=false,m=()=>{p&&(p.hidden=!d||u);};if(o){p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-thumbs-footer"),p.hidden=true;let P=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-thumbs-add");P.type="button",P.appendChild(chunkIQ7MDPEN_cjs.K(e,"plus")),P.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),P.addEventListener("click",()=>o()),p.appendChild(P),i.appendChild(p);}let g=new Map,x=0,b=[],v={width:1,height:1},f=null,S=[],y,h=1,C=false,w=(P,k,T)=>{let E=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-thumb");E.type="button",E.dataset.slideIndex=String(k),E.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:k+1}));let L=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-thumb-num");L.textContent=String(k+1);let M=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(v.height*T)}px`});M.appendChild(f(P,T)),E.append(L,M);let D=chunk5YHVN3PP_cjs.Rp(P.hidden,"rail",k);if(D.marker&&D.labelId){E.setAttribute(chunk5YHVN3PP_cjs.Np,D.marker),E.setAttribute("aria-describedby",D.labelId);let I=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-thumb-hidden");I.id=D.labelId,I.appendChild(chunkIQ7MDPEN_cjs.K(e,"eye-off"));let R=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-sr-only");R.textContent=t(chunk5YHVN3PP_cjs.Op),I.appendChild(R),M.appendChild(I);}return s.isSelected(P.id)&&k!==x&&E.classList.add("is-selected"),E.addEventListener("click",I=>{s.onClick(I,P.id,b.map(R=>R.id)),E.classList.toggle("is-selected",s.isSelected(P.id)&&k!==x),n(k);}),a&&E.addEventListener("contextmenu",I=>{I.preventDefault();let R=s.openContextMenu(I.clientX,I.clientY,k,b.map(O=>O.id));R&&a.open(R,b);}),g.set(k,E),E},A=()=>{if(!f)return;g=new Map;let P=Ko/Math.max(v.width,1);if(S.length>0){l.replaceChildren(...mP({doc:e,t,sections:S,slides:b,actions:y,buildSlide:(M,D)=>w(M,D,P)})),g.get(x)?.classList.add("is-active");return}let k=C?chunk5YHVN3PP_cjs.np(b.length,h,l.scrollTop,l.clientHeight||600):chunk5YHVN3PP_cjs.np(b.length,h,0,b.length*h,0),T=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});C&&(T.style.position="absolute",T.style.insetInline="0",T.style.top=`${k.offsetY}px`);for(let M=k.startIndex;M<=k.endIndex;M+=1){let D=b[M];D&&T.appendChild(w(D,M,P));}let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-thumbs-space",{position:"relative",height:C?`${k.totalHeight}px`:"auto"});C&&(E.dataset.virtualized="true"),E.appendChild(T),l.replaceChildren(E);let L=g.get(x);L?.classList.add("is-active"),L?.setAttribute("aria-current","page");};return l.addEventListener("scroll",()=>{C&&A();}),{el:i,render(P,k,T,E,L){u=false,m(),b=P,v=k,f=T,S=E??[],y=L;let M=Ko/Math.max(k.width,1);h=Math.round(k.height*M)+8,C=!E?.length&&P.length>=chunk5YHVN3PP_cjs.mp,i.classList.toggle("pptxv-thumbs-virtualized",C),A(),this.setActive(x);},setActive(P){if(x=P,C){let T=P*h,E=T+h,L=l.clientHeight||600;T<l.scrollTop?l.scrollTop=T:E>l.scrollTop+L&&(l.scrollTop=Math.max(0,E-L)),A();}g.forEach((T,E)=>{T.classList.toggle("is-active",E===P),E===P?T.setAttribute("aria-current","page"):T.removeAttribute("aria-current");});let k=g.get(P);k&&typeof k.scrollIntoView=="function"&&k.scrollIntoView({block:"nearest"});},setVisible(P){i.hidden=!P;},setAddSlideVisible(P){d=P,m();},renderMasters(P,k,T,E,L){u=true,m(),l.replaceChildren(),g=new Map,C=false,i.classList.remove("pptxv-thumbs-virtualized");let M=Ko/Math.max(k.width,1),D=(I,R,O,B)=>{let F=chunkIQ7MDPEN_cjs.w(e,"button",`pptxv-thumb${B===null?"":" pptxv-master-layout"}`);F.type="button",F.setAttribute("aria-label",R),F.classList.toggle("is-active",L.masterIndex===O&&L.layoutIndex===B),L.masterIndex===O&&L.layoutIndex===B&&F.setAttribute("aria-current","page");let V=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-thumb-num");V.textContent=R;let _=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(k.height*M)}px`});_.appendChild(T(I,M)),F.append(V,_),F.addEventListener("click",()=>E(O,B)),l.appendChild(F);};P.forEach((I,R)=>{D({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),R,null),I.layouts?.forEach((O,B)=>D({id:O.path,rId:"",slideNumber:0,elements:[...I.elements??[],...O.elements??[]],backgroundColor:O.backgroundColor??I.backgroundColor,backgroundImage:O.backgroundImage??I.backgroundImage},O.name||t("pptx.master.layout"),R,B));});}}}function nM(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function uP(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-cmdsearch"),r=e.createElement("pptx-ui-search");r.className="pptxv-cmdsearch-box",r.setAttribute("variant","titlebar"),r.setAttribute("data-pptx-search-surface",""),r.setAttribute("data-pptx-search-input",""),r.placeholder=t("pptx.titleBar.searchPlaceholder"),r.setAttribute("aria-label",t("pptx.titleBar.search")),o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-cmdsearch-menu");i.hidden=true,o.appendChild(i);let s=()=>{i.hidden=true,i.replaceChildren();},a=d=>{r.value="",s(),d.run();},l=[],p=()=>{if(l=nM(r.value,n,t),r.value.trim().length===0){s();return}if(i.replaceChildren(),l.length===0){let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),i.appendChild(d);}for(let d of l){let u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",m=>{m.preventDefault(),a(d);}),i.appendChild(u);}i.hidden=false;};return r.addEventListener("input",p),r.addEventListener("focus",p),r.addEventListener("blur",s),r.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?a(l[0]):d.key==="Escape"&&(r.value="",s());}),{el:o}}var rM={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function xP(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-autosave"),a=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-autosave-label");a.textContent=t("pptx.titleBar.autoSave");let l=n.autosaveToggleAvailable??true,p=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t(l?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),l||(p.disabled=true,p.classList.add("is-disabled")),p.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-switch-knob"));let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-autosave-label");s.append(a,p,d),o.appendChild(s);let u=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{l&&(i=n.onToggleAutosave(),u(),L());});let m=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(m);let g=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-qat");o.appendChild(g);let x=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(x);let b={editable:true,canUndo:false,canRedo:false},v=null,f=null,S=false,y=()=>{m.hidden=!b.editable,x.hidden=S||!b.editable;},h=D=>{D==="save"?n.save():D==="undo"?n.undo():D==="redo"?n.redo():n.quickAccess?.run(D);},C=()=>{g.replaceChildren(),v=null,f=null;let D=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};g.hidden=!D.visible||!b.editable,n.onQuickAccessVisibilityChange?.(g.hidden);for(let I of D.commandIds){if((I==="undo"||I==="redo")&&chunk5YHVN3PP_cjs.cq(I,n.hiddenActions))continue;let R=chunk5YHVN3PP_cjs.fq.find(V=>V.id===I);if(!R)continue;let O=t(R.labelKey),B=rM[R.icon],F=H(e,{label:O,icon:B,text:B===void 0?"Ab":void 0,textLabel:D.showCommandLabels?O:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(I)});if(n.quickAccess){let V=n.quickAccess.screenTip(O);V===void 0?F.btn.removeAttribute("title"):F.btn.title=V;}I==="undo"?(v=F,F.setDisabled(!b.canUndo)):I==="redo"&&(f=F,F.setDisabled(!b.canRedo)),g.appendChild(F.btn);}},w=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-file"),A=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-filename");A.textContent=n.fileName||t(chunk5YHVN3PP_cjs.Fo);let P=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-dot");P.textContent="\u2022",P.setAttribute("aria-hidden","true");let k=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-status");w.append(A,P,k),o.appendChild(w);let T="idle",E=false,L=()=>{k.textContent=t(chunk5YHVN3PP_cjs.Eo({autosaveState:T,isDirty:E,autosaveEnabled:i})),k.classList.toggle("is-error",i&&T==="error"),k.classList.toggle("is-saving",i&&T==="saving");},M=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-titlebar-search");return M.appendChild(uP(e,t,n.commands).el),o.appendChild(M),u(),L(),y(),C(),{el:o,setEditState(D){b=D,s.hidden=!D.editable,y();let I=n.quickAccess?.getState();g.hidden=!D.editable||I?.visible===false,n.onQuickAccessVisibilityChange?.(g.hidden),P.hidden=!D.editable,k.hidden=!D.editable,M.hidden=!D.editable,v?.setDisabled(!D.canUndo),f?.setDisabled(!D.canRedo);},setAutosaveState(D){T=D,L();},setDirty(D){E=D,L();},setAutosaveEnabled(D){i=D,u(),L();},refreshQuickAccess:C,getQuickAccessElement:()=>g,dockQuickAccessElement(){o.insertBefore(g,x);},setQuickAccessDetached(D){S=D,y();}}}function al(e,t,n){let o=chunkIQ7MDPEN_cjs.w(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,s=null,a=false;n.showToolbar&&n.showTitleBar!==false&&(r=xP(e,t,{...n.titleBar,onQuickAccessVisibilityChange:D=>{a&&s&&(s.hidden=D),n.titleBar.onQuickAccessVisibilityChange?.(D);}}),o.appendChild(r.el)),n.showToolbar&&(i=jr(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el),nP(e,o,n.ribbonHandlers.nav.getCustomization?.()),s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-qat-row"),s.hidden=true,o.appendChild(s));let l=n.showToolbar?Ds(e,t,()=>n.onEnableEditing()):null;l&&o.appendChild(l.el);let p=n.showToolbar?HE(e,t,()=>n.onEditAnywayFromReadOnly(),()=>n.onDismissReadOnlyBanner(),D=>n.onSubmitReadOnlyPassword(D),()=>n.onCancelReadOnlyPasswordPrompt()):null;p&&o.appendChild(p.el);let d=null,u=n.showToolbar?ks(e,t,{openMenu:()=>d?.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;u&&(u.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(u.el));let m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-body");o.appendChild(m);let g=is(e,t,n.onSelectSlide);o.appendChild(g.el);let x=nl(e,t);o.appendChild(x.el);let b=Ps(e,t);m.appendChild(b.el);let v=null;n.showThumbnails&&(v=il(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide(),n.thumbnailMenu),m.appendChild(v.el));let f=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-viewport");f.setAttribute("data-pptx-viewport",""),m.appendChild(f);let S=null;n.showInspector&&(S=_r(e,t,n.inspectorHandlers),S.setEditable(n.editable),m.appendChild(S.el));let y=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-stage-wrap");f.appendChild(y);let h=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-empty");h.textContent=t("pptx.statusBar.noSlides"),h.hidden=true,f.appendChild(h);let C=Is(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(C.el),n.showNotes===false&&(C.el.style.display="none");let w=n.showToolbar&&n.showStatusBar!==false?iP(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;w&&o.appendChild(w.el),d=n.showToolbar?As(e,t,n.ribbonHandlers,n.onSelectSlide,S?.el??null,n.hiddenActions):null,d&&(d.setEditable(n.editable),o.appendChild(d.el));let A=Ms(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);A.update(0,0),o.appendChild(A.el);let P=Ls(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(P.el);let k=aw(e,t,D=>n.onDismissCompatToast(D),()=>n.onDismissAllCompatToasts());o.appendChild(k.el),chunk5YHVN3PP_cjs.Si(C.el,D=>k.setBottomInset(D));let T=rP(e,t,D=>n.onDismissRunProgramNotice(D));o.appendChild(T.el);let E=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-overlay pptxv-loading");E.textContent=t("pptx.common.loading"),E.setAttribute("role","status"),E.setAttribute("aria-live","polite"),E.hidden=true,o.appendChild(E);let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-overlay pptxv-error");L.setAttribute("role","alert");let M=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-error-message");return L.appendChild(M),L.hidden=true,o.appendChild(L),{root:o,ribbon:i,titleBar:r,inspector:S,accessibility:g,shortcuts:x,masterSidebar:b,thumbnails:v,viewport:f,stageWrap:y,notes:C,statusBar:w,mobileToolbar:u,mobileActionSheets:d,presentationTouchControls:A,presentationToolbar:P,setLoading(D){E.hidden=!D,o.setAttribute("aria-busy",String(D));},setError(D){L.hidden=D===null,M.textContent=D??"";},setEmpty(D){h.hidden=!D,y.hidden=D;},setPresenting(D){o.classList.toggle("pptxv-presenting",D),P.setPresenting(D);},setQuickAccessPosition(D){if(!(!r||!s))if(D==="below"){let I=r.getQuickAccessElement();s.appendChild(I),a=true,s.hidden=I.hidden,r.setQuickAccessDetached(true);}else a=false,r.dockQuickAccessElement(),s.hidden=true,r.setQuickAccessDetached(false);},setProtectedView(D){l?.setActive(D);},setReadOnlyRecommendation(D,I,R){p?.update(D,I,R);},setCompatToasts(D,I){k.update(D,I);},setRunProgramNotices(D){T.update(D);}}}async function lo(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunk5YHVN3PP_cjs.tt(e,r,i),typeof o=="function"&&o(r,i);}})}function sl(e,t){return chunk5YHVN3PP_cjs.ee(e,t)}function gP(e,t){sl(e,t)?.dispatchEvent(new MouseEvent("dblclick",{bubbles:true,cancelable:true}));}function bP(e){return (t,n)=>lo(e,{scale:n.width/(t.width||1),x:t.x,y:t.y,width:t.width,height:t.height,useCORS:true,allowTaint:true,backgroundColor:null,logging:false})}function fP(e,t,n){let o=sl(e,n);if(!o)return;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=J(t.get(),n);chunk5YHVN3PP_cjs.St(o,i,s,e,chunk5YHVN3PP_cjs.Rt(a?.name,"Picture"),{scale:2,html2canvasFallback:bP(o)});}async function Xr(e,t,n){let o=sl(e,t);if(!o)return null;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=await chunk5YHVN3PP_cjs.Tt(o,i,s,e,{scale:2,html2canvasFallback:bP(o)});return chunk5YHVN3PP_cjs.Yl(n,a)}function Qr(e,t,n){t.set({inspectorOpen:true}),requestAnimationFrame(()=>{requestAnimationFrame(()=>chunk5YHVN3PP_cjs.Vl(e,n));});}function Zr(e){let t=e instanceof Element?e.closest("td"):null;if(!t||t.dataset.rowIndex===void 0||t.dataset.cellIndex===void 0)return null;let n={row:Number(t.dataset.rowIndex),column:Number(t.dataset.cellIndex)};return Number.isFinite(n.row)&&Number.isFinite(n.column)?n:null}function pl(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=Zr(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:chunk5YHVN3PP_cjs.Rl(e.selectedTableCells.map(({row:i,column:s})=>({row:i,col:s})),t.tableData),isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function vP(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function dl(e,t,n){let o=t.getEditActions(),r=n?.cell??null,i=chunk5YHVN3PP_cjs.Ql(e);if(i)return o.mergeShapes(i);switch(e){case "copy":return o.copy();case "cut":return o.cut();case "paste":return o.paste();case "duplicate":return o.duplicateSelected();case "delete":return o.deleteSelected();case "bring-forward":return o.bringForward();case "send-backward":return o.sendBackward();case "bring-front":return o.bringToFront();case "send-back":return o.sendToBack();case "group":return o.groupSelected();case "ungroup":return o.ungroupSelected();case "crop":return o.enterCropMode();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return iM(t);case "table-insert-row-above":return r?o.mutateTableStructure(r,"insertRowAbove"):void 0;case "table-insert-row-below":return r?o.mutateTableStructure(r,"insertRowBelow"):void 0;case "table-delete-row":return r?o.mutateTableStructure(r,"deleteRow"):void 0;case "table-insert-col-left":return r?o.mutateTableStructure(r,"insertColumnLeft"):void 0;case "table-insert-col-right":return r?o.mutateTableStructure(r,"insertColumnRight"):void 0;case "table-delete-col":return r?o.mutateTableStructure(r,"deleteColumn"):void 0;case "table-merge-selected":return o.mergeTableCells(t.store.get().selectedTableCells);case "table-merge-right":return r?vP(o,r,"right"):void 0;case "table-merge-down":return r?vP(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0;case "edit-text":return ll(t,s=>gP(t.doc,s));case "edit-points":return ll(t,s=>{t.startEditPoints?.(s);});case "save-as-picture":return ll(t,s=>fP(t.doc,t.store,s));case "edit-alt-text":return Qr(t.doc,t.store,chunk5YHVN3PP_cjs.Ul("edit-alt-text"));case "size-and-position":return Qr(t.doc,t.store,chunk5YHVN3PP_cjs.Ul("size-and-position"));case "format-shape":return Qr(t.doc,t.store,chunk5YHVN3PP_cjs.Ul("format-shape"))}}function ll(e,t){let n=e.store.get().selectedElementId;n&&t(n);}function iM(e){let t=e.store.get(),n=t.slides[t.currentSlide]?.elements.find(({id:o})=>o===t.selectedElementId)??null;e.getAi()?.fixElement(n,t.currentSlide);}function aM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk5YHVN3PP_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function cl(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(d,u)=>{let m=chunkIQ7MDPEN_cjs.w(t,"button",`pptxv-context-menu-item${d.danger?" is-danger":""}`);return m.type="button",m.setAttribute("role","menuitem"),m.textContent=e.getTranslator()(d.labelKey),m.disabled=d.disabled===true,m.addEventListener("click",()=>{s(),dl(d.id,e,u);}),m},l=(d,u,m,g)=>{r=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`}),r.dataset.pptxContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.contextMenu.ariaLabel"));for(let x of d){if(x.separatorBefore){let b=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu-separator");b.setAttribute("role","separator"),r.appendChild(b);}r.appendChild(a(x,u));}(o.closest(".pptxv")??t.body).appendChild(r),aM(r,t,m,g),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{let u=n.get(),m=e.getCustomization?.()??chunk5YHVN3PP_cjs.Zq;if(!u.editable||u.presenting||!m.elementMenuEnabled)return;let g=chunk5YHVN3PP_cjs.Jl(chunk5YHVN3PP_cjs.Fm(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!g||!chunk5YHVN3PP_cjs.jo(g,u.editTemplateMode))return;d.preventDefault(),s(),u.selectedElementIds.includes(g)||e.selectElement(g);let x=Zr(d.target);x&&!n.get().selectedTableCells.some(({row:y,column:h})=>y===x.row&&h===x.column)&&n.set({selectedTableCell:x,selectedTableCells:[x]});let b=n.get(),v=J(b,g)??null,f=pl(b,v,d.target),S=chunk5YHVN3PP_cjs.hr(chunk5YHVN3PP_cjs.Sl({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:b.selectedElementIds.length>1,selectionGroupable:b.selectedElementIds.every(y=>chunk5YHVN3PP_cjs._e(J(b,y)??null,"group")),aiEnabled:e.getAi()!==null,hasClipboard:b.clipboardPayload!==null,editPoints:e.startEditPoints?chunk5YHVN3PP_cjs.Es(v):void 0,canMergeShapes:chunk5YHVN3PP_cjs.Kl(b.selectedElementIds.map(y=>J(b,y))),canCrop:chunk5YHVN3PP_cjs.Ys(v)}),m);S.length>0&&l(S,f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function sM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk5YHVN3PP_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function ml(e){let{doc:t,store:n,root:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=d=>{switch(d){case "next":e.next();break;case "previous":e.prev();break;case "seeAllSlides":e.showAllSlides();break;case "presenterView":e.togglePresenterView();break;case "pointerArrow":e.setPointerTool("none");break;case "pointerPen":e.setPointerTool("pen");break;case "pointerHighlighter":e.setPointerTool("highlighter");break;case "pointerLaser":e.setPointerTool("laser");break;case "eraseInk":e.eraseAnnotations();break;case "blankBlack":e.toggleBlank("black");break;case "blankWhite":e.toggleBlank("white");break;case "endShow":e.exitPresentation();break}},l=(d,u)=>{r=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-showmenu",{left:`${d}px`,top:`${u}px`}),r.dataset.pptxPresentationMenu="true",r.setAttribute("role","menu"),chunk5YHVN3PP_cjs.Tk({seeAllSlides:true,presenterView:true,pointerTools:true,eraseInk:true,blankBlack:true,blankWhite:true}).forEach((g,x)=>{if(x>0){let b=chunkIQ7MDPEN_cjs.w(t,"hr","pptxv-showmenu-separator");b.setAttribute("role","separator"),r?.appendChild(b);}for(let b of g.items){let v=chunkIQ7MDPEN_cjs.w(t,"button");v.type="button",v.setAttribute("role","menuitem"),v.dataset.itemId=b.id,v.textContent=e.getTranslator()(b.labelKey),v.addEventListener("click",()=>{s(),a(b.id);}),r?.appendChild(v);}}),o.appendChild(r),sM(r,t,d,u),i=g=>{g instanceof KeyboardEvent&&g.key!=="Escape"||g.target instanceof Node&&r?.contains(g.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{n.get().presenting&&(d.preventDefault(),s(),e.shouldShow()&&l(d.clientX,d.clientY));};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function ul(e,t){let n=chunk5YHVN3PP_cjs.cl(),o=s=>{let a=t.isSlideShowStartEnabled?.()===false?null:chunk5YHVN3PP_cjs.Cl(s,{isPresenting:t.isPresenting?.()??false});if(a){s.preventDefault(),a==="fromBeginning"?t.startFromBeginning?.():t.startFromCurrent?.();return}let l=s.target;if(!(l&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(l.tagName))){if(t.isPresenting?.()){lM(s,t,n);return}switch(s.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}s.preventDefault();}},r=chunk5YHVN3PP_cjs.gb(),i=s=>{if(!t.isPresenting?.()||!chunk5YHVN3PP_cjs.Hk())return;let a=chunk5YHVN3PP_cjs.hb(s,r);a.intent==="next-slide"?(s.preventDefault(),t.next()):a.intent==="previous-slide"&&(s.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function lM(e,t,n){if(!chunk5YHVN3PP_cjs.Hk())return;let o=chunk5YHVN3PP_cjs.dl(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");return;case "toggleSubtitles":t.toggleSubtitles?.();break;case "toggleChrome":t.toggleChrome?.();break;case "showAllSlides":t.showAllSlides?.();break;}}var pM=.1,dM=8;function xl(e,t){let n=chunk5YHVN3PP_cjs.qn({getScale:t.getScale,minScale:pM,maxScale:dM,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:a=>{t.isSwipeEnabled()&&(a===-1?t.onNext():t.onPrevious());}}}),o=a=>n.onTouchStart(a),r=a=>n.onTouchMove(a),i=a=>n.onTouchEnd(a),s=()=>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",s,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",s,true),n.cancel();}}function gl(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,s=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",s),{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",s);}}}var Ae=chunk5YHVN3PP_cjs.Yf,bl=chunk5YHVN3PP_cjs.Zf;function fl(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunkIQ7MDPEN_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunkIQ7MDPEN_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,s=1,a={width:0,height:0},l=null,p=(m,g)=>{i&&(g.stopPropagation(),g.preventDefault(),g.currentTarget?.setPointerCapture?.(g.pointerId),l=m);},d=(m,g)=>{let x=l;l=null;let b=g.currentTarget;if(x!==m||!i||!b)return;try{b.releasePointerCapture?.(g.pointerId);}catch{}let v=b.getBoundingClientRect(),f=m==="h"?g.clientY-v.top:g.clientX-v.left,S=chunk5YHVN3PP_cjs.$f(f,s,m==="h"?a.height:a.width);S!==null&&t(m,S);};o.addEventListener("pointerdown",m=>p("h",m)),o.addEventListener("pointerup",m=>d("h",m)),r.addEventListener("pointerdown",m=>p("v",m)),r.addEventListener("pointerup",m=>d("v",m));let u=(m,g,x,b)=>{let v=x*b.scale,f=g==="h";chunkIQ7MDPEN_cjs.y(m,{width:f?v:Ae,height:f?Ae:v}),m.replaceChildren(),m.appendChild(chunkIQ7MDPEN_cjs.x(e,"rect",{class:"pptxv-ruler-bg",width:f?v:Ae,height:f?Ae:v}));let S=b.selection;if(S){let y=(f?S.x:S.y)*b.scale,h=Math.max((f?S.width:S.height)*b.scale,1);m.appendChild(chunkIQ7MDPEN_cjs.x(e,"rect",{class:"pptxv-ruler-highlight",x:f?y:0,y:f?0:y,width:f?h:Ae,height:f?Ae:h}));}for(let y of chunk5YHVN3PP_cjs._f(x,b.scale,b.unit)){let h=Ae-Ae*(y.isMajor?.6:.3);if(m.appendChild(chunkIQ7MDPEN_cjs.x(e,"line",{class:"pptxv-ruler-tick",x1:f?y.position:Ae,y1:f?Ae:y.position,x2:f?y.position:h,y2:f?h:y.position,"stroke-width":y.isMajor?1:.5})),!y.label)continue;let C=chunkIQ7MDPEN_cjs.x(e,"text",{class:"pptxv-ruler-label",x:f?y.position+2:2,y:f?bl+1:y.position+bl+2,"font-size":bl});C.textContent=y.label,m.appendChild(C);}m.appendChild(chunkIQ7MDPEN_cjs.x(e,"line",{class:"pptxv-ruler-edge",x1:f?0:Ae-.5,y1:f?Ae-.5:0,x2:f?v:Ae-.5,y2:f?Ae-.5:v}));};return {mount(m){n.parentNode!==m&&m.append(n,o,r);},update(m){i=m.draggable,s=m.scale,a=m.canvasSize,n.hidden=!m.visible,o.style.display=m.visible?"":"none",r.style.display=m.visible?"":"none",o.classList.toggle("is-draggable",m.draggable),r.classList.toggle("is-draggable",m.draggable),m.visible&&(u(o,"h",m.canvasSize.width,m),u(r,"v",m.canvasSize.height,m));},destroy(){n.remove(),o.remove(),r.remove();}}}function cM(e){let t={presentFromStart:()=>e.startPresentationFromBeginning(),print:()=>{e.print();},exportPdf:()=>{e.exportPdf();},newSlide:()=>e.getEditActions().addSlide(),spellCheck:()=>e.getEditActions().toggleSpellCheck(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut()};return n=>t[n]?.()}function vl(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:s}=e,a=()=>e.getCustomization?.()??chunk5YHVN3PP_cjs.Zq,l=al(t,o,{...QC(a()),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:e.isAutosaveSwitchOn?.()??r.autosave!==false,autosaveToggleAvailable:e.isAutosaveToggleAvailable?.()??r.autosave!==false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:mM(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>ZC(e.getQuickAccessOptions(),a()),run:cM(e),screenTip:M=>e.quickAccessScreenTip(M)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:M=>e.setPresentationPointerTool?.(M),setColor:M=>e.setPresentationPointerColor?.(M),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},onEnableEditing:()=>e.enableEditingFromProtectedView(),onEditAnywayFromReadOnly:()=>e.editAnywayFromReadOnlyRecommendation(),onDismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),onSubmitReadOnlyPassword:M=>e.submitReadOnlyPassword(M),onCancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),onDismissCompatToast:M=>e.dismissCompatToast(M),onDismissAllCompatToasts:()=>e.dismissAllCompatToasts(),onDismissRunProgramNotice:M=>e.dismissRunProgramNotice(M),thumbnailMenu:{store:i,getEditActions:()=>e.getEditActions(),addSlideAfter:M=>e.addSlide(M),duplicateSlides:M=>e.duplicateSlides(M),deleteSlides:M=>e.deleteSlides(M),toggleHideSlides:M=>e.toggleHideSlides(M)},...XC(e)}),p=Ro(l.root,e.initialTheme??r.theme,[]);n.appendChild(l.root),l.statusBar?.setNotesExpanded(i.get().notesExpanded),l.statusBar?.setDirty(i.get().dirty),l.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),l.titleBar?.setDirty(i.get().dirty),l.setProtectedView(i.get().protectedView),l.setReadOnlyRecommendation(i.get().readOnlyRecommendation,i.get().readOnlyBannerDismissed,{promptOpen:i.get().readOnlyPasswordPromptOpen,error:i.get().readOnlyPasswordError,checking:i.get().readOnlyCheckingPassword}),l.setCompatToasts(i.get().compatToasts,i.get().inspectorOpen?chunk5YHVN3PP_cjs.Io:0),l.setRunProgramNotices(i.get().runProgramNotices);let d=ul(l.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,toggleSubtitles:e.toggleSubtitles,toggleChrome:()=>l.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides,startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),isSlideShowStartEnabled:()=>chunk5YHVN3PP_cjs.ar(a(),"presentMode")}),u=xl(l.root,{getScale:()=>s.effectiveScale(),onPinchZoom:M=>e.setZoom(M),isSwipeEnabled:()=>{let M=i.get();return M.presenting||!M.editable},onNext:()=>{let M=i.get();rs({presenting:M.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:M.slides[M.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),m=t.createElement("button");m.type="button",m.setAttribute("data-pptx-end-of-show",""),m.className="pptxv-presentation-end",Object.assign(m.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let g=t.createElement("span");Object.assign(g.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),g.textContent=o("pptx.presentation.endOfSlideShow"),m.appendChild(g),m.addEventListener("click",M=>{M.stopPropagation(),e.next();});let x=()=>{let M=i.get(),D=M.presenting&&M.endOfShow;D&&m.parentElement!==l.root?l.root.appendChild(m):!D&&m.parentElement&&m.remove();},b=i.subscribe(x);x();let v=null,f=i.subscribe((M,D)=>{M.presenting&&M.currentSlide!==D.currentSlide&&(v=D.currentSlide),D.presenting&&!M.presenting&&(v=null);}),S=rw(i,M=>e.goToSlide(M)),y=ew({goToSlide:M=>e.goToSlide(M),next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),confirmExternalHyperlink:e.confirmExternalHyperlink,getStageRoot:()=>l.stageWrap,getPreviousPresentedSlide:()=>v,getCurrentSlide:()=>{let M=i.get();return M.slides[M.currentSlide]},customShowRunner:S,addRunProgramNotice:M=>e.addRunProgramNotice(M)}),h=M=>{let D=i.get();!D.presenting||!(M.target instanceof Element)||!M.target.closest(".pptxv-stage")||!tw({target:M.target,presenting:D.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:D.slides[D.currentSlide],slideCount:D.slides.length,runner:y})||e.next();};l.root.addEventListener("click",h);let C=M=>{if(!(M.target instanceof Element))return;let D=M.target.closest("a.pptxv-link"),I=D?.getAttribute("href");!D||!I||(M.preventDefault(),(e.confirmExternalHyperlink?.(I)??true)&&chunk5YHVN3PP_cjs.ad(I));};l.root.addEventListener("click",C);let w=ow({getState:()=>i.get(),subscribe:M=>i.subscribe(M),next:()=>e.next()}),A=nw({getPresenting:()=>i.get().presenting,subscribe:M=>i.subscribe(M),root:l.root,cancelAutoAdvance:w.cancel,rearmAutoAdvance:w.rearm}),P=ml({doc:t,store:i,root:l.root,getTranslator:()=>e.t,shouldShow:()=>e.shouldShowPresentationContextMenu?.()??true,next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),showAllSlides:()=>e.showPresentationAllSlides?.(),togglePresenterView:()=>e.togglePresenterView?.(),setPointerTool:M=>e.setPresentationPointerTool?.(M),eraseAnnotations:()=>e.erasePresentationAnnotations?.(),toggleBlank:M=>e.togglePresentationBlank?.(M)}),k=()=>{l.root.removeEventListener("click",h),l.root.removeEventListener("click",C),w.detach(),A(),b(),f(),S.dispose(),m.remove(),P.destroy();},T={current:void 0},E=gl(l.root,M=>{if(!M&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){T.current?.enter();return}i.set({presenting:M});});T.current=E;let L=null;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(()=>{i.get().zoom==="fit"&&s.renderStage();}),L.observe(l.viewport)),{chrome:l,presentation:E,detachKeyboard:d,detachTouchGestures:u,detachPresentationClick:k,resizeObserver:L,appliedThemeVars:p}}function mM(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function hl(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function yl(e){return {doc:e.doc,container:e.container,t:e.t,options:e.getChromeOptions(),getCustomization:()=>e.getResolvedCustomization(),store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),setZoom:t=>e.setZoom(t),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(),isAutosaveSwitchOn:()=>e.isAutosaveSwitchOn(),isAutosaveToggleAvailable:()=>e.isAutosaveToggleAvailable(),startPresentationFromBeginning:()=>{e.goToSlide(e.firstShowSlideIndex()),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(),toggleHideCurrentSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),clearSelection:()=>e.selectElements([]),readTransitionDraft:()=>{let t=e.store.get();return chunk5YHVN3PP_cjs.Bi(t.slides[t.currentSlide])},readTransition:()=>{let t=e.store.get();return t.slides[t.currentSlide]?.transition},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),addSlide:t=>e.addSlide(t),duplicateSlides:t=>e.duplicateSlides(t),deleteSlides:t=>e.deleteSlides(t),toggleHideSlides:t=>e.toggleHideSlides(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),firstShowSlideIndex:()=>e.firstShowSlideIndex(),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"};e.updatePresenterSnapshot({pointer:{...n,tool:n.tool===t?"none":t}});},setPresentationPointerColor:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,tool:"none"};e.updatePresenterSnapshot({pointer:{...n,color:t}});},togglePresenterView:()=>e.togglePresenterView(),showPresentationAllSlides:()=>e.showPresentationAllSlides(),shouldShowPresentationContextMenu:()=>e.shouldShowPresentationContextMenu(),classifyPresentationExit:()=>e.classifyPresentationExit(),erasePresentationAnnotations:()=>e.clearPresentationAnnotations(),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),togglePresentationBlackboard:()=>{let t=e.getPresenterSnapshot(),n=t.pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"},o=chunk5YHVN3PP_cjs.Sk(t.blackout,n.tool);e.updatePresenterSnapshot({blackout:o.blackout,pointer:{...n,tool:o.tool}});},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),exportJson:()=>e.exportJson(),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(),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),armFreeformTool:t=>e.editor.armFreeformTool(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t),enableEditingFromProtectedView:()=>e.enableEditingFromProtectedView(),editAnywayFromReadOnlyRecommendation:()=>e.editAnywayFromReadOnlyRecommendation(),dismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),submitReadOnlyPassword:t=>e.submitReadOnlyPassword(t),cancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),dismissCompatToast:t=>e.dismissCompatToast(t),dismissAllCompatToasts:()=>e.dismissAllCompatToasts(),addRunProgramNotice:t=>e.addRunProgramNotice(t),dismissRunProgramNotice:t=>e.dismissRunProgramNotice(t),confirmExternalHyperlink:t=>e.confirmExternalHyperlink(t)}}function uM(e,t){let{width:n,height:o}=chunk5YHVN3PP_cjs.qt(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let s=e.ownerDocument.createElement("canvas");s.width=n,s.height=o;let a=s.getContext("2d");if(!a)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");a.drawImage(e,0,0,n,o),r=s;}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 Sl(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=chunk5YHVN3PP_cjs.pt,onProgress:i,signal:s}=t,a=e.store.get().slides.length;if(a===0)return;let l=chunk5YHVN3PP_cjs.ot({totalSlides:a,slideDurationMs:n,slideTimingsMs:o}),p=[];for(let m of l){if(s?.aborted)throw chunk5YHVN3PP_cjs.sj();i?.(m.slideIndex,a);let g=await e.rasterizeSlide(m.slideIndex);p.push({...uM(g,r),delayCs:m.delayCs});}let d=chunk5YHVN3PP_cjs.rt(p,l[0].delayCs);i?.(a,a);let u=new ArrayBuffer(d.byteLength);new Uint8Array(u).set(d),chunk5YHVN3PP_cjs.kt(new Blob([u],{type:"image/gif"}),`${e.baseName}.gif`);}function xM(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 Ht(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let s=n?.[r]??o?.[r]??chunkIQ7MDPEN_cjs.C[r]??chunkIQ7MDPEN_cjs.D(r);return xM(s,i)}}function Jr(e,t,n,o={}){return chunk5YHVN3PP_cjs.U.exportSlide(e,t,n,o)}function hP(e,t={}){return chunk5YHVN3PP_cjs.U.exportAll(e,t)}async function wl(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,s=r??chunk5YHVN3PP_cjs.Ft,a=e.store.get(),l=a.slides,p=chunk5YHVN3PP_cjs.ut(i,l.length),d=chunk5YHVN3PP_cjs.xt(p.colorMode),u=chunk5YHVN3PP_cjs.wt(chunk5YHVN3PP_cjs.vt(p.slideRange,a.currentSlide,l.length,p.customRangeFrom,p.customRangeTo),l,e.getIncludeHiddenSlides?.()??false);if(p.printWhat==="outline"){let y=`<div class="outline-page">${chunk5YHVN3PP_cjs.zt(u,l)}</div>`;return s(Cl("Outline",y,p,d))}if(u.length===0)return false;if(p.printWhat==="slides"){let{width:y,height:h}=a.canvasSize,C=[];for(let w=0;w<u.length;w++){if(o?.aborted)throw chunk5YHVN3PP_cjs.sj();n?.(w,u.length),C.push(Jr(l[u[w]],y,h));}return n?.(u.length,u.length),s(chunk5YHVN3PP_cjs.st(C,y,h,{title:"Slides (Vector)",orientation:p.orientation,colorFilter:d,scaleToFit:p.scaleToFit}))}let m=e.getTranslator?.()??Ht(),g=r?void 0:chunk5YHVN3PP_cjs.Dt(m("pptx.print.preparingToPrint"));if(!r&&!g)return false;let x=e.getPrintHighQuality?.()?2:1,b=[];for(let y=0;y<u.length;y++){if(o?.aborted)throw g?.close(),chunk5YHVN3PP_cjs.sj();n?.(y,u.length);let h=await e.rasterizeSlide(u[y],x);b.push(h.toDataURL("image/png"));}n?.(u.length,u.length);let v=y=>g?(chunk5YHVN3PP_cjs.Et(g,y),true):s(y);if(p.printWhat==="notes"){let y=chunk5YHVN3PP_cjs.At(b,u,l);return v(Cl("Notes Pages",y,p,d))}let f=chunk5YHVN3PP_cjs.Bt(b,u,p.slidesPerPage,a.handoutMaster),S=`Handout ${p.slidesPerPage} per page`;return v(Cl(S,f,p,d))}function Cl(e,t,n,o){return chunk5YHVN3PP_cjs.Ct({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides,scaleToFit:n.scaleToFit})}function gM(e){return new Promise(t=>{setTimeout(t,e);})}async function bM(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:chunk5YHVN3PP_cjs.It([...chunk5YHVN3PP_cjs.Ht]),videoBitsPerSecond:t.videoBitsPerSecond}),s=[];i.ondataavailable=l=>{l.data.size>0&&s.push(l.data);};let a=new Promise((l,p)=>{i.onstop=()=>{l();},i.onerror=()=>{p(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();try{let l=chunk5YHVN3PP_cjs.Gt({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),p=chunk5YHVN3PP_cjs.Jt(t.fps);for(let d of l){t.onRecordProgress?.(d.slideIndex,l.length);for(let u=0;u<d.frameCount;u++){if(t.signal?.aborted)throw i.stop(),chunk5YHVN3PP_cjs.sj();o.drawImage(e[d.slideIndex],0,0),await t.waitMs(p);}}return i.stop(),await a,new Blob(s,{type:"video/webm"})}finally{chunk5YHVN3PP_cjs.Kt(r);}}async function El(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:s,onRecordProgress:a,signal:l}=t,p=e.store.get().slides.length;if(p===0)return;let d=[];for(let m=0;m<p;m++){if(l?.aborted)throw chunk5YHVN3PP_cjs.sj();s?.(m,p),d.push(await e.rasterizeSlide(m));}let u=await bM(d,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:a,signal:l,waitMs:e.waitMs??gM});s?.(p,p),chunk5YHVN3PP_cjs.kt(u,`${e.baseName}.webm`);}function fM(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,sections:e.sections,presentationProperties:e.presentationProperties,headerFooter:e.headerFooter,coreProperties:e.coreProperties,appProperties:e.appProperties,customProperties:e.customProperties,customShows:e.customShows,embeddedFonts:e.embeddedFonts,slideMasters:e.slideMasters,themeOptions:e.themeOptions,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster,hasMacros:e.hasMacros,tableStyleMap:e.tableStyleMap,tableStylesDefaultId:e.tableStylesDefaultId,tags:e.tagCollections,theme:e.colorScheme||e.fontScheme||e.themeName?{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme}:void 0}}function Tl(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,rasterizeSlideToRaster:e.rasterizeSlideToRaster,baseName:chunk5YHVN3PP_cjs.jt(e.fileName),getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality};async function o(p,d){if(t)return p;t=true;try{return await d()}finally{t=false;}}async function r(p){if(e.rasterizeSlideToRaster)return e.rasterizeSlideToRaster(p);let d=await e.rasterizeSlide(p);return {kind:"canvas",canvas:d,strategy:"html2canvas",width:d.width,height:d.height}}async function i(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length))return o(void 0,async()=>{let m=await r(u);chunk5YHVN3PP_cjs.lt(await chunk5YHVN3PP_cjs.Qt(m),`${n.baseName}-slide-${u+1}.png`);})}async function s(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let m=await r(u),g=await chunk5YHVN3PP_cjs.Pt(m);await navigator.clipboard.write([new ClipboardItem({"image/png":g})]);})}async function a(p={}){let d=e.store.get();if(d.slides.length===0)return;let{onProgress:u,signal:m}=p;return o(void 0,async()=>{let{jsPDF:g}=await import('jspdf'),{width:x,height:b}=d.canvasSize,v=x>=b?"landscape":"portrait",f=new g({orientation:v,unit:"px",format:[x,b],compress:!0}),S=d.slides.length;for(let y=0;y<S;y++){if(m?.aborted)throw chunk5YHVN3PP_cjs.sj();if(u?.(y,S),y>0&&f.addPage([x,b],v),e.rasterizeSlideToTiles){let h=await e.rasterizeSlideToTiles(y);for(let C of h.tiles){let w=chunk5YHVN3PP_cjs.Nt(C,h.fullWidth,h.fullHeight,x,b);f.addImage(C.canvas.toDataURL("image/png"),"PNG",w.x,w.y,w.width,w.height);}}else {let h=await e.rasterizeSlide(y);f.addImage(h.toDataURL("image/png"),"PNG",0,0,x,b);}}f.save(`${n.baseName}.pdf`);})}function l(){chunk5YHVN3PP_cjs.nt(fM(e.store.get()),e.fileName);}return {exportSlidePng:i,copySlideAsImage:s,exportPdf:a,exportJson:l,exportGif:p=>o(void 0,()=>Sl(n,p)),exportVideo:p=>o(void 0,()=>El(n,p)),print:p=>o(false,()=>wl(n,p))}}function Pl(e){let{doc:t}=e,n=null,o=null,r=null,i=null,s=null,a=()=>{let p=e.getTranslator();n=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-backdrop"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let d=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-panel");o=chunkIQ7MDPEN_cjs.w(t,"h3");let u=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-track");r=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-fill"),u.appendChild(r);let m=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-status");i=chunkIQ7MDPEN_cjs.w(t,"span"),s=chunkIQ7MDPEN_cjs.w(t,"span","pptxv-export-progress-pct"),m.append(i,s);let g=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-export-progress-actions"),x=chunkIQ7MDPEN_cjs.w(t,"button");x.type="button",x.textContent=p("pptx.export.cancel"),x.addEventListener("click",()=>e.onCancel()),g.appendChild(x),d.append(o,u,m,g),n.appendChild(d),t.body.appendChild(n);},l=(p,d)=>{let u=chunk5YHVN3PP_cjs.oj(p);r&&(r.style.width=`${u}%`),i&&(i.textContent=d),s&&(s.textContent=`${u}%`);};return {open(p,d){this.close(),a(),n?.setAttribute("aria-label",p),o&&(o.textContent=p),l(0,d);},update(p,d){l(p,d);},close(){n?.remove(),n=null,o=null,r=null,i=null,s=null;}}}function Al(e){let t=null,n=s=>e.getTranslator()(s),o=(s,a)=>{let l=new AbortController;return t=l,a&&(a.aborted?l.abort():a.addEventListener("abort",()=>l.abort(),{once:true})),e.modal.open(s,n("pptx.export.capturingSlides")),l},r=()=>{t=null,e.modal.close();},i=(s,a)=>{chunk5YHVN3PP_cjs.tj(a)||console.error(`[pptx-vanilla-viewer] ${s} export failed:`,a);};return {async runPdf(s={}){let a=o(n("pptx.ribbon.exportPdf"),s.signal);try{await e.controller.exportPdf({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk5YHVN3PP_cjs.pj(l,p),chunk5YHVN3PP_cjs.rj(n("pptx.export.rendering"),l,p));}}),e.modal.update(chunk5YHVN3PP_cjs.mj,n("pptx.export.buildingPdf")),e.modal.update(chunk5YHVN3PP_cjs.nj,n("pptx.export.buildingPdf"));}catch(l){i("PDF",l);}finally{r();}},async runGif(s={}){let a=o(n("pptx.ribbon.exportGif"),s.signal);try{await e.controller.exportGif({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk5YHVN3PP_cjs.pj(l,p),chunk5YHVN3PP_cjs.rj(n("pptx.export.encoding"),l,p));}}),e.modal.update(chunk5YHVN3PP_cjs.nj,n("pptx.export.savingFile"));}catch(l){i("GIF",l);}finally{r();}},async runVideo(s={}){let a=o(n("pptx.ribbon.exportVideo"),s.signal);try{await e.controller.exportVideo({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk5YHVN3PP_cjs.pj(l,p,45),chunk5YHVN3PP_cjs.rj(n("pptx.export.capturing"),l,p));},onRecordProgress:(l,p)=>{s.onRecordProgress?.(l,p),e.modal.update(chunk5YHVN3PP_cjs.qj(l,p),chunk5YHVN3PP_cjs.rj(n("pptx.export.recording"),l,p));}}),e.modal.update(chunk5YHVN3PP_cjs.nj,n("pptx.export.savingFile"));}catch(l){i("Video",l);}finally{r();}},cancel(){t?.abort(),t=null,e.modal.close();}}}function ei(e,t){return chunk5YHVN3PP_cjs.Cg({headerFooter:e.headerFooter,customProperties:e.customProperties,slide:t})}function vM(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function kl(e){let t=chunkIQ7MDPEN_cjs.w(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??vM;async function o(a,l){let p=e.store.get(),d=p.slides[a];if(!d)throw new Error(`Export failed: no slide at index ${a}`);t.replaceChildren();let u=chunkIQ7MDPEN_cjs.A({document:e.doc,slide:d,canvasSize:p.canvasSize,mediaDataUrls:p.mediaDataUrls,fieldContext:ei(p,d),registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:false});t.appendChild(u),await n();let m=2*e.getImageResolutionScale()*l;return {stage:u,naturalWidth:p.canvasSize.width,naturalHeight:p.canvasSize.height,scale:m,html2canvasFallback:(g,x)=>lo(u,{backgroundColor:"#ffffff",scale:x.width/(g.width||1),x:g.x,y:g.y,width:g.width,height:g.height,logging:false})}}async function r(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunk5YHVN3PP_cjs.Mt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function i(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunk5YHVN3PP_cjs.Lt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function s(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return (await chunk5YHVN3PP_cjs.Ot(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})).canvas}return {rasterizeSlide:s,rasterizeSlideToRaster:r,rasterizeSlideToTiles:i,destroy(){t.remove();}}}var Wo=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)}exportJson(){this.exporter.exportJson();}};function Il(e){let t=kl(e),n=Tl({store:e.store,rasterizeSlide:t.rasterizeSlide,rasterizeSlideToRaster:t.rasterizeSlideToRaster,rasterizeSlideToTiles:t.rasterizeSlideToTiles,fileName:e.fileName,getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality}),o=Pl({doc:e.doc,getTranslator:e.getTranslator,onCancel:()=>r.cancel()}),r=Al({modal:o,controller:n,getTranslator:e.getTranslator});return {exportSlidePng:i=>n.exportSlidePng(i),copySlideAsImage:i=>n.copySlideAsImage(i),exportPdf:i=>r.runPdf(i),exportJson:()=>n.exportJson(),exportGif:i=>r.runGif(i),exportVideo:i=>r.runVideo(i),print:i=>n.print(i),destroy:()=>{r.cancel(),t.destroy();}}}var ti=class extends Wo{get customizationApi(){return this.customization.controller.api}getCustomization(){return this.customizationApi.getCustomization()}setCustomization(t){this.customizationApi.setCustomization(t);}updateCustomization(t){this.customizationApi.updateCustomization(t);}resetCustomization(){this.customizationApi.resetCustomization();}hideRibbonTab(t){this.customizationApi.hideRibbonTab(t);}showRibbonTab(t){this.customizationApi.showRibbonTab(t);}hideRibbonGroup(t){this.customizationApi.hideRibbonGroup(t);}showRibbonGroup(t){this.customizationApi.showRibbonGroup(t);}hideToolbarButton(t){this.customizationApi.hideToolbarButton(t);}showToolbarButton(t){this.customizationApi.showToolbarButton(t);}hideRibbonControl(t){this.customizationApi.hideRibbonControl(t);}showRibbonControl(t){this.customizationApi.showRibbonControl(t);}hideOptionsPage(t){this.customizationApi.hideOptionsPage(t);}showOptionsPage(t){this.customizationApi.showOptionsPage(t);}hideOptionsSection(t){this.customizationApi.hideOptionsSection(t);}showOptionsSection(t){this.customizationApi.showOptionsSection(t);}hideSetting(t){this.customizationApi.hideSetting(t);}showSetting(t){this.customizationApi.showSetting(t);}lockSetting(t,n,o){this.customizationApi.lockSetting(t,n,o);}unlockSetting(t){this.customizationApi.unlockSetting(t);}setSettingDefault(t,n){this.customizationApi.setSettingDefault(t,n);}hideBackstagePage(t){this.customizationApi.hideBackstagePage(t);}showBackstagePage(t){this.customizationApi.showBackstagePage(t);}hideBackstageCard(t){this.customizationApi.hideBackstageCard(t);}showBackstageCard(t){this.customizationApi.showBackstageCard(t);}hideContextMenuCommand(t){this.customizationApi.hideContextMenuCommand(t);}showContextMenuCommand(t){this.customizationApi.showContextMenuCommand(t);}hideCanvasContextMenuCommand(t){this.customizationApi.hideCanvasContextMenuCommand(t);}showCanvasContextMenuCommand(t){this.customizationApi.showCanvasContextMenuCommand(t);}disableShortcut(t){this.customizationApi.disableShortcut(t);}enableShortcut(t){this.customizationApi.enableShortcut(t);}remapShortcut(t,n){this.customizationApi.remapShortcut(t,n);}setPanelVisible(t,n){this.customizationApi.setPanelVisible(t,n);}setFeatureEnabled(t,n){this.customizationApi.setFeatureEnabled(t,n);}setDialogAvailable(t,n){this.customizationApi.setDialogAvailable(t,n);}};function Ll(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let s=t.readInlineList?.();if(s?.kind==="unsupported")return;let a=s?.kind==="supported"&&s.snapshot.elementId===r?s.snapshot:void 0,l=a?{...i,text:a.text,textSegments:a.textSegments}:i,p=n(l,a);if(Object.keys(p).length!==0){if(a&&chunk5YHVN3PP_cjs.e(l)&&("textStyle"in p||"textSegments"in p)){let d=Object.fromEntries(Object.entries(p.textStyle??{}).filter(([g,x])=>x!==l.textStyle?.[g])),u=("textSegments"in p?p.textSegments:a.textSegments)?.map(g=>chunk5YHVN3PP_cjs.cg(g,d)),m=chunk5YHVN3PP_cjs.Bh(u);if(m!==a.text)t.cancelInlineList?.();else if(!t.formatInlineList?.({elementId:r,text:m,textSegments:u}))return;p={...p,text:m,textSegments:u};}t.pushHistory(),e.set(Z(o,U(o).map(d=>d.id===r?{...d,...p}:d))),t.commitChange();}}}function Ml(e){let{store:t,ops:n}=e,o=(i,s)=>{let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l?.animations?.some(d=>d.elementId===i))return;let p=s(l.animations);n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(a.slides,a.currentSlide,{animations:p})}),n.commitChange();},r=()=>t.get().slides[t.get().currentSlide]?.animationTimelineAnchors??[];return {addAnimation(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let d=chunk5YHVN3PP_cjs.Zc(p.animations??[],l,i,s);n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},removeAnimation(){let i=t.get(),s=i.selectedElementId,a=i.slides[i.currentSlide];if(!i.editable||!s||!a?.animations?.length)return;let l=chunk5YHVN3PP_cjs._c(a.animations,s);l.length!==a.animations.length&&(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(i.slides,i.currentSlide,{animations:l})}),n.commitChange());},setAnimationEffect(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let u=(i==="entrance"?chunk5YHVN3PP_cjs.Nc:i==="exit"?chunk5YHVN3PP_cjs.Oc:chunk5YHVN3PP_cjs.Pc)(p.animations??[],l,s);n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(a.slides,a.currentSlide,{animations:u})}),n.commitChange();},applyMotionPath(i){if(i==="custom")return;let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=l.animations??[],d=i==="none"?chunk5YHVN3PP_cjs.ce(p,a):chunk5YHVN3PP_cjs.be(p,a,i);n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(s.slides,s.currentSlide,{animations:d})}),n.commitChange();},setMotionPathData(i){let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=chunk5YHVN3PP_cjs.ae(l.animations??[],a,i);n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(s.slides,s.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(i,s){o(i,a=>{let l=[...a];return s.durationMs!==void 0&&(l=chunk5YHVN3PP_cjs.Sc(l,i,s.durationMs)),s.delayMs!==void 0&&(l=chunk5YHVN3PP_cjs.Tc(l,i,s.delayMs)),s.trigger!==void 0&&(l=chunk5YHVN3PP_cjs.Qc(l,i,s.trigger)),s.direction!==void 0&&(l=chunk5YHVN3PP_cjs.Vc(l,i,s.direction)),s.sequence!==void 0&&(l=chunk5YHVN3PP_cjs.Wc(l,i,s.sequence)),s.timingCurve!==void 0&&(l=chunk5YHVN3PP_cjs.Uc(l,i,s.timingCurve)),s.repeatCount!==void 0&&(l=chunk5YHVN3PP_cjs.Xc(l,i,s.repeatCount)),s.repeatMode!==void 0&&(l=chunk5YHVN3PP_cjs.Yc(l,i,s.repeatMode)),s.triggerShapeId!==void 0&&(l=chunk5YHVN3PP_cjs.Rc(l,i,s.triggerShapeId||void 0)),s.triggerBookmark!==void 0&&(l=chunk5YHVN3PP_cjs.hd(l,i,s.triggerBookmark)),s.afterAnimation!==void 0&&(l=chunk5YHVN3PP_cjs.sd(l,i,s.afterAnimation)),s.afterAnimationColor!==void 0&&(l=chunk5YHVN3PP_cjs.td(l,i,s.afterAnimationColor)),l});},setAnimationSound(i,s){o(i,a=>chunk5YHVN3PP_cjs.qd(a,i,s));},setAnimationStockSound(i,s){o(i,a=>chunk5YHVN3PP_cjs.pd(a,i,s));},reorderAnimation(i,s){o(i,a=>chunk5YHVN3PP_cjs.ld(a,r(),i,s==="up"?-1:1));},moveAnimation(i,s){o(i,a=>{let l=chunk5YHVN3PP_cjs.id(a,r()),p=chunk5YHVN3PP_cjs.jd(l,`editor:${i}`,s);return chunk5YHVN3PP_cjs.kd(a,p)});}}}function yP(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 Dl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return yP(e,chunk5YHVN3PP_cjs.Me(r,n))}function Rl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return yP(e,chunk5YHVN3PP_cjs.Ne(r,n))}function Ol(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 oi(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function Hl(e,t,n){return t.map(r=>e.find(i=>i.id===r)).every(r=>chunk5YHVN3PP_cjs._e(r,"group"))?chunk5YHVN3PP_cjs.o(e,t,n):{elements:[...e],groupId:null}}function Fl(e,t,n,o=false){let r=e.find(i=>i.id===t);return chunk5YHVN3PP_cjs._e(r,"group")?chunk5YHVN3PP_cjs.p(e,t,n,{intoTemplate:o}):{elements:[...e],childIds:[]}}function Vl(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let s=t.get(),a=s.selectedElementId;if(!s.editable||!a)return;let l=aP(s,a);i(l,a)!==l&&(n.pushHistory(),t.set(sP(s,a,i(l,a))),n.commitChange());};return {bringForward:()=>r(chunk5YHVN3PP_cjs.vf),sendBackward:()=>r(chunk5YHVN3PP_cjs.wf),bringToFront:()=>r(chunk5YHVN3PP_cjs.tf),sendToBack:()=>r(chunk5YHVN3PP_cjs.uf),alignElements(i){let s=t.get();if(s.selectedElementIds.length<2){o(a=>Ol(a,i,s.canvasSize));return}n.pushHistory(),t.set(Z(s,Dl(U(s),s.selectedElementIds,i))),n.commitChange();},distributeElements(i){let s=t.get();!s.editable||s.selectedElementIds.length<3||(n.pushHistory(),t.set(Z(s,Rl(U(s),s.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>oi(i,"horizontal")),flipVertical:()=>o(i=>oi(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let s=Hl(U(i),i.selectedElementIds,i.editTemplateMode?chunk5YHVN3PP_cjs.tl(true,i.selectedElementIds[0]):chunk5YHVN3PP_cjs.sl());s.groupId&&(n.pushHistory(),t.set({...Z(i,s.elements),selectedElementId:s.groupId,selectedElementIds:[s.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),s=i.selectedElementId,a=U(i),l=n.selectedElement(i);if(!i.editable||!s||!a||!l||l.type!=="group")return;let p=l.children.map(u=>i.editTemplateMode?chunk5YHVN3PP_cjs.tl(true,u.id||l.id):chunk5YHVN3PP_cjs.sl()),d=Fl(a,s,p,i.editTemplateMode);d.childIds.length!==0&&(n.pushHistory(),t.set({...Z(i,d.elements),selectedElementId:d.childIds.at(-1)??null,selectedElementIds:d.childIds}),n.commitChange());}}}function Bl(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:SP(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(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:SP(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}},setHideBackgroundGraphics(o){let r=t.get();!r.editable||r.masterViewTarget||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(r.slides,r.currentSlide,{showMasterShapes:!o})}),n.commitChange());}}}function SP(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,s)=>s===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function zl(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunk5YHVN3PP_cjs.ul(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunk5YHVN3PP_cjs.ul(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunk5YHVN3PP_cjs.vl(r.element);n.pushHistory(),t.set({...Z(o,[...U(o),i]),selectedElementId:i.id,selectedElementIds:[i.id],pasteOptionsToolbar:[{id:i.id,sourceClone:i}]}),n.commitChange();},pasteWithFormat(o){let r=t.get(),i=r.clipboardPayload;if(!r.editable||!i||!r.slides[r.currentSlide])return null;let s=chunk5YHVN3PP_cjs.vl(i.element),a=o==="picture"?s:chunk5YHVN3PP_cjs.Xl(s,o);return n.pushHistory(),t.set({...Z(r,[...U(r),a]),selectedElementId:a.id,selectedElementIds:[a.id],pasteOptionsToolbar:[{id:a.id,sourceClone:s}]}),n.commitChange(),a.id},reformatPasted(o,r,i){i!=="picture"&&CP(t,n,o,chunk5YHVN3PP_cjs.Xl(r,i));},replaceElement(o,r){CP(t,n,o,r);}}}function CP(e,t,n,o){let r=e.get();t.pushHistory(),e.set(Z(r,U(r).map(i=>i.id===n?o:i))),t.commitChange();}function Nl(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((s,a)=>r||a===0?{...s,themePath:o}:s)}),n.commitChange()))();},applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){let s=t.get();if(!s.editable)return;n.pushHistory();let a=s.colorScheme?{...s.colorScheme}:void 0,l=chunk5YHVN3PP_cjs.R({slides:s.slides,theme:{colorScheme:s.colorScheme,fontScheme:s.fontScheme},themeColorMap:a},o,r,i),p=Object.keys(s.templateElementsBySlideId).length?Object.fromEntries(Object.entries(s.templateElementsBySlideId).map(([d,u])=>[d,chunk5YHVN3PP_cjs.Q(u,a??{},o)])):s.templateElementsBySlideId;t.set({slides:l.slides,templateElementsBySlideId:p,colorScheme:l.theme?.colorScheme??o,fontScheme:l.theme?.fontScheme??r,themeName:i}),n.commitChange();},updateTagCollections(o){t.get().editable&&(t.set({tagCollections:o}),n.commitChange());},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Nr(r.slides,r.currentSlide,o)}),n.commitChange());},setTemplateBackground(o,r){let i=e.getHandler();!i||!t.get().editable||(i.setTemplateBackground(o,r),t.set({slideMasters:t.get().slideMasters.map(s=>s.path===o?{...s,backgroundColor:r}:s)}),n.commitChange());},getTemplateBackgroundColor(o){return e.getHandler()?.getTemplateBackgroundColor(o)},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());},updateSlideSize(o){!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0||t.get().editable&&(t.set({slideSize:{...o},canvasSize:chunk5YHVN3PP_cjs.kj(o)}),n.commitChange());},applySlideSizeRescale(o,r){if(!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0)return;let i=t.get();if(!i.editable)return;let s=chunk5YHVN3PP_cjs.lj({current:i.slideSize,canvas:i.canvasSize}).size;n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.as(i.slides,s,o,r),slideSize:{...o},canvasSize:chunk5YHVN3PP_cjs.kj(o)}),n.commitChange();},updateTableStyleMap(o){let r=t.get();if(!r.editable)return;let i=chunk5YHVN3PP_cjs.up({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();},deleteTableStyle(o){let r=t.get();if(!r.editable)return;let i=chunk5YHVN3PP_cjs.vp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();}}}function ni(e,t,n,o){let r=we(e,t,t("pptx.hyperlink.editTitle")),i=chunk5YHVN3PP_cjs.hm(n),s=(p,d)=>{let u=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-select"),m=chunkIQ7MDPEN_cjs.w(e,"span");m.textContent=p;let g=chunkIQ7MDPEN_cjs.w(e,"input");return g.type="text",g.value=d,u.append(m,g),r.body.appendChild(u),g},a=s(t("pptx.hyperlink.urlLabel"),i.url);a.placeholder=t("pptx.hyperlink.urlPlaceholder");let l=s(t("pptx.hyperlink.tooltipLabel"),i.tooltip);ae(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunk5YHVN3PP_cjs.jm()),r.close();}),ae(e,r.footer,t("pptx.common.cancel"),r.close),ae(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunk5YHVN3PP_cjs.im(n,{url:a.value,tooltip:l.value})),r.close();},true);}function wP(e,t,n){let o=we(e,t,t("pptx.pasteSpecial.dialogTitle")),r="keep-source-formatting";Br(e,o.body,"paste-special-format",chunk5YHVN3PP_cjs.Wl.map(i=>({value:i.id,label:t(i.labelKey)})),r,i=>{r=i;}),ae(e,o.footer,t("pptx.common.cancel"),()=>o.close()),ae(e,o.footer,t("pptx.common.ok"),()=>{o.close(),n.onConfirm(r);},true);}var ri=new WeakMap;function hM(e,t){e.addEventListener("pointerdown",n=>{n.stopPropagation(),e.setPointerCapture(n.pointerId);}),e.addEventListener("pointermove",n=>{if(!e.hasPointerCapture(n.pointerId))return;let o=ri.get(e),r=e.offsetParent;if(!o||!r)return;let i=r.getBoundingClientRect(),s=o.scale||1,a=o.axis==="h"?(n.clientY-i.top)/s:(n.clientX-i.left)/s;t.onMoveGuide(o.id,a);}),e.addEventListener("pointerup",n=>{try{e.releasePointerCapture(n.pointerId);}catch{}}),e.addEventListener("dblclick",n=>{n.stopPropagation();let o=ri.get(e);o&&t.onRemoveGuide(o.id);});}function EP(e,t,n,o,r){let i=new Map;t.querySelectorAll(".pptxv-alignment-guide").forEach(a=>{let l=a.dataset.guideId;l!==void 0&&i.set(l,a);});let s=new Set;for(let a of n){s.add(a.id);let l=i.get(a.id);l||(l=e.createElement("div"),l.dataset.guideId=a.id,r&&hM(l,r),t.appendChild(l)),l.className=`pptxv-alignment-guide is-${a.axis}${r?" is-interactive":""}`,l.style[a.axis==="h"?"top":"left"]=`${a.position*o}px`,ri.set(l,{id:a.id,axis:a.axis,scale:o});}for(let[a,l]of i)s.has(a)||(ri.delete(l),l.remove());}function yM(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="chart"?t:null}function TP(e){let{doc:t,t:n,store:o,ops:r}=e,i=t.createElement("div");i.className="pptxv-chart-quick-actions",i.setAttribute("data-pptx-chart-quick-actions","");let s=null;function a(b,v){let f=o.get();!f.editable||!U(f).some(S=>S.id===b)||(r.pushHistory(),o.set(Z(f,U(f).map(S=>S.id===b?{...S,chartData:v}:S))),r.commitChange());}function l(b){b.preventDefault(),b.stopPropagation();}function p(b){s=s===b?null:b,x();}function d(b,v){let f=t.createElement("button");return f.type="button",f.className="pptxv-chart-quick-btn",f.disabled=!v,f.dataset.testid=`chart-quick-action-${b.id}`,f.setAttribute("aria-label",n(b.labelKey)),f.title=n(b.labelKey),f.style.left=`${b.x}px`,f.style.top=`${b.y}px`,f.style.width=`${b.size}px`,f.style.height=`${b.size}px`,f.appendChild(chunkIQ7MDPEN_cjs.K(t,b.id==="elements"?"plus":b.id==="styles"?"paintbrush":"filter")),f.addEventListener("pointerdown",l),f.addEventListener("click",()=>p(b.id)),f}function u(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-elements-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickElements"),h.appendChild(C);for(let w of b.elements){let A=t.createElement("label");A.className="row";let P=t.createElement("input");P.type="checkbox",P.disabled=!f,P.checked=w.checked,P.dataset.testid=`chart-quick-element-${w.key}`,P.addEventListener("pointerdown",l),P.addEventListener("change",()=>{let T=v.chartData;T&&(a(v.id,chunk5YHVN3PP_cjs.mc(T,w.key,P.checked)),x());});let k=t.createElement("span");k.textContent=n(w.labelKey),A.append(P,k),h.appendChild(A);}return h}function m(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card pptxv-chart-quick-styles",h.dataset.testid="chart-quick-styles-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;for(let C of b.styles.presets){let w=t.createElement("button");w.type="button",w.className="pptxv-chart-quick-swatch",w.classList.toggle("is-applied",C.applied),w.disabled=!f,w.dataset.testid=`chart-quick-style-${C.id}`,w.setAttribute("aria-label",n(C.labelKey)),w.setAttribute("aria-pressed",String(C.applied)),w.title=n(C.labelKey);let A=t.createElement("span");A.className="swatch-row";for(let P of C.colors.slice(0,5)){let k=t.createElement("span");k.style.backgroundColor=P,A.appendChild(k);}w.appendChild(A),w.addEventListener("pointerdown",l),w.addEventListener("click",()=>{let P=v.chartData;if(!P)return;let k=chunk5YHVN3PP_cjs.kc(P,C.id);k&&a(v.id,k),x();}),h.appendChild(w);}return h}function g(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-filters-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickFilters"),h.appendChild(C);for(let w of b.filters.series){let A=t.createElement("label");A.className="row";let P=t.createElement("input");P.type="checkbox",P.disabled=!f,P.checked=w.visible,P.dataset.testid=`chart-quick-filter-${w.key}`,P.addEventListener("pointerdown",l),P.addEventListener("change",()=>{let T=v.chartData;if(!T)return;let E=w.seriesIndex!==void 0?chunk5YHVN3PP_cjs.hc(T,w.seriesIndex):chunk5YHVN3PP_cjs.ic(T,w.filteredIndex);E&&a(v.id,E),x();});let k=t.createElement("span");k.className="name",k.textContent=w.name,A.append(P,k),h.appendChild(A);}return h}function x(){let b=o.get(),v=yM(b);if(i.replaceChildren(),!v||!v.chartData)return;let f=e.getScale()||1,S=chunk5YHVN3PP_cjs.oc({isChartSelected:true,chartData:v.chartData,selectionBox:{x:v.x*f,y:v.y*f,width:v.width*f,height:v.height*f}});if(S){s&&!S.buttons.some(y=>y.id===s)&&(s=null);for(let y of S.buttons){if(i.appendChild(d(y,b.editable)),s!==y.id)continue;let h=y.x+chunk5YHVN3PP_cjs.nc+4,C=y.y;y.id==="elements"?i.appendChild(u(S,v,b.editable,h,C)):y.id==="styles"?i.appendChild(m(S,v,b.editable,h,C)):i.appendChild(g(S,v,b.editable,h,C));}}}return {root:i,mount(b){b.appendChild(i),x();},sync:x,dispose(){s=null,i.remove();}}}function PP(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function AP(e){let{doc:t,store:n,ops:o}=e,r=t.createElement("div");r.className="pptxv-connector-endpoints",r.setAttribute("data-pptx-connector-endpoints","");let i=null,s=m=>{let g=r.getBoundingClientRect(),x=e.getScale()||1;return {x:(m.clientX-g.left)/x,y:(m.clientY-g.top)/x}},a=m=>{i&&(i={kind:i.kind,...s(m)},u());},l=m=>{let g=i;i=null,p();let x=n.get(),b=PP(x);if(!g||!b){u();return}let v=U(x),f=s(m),S=chunk5YHVN3PP_cjs.Yg(chunk5YHVN3PP_cjs.Xg(v.filter(C=>C.id!==b.id)),f.x,f.y),y=chunk5YHVN3PP_cjs.Zg(b,v,g.kind,f,S),h=chunk5YHVN3PP_cjs._g(b,y);o.pushHistory(),n.set(Z(x,v.map(C=>C.id===b.id?h:C))),o.commitChange();},p=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l);};function d(m,g){let x=t.createElement("button");x.type="button",x.className="pptxv-connector-endpoint",m.attached&&x.classList.add("is-attached"),x.dataset.pptxConnectorEndpoint=m.kind,x.dataset.pptxConnectorAttached=String(m.attached),x.setAttribute("aria-label",e.label(m.kind));let b=i?.kind===m.kind?i:m;return x.style.left=`${b.x*g}px`,x.style.top=`${b.y*g}px`,x.addEventListener("pointerdown",v=>{v.preventDefault(),v.stopPropagation(),i={kind:m.kind,...s(v)},window.addEventListener("pointermove",a),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),u();}),x}function u(){let m=n.get(),g=PP(m);if(r.replaceChildren(),!g)return;let x=e.getScale()||1,b=U(m);if(i){let v=chunk5YHVN3PP_cjs.Xg(b.filter(S=>S.id!==g.id)),f=chunk5YHVN3PP_cjs.Yg(v,i.x,i.y);for(let S of v){let y=t.createElement("div");y.className="pptxv-connection-site",y.setAttribute("data-pptx-connection-site",""),f?.elementId===S.elementId&&f.siteIndex===S.siteIndex&&y.classList.add("is-snapped"),y.style.left=`${S.x*x}px`,y.style.top=`${S.y*x}px`,r.appendChild(y);}}for(let v of chunk5YHVN3PP_cjs.Wg(g))r.appendChild(d(v,x));}return {root:r,isActive:()=>i!==null,mount(m){m.appendChild(r),u();},sync:u,dispose(){p(),i=null,r.remove();}}}var kP="http://www.w3.org/2000/svg";function _l(e,t){e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`;}function IP(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-crop-overlay",{position:"absolute",overflow:"visible",zIndex:"50",pointerEvents:"none"});o.dataset.pptxCropOverlay="true";let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-crop-ghost",{position:"absolute",pointerEvents:"auto",cursor:"move"}),i=e.createElement("img");i.alt="",i.draggable=false,Object.assign(i.style,{display:"block",width:"100%",height:"100%",pointerEvents:"none",userSelect:"none"}),r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-crop-frame",{position:"absolute",boxSizing:"border-box",pointerEvents:"auto",cursor:"move"});s.dataset.pptxCropFrame="true";let a=d=>{d.button===0&&n.onPanPointerDown(d);};r.addEventListener("pointerdown",a),s.addEventListener("pointerdown",a),o.append(r,s);let l=new Map,p=d=>{let u=l.get(d);if(u)return u;let m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-crop-handle",{position:"absolute",pointerEvents:"auto",touchAction:"none"});m.dataset.pptxCropHandle=d,m.setAttribute("role","button"),m.setAttribute("aria-label",t);let g=e.createElementNS(kP,"svg");g.setAttribute("aria-hidden","true"),Object.assign(g.style,{position:"absolute",inset:"0",overflow:"visible"});let x=e.createElementNS(kP,"path");x.setAttribute("fill","#000000"),x.setAttribute("stroke","#ffffff"),g.appendChild(x),m.appendChild(g),m.addEventListener("pointerdown",v=>{v.button===0&&n.onHandlePointerDown(d,v);}),o.appendChild(m);let b={node:m,path:x,svg:g};return l.set(d,b),b};return {root:o,update(d,u,m){let g=chunk5YHVN3PP_cjs.Xs(d,u);o.style.left=`${d.x}px`,o.style.top=`${d.y}px`,o.style.width=`${d.width}px`,o.style.height=`${d.height}px`,o.style.transform=d.rotation?`rotate(${d.rotation}deg)`:"",_l(r,g.ghost),r.style.clipPath=g.ghost.clipPath,r.style.opacity=String(g.ghost.opacity),i.style.transform=g.ghost.transform,m&&i.getAttribute("src")!==m&&(i.src=m),_l(s,g.frame);let x=u>0?1/u:1;s.style.outline=`${x}px solid rgba(0, 0, 0, 0.6)`;for(let b of g.handles){let v=p(b.id);_l(v.node,b),v.node.style.cursor=b.cursor,v.svg.setAttribute("width",String(b.width)),v.svg.setAttribute("height",String(b.height)),v.path.setAttribute("d",b.path),v.path.setAttribute("stroke-width",String(x));}},mount(d){if(!d){o.remove();return}(o.parentElement!==d||d.lastElementChild!==o)&&d.appendChild(o);},unmount(){o.remove();}}}var SM="[data-pptx-crop-controls]";function CM(e){return e instanceof HTMLElement&&(e.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(e.tagName))}function LP(e){let{doc:t,store:n,actions:o}=e,r=null,i=null,s=null,a=x=>x.cropSession?J(x,x.cropSession.elementId):void 0,l=(x,b)=>{let v=a(n.get());if(!v)return;x.preventDefault(),x.stopPropagation(),s?.stop();let f=chunk5YHVN3PP_cjs.Os(v),S=e.getScale()>0?e.getScale():1,y=x.clientX,h=x.clientY;n.set({interactionActive:true});let C=A=>{let P=chunk5YHVN3PP_cjs.Rs((A.clientX-y)/S,(A.clientY-h)/S,f.rotation);o.previewCrop(b(f,P.dx,P.dy));},w=()=>{t.removeEventListener("pointermove",C),t.removeEventListener("pointerup",w),t.removeEventListener("pointercancel",w),s=null,n.set({interactionActive:false});};t.addEventListener("pointermove",C),t.addEventListener("pointerup",w),t.addEventListener("pointercancel",w),s={stop:w};},p=()=>(r??=IP(t,e.getTranslator()(chunk5YHVN3PP_cjs.ft),{onHandlePointerDown:(x,b)=>l(b,(v,f,S)=>chunk5YHVN3PP_cjs.Ps(v,x,f,S)),onPanPointerDown:x=>l(x,chunk5YHVN3PP_cjs.Qs)}),r),d=x=>{if(!n.get().cropSession||CM(x.target)||i&&x.target instanceof Node&&x.target!==t.body&&!i.contains(x.target))return;let b=chunk5YHVN3PP_cjs.at(x.key);b&&(x.preventDefault(),x.stopImmediatePropagation(),b==="commit"?o.commitCropMode():o.cancelCropMode());},u=x=>{if(!n.get().cropSession||s)return;let b=x.target instanceof Element?x.target:null;b&&(r?.root.contains(b)||b.closest(SM))||o.commitCropMode();},m=n.subscribe((x,b)=>{let v=x.cropSession;if(!v)return;let f=x.selectedElementIds.length===1&&x.selectedElementIds[0]===v.elementId;(x.currentSlide!==b.currentSlide||!f||!x.editable||x.presenting)&&o.commitCropMode();}),g=()=>{s?.stop(),r?.unmount(),t.removeEventListener("keydown",d,true),t.removeEventListener("pointerdown",u),i=null;};return {attach(x){g(),i=x,t.addEventListener("keydown",d,true),t.addEventListener("pointerdown",u);},sync(){let x=n.get(),b=x.editable&&!x.presenting?a(x):void 0;if(!b){r?.unmount();return}let v=p();v.update(b,e.getScale(),chunk5YHVN3PP_cjs.nf(b,new Map(x.mediaDataUrls))),v.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},isDragging:()=>s!==null,detach:g,destroy(){g(),m(),r=null;}}}function MP(e){if(e.length===0)return null;if(e.length>1){let n=chunk5YHVN3PP_cjs.gf(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 DP(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Gl(e){let t=null,n=a=>{let{x:l,y:p}=DP(a.clientX,a.clientY,e.getStageOrigin(),e.getScale());return chunk5YHVN3PP_cjs.Km(l,p,a)};function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",s);}function r(a){!t||a.pointerId!==t.pointerId||(t.points.push(n(a)),e.onStrokePreview?.(t.points));}function i(a){if(!t||a.pointerId!==t.pointerId)return;t.points.push(n(a));let l=t;o(),t=null,e.onStrokePreview?.(null),e.onCommitStroke({points:l.points,color:e.getColor(),width:e.getWidth(),tool:l.tool});}function s(a){!t||a.pointerId!==t.pointerId||(o(),t=null,e.onStrokePreview?.(null));}return {onStagePointerDown(a){if(a.button!==0)return;let l=e.getTool();if(l!=="select"){if(l==="eraser"){let p=chunk5YHVN3PP_cjs.Fm(a.target,e.getStageRoot());p&&(a.preventDefault(),a.stopPropagation(),e.onEraseAt(p));return}a.preventDefault(),a.stopPropagation(),t={tool:l,pointerId:a.pointerId,points:[n(a)]},e.onStrokePreview?.(t.points),window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",s);}},isActive:()=>t!==null,dispose(){let a=t!==null;o(),t=null,a&&e.onStrokePreview?.(null);}}}function Ul(e){let t=chunkIQ7MDPEN_cjs.x(e,"svg",{"aria-hidden":"true","data-pptx-ink-live-preview":"true"});return t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.pointerEvents="none",t.style.zIndex="46",{root:t,mount(n){if(!n){t.remove();return}t.parentElement!==n&&n.appendChild(t);},update(n,o){if(!n){t.replaceChildren();return}let r=Math.max(o.width,1),i=Math.max(o.height,1);t.setAttribute("width",String(r)),t.setAttribute("height",String(i)),t.setAttribute("viewBox",`0 0 ${r} ${i}`),t.replaceChildren(chunkIQ7MDPEN_cjs.G(e,n,void 0));},destroy(){t.remove();}}}function Kl(e){let{store:t,editActions:n,interactions:o}=e,r=Ul(e.doc),i=l=>l==="highlighter"?"highlighter":l==="freeform"?"freeform":"pen",s=Gl({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:l=>n.commitStroke(l),onEraseAt:l=>n.eraseInkElement(l),onStrokePreview:l=>{if(!l){r.update(null,t.get().canvasSize);return}r.mount(e.getStageRoot());let p=chunk5YHVN3PP_cjs.Mm({points:[...l],color:t.get().drawColor,width:t.get().drawWidth,tool:i(t.get().drawTool)});r.update(p,t.get().canvasSize);}}),a=l=>l.editable&&!l.presenting&&l.drawTool!=="select";return {isActive:()=>s.isActive(),onStagePointerDown(l){if(a(t.get())){s.onStagePointerDown(l);return}o.onStagePointerDown(l);},onStageDblClick(l){a(t.get())||o.onStageDblClick(l);},syncCursor(l){if(!l)return;let p=t.get();l.dataset.drawTool=a(p)?p.drawTool:"select";},setTool(l){let p=t.get();p.drawTool!==l&&(l!=="select"&&o.closeInline(true),t.set({drawTool:l,selectedElementId:l==="select"?p.selectedElementId:null}));},setColor:l=>t.set({drawColor:l}),setWidth:l=>t.set({drawWidth:Math.max(1,Math.round(l))}),dispose:()=>{s.dispose(),r.destroy();}}}function wM(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function EM(e,t){let n=e.at(-1);return n?e.map(o=>o.id===n.id?{...o,mentions:t}:o):e}function TM(e,t,n){return e.map(o=>{if(o.id!==t)return o;let r=o.replies?.at(-1);return r?{...o,replies:o.replies?.map(i=>i.id===r.id?{...i,mentions:n}:i)}:o})}function RP(e){let t=()=>e.getUserName?.()||"You",n=o=>{let r=e.store.get();if(!r.editable||!r.slides[r.currentSlide])return null;let i=o(r.slides[r.currentSlide].comments??[]);return i?(e.ops.pushHistory(),e.store.set({slides:wM(r.slides,r.currentSlide,()=>i)}),e.ops.commitChange(),i):null};return {addComment(o,r,i){let s=n(a=>{let l=chunk5YHVN3PP_cjs.dn(a,o,t(),void 0,void 0,r);return l&&i?.length?EM(l,i):l});return s?s[s.length-1]?.id??null:null},addCommentReply(o,r,i){let s=n(l=>{let p=chunk5YHVN3PP_cjs.gn(l,o,r,t());return p&&i?.length?TM(p,o,i):p});return s?s.find(l=>l.id===o)?.replies?.at(-1)?.id??null:null},editComment(o,r){n(i=>chunk5YHVN3PP_cjs.fn(i,o,r));},deleteComment(o){n(r=>chunk5YHVN3PP_cjs.en(r,o));},toggleCommentResolved(o){n(r=>chunk5YHVN3PP_cjs.hn(r,o));}}}function OP(e,t){let n=U(e).find(o=>o.id===t);if(n)return n;for(let o of e.slides){let r=o.elements.find(i=>i.id===t);if(r)return r}}var HP=(e,t)=>({...e,...t});function po(e,t,n){let o=U(e);return o.some(r=>r.id===t)?Z(e,o.map(r=>r.id===t?HP(r,n):r)):{slides:e.slides.map(r=>r.elements.some(i=>i.id===t)?{...r,elements:r.elements.map(i=>i.id===t?HP(i,n):i)}:r)}}var PM=e=>({...chunk5YHVN3PP_cjs.Ns(e),...chunk5YHVN3PP_cjs.Ms(e)});function FP(e,t){let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,o=e.querySelector(`[data-element-id="${n}"] img`);return o&&o.naturalWidth>0&&o.naturalHeight>0?{width:o.naturalWidth,height:o.naturalHeight}:void 0}function VP(e){let{doc:t,store:n,ops:o}=e,r=p=>{if(!p.editable||p.selectedElementIds.length!==1)return;let d=o.selectedElement(p);return chunk5YHVN3PP_cjs.Ys(d)?d:void 0},i=p=>{let d=n.get(),u=d.cropSession,m=u?OP(d,u.elementId):r(d);if(!m)return;let g=p(m);if(u){n.set(po(d,m.id,g));return}o.pushHistory(),n.set(po(d,m.id,g)),o.commitChange();},s=()=>{let p=n.get();if(p.cropSession)return;let d=chunk5YHVN3PP_cjs.Zs(r(p));d&&n.set({cropSession:d});},a=()=>{let p=n.get(),d=p.cropSession;if(!d)return;let u=OP(p,d.elementId);if(!u||!chunk5YHVN3PP_cjs.$s(d,u)){n.set({cropSession:null});return}let m=PM(u);n.set({...po(p,d.elementId,chunk5YHVN3PP_cjs._s(d)),cropSession:null}),o.pushHistory(),n.set(po(n.get(),d.elementId,m)),o.commitChange();};return {toggleCropMode(){n.get().cropSession?a():s();},enterCropMode:s,commitCropMode:a,cancelCropMode:()=>{let p=n.get(),d=p.cropSession;d&&n.set({...po(p,d.elementId,chunk5YHVN3PP_cjs._s(d)),cropSession:null,interactionActive:false});},previewCrop(p){let d=n.get();d.cropSession&&n.set(po(d,d.cropSession.elementId,p));},cropToAspect:(p,d)=>i(u=>chunk5YHVN3PP_cjs.Us(u,p,d)),cropFill:()=>i(p=>chunk5YHVN3PP_cjs.Vs(p,FP(t,p.id))),cropFit:()=>i(p=>chunk5YHVN3PP_cjs.Ws(p,FP(t,p.id)))}}function BP(e){let{store:t,ops:n,deck:o}=e;return {applyRibbonGalleryResult(r){let i=t.get();if(i.editable){if(r.kind==="element"){let s=U(i);if(!s.some(a=>a.id===r.elementId))return;n.pushHistory(),t.set(Z(i,s.map(a=>a.id===r.elementId?{...a,...r.patch}:a))),n.commitChange();return}if(r.kind==="themeColorScheme"){o.applyThemeEdit({colorScheme:r.colorScheme,fontScheme:i.fontScheme??{},name:r.name});return}i.colorScheme&&o.applyThemeEdit({colorScheme:i.colorScheme,fontScheme:r.fontScheme,name:r.name});}}}}function Wl(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunk5YHVN3PP_cjs.Lm(o);i&&(n.pushHistory(),t.set({slides:chunk5YHVN3PP_cjs.Lr(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=chunk5YHVN3PP_cjs.Ir(r.slides,r.currentSlide,o);if(!i||i.type!=="ink"&&i.type!=="contentPart")return false;n.pushHistory();let s=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:chunk5YHVN3PP_cjs.Jr(r.slides,r.currentSlide,o),selectedElementId:s}),n.commitChange(),true}}}var AM={width:320,height:80},kM={width:600,height:250},IM={width:200,height:150},zP={width:240,height:0};function Ne(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 $l(e,t,n="rect"){let o,r;switch(e){case "text":o=chunk5YHVN3PP_cjs.h("Text",{fontSize:18,color:"#000000"}),r=AM;break;case "table":o={...chunk5YHVN3PP_cjs.sf(3,3),id:chunk5YHVN3PP_cjs.n("table")},r=kM;break;case "shape":n==="connector"?(o=chunk5YHVN3PP_cjs.j({type:"straight",stroke:{color:"#000000",width:2}}),r=zP):(o=chunk5YHVN3PP_cjs.i(n),r=n==="line"?zP:IM);break}return o.width=r.width,o.height=r.height,Ne(o,t),o}function LM(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),s=Math.max(1,Math.round(i/(r||1)));n({width:i,height:s});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function ii(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 s=new FileReader;s.onload=async()=>{let a=typeof s.result=="string"?s.result:"";if(!a){n(null);return}let l=Math.round(t.width*.6),{width:p,height:d}=await LM(a,l),u={id:chunk5YHVN3PP_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:p,height:d,imageData:a};Ne(u,t),n(u);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var MM={width:420,height:64},Ft={width:640,height:360};function DM(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||Ft.width,i=o.videoHeight||Ft.height;if(r>Ft.width||i>Ft.height){let s=Math.min(Ft.width/r,Ft.height/i);n({width:Math.round(r*s),height:Math.round(i*s)});return}n({width:r,height:i});},o.onerror=()=>n(Ft),o.src=t;})}function ql(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 s=chunk5YHVN3PP_cjs.ho(i.type);if(!s){n(null);return}let a=new FileReader;a.onload=async()=>{let l=typeof a.result=="string"?a.result:"";if(!l){n(null);return}let p=s==="audio"?MM:await DM(e,l),d={id:chunk5YHVN3PP_cjs.n("media"),type:"media",mediaType:s,mediaMimeType:i.type||void 0,mediaData:l,x:0,y:0,width:p.width,height:p.height};Ne(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var NP={width:400,height:80},_P={width:600,height:340},GP={width:200,height:40};function jl(e,t){let n=chunk5YHVN3PP_cjs.vn(e);return Ne(n,t),n}function Yl(e,t,n){let o={id:chunk5YHVN3PP_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:_P.width,height:_P.height,smartArtData:chunk5YHVN3PP_cjs.bm(e,t,r=>chunk5YHVN3PP_cjs.n(`smartart-node-${r}`))};return Ne(o,n),o}function Xl(e,t){let n="[Equation]",o={id:chunk5YHVN3PP_cjs.n("equation"),type:"shape",x:0,y:0,width:NP.width,height:NP.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Ne(o,t),o}function Ql(e,t){let n=chunk5YHVN3PP_cjs.Zl(e,chunk5YHVN3PP_cjs.n("actionbutton"));return n?(Ne(n,t),n):null}function Zl(e,t){return chunk5YHVN3PP_cjs.rf(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Jl(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunk5YHVN3PP_cjs.n("field"),type:"shape",x:0,y:0,width:GP.width,height:GP.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Ne(r,n),r}function UP(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((s,a)=>o.has(`${i}:${a}`)?{...s,style:{...s.style,...n}}:s)}))}}function KP(e,t,n){switch(n){case "insertRowAbove":return chunk5YHVN3PP_cjs.ve(e,t.row,"above");case "insertRowBelow":return chunk5YHVN3PP_cjs.ve(e,t.row,"below");case "deleteRow":return chunk5YHVN3PP_cjs.we(e,t.row);case "insertColumnLeft":return chunk5YHVN3PP_cjs.xe(e,t.column,"left");case "insertColumnRight":return chunk5YHVN3PP_cjs.xe(e,t.column,"right");case "deleteColumn":return chunk5YHVN3PP_cjs.ye(e,t.column)}}function WP(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100));return {...e,columnWidths:chunk5YHVN3PP_cjs.Ke(e.columnWidths,t,o)}}function $P(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function qP(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunk5YHVN3PP_cjs.pe(n,e)?chunk5YHVN3PP_cjs.qe(n,e):e}function jP(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=chunk5YHVN3PP_cjs.De(e,t.row,t.column);return i?{...e,rows:i.map((s,a)=>({...s,cells:s.cells.map((l,p)=>a>=t.row&&a<t.row+o&&p>=t.column&&p<t.column+r?{...l,hMerge:void 0,vMerge:void 0}:l)}))}:e}var RM={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function ep(e){return {toggleElementLock:()=>e(t=>({locks:chunk5YHVN3PP_cjs.bf(!chunk5YHVN3PP_cjs.af(t))})),setTextVerticalAlign:t=>e(n=>chunk5YHVN3PP_cjs.Ng(n,t)),setTextWrap:t=>e(n=>chunk5YHVN3PP_cjs.Qg(n,t)),setAutoFitMode:t=>e(n=>chunk5YHVN3PP_cjs.Rg(n,t)),setTextAdvanced:t=>e(n=>chunk5YHVN3PP_cjs.Mg(n,t)),setTextStyle:(t,n)=>e(o=>{if(!("textStyle"in o))return {};if(n&&o.textSegments?.length){let r=io(),i=r!==void 0?chunk5YHVN3PP_cjs.oh(r,o.textSegments,o.textStyle):o.textSegments;return {textSegments:chunk5YHVN3PP_cjs.mg(i,n,t).newSegments,...r!==void 0?{text:r}:{}}}return {textStyle:{...o.textStyle,...t}}}),setFillOpacity:t=>e(n=>pt(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>pt(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunk5YHVN3PP_cjs.Tm(n,t)),addGradientStop:(t,n)=>e(o=>chunk5YHVN3PP_cjs.Um(o,t,n)),removeGradientStop:t=>e(n=>chunk5YHVN3PP_cjs.Vm(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunk5YHVN3PP_cjs.Wm(o,t,n)),setImageBrightness:t=>e(n=>chunk5YHVN3PP_cjs.Zm(n,{brightness:t})),setImageContrast:t=>e(n=>chunk5YHVN3PP_cjs.Zm(n,{contrast:t})),setImageSaturation:t=>e(n=>chunk5YHVN3PP_cjs.Zm(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunk5YHVN3PP_cjs.$m(o,{[RM[t]]:n})),setImageEffects:t=>e(n=>chunk5YHVN3PP_cjs.d(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunk5YHVN3PP_cjs.s(n)})),setAltText:t=>e(()=>({altText:t})),setTitle:t=>e(()=>({title:t})),setOleName:t=>e(n=>n.type==="ole"?chunk5YHVN3PP_cjs.Uf(t):{}),setOleContent:t=>e(n=>n.type==="ole"?t:{}),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunk5YHVN3PP_cjs.bn(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunk5YHVN3PP_cjs.bn(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunk5YHVN3PP_cjs.cn(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}}),setTableData:(t,n)=>e(o=>o.type==="table"?{tableData:t,...n?{rawXml:n}:{}}:{}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,s)=>s===t?{...i,cells:i.cells.map((a,l)=>l===n?{...a,style:{...a.style,...o}}:a)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:UP(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>{if(o.type!=="table"||!o.tableData)return {};let r=KP(o,t,n);return r===o?{}:{tableData:r.tableData,rawXml:r.rawXml}}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:WP(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:$P(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:qP(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:jP(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>co(o,r=>chunk5YHVN3PP_cjs.E(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>co(o,r=>chunk5YHVN3PP_cjs.I(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>co(o,r=>n==="add"?chunk5YHVN3PP_cjs.C(r,"New item"):n==="addChild"?chunk5YHVN3PP_cjs.H(r,t,"New item"):n==="remove"?chunk5YHVN3PP_cjs.D(r,t):n==="promote"?chunk5YHVN3PP_cjs.F(r,t):chunk5YHVN3PP_cjs.G(r,t))),replaceSmartArtData:t=>e(n=>co(n,()=>t)),setSmartArtLayout:t=>e(n=>co(n,o=>chunk5YHVN3PP_cjs.M(o,t))),setSmartArtColorScheme:t=>e(n=>co(n,o=>({...o,colorScheme:t})))}}function co(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunk5YHVN3PP_cjs.wn(n,e.id,o)}}function tp(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,widthEmu:e.slideSize?.widthEmu,heightEmu:e.slideSize?.heightEmu,slideSizeType:e.slideSize?.type,slideMasters:e.slideMasters,presentationProperties:e.presentationProperties,customShows:e.customShows,sections:e.sections}}function op(e){return e.masterViewTarget?{tab:e.masterViewTab,...e.masterViewTarget}:null}function OM(e,t){let n=e[t.masterIndex];return t.layoutIndex===null?n?.name??"":n?.layouts?.[t.layoutIndex]?.name??""}async function HM(e,t){let n=[];for(let s of t){n.push({id:s.path,rId:"",slideNumber:0,elements:s.elements??[]});for(let a of s.layouts??[])n.push({id:a.path,rId:"",slideNumber:0,elements:a.elements??[]});}let{paths:o,refs:r}=chunk5YHVN3PP_cjs.Oa(n);if(o.size===0)return [...t];let i=new Map;return await Promise.all(Array.from(o).map(async s=>{try{let a=await e.getImageData(s);a&&i.set(s,a);}catch{}})),t.map(s=>({...s,elements:chunk5YHVN3PP_cjs.La(s.elements??[],i,r),layouts:s.layouts?.map(a=>({...a,elements:chunk5YHVN3PP_cjs.La(a.elements??[],i,r)}))}))}function YP(e){let{doc:t,store:n,ops:o}=e;return {async runMasterViewCrudAction(r){let i=e.getTranslator(),s=n.get(),a=op(s),l=e.getHandler();if(!a||!l||!s.editable)return;let p=tp(s);if(!chunk5YHVN3PP_cjs.kp(p,a).find(x=>x.id===r)?.enabled)return;let u;if(r==="renameLayout"||r==="renameMaster"){let x=t.defaultView?.prompt(i("pptx.masterView.renamePrompt"),OM(s.slideMasters,a));if(!x)return;u=x;}let m=await chunk5YHVN3PP_cjs.lp(l,p,r,a,{name:u});if(!m.ok){t.defaultView?.alert(i(chunk5YHVN3PP_cjs.jp(r,m.reason)));return}o.pushHistory(),e.setHandler(m.handler);let g=await HM(m.handler,m.data.slideMasters??[]);n.set({slideMasters:g,masterViewTarget:{masterIndex:m.target.masterIndex,layoutIndex:m.target.layoutIndex},selectedElementId:null,selectedElementIds:[]}),o.commitChange();}}}function FM(e){let t=new Map(U(e).map(n=>[n.id,n]));return e.selectedElementIds.map(n=>t.get(n)).filter(n=>n!==void 0)}function XP(e){let{store:t,ops:n}=e;return {mergeShapes(o){let r=t.get();if(!r.editable)return;let i=chunk5YHVN3PP_cjs.Ll(o,FM(r));if(!i)return;let s=i.created.map(a=>a.id);n.pushHistory(),t.set({...Z(r,chunk5YHVN3PP_cjs.Ml(U(r),i)),selectedElementId:s.at(-1)??null,selectedElementIds:s}),n.commitChange();}}}function np(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(),s=o.trim();if(!i.editable||!s||!i.slides[r])return null;let a=chunk5YHVN3PP_cjs.zf(i.sections,i.slides,s,r),l=a.sections.find(p=>!i.sections.some(d=>d.id===p.id));return n(a.sections,a.slides),l?.id??null},renameSection(o,r){let i=e.get(),s=r.trim(),a=i.sections.find(p=>p.id===o);if(!i.editable||!a||!s||a.name===s)return;let l=chunk5YHVN3PP_cjs.Af(i.sections,i.slides,o,s);n(l.sections,l.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(s=>s.id===o))return;let i=chunk5YHVN3PP_cjs.Bf(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),s=r==="up"?chunk5YHVN3PP_cjs.Cf(i.sections,o):chunk5YHVN3PP_cjs.Df(i.sections,o);!i.editable||s===i.sections||n(s,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let s=chunk5YHVN3PP_cjs.Ef(i.sections,i.slides,o,r);s.sections!==i.sections&&n(s.sections,s.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 $o(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function rp(e){let{store:t,ops:n}=e;function o(r,i,s){let a=e.getHandler();a&&a.applyLayoutToSlide(r,i,[...t.get().slides]).then(async l=>{let p=await a.getTemplateElementsForSlide(l.id),d=t.get();if(d.slides[r]?.id===s){n.pushHistory();let u=[...d.slides];u[r]=l,t.set({slides:u,templateElementsBySlideId:{...d.templateElementsBySlideId,[l.id]:p}}),n.commitChange();}},()=>{}).catch(()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,s=chunk5YHVN3PP_cjs.Gf(i+1),a=$o([...r.slides.slice(0,i),s,...r.slides.slice(i)]);t.set({slides:a,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=r.currentSlide+1,a={...chunk5YHVN3PP_cjs.l(i),id:chunk5YHVN3PP_cjs.Ff()},l=r.templateElementsBySlideId[i.id]??[],p=$o([...r.slides.slice(0,s),a,...r.slides.slice(s)]);t.set({slides:p,templateElementsBySlideId:{...r.templateElementsBySlideId,[a.id]:l.map(chunk5YHVN3PP_cjs.k)},currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=$o(r.slides.filter((l,p)=>p!==r.currentSlide)),s=Math.min(r.currentSlide,i.length-1),a={...r.templateElementsBySlideId};delete a[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:a,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let s=t.get();if(!s.editable||!r)return;n.pushHistory();let a=s.currentSlide+1,l={...chunk5YHVN3PP_cjs.Gf(a+1),layoutPath:r,...i?{layoutName:i}:{}},p=$o([...s.slides.slice(0,a),l,...s.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(a,r,l.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let s=i.currentSlide+1,a=chunk5YHVN3PP_cjs.Kf(r,chunk5YHVN3PP_cjs.Ff(),s+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunk5YHVN3PP_cjs.Hf(i.colorScheme)}),l=$o([...i.slides.slice(0,s),a,...i.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunk5YHVN3PP_cjs.Hf(t.get().colorScheme)},applyLayout(r){let i=t.get(),s=i.slides[i.currentSlide];!i.editable||!s||!r||o(i.currentSlide,r,s.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],s=chunk5YHVN3PP_cjs.Hi(i);!r.editable||!i||!s||o(r.currentSlide,s,i.id);}}}var VM=24;function qo(e,t){if(!Le(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 ai(e,t,n){if(!Le(e))return {};let o=n?.text??io(),r=o===void 0?e:{...e,text:o,textSegments:n?.textSegments??chunk5YHVN3PP_cjs.oh(o,e.textSegments,e.textStyle)},i=chunk5YHVN3PP_cjs.kg(r.textSegments,{preserveCaret:true});return i.kind!=="supported"||i.snapshot&&i.snapshot.elementId!==e.id?{}:{...o===void 0?{}:{text:o},...chunk5YHVN3PP_cjs.ng(r,t,i.selection,i.snapshot?.textSegments).patch}}function si(e,t){let n=lt(e).paragraphMarginLeft,o=Math.max(0,n+t*VM);return qo(e,{paragraphMarginLeft:o})}function ip(e,t){return qo(e,{align:t})}function ap(e,t){return qo(e,{lineSpacing:t})}function QP(e,t){return qo(e,{textDirection:t})}function ZP(e,t){return qo(e,{columnCount:Math.max(1,Math.round(t))})}function sp(e,t){return {toggleBold:()=>t(n=>ao(n,"bold")),toggleItalic:()=>t(n=>ao(n,"italic")),toggleUnderline:()=>t(n=>ao(n,"underline")),toggleStrikethrough:()=>t(n=>ao(n,"strikethrough")),toggleTextShadow:()=>t(n=>Us(n)),changeFontSize:n=>t(o=>Bs(o,n)),stepFontSize:n=>t(o=>$E(o,n)),setFontSize:n=>t(o=>Vo(o,n)),setFontFamily:n=>t(o=>_s(o,n)),setTextColor:(n,o)=>{ct(e,n),t(r=>zs(r,n,o));},setHighlightColor:n=>{ct(e,n),t(o=>Ns(o,n));},setCharacterSpacing:n=>t(o=>Gs(o,n)),changeCase:n=>t((o,r)=>{if(!r)return Ks(o,n);let{text:i,textSegments:s}=chunk5YHVN3PP_cjs.As(r,null,n);return {text:i,textSegments:s}}),clearFormatting:()=>t(n=>Ws(n)),toggleBulletList:()=>t((n,o)=>ai(n,"bullet",o)),toggleNumberedList:()=>t((n,o)=>ai(n,"numbered",o)),increaseIndent:()=>t(n=>si(n,1)),decreaseIndent:()=>t(n=>si(n,-1)),setTextAlign:n=>t(o=>ip(o,n)),setLineSpacing:n=>t(o=>ap(o,n)),setTextDirection:n=>t(o=>QP(o,n)),setColumnCount:n=>t(o=>ZP(o,n))}}function lp(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,s){let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l)return;let p=Math.max(0,Math.round(r));n.pushHistory();let d=s?{advanceOnClick:s.onClick,advanceAfterMs:s.afterMs}:{};if(i){let u={type:o,durationMs:p,...d};t.set({slides:chunk5YHVN3PP_cjs.Or(a.slides,{transition:u})});}else {let u={...l.transition,type:o,durationMs:p,...d};t.set({slides:chunk5YHVN3PP_cjs.Nr(a.slides,a.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),s=i.slides[i.currentSlide];if(!i.editable||!s)return;let a=chunk5YHVN3PP_cjs.Ci(s,o),l=new Set(chunk5YHVN3PP_cjs.Di(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((p,d)=>l.has(d)?{...p,transition:{...a}}:p)}),n.commitChange();},applyTransitionChange(o){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=chunk5YHVN3PP_cjs.oi(i.transition,o);t.set({slides:chunk5YHVN3PP_cjs.Nr(r.slides,r.currentSlide,{transition:s})}),n.commitChange();}}}var BM=new Set(["showGuides","snapToGrid","snapToShape"]);function pp(e){return BM.has(e)}function JP(e){return {autoSave:true,spellCheck:false,reducedMotion:false,showGrid:e.showGrid,showRulers:e.showRulers,snapToGrid:e.snapToGrid,snapToObjects:e.snapToShape,showGuides:e.showGuides}}function dp(e,t){let n=chunk5YHVN3PP_cjs.Ap({viewProperties:t},JP(e));return {snapToGrid:n.snapToGrid,snapToShape:n.snapToObjects??e.snapToShape,showGuides:n.showGuides??e.showGuides}}function cp(e,t,n){let o=JP({...e,[t]:n}),r=chunk5YHVN3PP_cjs.Bp(o);return {...e.viewProperties,slideViewPr:{...e.viewProperties?.slideViewPr,...r.slideViewPr},...r.gridSpacing?{gridSpacing:r.gridSpacing}:{}}}function mp(e){let{doc:t,store:n,ops:o}=e,r=Ll(n,o),i=Nl({store:n,ops:o,getHandler:e.getHandler}),s=a=>{if(!a)return;let l=n.get();!l.editable||!l.slides[l.currentSlide]||(o.pushHistory(),n.set({slides:chunk5YHVN3PP_cjs.Lr(l.slides,l.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {insertElement:s,...sp(n,r),...Vl({store:n,ops:o,applyToSelected:r}),...zl({store:n,ops:o}),...rp({store:n,ops:o,getHandler:e.getHandler}),...Bl({store:n,ops:o}),...lp({store:n,ops:o}),...Ml({store:n,ops:o}),...ep(r),...Wl({store:n,ops:o}),...i,...BP({store:n,ops:o,deck:i}),...XP({store:n,ops:o}),...VP({doc:t,store:n,ops:o}),sections:np(n,o),masterView:YP({doc:t,getTranslator:e.getTranslator,store:n,ops:o,getHandler:e.getHandler,setHandler:e.setHandler}),comments:RP({store:n,ops:o,getUserName:e.getUserName}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:(a,l)=>{ct(n,a),r(p=>pt(p,chunk5YHVN3PP_cjs.Ii(a,l)));},setShapeStroke:(a,l)=>{ct(n,a),r(p=>pt(p,chunk5YHVN3PP_cjs.Ji(a,l)));},setShapeStrokeWidth:a=>r(l=>pt(l,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(l=>pt(l,a)),setShapeType:a=>r(l=>l.type==="shape"?{shapeType:a}:{}),pushRecentColor:a=>ct(n,a),setGeometry(a){r(()=>{let l={};return a.x!==void 0&&Number.isFinite(a.x)&&(l.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(l.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(l.width=Math.max(chunk5YHVN3PP_cjs.q,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(l.height=Math.max(chunk5YHVN3PP_cjs.q,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(l.rotation=a.rotation),l});},insert(a,l){let p=n.get();p.slides[p.currentSlide]&&s($l(a,p.canvasSize,l));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await ii(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await ql(t,a.canvasSize));},insertChart(a=chunk5YHVN3PP_cjs.un){let l=n.get();l.slides[l.currentSlide]&&s(jl(a,l.canvasSize));},insertSmartArt(a,l){let p=n.get();p.slides[p.currentSlide]&&s(Yl(a,l,p.canvasSize));},insertEquation(a){let l=n.get();l.slides[l.currentSlide]&&s(Xl(a,l.canvasSize));},updateEquation:(a,l)=>o.updateEquation(a,l),insertActionButton(a){let l=n.get();l.slides[l.currentSlide]&&s(Ql(a,l.canvasSize));},insertField(a,l){let p=n.get();if(!p.slides[p.currentSlide])return;let d=l??Zl(a,{slideNumber:p.currentSlide+1});s(Jl(a,d,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),l=U(a).filter(p=>chunk5YHVN3PP_cjs.jo(p.id,a.editTemplateMode)).map(p=>p.id);l.length>0&&o.select(l.at(-1)??null,l);},toggleViewOption(a){let l=n.get(),p=!l[a];n.set(pp(a)?{[a]:p,viewProperties:cp(l,a,p)}:{[a]:p});for(let d of t.querySelectorAll(".pptxv"))d.classList.toggle(`pptxv-${a}`,p);},addGuide(a,l){let p=n.get(),d=chunk5YHVN3PP_cjs.cm(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,l===void 0?d:{...d,position:l}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await ii(t,n.get().canvasSize);!a||a.type!=="image"||r(l=>l.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 up(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?chunk5YHVN3PP_cjs.km(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let l=chunk5YHVN3PP_cjs.km(a.slides,r,{matchCase:s}),{slides:p,replacements:d}=chunk5YHVN3PP_cjs.lm(a.slides,l,0,i);return o(p,d),d},replaceAll(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let{slides:l,replacements:p}=chunk5YHVN3PP_cjs.mm(a.slides,r,i,{matchCase:s});return o(l,p),p}}}function eA(e,t,n){let o=()=>{let l=n.store.get(),p=n.getHandler(),d=l.slides[l.currentSlide];return !l.editable||l.loading||l.error||l.presenting||l.masterViewTarget||l.editTemplateMode||l.drawTool!=="select"||n.isEditing()||!d||!p?null:{documentId:p,slideId:d.id,canvasSize:l.canvasSize}},r=()=>chunk5YHVN3PP_cjs.fo(e,{getCanvas:()=>t,getTarget:o,insertElement:n.insertElement}),i=o(),s=r(),a=n.store.subscribe(()=>{let l=o();(l?.documentId!==i?.documentId||l?.slideId!==i?.slideId||l?.canvasSize.width!==i?.canvasSize.width||l?.canvasSize.height!==i?.canvasSize.height)&&(s(),s=r()),i=l;});return ()=>{a(),s();}}function xp(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunk5YHVN3PP_cjs.Uq(t,{canPaste:e.canPaste?.(),hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunk5YHVN3PP_cjs.zl(t.target),isControlTarget:chunk5YHVN3PP_cjs.Al(t.target)},e.getKeyboardCustomization?.());if(!(n===null||n==="prevSlide"||n==="nextSlide"))switch(t.preventDefault(),n){case "escape":if(e.cancelFormatPainter()||e.closeShortcuts())return;e.deselect();break;case "toggleShortcuts":e.toggleShortcuts();break;case "find":e.toggleFind?.();break;case "undo":e.undo();break;case "redo":e.redo();break;case "paste":e.paste();break;case "selectAll":e.selectAll();break;case "delete":e.deleteSelected();break;case "duplicate":e.duplicateSelected();break;case "copy":e.copySelected();break;case "cut":e.cutSelected();break;case "group":e.groupSelected();break;case "ungroup":e.ungroupSelected();break;case "nudge":e.nudgeSelected(o??0,r??0);break;case "alignLeft":e.setTextAlign?.("left");break;case "alignCenter":e.setTextAlign?.("center");break;case "alignRight":e.setTextAlign?.("right");break;case "alignJustify":e.setTextAlign?.("justify");break;case "increaseFontSize":e.stepFontSize?.("increase");break;case "decreaseFontSize":e.stepFontSize?.("decrease");break;case "copyFormat":e.copyFormat?.();break;case "pasteFormat":e.pasteFormat?.();break;case "newSlide":e.addSlide?.();break;case "hyperlink":e.openHyperlink?.();break;case "findReplace":e.toggleFindReplace?.();break;case "clearFormatting":e.clearFormatting?.();break;case "cycleSelectionNext":e.cycleSelection?.("next");break;case "cycleSelectionPrev":e.cycleSelection?.("prev");break;case "pasteSpecial":e.onPasteSpecial?.();break;}}}var zM=e=>t=>J(e,t);function li(e,t){return chunk5YHVN3PP_cjs.jo(t,e.editTemplateMode)&&chunk5YHVN3PP_cjs._e(J(e,t),"select")}function jo(e,t,n){return chunk5YHVN3PP_cjs.cf(t,zM(e),n)}function tA(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return jo(e,n,"move").length>0}var NM=chunk5YHVN3PP_cjs.Ze(void 0);function _M(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function pi(e){return e.selectedElementIds.reduce((t,n)=>_M(t,chunk5YHVN3PP_cjs.Ze(J(e,n))),NM)}function oA(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 nA(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function rA(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),s=J(i,t);if(s?.type!=="table"||!s.tableData?.rows[n]?.cells[o])return;let a=e.transformCommittedText?e.transformCommittedText(r):r;e.pushHistory();let l=s.tableData.rows.map((p,d)=>({...p,cells:p.cells.map((u,m)=>d===n&&m===o?chunk5YHVN3PP_cjs.oe(u,a):u)}));e.store.set(Z(i,U(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:l}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=J(o,t);!r||!chunk5YHVN3PP_cjs.e(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(Z(o,U(o).map(i=>i.id===t&&chunk5YHVN3PP_cjs.e(i)?{...i,textSegments:i.textSegments?.map(s=>{if(!s.equationXml)return s;let{equationSourceXml:a,...l}=s;return {...l,equationXml:n}})}:i))),e.commitChange());}}}var GM=100,UM=800;function gp(e){let{store:t}=e,n=new chunk5YHVN3PP_cjs.xf({maxDepth:GM}),o=0,r=(m=t.get())=>m.selectedElementId?J(m,m.selectedElementId):void 0,i=(m,g=m?[m]:[])=>t.set(nA(m,g)),s=()=>({slides:chunk5YHVN3PP_cjs.Kr(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunk5YHVN3PP_cjs.m(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)}),a=(m="")=>{n.record(s(),m),o=0,e.onHistoryChange();},l=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},p=(m,g)=>{let x=t.get(),b=U(x).map(v=>v.id===m?{...v,...g}:v);t.set(Z(x,b));},d=m=>{m&&(t.set({slides:chunk5YHVN3PP_cjs.Kr(m.slides),sections:structuredClone(m.sections),coreProperties:structuredClone(m.coreProperties),appProperties:structuredClone(m.appProperties),customProperties:structuredClone(m.customProperties),templateElementsBySlideId:chunk5YHVN3PP_cjs.m(m.templateElementsBySlideId),slideMasters:structuredClone(m.slideMasters),notesMaster:structuredClone(m.notesMaster),handoutMaster:structuredClone(m.handoutMaster),handoutSlidesPerPage:m.handoutSlidesPerPage,presentationProperties:structuredClone(m.presentationProperties),headerFooter:structuredClone(m.headerFooter),customShows:structuredClone(m.customShows),interactionActive:false}),l());},u=rA({store:t,pushHistory:a,commitChange:l,transformCommittedText:e.transformCommittedText});return {readInlineList:e.readInlineList,formatInlineList:e.formatInlineList,cancelInlineList:e.cancelInlineList,selectedElement:r,select:i,pushHistory:a,commitChange:l,patchGeometry:p,deleteSelected(){let m=t.get(),g=m.selectedElementId;!m.editable||!g||!r(m)||(a(),t.set({...Z(m,U(m).filter(x=>!m.selectedElementIds.includes(x.id))),selectedElementId:null,selectedElementIds:[]}),l());},duplicateSelected(){let m=t.get(),g=m.selectedElementId;if(!m.editable||!g)return null;let x=r(m);if(!x)return null;let b=chunk5YHVN3PP_cjs._(x);return b.x+=20,b.y+=20,a(),t.set({...Z(m,[...U(m),b]),selectedElementId:b.id,selectedElementIds:[b.id]}),l(),b.id},nudgeSelected(m,g){let x=t.get(),b=r(x),v=x.selectedElementId;if(!b||!v)return;let f=Date.now();f-o>UM&&a(),o=f,t.set(Z(x,U(x).map(S=>S.id===v?{...S,x:b.x+m,y:b.y+g}:S))),l();},commitInlineText(m,g,x){let b=t.get(),v=J(b,m);if(!v)return;let f=e.transformCommittedText?e.transformCommittedText(g):g;a();let S=typeof document<"u"?document.querySelector("[data-inline-editor]"):null,y=Fs(v,S),h=Vs(v,S);t.set(Z(b,U(b).map(C=>C.id===m?{...C,...Gr(v,f,x),...y!==void 0?{height:y}:{},...h!=="unchanged"?{textStyle:{...v.textStyle,autoFitFontScale:h.fontScale,autoFitLineSpacingReduction:h.lnSpcReduction}}:{}}:C))),l();},commitNotes(m,g){let x=t.get(),b=x.slides[x.currentSlide];!x.editable||!b||b.notes===m&&g===void 0||(a(),t.set({slides:chunk5YHVN3PP_cjs.Mr(x.slides,x.currentSlide,m,g)}),l());},setHandoutSlidesPerPage(m){oA({store:t,pushHistory:a,commitChange:l},m);},applyFormatPainter(m,g){let x=t.get(),b=J(x,m),v=J(x,g);return !x.editable||!b||!v||m===g?false:(a(),t.set(Z(x,U(x).map(f=>f.id===g?chunk5YHVN3PP_cjs.nh(f,chunk5YHVN3PP_cjs.mh(b)):f))),l(),true)},...u,updateDocumentProperties(m,g,x){t.get().editable&&(a(),t.set({coreProperties:structuredClone(m),appProperties:structuredClone(g),customProperties:structuredClone(x)}),l());},updatePresentationProperties(m){t.get().editable&&(a(),t.set({presentationProperties:structuredClone(m)}),l());},updateSections(m){t.get().editable&&(a(),t.set({sections:structuredClone(m)}),l());},updateHeaderFooter(m){t.get().editable&&(a(),t.set({headerFooter:structuredClone(m)}),l());},updateCustomShows(m){t.get().editable&&(a(),t.set({customShows:structuredClone(m)}),l());},undo(){d(n.undo(s())?.snapshot);},redo(){d(n.redo(s())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(m){n.setMaxDepth(m);},async save(m="pptx"){let g=e.getHandler();if(!g)throw new Error("No presentation is loaded.");let x=t.get(),b=e.getPendingInlineTextEdit?.(),v=b?e.transformCommittedText?.(b.snapshot.text)??b.snapshot.text:void 0,f=b&&"masterView"in b.target?chunk5YHVN3PP_cjs.Tr(x,b.target.masterView,b.snapshot,v):null,S=chunk5YHVN3PP_cjs.mo(x.slides,x.templateElementsBySlideId).map(h=>b&&"slideId"in b.target&&h.id===b.target.slideId?{...h,elements:[...chunk5YHVN3PP_cjs.Sr(h.elements,b.snapshot,v)]}:h),y=await chunk5YHVN3PP_cjs.tp(g,S,chunk5YHVN3PP_cjs.xp({sections:x.sections,coreProperties:x.coreProperties,appProperties:x.appProperties,customProperties:x.customProperties,headerFooter:x.headerFooter,presentationProperties:x.presentationProperties,viewProperties:x.viewProperties,customShows:x.customShows,tagCollections:x.tagCollections,slideMasters:f?.slideMasters??x.slideMasters,notesMaster:f?.notesMaster??x.notesMaster,handoutMaster:f?.handoutMaster??x.handoutMaster,tableStyleMap:x.tableStyleMap,tableStylesDefaultId:x.tableStylesDefaultId,tableStylesToDelete:x.tableStylesToDelete,outputFormat:m,slideSize:chunk5YHVN3PP_cjs.lj({current:x.slideSize,canvas:x.canvasSize}).size,embedFonts:x.embedFonts}),{password:x.presentationPassword,passwordProtected:x.presentationPassword!==null});return t.set({dirty:false}),y}}}function iA(e){let{doc:t,store:n,ops:o}=e,r=null,i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l);if(!p)return;let d=e.getScale();r.el.style.left=`${Math.min(r.startX,p.x)*d}px`,r.el.style.top=`${Math.min(r.startY,p.y)*d}px`,r.el.style.width=`${Math.abs(p.x-r.startX)*d}px`,r.el.style.height=`${Math.abs(p.y-r.startY)*d}px`;}function a(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l),d=n.get(),u=p?jo(d,chunk5YHVN3PP_cjs.Re({startX:r.startX,startY:r.startY,currentX:p.x,currentY:p.y},U(d)),"select"):[],m=r.additive?chunk5YHVN3PP_cjs.Se(d.selectedElementIds,u):u;r.el.remove(),r=null,i(),o.select(m.at(-1)??null,m);}return {isActive:()=>r!==null,begin(l){let p=e.stagePoint(l),d=e.getOverlayRoot();if(!p||!d)return;let u=t.createElement("div");u.className="pptxv-marquee",d.appendChild(u),r={pointerId:l.pointerId,startX:p.x,startY:p.y,additive:chunk5YHVN3PP_cjs.Te(l),el:u},window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a);},dispose(){r?.el.remove(),r=null,i();}}}function aA(e){let{event:t,elementId:n,state:o,store:r,ops:i}=e;if(o.eyedropperActive){let d=t.target instanceof Element?t.target:null,u=d?getComputedStyle(d):null,m=u?.backgroundColor||u?.color;return m&&e.onEyedropper?.(m),r.set({eyedropperActive:false}),true}let s=t.target instanceof Element?t.target.closest("td"):null;if(!n||s?.dataset.rowIndex===void 0||s.dataset.cellIndex===void 0)return false;let a={row:Number(s.dataset.rowIndex),column:Number(s.dataset.cellIndex)},l=o.selectedTableCell,p=t.shiftKey&&o.selectedElementId===n&&l?$M(l,a,WM(o,n)):[a];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&l?l:a,selectedTableCells:p}),true}function bp(e,t,n=10){return t?{...e,x:Math.round(e.x/n)*n,y:Math.round(e.y/n)*n}:e}function sA(e){return e.snapToShape?U(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}var KM={rows:[],columnWidths:[]};function WM(e,t){let n=J(e,t);return (n?.type==="table"?n.tableData:void 0)??KM}function $M(e,t,n){let o=chunk5YHVN3PP_cjs.re(e.row,e.column,t.row,t.column,n);return chunk5YHVN3PP_cjs.se(o).map(({row:r,col:i})=>({row:r,column:i}))}function lA(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 pA(e,t){if(t.size===0)return;let n=e.get(),o=U(n),r=chunk5YHVN3PP_cjs.Ug(o,t);r.length!==0&&e.set(Z(n,chunk5YHVN3PP_cjs.Vg(o,r)));}var qM={move:"move",resize:"resize",rotate:"rotate"};function dA(e){let{store:t,ops:n}=e,o=[],r=null,i="move",s=new Set,a=l=>{let p=t.get(),d=U(p).filter(m=>p.selectedElementIds.includes(m.id));if(d.length>1&&p.selectedElementIds.includes(l))return chunk5YHVN3PP_cjs.gf(d)??void 0;let u=J(p,l);return u?{x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation??0}:void 0};return chunk5YHVN3PP_cjs.Pr({getScale:e.getScale,getElementBox:a,getSiblings:()=>sA(t.get()),getStageOrigin(){let l=e.getOverlay()?.root.getBoundingClientRect();return {left:l?.left??0,top:l?.top??0}},onStart(l,p){let d=t.get();i=p,o=U(d).filter(u=>d.selectedElementIds.includes(u.id)).map(({id:u,x:m,y:g,width:x,height:b,rotation:v})=>({id:u,x:m,y:g,width:x,height:b,rotation:v})),r=chunk5YHVN3PP_cjs.gf(o),s=new Set(jo(d,o.length>0?o.map(u=>u.id):[l],qM[p])),n.pushHistory(),t.set({interactionActive:true});},onPreview(l,p){let d=t.get();if(l=bp(l,d.snapToGrid,chunk5YHVN3PP_cjs.Ye(d.viewProperties?.gridSpacing,10)),o.length>1&&r&&i!=="rotate"){let u=i==="move"?chunk5YHVN3PP_cjs.hf(o,l.x-r.x,l.y-r.y):chunk5YHVN3PP_cjs.if(o,r,l);for(let m of u)s.has(m.id)&&n.patchGeometry(m.id,{...m,rotation:m.rotation??0});}else s.has(l.id)&&n.patchGeometry(l.id,l);e.getOverlay()?.setSnapLines(p,e.getScale());},onEnd(l,p,d){if(e.getOverlay()?.setSnapLines([],1),l&&o.length<=1&&s.has(d)){let u=t.get(),m=bp(l,u.snapToGrid,chunk5YHVN3PP_cjs.Ye(u.viewProperties?.gridSpacing,10));n.patchGeometry(d,m);}t.set({interactionActive:false}),p&&(pA(t,new Set([...s,d])),n.commitChange());}})}function cA(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 mA(e){return e.masterViewTarget?{masterView:{tab:e.masterViewTab,...e.masterViewTarget}}:e.slides[e.currentSlide]?{slideId:e.slides[e.currentSlide].id}:void 0}function uA(e,t,n){let o=e.slides[e.currentSlide];return n&&!e.masterViewTarget&&o?.elements.some(r=>r.id===t)?{patcher:n,slideId:o.id}:void 0}function xA(e,t,n){let o=e.slides[e.currentSlide];if(!n?.readAccepted||!t||!("slideId"in t)||e.loading||e.masterViewTarget||o?.id!==t.slideId)return;let r=n.readAccepted();if(!r||!n.checkModel?.(o.elements.find(s=>s.id===r.elementId)))return;let i=chunk5YHVN3PP_cjs.Sr(o.elements,r);return i===o.elements?void 0:e.slides.map(s=>s===o?{...o,elements:[...i]}:s)}function gA(e,t,n){if(!(!t||!fp(e,t))){if(n?.kind==="unsupported"&&(n.reason==="composition-active"||n.reason==="input-active"))throw new Error("Finish the current text input before saving.");if(n?.kind==="supported")return {snapshot:n.snapshot,target:t}}}function fp(e,t){return !(!t||!e.editable||e.presenting||e.loading||e.error||"slideId"in t&&(e.masterViewTarget||e.slides[e.currentSlide]?.id!==t.slideId)||"masterView"in t&&JSON.stringify({tab:e.masterViewTab,...e.masterViewTarget})!==JSON.stringify(t.masterView))}function bA(e,t,n,o,r=()=>true){let i=chunk5YHVN3PP_cjs.zs(e);return {read(){let s=t();if(s?.checkModel){if(!r()||!s.checkModel(n())){o();return}return s.readList()}if(s?.readList()&&!r()){o();return}let a=n();if(a&&!s?.readList()&&s?.activateList(a)===false){let d=chunk5YHVN3PP_cjs.hg(s.el);return o(),{kind:"unsupported",reason:"model-replaced",text:d}}let l=s?.readList();if(!l)return l;let p=i.check(a,l);if(p.kind==="retire")return o(),{kind:"unsupported",reason:"model-replaced",text:l.kind==="supported"?l.snapshot.text:l.text};if(p.kind==="format"){if(!s?.formatSnapshot(p.snapshot)){o();return}return s.readList()}return l},format(s){let a=t()?.formatSnapshot(s)??false;return a&&i.expect(s),a}}}var jM=2;function fA(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return [];let t=e.selectedElementId?J(e,e.selectedElementId):void 0;return t?chunk5YHVN3PP_cjs.ph(t):[]}function vA(e){let{store:t,ops:n}=e,o=null,r=l=>{if(!o)return;let{elementId:p}=o,d=t.get(),u=U(d);t.set(Z(d,u.map(m=>m.id===p&&chunk5YHVN3PP_cjs.f(m)?{...m,shapeAdjustments:{...m.shapeAdjustments,...l}}:m)));},i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!o)return;let p=e.getScale(),d=p>0?p:1,u=(l.clientX-o.startClientX)/d,m=(l.clientY-o.startClientY)/d;if(!o.moved){if(Math.hypot(l.clientX-o.startClientX,l.clientY-o.startClientY)<=jM)return;o.moved=true,n.pushHistory(),t.set({interactionActive:true});}r(chunk5YHVN3PP_cjs.qh(o,u,m));}function a(){let l=o?.moved??false;o=null,i(),l&&(t.set({interactionActive:false}),n.commitChange());}return {begin(l,p){let d=t.get(),u=d.selectedElementId,m=u?J(d,u):void 0;!u||!m||!p||!chunk5YHVN3PP_cjs.f(m)||(l.preventDefault(),l.stopPropagation(),o=chunk5YHVN3PP_cjs.rh(m,p,l.clientX,l.clientY),window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a));},isActive:()=>o!==null,dispose(){o=null,i();}}}function hA(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:s}=e,a=t.createElement("input");a.type="text",a.className="pptxv-inline-editor pptxv-table-cell-editor",a.dataset.inlineEditor="",a.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(a.style,{boxSizing:"border-box",width:"100%",height:"100%"});let l=t.createDocumentFragment();for(;n.firstChild;)l.appendChild(n.firstChild);n.appendChild(a);let p=false,d=m=>{m.composedPath().includes(a)||u(true);},u=m=>{p||(p=true,t.removeEventListener("pointerdown",d,true),m&&s.commitTableCell(o.id,r,i,a.value),n.isConnected?n.replaceChildren(m?t.createTextNode(a.value):l):a.remove());};return a.addEventListener("blur",()=>u(true)),a.addEventListener("pointerdown",m=>m.stopPropagation()),a.addEventListener("keydown",m=>{m.stopPropagation(),m.key==="Escape"?u(false):m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),u(true));}),t.addEventListener("pointerdown",d,true),a.focus(),a.select(),{close:u}}function di(e){let t=e.elementId??chunk5YHVN3PP_cjs.Fm(e.event.target,e.stage),n=t?J(e.state,t):void 0,o=n&&chunk5YHVN3PP_cjs.e(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||!chunk5YHVN3PP_cjs.$e(n)?{handled:false,tableSession:null}:{handled:true,tableSession:hA({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var YM=500;function XM(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 yA(e,t,n){let o=XM(e,t),r=chunk5YHVN3PP_cjs.Fm(e.target,n)??chunk5YHVN3PP_cjs.Fm(o,n);return {cell:o,id:r}}function SA(){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}`,s=e?.key===i&&t.timeStamp-e.time<=YM;return e=s?null:{key:i,time:t.timeStamp},s}}function CA(e){let t=SA(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:s}=yA(o,e.doc,e.getStage());if(!i||!t(o,s,i))return;let a=di({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:s,cell:i,onEditEquation:e.onEditEquation});a.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(a.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function wA(e){let{doc:t,store:n,ops:o}=e,r=null,i,s,a=null,l=CA({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:h=>a=h,onEditEquation:e.onEditEquation}),p=dA({store:n,ops:o,getScale:e.getScale,getOverlay:e.getOverlay}),d=vA({store:n,ops:o,getScale:e.getScale}),u=h=>lA(e.getOverlay()?.root,e.getScale(),h),m=iA({doc:t,store:n,ops:o,getScale:e.getScale,getOverlayRoot:()=>e.getOverlay()?.root??null,stagePoint:u}),g=cA(),x=h=>{a?.close(h),a=null;let C=r;h?C?.commit():C?.cancel();},b=()=>s?.read()??r?.readList(),v=h=>e.getStageRoot()?.querySelector(`[data-element-id="${CSS.escape(h)}"]`)??null,f=(h,C)=>{v(h)?.classList.toggle("pptxv-inline-editing-source",C);},S=h=>{let C=n.get(),w=J(C,h),A=e.getOverlay();!w||!Ur(w)||!A||r||(o.select(h),A.setEditing(true),f(h,true),i=mA(C),r=Kr({doc:t,overlayRoot:A.root,box:{x:w.x,y:w.y,width:w.width,height:w.height,rotation:w.rotation??0},scale:e.getScale(),element:w,spellCheck:C.spellCheckEnabled,collaboration:uA(C,h,e.getLivePatcher?.()),onInput:P=>e.onInlineTextInput?.(h,P),onCommit:(P,k)=>{e.flushInlineTextInput?.(),o.commitInlineText(h,P,k);},onSelectionChange:P=>n.set({selectedTextRange:P}),onLiveFormatKey:e.onInlineLiveFormatKey,onClose(){r=null,i=void 0,s=void 0,e.getOverlay()?.setEditing(false),f(h,false);}}),s=bA(w,()=>r,()=>J(n.get(),h),()=>x(false),()=>fp(n.get(),i)&&C.editTemplateMode===n.get().editTemplateMode));},y=(h,C)=>{let w=n.get(),A=di({event:h,state:w,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(A.handled){a=A.tableSession;return}C&&li(w,C)&&S(C);};return {onStagePointerDown(h){let C=n.get();if(!C.editable||C.presenting||h.button!==0)return;let w=chunk5YHVN3PP_cjs.Fm(h.target,e.getStageRoot());if((r||a)&&x(true),aA({event:h,elementId:w,state:C,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(C.formatPainterSourceId){w&&li(C,w)&&o.applyFormatPainter(C.formatPainterSourceId,w),n.set({formatPainterSourceId:null});return}let A=w!==null&&li(C,w);if(g(h.pointerType,A?w:null,h.timeStamp||Date.now())){h.preventDefault(),y(h,w);return}if(!A){m.begin(h);return}if(chunk5YHVN3PP_cjs.Te(h)){let P=C.selectedElementIds.includes(w)?C.selectedElementIds.filter(k=>k!==w):[...C.selectedElementIds,w];o.select(P.at(-1)??null,P);return}(C.selectedElementId!==w||C.selectedElementIds.length!==1)&&o.select(w,[w]),tA(n.get(),w)&&(h.preventDefault(),h.stopPropagation(),p.begin("move",w,h));},onStagePointerMove(h){if(!e.onCursorMove)return;let C=e.getOverlay()?.root.getBoundingClientRect(),w=e.getScale();!C||!(w>0)||e.onCursorMove((h.clientX-C.left)/w,(h.clientY-C.top)/w);},onStageDblClick(h){let C=n.get();if(!C.editable||C.presenting||r||a)return;let w=chunk5YHVN3PP_cjs.Fm(h.target,e.getStageRoot());y(h,w);},beginHandleGesture(h,C,w){let A=n.get(),P=A.selectedElementId,k=pi(A);!P||(h==="resize"?!k.resizable:!k.rotatable)||(C.preventDefault(),C.stopPropagation(),p.begin(h,P,C,w));},beginAdjustGesture:(h,C)=>d.begin(h,C),closeInline:x,readInlineList:b,retainAcceptedInlineText(){let h=xA(n.get(),i,r);h&&n.set({slides:h});},formatInlineList:h=>s?.format(h)??false,readPendingInlineTextEdit:()=>gA(n.get(),i,b()),hasActivePointerInteraction:()=>p.isActive()||d.isActive()||m.isActive(),inlineActive:()=>r!==null||a!==null,dispose(){x(false),l(),p.dispose(),d.dispose(),m.dispose();}}}var vp="#0ea5e9";function EA(e,t,n){let o=chunkIQ7MDPEN_cjs.x(e,"svg",{role:"img","aria-label":t("pptx.animation.motionPath.overlay"),"data-pptx-motion-path-overlay":"true"});o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.zIndex="45",o.style.pointerEvents="none";let r=chunkIQ7MDPEN_cjs.x(e,"path",{fill:"none",stroke:vp,"stroke-width":2,"stroke-dasharray":"6 4","vector-effect":"non-scaling-stroke"}),i=chunkIQ7MDPEN_cjs.x(e,"circle",{r:5,fill:vp,opacity:.55}),s=chunkIQ7MDPEN_cjs.x(e,"circle",{r:7,fill:"#ffffff",stroke:vp,"stroke-width":2,"aria-label":t("pptx.animation.motionPath.endHandle"),"data-pptx-motion-path-handle":"end"});o.append(r,i,s);let a=null,l=null,p=(x,b)=>({originX:x.x+x.width/2,originY:x.y+x.height/2,slideWidth:b.canvasSize.width,slideHeight:b.canvasSize.height}),d=(x,b,v)=>{let f=chunk5YHVN3PP_cjs.Rd(x,b),S=chunk5YHVN3PP_cjs.Sd(x,b);chunkIQ7MDPEN_cjs.y(r,{d:f}),chunkIQ7MDPEN_cjs.y(i,{cx:b.originX,cy:b.originY}),chunkIQ7MDPEN_cjs.y(s,{cx:S.x,cy:S.y}),s.style.pointerEvents=v?"auto":"none",s.style.cursor=v?"move":"";},u=()=>{let x=l;l=null,e.defaultView?.removeEventListener("pointermove",m),e.defaultView?.removeEventListener("pointerup",g),e.defaultView?.removeEventListener("pointercancel",g),x&&x.draft!==x.basePath&&n(x.draft);};function m(x){if(!l||x.pointerId!==l.pointerId)return;let b=l.scale||1,v=(x.clientX-l.startClientX)/b,f=(x.clientY-l.startClientY)/b,S=chunk5YHVN3PP_cjs.Sd(l.basePath,l.frame),y=(S.x+v-l.frame.originX)/l.frame.slideWidth,h=(S.y+f-l.frame.originY)/l.frame.slideHeight;l.draft=chunk5YHVN3PP_cjs.Td(l.basePath,y,h),d(l.draft,l.frame,true);}function g(x){l&&x.pointerId===l.pointerId&&u();}return s.addEventListener("pointerdown",x=>{let b=a?.element,v=a?.path;!b||!v||!a?.canEdit||!chunk5YHVN3PP_cjs.Ud(v)||(x.stopPropagation(),x.preventDefault(),l={pointerId:x.pointerId,startClientX:x.clientX,startClientY:x.clientY,basePath:v,frame:p(b,a),scale:a.scale,draft:v},e.defaultView?.addEventListener("pointermove",m),e.defaultView?.addEventListener("pointerup",g),e.defaultView?.addEventListener("pointercancel",g));}),{root:o,mount(x){if(!a?.element||!a.path){o.remove();return}x&&o.parentElement!==x?x.appendChild(o):x||o.remove();},update(x){a=x;let{element:b,path:v}=x;if(!b||!v){o.remove();return}l||(chunkIQ7MDPEN_cjs.y(o,{width:x.canvasSize.width,height:x.canvasSize.height}),d(v,p(b,x),x.canEdit&&chunk5YHVN3PP_cjs.Ud(v)));},destroy(){u(),o.remove();}}}function TA(e){let t=null;return {attach(){t?.destroy(),t=EA(e.doc,e.getTranslator(),e.onChangePath);},sync(){if(!t)return;let n=e.store.get(),o=n.editable&&!n.presenting,r=o?e.getSelectedElement(n):void 0,i=n.slides[n.currentSlide];t.update({element:r??null,path:r?chunk5YHVN3PP_cjs.$d(i?.animations??[],r.id):void 0,canvasSize:n.canvasSize,scale:e.getScale(),canEdit:o}),t.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},detach(){t?.destroy(),t=null;}}}function PA(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-context-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t("pptx.editPoints.menu")),r.dataset.pptxEditPointsMenu="true",r.style.position="absolute",r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.transform=`scale(${n.inverseScale})`,r.style.transformOrigin="0 0",r.style.zIndex="61";let i=s=>s.stopPropagation();r.addEventListener("pointerdown",i),r.addEventListener("mousedown",i),r.addEventListener("click",i),r.addEventListener("contextmenu",s=>{s.preventDefault(),s.stopPropagation();});for(let s of n.entries){if(s.separatorBefore){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-context-menu-separator");l.setAttribute("role","separator"),r.appendChild(l);}let a=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-context-menu-item");if(a.type="button",a.dataset.pptxEditPointsCommand=s.id,s.checked===void 0)a.setAttribute("role","menuitem");else {a.setAttribute("role","menuitemcheckbox"),a.setAttribute("aria-checked",String(s.checked));let l=chunkIQ7MDPEN_cjs.w(e,"span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",l.style.width="12px",l.style.marginRight="6px",l.textContent=s.checked?"\u2713":"",a.appendChild(l);}a.appendChild(e.createTextNode(t(s.labelKey))),a.disabled=s.disabled===true,a.addEventListener("click",()=>o(s.id)),r.appendChild(a);}return r}function QM(e,t,n){t.replaceChildren();let o=r=>({[chunk5YHVN3PP_cjs.Bs]:r});t.appendChild(chunkIQ7MDPEN_cjs.x(e,"rect",{width:"100%",height:"100%",fill:"transparent"}));for(let r of n.segments){let i=chunkIQ7MDPEN_cjs.x(e,"path",{d:r.d,fill:"none",stroke:"transparent","stroke-width":n.hitStrokeWidth,"pointer-events":"stroke",...o(r.target)});i.style.cursor="copy",t.appendChild(i);}t.appendChild(chunkIQ7MDPEN_cjs.x(e,"path",{d:n.outlineD,fill:"none",stroke:chunk5YHVN3PP_cjs.Cs.outlineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));for(let r of n.handles){t.appendChild(chunkIQ7MDPEN_cjs.x(e,"line",{x1:r.anchorX,y1:r.anchorY,x2:r.x,y2:r.y,stroke:chunk5YHVN3PP_cjs.Cs.handleLineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));let i=chunkIQ7MDPEN_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:chunk5YHVN3PP_cjs.Cs.handleFill,stroke:chunk5YHVN3PP_cjs.Cs.handleStroke,"stroke-width":n.outlineWidth,...o(r.target)});i.style.cursor="move",t.appendChild(i);}for(let r of n.nodes){let i=chunkIQ7MDPEN_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:r.selected?chunk5YHVN3PP_cjs.Cs.selectedNodeFill:chunk5YHVN3PP_cjs.Cs.nodeFill,stroke:r.selected?chunk5YHVN3PP_cjs.Cs.selectedNodeStroke:chunk5YHVN3PP_cjs.Cs.nodeStroke,"stroke-width":n.outlineWidth,"data-pptx-edit-points-node-type":r.type,"data-selected":r.selected?"true":void 0,...o(r.target)});i.style.cursor="move",t.appendChild(i);}}function AA(e){let{doc:t,t:n}=e,o=e.element.id,r=e.canvasSize,i=e.scale,s=null,a=null,l=chunkIQ7MDPEN_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.editPoints.overlay"),"data-pptx-edit-points-overlay":"true","data-pptx-edit-points-element":o});l.style.position="absolute",l.style.left="0",l.style.top="0",l.style.zIndex="60",l.style.touchAction="none";let p=()=>{chunkIQ7MDPEN_cjs.y(l,{width:r.width,height:r.height});let g=d.view(i);QM(t,l,g),s?.remove(),s=g.menu?PA(t,n,g.menu,x=>d.runCommand(x)):null,s&&a&&a.appendChild(s);},d=new chunk5YHVN3PP_cjs.Ds(e.element,{onCommit:g=>e.onCommit(o,g),onExit:()=>e.onExit(),onChange:()=>p(),hiddenCommands:e.hiddenCommands}),u=g=>chunk5YHVN3PP_cjs.Hs(g,l,r.width,r.height);l.addEventListener("pointerdown",g=>{g.stopPropagation(),g.button===0&&(g.preventDefault(),l.setPointerCapture?.(g.pointerId),d.pointerDown(u(g)));}),l.addEventListener("pointermove",g=>d.pointerMove(u(g))),l.addEventListener("pointerup",g=>{l.hasPointerCapture?.(g.pointerId)&&l.releasePointerCapture(g.pointerId),d.pointerUp(u(g));}),l.addEventListener("contextmenu",g=>{g.preventDefault(),g.stopPropagation(),d.contextMenu(u(g));});for(let g of ["mousedown","click","dblclick"])l.addEventListener(g,x=>x.stopPropagation());let m=t.defaultView?chunk5YHVN3PP_cjs.Is(d,t.defaultView):()=>{};return p(),{elementId:o,root:l,mount(g){if(a=g,!g){l.remove(),s?.remove();return}l.parentElement!==g&&g.appendChild(l),s&&s.parentElement!==g&&g.appendChild(s);},update(g,x,b){let v=b!==i||x.width!==r.width||x.height!==r.height;r=x,i=b,d.reconcile(g),v&&p();},destroy(){m(),l.remove(),s?.remove(),s=null;}}}var hp="#2f528f";function kA(e){let{doc:t,t:n,tool:o}=e,r=e.canvasSize,i=chunkIQ7MDPEN_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.freeformTool.overlay"),"data-pptx-freeform-tool-overlay":o});i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.zIndex="60",i.style.cursor="crosshair",i.style.touchAction="none";let s=chunkIQ7MDPEN_cjs.x(t,"rect",{width:"100%",height:"100%",fill:"transparent"}),a=chunkIQ7MDPEN_cjs.x(t,"g",{"pointer-events":"none"});i.append(s,a);let l=()=>{chunkIQ7MDPEN_cjs.y(i,{width:r.width,height:r.height});let m=p.view();a.replaceChildren(),m.previewD&&a.appendChild(chunkIQ7MDPEN_cjs.x(t,"path",{d:m.previewD,fill:"none",stroke:hp,"stroke-width":m.strokeWidth,"pointer-events":"none"})),m.start&&a.appendChild(chunkIQ7MDPEN_cjs.x(t,"circle",{cx:m.start.x,cy:m.start.y,r:m.start.size/2,fill:m.start.armed?hp:"#ffffff",stroke:hp,"stroke-width":m.strokeWidth,"pointer-events":"none","data-pptx-freeform-start":m.start.armed?"armed":"idle"}));},p=new chunk5YHVN3PP_cjs.Ls({tool:o,onCommit:m=>e.onCommit(m),onCancel:()=>e.onCancel(),onChange:()=>l()});p.setScale(e.scale);let d=m=>chunk5YHVN3PP_cjs.Gs(i,m.clientX,m.clientY,r.width,r.height);i.addEventListener("pointerdown",m=>{m.stopPropagation(),m.preventDefault(),i.setPointerCapture?.(m.pointerId),p.pointerDown({...d(m),button:m.button});}),i.addEventListener("pointermove",m=>p.pointerMove(d(m))),i.addEventListener("pointerup",m=>{i.hasPointerCapture?.(m.pointerId)&&i.releasePointerCapture(m.pointerId),p.pointerUp();}),i.addEventListener("dblclick",m=>{m.stopPropagation(),p.doubleClick();}),i.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();});for(let m of ["mousedown","click"])i.addEventListener(m,g=>g.stopPropagation());let u=t.defaultView?chunk5YHVN3PP_cjs.Is(p,t.defaultView):()=>{};return l(),{tool:o,root:i,mount(m){m?i.parentElement!==m&&m.appendChild(i):i.remove();},update(m,g){r=m,p.setScale(g),l();},destroy(){u(),i.remove();}}}function IA(e){let{doc:t,store:n}=e,o=null,r=null,i=()=>e.getStageWrap()?.querySelector(".pptxv-stage")??null,s=()=>{let u=e.getCustomization?.();return u?chunk5YHVN3PP_cjs.cr(u):true},a=()=>{let u=o;o=null,u?.destroy();},l=()=>{let u=r;r=null,u?.destroy();},p=(u,m)=>{a(),r&&r.tool!==m&&l(),r??=kA({doc:t,t:e.getTranslator(),tool:m,canvasSize:u.canvasSize,scale:e.getScale(),onCommit:g=>{n.set({freeformTool:null}),e.insertElement(g);},onCancel:()=>n.set({freeformTool:null})}),r.update(u.canvasSize,e.getScale()),r.mount(i());},d=(u,m)=>{l();let g=J(u,m);if(!g||!chunk5YHVN3PP_cjs.Fs(g)||!s()){a(),n.set({editPointsElementId:null});return}o&&o.elementId!==m&&a(),o??=AA({doc:t,t:e.getTranslator(),element:g,canvasSize:u.canvasSize,scale:e.getScale(),hiddenCommands:e.getCustomization?.()?.hiddenEditPointsCommands,onCommit:(x,b)=>e.applyElementPatch(x,b),onExit:()=>{a(),n.set({editPointsElementId:null});}}),o.update(g,u.canvasSize,e.getScale()),o.mount(i());};return {startEditPoints(u){let m=n.get();return !m.editable||!s()||!chunk5YHVN3PP_cjs.Fs(J(m,u))?false:(n.set({editPointsElementId:u,freeformTool:null}),true)},armFreeformTool(u){n.set({freeformTool:u,...u?{editPointsElementId:null}:{}});},isEditingPoints(u){return u!==null&&n.get().editPointsElementId===u},sync(){let u=n.get(),m=u.editable&&!u.presenting;m&&u.freeformTool?p(u,u.freeformTool):m&&u.editPointsElementId?d(u,u.editPointsElementId):(l(),a());},detach(){l(),a();}}}function ZM(e){let t=e?e.length===2?"corner":e==="n"||e==="s"?"horizontal-edge":"vertical-edge":"rotate",n=e?"var(--pptxv-resize-size, 10px)":"var(--pptxv-rotate-size, 12px)",{frame:o,artwork:r}=chunk5YHVN3PP_cjs.Ve(t,{width:n,height:n,radius:e?"2px":"50%",fill:"#fff",borderColor:"var(--pptx-ring)"});return {frame:{...o,marginLeft:`calc(${o.width} / -2)`,marginTop:`calc(${o.height} / -2)`},artwork:r}}function yp(e,t){let{frame:n,artwork:o}=ZM(t);Object.assign(e.style,n);let r=chunkIQ7MDPEN_cjs.w(e.ownerDocument,"span","pptxv-control-artwork",o);r.setAttribute("data-pptx-handle-artwork",""),r.setAttribute("aria-hidden","true"),e.appendChild(r);}function Sp(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-editor-overlay"),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-sel-box");r.style.borderColor=chunk5YHVN3PP_cjs.We("var(--pptx-ring)"),r.hidden=true,o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-chunk5YHVN3PP_cjs.Qe}px`,height:`${chunk5YHVN3PP_cjs.Qe}px`,background:chunk5YHVN3PP_cjs.We("var(--pptx-ring)")});r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-chunk5YHVN3PP_cjs.Qe}px`});s.type="button",s.setAttribute("data-pptx-compact",""),s.dataset.pptxHandleKind="rotate",s.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),s.addEventListener("pointerdown",x=>n.onRotatePointerDown(x)),yp(s),r.appendChild(s);let a,l,p=[];for(let x of chunk5YHVN3PP_cjs.Oe){let{fx:b,fy:v}=chunk5YHVN3PP_cjs.Pe[x],f=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-sel-handle",{left:`${b*100}%`,top:`${v*100}%`,cursor:chunk5YHVN3PP_cjs.Pe[x].cursor});f.type="button",f.setAttribute("data-pptx-compact",""),f.dataset.handle=x,f.dataset.pptxHandleKind="resize",f.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:x})),f.addEventListener("pointerdown",S=>n.onHandlePointerDown(x,S)),f.appendChild(chunkIQ7MDPEN_cjs.w(e,"span",void 0,chunk5YHVN3PP_cjs.Ue(x))),f.firstElementChild?.setAttribute("data-pptx-handle-hit",""),yp(f,x),r.appendChild(f),p.push(f);}let d=[];function u(x){let b=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-adjust-handle");return b.type="button",b.setAttribute("data-pptx-compact",""),b.dataset.pptxHandleKind="adjust",b.setAttribute("aria-label",t("pptx.selectionOverlay.adjust")),b.addEventListener("pointerdown",v=>{let f=m[x];f&&n.onAdjustPointerDown(v,f);}),r.appendChild(b),b}let m=[],g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-snap-layer");return o.appendChild(g),{root:o,mount(x){o.parentElement!==x?(x.appendChild(o),l!==x&&(a?.(),l=x,a=chunk5YHVN3PP_cjs.Xe(s,{stem:i}))):x.lastElementChild!==o&&x.appendChild(o);},setBox(x,b){if(!x){r.hidden=true;return}r.hidden=false,r.style.left=`${x.x*b}px`,r.style.top=`${x.y*b}px`,r.style.width=`${x.width*b}px`,r.style.height=`${x.height*b}px`,r.style.setProperty("--pptx-selection-width",`${x.width*b}px`),r.style.setProperty("--pptx-selection-height",`${x.height*b}px`),r.style.borderWidth=`${b}px`,r.style.transform=x.rotation?`rotate(${x.rotation}deg)`:"none";},setHandleVisibility({resizable:x,rotatable:b}){for(let v of p)v.hidden=!x;i.hidden=!b,s.hidden=!b;},setAdjustHandles(x,b){for(;d.length<x.length;)d.push(u(d.length));m=x,d.forEach((v,f)=>{let S=x[f];v.hidden=S===void 0,S&&(v.style.left=`${S.left*b}px`,v.style.top=`${S.top*b}px`,v.style.cursor=S.cursor,v.dataset.pptxAdjustKey=S.key);});},setSnapLines(x,b){g.replaceChildren();for(let v of x){let f=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-snap-line pptxv-snap-${v.axis==="v"?"v":"h"}`);v.axis==="v"?f.style.left=`${v.position*b}px`:f.style.top=`${v.position*b}px`,g.appendChild(f);}},setEditing(x){o.classList.toggle("is-editing",x),r.style.zIndex=x?"7":"";},destroy(){a?.(),o.remove();}}}var JM={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",ppt:"application/vnd.ms-powerpoint"};function Cp(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=null,a=null,l=()=>{let I={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(I),e.getChrome().titleBar?.setEditState(I),e.getChrome().mobileToolbar?.setEditState(I);},p=gp({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>l(),transformCommittedText:e.transformCommittedText,getPendingInlineTextEdit:()=>h.readPendingInlineTextEdit?.(),readInlineList:()=>h.readInlineList?.(),formatInlineList:I=>h.formatInlineList?.(I)??false,cancelInlineList:()=>h.closeInline(false)}),d=mp({doc:t,getTranslator:e.getTranslator,store:n,ops:p,getHandler:e.getHandler,setHandler:e.setHandler,getUserName:e.getUserName}),u=up({store:n,ops:p}),m=(I,R)=>{let O=n.get();!O.editable||!U(O).some(B=>B.id===I)||(p.pushHistory(),n.set(Z(O,U(O).map(B=>B.id===I?{...B,...R}:B))),p.commitChange());},g=()=>{let I=n.get(),R=U(I).find(O=>O.id===I.selectedElementId);R&&ni(t,e.getTranslator(),R,O=>m(R.id,O));},x=()=>{let I=n.get();I.formatPainterSourceId&&I.selectedElementId&&p.applyFormatPainter(I.formatPainterSourceId,I.selectedElementId);},b=I=>{let R=chunk5YHVN3PP_cjs.yl(I);if(R==="bold")return d.toggleBold(),true;if(R==="italic")return d.toggleItalic(),true;if(R==="underline")return d.toggleUnderline(),true;let{action:O}=chunk5YHVN3PP_cjs.Uq(I,{isEditingText:true,canEdit:true,hasSelection:true},e.getKeyboardCustomization?.());switch(O){case "alignLeft":return d.setTextAlign("left"),true;case "alignCenter":return d.setTextAlign("center"),true;case "alignRight":return d.setTextAlign("right"),true;case "alignJustify":return d.setTextAlign("justify"),true;case "increaseFontSize":return d.stepFontSize("increase"),true;case "decreaseFontSize":return d.stepFontSize("decrease"),true;case "copyFormat":return d.toggleFormatPainter(),true;case "pasteFormat":return x(),true;case "hyperlink":return g(),true;case "clearFormatting":return d.clearFormatting(),true;case "find":case "findReplace":return e.getChrome().ribbon?.toggleFindReplace(),true;default:return false}},v=new Map,f=false;function S(){let I=e.getHandler();return I&&!f&&v.size===0&&(f=true,I.getLayoutPreviews().then(R=>{v=new Map(R.map(O=>[O.path,O])),y();}).catch(()=>{}).finally(()=>{f=false;})),v}let y=lP({store:n,getChrome:e.getChrome,selectedElement:I=>p.selectedElement(I),layoutPreviews:S,getHandler:e.getHandler}),h=wA({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getLivePatcher:e.getLivePatcher,getStageRoot:()=>s?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(I,R)=>e.getChrome().ribbon?.openEquationEditor(I,R),onEyedropper:I=>d.setShapeFill(I),onInlineLiveFormatKey:b}),C=Kl({doc:t,store:n,editActions:d,interactions:h,getScale:e.getScale,getStageOrigin(){let I=o?.root.getBoundingClientRect();return {left:I?.left??0,top:I?.top??0}},getStageRoot:()=>s?.querySelector(".pptxv-stage")??null}),w=TA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getSelectedElement:I=>p.selectedElement(I),onChangePath:I=>d.setMotionPathData(I)}),A=IA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getCustomization:e.getCustomization,applyElementPatch:(I,R)=>m(I,R),insertElement:I=>d.insertElement(I)}),P=LP({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,actions:d}),k=()=>{if(y(),w.sync(),A.sync(),P.sync(),!o)return;let I=n.get(),R=I.editable&&!I.presenting&&!I.cropSession?U(I).filter(B=>I.selectedElementIds.includes(B.id)&&!A.isEditingPoints(B.id)):[];o.setBox(MP(R),e.getScale());let O=pi(I);o.setHandleVisibility({resizable:O.resizable,rotatable:O.rotatable}),o.setAdjustHandles(I.cropSession?[]:fA(I),e.getScale()),r?.sync(),i?.sync(),EP(t,o.root,I.showGuides?I.guides:[],e.getScale(),I.editable&&!I.presenting?{onMoveGuide:(B,F)=>{let V=n.get();n.set({guides:chunk5YHVN3PP_cjs.dm(V.guides,B,F,V.canvasSize)});},onRemoveGuide:B=>{n.set({guides:chunk5YHVN3PP_cjs.em(n.get().guides,B)});}}:void 0);},T=xp({getKeyboardCustomization:e.getKeyboardCustomization,isActive:()=>{let I=n.get();return I.editable&&!I.presenting&&!h.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>d.copy(),cutSelected:()=>d.cut(),paste:()=>d.paste(),canPaste:()=>{let I=n.get();return !!(I.clipboardPayload&&I.slides[I.currentSlide])},selectAll:()=>d.selectAll(),groupSelected:()=>d.groupSelected(),ungroupSelected:()=>d.ungroupSelected(),nudgeSelected:(I,R)=>p.nudgeSelected(I,R),undo:()=>p.undo(),redo:()=>p.redo(),cancelFormatPainter:()=>n.get().formatPainterSourceId?(n.set({formatPainterSourceId:null}),true):false,toggleShortcuts:()=>e.getChrome().shortcuts.toggle(),toggleFind:()=>e.getChrome().ribbon?.toggleFindReplace(),closeShortcuts:()=>{let I=e.getChrome().shortcuts;return I.isOpen()?(I.close(),true):false},setTextAlign:I=>d.setTextAlign(I),stepFontSize:I=>d.stepFontSize(I),copyFormat:()=>d.toggleFormatPainter(),pasteFormat:x,addSlide:()=>d.addSlide(),openHyperlink:g,toggleFindReplace:()=>e.getChrome().ribbon?.toggleFindReplace(),clearFormatting:()=>d.clearFormatting(),cycleSelection:I=>{let R=n.get(),O=U(R).map(F=>F.id),B=chunk5YHVN3PP_cjs.Bl(O,R.selectedElementId,I);B&&p.select(B,[B]);},onPasteSpecial:()=>{n.get().clipboardPayload&&wP(t,e.getTranslator(),{onConfirm:I=>{let R=d.pasteWithFormat(I);if(!R||I!=="picture")return;let O=n.get().pasteOptionsToolbar?.find(B=>B.id===R)?.sourceClone;O&&requestAnimationFrame(()=>{Xr(t,R,O).then(B=>{B&&d.replaceElement(R,B);});});}});}}),E=I=>{chunk5YHVN3PP_cjs.Gl(a),C.onStagePointerDown(I);},L,M=()=>{L?.(),L=void 0,h.closeInline(true),h.closeInline(false),s?.removeEventListener("pointerdown",E),s?.removeEventListener("pointermove",h.onStagePointerMove),s?.removeEventListener("dblclick",C.onStageDblClick),a?.removeEventListener("keydown",T),s=null,a=null,o?.destroy(),o=null,r?.dispose(),r=null,i?.dispose(),i=null,w.detach(),A.detach(),P.detach();},D=n.subscribe((I,R)=>{if(R.editable&&!I.editable&&h.retainAcceptedInlineText?.(),h.readInlineList?.(),I.loading&&!R.loading&&h.closeInline(false),I.currentSlide!==R.currentSlide&&(h.closeInline(true),I.selectedElementId)){p.select(null);return}if((I.slides!==R.slides||I.templateElementsBySlideId!==R.templateElementsBySlideId||I.slideMasters!==R.slideMasters||I.notesMaster!==R.notesMaster||I.handoutMaster!==R.handoutMaster)&&I.selectedElementId&&!p.selectedElement(I)){p.select(null);return}I.editable!==R.editable&&(I.editable||(h.closeInline(true),I.selectedElementId&&p.select(null)),l()),(I.drawTool!==R.drawTool||I.editable!==R.editable)&&C.syncCursor(s),k();});return {attachChrome(){M();let I=e.getChrome();o=Sp(t,e.getTranslator(),{onHandlePointerDown(R,O){h.beginHandleGesture("resize",O,R);},onRotatePointerDown(R){h.beginHandleGesture("rotate",R);},onAdjustPointerDown(R,O){h.beginAdjustGesture(R,O);}}),r=AP({doc:t,store:n,ops:p,getScale:e.getScale,label:R=>e.getTranslator()(R==="start"?"pptx.canvas.connectorEndpointStart":"pptx.canvas.connectorEndpointEnd")}),i=TP({doc:t,t:e.getTranslator(),store:n,ops:p,getScale:e.getScale}),w.attach(),s=I.stageWrap,a=I.root,P.attach(a),L=eA(a,s,{store:n,getHandler:e.getHandler,isEditing:h.inlineActive,insertElement:d.insertElement}),s.addEventListener("pointerdown",E),s.addEventListener("pointermove",h.onStagePointerMove),s.addEventListener("dblclick",C.onStageDblClick),a.addEventListener("keydown",T),o.mount(s),r.mount(s),i.mount(s),l(),C.syncCursor(s),k();},detachChrome:M,onStageRendered(){o&&s&&(o.mount(s),r?.mount(s),i?.mount(s),k());},hasActivePointerInteraction:()=>h.hasActivePointerInteraction()||C.isActive()||P.isDragging()||!!r?.isActive(),capturesKeyboard(){let I=n.get();return I.editable&&(I.selectedElementId!==null||h.inlineActive())},reset(){h.closeInline(false),C.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",editPointsElementId:null,freeformTool:null,formatPainterSourceId:null,cropSession:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),l();},setEditable(I){n.set({editable:I,...I?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:I=>p.setHistoryDepth(I),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:I=>p.select(I.at(-1)??null,I),applyElementPatch:m,commitElementUpdates(I,R){p.pushHistory(R),n.set({slides:I}),p.commitChange();},commitSlides(I,R=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:I,currentSlide:Math.max(0,Math.min(R,I.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:I=>C.setTool(I),setDrawColor:I=>{ct(n,I),C.setColor(I);},setDrawWidth:I=>C.setWidth(I),startEditPoints:I=>A.startEditPoints(I),armFreeformTool:I=>A.armFreeformTool(I),getEditActions:()=>d,getFindReplaceActions:()=>u,commitNotes:(I,R)=>p.commitNotes(I,R),setHandoutSlidesPerPage:I=>p.setHandoutSlidesPerPage(I),updateDocumentProperties:(I,R,O)=>p.updateDocumentProperties(I,R,O),updatePresentationProperties:I=>p.updatePresentationProperties(I),updateSections:I=>p.updateSections(I),updateHeaderFooter:I=>p.updateHeaderFooter(I),updateCustomShows:I=>p.updateCustomShows(I),save:I=>p.save(I),async downloadAs(I,R){let O=await p.save(I);chunk5YHVN3PP_cjs.kt(new Blob([O],{type:JM[I]}),chunk5YHVN3PP_cjs.zj(R,I));},async downloadPptx(I){await this.downloadAs("pptx",I);},destroy(){D(),P.destroy(),h.dispose(),C.dispose(),M();}}}async function wp(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 mo(e,t){let n=new chunk5YHVN3PP_cjs.Z,o=[];try{let r=await n.load(e,{allowExternalImages:t?.allowExternalImages}),i=u=>n.getImageData(u),s=await eD(n,r.slides,o),a=await tD(n,r.slides),l=await chunk5YHVN3PP_cjs.Qa(a,i),p=await chunk5YHVN3PP_cjs.Ra(r.tableStyleMap,i),d=await chunk5YHVN3PP_cjs.Sa(l,i);return {handler:n,slides:d,sections:r.sections??[],presentationProperties:r.presentationProperties??{},viewProperties:r.viewProperties,headerFooter:r.headerFooter??{},coreProperties:r.coreProperties,appProperties:r.appProperties,customProperties:r.customProperties??[],customShows:r.customShows??[],modernCommentAuthors:r.modernCommentAuthors??[],commentAuthors:r.commentAuthors??[],embeddedFonts:r.embeddedFonts??[],hasDigitalSignatures:r.hasDigitalSignatures??!1,digitalSignatureCount:r.digitalSignatureCount??0,isPasswordProtected:r.isPasswordProtected??!1,canvasSize:{width:r.width??chunk5YHVN3PP_cjs.ba,height:r.height??chunk5YHVN3PP_cjs.ca},mediaDataUrls:s,colorScheme:r.theme?.colorScheme,fontScheme:r.theme?.fontScheme,themeName:r.theme?.name,tagCollections:r.tags??[],tableStyleMap:p,tableStylesDefaultId:r.tableStylesDefaultId,slideMasters:r.slideMasters??[],themeOptions:r.themeOptions??[],notesMaster:r.notesMaster,handoutMaster:r.handoutMaster,hasMacros:r.hasMacros??!1,modifyVerifier:r.modifyVerifier,warnings:r.warnings??[],slideSize:typeof r.widthEmu=="number"&&typeof r.heightEmu=="number"&&r.widthEmu>0&&r.heightEmu>0?{widthEmu:r.widthEmu,heightEmu:r.heightEmu,type:r.slideSizeType??""}:void 0,notesCanvasSize:typeof r.notesWidthEmu=="number"&&typeof r.notesHeightEmu=="number"&&r.notesWidthEmu>0&&r.notesHeightEmu>0?{width:Math.round(r.notesWidthEmu/9525),height:Math.round(r.notesHeightEmu/9525)}:void 0,blobUrls:o}}catch(r){throw mt(o),n.dispose(),r}}function mt(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function eD(e,t,n){let o=[];for(let s of t)chunk5YHVN3PP_cjs.Ma(s.elements,o);let r=new Map;await Promise.all(o.map(async s=>{let a=await chunk5YHVN3PP_cjs.Pa(s,e);if(a.missing||!a.mediaPath||!a.url){s.mediaMissing=true;return}r.set(a.mediaPath,a.url),a.isBlobUrl&&n.push(a.url);}));let i=chunk5YHVN3PP_cjs.Na(t).filter(s=>!r.has(s));return await Promise.all(i.map(async s=>{try{let a=await e.getMediaArrayBuffer(s);if(a){let l=URL.createObjectURL(new Blob([a]));n.push(l),r.set(s,l);}}catch{}})),r}async function tD(e,t){let{paths:n,refs:o}=chunk5YHVN3PP_cjs.Oa(t);if(n.size===0)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let s=await e.getImageData(i);s&&r.set(i,s);}catch{}})),t.map(i=>{let s=chunk5YHVN3PP_cjs.La(i.elements,r,o);return s===i.elements?i:{...i,elements:s}})}function ci(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let s of Object.keys(o))if(o[s]!==t[s]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let s of Array.from(n))s(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function mi(){return {slides:[],sections:[],presentationProperties:{},viewProperties:void 0,headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],modernCommentAuthors:[],commentAuthors:[],activeCustomShowId:null,embeddedFonts:[],outlineFontsTick:0,embedFonts:true,customFontFamilies:[],hasDigitalSignatures:false,digitalSignatureCount:0,isPasswordProtected:false,presentationPassword:null,templateElementsBySlideId:{},slideMasters:[],themeOptions:[],notesMaster:void 0,notesCanvasSize:void 0,handoutMaster:void 0,hasMacros:false,masterViewTab:"slides",handoutSlidesPerPage:4,masterViewTarget:null,canvasSize:{width:chunk5YHVN3PP_cjs.ba,height:chunk5YHVN3PP_cjs.ca},slideSize:void 0,mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,themeName:void 0,tagCollections:[],tableStyleMap:void 0,tableStylesDefaultId:void 0,tableStylesToDelete:[],currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,protectedView:false,selectedElementId:null,selectedElementIds:[],selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null,formatPainterSourceId:null,editTemplateMode:false,dirty:false,interactionActive:false,notesExpanded:false,inspectorOpen:true,remotePresences:[],cursors:[],followedClientId:null,clipboardPayload:null,pasteOptionsToolbar:null,drawTool:"select",editPointsElementId:null,freeformTool:null,drawColor:chunk5YHVN3PP_cjs.ea,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,showGuides:true,guides:[],eyedropperActive:false,cropSession:null,spellCheckEnabled:false,readOnlyRecommendation:null,readOnlyBannerDismissed:false,modifyVerifier:void 0,readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null,readOnlyCheckingPassword:false,compatToasts:[],runProgramNotices:[]}}function Vt(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function LA(e){let{options:t,store:n}=e,o=null,r=[],i=0;function s(){mt(r),mt(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function a(l,p="user",d){let u=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let m=await wp(l),g=await mo(m,{allowExternalImages:e.getAllowExternalContent?.()});if(u!==i){mt(g.blobUrls),g.handler.dispose();return}s(),o=g.handler,r=g.blobUrls;let x=chunk5YHVN3PP_cjs.lo(g.slides);e.onContentApplying?.(p);let b=p==="user"&&!d?.skipProtectedView&&t.editable===!0&&(e.shouldOpenProtectedView?.()??!1),v=chunk5YHVN3PP_cjs.bs({modifyVerifier:g.modifyVerifier,customProperties:g.customProperties}),f=t.editable===!0&&v.kind!==null&&v.defaultReadOnly,S=dp(n.get(),g.viewProperties),y=chunk5YHVN3PP_cjs.ds([...g.warnings,...g.slides.flatMap(h=>h.warnings??[])]);n.set({slides:x.slides,protectedView:b,readOnlyRecommendation:v.kind===null?null:v,readOnlyBannerDismissed:!1,modifyVerifier:g.modifyVerifier??void 0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null,readOnlyCheckingPassword:!1,compatToasts:y,...S,sections:g.sections,presentationProperties:g.presentationProperties,viewProperties:g.viewProperties,headerFooter:g.headerFooter,coreProperties:g.coreProperties,appProperties:g.appProperties,customProperties:g.customProperties,customShows:g.customShows,modernCommentAuthors:g.modernCommentAuthors,commentAuthors:g.commentAuthors,activeCustomShowId:chunk5YHVN3PP_cjs.Ip(g.presentationProperties,g.customShows)??null,embeddedFonts:g.embeddedFonts,embedFonts:chunk5YHVN3PP_cjs.ro(g.embeddedFonts.map(h=>h.name)).initialEnabled,hasDigitalSignatures:g.hasDigitalSignatures,digitalSignatureCount:g.digitalSignatureCount,isPasswordProtected:g.isPasswordProtected,templateElementsBySlideId:x.templateElementsBySlideId,slideMasters:g.slideMasters,themeOptions:g.themeOptions,notesMaster:g.notesMaster,notesCanvasSize:g.notesCanvasSize,handoutMaster:g.handoutMaster,hasMacros:g.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:g.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:g.canvasSize,slideSize:g.slideSize,mediaDataUrls:g.mediaDataUrls,colorScheme:g.colorScheme,fontScheme:g.fontScheme,themeName:g.themeName,tagCollections:g.tagCollections,tableStyleMap:g.tableStyleMap,tableStylesDefaultId:g.tableStylesDefaultId,tableStylesToDelete:[],currentSlide:Vt(t.initialSlide??0,x.slides.length),loading:!1}),e.setEditableForLoad?.(b||f?!1:t.editable===!0),e.onContentApplied?.(p),t.onLoad?.({slideCount:g.slides.length,canvasSize:g.canvasSize});}catch(m){if(u!==i)return;let g=e.getTranslator(),x=m instanceof chunk5YHVN3PP_cjs.L?g("pptx.security.currentlyProtected"):m instanceof Error?m.message:String(m);n.set({loading:false,error:x}),t.onError?.(x,m);}}return {load:a,releaseLoaded:s,getHandler:()=>o,setHandler:l=>{o?.dispose(),o=l;},invalidate:()=>{i++;}}}var oD=22;function nD(e){return e.map(t=>`${t.key}@${t.level}`).join("\0")}function MA(e,t,n,o){t.querySelector(`[${chunk5YHVN3PP_cjs.nl}]`)?.remove();let r=o.slides,i="",s=false,a=new Map,l=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-outline-view");l.setAttribute(chunk5YHVN3PP_cjs.nl,"true"),l.setAttribute("role","region"),l.setAttribute("aria-label",n("pptx.view.outlineView"));let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-outline-view-header"),d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-outline-view-title");d.textContent=n("pptx.view.outlineView");let u=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-outline-view-hint");u.textContent=n("pptx.outline.hint");let m=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-outline-view-btn",onClick:()=>{y(),o.onClose();}});p.append(d,u,m.btn);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-outline-view-list");l.append(p,g);let x=h=>{if(!o.canEdit)return;let C=chunk5YHVN3PP_cjs.xl(r,h,{canvas:o.canvasSize});C.changed&&(r=C.slides,o.commit(C.slides,C.activeSlideIndex),v(),f(C.focusKey));},b=h=>{let C=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-outline-view-row",{paddingLeft:`${h.level*oD}px`}),w=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-outline-view-number");w.textContent=h.kind==="title"?String(h.slideIndex+1):"";let A=e.createElement("input");return A.type="text",A.className=`pptxv-outline-view-input${h.kind==="title"?" is-title":""}`,A.value=h.text,A.readOnly=!o.canEdit,A.setAttribute(chunk5YHVN3PP_cjs.ol,h.key),A.setAttribute(chunk5YHVN3PP_cjs.pl,String(h.slideIndex+1)),A.setAttribute(chunk5YHVN3PP_cjs.ql,String(h.level)),A.setAttribute("aria-label",n(h.kind==="title"?"pptx.outline.titleLine":"pptx.outline.bodyLine")),A.addEventListener("input",()=>x({type:"setText",key:h.key,text:A.value})),A.addEventListener("keydown",P=>{let{edit:k,preventDefault:T}=chunk5YHVN3PP_cjs.wl(P,h.key);T&&P.preventDefault(),k&&x(k);}),a.set(h.key,A),C.append(w,A),C};function v(){let h=chunk5YHVN3PP_cjs.rl(r),C=nD(h);if(C===i){for(let w of h){let A=a.get(w.key);A&&A.value!==w.text&&(A.value=w.text);}return}i=C,a.clear(),g.replaceChildren(...h.map(w=>b(w)));}function f(h){let C=h?a.get(h):void 0;C&&e.activeElement!==C&&(C.focus(),C.setSelectionRange(C.value.length,C.value.length));}let S=o.subscribe?.(h=>{!s&&h!==r&&(r=h,v());});function y(){s||(s=true,S?.(),l.remove());}return v(),t.appendChild(l),{el:l,close:y}}function DA(e){let t=null,n=()=>{t?.close(),t=null;};return {open(){n();let o=e.store.get();t=MA(e.doc,e.root(),e.t,{slides:o.slides,canvasSize:o.canvasSize,canEdit:o.editable,subscribe:r=>e.store.subscribe(i=>r(i.slides)),commit:(r,i)=>e.editor.commitSlides(r,i),onClose:()=>{t=null;}});},close:n}}function RA(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunkIQ7MDPEN_cjs.w(e,"header"),s=chunkIQ7MDPEN_cjs.w(e,"h2");s.textContent=n("pptx.selectionPane.title");let a=chunkIQ7MDPEN_cjs.w(e,"button");a.type="button",a.textContent="\xD7",a.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(s,a),r.appendChild(i);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-workspace-list"),p={elements:o.elements,selectedIds:o.selectedIds},d=null,u=new Map,m=()=>{for(let[v,f]of u)f.classList.toggle("is-selected",p.selectedIds.includes(v));},g=()=>{if(d===p.elements){m();return}if(d=p.elements,u.clear(),l.replaceChildren(),!p.elements.length){let v=chunkIQ7MDPEN_cjs.w(e,"p");v.textContent=n("pptx.selectionPane.empty"),l.appendChild(v);return}[...p.elements].reverse().forEach((v,f)=>{let S=rD(e,n,v,p.elements.length-f-1,o,p.selectedIds);u.set(v.id,S),l.appendChild(S);});};g(),r.appendChild(l);let x=o.subscribe?.(v=>{p=v,!l.querySelector(".pptxv-selection-rename")&&g();})??null,b={close(){x?.(),r.remove();}};return a.addEventListener("click",()=>{b.close(),o.onClose?.();}),t.appendChild(r),b}function rD(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-selection-row");s.draggable=true,s.dataset.index=String(o),s.classList.toggle("is-selected",i.includes(n.id));let a=chunkIQ7MDPEN_cjs.w(e,"span");a.textContent="\u2630";let l=chunkIQ7MDPEN_cjs.w(e,"button");l.type="button",l.dataset.pptxSelectionName="true",l.textContent=OA(n,o),l.addEventListener("click",()=>r.onSelect(n.id)),l.addEventListener("dblclick",()=>iD(e,t,s,l,n,o,r.onRename));let p=chunkIQ7MDPEN_cjs.w(e,"button");return p.type="button",p.textContent=n.hidden?"\u25CB":"\u25C9",p.setAttribute("aria-label",t(n.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),p.addEventListener("click",()=>r.onToggleHidden(n.id)),s.addEventListener("dragstart",d=>d.dataTransfer?.setData("text/plain",String(o))),s.addEventListener("dragover",d=>d.preventDefault()),s.addEventListener("drop",d=>{d.preventDefault();let u=Number(d.dataTransfer?.getData("text/plain"));Number.isInteger(u)&&r.onReorder(u,o);}),s.append(a,l,p),s}function iD(e,t,n,o,r,i,s){let a=OA(r,i),l=e.createElement("input");l.type="text",l.className="pptxv-selection-rename",l.setAttribute("aria-label",t("pptx.selectionPane.renameElement")),l.value=a,o.hidden=true,n.insertBefore(l,o),l.focus(),l.select();let p=false,d=u=>{if(p)return;p=true,chunk5YHVN3PP_cjs.Hl(l),l.remove(),o.hidden=false;let m=u?chunk5YHVN3PP_cjs.Il(a,l.value):null;m&&(o.textContent=m.name.length>0?m.name:HA(r,i),s(r.id,m.name));};l.addEventListener("keydown",u=>{u.key==="Enter"?d(true):u.key==="Escape"&&d(false);}),l.addEventListener("blur",()=>d(true));}function OA(e,t){return e.name&&e.name.trim().length>0?e.name.trim():HA(e,t)}function HA(e,t){return chunk5YHVN3PP_cjs.e(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function aD(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}function FA(e){let t=null,n=()=>{t?.close(),t=null;},o=()=>{let r=e.store.get();return r.slides[r.currentSlide]};return {open(){n(),t=RA(e.doc,e.root(),e.t,{elements:o()?.elements??[],selectedIds:e.store.get().selectedElementIds,subscribe:r=>{let i=o()?.elements??[],s=e.store.get().selectedElementIds;return e.store.subscribe(a=>{let l=a.slides[a.currentSlide]?.elements??[],p=a.selectedElementIds;l===i&&aD(p,s)||(i=l,s=p,r({elements:i,selectedIds:s}));})},onClose:()=>{t=null;},onSelect:r=>e.editor.selectElements([r]),onToggleHidden:r=>e.editor.applyElementPatch(r,{hidden:!o()?.elements.find(i=>i.id===r)?.hidden}),onRename:(r,i)=>e.editor.applyElementPatch(r,{name:i}),onReorder:(r,i)=>{let s=e.store.get(),a=s.slides[s.currentSlide];if(!a||r===i)return;let l=[...a.elements],[p]=l.splice(r,1);l.splice(i,0,p),e.editor.commitSlides(s.slides.map((d,u)=>u===s.currentSlide?{...d,elements:l}:d));}});},close:n}}var Ep=Symbol("pptxv-comments-panel-dispose");function VA(e,t,n,o,r){let i=t.querySelector("[data-pptx-comments-panel]");i?.[Ep]?.(),i?.remove();let s=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-workspace-pane");s.dataset.pptxCommentsPanel="true";let a=chunkIQ7MDPEN_cjs.w(e,"header"),l=chunkIQ7MDPEN_cjs.w(e,"h2");l.textContent=n("pptx.toolbar.comments");let p=chunkIQ7MDPEN_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.common.close")),a.append(l,p),s.appendChild(a);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-workspace-list"),u=Fr(e,n,r,o.getAuthors),m=chunkIQ7MDPEN_cjs.w(e,"p");m.textContent=n("pptx.comments.noneOnSlide"),d.append(u.el,m);let g=()=>{let C=o.getComments();m.hidden=C.length>0,u.update(C,true);},x=chunkIQ7MDPEN_cjs.w(e,"textarea");x.placeholder=n("pptx.comments.addPlaceholder");let b=[],v=no({doc:e,t:n,field:x,getAuthors:o.getAuthors,getMentions:()=>b,onChange:C=>{x.value=C.text,b=C.mentions;}}),f=chunkIQ7MDPEN_cjs.w(e,"button");f.type="button",f.textContent=n("pptx.comments.addComment"),f.addEventListener("click",()=>{r.addComment(x.value,void 0,b)&&(x.value="",b=[]);}),d.append(x,v.el,f),s.appendChild(d);let S=o.getComments(),y=()=>{h(),v.destroy(),delete s[Ep];},h=o.subscribe(()=>{if(!s.isConnected){y();return}let C=o.getComments();C!==S&&(S=C,g());});s[Ep]=y,p.addEventListener("click",()=>{y(),s.remove();}),g(),t.appendChild(s);}function BA(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunkIQ7MDPEN_cjs.w(e,"header"),s=chunkIQ7MDPEN_cjs.w(e,"div"),a=chunkIQ7MDPEN_cjs.w(e,"h2");a.textContent=n("pptx.compare.title");let l=chunkIQ7MDPEN_cjs.w(e,"p");l.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.compare.close")),i.append(s,p),r.appendChild(i);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compare-actions"),u=chunkIQ7MDPEN_cjs.w(e,"button");u.type="button",u.textContent=n("pptx.compare.acceptAll"),u.addEventListener("click",()=>{o.onAcceptAll(),r.remove();}),d.appendChild(u),r.appendChild(d);let m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-compare-list"),g=o.result.diffs.filter(x=>x.status!=="unchanged");if(g.length===0){let x=chunkIQ7MDPEN_cjs.w(e,"p");x.textContent=n("pptx.compare.noDifferences"),m.appendChild(x);}for(let x of g)m.appendChild(sD(e,n,x,o.onAccept));r.appendChild(m),t.appendChild(r),p.addEventListener("click",()=>r.remove());}function sD(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"article","pptxv-compare-row"),i=chunkIQ7MDPEN_cjs.w(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${lD(n.status)}`)}`;let s=chunkIQ7MDPEN_cjs.w(e,"p");s.textContent=n.changes.map(d=>d.description).join("; ")||i.textContent;let a=chunkIQ7MDPEN_cjs.w(e,"div"),l=chunkIQ7MDPEN_cjs.w(e,"button");l.type="button",l.textContent=t("pptx.compare.reject");let p=chunkIQ7MDPEN_cjs.w(e,"button");return p.type="button",p.textContent=t("pptx.compare.accept"),l.addEventListener("click",()=>{r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),p.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),a.append(l,p),r.append(i,s,a),r}function lD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function zA(e,t,n){let{shows:o,slides:r,onSave:i,onSetActive:s,onRun:a}=n,l=we(e,t,t("pptx.customShows.title")),p=structuredClone(o),d=n.activeShowId,u=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-custom-shows-active"),m=chunkIQ7MDPEN_cjs.w(e,"span");m.textContent=t("pptx.customShows.selectCustomShow");let g=e.createElement("select");g.setAttribute("aria-label",t("pptx.customShows.selectCustomShow")),g.addEventListener("change",()=>{d=g.value||null,s(d);}),u.append(m,g),l.body.appendChild(u);let x=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-custom-shows");l.body.appendChild(x);let b=()=>{g.replaceChildren();let f=e.createElement("option");f.value="",f.textContent=t("pptx.customShows.allSlides"),g.appendChild(f);for(let S of p){let y=e.createElement("option");y.value=S.id,y.textContent=S.name,g.appendChild(y);}g.value=p.some(({id:S})=>S===d)?d??"":"";},v=()=>{x.replaceChildren(),p.forEach(f=>{let S=chunkIQ7MDPEN_cjs.w(e,"article"),y=chunkIQ7MDPEN_cjs.w(e,"input");y.value=f.name,y.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),y.addEventListener("change",()=>{f.name=y.value.trim()||f.name,b();});let h=chunkIQ7MDPEN_cjs.w(e,"span");h.textContent=`${f.slideRIds.length}/${r.length}`;let C=chunkIQ7MDPEN_cjs.w(e,"button");C.type="button",C.textContent=t("pptx.slideShow.fromBeginning"),C.addEventListener("click",()=>{d=f.id,s(f.id),a(f),l.close();});let w=chunkIQ7MDPEN_cjs.w(e,"button");w.type="button",w.textContent=t("pptx.customShows.delete"),w.addEventListener("click",()=>{p=p.filter(({id:P})=>P!==f.id),d===f.id&&(d=null,s(null)),v(),b();});let A=chunkIQ7MDPEN_cjs.w(e,"div");r.forEach(P=>{let k=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-check"),T=e.createElement("input");T.type="checkbox",T.checked=f.slideRIds.includes(P.rId),T.addEventListener("change",()=>{f.slideRIds=T.checked?[...f.slideRIds,P.rId]:f.slideRIds.filter(E=>E!==P.rId),h.textContent=`${f.slideRIds.length}/${r.length}`;}),k.append(T,e.createTextNode(`${t("pptx.rehearse.slide")} ${P.slideNumber}`)),A.appendChild(k);}),S.append(y,h,C,w,A),x.appendChild(S);});};ae(e,l.footer,t("pptx.customShows.createNew"),()=>{p.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:r.map(({rId:f})=>f)}),v(),b();}),ae(e,l.footer,t("pptx.common.cancel"),l.close),ae(e,l.footer,t("pptx.common.ok"),()=>{i(p),s(p.some(({id:f})=>f===d)?d:null),l.close();},true),v(),b();}function NA(e,t,n){let o=we(e,t,t("pptx.headerFooter.title")),r=chunk5YHVN3PP_cjs.go(n.value),i=qe(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),s=qe(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),a=qe(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),l=chunkIQ7MDPEN_cjs.w(e,"input");l.type="text",l.value=r.footerText??"",l.placeholder=t("pptx.headerFooter.footerPlaceholder"),l.hidden=!a.checked,o.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=!a.checked;});let p=d=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:s.checked,hasFooter:a.checked,footerText:l.value},d),o.close();};ae(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>p("all")),ae(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>p("current"),true);}function _A(e,t,n,o,r){let i=we(e,t,t("pptx.print.title")),s=(b,v)=>{let f=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-select"),S=chunkIQ7MDPEN_cjs.w(e,"span");S.textContent=b;let y=e.createElement("select");for(let[h,C]of v){let w=e.createElement("option");w.value=h,w.textContent=C,y.appendChild(w);}return f.append(S,y),i.body.appendChild(f),y},a=s(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-parity-range");l.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let d=e.createElement("input");d.type="number",d.min="1",d.max=String(n),d.value=String(n),l.append(p,e.createTextNode(t("pptx.slideShow.to")),d),i.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=a.value!=="custom";});let u=s(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]);r?.printWhat&&(u.value=r.printWhat);let m=s(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),g=s(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["blackAndWhite",t("pptx.print.blackAndWhite")]]);r?.colorMode&&(g.value=r.colorMode);let x=qe(e,i.body,t("pptx.print.frameSlides"),r?.frameSlides??false);ae(e,i.footer,t("pptx.common.cancel"),i.close),ae(e,i.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(d.value),printWhat:u.value,orientation:m.value,colorMode:g.value,frameSlides:x.checked,scaleToFit:r?.scaleToFit??true}),i.close();},true);}var pD=24;function GA(e,t,n,o){let r=o.slides.length;if(t.querySelector(`[${chunk5YHVN3PP_cjs.el}]`)?.remove(),r===0)return null;let i=chunk5YHVN3PP_cjs.hl(o.initialSlideIndex,r),s={width:0,height:0},a=false,l=chunk5YHVN3PP_cjs.cl(),p=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-reading-view");p.setAttribute(chunk5YHVN3PP_cjs.el,"true"),p.setAttribute("role","region"),p.setAttribute("aria-label",n("pptx.view.readingView")),p.tabIndex=-1;let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-reading-view-viewport"),u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-reading-view-bar"),m=H(e,{label:n("pptx.common.previous"),icon:"chevron-left",className:"pptxv-reading-view-btn",onClick:()=>f({command:"previous"})}),g=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-reading-view-counter");g.setAttribute(chunk5YHVN3PP_cjs.fl,"true");let x=H(e,{label:n("pptx.common.next"),icon:"chevron-right",className:"pptxv-reading-view-btn",onClick:()=>f({command:"next"})}),b=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-reading-view-btn",onClick:()=>f({command:"exit"})});u.append(m.btn,g,x.btn,b.btn),p.append(d,u);let v=()=>{let P=o.slides[i.slideIndex];g.textContent=chunk5YHVN3PP_cjs.Nk(i.slideIndex,r),m.setDisabled(!chunk5YHVN3PP_cjs.kl(i)),x.setDisabled(!chunk5YHVN3PP_cjs.ll(i,r));let k=Math.max(o.canvasSize.width,1),T=Math.max(o.canvasSize.height,1),E=chunk5YHVN3PP_cjs.ml(o.canvasSize,s,pD),L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-reading-view-stage",{width:`${k*E}px`,height:`${T*E}px`});L.setAttribute(chunk5YHVN3PP_cjs.gl,"true"),L.setAttribute("aria-roledescription","slide"),P&&E>0&&L.appendChild(o.renderStage(P,E)),d.replaceChildren(L);},f=P=>{let k=i,T=chunk5YHVN3PP_cjs.jl(k,P,r);if(k.open&&!T.open){w(),o.onExit(k.slideIndex);return}i=T,v();},S=P=>{let{command:k,swallow:T,preventDefault:E}=chunk5YHVN3PP_cjs.il(P,l);T&&P.stopPropagation(),E&&P.preventDefault(),k.command!=="none"&&f(k);},y=()=>{let P=d.getBoundingClientRect();(P.width!==s.width||P.height!==s.height)&&(s={width:P.width,height:P.height},v());},h=e.defaultView?.ResizeObserver,C=h?new h(()=>y()):null;function w(){a||(a=true,e.removeEventListener("keydown",S,true),C?.disconnect(),p.remove());}e.addEventListener("keydown",S,true),t.appendChild(p);let A=d.getBoundingClientRect();return s={width:A.width,height:A.height},v(),C?.observe(d),p.focus(),{el:p,close:w}}function UA(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunkIQ7MDPEN_cjs.w(e,"span"),s=chunkIQ7MDPEN_cjs.w(e,"strong"),a=chunkIQ7MDPEN_cjs.w(e,"span"),l={},p=performance.now(),d=p,u=0,m=0,g=false,x=h=>new Date(Math.max(0,h)).toISOString().slice(14,19),b=(h,C)=>{let w=chunkIQ7MDPEN_cjs.w(e,"button");return w.type="button",w.textContent=h,w.addEventListener("click",C),r.appendChild(w),w},v=b(n("pptx.rehearse.pause"),()=>{if(g=!g,g)u=performance.now();else {let h=performance.now()-u;m+=h,p+=h,d+=h;}v.textContent=n(g?"pptx.rehearse.resume":"pptx.rehearse.pause");}),f=()=>{l[o.currentSlide()]=Math.max(250,performance.now()-p-m),m=0;};b(n("pptx.presenter.next"),()=>{if(g)return;f();let h=o.currentSlide()+1;h<o.slideCount&&(o.navigate(h),p=performance.now());}),b(n("pptx.rehearse.saveTimings"),()=>{f(),o.onSave(l),r.remove();}),b(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,s,a);let S=window.setInterval(()=>{if(g)return;let h=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,s.textContent=`${n("pptx.rehearse.slideTime")}: ${x(h-p)}`,a.textContent=`${n("pptx.rehearse.totalTime")}: ${x(h-d)}`;},250),y=new MutationObserver(()=>{r.isConnected||(clearInterval(S),y.disconnect());});y.observe(t,{childList:true}),t.appendChild(r);}var dD=(e,t,n)=>{chunk5YHVN3PP_cjs.kt(new Blob([t],{type:n}),e);};function KA(e){let{doc:t,t:n}=e,o=e.store??chunkIQ7MDPEN_cjs.a(),r=chunkIQ7MDPEN_cjs.w(t,"section","pptxv-ai-settings"),i=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-ai-settings-intro"),s=chunkIQ7MDPEN_cjs.w(t,"div"),a=chunkIQ7MDPEN_cjs.w(t,"p");a.textContent=n("pptx.ai.settingsSectionTitle");let l=chunkIQ7MDPEN_cjs.w(t,"p","pptxv-ai-settings-count");l.textContent=n("pptx.ai.exportLogsHint"),s.append(a,l),i.append(chunkIQ7MDPEN_cjs.K(t,"bug"),s);let p=chunkIQ7MDPEN_cjs.w(t,"p","pptxv-ai-settings-count");p.textContent=n("pptx.ai.exportLogsCounting");let d=chunkIQ7MDPEN_cjs.w(t,"label","pptxv-ai-settings-detailed"),u=chunkIQ7MDPEN_cjs.w(t,"input");u.type="checkbox",u.checked=true,d.append(u,t.createTextNode(n("pptx.ai.exportLogsDetailed")));let m=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-ai-settings-actions"),g=chunkIQ7MDPEN_cjs.w(t,"p","pptxv-ai-settings-status");g.setAttribute("role","status"),g.hidden=true;let x=(v,f)=>{let S=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-ai-settings-btn");return S.type="button",S.append(chunkIQ7MDPEN_cjs.K(t,"download"),t.createTextNode(n(v))),S.addEventListener("click",()=>{b(f);}),S},b=async(v,f)=>{let S=m.querySelectorAll("button");for(let y of S)y.disabled=true;try{let y=await chunkIQ7MDPEN_cjs.g(o),h=chunkIQ7MDPEN_cjs.h(y,{format:v,detailed:u.checked},dD);g.hidden=!1,g.textContent=h>0?n("pptx.ai.exportLogsDone",{count:h}):n("pptx.ai.noChatsToExport");}finally{for(let y of S)y.disabled=false;}};return m.append(x("pptx.ai.exportLogsJson","json"),x("pptx.ai.exportLogsMarkdown","markdown")),r.append(i,p,d,m,g),(async()=>{let v=0;try{v=(await o.listChats()).length;}catch{v=0;}p.textContent=n("pptx.ai.exportLogsStoredCount",{count:v});})(),r}function ui(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-options-row-label");if(o.appendChild(e.createTextNode(t(n.labelKey))),n.infoKey){let r=chunkIQ7MDPEN_cjs.w(e,"i","pptxv-options-info");r.textContent="i",r.title=t(n.infoKey),r.setAttribute("aria-label",t(n.infoKey)),o.appendChild(r);}return o}function xi(e,t,n){return n.readOnly!==true?false:(e.toggleAttribute("disabled",true),e.title=t("pptx.options.lockedByHost"),true)}function gi(e){return `pptxv-options-row${e.indent?" is-indent":""}`}function cD(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"label",gi(o)),s=e.createElement("pptx-ui-checkbox");s.setAttribute("aria-label",t(o.labelKey)),s.checked=r.getValue(o.group,o.key)===true;let a=xi(s,t,o);s.addEventListener("change",()=>{a||r.setValue(o.group,o.key,s.checked);}),i.append(ui(e,t,o),s),n.appendChild(i);}function mD(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div",gi(o)),s=e.createElement("pptx-ui-select");s.setAttribute("aria-label",t(o.labelKey));for(let p of o.choices){let d=e.createElement("option");d.value=p.value,d.textContent=t(p.labelKey),s.appendChild(d);}let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=xi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(ui(e,t,o),s),n.appendChild(i);}function uD(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div",gi(o)),s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-options-number"),a=e.createElement("input");a.type="number",a.min=String(o.min),a.max=String(o.max),a.step=String(o.step??1),a.setAttribute("aria-label",t(o.labelKey));let l=r.getValue(o.group,o.key);a.value=String(typeof l=="number"?l:o.min);let p=xi(a,t,o);if(a.addEventListener("change",()=>{if(p)return;let d=chunk5YHVN3PP_cjs.Dq(a.value,o.min,o.max);d!==void 0&&(a.value=String(d),r.setValue(o.group,o.key,d));}),s.appendChild(a),o.unitKey){let d=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-options-unit");d.textContent=t(o.unitKey),s.appendChild(d);}i.append(ui(e,t,o),s),n.appendChild(i);}function xD(e,t,n,o,r){let i=chunkIQ7MDPEN_cjs.w(e,"div",gi(o)),s=e.createElement("input");s.type="text",s.setAttribute("aria-label",t(o.labelKey)),o.maxLength!==void 0&&(s.maxLength=o.maxLength);let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=xi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(ui(e,t,o),s),n.appendChild(i);}function gD(e,t,n,o,r){o.kind==="toggle"?cD(e,t,n,o,r):o.kind==="select"?mD(e,t,n,o,r):o.kind==="number"?uD(e,t,n,o,r):xD(e,t,n,o,r);}function WA(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-options-section"),a=chunkIQ7MDPEN_cjs.w(e,"h3");if(a.textContent=t(o.titleKey),s.appendChild(a),o.descriptionKey){let l=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");l.textContent=t(o.descriptionKey),s.appendChild(l);}for(let l of o.controls)gD(e,t,s,l,r);o.special&&i&&i(o,s),n.appendChild(s);}function Xe(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-options-action");return r.type="button",r.textContent=n,r.addEventListener("click",o),t.appendChild(r),r}function qA(){return {selectedId:null}}function $A(e,t,n,o,r,i,s){let a=chunkIQ7MDPEN_cjs.w(e,"h4");if(a.textContent=o,n.appendChild(a),r.length===0){let d=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-addins-empty");d.textContent=t("pptx.options.addIns.description"),n.appendChild(d);return}let l=e.createElement("table"),p=e.createElement("tbody");for(let d of r){let u=e.createElement("tr");u.className=i.selectedId===d.id?"is-selected":"";let m=e.createElement("td");m.textContent=t(d.nameKey);let g=e.createElement("td");g.textContent=d.location;let x=e.createElement("td");x.textContent=t(`pptx.options.addInType.${d.type}`),u.append(m,g,x),u.addEventListener("click",()=>{i.selectedId=d.id,s();}),p.appendChild(u);}l.appendChild(p),n.appendChild(l);}function jA(e,t,n,o,r,i){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-addins"),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-addins-head");for(let d of ["name","location","type"]){let u=chunkIQ7MDPEN_cjs.w(e,"span");u.textContent=t(`pptx.options.addIns.${d}`),a.appendChild(u);}s.appendChild(a);let l=chunk5YHVN3PP_cjs.lq(o);$A(e,t,s,t("pptx.options.addIns.active"),l.filter(d=>d.active),r,i),$A(e,t,s,t("pptx.options.addIns.inactive"),l.filter(d=>!d.active),r,i);let p=l.find(d=>d.id===r.selectedId);if(p){let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-addins-detail"),u=chunkIQ7MDPEN_cjs.w(e,"p");u.textContent=t(p.nameKey);let m=chunkIQ7MDPEN_cjs.w(e,"p");m.textContent=t(p.descriptionKey);let g=chunkIQ7MDPEN_cjs.w(e,"p");g.textContent=p.location,d.append(u,m,g),s.appendChild(d);}n.appendChild(s);}function XA(){return {selectedAvailable:null,selectedCurrent:null}}function YA(e,t,n,o,r,i,s){let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-qa-col"),l=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-qa-title");l.textContent=o;let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-qa-list");p.setAttribute("role","listbox"),p.setAttribute("aria-label",o);for(let d of r){let u=chunk5YHVN3PP_cjs.fq.find(g=>g.id===d);if(!u)continue;let m=chunkIQ7MDPEN_cjs.w(e,"button",i===d?"is-selected":"");m.type="button",m.setAttribute("role","option"),m.setAttribute("aria-selected",String(i===d)),m.textContent=t(u.labelKey),m.addEventListener("click",()=>s(d)),p.appendChild(m);}a.append(l,p),n.appendChild(a);}function QA(e,t,n,o,r,i){let s=o.getOptions().quickAccess.commandIds,a=chunk5YHVN3PP_cjs.hq(s).map(b=>b.id),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-qa");YA(e,t,l,t("pptx.options.quickAccess.chooseCommands"),a,r.selectedAvailable,b=>{r.selectedAvailable=b,i();});let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-qa-arrows"),d=Xe(e,p,`${t("pptx.options.quickAccess.add")} \xBB`,()=>{r.selectedAvailable&&(o.setQuickAccessCommands(chunk5YHVN3PP_cjs.iq(s,r.selectedAvailable)),r.selectedAvailable=null);});d.disabled=!r.selectedAvailable;let u=Xe(e,p,`\xAB ${t("pptx.options.quickAccess.remove")}`,()=>{r.selectedCurrent&&(o.setQuickAccessCommands(chunk5YHVN3PP_cjs.jq(s,r.selectedCurrent)),r.selectedCurrent=null);});u.disabled=!r.selectedCurrent,l.appendChild(p),YA(e,t,l,t("pptx.options.quickAccess.currentCommands"),s,r.selectedCurrent,b=>{r.selectedCurrent=b,i();});let m=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-qa-arrows"),g=Xe(e,m,"\u2191",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunk5YHVN3PP_cjs.kq(s,r.selectedCurrent,"up"));});g.setAttribute("aria-label",t("pptx.options.quickAccess.moveUp")),g.disabled=!r.selectedCurrent;let x=Xe(e,m,"\u2193",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunk5YHVN3PP_cjs.kq(s,r.selectedCurrent,"down"));});x.setAttribute("aria-label",t("pptx.options.quickAccess.moveDown")),x.disabled=!r.selectedCurrent,l.appendChild(m),n.appendChild(l),Xe(e,n,t("pptx.options.quickAccess.reset"),()=>{o.setQuickAccessCommands([...chunk5YHVN3PP_cjs.gq]);});}function ZA(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-options-section"),i=chunkIQ7MDPEN_cjs.w(e,"h3");i.textContent=t("pptx.options.ribbon.tabsTitle");let s=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");s.textContent=t("pptx.options.ribbon.tabsDescription"),r.append(i,s);let a=new Set(o.getOptions().ribbon.hiddenTabIds),l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-ribbon-list");for(let p of chunk5YHVN3PP_cjs.bq){let d=p.id==="file",u=chunkIQ7MDPEN_cjs.w(e,"label",`pptxv-parity-check${d?" is-locked":""}`),m=e.createElement("input");m.type="checkbox",m.checked=d||!a.has(p.id),m.disabled=d,m.addEventListener("change",()=>{o.setRibbonTabHidden(p.id,!m.checked);}),u.append(m,e.createTextNode(t(p.labelKey))),l.appendChild(u);}r.appendChild(l),Xe(e,r,t("pptx.options.ribbon.reset"),()=>{o.reset("ribbon");}),n.appendChild(r),Tp(e,t,n);}function Tp(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-options-section"),r=chunkIQ7MDPEN_cjs.w(e,"h3");r.textContent=t("pptx.settings.keyboardShortcuts"),o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-shortcut-list");for(let{actionKey:s,shortcut:a}of chunk5YHVN3PP_cjs.zp){let l=chunkIQ7MDPEN_cjs.w(e,"div"),p=chunkIQ7MDPEN_cjs.w(e,"span");p.textContent=t(s);let d=chunkIQ7MDPEN_cjs.w(e,"kbd");d.textContent=a,l.append(p,d),i.appendChild(l);}o.appendChild(i),n.appendChild(o);}function JA(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"input","pptxv-visually-hidden");r.type="file",r.accept=chunk5YHVN3PP_cjs.so,r.hidden=true;let i=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-options-action");i.type="button",i.textContent=t("pptx.options.general.addFontFile"),i.disabled=!o.enabled,i.addEventListener("click",()=>r.click());let s=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");if(s.setAttribute("role","alert"),s.hidden=true,s.textContent=t("pptx.options.general.customFontError"),r.addEventListener("change",()=>{let p=r.files?.[0];r.value="",p&&(s.hidden=true,chunk5YHVN3PP_cjs.to(p).then(d=>{d?(o.onRegistered(d.family),o.onRefresh()):s.hidden=false;}).catch(()=>{s.hidden=false;}));}),n.append(i,r,s),!o.enabled){let p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsDisabled"),n.appendChild(p);}let a=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");if(a.textContent=t("pptx.options.general.customFontsAdded"),n.appendChild(a),o.families.length===0){let p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsEmpty"),n.appendChild(p);return}let l=chunkIQ7MDPEN_cjs.w(e,"ul","pptxv-options-font-list");for(let p of o.families){let d=chunkIQ7MDPEN_cjs.w(e,"li");d.textContent=p,d.style.fontFamily=p,l.appendChild(d);}n.appendChild(l);}function ek(e,t,n){let{store:o}=n,r=we(e,t,t("pptx.options.title"));r.dialog.classList.add("pptxv-options-dialog");let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-body"),s=chunkIQ7MDPEN_cjs.w(e,"nav","pptxv-options-nav");s.setAttribute("aria-label",t("pptx.options.title"));let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-options-pane");i.append(s,a),r.body.appendChild(i);let l=chunk5YHVN3PP_cjs.nq(o.getOptions()),p=n.customization??chunk5YHVN3PP_cjs.Zq,d=chunk5YHVN3PP_cjs.gr(chunk5YHVN3PP_cjs.Eq,p),u=n.aiEnabled===true&&chunk5YHVN3PP_cjs.fr(p,"ai"),m=n.initialTab??"general",g=false,x=null,b=n.themeOptions.currentKey,v=n.localeOptions.currentCode,f=XA(),S=qA(),y=(I,R)=>{if(I.special==="themePicker")pE(e,R,n.themeOptions.catalog.map(O=>({key:O.key,label:t(O.labelKey),previewColor:O.theme?.colors?.primary??"#6b7280"})),b,O=>{let B=n.themeOptions.catalog.find(F=>F.key===O);B&&(b=O,n.themeOptions.onSelect(B.theme,O),A());});else if(I.special==="clearCache"){let O=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.save.clearCacheDescription"),R.appendChild(O),Xe(e,R,t("pptx.options.save.clearCacheNow"),n.onClearCache);}else I.special==="customFonts"?JA(e,t,R,{enabled:n.store.getOptions().general.enableCustomFontUpload,families:n.customFonts?.list()??[],onRegistered:O=>n.customFonts?.register(O),onRefresh:A}):I.special==="shortcutReference"&&Tp(e,t,R);},h=()=>{let I=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-options-section"),R=chunkIQ7MDPEN_cjs.w(e,"h3");R.textContent=t("pptx.options.language.displayLanguage");let O=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.language.displayLanguageDescription"),I.append(R,O),Br(e,I,"pptxv-options-locale",n.localeOptions.catalog.map(B=>({value:B.code,label:B.nativeLabel})),v,B=>{v=B,n.localeOptions.onSelect(B),D();}),a.appendChild(I);},C=I=>{for(let R of I.sections)WA(e,t,a,R,o,y);},w=()=>{for(let R of s.querySelectorAll("button"))R.classList.remove("is-active"),R.setAttribute("aria-current","false");x?.classList.add("is-active"),x?.setAttribute("aria-current","true"),a.replaceChildren();let I=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-headline");I.textContent=t("pptx.ai.exportLogsHint"),a.append(I,KA({doc:e,t,store:n.aiChatStore}));};function A(){if(g){w();return}let I=d.find(O=>O.id===m)??d[0];if(!I)return;for(let O of s.querySelectorAll("button")){let B=O.getAttribute("data-tab")===I.id;O.classList.toggle("is-active",B),O.setAttribute("aria-current",String(B));}a.replaceChildren();let R=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-options-headline");R.textContent=t(I.descriptionKey),a.appendChild(R),I.custom==="language"?h():I.custom==="ribbon"?ZA(e,t,a,o):I.custom==="addIns"?jA(e,t,a,n.addinStatus,S,A):(C(I),I.custom==="quickAccess"&&QA(e,t,a,o,f,A));}let P=I=>{m=I,g=false,A();},k=()=>{s.replaceChildren(),s.setAttribute("aria-label",t("pptx.options.title"));for(let I of d){let R=ae(e,s,t(I.labelKey),()=>P(I.id));R.dataset.tab=I.id;}x=null,u&&(x=ae(e,s,t("pptx.ai.settingsSectionTitle"),()=>{g=true,A();}),x.dataset.tab="ai");},T=o.subscribe(()=>{if(!r.dialog.isConnected){T();return}A();}),E=ae(e,r.footer,t("pptx.options.resetAll"),()=>{o.reset();}),L=ae(e,r.footer,t("pptx.common.cancel"),()=>{o.setOptions(l),r.close(),T();}),M=ae(e,r.footer,t("pptx.common.ok"),()=>{r.close(),T();},true);function D(){r.heading.textContent=t("pptx.options.title"),k(),E.textContent=t("pptx.options.resetAll"),L.textContent=t("pptx.common.cancel"),M.textContent=t("pptx.common.ok"),A();}D();}function tk(e,t,n,o,r,i=[]){let s=we(e,t,t("pptx.slideShow.setUpTitle")),a={...n},l=S=>{let y=chunkIQ7MDPEN_cjs.w(e,"fieldset"),h=chunkIQ7MDPEN_cjs.w(e,"legend");return h.textContent=S,y.appendChild(h),s.body.appendChild(y),y},p=l(t("pptx.slideShow.showType"));for(let[S,y]of [["presented","pptx.slideShow.presentedBySpeaker"],["browsed","pptx.slideShow.browsedByIndividual"],["kiosk","pptx.slideShow.browsedAtKiosk"]]){let h=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-check"),C=e.createElement("input");C.type="radio",C.name="showType",C.checked=(a.showType??"presented")===S,C.addEventListener("change",()=>{a.showType=S,S==="kiosk"&&(a.loopContinuously=true);}),h.append(C,e.createTextNode(t(y))),p.appendChild(h);}let d=l(t("pptx.slideShow.showSlides")),u=qe(e,d,t("pptx.slideShow.allSlides"),(a.showSlidesMode??"all")==="all");u.type="radio",u.name="range",u.addEventListener("change",()=>{a.showSlidesMode="all";});let m=e.createElement("input");m.type="number",m.min="1",m.max=String(o),m.value=String(a.showSlidesFrom??1);let g=e.createElement("input");g.type="number",g.min="1",g.max=String(o),g.value=String(a.showSlidesTo??o);let x=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-range"),b=e.createElement("input");if(b.type="radio",b.name="range",b.checked=a.showSlidesMode==="range",x.append(b,e.createTextNode(t("pptx.slideShow.from")),m,e.createTextNode(t("pptx.slideShow.to")),g),d.appendChild(x),b.addEventListener("change",()=>{a.showSlidesMode="range";}),i.length>0){let S=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-parity-range"),y=e.createElement("input");y.type="radio",y.name="range",y.dataset.pptxShowSlidesCustom="true",y.checked=a.showSlidesMode==="customShow";let h=e.createElement("select");h.setAttribute("aria-label",t("pptx.slideShow.customShow"));for(let w of i){let A=e.createElement("option");A.value=w.id,A.textContent=w.name,h.appendChild(A);}h.value=a.showSlidesCustomShowId??i[0].id;let C=()=>{a.showSlidesMode="customShow",a.showSlidesCustomShowId=h.value;};y.addEventListener("change",C),h.addEventListener("change",()=>{y.checked&&C();}),S.append(y,e.createTextNode(t("pptx.slideShow.customShow")),h),d.appendChild(S);}let v=l(t("pptx.slideShow.advanceSlides"));for(let[S,y]of [["manual","pptx.slideShow.manually"],["useTimings","pptx.slideShow.useTimings"]]){let h=qe(e,v,t(y),(a.advanceMode??"useTimings")===S);h.type="radio",h.name="advance",h.addEventListener("change",()=>{a.advanceMode=S;});}let f=l(t("pptx.slideShow.showOptions"));for(let[S,y,h]of [["loopContinuously","pptx.slideShow.loopContinuously",false],["showWithNarration","pptx.slideShow.showWithoutNarration",true],["showWithAnimation","pptx.slideShow.showWithoutAnimation",true],["showSubtitles","pptx.slideShow.showSubtitles",false]]){let C=qe(e,f,t(y),h?a[S]===false:!!a[S]);C.addEventListener("change",()=>{a[S]=h?!C.checked:C.checked;});}ae(e,s.footer,t("pptx.common.cancel"),s.close),ae(e,s.footer,t("pptx.common.ok"),()=>{a.showSlidesFrom=Number(m.value),a.showSlidesTo=Number(g.value),r(a),s.close();},true);}function ok(e,t,n,o){t.querySelector("[data-pptx-slide-sorter]")?.remove();let r=chunkIQ7MDPEN_cjs.w(e,"section","pptxv-slide-sorter");r.dataset.pptxSlideSorter="true",r.setAttribute("role","dialog");let i=chunkIQ7MDPEN_cjs.w(e,"header"),s=chunkIQ7MDPEN_cjs.w(e,"h2");s.textContent=n("pptx.slideSorter.title");let a=chunkIQ7MDPEN_cjs.w(e,"span");a.textContent=n("pptx.slideSorter.slideCount",{count:o.slides.length});let l=chunkIQ7MDPEN_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.slideSorter.close")),i.append(s,a,l),r.appendChild(i);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-sorter-grid");o.slides.forEach((m,g)=>{let x=chunkIQ7MDPEN_cjs.w(e,"article","pptxv-sorter-card");x.draggable=true,x.classList.toggle("is-current",g===o.current),x.classList.toggle("is-hidden",!!m.hidden);let b=chunkIQ7MDPEN_cjs.w(e,"button");b.type="button";let v=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-sorter-num");v.textContent=String(g+1),b.appendChild(v),b.setAttribute("aria-label",n("pptx.compare.slideNumber",{number:g+1}));let f=chunk5YHVN3PP_cjs.Rp(m.hidden,"sorter",g);if(f.marker&&f.labelId){x.setAttribute(chunk5YHVN3PP_cjs.Np,f.marker),b.setAttribute("aria-describedby",f.labelId);let y=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-sorter-hidden");y.id=f.labelId,y.textContent=n(chunk5YHVN3PP_cjs.Op),b.appendChild(y);}b.addEventListener("click",()=>{o.onSelect(g),r.remove();});let S=chunkIQ7MDPEN_cjs.w(e,"div");for(let[y,h]of [[n("pptx.slideSorter.contextMenu.duplicate"),()=>o.onDuplicate(g)],[n(m.hidden?"pptx.slideSorter.contextMenu.showSlides":"pptx.slideSorter.contextMenu.hideSlides"),()=>o.onToggleHidden(g)],[n("pptx.slideSorter.contextMenu.delete"),()=>o.onDelete(g)]]){let C=chunkIQ7MDPEN_cjs.w(e,"button");C.type="button",C.textContent=y,C.addEventListener("click",h),S.appendChild(C);}x.addEventListener("dragstart",y=>y.dataTransfer?.setData("text/plain",String(g))),x.addEventListener("dragover",y=>y.preventDefault()),x.addEventListener("drop",y=>{y.preventDefault();let h=Number(y.dataTransfer?.getData("text/plain"));Number.isInteger(h)&&o.onReorder(h,g);}),x.append(b,S),p.appendChild(x);}),r.appendChild(p);let d=()=>{e.removeEventListener("keydown",u),r.remove();},u=m=>{if(!r.isConnected){e.removeEventListener("keydown",u);return}let{action:g}=chunk5YHVN3PP_cjs.Dl(m,{canEdit:o.canEdit!==false,isTextInputTarget:chunk5YHVN3PP_cjs.zl(m.target)});if(g==="close"){m.stopPropagation(),d();return}if(g==="delete"){m.preventDefault(),o.onDelete(o.current);return}g==="duplicate"&&(m.preventDefault(),o.onDuplicate(o.current));};e.addEventListener("keydown",u),l.addEventListener("click",d),t.appendChild(r);}function nk(e){let t=()=>e.store.get(),n=null,o=DA(e),r=FA(e);return {openSettings(i="general"){let s=e.getThemeState(),a=e.getLocaleState(),l=i==="shortcuts"?"ribbon":"general";ek(e.doc,(p,d)=>e.t(p,d),{store:e.optionsStore,initialTab:l,aiEnabled:e.aiEnabled,customization:e.getCustomization?.(),addinStatus:e.getAddinStatus(),onClearCache:()=>e.clearOptionsCache(),themeOptions:{catalog:s.catalog,currentKey:s.key,onSelect:p=>e.setTheme(p)},localeOptions:{catalog:a.catalog,currentCode:a.code,onSelect:p=>e.setLocale(p)},customFonts:{list:()=>t().customFontFamilies,register:p=>e.registerCustomFont(p)}});},openSetUpSlideShow(){let i=t();tk(e.doc,e.t,i.presentationProperties,i.slides.length,s=>{e.editor.updatePresentationProperties(s),e.store.set({activeCustomShowId:chunk5YHVN3PP_cjs.Ip(s,e.store.get().customShows)??null});},i.customShows);},openHeaderFooter(){NA(e.doc,e.t,{value:t().headerFooter,onApply:i=>e.editor.updateHeaderFooter(i)});},openCompare(){bD(e);},openPrintDialog(){_A(e.doc,e.t,t().slides.length,i=>{e.print(i);},chunk5YHVN3PP_cjs.tq(e.optionsStore.getOptions()));},startRehearsal(){UA(e.doc,e.root(),e.t,{slideCount:t().slides.length,currentSlide:()=>t().currentSlide,navigate:e.goToSlide,onSave:i=>e.editor.commitSlides(chunk5YHVN3PP_cjs.dd(t().slides,i))});},openSelectionPane(){r.open();},openSlideSorter(){fD(e);},openReadingView(){let i=t();n?.close(),n=GA(e.doc,e.root(),e.t,{slides:i.slides,canvasSize:i.canvasSize,initialSlideIndex:i.currentSlide,renderStage:(s,a)=>e.renderSlideNode(s,a),onExit:s=>{n=null,e.goToSlide(s);}});},closeReadingView(){n?.close(),n=null;},openOutlineView(){o.open();},closeOutlineView(){o.close();},openComments(){VA(e.doc,e.root(),e.t,{getComments:()=>{let i=t();return i.slides[i.currentSlide]?.comments??[]},getAuthors:()=>{let i=t();return Hr(i.modernCommentAuthors,i.commentAuthors)},subscribe:i=>e.store.subscribe(()=>i())},e.editor.getEditActions().comments);},openHyperlink(){let i=t(),s=i.slides[i.currentSlide]?.elements.find(({id:a})=>a===i.selectedElementId);s&&ni(e.doc,e.t,s,a=>e.editor.applyElementPatch(s.id,a));},openCustomShows(){let i=t();zA(e.doc,e.t,{shows:i.customShows,slides:i.slides,activeShowId:i.activeCustomShowId,onSave:s=>e.editor.updateCustomShows(s),onSetActive:s=>e.store.set({activeCustomShowId:s}),onRun:s=>{let a=t().slides.findIndex(({rId:l})=>s.slideRIds.includes(l));a>=0&&e.goToSlide(a),e.enterPresentation();}});}}}async function bD(e){let t=await chunk5YHVN3PP_cjs.Lj();if(!t)return;let n=await mo(t.buffer,{allowExternalImages:e.optionsStore.getOptions().trust.allowExternalContent});try{let o=chunk5YHVN3PP_cjs.Vh(e.store.get().slides,n.slides);BA(e.doc,e.root(),e.t,{result:o,onAccept:r=>e.editor.commitSlides(chunk5YHVN3PP_cjs.Wh(e.store.get().slides,r)),onAcceptAll:()=>e.editor.commitSlides(chunk5YHVN3PP_cjs.Xh(e.store.get().slides,o))});}finally{mt(n.blobUrls),n.handler.dispose();}}function fD(e){let t=e.store.get();ok(e.doc,e.root(),e.t,{slides:t.slides,current:t.currentSlide,canEdit:t.editable,onSelect:e.goToSlide,onReorder:(n,o)=>vD(e,n,o),onDelete:n=>e.editor.commitSlides(t.slides.filter((o,r)=>r!==n)),onDuplicate:n=>{let o=[...t.slides];o.splice(n+1,0,structuredClone(o[n])),e.editor.commitSlides(o,n+1);},onToggleHidden:n=>e.editor.commitSlides(t.slides.map((o,r)=>r===n?{...o,hidden:!o.hidden}:o))});}function vD(e,t,n){let o=[...e.store.get().slides],[r]=o.splice(t,1);r&&(o.splice(n,0,r),e.editor.commitSlides(o,n));}var hD=2.5,yD=14;function rk(e,t){let n=e.getBoundingClientRect();return {x:Math.min(1,Math.max(0,(t.clientX-n.left)/Math.max(n.width,1))),y:Math.min(1,Math.max(0,(t.clientY-n.top)/Math.max(n.height,1)))}}function ik(e,t){let n=e.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",chunk5YHVN3PP_cjs.nk(t.points)),n.setAttribute("fill","none"),n.setAttribute("stroke",t.color),n.setAttribute("stroke-width",String(t.width)),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("vector-effect","non-scaling-stroke"),n.setAttribute("opacity",t.tool==="highlighter"?"0.4":"1"),n}function Pp(e){let{stageWrap:t,slideIndex:n,tool:o}=e;if(t.querySelector(".pptxv-presentation-annotations")?.remove(),o==="none")return ()=>{};let r=t.ownerDocument,i=r.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("pptxv-presentation-annotations"),i.setAttribute("viewBox","0 0 100 100"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("aria-label","Presentation annotations"),i.setAttribute("data-pptx-annotation-overlay",""),Object.assign(i.style,{position:"absolute",inset:"0",zIndex:String(chunk5YHVN3PP_cjs.Qk(e.blackout)),width:"100%",height:"100%",cursor:chunk5YHVN3PP_cjs.Cr(o),touchAction:"none"});let s=[...e.strokes],a=null,l=null,p=r.createElementNS("http://www.w3.org/2000/svg","circle");p.setAttribute("r","10"),p.setAttribute("fill","#ef4444"),p.setAttribute("vector-effect","non-scaling-stroke"),p.style.filter="drop-shadow(0 0 8px #ef4444)",p.style.display="none";let d=()=>{i.replaceChildren(...s.filter(v=>v.slideIndex===n).map(v=>ik(r,v))),a&&i.append(ik(r,a)),o==="laser"&&i.append(p);},u=v=>{s=v,e.onChange(v),d();},m=v=>{v.preventDefault(),v.stopPropagation();let f=rk(i,v);if(l=v.pointerId,i.setPointerCapture?.(v.pointerId),o==="eraser"){u(chunk5YHVN3PP_cjs.lk(s,n,f));return}(o==="pen"||o==="highlighter")&&(a={id:`presentation-ink-${crypto.randomUUID()}`,slideIndex:n,tool:o,color:o==="highlighter"&&e.color==="#ef4444"?"#fde047":e.color,width:o==="highlighter"?yD:hD,points:[f]},d());},g=v=>{let f=rk(i,v);if(e.onPointerMove?.(f),o==="laser"){p.setAttribute("cx",String(f.x*100)),p.setAttribute("cy",String(f.y*100)),p.style.display="";return}l===v.pointerId&&(o==="eraser"?u(chunk5YHVN3PP_cjs.lk(s,n,f)):a&&(a=chunk5YHVN3PP_cjs.kk(a,f),d()));},x=()=>{l=null,a?.points.length&&a.points.length>1&&u([...s,a]),a=null,d();},b=()=>{p.style.display="none",x();};return i.addEventListener("pointerdown",m),i.addEventListener("pointermove",g),i.addEventListener("pointerup",x),i.addEventListener("pointercancel",x),i.addEventListener("pointerleave",b),t.append(i),d(),()=>i.remove()}function Ap(e,t,n,o){return new Promise(r=>{let i=e.createElement("div");i.className="pptxv-parity-backdrop pptxv-keep-annotations";let s=e.createElement("section");s.className="pptxv-parity-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let a=e.createElement("h2");a.textContent=t("pptx.keepAnnotations.title");let l=e.createElement("div");l.className="pptxv-parity-body",l.textContent=t("pptx.keepAnnotations.description",{count:n,slides:o});let p=e.createElement("footer");p.className="pptxv-parity-footer";let d=e.createElement("button");d.type="button",d.textContent=t("pptx.keepAnnotations.discard");let u=e.createElement("button");u.type="button",u.className="is-primary",u.textContent=t("pptx.keepAnnotations.keep");let m=x=>{e.removeEventListener("keydown",g),i.remove(),r(x);},g=x=>{x.key==="Escape"&&m("discard");};d.addEventListener("click",()=>m("discard")),u.addEventListener("click",()=>m("keep")),e.addEventListener("keydown",g),p.append(d,u),s.append(a,l,p),i.append(s),e.body.append(i),queueMicrotask(()=>u.focus());})}function kp(e){let t=[],n=()=>{},o=null,r=null,i=d=>[String(d.active),String(d.slideIndex),d.pointer?.tool??"none",d.pointer?.color??""].join("|"),s=()=>e.onStrokesChange?.([...t]),a=()=>{n();let d=o,u=d?.pointer?.tool??"none";!d?.active||u==="none"||(n=Pp({stageWrap:d.stageWrap,slideIndex:d.slideIndex,tool:u,color:d.pointer?.color??"#ef4444",blackout:d.blackout,strokes:t,onChange(m){t=m,s();},onPointerMove:e.onPointerMove}));},l=()=>{t=[],s(),a();},p=()=>{let d=e.getSlides(),u=false,m=d.map((g,x)=>{let b=t.filter(v=>v.slideIndex===x&&v.points.length>1).map(v=>chunk5YHVN3PP_cjs.Lm({points:v.points.map(f=>({x:f.x*(o?.canvasSize.width??960),y:f.y*(o?.canvasSize.height??540)})),color:v.color,width:v.width,tool:v.tool})).filter(v=>v!==null);return b.length===0?g:(u=true,{...g,elements:[...g.elements,...b]})});return u&&e.commitSlides(m),u};return {syncStage(d){let u=i(d),m=d.stageWrap.querySelector(".pptxv-presentation-annotations")===null,g=d.stageWrap!==o?.stageWrap||u!==r;o=d,r=u,(g||m)&&a();let x=d.stageWrap.querySelector(".pptxv-presentation-annotations");x&&(x.style.zIndex=String(chunk5YHVN3PP_cjs.Qk(d.blackout)));},getStrokes:()=>t,setStrokes(d){t=[...d],s(),a();},hasAnnotations:()=>t.length>0,clear:l,async finishPresentation(){if(t.length===0)return "none";if(e.shouldPromptKeepAnnotations?.()===false)return l(),"discarded";let d=new Set(t.map(m=>m.slideIndex)).size,u=await Ap(e.doc,e.t,t.length,d);return u==="keep"&&p(),l(),u==="keep"?"kept":"discarded"},dispose(){n(),o=null;}}}function ak(e){let t=kp({doc:e.doc,t:e.t,getSlides:()=>e.store.get().slides,commitSlides:n=>e.editor.commitSlides(n),shouldPromptKeepAnnotations:e.shouldPromptKeepAnnotations,onStrokesChange:n=>e.updateSnapshot({inkStrokes:n}),onPointerMove:({x:n,y:o})=>e.updateSnapshot({pointer:{...e.getSnapshot().pointer??{tool:"laser",color:"#ef4444"},x:n,y:o}})});return {sync(n){let o=e.store.get();t.syncStage({stageWrap:e.getChrome().stageWrap,active:o.presenting&&n.inkMarkupVisible!==false,slideIndex:o.currentSlide,canvasSize:o.canvasSize,pointer:n.pointer,blackout:n.blackout});},clear:()=>t.clear(),finish:()=>t.finishPresentation(),dispose:()=>t.dispose()}}async function sk(e){let t=chunk5YHVN3PP_cjs.Ja.find(({id:s})=>s===e.presetId),n=e.loading.getHandler();if(!t||!n)return false;let o=e.store.get(),r=await n.switchThemePreset({slides:chunk5YHVN3PP_cjs.mo(o.slides,o.templateElementsBySlideId),width:o.canvasSize.width,height:o.canvasSize.height,themeColorMap:o.colorScheme?{...o.colorScheme}:void 0,theme:{colorScheme:o.colorScheme}},t),i=chunk5YHVN3PP_cjs.lo(r.slides);return e.editor.commitSlides(i.slides,o.currentSlide),e.store.set({templateElementsBySlideId:i.templateElementsBySlideId,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.name}),true}function Ip(e){let t=null,n=false,o=()=>{n=false,t?.stop(),t=null;},r=()=>{let i=chunk5YHVN3PP_cjs.Tp();if(!i){e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")});return}t=new i,t.continuous=true,t.interimResults=true,t.lang=e.doc.documentElement.lang||"en-US",t.onresult=s=>e.emit({subtitlesVisible:true,caption:chunk5YHVN3PP_cjs.Sp(s.resultIndex,s.results)}),t.onerror=()=>e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")}),t.onend=()=>{if(n)try{t?.start();}catch{}},t.start();};return {isActive:()=>n,toggle:()=>n?(o(),e.emit({subtitlesVisible:false,caption:void 0}),false):(n=true,e.emit({subtitlesVisible:true,caption:""}),r(),true),dispose:o}}function uo(e,t,n){e.style.width=`${String(Math.round(t.width*n))}px`,e.style.height=`${String(Math.round(t.height*n))}px`,e.style.overflow="hidden",e.style.position="relative";}function Lp(e,t){return e.width>0?t/e.width:1}function lk(e,t,n){return e.width<=0||e.height<=0?1:Math.max(.01,Math.min(t/e.width,n/e.height))}function Mp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-navigator",o.setAttribute("role","dialog"),o.setAttribute("aria-label",n(chunk5YHVN3PP_cjs.Wk.title));let r=t.createElement("header");r.className="pptxv-presenter-navigator-header";let i=t.createElement("h2");i.textContent=n(chunk5YHVN3PP_cjs.Wk.subtitle);let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-navigator-close",s.dataset.pptxPresenterControl="navigator-close";let a=n(chunk5YHVN3PP_cjs.Wk.close);s.setAttribute("aria-label",a),s.title=a,s.textContent=a,s.addEventListener("click",e.close),r.append(i,s);let l=t.createElement("div");return l.className="pptxv-presenter-navigator-grid",e.slides.forEach((p,d)=>{let u=t.createElement("button");u.type="button",u.className="pptxv-presenter-navigator-tile",u.dataset.slideIndex=String(d),d===e.current&&(u.classList.add("is-current"),u.setAttribute("aria-current","true")),p.hidden===true&&(u.style.opacity=String(chunk5YHVN3PP_cjs._k.hiddenSlideOpacity)),u.setAttribute("aria-label",n("pptx.presenter.slideLabel",{current:d+1,total:e.slides.length}));let m=t.createElement("div");m.className="pptxv-presenter-navigator-preview",m.setAttribute("aria-hidden","true"),m.append(e.renderSlide(p,e.tileScale)),uo(m,e.canvas,e.tileScale);let g=t.createElement("span");g.className="pptxv-presenter-navigator-caption",g.textContent=String(d+1),u.append(m,g),u.addEventListener("click",()=>e.select(d)),l.append(u);}),o.append(r,l),o}function pk(e,t,n){let o=e.createElement("div");o.className=n;let r=e.createElement("div");r.className="pptxv-presenter-heading",r.textContent=t;let i=e.createElement("div");return i.className="pptxv-presenter-readout",o.append(r,i),{root:o,value:i}}function Dp(e){let{doc:t,t:n}=e,o=t.createElement("aside");o.className="pptxv-presenter-rail";let r=t.createElement("header");r.className="pptxv-presenter-rail-header";let i=pk(t,n(chunk5YHVN3PP_cjs.Vk.currentTime),"pptxv-presenter-clock"),s=pk(t,n(chunk5YHVN3PP_cjs.Vk.elapsed),"pptxv-presenter-elapsed");r.append(i.root,s.root);let a=t.createElement("nav");a.className="pptxv-presenter-rail-nav";let l=(L,M)=>{let D=t.createElement("button");D.type="button",D.className="pptxv-presenter-nav-btn",D.dataset.pptxPresenterControl=L;let I=n(M);D.setAttribute("aria-label",I),D.title=I;let R=t.createElement("span");R.textContent=I;let O=chunkIQ7MDPEN_cjs.K(t,L==="prev"?"chevron-left":"chevron-right");return D.append(...L==="prev"?[O,R]:[R,O]),D.addEventListener("click",()=>e.move(L==="prev"?-1:1)),D},p=l("prev","pptx.presenter.prev"),d=t.createElement("span");d.className="pptxv-presenter-counter";let u=l("next","pptx.presenter.next");a.append(p,d,u);let m=t.createElement("section");m.className="pptxv-presenter-next",m.dataset.pptxPresenterNextPreview="true";let g=t.createElement("div");g.className="pptxv-presenter-heading",g.textContent=n(chunk5YHVN3PP_cjs.Vk.nextSlidePreview);let x=t.createElement("div");x.className="pptxv-presenter-next-body",m.append(g,x);let b=t.createElement("section");b.className="pptxv-presenter-notes",b.dataset.pptxPresenterNotes="true";let v=t.createElement("div");v.className="pptxv-presenter-notes-header";let f=t.createElement("div");f.className="pptxv-presenter-heading",f.textContent=n(chunk5YHVN3PP_cjs.Vk.speakerNotes);let S=chunk5YHVN3PP_cjs.ck,y=t.createElement("div");y.className="pptxv-presenter-notes-body";let h=t.createElement("span");h.className="pptxv-presenter-notes-size";let C=L=>{S=chunk5YHVN3PP_cjs.dk(S+L),y.style.fontSize=`${String(S)}px`,h.textContent=`${String(S)}px`,A.disabled=S<=chunk5YHVN3PP_cjs.$j,P.disabled=S>=chunk5YHVN3PP_cjs.ak;},w=(L,M,D)=>{let I=t.createElement("button");I.type="button",I.className="pptxv-presenter-notes-btn",I.dataset.pptxPresenterControl=L;let R=n(M);return I.setAttribute("aria-label",R),I.title=R,I.append(chunkIQ7MDPEN_cjs.K(t,D<0?"minus":"plus")),I.addEventListener("click",()=>C(D)),I},A=w("notes-font-decrease","pptx.presenter.decreaseFontSize",-chunk5YHVN3PP_cjs.bk),P=w("notes-font-increase","pptx.presenter.increaseFontSize",chunk5YHVN3PP_cjs.bk),k=t.createElement("div");k.className="pptxv-presenter-notes-controls",k.append(A,h,P),v.append(f,k),b.append(v,y),C(0),o.append(r,a,m,b);let T=L=>{y.replaceChildren();let M=L?.notesSegments;if(M?.length){for(let R of chunk5YHVN3PP_cjs.gk(M)){if(R.kind==="break"){y.append(t.createElement("br"));continue}let O=t.createElement("span");O.textContent=R.text,Object.assign(O.style,R.style),y.append(O);}return}let D=L?.notes?.trim();if(D){y.textContent=D;return}let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunk5YHVN3PP_cjs.Vk.noNotes),y.append(I);};return {root:o,syncClock:(L,M)=>{i.value.textContent=chunk5YHVN3PP_cjs.ek(new Date(L)),s.value.textContent=chunk5YHVN3PP_cjs.fk(M);},syncSlide:()=>{let L=e.getSlides(),M=e.getCurrent();d.textContent=`${String(M+1)} / ${String(L.length)}`,p.disabled=chunk5YHVN3PP_cjs.Yk(M),u.disabled=chunk5YHVN3PP_cjs.Xk(),x.replaceChildren();let D=chunk5YHVN3PP_cjs.Hp(L,M,e.getActiveCustomShow?.(),e.getAuthoredRange?.());if(D){let I=e.previewScale();x.append(e.renderSlide(D,I)),uo(x,e.canvas(),I);}else {x.style.removeProperty("width"),x.style.removeProperty("height");let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunk5YHVN3PP_cjs.Vk.endOfPresentation),x.append(I);}T(L[M]);}}}var SD={"circle-pause":"circle-pause","circle-play":"circle-play","rotate-ccw":"rotate-ccw","grid-2x2":"grid-2x2","zoom-in":"zoom-in","zoom-out":"zoom-out",scan:"scan","mouse-pointer-2":"mouse-pointer-2","pen-tool":"pen",highlighter:"highlighter",eraser:"eraser",captions:"captions",monitor:"monitor","monitor-off":"monitor-off","arrow-left-right":"arrow-left-right",x:"close"},dk={laser:"laser",pen:"pen",highlighter:"highlighter",eraser:"eraser"};function CD(e,t,n){let o=dk[e];if(o)return (t.pointer?.tool??"none")===o;switch(e){case "blackout-black":return t.blackout==="black";case "blackout-white":return t.blackout==="white";case "captions":return t.subtitlesVisible===true;case "audience":return n;default:return false}}function wD(e,t){let n=dk[e];return n?()=>{let r=t.getSnapshot().pointer?.tool??"none";t.setPointerTool(r===n?"none":n);}:{"timer-toggle":t.toggleTimer,"timer-reset":t.resetTimer,"all-slides":t.showAllSlides,"zoom-in":()=>t.stepZoom(1),"zoom-out":()=>t.stepZoom(-1),"zoom-reset":t.resetZoom,"blackout-black":()=>t.setBlackout("black"),"blackout-white":()=>t.setBlackout("white"),captions:t.toggleCaptions,audience:t.toggleAudience,"swap-displays":t.swapDisplays,end:t.end}[e]}function Rp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-strip";let r=[];for(let i of chunk5YHVN3PP_cjs.Uk){if(i.kind==="divider"){let d=t.createElement("span");d.className="pptxv-presenter-strip-divider",d.setAttribute("aria-hidden","true"),o.append(d);continue}if(i.kind==="spacer"){let d=t.createElement("span");d.className="pptxv-presenter-strip-spacer",o.append(d);continue}let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-strip-btn",s.dataset.pptxPresenterControl=i.id;let a=wD(i.id,e);if(a&&s.addEventListener("click",a),i.glyph){let d=t.createElement("span");d.textContent=i.glyph,d.setAttribute("aria-hidden","true"),s.append(d);}let l=t.createElement("span");l.className="pptxv-presenter-strip-icon",l.setAttribute("aria-hidden","true"),s.append(l);let p=()=>{let d=e.getSnapshot(),u=CD(i.id,d,e.isAudienceOpen()),m=d.paused===true,g=i.id==="timer-toggle"?m:u,x=g&&i.activeLabelKey?i.activeLabelKey:i.labelKey,b=x?n(x):"";s.setAttribute("aria-label",b),s.title=b,i.kind==="toggle"&&s.setAttribute("aria-pressed",String(u)),s.classList.toggle("is-active",u);let v=g&&i.activeIcon?i.activeIcon:i.icon;l.replaceChildren();let f=v===void 0?void 0:SD[v];f&&l.append(chunkIQ7MDPEN_cjs.K(t,f));};p(),r.push(p),o.append(s);}return {root:o,sync:()=>{for(let i of r)i();}}}function Op(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter",o.setAttribute("role","region"),o.setAttribute("aria-label",n("pptx.presenter.presenterView"));for(let[h,C]of Object.entries(chunk5YHVN3PP_cjs.$k()))o.style.setProperty(h,C);let r=Rp({...e,showAllSlides:()=>g()}),i=t.createElement("div");i.className="pptxv-presenter-body";let s=t.createElement("div");s.className="pptxv-presenter-main",s.dataset.pptxPresenterSlide="true";let a=t.createElement("div");a.className="pptxv-presenter-main-frame";let l=t.createElement("div");l.className="pptxv-presenter-badge",s.append(a,l),s.addEventListener("click",()=>{chunk5YHVN3PP_cjs._j(e.getSnapshot().pointer?.tool)&&e.move(1);});let p=Dp({doc:t,t:n,getSlides:e.getSlides,getCurrent:e.getCurrent,renderSlide:e.renderSlide,previewScale:()=>Lp(e.canvasSize(),chunk5YHVN3PP_cjs._k.nextPreviewWidth),canvas:e.canvasSize,getActiveCustomShow:e.getActiveCustomShow,getAuthoredRange:e.getAuthoredRange,move:e.move});i.append(s,p.root);let d=t.createElement("div");d.className="pptxv-presenter-progress",d.setAttribute("role","progressbar"),d.setAttribute("aria-valuemin","0"),d.setAttribute("aria-valuemax","100"),d.setAttribute("aria-label",n(chunk5YHVN3PP_cjs.Vk.timerProgress));let u=t.createElement("div");u.className="pptxv-presenter-progress-fill",d.append(u),o.append(r.root,i,d),e.container.append(o);let m=null;function g(){m?.remove(),m=Mp({doc:t,t:n,slides:e.getSlides(),current:e.getCurrent(),renderSlide:e.renderSlide,tileScale:Lp(e.canvasSize(),chunk5YHVN3PP_cjs._k.navigatorTileWidth),canvas:e.canvasSize(),select:h=>{e.navigate(h),x();},close:()=>x()}),o.append(m);}function x(){m?.remove(),m=null;}function b(){let h=e.getSlides(),C=e.getCurrent(),w=h[C];if(a.replaceChildren(),w){let A=v();a.append(e.renderSlide(w,A)),uo(a,e.canvasSize(),A);}else {a.style.removeProperty("width"),a.style.removeProperty("height");let A=t.createElement("div");A.className="pptxv-presenter-empty",A.textContent=n(chunk5YHVN3PP_cjs.Vk.noSlides),a.append(A);}l.textContent=n(chunk5YHVN3PP_cjs.Vk.slideLabel,{current:C+1,total:h.length}),p.syncSlide(),f();}function v(){let h=chunk5YHVN3PP_cjs._k.mainPadding*2;return lk(e.canvasSize(),Math.max(1,s.clientWidth-h),Math.max(1,s.clientHeight-h))}function f(){let h=e.getSnapshot().zoom,C=h?.scale??1;a.style.transform=`scale(${String(C)})`,a.style.transformOrigin=`${String((h?.originX??.5)*100)}% ${String((h?.originY??.5)*100)}%`;}function S(){let h=e.getElapsedMs();p.syncClock(Date.now(),h);let C=chunk5YHVN3PP_cjs.Zk(h);d.setAttribute("aria-valuenow",String(Math.round(C.percent))),d.title=n("pptx.presenter.timerTitle",{elapsed:chunk5YHVN3PP_cjs.fk(h),segment:C.segment+1}),u.style.width=`${String(C.percent)}%`;}b(),S(),r.sync();let y=setInterval(S,1e3);return {syncSlide:b,syncSnapshot:()=>{r.sync(),f();},showAllSlides:()=>g(),dispose:()=>{clearInterval(y),x(),o.remove();}}}function Hp(e,t){e.querySelectorAll(".pptxv-presenter-effect").forEach(r=>r.remove());let n=r=>{let i=e.ownerDocument.createElement("div");return i.className=`pptxv-presenter-effect ${r}`,e.append(i),i};if(t.blackout!=="none"){let r=n("blank");r.setAttribute("data-pptx-blackout",""),Object.assign(r.style,{position:"absolute",inset:"0",zIndex:String(chunk5YHVN3PP_cjs.Pk),background:t.blackout,pointerEvents:"none"});}if(t.pointer?.tool==="laser"){let r=n("laser");Object.assign(r.style,{position:"absolute",zIndex:"76",width:"20px",height:"20px",left:`${t.pointer.x*100}%`,top:`${t.pointer.y*100}%`,transform:"translate(-50%,-50%)",borderRadius:"50%",background:"#ef4444",boxShadow:"0 0 20px 8px #ef444488"});}let o=t.inkStrokes?.filter(r=>r.slideIndex===t.slideIndex);if(o?.length){let r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("pptxv-presenter-effect","ink"),r.setAttribute("viewBox","0 0 1 1"),r.setAttribute("preserveAspectRatio","none"),Object.assign(r.style,{position:"absolute",zIndex:"76",inset:"0",width:"100%",height:"100%",pointerEvents:"none"});for(let i of o){let s=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polyline");s.setAttribute("points",i.points.map(({x:a,y:l})=>`${a},${l}`).join(" ")),s.setAttribute("fill","none"),s.setAttribute("stroke",i.color),s.setAttribute("stroke-width",String(i.width)),s.setAttribute("vector-effect","non-scaling-stroke"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),i.tool==="highlighter"&&s.setAttribute("stroke-opacity",".4"),r.appendChild(s);}e.appendChild(r);}if(t.subtitlesVisible&&t.caption){let r=n("caption");r.textContent=t.caption,Object.assign(r.style,{position:"absolute",zIndex:"77",left:"10%",right:"10%",bottom:"32px",padding:"12px 24px",borderRadius:"8px",background:"#000c",color:"#fff",textAlign:"center",fontSize:"20px"});}}function ck(e,t,n,o,r,i){if(n.length===0)return;let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-comment-markers",{position:"absolute",inset:"0",pointerEvents:"none",zIndex:"45"}),a=chunk5YHVN3PP_cjs.pn(n,o.width,o.height,r("pptx.comments.unknownAuthor"));for(let l of a){let p=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-comment-marker",{position:"absolute",left:`${l.x-chunk5YHVN3PP_cjs.on/2}px`,top:`${l.y-chunk5YHVN3PP_cjs.on/2}px`,width:`${chunk5YHVN3PP_cjs.on}px`,height:`${chunk5YHVN3PP_cjs.on}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"0",pointerEvents:"auto",cursor:"pointer",borderRadius:"50%",background:"rgba(255, 165, 0, 0.9)",border:"2px solid #fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:"#fff"});p.type="button",p.title=l.title,p.textContent=l.label,p.addEventListener("click",d=>{d.stopPropagation(),i?.(l.commentId);}),s.appendChild(p);}t.appendChild(s);}var ED={sldImg:"pptx.master.notesMasterSlideImage",body:"pptx.master.notesMasterBody",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function mk(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-master-page ${t}`);return r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.backgroundColor=o??"#ffffff",r}function uk(e,t,n,o,r){if(!n){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-canvas-empty");return l.dataset.testid="notes-master-empty",l.textContent=t("pptx.master.noNotesMaster"),l}let i=mk(e,"pptxv-notes-master-page",o,n.backgroundColor);i.dataset.testid="notes-master-page";let s=n.placeholders??[{type:"sldImg"},{type:"body"},{type:"hdr"},{type:"ftr"},{type:"dt"},{type:"sldNum"}],a=chunk5YHVN3PP_cjs.rg(n.notesStyle,r);for(let l of s){let p=chunk5YHVN3PP_cjs.dp[l.type];if(!p)continue;let d=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-notes-region is-${l.type}`);d.dataset.region=l.type,d.style.left=`${p.x*o.width}px`,d.style.top=`${p.y*o.height}px`,d.style.width=`${p.w*o.width}px`,d.style.height=`${p.h*o.height}px`,l.type==="body"&&(d.style.fontSize=`${a}px`),d.textContent=t(ED[l.type]??l.type),i.appendChild(d);}return i}var TD=chunk5YHVN3PP_cjs.ep;function xk(e,t,n,o,r){if(!n){let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-master-canvas-empty");return s.dataset.testid="handout-master-empty",s.textContent=t("pptx.master.noHandoutMaster"),s}let i=mk(e,"pptxv-handout-master-page",o,n.backgroundColor);i.dataset.testid="handout-master-page";for(let[s,a]of TD(r).entries()){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-handout-slot");l.dataset.testid="handout-slot",l.style.left=`${a.x*o.width}px`,l.style.top=`${a.y*o.height}px`,l.style.width=`${a.w*o.width}px`,l.style.height=`${a.h*o.height}px`,l.textContent=t("pptx.master.handoutSlideSlot",{number:s+1}),i.appendChild(l);}for(let[s,a]of [["is-top-left","pptx.master.notesMasterHeader"],["is-top-right","pptx.master.notesMasterDate"],["is-bottom-left","pptx.master.notesMasterFooter"],["is-bottom-right","pptx.master.notesMasterPageNumber"]]){let l=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-handout-corner ${s}`);l.textContent=t(a),i.appendChild(l);}return i}var gk={fitPadding:16,maxFitScale:null};function bk(e,t,n,o){let r=o?{fitPadding:0,maxFitScale:null}:n;if(n.fitPadding!==void 0){let{horizontal:i,vertical:s}=chunk5YHVN3PP_cjs.ws(r,gk).fitPadding;e.style.padding=`${s}px ${i}px`;}return chunk5YHVN3PP_cjs.xs({viewportWidth:e.clientWidth,viewportHeight:e.clientHeight,canvasWidth:Math.max(t.width,1),canvasHeight:Math.max(t.height,1),...r},gk).scale}function PD(e){let t=op(e);return t?chunk5YHVN3PP_cjs.kp(tp(e),t):[]}function Fp(e){let{doc:t,store:n,registry:o}=e,r=ss(),i=null,s=null,a=f=>{i=f;},l=(f,S,y=false,h=false,C=n.get().canvasSize)=>{let w=n.get(),A=chunk5YHVN3PP_cjs.ko(f,w.templateElementsBySlideId[f.id]??[]),P=A.length?{...f,elements:[...A,...f.elements]}:f;return chunkIQ7MDPEN_cjs.A({document:t,slide:P,canvasSize:C,mediaDataUrls:w.mediaDataUrls,colorScheme:w.colorScheme,fontScheme:w.fontScheme,tableStyleMap:w.tableStyleMap,fieldContext:ei(w,f),registry:o,t:e.getTranslator(),scale:S,gridSpacingPx:chunk5YHVN3PP_cjs.Ye(w.viewProperties?.gridSpacing,10),smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:y,slides:w.slides,currentSlideIndex:w.currentSlide,onZoomClick:e.onZoomClick,onSmartArtNodeTextChange:h?e.onSmartArtNodeTextChange:void 0,onSmartArtNodeFillChange:h?e.onSmartArtNodeFillChange:void 0,onChartPointChange:h?e.onChartPointChange:void 0,onTableResizeColumns:h?e.onTableResizeColumns:void 0,onTableResizeRow:h?e.onTableResizeRow:void 0,chartPartSelection:w.chartPartSelection,onChartPartSelect:h?e.onChartPartSelect:void 0,selectedElementIds:h?new Set(w.selectedElementIds):void 0,interactive:h,templateEditing:w.editTemplateMode||w.masterViewTarget!==null,presentationStates:y?r.elementStates:void 0,captureContext:y?a:void 0})},p=f=>{i&&s&&chunkIQ7MDPEN_cjs.B(i,s,f);},d=f=>{let S=n.get(),y=e.getChrome().viewport;return bk(y,f,e.getFitOptions?.()??{},S.presenting)},u=f=>{let S=n.get();return S.zoom!=="fit"?S.zoom:d(f)},m=()=>u(n.get().canvasSize),g=()=>d(n.get().canvasSize),x=()=>{let f=n.get().canvasSize;return u(f)/d(f)*100},b=()=>{let f=e.getChrome(),S=n.get(),y=S.masterViewTarget,h=y?chunk5YHVN3PP_cjs.fp({slideMasters:S.slideMasters},{tab:"slides",masterIndex:y.masterIndex,layoutIndex:y.layoutIndex}):S.slides[S.currentSlide],C=y&&S.masterViewTab!=="slides",w=C?S.masterViewTab==="notes"?S.notesCanvasSize??chunk5YHVN3PP_cjs.cp:chunk5YHVN3PP_cjs.cp:S.canvasSize,A=C||!!h;f.setEmpty(!A);let P=u(w);f.stageWrap.style.width=`${w.width*P}px`,f.stageWrap.style.height=`${w.height*P}px`;let k=A&&S.editable&&!S.presenting&&!S.loading?Array.from(f.stageWrap.children).find(L=>L.classList.contains("pptxv-editor-overlay")&&L.querySelector("[data-inline-editor]")):void 0;if(k)for(let L of Array.from(f.stageWrap.childNodes))L!==k&&L.remove();else f.stageWrap.replaceChildren();let T=null;if(C){let L=S.masterViewTab==="notes"?S.notesMaster:S.handoutMaster;if(L?.elements?.length)T=l({id:L.path,rId:"",slideNumber:0,elements:L.elements,backgroundColor:L.backgroundColor,backgroundImage:L.backgroundImage},P,false,true,w),T.dataset.testid=S.masterViewTab==="notes"?"notes-master-page":"handout-master-page";else {let M={width:w.width*P,height:w.height*P};T=S.masterViewTab==="notes"?uk(t,e.getTranslator(),S.notesMaster,M,P):xk(t,e.getTranslator(),S.handoutMaster,M,S.handoutSlidesPerPage);}}else h&&(T=l(h,P,S.presenting,true,w),S.editable&&!S.presenting&&ck(t,T,h.comments??[],w,e.getTranslator(),e.onCommentMarkerClick));T&&h&&f.stageWrap.insertBefore(T,k??null);let E=P/d(w)*100;f.ribbon?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:E}),f.statusBar?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:E}),f.presentationTouchControls.update(S.currentSlide,S.slides.length),f.mobileActionSheets?.setThumbnailRenderer((L,M)=>l(L,M),S.canvasSize.width,S.canvasSize.height),f.mobileActionSheets?.update(S.currentSlide,S.slides,h?.comments??[]),f.notes.update({slide:C?void 0:h,editable:S.editable,notesStyle:S.notesMaster?.notesStyle}),e.onStageRendered?.(),T?(s=T,r.syncStage({doc:t,stageWrap:f.stageWrap,stage:T,slide:h,slideIndex:S.currentSlide,presenting:S.presenting,showWithAnimation:S.presentationProperties.showWithAnimation,mediaDataUrls:S.mediaDataUrls,reRenderElements:p,seedCompleted:S.enteringBackward===true,canvasSize:S.canvasSize,themeColorMap:S.colorScheme?chunk5YHVN3PP_cjs.P(S.colorScheme):void 0,pixelateMosaicAnimation:e.getPixelateMosaicAnimation()})):(s=null,i=null,r.reset());},v=()=>{let f=n.get(),S=e.getChrome().thumbnails;f.masterViewTarget?(S?.setVisible(false),e.getChrome().masterSidebar.setVisible(true),e.getChrome().masterSidebar.render({tab:f.masterViewTab,masters:f.slideMasters,active:f.masterViewTarget,canvasSize:f.canvasSize,notesBackground:f.notesMaster?.backgroundColor,notesPlaceholders:f.notesMaster?.placeholders,notesMasterPresent:!!f.notesMaster,handoutBackground:f.handoutMaster?.backgroundColor,handoutPlaceholders:f.handoutMaster?.placeholders,handoutMasterPresent:!!f.handoutMaster,handoutSlidesPerPage:f.handoutSlidesPerPage,editable:f.editable,crudActions:PD(f),onCrudAction:e.onMasterCrudAction,renderStage:l,onSelect:(y,h)=>{n.set({masterViewTarget:{masterIndex:y,layoutIndex:h},selectedElementId:null,selectedElementIds:[]});},onTabChange:y=>{n.set({masterViewTab:y,selectedElementId:null,selectedElementIds:[]});},onCollapse:()=>{n.set({masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false,selectedElementId:null,selectedElementIds:[]});},onHandoutSlidesPerPageChange:y=>{e.onHandoutSlidesPerPageChange(y);},onMasterBackgroundColorChange:e.onMasterBackgroundColorChange})):(e.getChrome().masterSidebar.setVisible(false),S?.setVisible(true),S?.render(f.slides,f.canvasSize,l,f.sections,f.editable?{toggle:e.onSectionToggle,rename:e.onSectionRename,delete:e.onSectionDelete,move:e.onSectionMove}:void 0));};return {renderAll(){let f=e.getChrome(),S=n.get();f.setLoading(S.loading),f.setError(S.error),f.setPresenting(S.presenting),v(),b(),f.thumbnails?.setActive(S.currentSlide),f.notes.setExpanded(S.notesExpanded),f.ribbon?.setNotesExpanded(S.notesExpanded),f.mobileActionSheets?.setNotesExpanded(S.notesExpanded),f.ribbon?.setTemplateEditing(S.editTemplateMode),f.ribbon?.setViewOptions(S);},renderStage:b,renderThumbnails:v,renderSlideNode:(f,S)=>l(f,S),effectiveScale:m,fitScale:g,zoomPercent:x,presentationPlayback:r}}function fk(e){let t=fl(e.doc,e.onCreateGuide),n=i=>{if(i.selectedElementIds.length!==1)return null;let s=U(i).find(a=>a.id===i.selectedElementIds[0]);return s?{x:s.x,y:s.y,width:s.width,height:s.height}:null},o=()=>{let i=e.getStageWrap();if(!i)return;t.mount(i);let s=e.store.get();t.update({visible:s.showRulers&&!s.presenting,canvasSize:s.canvasSize,scale:e.getScale(),unit:e.getUnit?.()??"inches",selection:n(s),draggable:s.editable&&!s.presenting});},r=e.store.subscribe(o);return {sync:o,destroy(){r(),t.destroy();}}}var AD={active:true};function bi(e){let{store:t}=e,n="idle",o=null,r=false,i=false,s=false,a=null,l=()=>(e.getActivation?.()??AD).active,p=l(),d=f=>{n=f,e.onStatus?.(f);},u=()=>{o!==null&&(clearTimeout(o),o=null);};async function m(){let f=e.getHandler();if(!(i||!l()||r||!f||!t.get().dirty)){r=true,d("saving");try{let S=await chunk5YHVN3PP_cjs.tp(f,t.get().slides,void 0,chunk5YHVN3PP_cjs.sp(e.getSaveIntent?.()));await chunk5YHVN3PP_cjs.Fj(e.filePath,S),a=null,!i&&l()&&d("saved");}catch{!i&&l()&&d("error");}finally{r=false;}}}let g=()=>{if(!l())return;let f=Date.now();a??=f;let S=chunk5YHVN3PP_cjs.Qo({intervalMs:e.getIntervalMs(),firstDirtyAt:a,now:f});u(),o=setTimeout(()=>{o=null,m();},S);},x=f=>{i||!chunk5YHVN3PP_cjs.Ro({alreadyChecked:s,filePath:e.filePath,loading:f.loading,error:f.error,slideCount:f.slides.length,autosaveAllowed:e.isRecoveryAllowed?.()??true})||(s=true,chunk5YHVN3PP_cjs.To(e.filePath,Date.now(),e.fileName).then(S=>(S&&!i&&(e.onRecovery?.(S.record),e.onRecoveryOffer?.(S)),S)));},b=()=>{let f=l();f===p||i||(p=f,u(),d("idle"),f&&(a=null,t.get().dirty&&g()));},v=t.subscribe((f,S)=>{b(),f.loading&&!S.loading&&(s=false),f.dirty&&(f.dirty!==S.dirty||f.slides!==S.slides)?g():!f.dirty&&S.dirty&&!r&&d("saved"),x(f);});return x(t.get()),{saveNow:m,getStatus:()=>n,refresh:b,isEnabled:l,destroy(){i=true,u(),v();}}}function Vp(e,t,n,o){return new Promise(r=>{let i=false,s=false,a=t(n.titleKey),l=e.createElement("div");l.className="pptxv-parity-backdrop pptxv-autosave-recovery";let p=e.createElement("section");p.className="pptxv-parity-dialog",p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),p.setAttribute("aria-label",a),p.setAttribute("data-pptx-autosave-recovery","true");let d=e.createElement("header");d.className="pptxv-parity-header";let u=e.createElement("h2");u.textContent=a,d.append(u);let m=e.createElement("div");m.className="pptxv-parity-body";let g=e.createElement("p");g.className="pptxv-autosave-recovery-message",g.textContent=t(n.messageKey,n.messageParams);let x=e.createElement("p");x.className="pptxv-autosave-recovery-age",x.textContent=t("pptx.autosave.recovery.savedLabel",{when:t(n.ageKey,n.ageParams)}),m.append(g,x);let b=e.createElement("footer");b.className="pptxv-parity-footer";let v=e.createElement("button");v.type="button",v.textContent=t(n.discardKey),v.setAttribute("aria-label",t(n.discardKey));let f=e.createElement("button");f.type="button",f.className="is-primary",f.textContent=t(n.restoreKey),f.setAttribute("aria-label",t(n.restoreKey)),b.append(v,f);let S=h=>{s||(s=true,e.removeEventListener("keydown",y),l.remove(),r(h));},y=h=>{h.key==="Escape"&&!i&&S("dismiss");};v.addEventListener("click",()=>{i||(i=true,p.setAttribute("aria-busy","true"),v.disabled=true,f.disabled=true,(async()=>{try{await o?.(),S("discard");}catch{i=false,p.removeAttribute("aria-busy"),v.disabled=false,f.disabled=false;}})());}),f.addEventListener("click",()=>{i||S("restore");}),e.addEventListener("keydown",y),p.append(d,m,b),l.append(p),e.body.append(l),queueMicrotask(()=>f.focus());})}function Bp(e){let t=e.hostAutosave??true,n,o=()=>chunk5YHVN3PP_cjs.Oo({hostAutosave:e.hostAutosave,userEnabled:t,canEdit:e.store.get().editable,filePath:e.filePath}),r=null,i=false,s=async d=>{i=true;try{if(await Vp(e.doc,e.getTranslator(),d.prompt,()=>chunk5YHVN3PP_cjs.Vo(d.record))==="restore"){chunk5YHVN3PP_cjs.Aj(d.record);try{await e.loadFile(chunk5YHVN3PP_cjs.Uo(d.record));}catch(m){throw chunk5YHVN3PP_cjs.Bj(d.record),m}}}finally{i=false;}},a=()=>{let d=r;!d||i||!chunk5YHVN3PP_cjs.So({prompt:d.prompt,presenting:e.store.get().presenting})||(r=null,s(d).catch(()=>{}));},l=e.store.subscribe((d,u)=>{u.presenting&&!d.presenting&&a();}),p=bi({store:e.store,getHandler:e.getHandler,filePath:e.filePath,fileName:e.fileName,getIntervalMs:()=>chunk5YHVN3PP_cjs.Po({hostIntervalMs:e.hostIntervalMs,optionsIntervalSeconds:n}),getSaveIntent:e.getSaveIntent,onStatus:e.onStatus,getActivation:o,isRecoveryAllowed:()=>e.hostAutosave!==false,onRecovery:e.onRecovery,onRecoveryOffer:d=>{r=d,a();}});return {saveNow:()=>p.saveNow(),isEnabled:()=>p.isEnabled(),isPreferred:()=>o().toggleAvailable&&t,getActivation:o,setEnabled(d){return !o().toggleAvailable||t===d?false:(t=d,p.refresh(),true)},setOptionsIntervalMs(d){n=typeof d=="number"&&Number.isFinite(d)?d/1e3:void 0;},destroy:()=>{l(),p.destroy();}}}var kD="Presenter";function vk(e,t){return {...e,userName:t?.trim()||kD,role:"owner"}}function wt(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-field"),i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-modal-label");i.textContent=t,r.appendChild(i);let s=e.createElement("input");return s.type="text",s.className="pptxv-modal-input",s.placeholder=n,s.addEventListener("input",()=>o(s.value)),r.appendChild(s),{el:r,input:s}}function fi(e,t,n,o){let r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-field"),i=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-modal-label");i.textContent=n,r.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-link-row");r.appendChild(s);let a=e.createElement("input");a.type="text",a.className="pptxv-modal-input",a.readOnly=true,a.addEventListener("focus",()=>a.select()),s.appendChild(a);let l=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-btn");return l.type="button",l.textContent=t("pptx.broadcast.copyLinkBtn"),l.addEventListener("click",o),s.appendChild(l),{el:r,input:a,setValue(p){a.value=p;},setCopied(p){l.textContent=t(p?"pptx.share.copied":"pptx.broadcast.copyLinkBtn");}}}function vi(e,t,n){let o=false,r,i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-backdrop");i.hidden=true,i.addEventListener("pointerdown",x=>{x.target===i&&n.onClose();});let s=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-panel");s.tabIndex=-1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.addEventListener("pointerdown",x=>x.stopPropagation()),i.appendChild(s);let a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-header");s.appendChild(a);let l=chunkIQ7MDPEN_cjs.w(e,"h2","pptxv-modal-title");a.appendChild(l);let p=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),p.addEventListener("click",()=>n.onClose()),a.appendChild(p);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-body");s.appendChild(d);let u=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-footer");s.appendChild(u);function m(x){l.textContent=x,s.setAttribute("aria-label",x);}m(n.title);function g(){let x=n.themeHost?.(),b=x?.ownerDocument.defaultView;if(!x||!b)return;let v=b.getComputedStyle(x);for(let f of Object.keys(chunk5YHVN3PP_cjs.Fa())){let S=v.getPropertyValue(f).trim();S&&i.style.setProperty(f,S);}}return {el:i,bodyEl:d,footerEl:u,setTitle(x){m(x);},setOpen(x){x!==o&&(o=x,i.hidden=!x,x?(g(),r=chunk5YHVN3PP_cjs.Gm(s,{onEscape:n.onClose})):(r?.(),r=void 0));},destroy(){r?.(),i.remove();}}}var ID=2e3;function hk(e,t,n,o){let r=chunk5YHVN3PP_cjs.Pj(),i=false,s=null,a=vi(e,t,{title:t("pptx.broadcast.startTitle"),onClose:()=>a.setOpen(false),themeHost:o});e.body.appendChild(a.el);let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-section"),p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-desc");p.textContent=t("pptx.broadcast.idleDesc"),l.appendChild(p);let d=wt(e,t("pptx.broadcast.roomId"),t("pptx.broadcast.roomIdPlaceholder"),A=>{r={...r,roomId:A},w();});l.appendChild(d.el);let u=wt(e,t("pptx.broadcast.serverUrl"),t("pptx.broadcast.serverUrlPlaceholder"),A=>{r={...r,serverUrl:A},w();}),m=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");m.textContent=t("pptx.broadcast.p2pHint"),u.el.appendChild(m),l.appendChild(u.el);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-section"),x=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.broadcast.liveDesc"),g.appendChild(x);let b=fi(e,t,t("pptx.broadcast.viewerLink"),()=>{C();});g.appendChild(b.el);let v=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");v.textContent=t("pptx.broadcast.viewerHint"),g.appendChild(v);let f=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");f.textContent=t("pptx.broadcast.p2pServerValue"),g.appendChild(f);let S=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-danger-btn");S.type="button",S.textContent=t("pptx.broadcast.stopBroadcast"),S.addEventListener("click",()=>n.onStop()),g.appendChild(S),a.bodyEl.append(l,g);let y=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-btn");y.type="button",y.textContent=t("pptx.common.close"),y.addEventListener("click",()=>a.setOpen(false)),a.footerEl.appendChild(y);let h=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");h.type="button",h.textContent=t("pptx.broadcast.startBroadcast"),h.addEventListener("click",()=>{let A=chunk5YHVN3PP_cjs.Rj(r);A&&n.onStart(A);}),a.footerEl.appendChild(h);async function C(){chunk5YHVN3PP_cjs.Tj(typeof navigator>"u"?void 0:navigator)&&(await navigator.clipboard.writeText(b.input.value),b.setCopied(true),s!==null&&clearTimeout(s),s=setTimeout(()=>b.setCopied(false),ID));}function w(){a.setTitle(t(i?"pptx.broadcast.broadcastingTitle":"pptx.broadcast.startTitle")),l.hidden=i,g.hidden=!i,h.hidden=i,h.disabled=!chunk5YHVN3PP_cjs.Qj(r),m.hidden=chunk5YHVN3PP_cjs.Oj(r.serverUrl)!=="webrtc",d.input.value=r.roomId,u.input.value=r.serverUrl;}return w(),{el:a.el,open(A,P,k){i=P,i||(r=chunk5YHVN3PP_cjs.Pj(A)),b.setValue(k),b.setCopied(false),w(),a.setOpen(true);},close(){a.setOpen(false);},setActive(A,P){i=A,b.setValue(P),w();},destroy(){s!==null&&clearTimeout(s),a.destroy();}}}var LD="M0 0 L0 16 L4.5 12.5 L8 20 L10.5 19 L7 11.5 L12 11 Z";function xo(e){let t=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-collab-cursors");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-collab-cursor");i.dataset.clientId=String(r),i.dataset.pptxRemoteCursor=String(r);let s=chunkIQ7MDPEN_cjs.x(e,"svg",{width:20,height:22,viewBox:"0 0 20 22",focusable:"false"});s.setAttribute("class","pptxv-collab-pointer");let a=chunkIQ7MDPEN_cjs.x(e,"path",{d:LD,stroke:"#ffffff","stroke-width":1});s.appendChild(a),i.appendChild(s);let l=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-collab-label");return i.appendChild(l),t.appendChild(i),{root:i,path:a,label:l}}return {el:t,update(r,i){let s=new Set;for(let a of r){s.add(a.clientId);let l=n.get(a.clientId);l||(l=o(a.clientId),n.set(a.clientId,l)),l.root.style.transform=`translate(${a.x*i}px, ${a.y*i}px)`,chunkIQ7MDPEN_cjs.y(l.path,{fill:a.color}),l.label.textContent=chunk5YHVN3PP_cjs.xh(a.userName),l.label.style.backgroundColor=a.color;}for(let[a,l]of n)s.has(a)||(l.root.remove(),n.delete(a));},destroy(){t.remove();}}}var yk={connected:"pptx.collaboration.status.connected",connecting:"pptx.collaboration.status.connecting",disconnected:"pptx.collaboration.status.disconnected",error:"pptx.collaboration.status.error"};function Sk(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-collab-status");o.hidden=true,o.setAttribute("role","status"),o.setAttribute("data-testid","collaboration-status");let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-collab-status-dot");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-collab-status-text");o.appendChild(i);let s=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-collab-status-retry");return s.type="button",s.textContent=t("pptx.collaboration.retry"),s.hidden=true,s.addEventListener("click",n),o.appendChild(s),{el:o,update(a,l){o.hidden=a==="disconnected",r.className=`pptxv-collab-status-dot is-${a}`,i.textContent=a==="connected"?l===1?t("pptx.collaboration.onePersonHere"):t("pptx.collaboration.peopleHere",{count:l}):t(yk[a]),s.hidden=a!=="error",o.setAttribute("aria-label",t("pptx.collaboration.statusAriaLabel",{status:t(yk[a]),count:l}));},destroy(){o.remove();}}}var MD=2;function DD(e){let t=e.trim().split(/\s+/u);return t.length>=2&&t[0]&&t[t.length-1]?(t[0][0]+t[t.length-1][0]).toUpperCase():e.slice(0,MD).toUpperCase()||"?"}function Ck(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-follow-bar");o.dataset.exportIgnore="true",o.hidden=true;let r=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-follow-status");o.appendChild(r);let i=chunkIQ7MDPEN_cjs.w(e,"ul","pptxv-follow-list");o.appendChild(i);let s=new Map;function a(p){if(r.replaceChildren(),!p){r.textContent=t("pptx.followMode.followCollaborator");return}r.append(`${t("pptx.followMode.following")} `);let d=chunkIQ7MDPEN_cjs.w(e,"strong");d.textContent=p.userName,r.appendChild(d),r.append(" ");let u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-follow-stop");u.type="button",u.textContent=t("pptx.followMode.stop"),u.title=t("pptx.followMode.stopFollowing"),u.addEventListener("click",()=>n.onFollow(null)),r.appendChild(u);}function l(p){let d=s.get(p.clientId);if(d)return d;let u=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-follow-peer");u.type="button",u.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-follow-avatar")),u.appendChild(chunkIQ7MDPEN_cjs.w(e,"span","pptxv-follow-name"));let m=chunkIQ7MDPEN_cjs.w(e,"li");return m.appendChild(u),i.appendChild(m),s.set(p.clientId,u),u}return {el:o,update(p,d){if(o.hidden=p.length===0,o.hidden)return;let u=p.find(g=>g.clientId===d)??null;a(u);let m=new Set;for(let g of p){m.add(g.clientId);let x=l(g),b=x.firstElementChild,v=x.lastElementChild;b.textContent=DD(g.userName),b.style.backgroundColor=g.userColor,v.textContent=g.userName;let f=g.clientId===d;x.classList.toggle("is-following",f),x.setAttribute("aria-pressed",String(f)),x.title=f?t("pptx.followMode.stopFollowingUser",{name:g.userName}):t("pptx.followMode.followUser",{name:g.userName}),x.onclick=()=>n.onFollow(f?null:g.clientId);}for(let[g,x]of s)m.has(g)||(x.closest("li")?.remove(),s.delete(g));},destroy(){o.remove();}}}var RD=20;function hi(e){let t=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-remote-selections");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-remote-selection");i.dataset.selectionKey=r;let s=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-remote-selection-label");return i.appendChild(s),t.appendChild(i),{root:i,label:s}}return {el:t,update(r,i,s,a){let l=new Map;for(let d of i)l.set(d.id,d);let p=new Set;for(let d of r){if(d.activeSlideIndex!==s||!d.selectedElementId)continue;let u=l.get(d.selectedElementId);if(!u)continue;let m=`${d.clientId}-${u.id}`;p.add(m);let g=n.get(m);g||(g=o(m),n.set(m,g)),g.root.dataset.pptxRemoteSelection=u.id,g.root.style.transform=`translate(${u.x*a}px, ${u.y*a}px)`,g.root.style.width=`${u.width*a}px`,g.root.style.height=`${u.height*a}px`,g.root.style.borderColor=d.userColor,g.label.textContent=chunk5YHVN3PP_cjs.xh(d.userName,RD),g.label.style.backgroundColor=d.userColor;}for(let[d,u]of n)p.has(d)||(u.root.remove(),n.delete(d));},destroy(){t.remove();}}}function wk(e,t,n,o,r){let i=chunk5YHVN3PP_cjs.Xj(),s=false,a="create",l="",p={status:"disconnected",connectedCount:0,config:null,remoteUsers:[]},d=false,u,m=vi(e,t,{title:t("pptx.toolbar.share"),onClose:()=>m.setOpen(false),themeHost:o});e.body.appendChild(m.el);let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-section"),x=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.share.formDescription");let b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-share-tabs");b.setAttribute("role","tablist");let v=chunkIQ7MDPEN_cjs.w(e,"button");v.type="button",v.textContent=t("pptx.share.createSession");let f=chunkIQ7MDPEN_cjs.w(e,"button");f.type="button",f.textContent=t("pptx.share.joinSession"),b.append(v,f),g.append(b,x);let S=wt(e,t("pptx.share.invitationLabel"),t("pptx.share.invitationPlaceholder"),G=>{l=G,ie();});g.appendChild(S.el);let y=wt(e,t("pptx.share.roomId"),t("pptx.share.roomIdPlaceholder"),G=>{i={...i,roomId:G},ie();});g.appendChild(y.el);let h=wt(e,t("pptx.share.yourName"),t("pptx.share.yourNamePlaceholder"),G=>{i={...i,userName:G},ie();});g.appendChild(h.el);let C=wt(e,t("pptx.share.serverUrl"),t("pptx.share.serverPlaceholder"),G=>{i={...i,serverUrl:G},ie();}),w=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");w.textContent=t("pptx.share.p2pHint"),C.el.appendChild(w),g.appendChild(C.el);let A=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-section"),P=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-share-status-row"),k=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-collab-status-dot");P.appendChild(k);let T=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-share-status-text");P.appendChild(T);let E=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-share-count");P.appendChild(E),A.appendChild(P);let L=fi(e,t,t("pptx.share.shareLink"),()=>{L.input.value&&e.defaultView?.navigator.clipboard.writeText(L.input.value).then(()=>{d=true,L.setCopied(true),clearTimeout(u),u=setTimeout(()=>{d=false,L.setCopied(false);},2e3);});});A.appendChild(L.el);let M=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");M.textContent=t("pptx.share.shareHint"),A.appendChild(M);let D=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-share-details"),I=chunkIQ7MDPEN_cjs.w(e,"span");D.appendChild(I);let R=chunkIQ7MDPEN_cjs.w(e,"span");D.appendChild(R),A.appendChild(D);let O=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-modal-hint");O.textContent=t("pptx.share.p2pServerValue"),A.appendChild(O);let B=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-modal-field"),F=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-modal-label");F.textContent=t("pptx.share.connectedUsers"),B.appendChild(F);let V=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-share-users-list");B.appendChild(V),A.appendChild(B);let _=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-danger-btn");_.type="button",_.textContent=t("pptx.share.stopSharing"),_.addEventListener("click",()=>n.onStop()),A.appendChild(_),m.bodyEl.append(g,A);let N=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-btn");N.type="button",N.addEventListener("click",()=>m.setOpen(false)),m.footerEl.appendChild(N);let W=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");W.type="button",W.textContent=t("pptx.share.startSharing"),W.addEventListener("click",()=>{let G=a==="join"?chunk5YHVN3PP_cjs.Uj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):chunk5YHVN3PP_cjs.Zj(i);G&&n.onStart(G);}),m.footerEl.appendChild(W);function X(){let G=p.config,K=chunk5YHVN3PP_cjs.Oj(G?.serverUrl??"")==="webrtc";k.className=`pptxv-collab-status-dot is-${p.status}`,T.textContent=p.status,E.textContent=t("pptx.collaboration.userCount",{count:p.connectedCount});let j=G?chunk5YHVN3PP_cjs.Wj(G,e.defaultView?{origin:e.defaultView.location.origin,pathname:e.defaultView.location.pathname}:void 0):"";L.el.hidden=!j,M.hidden=!j,L.setValue(j),L.setCopied(d),D.hidden=!G,G&&(I.replaceChildren(`${t("pptx.share.room")} `,Object.assign(e.createElement("code"),{textContent:G.roomId})),R.replaceChildren(`${t("pptx.share.server")} `,Object.assign(e.createElement("code"),{textContent:K?t("pptx.share.p2pServerValue"):G.serverUrl}))),O.hidden=!!G||!K;let Y=G?chunk5YHVN3PP_cjs.Jh({localUserName:G.userName,localUserInitials:r?.(),localUserColor:G.userColor,remoteUsers:p.remoteUsers}):[];B.hidden=Y.length===0,V.replaceChildren(...Y.map(ue=>{let Te=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-share-user"),Me=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-share-user-avatar");if(Me.style.backgroundColor=ue.color,ue.avatarUrl){let ne=e.createElement("img");ne.src=ue.avatarUrl,ne.alt="",Me.appendChild(ne);}else Me.textContent=ue.initials;Te.appendChild(Me);let Xo=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-share-user-name");Xo.textContent=ue.name,Te.appendChild(Xo);let Tt=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-share-user-tag");return Tt.textContent=ue.isLocal?t("pptx.share.you"):t("pptx.notes.slideN",{n:ue.slideNumber??1}),Te.appendChild(Tt),Te}));}function ie(){m.setTitle(t(s?"pptx.share.collaborationActive":"pptx.toolbar.share")),g.hidden=s,A.hidden=!s,W.hidden=s,N.textContent=t(s?"pptx.share.close":"pptx.share.cancel"),v.setAttribute("aria-selected",String(a==="create")),f.setAttribute("aria-selected",String(a==="join")),x.textContent=t(a==="join"?"pptx.share.joinDescription":"pptx.share.formDescription"),S.el.hidden=a!=="join",y.el.hidden=a==="join",W.textContent=t(a==="join"?"pptx.share.joinSession":"pptx.share.startSharing"),W.disabled=a==="join"?!chunk5YHVN3PP_cjs.Vj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):!chunk5YHVN3PP_cjs.Yj(i),w.hidden=chunk5YHVN3PP_cjs.Oj(i.serverUrl)!=="webrtc",y.input.value=i.roomId,h.input.value=i.userName,C.input.value=i.serverUrl,S.input.value=l,X();}return v.addEventListener("click",()=>{a="create",ie();}),f.addEventListener("click",()=>{a="join",ie();}),ie(),{el:m.el,open(G,K){s=K,s||(i=chunk5YHVN3PP_cjs.Xj(G),l=""),ie(),m.setOpen(true);},close(){m.setOpen(false);},setActive(G){s=G,ie();},updateSession(G){p=G,X();},destroy(){clearTimeout(u),m.destroy();}}}function Ek(e){let{doc:t}=e,n=e.getTranslator(),o=e.getChrome(),r="",i="";function s(){if(!r)return "";let E=t.defaultView?.location;return chunk5YHVN3PP_cjs.Sj(r,i,E?{origin:E.origin,pathname:E.pathname}:void 0)}let a=()=>e.getChrome().root,l=wk(t,n,{onStart:E=>{e.startCollaboration(E).then(()=>l.setActive(true));},onStop:()=>{e.stopCollaboration(),l.setActive(false),l.close();}},a,e.getUserInitials),p=hk(t,n,{onStart:E=>{r=E.roomId,i=E.serverUrl;let L=vk(E,e.shareDefaults?.userName);e.startCollaboration(L).then(()=>p.setActive(true,s()));},onStop:()=>{e.stopCollaboration(),r="",i="",p.setActive(false,""),p.close();}},a),d=Sk(t,n,()=>{let E=e.getConfig();E&&e.startCollaboration(E);}),u=null,m=null,g=()=>{l.open(e.shareDefaults,e.getStatus()!=="disconnected");},x=()=>{p.open({roomId:r,serverUrl:i},e.getStatus()!=="disconnected",s());},b=!chunk5YHVN3PP_cjs.cq("share",e.hiddenActions),v=o.ribbon?.el.querySelector(".pptxv-ribbon-primary")??null,f=o.ribbon?.el.querySelector(".pptxv-tabrow-actions")??null;if(v){if(b){if(u=chunkIQ7MDPEN_cjs.w(t,"button",f?"pptxv-tabrow-share":"pptxv-btn"),u.type="button",u.title=n("pptx.toolbar.share"),u.setAttribute("aria-label",n("pptx.toolbar.share")),u.appendChild(chunkIQ7MDPEN_cjs.K(t,"share")),f){let E=chunkIQ7MDPEN_cjs.w(t,"span");E.textContent=n("pptx.toolbar.share"),u.appendChild(E);}u.addEventListener("click",g),(f??v).appendChild(u);}e.showCollaborationStatus!==false&&v.appendChild(d.el);}let S=o.mobileToolbar?.collaborationHost??null;S&&b&&(m=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-mobile-toolbar-btn pptxv-mobile-share"),m.type="button",m.title=n("pptx.toolbar.share"),m.setAttribute("aria-label",n("pptx.toolbar.share")),m.appendChild(chunkIQ7MDPEN_cjs.K(t,"share")),m.addEventListener("click",g),S.appendChild(m));let y=xo(t),h=hi(t),C=Ck(t,n,{onFollow:E=>e.followUser(E)});function w(){let E=e.getChrome(),L=E.stageWrap;h.el.parentElement!==L&&L.appendChild(h.el),y.el.parentElement!==L&&L.appendChild(y.el),C.el.parentElement!==E.root&&E.root.appendChild(C.el);}function A(E){return e.getStatus()==="disconnected"?0:E.remotePresences.length+1}function P(E){return {status:e.getStatus(),connectedCount:A(E),config:e.getConfig(),remoteUsers:E.remotePresences}}function k(E){w(),y.update(E.cursors,e.getScale()),h.update(E.remotePresences,E.slides[E.currentSlide]?.elements??[],E.currentSlide,e.getScale()),C.update(E.remotePresences,E.followedClientId),d.update(e.getStatus(),A(E)),l.updateSession(P(E));}k(e.store.get());let T=e.store.subscribe((E,L)=>{(E.cursors!==L.cursors||E.remotePresences!==L.remotePresences||E.followedClientId!==L.followedClientId||E.currentSlide!==L.currentSlide||E.slides!==L.slides||E.zoom!==L.zoom)&&k(E);});return {onStatusChange(E){k(e.store.get()),E==="disconnected"&&(l.setActive(false),p.setActive(false,""));},openShare:g,openBroadcast:x,destroy(){T(),u?.remove(),m?.remove(),d.destroy(),y.destroy(),h.destroy(),C.destroy(),l.destroy(),p.destroy();}}}function Tk(e){let{provider:t,transport:n}=e,o=null;function r(){o!==null&&(clearTimeout(o),o=null);}function i(){e.isActive()&&(e.setStatus("disconnected"),e.reArmGate());}return n==="webrtc"?(e.setStatus("connected"),t.onStatus(s=>{s?e.setStatus("connected"):i();}),{cancelConnectTimer:r}):(t.onStatus(s=>{s?(r(),e.setStatus("connected")):i();}),t.connectedNow?e.setStatus("connected"):o=setTimeout(()=>{o=null,e.onConnectTimeout();},chunk5YHVN3PP_cjs.sh),{cancelConnectTimer:r})}function Pk(e){let t=false,n=null;return {isReadOnly:()=>t,setReadOnly(o){o!==t&&(t=o,e.onReadOnlyChange?e.onReadOnlyChange(o):o?(n=e.store.get().editable,e.setEditable(false)):n!==null&&(e.setEditable(n),n=null));}}}function Ak(e,t,n){let o=chunk5YHVN3PP_cjs.Gh(e,{gate:n.gate,factories:n.factories,livePatcher:n.livePatcher,role:t.role,sessionIntent:t.sessionIntent,adoptSlides:n.adoptSlides,onStatus:n.setStatus,onReadOnlyChange:n.setReadOnly,onSuspend:n.cancelWriteBack,onReady:({seedEmptyRoom:r})=>{r&&n.resetBaseline(),n.flushLocal();}});return {contentLoaded(r){!o.handleLoad(r)&&o.canWrite()&&n.flushLocal();},dispose:o}}var OD=1e5;function kk(e){return e!==void 0&&e>0?e:OD}function Ik(e,t,n,o){let r=chunk5YHVN3PP_cjs.Hh(t,n),i=t.clientID??-1,s=0,a=chunk5YHVN3PP_cjs.Ih();function l(){let{width:d,height:u}=o(),{list:m,cursors:g,changed:x}=a.project(t.getStates(),i,kk(d),kk(u),s);if(!x)return;let b=e.get().followedClientId;e.set({remotePresences:m,cursors:g,followedClientId:b!==null&&!m.some(v=>v.clientId===b)?null:b});}t.on("change",l),t.on("update",l);let p=setInterval(()=>r.flush(),chunk5YHVN3PP_cjs.th);return l(),{setCursor(d,u,m=s){s=m,r.update({cursorX:d,cursorY:u,activeSlideIndex:m});},setSelection(d,u=s){s=u,r.update({selectedElementId:d,activeSlideIndex:u});},setActiveSlide(d){s=Math.max(0,Math.floor(d)),r.update({activeSlideIndex:s}),l();},followUser(d){e.set({followedClientId:d});},destroy(){clearInterval(p),t.off?.("change",l),t.off?.("update",l),r.dispose(),e.set({remotePresences:[],cursors:[],followedClientId:null});}}}async function zp(e,t,n){if(e==="webrtc"){let{WebrtcProvider:s}=await import('y-webrtc'),a=new s(t.roomId,n,{signaling:t.signaling?.length?t.signaling:void 0,password:t.authToken||void 0}),l=chunk5YHVN3PP_cjs.Th(t.roomId,a.awareness);return {awareness:a.awareness,onStatus:p=>a.on("status",d=>p(!!d.connected)),connectedNow:true,onSynced:p=>a.on("synced",d=>{d?.synced!==false&&p();}),syncedNow:false,destroy:()=>{l.announce(),l.dispose(),chunk5YHVN3PP_cjs.Sh(a.awareness),a.destroy();}}}let{WebsocketProvider:o}=await import('y-websocket'),r=new o(t.serverUrl,t.roomId,n,{params:t.authToken?{token:t.authToken}:void 0}),i=chunk5YHVN3PP_cjs.Th(t.roomId,r.awareness);return {awareness:r.awareness,onStatus:s=>r.on("status",a=>{a.status==="connected"?s(true):a.status==="disconnected"&&s(false);}),connectedNow:r.wsconnected,onSynced:s=>r.on("sync",a=>{a&&s();}),syncedNow:r.synced,destroy:()=>{i.announce(),i.dispose(),chunk5YHVN3PP_cjs.Sh(r.awareness),r.disconnect(),r.destroy();}}}async function Lk(e,t){let n=await import('yjs'),o=e.externalSession?.doc??new n.Doc,r={createMap:()=>new n.Map,createArray:()=>new n.Array,createText:()=>new n.Text,createTextPositions:i=>chunk5YHVN3PP_cjs.Oh(i,{read:()=>n.snapshot(o),equal:n.equalSnapshots,subscribeBeforeObservers:s=>(o.on("beforeObserverCalls",s),()=>o.off("beforeObserverCalls",s))})};if(e.externalSession){let i=chunk5YHVN3PP_cjs.Ah(e.externalSession.awareness);return {doc:e.externalSession.doc,factories:r,awareness:i.awareness,dispose:i.dispose}}try{let i=await zp(t,e,o);return {doc:o,factories:r,awareness:i.awareness,provider:i,dispose(){i.destroy(),o.destroy();}}}catch(i){throw o.destroy(),i}}function Mk(e,t){let n="",o=false;function r(l,p,d,u){if(!l||!p||o||u)return;let m=e.get().slides,g=JSON.stringify(m);g!==n&&(n=g,chunk5YHVN3PP_cjs.Fh(m,l,p),d&&t(d));}function i(l,p,d=false){if(!l)return false;let u=chunk5YHVN3PP_cjs.Ch(l);return u.length===0&&!d?false:(s(u,p),true)}function s(l,p){n=JSON.stringify(l),o=true;try{e.set({slides:l,currentSlide:Vt(e.get().currentSlide,l.length)});}finally{o=false;}t(p);}function a(){n="",o=false;}return {flushLocalSlides:r,applyRemoteSlides:i,adoptSlides:s,isApplyingRemote:()=>o,reset:a}}function Dk(e){return chunk5YHVN3PP_cjs.Uh({getYDoc:e.getYDoc,serialize:()=>{let t=e.getYDoc(),n=e.getHandler();return !t||!n?null:n.save(chunk5YHVN3PP_cjs.Ch(t),e.getSaveOptions?.())}})}function Bt(e){let{store:t}=e,n="disconnected",o=false,r=null,i=0,s=null,a=null,l=null,p=null,d=Pk(e),u=null,m=null,g=null,x=null,b=false,v=chunk5YHVN3PP_cjs.Kh();function f(E){E!==n&&(n=E,e.onStatusChange?.(E));}let S=Dk({getYDoc:()=>a,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions}),y=Mk(t,E=>{(!E.externalSession||C.isOpen())&&S.schedule(E);});function h(){y.flushLocalSlides(a,l,u,d.isReadOnly());}let C=chunk5YHVN3PP_cjs.Ph(h);async function w(E){k();let L=i;u=E;try{chunk5YHVN3PP_cjs.vh(E.roomId);}catch{f("error");return}let M=E.transport??chunk5YHVN3PP_cjs.Oj(E.serverUrl);if(!E.externalSession&&M==="websocket"&&chunk5YHVN3PP_cjs.wh(E.serverUrl)){f("error");return}f("connecting"),d.setReadOnly(!!E.externalSession||E.role==="viewer");try{let D=await Lk(E,M);if(L!==i){D.dispose();return}if(r=D,a=D.doc,l=D.factories,p=Ik(t,D.awareness,{userName:E.userName,userColor:E.userColor??chunk5YHVN3PP_cjs.uh,userAvatar:E.userAvatar,role:E.role},()=>({width:t.get().canvasSize.width,height:t.get().canvasSize.height})),E.externalSession||(m=chunk5YHVN3PP_cjs.Dh(a,(I,R)=>{R?.origin===chunk5YHVN3PP_cjs.Eh||y.isApplyingRemote()||y.applyRemoteSlides(a,E);})),g=t.subscribe((I,R)=>{I.slides!==R.slides&&!b&&C.isOpen()&&h();}),o=!0,E.externalSession)s=Ak(E.externalSession,E,{factories:D.factories,livePatcher:v,gate:C,setStatus:f,setReadOnly:d.setReadOnly,flushLocal:h,resetBaseline:y.reset,cancelWriteBack:S.cancel,adoptSlides:I=>y.adoptSlides(I,E)});else if(D.provider){let I=D.provider;v.configure(d.isReadOnly()?null:a,d.isReadOnly()?null:l),I.onSynced(()=>C.open()),I.syncedNow?C.open():C.arm(),x=Tk({provider:I,transport:M,setStatus:f,isActive:()=>o,reArmGate:()=>{C.reset(),C.arm();},onConnectTimeout:()=>{n!=="connected"&&(k(),f("error"));}});}}catch{L===i&&(k(),f("error"));}}function A(E){b=true;}function P(E){let L=b;if(b=false,!(!o||!a||!u)){if(s){s.contentLoaded(E);return}chunk5YHVN3PP_cjs.Qh(E,chunk5YHVN3PP_cjs.Ch(a).length)&&y.applyRemoteSlides(a,u)||L&&C.isOpen()&&h();}}function k(){i+=1,s?.dispose(),s=null,x?.cancelConnectTimer(),x=null,b=false,S.cancel(),C.reset(),y.reset(),m?.(),m=null,g?.(),g=null,p?.destroy(),p=null,r?.dispose(),r=null,a=null,l=null,v.configure(null,null),o=false,d.setReadOnly(false),f("disconnected");}let T=chunk5YHVN3PP_cjs.Rh({leaveOnBeforeUnload:()=>!u?.externalSession,leave:k,rejoin:()=>{u&&w(u);}});return {start:w,stop:k,isActive:()=>o,isReadOnly:d.isReadOnly,getStatus:()=>n,setCursor:(E,L,M)=>p?.setCursor(E,L,M),setSelection:(E,L)=>p?.setSelection(E,L),setActiveSlide:E=>p?.setActiveSlide(E),followUser:E=>p?.followUser(E??null),getConfig:()=>u,beginContentLoad:A,notifyContentLoaded:P,livePatcher:v,destroy:()=>{T(),k();}}}var HD="presentation.pptx";function FD(e,t){switch(e){case "saving":return t("pptx.autosave.saving");case "saved":return t("pptx.autosave.savedShort");case "error":return t("pptx.autosave.saveFailed");default:return ""}}function Rk(e){let{options:t}=e,n=Bp({doc:e.doc,store:e.store,getHandler:e.getHandler,getTranslator:e.getTranslator,hostAutosave:t.autosave,hostIntervalMs:t.autosaveIntervalMs,filePath:t.autosaveFilePath??HD,fileName:t.fileName,getSaveIntent:()=>({password:e.store.get().presentationPassword,passwordProtected:e.store.get().isPasswordProtected}),onStatus:l=>{e.getChrome().ribbon?.setAutosaveStatus(FD(l,e.getTranslator()),l),e.getChrome().titleBar?.setAutosaveState(l),t.onAutosaveStatus?.(l);},onRecovery:l=>t.onAutosaveRecovery?.(l),loadFile:l=>e.loadFile(l)}),o=null,r=Bt({store:e.store,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:e.setEditable,onReadOnlyChange:e.onCollaborationReadOnlyChange,onStatusChange:l=>{t.onCollaborationStatus?.(l),o?.(l);}});t.collaboration&&r.start(t.collaboration);let i=e.store.subscribe((l,p)=>{if(r.isActive()&&(l.currentSlide!==p.currentSlide&&r.setActiveSlide(l.currentSlide),l.selectedElementId!==p.selectedElementId&&r.setSelection(l.selectedElementId??void 0,l.currentSlide),l.followedClientId!==null&&l.remotePresences!==p.remotePresences)){let d=l.remotePresences.find(u=>u.clientId===l.followedClientId);d&&d.activeSlideIndex!==l.currentSlide&&e.goToSlide(d.activeSlideIndex);}}),s=()=>Ek({doc:e.doc,store:e.store,getChrome:e.getChrome,getTranslator:e.getTranslator,getScale:e.getScale,startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),getStatus:()=>r.getStatus(),getConfig:()=>r.getConfig(),followUser:l=>r.followUser(l),shareDefaults:t.shareDefaults,hiddenActions:e.getHiddenActions?e.getHiddenActions():t.hiddenActions,showCollaborationStatus:e.isShareAvailable?.()??true,getUserInitials:e.getUserInitials}),a=s();return o=l=>a.onStatusChange(l),{startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),isCollaborationReadOnly:()=>r.isReadOnly(),getCollaborationStatus:()=>r.getStatus(),getCollaborationLivePatcher:()=>r.livePatcher,setCollaborationCursor:(l,p)=>r.setCursor(l,p,e.store.get().currentSlide),publishCollaborationInlineText:(l,p)=>{let d=e.store.get();chunk5YHVN3PP_cjs.Lh(r.livePatcher,d.slides[d.currentSlide],l,p);},flushCollaborationLivePatch:()=>r.livePatcher.flush(),followCollaborationUser:l=>r.followUser(l),beginCollaborationContentLoad:l=>r.beginContentLoad(l),notifyCollaborationContentLoaded:l=>r.notifyContentLoaded(l),autosaveNow:()=>n.saveNow(),setAutosaveEnabled(l){n.setEnabled(l)&&t.onToggleAutosave?.(l);},isAutosaveEnabled:()=>n.isEnabled(),isAutosavePreferred:()=>n.isPreferred(),getAutosaveActivation:()=>n.getActivation(),setAutosaveIntervalMs:l=>n.setOptionsIntervalMs(l),openBroadcast:()=>a.openBroadcast(),openShare:()=>a.openShare(),remountUi(){a.destroy(),a=s(),a.onStatusChange(r.getStatus());},destroy(){i(),a.destroy(),r.destroy(),n.destroy();}}}function Ok(e,t,n){if(e===t)return false;let o=new Set(e),r=new Set(t);return n.some(i=>i.type==="chart"&&o.has(i.id)!==r.has(i.id))}function Np(e){let{renderer:t,callbacks:n}=e;return (o,r)=>{let i=e.getChrome();o.loading!==r.loading&&i.setLoading(o.loading),o.error!==r.error&&i.setError(o.error),o.presenting!==r.presenting&&(i.setPresenting(o.presenting),i.statusBar?.setPresenting(o.presenting),n.onPresentationChange?.(o.presenting)),((o.slides!==r.slides||o.sections!==r.sections||o.canvasSize!==r.canvasSize||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||o.outlineFontsTick!==r.outlineFontsTick)&&!o.interactionActive||r.interactionActive&&!o.interactionActive)&&t.renderThumbnails(),(o.slides!==r.slides||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom||o.canvasSize!==r.canvasSize||o.presenting!==r.presenting||o.editTemplateMode!==r.editTemplateMode||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||Ok(r.selectedElementIds,o.selectedElementIds,U(o)))&&t.renderStage(),o.currentSlide!==r.currentSlide&&(i.thumbnails?.setActive(o.currentSlide),n.onSlideChange?.(o.currentSlide)),(o.slides!==r.slides||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom)&&(i.statusBar?.update({current:o.currentSlide,total:o.slides.length,zoomPercent:t.zoomPercent()}),i.presentationTouchControls.update(o.currentSlide,o.slides.length),i.presentationToolbar.update({current:o.currentSlide,total:o.slides.length}),i.mobileActionSheets?.update(o.currentSlide,o.slides,o.slides[o.currentSlide]?.comments??[])),o.zoom!==r.zoom&&n.onZoomChange?.(t.effectiveScale()),o.selectedElementId!==r.selectedElementId&&n.onSelectionChange?.(o.selectedElementId),o.dirty!==r.dirty&&(i.statusBar?.setDirty(o.dirty),i.titleBar?.setDirty(o.dirty),n.onDirtyChange?.(o.dirty)),o.editable!==r.editable&&(i.root.classList.toggle("pptxv-editable",o.editable),i.notes.update({slide:o.slides[o.currentSlide],editable:o.editable,notesStyle:o.notesMaster?.notesStyle}),i.mobileActionSheets?.setEditable(o.editable)),o.protectedView!==r.protectedView&&i.setProtectedView(o.protectedView),(o.readOnlyRecommendation!==r.readOnlyRecommendation||o.readOnlyBannerDismissed!==r.readOnlyBannerDismissed||o.readOnlyPasswordPromptOpen!==r.readOnlyPasswordPromptOpen||o.readOnlyPasswordError!==r.readOnlyPasswordError||o.readOnlyCheckingPassword!==r.readOnlyCheckingPassword)&&i.setReadOnlyRecommendation(o.readOnlyRecommendation,o.readOnlyBannerDismissed,{promptOpen:o.readOnlyPasswordPromptOpen,error:o.readOnlyPasswordError,checking:o.readOnlyCheckingPassword}),(o.compatToasts!==r.compatToasts||o.inspectorOpen!==r.inspectorOpen)&&i.setCompatToasts(o.compatToasts,o.inspectorOpen?chunk5YHVN3PP_cjs.Io:0),o.runProgramNotices!==r.runProgramNotices&&i.setRunProgramNotices(o.runProgramNotices),o.notesExpanded!==r.notesExpanded&&(i.notes.setExpanded(o.notesExpanded),i.ribbon?.setNotesExpanded(o.notesExpanded),i.statusBar?.setNotesExpanded(o.notesExpanded),i.mobileActionSheets?.setNotesExpanded(o.notesExpanded)),o.editTemplateMode!==r.editTemplateMode&&i.ribbon?.setTemplateEditing(o.editTemplateMode),(o.showGrid!==r.showGrid||o.showRulers!==r.showRulers||o.showGuides!==r.showGuides||o.snapToGrid!==r.snapToGrid||o.snapToShape!==r.snapToShape)&&i.ribbon?.setViewOptions(o),o.hasMacros!==r.hasMacros&&i.ribbon?.setHasMacros(o.hasMacros),o.presentationProperties.showSubtitles!==r.presentationProperties.showSubtitles&&i.ribbon?.setSubtitlesVisible(!!o.presentationProperties.showSubtitles),(o.currentSlide!==r.currentSlide||o.slides[o.currentSlide]?.hidden!==r.slides[r.currentSlide]?.hidden)&&i.ribbon?.setHideSlideActive(!!o.slides[o.currentSlide]?.hidden);}}var Hk=`
4
+ `),h.textContent=T?.metadata?`${T.metadata.duration??0}s, ${T.metadata.videoWidth??0} x ${T.metadata.videoHeight??0}, ${T.metadata.codecInfo??T.mediaMimeType??""}`:T?.mediaMimeType??"";for(let L of [...C,x,b,v,f])L.setDisabled(!k.isMedia);S.control.disabled=!k.isMedia,y.control.disabled=!k.isMedia;}}}function aE(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 sE(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function we(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunkQPYQDJ2Q_cjs.w(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 s=chunkQPYQDJ2Q_cjs.w(e,"header","pptxv-parity-header"),a=chunkQPYQDJ2Q_cjs.w(e,"h2");a.id=i,a.textContent=n;let l=chunkQPYQDJ2Q_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.common.close")),s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-parity-body"),d=chunkQPYQDJ2Q_cjs.w(e,"footer","pptxv-parity-footer");r.append(s,p,d),e.body.append(o,r);let u=()=>{e.removeEventListener("keydown",m),o.remove(),r.remove();},m=g=>{g.key==="Escape"&&u();};return e.addEventListener("keydown",m),o.addEventListener("click",u),l.addEventListener("click",u),queueMicrotask(()=>l.focus()),{backdrop:o,dialog:r,heading:a,body:p,footer:d,close:u}}function ae(e,t,n,o,r=false){let i=chunkQPYQDJ2Q_cjs.w(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function qe(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(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 Br(e,t,n,o,r,i){for(let s of o){let a=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-check"),l=e.createElement("input");l.type="radio",l.name=n,l.value=s.value,l.checked=s.value===r,l.addEventListener("change",()=>{l.checked&&i(s.value);}),a.append(l,e.createTextNode(s.label)),t.appendChild(a);}}function pE(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-parity-swatch-row");for(let s of n){let a=e.createElement("button");a.type="button",a.className="pptxv-parity-swatch",a.classList.toggle("is-active",s.key===o);let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-parity-swatch-preview");l.style.background=s.previewColor;let p=e.createElement("span");p.textContent=s.label,a.append(l,p),a.addEventListener("click",()=>r(s.key)),i.appendChild(a);}t.appendChild(i);}function zr(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-ole-edit-empty");return n.textContent=t,n}function dE(e,t,n,o){if(!n||n.rows.length===0)return zr(e,t("pptx.ole.editDialog.emptySheet"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-edit-table-wrap"),i=chunkQPYQDJ2Q_cjs.w(e,"table","pptxv-ole-edit-table"),s=e.createElement("tbody");return n.rows.forEach((a,l)=>{let p=e.createElement("tr");a.cells.forEach((d,u)=>{let m=e.createElement("td"),g=e.createElement("input");g.type="text",g.value=d.value,g.setAttribute("aria-label",t("pptx.ole.editDialog.cellEditLabel")),g.addEventListener("keydown",x=>x.stopPropagation()),g.addEventListener("blur",()=>{g.value!==d.value&&o(l,u,g.value);}),m.appendChild(g),p.appendChild(m);}),s.appendChild(p);}),i.appendChild(s),r.appendChild(i),r}function cE(e,t,n,o){if(!n||n.length===0)return zr(e,t("pptx.ole.editDialog.emptyDocument"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-edit-paragraphs");return n.forEach((i,s)=>{let a=e.createElement("textarea");a.rows=2,a.value=i,a.addEventListener("keydown",l=>l.stopPropagation()),a.addEventListener("blur",()=>{a.value!==i&&o(s,a.value);}),r.appendChild(a);}),r}function mE(e,t,n,o){if(!n||n.length===0)return zr(e,t("pptx.ole.editDialog.deckEmpty"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-edit-deck");for(let i of n){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-edit-deck-slide"),a=e.createElement("span");a.className="pptxv-ole-edit-deck-caption",a.textContent=t("pptx.ole.editDialog.deckSlideLabel",{number:i.index+1}),s.appendChild(a),i.elements.length===0&&s.appendChild(zr(e,t("pptx.ole.editDialog.deckEmpty")));for(let l of i.elements){let p=e.createElement("input");p.type="text",p.value=l.text,p.addEventListener("keydown",d=>d.stopPropagation()),p.addEventListener("blur",()=>{p.value!==l.text&&o(i.index,l.elementId,p.value);}),s.appendChild(p);}r.appendChild(s);}return r}function uE(e,t,n,o){let r=chunkYOEVEUFZ_cjs.Wf(n),i=we(e,t,t(r.titleKey));i.dialog.classList.add("pptxv-ole-edit-dialog");let s=n,a=y=>{s=y,y.oleContentDirty&&o.onUpdateElement(chunkYOEVEUFZ_cjs.Xf(y));},l=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-ole-edit-loading");l.textContent=t("pptx.ole.editDialog.loading");let p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-ole-edit-error");p.textContent=t("pptx.ole.editDialog.saveError"),p.hidden=true;let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-edit-content");i.body.append(l,p,d);let u=()=>i.dialog.isConnected,m=()=>{u()&&(p.hidden=false);},g=y=>{u()&&d.replaceChildren(dE(e,t,y,(h,C,w)=>{(async()=>{try{let A=await chunkYOEVEUFZ_cjs.y(s,{row:h,col:C,value:w});a(A);let P=await chunkYOEVEUFZ_cjs.u(A);g(P);}catch{m();}})();}));},x=y=>{u()&&d.replaceChildren(cE(e,t,y,(h,C)=>{(async()=>{try{let w=await chunkYOEVEUFZ_cjs.z(s,h,C);a(w);let A=await chunkYOEVEUFZ_cjs.v(w);x(A);}catch{m();}})();}));},b=y=>{u()&&d.replaceChildren(mE(e,t,y,(h,C,w)=>{(async()=>{try{let A=await chunkYOEVEUFZ_cjs.x(s,h,C,w);a(A);let P=await chunkYOEVEUFZ_cjs.w(A);b(P);}catch{m();}})();}));},v=()=>{let y=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-ole-edit-empty");y.textContent=t("pptx.ole.editDialog.unsupported"),d.replaceChildren(y);};(async()=>{let y=r.contentTab?.kind;try{y==="sheet"?g(await chunkYOEVEUFZ_cjs.u(n)):y==="document"?x(await chunkYOEVEUFZ_cjs.v(n)):y==="deck"?b(await chunkYOEVEUFZ_cjs.w(n)):v();}catch{m();}finally{l.hidden=true;}})();let S=e.createElement("input");S.type="file",S.hidden=true,S.addEventListener("change",()=>{let y=S.files?.[0];S.value="",y&&(async()=>{try{let h=new Uint8Array(await y.arrayBuffer()),C=await chunkYOEVEUFZ_cjs.A(s,h,y.name);a(C),i.close();}catch{m();}})();}),i.footer.appendChild(S),ae(e,i.footer,t("pptx.ole.editDialog.replaceFile"),()=>S.click()),ae(e,i.footer,t("pptx.ole.editDialog.save"),()=>i.close(),true);}function xE(e,t,n,o){let r=n(t("pptx.ole.title"));r.classList.add("pptxv-ole-info");let i,s=e.createElement("button");s.type="button",s.textContent=t("pptx.ole.editContent"),s.addEventListener("click",()=>{i&&uE(e,t,i,{onUpdateElement:x=>o.setOleContent(x)});}),r.appendChild(s);let a=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-ole-name"),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.ole.objectName");let p=e.createElement("input");p.type="text",p.placeholder=t("pptx.ole.objectNamePlaceholder"),p.setAttribute("aria-label",t("pptx.ole.objectName")),p.addEventListener("keydown",x=>x.stopPropagation()),p.addEventListener("change",()=>o.setOleName(p.value)),a.append(l,p),r.appendChild(a);let d=x=>{let b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ole-row"),v=chunkQPYQDJ2Q_cjs.w(e,"span");v.textContent=x;let f=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-ole-value");return b.append(v,f),r.appendChild(b),{row:b,value:f}},u=d(t("pptx.ole.type")),m=d(t("pptx.ole.fileName")),g=d(t("pptx.ole.linkStatus"));return g.value.classList.add("pptxv-ole-badge"),{el:r,update(x){r.hidden=!x.isOle,x.isOle&&(i=x.oleElement,s.hidden=x.isLocked||x.oleIsLinked,e.activeElement!==p&&(p.value=x.oleName??""),u.value.textContent=chunkYOEVEUFZ_cjs.t(x.oleObjectType),m.row.hidden=!x.oleFileName,m.value.textContent=x.oleFileName??"",m.value.title=x.oleFileName??"",g.value.textContent=t(x.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),g.value.classList.toggle("is-linked",x.oleIsLinked));}}}function gE(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize"));i.setAttribute("data-pptx-inspector-section","transform");let s=i.querySelector(".pptxv-inspector-section-title"),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-lock-row");s?(i.insertBefore(a,s),a.appendChild(s)):i.insertBefore(a,i.firstChild);let l=H(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});a.appendChild(l.btn);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-grid");i.appendChild(p);let d=(f,S,y)=>{let h=re(e,{label:f,min:y,onCommit:C=>o({[S]:C})});return p.appendChild(h.el),h},u=d(t("pptx.arrange.x"),"x"),m=d(t("pptx.arrange.y"),"y"),g=d(t("pptx.arrange.width"),"width",1),x=d(t("pptx.arrange.height"),"height",1),b=d(t("pptx.arrange.rotation"),"rotation"),v=[u,m,g,x,b];return {el:i,update(f){i.hidden=!f.hasSelection,u.setValue(f.x),m.setValue(f.y),g.setValue(f.width),x.setValue(f.height),b.setValue(f.rotation);for(let y of v)y.setDisabled(!f.hasSelection);l.setActive(f.isLocked),l.setDisabled(!f.hasSelection);let S=t(f.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");l.btn.title=S,l.btn.setAttribute("aria-label",S),l.btn.replaceChildren(chunkQPYQDJ2Q_cjs.K(e,f.isLocked?"lock":"lock-open"));}}}function bE(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-quick-styles"),s=[];for(let a of chunkYOEVEUFZ_cjs.Zn){let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-quick-style");if(l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name),l.style.background=a.style.fillGradient||a.style.fillColor||"transparent",a.style.strokeColor&&(l.style.border=`${a.style.strokeWidth??1}px solid ${a.style.strokeColor}`),a.style.shadowColor){let p=a.style.shadowOffsetX??2,d=a.style.shadowOffsetY??2;l.style.boxShadow=`${p}px ${d}px ${a.style.shadowBlur??4}px ${a.style.shadowColor}`;}l.addEventListener("click",()=>o.setShapeStyle(a.style)),i.appendChild(l),s.push(l);}return r.appendChild(i),{el:r,update(a){r.hidden=!a.canShape;for(let l of s)l.disabled=!a.canShape;}}}var MI=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function fE(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-layout-grid"),a=new Map;for(let S of chunkYOEVEUFZ_cjs.N){let y=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-layout-button");y.type="button",y.dataset.testid=`smartart-layout-${S}`,y.textContent=chunkYOEVEUFZ_cjs.Qb(chunkYOEVEUFZ_cjs.Tb,S,t),y.addEventListener("click",()=>o.setSmartArtLayout(S)),a.set(S,y),s.appendChild(y);}r.appendChild(s);let l=he(e,{label:t("pptx.smartart.colorScheme"),options:MI.map(S=>({value:S,label:chunkYOEVEUFZ_cjs.Qb(chunkYOEVEUFZ_cjs.Sb,S,t)})),onChange:o.setSmartArtColorScheme}),p=l.el.querySelector("pptx-ui-select");p&&(p.dataset.testid="smartart-color-scheme"),r.appendChild(l.el);let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-nodes"),m=e.createElement("button");m.type="button",m.textContent=t("pptx.smartart.addItem"),m.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(m,u);let g,x=null;function b(S,y){let h=g;if(!h)return;let C=h.nodes.find(T=>T.id===y),w=S.currentTarget.value,A=!w,P=chunkYOEVEUFZ_cjs.E(h,y,w),k=w!==C?.text;if(S.key==="Enter"){S.preventDefault();let T=chunkYOEVEUFZ_cjs.Wi(P,y);T?(x=T.focusNodeId??null,o.replaceSmartArtData(T.data)):k&&o.replaceSmartArtData(P);}else if((S.key==="Backspace"||S.key==="Delete")&&A){if(!C?.parentId&&!chunkYOEVEUFZ_cjs.Ui(h.resolvedLayoutType,chunkYOEVEUFZ_cjs.Vi(h)))return;S.preventDefault();let E=chunkYOEVEUFZ_cjs.Xi(h,y);E&&(x=E.focusNodeId??null,o.replaceSmartArtData(E.data));}else if(S.key==="Tab"&&!S.shiftKey){S.preventDefault();let T=chunkYOEVEUFZ_cjs.Yi(P,y);T?(x=y,o.replaceSmartArtData(T)):k&&o.replaceSmartArtData(P);}else if(S.key==="Tab"&&S.shiftKey){S.preventDefault();let T=chunkYOEVEUFZ_cjs.Zi(P,y);T?(x=y,o.replaceSmartArtData(T)):k&&o.replaceSmartArtData(P);}}let v="",f=S=>{let y=S.smartArtData;g=y;let h=y?.nodes.map(C=>C.id).join("|")??"";if(h===v){let C=u.querySelectorAll('[data-testid="smartart-node-text"]');y?.nodes.forEach((w,A)=>{let P=C[A];P&&e.activeElement!==P&&(P.value=w.text);});return}v=h,u.replaceChildren();for(let[C,w]of (y?.nodes??[]).entries()){let A=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-smartart-node"),P=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-smartart-node-index");P.textContent=String(C+1);let k=e.createElement("input");k.type="text",k.className="pptxv-smartart-node-input",k.dataset.testid="smartart-node-text",k.dataset.nodeId=w.id,k.setAttribute("aria-label",`${t("pptx.smartart.item")} ${C+1}`),k.value=w.text,k.addEventListener("change",()=>o.setSmartArtNodeText(w.id,k.value)),k.addEventListener("keydown",I=>b(I,w.id));let T=e.createElement("input");T.type="color",T.value=w.style?.fillColor??"#3b82f6",T.title=t("pptx.inspector.fill"),T.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fillColor:T.value})),T.addEventListener("change",()=>o.pushRecentColor(T.value));let E=e.createElement("input");E.type="color",E.value=w.style?.fontColor??"#ffffff",E.title=t("pptx.table.color"),E.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fontColor:E.value})),E.addEventListener("change",()=>o.pushRecentColor(E.value));let L=e.createElement("button");L.type="button",L.textContent="B",L.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{bold:!w.style?.bold}));let M=e.createElement("button");M.type="button",M.textContent="I",M.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{italic:!w.style?.italic}));let D=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-smartart-hierarchy");for(let[I,R]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let O=e.createElement("button");O.type="button",O.textContent=t(R),O.addEventListener("click",()=>o.mutateSmartArtNode(w.id,I)),D.appendChild(O);}A.append(P,k,T,E,L,M,D),u.appendChild(A);}};return {el:r,update(S){r.hidden=!S.isSmartArt;let y=S.smartArtData?.resolvedLayoutType;for(let[h,C]of a)C.disabled=!S.isSmartArt,C.classList.toggle("is-active",h===y),C.setAttribute("aria-pressed",String(h===y));if(l.setValue(S.smartArtData?.colorScheme??"colorful1"),l.setDisabled(!S.isSmartArt),m.disabled=!S.isSmartArt,f(S),x){let h=x;x=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${h}"]`)?.focus();}}}}function vE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-header"),i=chunkQPYQDJ2Q_cjs.w(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-toolbar");r.append(i,s);let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-scroll"),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-body");l.setAttribute("role","grid"),a.appendChild(l),o.append(r,a);let p,d,u=true,m=T=>{!p||T===p||!T.tableData||n.setTableData(T.tableData,T.rawXml);},g=(T,E,L)=>{let M=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-table-grid-btn");return M.type="button",M.textContent=t(`pptx.tableDataEditor.${T}`),M.title=t(`pptx.tableDataEditor.${E}`),M.addEventListener("click",()=>{p&&m(L(p));}),M},x=g("addRowLabel","addRowTitle",chunkYOEVEUFZ_cjs.ze),b=g("removeRowLabel","removeRowTitle",chunkYOEVEUFZ_cjs.Ae),v=g("addColumnLabel","addColumnTitle",chunkYOEVEUFZ_cjs.Be),f=g("removeColumnLabel","removeColumnTitle",chunkYOEVEUFZ_cjs.Ce);s.append(x,b,v,f);let S=T=>{let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-head");E.setAttribute("role",T.role),T.role==="rowheader"&&E.classList.add("pptxv-table-grid-gutter");let L=e.createElement("span");if(L.textContent=T.text,E.appendChild(L),u&&T.canRemove){let M=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-table-grid-remove");M.type="button",M.textContent="\xD7",M.title=T.removeLabel,M.setAttribute("aria-label",T.removeLabel),M.addEventListener("click",T.onRemove),E.appendChild(M);}return E},y=T=>{let E=e.createElement("input");return E.type="text",E.className="pptxv-table-grid-input",E.value=T.text,E.disabled=!u,E.dataset.pptxRow=String(T.rowIndex),E.dataset.pptxCol=String(T.colIndex),E.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:T.rowIndex+1,column:T.colIndex+1})),E.addEventListener("change",()=>{p&&m(chunkYOEVEUFZ_cjs.ue(p,T.rowIndex,T.colIndex,E.value));}),E.addEventListener("keydown",L=>L.stopPropagation()),E},h=(T,E)=>S({role:"columnheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunkYOEVEUFZ_cjs.ye(p,T));}}),C=(T,E)=>S({role:"rowheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunkYOEVEUFZ_cjs.we(p,T));}}),w=T=>{let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-row");E.setAttribute("role","row");let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");L.setAttribute("role","columnheader"),E.appendChild(L);for(let M of T.colIndices)E.appendChild(h(M,T.canRemoveColumn));return E},A=T=>{l.textContent="",l.appendChild(w(T));for(let E of T.rows){let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-row");L.setAttribute("role","row"),L.appendChild(C(E.rowIndex,T.canRemoveRow));for(let M of E.cells){let D=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(y(M)),L.appendChild(D);}l.appendChild(L);}},P=()=>{let T=e.activeElement;if(!T||T.tagName!=="INPUT"||!l.contains(T))return null;let{pptxRow:E,pptxCol:L}=T.dataset;return E!==void 0&&L!==void 0?[E,L]:null},k=()=>{s.hidden=!u;for(let T of l.querySelectorAll("input"))T.disabled=!u;for(let T of l.querySelectorAll(".pptxv-table-grid-remove"))T.hidden=!u;};return {el:o,update(T){p=T.tableElement;let E=p?chunkYOEVEUFZ_cjs.te(p):void 0,L=T.hasSelection&&T.isTable&&E!==void 0&&E.rowCount>0&&E.colCount>0;if(o.hidden=!L,!L||!E||!p){d=void 0,l.textContent="";return}if(s.hidden=!u,x.disabled=!u,v.disabled=!u,b.disabled=!u||!E.canRemoveRow,f.disabled=!u||!E.canRemoveColumn,p.tableData===d)return;let M=P();d=p.tableData,A(E),M&&l.querySelector(`input[data-pptx-row="${M[0]}"][data-pptx-col="${M[1]}"]`)?.focus();},setEditable(T){u=T,k(),d=void 0;}}}function hE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tsef"),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tsef-group"),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tsef-hdg");i.textContent=t("pptx.tableStyleEditor.fillSection");let s=e.createElement("input");s.type="color",s.addEventListener("input",()=>n({kind:"fillColor",hex:s.value,ref:void 0}));let a=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-tsef-check"),l=me(e);l.addEventListener("change",()=>n({kind:"fillNone",noFill:l.checked})),a.append(l,e.createTextNode(t("pptx.tableStyleEditor.noFill")));let p=Ie(e,t,h=>n({kind:"fillColor",hex:h.hex,ref:h.ref}));r.append(i,s,a,p.el);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tsef-group"),u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tsef-hdg");u.textContent=t("pptx.tableStyleEditor.textSection");let m=Ss(e,t("pptx.format.bold"),()=>n({kind:"textBold",value:!m.classList.contains("active")})),g=Ss(e,t("pptx.format.italic"),()=>n({kind:"textItalic",value:!g.classList.contains("active")})),x=Ss(e,t("pptx.format.underline"),()=>n({kind:"textUnderline",value:!x.classList.contains("active")})),b=e.createElement("input");b.type="color",b.addEventListener("input",()=>n({kind:"textColor",hex:b.value,ref:void 0}));let v=Ie(e,t,h=>n({kind:"textColor",hex:h.hex,ref:h.ref}));d.append(u,m,g,x,b,v.el);let f=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tsef-group"),S=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tsef-hdg");S.textContent=t("pptx.tableStyleEditor.bordersSection");let y=new Map;for(let h of chunkYOEVEUFZ_cjs.rs){let C=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tsef-border-row"),w=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tsef-side-lbl");w.textContent=t(chunkYOEVEUFZ_cjs.ss[h]);let A=e.createElement("input");A.type="color",A.addEventListener("input",()=>n({kind:"borderColor",side:h,hex:A.value,ref:void 0}));let P=e.createElement("input");P.type="number",P.min="0",P.max="20",P.addEventListener("change",()=>n({kind:"borderWidth",side:h,width:Number(P.value)}));let k=Q(e);for(let L of chunkYOEVEUFZ_cjs.ts){let M=e.createElement("option");M.value=L,M.textContent=L,k.appendChild(M);}k.addEventListener("change",()=>n({kind:"borderDash",side:h,dash:k.value}));let T=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-tsef-check"),E=me(e);E.addEventListener("change",()=>n({kind:"borderNone",side:h,noFill:E.checked})),T.append(E,e.createTextNode(t("pptx.tableStyleEditor.noBorder"))),C.append(w,A,P,k,T),f.appendChild(C),y.set(h,{color:A,width:P,dash:k,noFill:E});}return o.append(r,d,f),{el:o,update(h,C,w){if(s.value=h.fill.color.hex,s.disabled=!w,l.checked=h.fill.noFill,l.disabled=!w,p.setThemeColorMap(C),p.setSelected(h.fill.color.ref,h.fill.color.hex),p.setDisabled(!w),d.hidden=!h.hasTextAndBorders,f.hidden=!h.hasTextAndBorders,!!h.hasTextAndBorders){m.classList.toggle("active",h.text.bold),g.classList.toggle("active",h.text.italic),x.classList.toggle("active",h.text.underline);for(let A of [m,g,x])A.disabled=!w;b.value=h.text.color.hex,b.disabled=!w,v.setThemeColorMap(C),v.setSelected(h.text.color.ref,h.text.color.hex),v.setDisabled(!w);for(let[A,P]of y){let k=h.borders[A];P.color.value=k.color.hex,P.color.disabled=!w,P.width.value=String(k.width),P.width.disabled=!w,P.dash.value=k.dash,P.dash.disabled=!w,P.noFill.checked=k.noFill,P.noFill.disabled=!w;}}}}}function Ss(e,t,n){let o=e.createElement("button");return o.type="button",o.className="pptxv-tsef-toggle",o.textContent=t,o.addEventListener("click",n),o}function yE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse"),r=e.createElement("button");r.type="button",r.className="pptxv-tse-btn",r.textContent=t("pptx.tableStyleEditor.editButton");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse-panel");i.dataset.testid="table-style-editor",i.hidden=true,o.append(r,i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse-header"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tse-heading");a.textContent=t("pptx.tableStyleEditor.title");let l=e.createElement("button");l.type="button",l.textContent=t("pptx.tableStyleEditor.close"),l.addEventListener("click",()=>h(false)),s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse-empty");p.textContent=t("pptx.tableStyleEditor.noStyleSelected");let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse-parts"),u=new Map,m="wholeTbl";chunkYOEVEUFZ_cjs.qs.forEach(w=>{let A=e.createElement("button");A.type="button",A.textContent=t(w.labelKey),A.addEventListener("click",()=>{m=w.id,C();}),u.set(w.id,A),d.appendChild(A);});let g=hE(e,t,w=>{let A=n.getTableStyleMap(),P=A?.[chunkYOEVEUFZ_cjs.V(f)];if(!A||!P)return;let{entry:k}=chunkYOEVEUFZ_cjs.vs(P,m,w);n.onStyleMapChange({...A,[k.styleId]:k});}),x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tse-actions"),b=e.createElement("button");b.type="button",b.textContent=t("pptx.tableStyleEditor.newFromCurrent"),b.addEventListener("click",()=>{let w=n.getTableStyleMap(),A=w?.[chunkYOEVEUFZ_cjs.V(f)],P=e.defaultView?.prompt(t("pptx.tableStyleEditor.newStyleNamePrompt"),A?`${A.styleName??""} Copy`.trim():"");if(!P)return;let k={...w??{}},T=chunkYOEVEUFZ_cjs.W(k,{styleName:P,basedOn:A});chunkYOEVEUFZ_cjs.X(k,T),n.onStyleMapChange(k),f=T.styleId,n.onAssignStyle?.(T.styleId),C();});let v=e.createElement("button");v.type="button",v.textContent=t("pptx.tableStyleEditor.deleteStyle"),v.addEventListener("click",()=>{let w=n.getTableStyleMap(),A=w?.[chunkYOEVEUFZ_cjs.V(f)];if(!w||!A||!e.defaultView?.confirm(t("pptx.tableStyleEditor.deleteConfirm")))return;let P={...w};chunkYOEVEUFZ_cjs.Y(P,A.styleId),n.onStyleMapChange(P),n.onDeleteStyle(A.styleId),h(false);}),x.append(b,v),i.append(s,p,d,g.el,x);let f="",S=true,y=false;function h(w){y=w,i.hidden=!y,y&&C();}function C(){let w=n.getTableStyleMap(),A=f?w?.[f]:void 0;p.hidden=!!A,d.hidden=!A,g.el.hidden=!A,v.hidden=!A,b.textContent=t(A?"pptx.tableStyleEditor.newFromCurrent":"pptx.tableStyleEditor.newStyle");for(let[P,k]of u)k.classList.toggle("active",P===m),k.disabled=!S;if(b.disabled=!S,v.disabled=!S,A){let P=chunkYOEVEUFZ_cjs.us(A,m,n.getThemeColorMap());P&&g.update(P,n.getThemeColorMap(),S);}}return r.addEventListener("click",()=>h(!y)),{el:o,update(w,A){f=w?chunkYOEVEUFZ_cjs.V(w):"",S=A,r.disabled=!A,y&&C();}}}var DI=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function SE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=A=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],A);},s=(A,P,k)=>{let T=e.createElement("label");T.textContent=A;let E=Q(e);E.setAttribute("aria-label",A);for(let L of P){let M=e.createElement("option");M.value=L,M.textContent=k?chunkYOEVEUFZ_cjs.Qb(k,L,t):L,E.appendChild(M);}return T.appendChild(E),o.appendChild(T),E},a=A=>{let P=e.createElement("label");P.textContent=A;let k=e.createElement("input");return k.type="color",k.addEventListener("change",()=>n.pushRecentColor(k.value)),P.appendChild(k),o.appendChild(P),k},l=s(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),p=s(t("pptx.table.gradientType"),["linear","radial"]),d=e.createElement("input");d.type="number",d.min="0",d.max="360",d.title=t("pptx.table.gradientAngle"),o.appendChild(d);let u=a(t("pptx.table.gradientStart")),m=a(t("pptx.table.gradientEnd")),g=s(t("pptx.table.patternPreset"),DI,chunkYOEVEUFZ_cjs.$b),x=a(t("pptx.table.patternForeground")),b=a(t("pptx.table.patternBackground")),v=s(t("pptx.table.cellBorders"),["top","right","bottom","left"]),f=a(t("pptx.table.borderColor")),S=e.createElement("input");S.type="number",S.min="0",S.max="20",S.title=t("pptx.table.borderWidth"),o.appendChild(S);let y=()=>i({fillMode:"gradient",gradientFillType:p.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:m.value,position:100}]});l.addEventListener("change",()=>i({fillMode:l.value}));for(let A of [p,d,u,m])A.addEventListener("change",y);let h=()=>i({fillMode:"pattern",patternFillPreset:g.value,patternFillForeground:x.value,patternFillBackground:b.value});for(let A of [g,x,b])A.addEventListener("change",h);let C=()=>{let A=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${A}Color`]:f.value,[`border${A}Width`]:Number(S.value)});};for(let A of [v,f,S])A.addEventListener("change",C);let w=o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox");return {el:o,update(A){r=A,o.hidden=!A.selectedTableCell;let P=A.tableCellStyle??{};l.value=P.fillMode??"solid",p.value=P.gradientFillType??"linear",d.value=String(P.gradientFillAngle??90),u.value=P.gradientFillStops?.[0]?.color??"#ff0000",m.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",g.value=P.patternFillPreset??"ltDnDiag",x.value=P.patternFillForeground??"#000000",b.value=P.patternFillBackground??"#ffffff";let k=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;f.value=String(P[`border${k}Color`]??"#374151"),S.value=String(P[`border${k}Width`]??1);for(let T of w)T.disabled=!A.isTable;}}}var RI={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},OI={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function Cs(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function CE(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,s=[],a=L=>{i&&n.setTableCellStyles(s.length>0?s:[i],L);},l=(L,M)=>{let D=e.createElement("label"),I=e.createElement("span");return I.textContent=L,M.setAttribute("aria-label",L),D.append(I,M),o.appendChild(D),D},p=(L,M)=>{let D=e.createElement("input");return D.type="number",D.addEventListener("change",()=>M(Number(D.value))),l(L,D),D},d=(L,M)=>{let D=e.createElement("input");return D.type="color",D.addEventListener("input",()=>a({[M]:D.value})),D.addEventListener("change",()=>n.pushRecentColor(D.value)),l(L,D),D},u=(L,M,D,I)=>{let R=e.createElement("input");R.type="color",R.addEventListener("input",()=>a({[M]:R.value,[D]:void 0})),R.addEventListener("change",()=>n.pushRecentColor(R.value)),l(L,R);let O=Ie(e,t,B=>a(I(B)));return o.appendChild(O.el),{input:R,theme:O}},m=(L,M)=>{let D=me(e);return D.addEventListener("change",()=>a({[M]:D.checked})),l(L,D),D},g=(L,M,D,I)=>{let R=Q(e);for(let O of M){let B=e.createElement("option");B.value=O,B.textContent=chunkYOEVEUFZ_cjs.Qb(D,O,t),R.appendChild(B);}return R.addEventListener("change",()=>I(R.value)),l(L,R),R},x=p(t("pptx.table.fontSize"),L=>a({fontSize:L})),{input:b,theme:v}=u(t("pptx.table.color"),"color","colorRef",chunkYOEVEUFZ_cjs.Do),{input:f,theme:S}=u(t("pptx.table.background"),"backgroundColor","backgroundColorRef",chunkYOEVEUFZ_cjs.Co),y=d(t("pptx.table.cellBorders"),"borderColor"),h=p(t("pptx.table.borderWidth"),L=>a({borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L})),C=p(t("pptx.table.cellPadding"),L=>a({marginLeft:L,marginRight:L,marginTop:L,marginBottom:L})),w=m(t("pptx.format.bold"),"bold"),A=m(t("pptx.format.italic"),"italic"),P=m(t("pptx.format.underline"),"underline"),k=g(t("pptx.table.alignment"),["left","center","right"],RI,L=>a({align:L})),T=g(t("pptx.table.verticalAlignment"),["top","middle","bottom"],OI,L=>a({vAlign:L})),E=[x,b,f,y,h,C,w,A,P,k,T];return {el:o,update(L){if(i=L.selectedTableCell,s=L.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let M=L.tableCellStyle??{};x.value=String(M.fontSize??14),b.value=Cs(M.color,"#000000"),f.value=Cs(M.backgroundColor,"#ffffff"),y.value=Cs(M.borderColor,"#374151"),v.setThemeColorMap(L.themeColorMap),v.setSelected(M.colorRef,M.color),v.setDisabled(!L.isTable),S.setThemeColorMap(L.themeColorMap),S.setSelected(M.backgroundColorRef,M.backgroundColor),S.setDisabled(!L.isTable),h.value=String(M.borderTopWidth??1),C.value=String(M.marginLeft??4),w.checked=!!M.bold,A.checked=!!M.italic,P.checked=!!M.underline,k.value=M.align??"left",T.value=M.vAlign??"top";for(let D of E)D.disabled=!L.isTable;}}}function wE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(u,m)=>{let g=e.createElement("button");return g.type="button",g.textContent=u,g.addEventListener("click",()=>r&&m(r)),o.appendChild(g),g},s=u=>u.selectedTableCell,a=u=>m=>{let g=s(m);g&&n.mutateTableStructure(g,u);},l=[i(t("pptx.table.insertAbove"),a("insertRowAbove")),i(t("pptx.table.insertBelow"),a("insertRowBelow")),i(t("pptx.table.deleteRow"),a("deleteRow")),i(t("pptx.table.insertLeft"),a("insertColumnLeft")),i(t("pptx.table.insertRight"),a("insertColumnRight")),i(t("pptx.table.deleteColumn"),a("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let m=s(u);m&&n.splitTableCell(m);})],p=e.createElement("input");p.type="number",p.min="5",p.max="95",p.title=t("pptx.table.columnWidths"),p.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableColumnWidth(u.column,Number(p.value));});let d=e.createElement("input");return d.type="number",d.min="1",d.title=t("pptx.table.rowHeights"),d.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(p,d),{el:o,update(u){r=u;let m=s(u);o.hidden=!m,p.value=m?String(Math.round((u.tableColumnWidths[m.column]??0)*100)):"",d.value=m?String(u.tableRowHeights[m.row]??32):"";for(let g of l)g.disabled=!m;l[6].disabled=u.selectedTableCells.length<2,p.disabled=!m,d.disabled=!m;}}}function EE(e,t,n,o,r){let i=n(t("pptx.inspector.table")),s=oe(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=oe(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),l=oe(e,{label:t("pptx.table.bandedColumns"),onChange:E=>o.setTableOptions({bandedColumns:E})}),p=oe(e,{label:t("pptx.table.totalRow"),onChange:E=>o.setTableOptions({lastRow:E})}),d=oe(e,{label:t("pptx.table.firstColumn"),onChange:E=>o.setTableOptions({firstCol:E})}),u=oe(e,{label:t("pptx.table.lastColumn"),onChange:E=>o.setTableOptions({lastCol:E})}),m=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:E=>o.setTableOptions({rtl:E})});i.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el);let g,x=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-table-presets-label");x.textContent=t("pptx.table.stylePresets");let b=E=>{g&&o.setTableOptions({rows:chunkYOEVEUFZ_cjs.Fe(g,E)});},v=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-table-presets-grid");v.append(...chunkYOEVEUFZ_cjs.Ee.map(E=>{let L=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-table-preset-swatch");L.type="button",L.title=E.label,L.setAttribute("aria-label",E.label);let M=chunkQPYQDJ2Q_cjs.w(e,"span");M.style.background=E.headerBg;let D=chunkQPYQDJ2Q_cjs.w(e,"span");D.style.background=E.bandBg;let I=chunkQPYQDJ2Q_cjs.w(e,"span");return I.style.borderTopColor=E.borderColor,L.append(M,D,I),L.addEventListener("click",()=>b(E)),L})),i.append(x,v);let f=re(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});i.appendChild(f.el);let S=e.createElement("input");S.placeholder=t("pptx.table.styleId"),S.addEventListener("change",()=>o.setTableOptions({tableStyleId:S.value}));let y=e.createElement("input");y.type="color",y.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:y.value})),y.addEventListener("change",()=>o.pushRecentColor(y.value));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{borderColor:h.value})),h.addEventListener("change",()=>o.pushRecentColor(h.value)),i.append(S,y,h);let C=r?yE(e,t,r):void 0;C&&i.appendChild(C.el);let w=CE(e,t,o),A=SE(e,t,o),P=wE(e,t,o);i.append(w.el,A.el,P.el);let k=[s,a,l,p,d,u,m],T=[f];return {el:i,update(E){i.hidden=!E.hasSelection||!E.isTable,g=E.tableElement?.tableData;for(let L of v.children)L.disabled=!E.isTable;s.setValue(E.tableHeaderRow),a.setValue(E.tableBandedRows),l.setValue(E.tableBandedColumns),p.setValue(E.tableLastRow),d.setValue(E.tableFirstCol),u.setValue(E.tableLastCol),m.setValue(E.tableRtl),f.setValue(E.tableCellPadding),S.value=E.tableStyleId,y.value=E.tableCellBackground,h.value=E.tableCellBorder,w.update(E),A.update(E),P.update(E);for(let L of k)L.setDisabled(!E.isTable);S.disabled=!E.isTable,y.disabled=!E.isTable,h.disabled=!E.isTable,C?.update(E.isTable?E.tableStyleId:void 0,E.isTable);for(let L of T)L.setDisabled(!E.isTable);}}}var PE=12700;function ws(e){return e?Math.round(e/PE):0}function Nr(e){return Math.round(e*PE)}function Es(e,t,n){return Math.max(t,Math.min(n,e))}function TE(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-text3d-bevel"),s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-text3d-bevel-label");s.textContent=n;let a=he(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunkYOEVEUFZ_cjs._n.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),l=re(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Nr(Es(d,0,50))})}),p=re(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Nr(Es(d,0,50))})});return i.append(s,a.el,l.el,p.el),{el:i,update(d,u){a.setValue(d?.[r.type]??"none"),l.setValue(ws(d?.[r.width])),p.setValue(ws(d?.[r.height])),a.setDisabled(u),l.setDisabled(u),p.setDisabled(u);}}}function AE(e,t,n,o){let r=n(t("pptx.text3d.title")),i,s=v=>{i={...i,...v},o.setTextStyle({text3d:i});},a=oe(e,{label:t("pptx.text3d.extrusion"),onChange:v=>{v?s({extrusionHeight:Nr(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-text3d-options"),p=re(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:v=>s({extrusionHeight:Nr(Es(v,0,100))})}),d=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field pptxv-text3d-color"),u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");u.textContent=t("pptx.text3d.extrusionColor");let m=e.createElement("input");m.type="color",m.setAttribute("aria-label",t("pptx.text3d.extrusionColor")),m.addEventListener("change",()=>{s({extrusionColor:m.value}),o.pushRecentColor(m.value);}),d.append(u,m);let g=TE(e,t,t("pptx.text3d.bevelTop"),s,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),x=TE(e,t,t("pptx.text3d.bevelBottom"),s,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),b=he(e,{label:t("pptx.text3d.material"),options:chunkYOEVEUFZ_cjs.$n.map(({value:v,label:f})=>({value:v||"",label:f})),onChange:v=>s({presetMaterial:v||void 0})});return l.append(p.el,d,g.el,x.el,b.el),r.append(a.el,l),{el:r,update(v){r.hidden=!v.canText,i=v.textStyle?.text3d;let f=!!(i?.extrusionHeight&&i.extrusionHeight>0);a.setValue(f),a.setDisabled(!v.canText),l.hidden=!f,p.setValue(ws(i?.extrusionHeight)),p.setDisabled(!f),m.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",m.disabled=!f,g.update(i,!f),x.update(i,!f),b.setValue(i?.presetMaterial??""),b.setDisabled(!f);}}}function kE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=T=>n.setTextStyle(T,r?.selectedTextRange),s=T=>n.setTextStyle(T),a=(T,E)=>{let L=e.createElement("label");L.textContent=T,E.setAttribute("aria-label",T),L.appendChild(E),o.appendChild(L);},l=(T,E,L=0,M=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(L),D.addEventListener("change",()=>(M?s:i)({[E]:Number(D.value)})),a(T,D),D},p=(T,E)=>{let L=e.createElement("input");return L.type="color",L.addEventListener("input",()=>i({[E]:L.value})),L.addEventListener("change",()=>n.pushRecentColor(L.value)),a(T,L),L},d=(T,E)=>{let L=me(e);return L.addEventListener("change",()=>i({[E]:L.checked})),a(T,L),L},u=l(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let m=l(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),g=p(t("pptx.textEffects.outline"),"textOutlineColor"),x=l(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),b=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=p(t("pptx.textEffects.shadowColor"),"textShadowColor"),f=l(t("pptx.textEffects.blur"),"textShadowBlur"),S=p(t("pptx.textEffects.glowColor"),"textGlowColor"),y=l(t("pptx.textEffects.glow"),"textGlowRadius"),h=d(t("pptx.textEffects.reflection"),"textReflection"),C=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),w=p(t("pptx.text.highlightColor"),"highlightColor"),A=Q(e);for(let T of chunkYOEVEUFZ_cjs.Yn){let E=e.createElement("option");E.value=T.value,E.textContent=T.label,A.appendChild(E);}A.addEventListener("change",()=>s({textWarpPreset:A.value==="textNoShape"?void 0:A.value})),a(t("pptx.textEffects.transform"),A);let P=l(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),k=Array.from(o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox"));return {el:o,update(T){r=T,o.hidden=!T.canText;let E=T.textStyle??{};u.value=String(E.columnCount??1),m.value=String(E.columnSpacing??0),g.value=E.textOutlineColor??"#000000",x.value=String(E.textOutlineWidth??0),b.checked=!!E.textShadowOpacity,v.value=E.textShadowColor??"#000000",f.value=String(E.textShadowBlur??4),S.value=E.textGlowColor??"#ffff00",y.value=String(E.textGlowRadius??0),h.checked=!!E.textReflection,C.checked=!!E.strikethrough,w.value=E.highlightColor??"#ffff00",A.value=E.textWarpPreset??"textNoShape",P.value=String(E.textWarpAdj??5e4);for(let L of k)L.disabled=!T.canText;}}}function IE(e,t,n,o){let r=n(t("pptx.inspector.text")),i=e.createElement("div");i.className="pptxv-inspector-row";let s=e.createElement("span");s.className="pptxv-inspector-row-label",s.textContent=t("pptx.textPanel.color");let a=He(e,{label:t("pptx.textPanel.color"),onInput:T=>o.setTextStyle({color:T,colorRef:void 0}),onCommit:o.pushRecentColor},"#000000");i.append(s,a.el),r.appendChild(i);let l=Ie(e,t,T=>o.setTextStyle({color:T.hex,colorRef:T.ref}));r.appendChild(l.el);let p=Rt(e,t,T=>{o.setTextStyle({color:T,colorRef:void 0}),o.pushRecentColor(T);});r.appendChild(p.el);let d=he(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(d.el);let u=oe(e,{label:t("pptx.textAdvanced.wrapText"),onChange:T=>o.setTextWrap(T?"square":"none")});r.appendChild(u.el);let m=he(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(m.el);let g=(T,E,L)=>re(e,{label:T,min:L,onCommit:M=>o.setTextAdvanced({[E]:M})}),x=g(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),b=g(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),v=g(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),f=g(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),S=g(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),y=g(t("pptx.textAdvanced.indent"),"paragraphIndent"),h=g(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),C=he(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(T=>({value:T,label:t(`pptx.textAdvanced.direction.${T}`)})),onChange:T=>o.setTextAdvanced({textDirection:T})}),w=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:T=>o.setTextAdvanced({rtl:T})}),A=[x,b,v,f,S,y,h];r.append(...A.map(({el:T})=>T),C.el,w.el);let P=kE(e,t,o);r.appendChild(P.el);let k=[a,d,u,m,...A,C,w];return {el:r,update(T){r.hidden=!T.hasSelection||!T.canText,a.setValue(T.textStyle?.color),l.setThemeColorMap(T.themeColorMap),l.setSelected(T.textStyle?.colorRef,T.textStyle?.color),l.setDisabled(!T.canText),p.setColors(T.recentColors??[]),p.setDisabled(!T.canText),d.setValue(T.vAlign),u.setValue(T.textWrap==="square"),m.setValue(T.autoFitMode),x.setValue(T.characterSpacing),b.setValue(T.lineSpacing),v.setValue(T.lineSpacingExactPt??0),f.setValue(T.paragraphSpacingBefore),S.setValue(T.paragraphSpacingAfter),y.setValue(T.paragraphIndent),h.setValue(T.paragraphMarginLeft),C.setValue(T.textDirection),w.setValue(T.textRtl),P.update(T);for(let E of k)E.setDisabled(!T.canText);}}}function _r(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,s=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let R of s){let O=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-inspector-tab");O.type="button",O.setAttribute("role","tab"),O.textContent=R.label,O.addEventListener("click",()=>m(R.id)),r.appendChild(O),i.set(R.id,O);}let a=Zw(e,t,R=>n.selectElement(R));a.el.classList.add("pptxv-inspector-body"),o.appendChild(a.el);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-body");o.appendChild(l);let p=Vw(e,t,n);p.el.classList.add("pptxv-inspector-body"),o.appendChild(p.el);let d=ww(e,t,n);o.appendChild(d.el);let u="properties",m=R=>{u=R;for(let[O,B]of i)B.classList.toggle("is-active",O===R),B.setAttribute("aria-selected",String(O===R));a.el.hidden=R!=="elements",l.hidden=R!=="properties",p.el.hidden=R!=="comments";},g=Qw(e,t,n);l.appendChild(g.el);let x=R=>{let O=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-inspector-section"),B=chunkQPYQDJ2Q_cjs.w(e,"h4","pptxv-inspector-section-title");return B.textContent=R,O.appendChild(B),l.appendChild(O),O},b=gE(e,t,x,n.setGeometry,n.toggleElementLock),v=nE(e,t,x),f=xE(e,t,x,n),S=oE(e,t,x,n),y=bE(e,t,x,n),h=IE(e,t,x,n),C=AE(e,t,x,n),w=rE(e,t,x,n),A=sw(e,t,x,n),P=vE(e,t,n);l.appendChild(P.el);let T=EE(e,t,x,n,{getTableStyleMap:()=>n.getTableStyleMap(),getThemeColorMap:()=>n.getThemeColorMap(),onStyleMapChange:R=>n.updateTableStyleMap(R),onDeleteStyle:R=>n.deleteTableStyle(R),onAssignStyle:R=>n.setTableOptions(chunkYOEVEUFZ_cjs.wp(R))}),E=fE(e,t,x,n),L=pw(e,t,x,n),M=Ow(e,t,x,n),D=lE(e,t,x,n),I=[b,v,f,S,y,h,C,w,A,P,T,E,L,M,D];return m(u),{el:o,update(R){g.setVisible(!R.hasSelection);for(let O of I)O.update(R);},updateDeck(R){L.setSlideCount(R.slideCount),L.setCustomShows(R.customShows),a.update(R),p.update(R),g.update(R),d.update({editable:R.editable,selectedElementId:R.selectedElementId,elements:R.elements,animations:R.activeSlide?.animations??[],animationTimelineAnchors:R.activeSlide?.animationTimelineAnchors??[]});},setEditable(R){o.hidden=!R,P.setEditable(R),M.setEditable(R);}}}var LE=128,HI=[1,2,3,4,6,9],FI={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 Ts(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-master-card"),s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-card-label");s.textContent=t("pptx.master.notesMasterBackground");let a=chunkQPYQDJ2Q_cjs.w(e,"input","pptxv-master-background");a.type="color",a.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",a.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),a.addEventListener("input",()=>r(a.value)),i.append(s,a),n.appendChild(i);}function ME(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-master-card"),s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-card-label");if(s.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(s),o.length===0){let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-empty");a.textContent=t("pptx.master.noPlaceholders"),i.appendChild(a);}for(let a of o){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-placeholder"),p=chunkQPYQDJ2Q_cjs.w(e,"span",`pptxv-master-dot is-${r}`);l.append(p,e.createTextNode(t(FI[a.type]??a.type))),i.appendChild(l);}n.appendChild(i);}function VI(e,t){return chunkYOEVEUFZ_cjs.fp({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function BI(e,t,n,o,r){if(o.length===0)return;let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-crud");for(let s of o){let a=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-master-crud-btn");a.type="button",a.dataset.testid=`pptx-master-crud-${s.id}`,a.textContent=t(s.labelKey),a.disabled=!s.enabled,s.disabledReasonKey&&(a.title=t(s.disabledReasonKey)),a.addEventListener("click",()=>r(s.id)),i.appendChild(a);}n.appendChild(i);}function zI(e,t,n,o){o.editable&&(Ts(e,t,n,chunkYOEVEUFZ_cjs.ip({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange),BI(e,t,n,o.crudActions,o.onCrudAction));let r=LE/Math.max(o.canvasSize.width,1);for(let[i,s]of o.masters.entries()){let a=[{layoutIndex:null,label:s.name||t("pptx.master.master")},...s.layouts?.map((l,p)=>({layoutIndex:p,label:l.name||t("pptx.master.layout")}))??[]];for(let l of a){let p=chunkQPYQDJ2Q_cjs.w(e,"button",`pptxv-master-thumb${l.layoutIndex===null?"":" is-layout"}`);p.type="button",p.setAttribute("aria-label",l.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===l.layoutIndex;p.classList.toggle("is-active",d),d&&p.setAttribute("aria-current","page");let u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-master-thumb-name");u.textContent=l.label;let m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-master-thumb-frame");m.style.width=`${LE}px`,m.style.height=`${Math.round(o.canvasSize.height*r)}px`,m.appendChild(o.renderStage(VI(s,l.layoutIndex),r)),p.append(u,m),p.addEventListener("click",()=>o.onSelect(i,l.layoutIndex)),n.appendChild(p);}}}function Ps(e,t){let n=chunkQPYQDJ2Q_cjs.w(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=chunkQPYQDJ2Q_cjs.w(e,"header","pptxv-master-header"),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-master-collapse");s.type="button",s.textContent="\u2039",s.title=t("pptx.masterView.collapse"),s.setAttribute("aria-label",t("pptx.masterView.collapse")),s.addEventListener("click",o.onCollapse),r.append(i,s);let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-tabs");a.setAttribute("role","tablist");for(let[p,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===p)),u.classList.toggle("is-active",o.tab===p),u.addEventListener("click",()=>o.onTabChange(p)),a.appendChild(u);}let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-body");if(l.setAttribute("role","tabpanel"),o.tab==="slides")zI(e,t,l,o);else if(o.tab==="notes")o.notesMasterPresent?(Ts(e,t,l,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),ME(e,t,l,o.notesPlaceholders??[],"notes")):(l.textContent=t("pptx.master.noNotesMaster"),l.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)l.textContent=t("pptx.master.noHandoutMaster"),l.classList.add("pptxv-master-empty");else {let p=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-master-card"),d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-counts");for(let m of HI){let g=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-master-count");g.type="button",g.textContent=String(m),g.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===m)),g.classList.toggle("is-active",o.handoutSlidesPerPage===m),g.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(m)),u.appendChild(g);}p.append(d,u),l.appendChild(p),Ts(e,t,l,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),ME(e,t,l,o.handoutPlaceholders??[],"handout");}n.append(r,a,l);},setVisible(o){n.hidden=!o;}}}var DE=148;function As(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-actions"),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-sheet-host");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true");let l=e.createElement("button");l.type="button",l.className="pptxv-mobile-sheet-backdrop",l.setAttribute("aria-label",t("pptx.settings.close"));let p=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-mobile-sheet"),d=chunkQPYQDJ2Q_cjs.w(e,"header","pptxv-mobile-sheet-header"),u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-sheet-handle"),m=e.createElement("strong");d.append(u,m);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-sheet-body");p.append(d,g),a.append(l,p),a.hidden=true,s.appendChild(a);let x=null,b=0,v=[],f=[],S=true,y=false,h=null,C=960,w=540,A=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(A,r);let P=()=>{r&&A?.parentNode&&A.parentNode.insertBefore(r,A.nextSibling);},k=()=>{x=null,a.hidden=true,p.style.transform="",P();for(let O of M.querySelectorAll("button"))O.setAttribute("aria-pressed","false");};l.addEventListener("click",k);let T=chunkYOEVEUFZ_cjs.sn((O,B)=>{p.style.transform=O>0?`translateY(${O}px)`:"",p.style.transition=B?"none":"";},k),E=O=>({clientY:O.clientY,pointerId:O.pointerId,currentTarget:d});d.addEventListener("pointerdown",O=>T.pointerDown(E(O))),d.addEventListener("pointermove",O=>T.pointerMove(E(O))),d.addEventListener("pointerup",O=>T.pointerUp(E(O))),d.addEventListener("pointercancel",O=>T.cancel(E(O)));let L=O=>{if(g.replaceChildren(),m.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),a.setAttribute("aria-label",m.textContent),O==="slides"){let B=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-slide-list"),F=DE/Math.max(C,1);for(let V=0;V<v.length;V+=1){let _=e.createElement("button");_.type="button";let N=chunkYOEVEUFZ_cjs.yt(v[V],V);_.setAttribute("aria-label",N),_.classList.toggle("is-active",V===b),V===b&&_.setAttribute("aria-current","true");let W=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-slide-num");if(W.textContent=String(V+1),_.appendChild(W),h){let X=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-slide-frame",{width:`${DE}px`,height:`${Math.round(w*F)}px`});X.appendChild(h(v[V],F)),_.appendChild(X);}else {let X=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-slide-title");X.textContent=N,_.appendChild(X);}_.addEventListener("click",()=>{o(V),k();}),B.appendChild(_);}g.appendChild(B);}else if(O==="insert"){let B=[[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[F,V]of B){let _=e.createElement("button");_.type="button",_.textContent=F,_.addEventListener("click",V),g.appendChild(_);}}else if(O==="inspector"&&r)g.appendChild(r);else if(O==="comments"){f.length===0&&(g.textContent=t("pptx.comments.noneOnSlide"));for(let _ of f){let N=chunkQPYQDJ2Q_cjs.w(e,"article","pptxv-mobile-comment"),W=e.createElement("textarea");W.value=_.text,W.setAttribute("aria-label",t("pptx.comments.edit"));let X=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-comment-actions"),ie=e.createElement("button");ie.type="button",ie.textContent=t("pptx.comments.save"),ie.addEventListener("click",()=>n.edit.comments.editComment(_.id,W.value));let G=e.createElement("button");G.type="button",G.textContent=_.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),G.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(_.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(_.id)),X.append(ie,G,K),N.append(W,X),g.appendChild(N);}let B=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-comment-add"),F=e.createElement("textarea");F.placeholder=t("pptx.comments.addPlaceholder"),F.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let V=e.createElement("button");V.type="button",V.textContent=t("pptx.comments.addComment"),V.addEventListener("click",()=>{n.edit.comments.addComment(F.value)&&(F.value="");}),B.append(F,V),g.appendChild(B);}else {let B=[[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[F,V,_]of B){if(_&&chunkYOEVEUFZ_cjs.cq(_,i))continue;let N=e.createElement("button");N.type="button",N.textContent=F,N.addEventListener("click",V),g.appendChild(N);}}},M=e.createElement("nav");M.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=O=>{if(x=chunkYOEVEUFZ_cjs.Pm(x,O),!x){k();return}L(x),a.hidden=false;for(let B of M.querySelectorAll("button"))B.setAttribute("aria-pressed",String(B.dataset.mobileAction===x));},I={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let O of chunkYOEVEUFZ_cjs.Qm({slideCount:0})){let B=O.key;if(B==="notes"&&chunkYOEVEUFZ_cjs.cq("notes",i))continue;let F=e.createElement("button");F.type="button",F.dataset.mobileAction=B,B==="notes"&&F.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),F.appendChild(chunkQPYQDJ2Q_cjs.K(e,I[B]));let V=chunkQPYQDJ2Q_cjs.w(e,"span");V.textContent=t(B==="inspector"?"pptx.field.format":`pptx.${B==="slides"?"sections.slides":B==="comments"?"toolbar.comments":B==="insert"?"mobileBar.insert":"notes.title"}`),F.appendChild(V),F.addEventListener("click",()=>{if(B==="notes"){n.nav.toggleNotes();return}if(B==="insert"){n.insert.insert("text");return}D(B);}),M.appendChild(F);}s.appendChild(M);let R=()=>{let O=chunkYOEVEUFZ_cjs.Qm({slideCount:v.length});for(let B of O){let F=M.querySelector(`button[data-mobile-action='${B.key}']`);if(!F)continue;let V=B.key==="insert"||B.key==="inspector"||B.key==="comments";F.disabled=B.disabled||V&&!S||B.key==="inspector"&&!r,F.setAttribute("aria-pressed",String(B.key==="notes"?y:B.key===x));}};return {el:s,update(O,B,F){b=O,v=B,f=F,x&&L(x),R();},setThumbnailRenderer(O,B,F){h=O,C=B,w=F,x==="slides"&&L(x);},toggle:D,close:k,setEditable(O){S=O,!S&&x&&["insert","inspector","comments"].includes(x)&&k(),R();},setNotesExpanded(O){y=O,R();}}}function ks(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=H(e,{label:t("pptx.mobileToolbar.menu"),icon:"menu",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),s=chunkYOEVEUFZ_cjs.cq("undo",o)?null:H(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),a=chunkYOEVEUFZ_cjs.cq("redo",o)?null:H(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-toolbar-spacer"),p=H(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunkYOEVEUFZ_cjs.cq("fullscreen",o)?null:H(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-toolbar-ai"),m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...s?[s.btn]:[],...a?[a.btn]:[],l,u,p.btn,...d?[d.btn]:[],m),{el:r,collaborationHost:m,aiHost:u,setEditState({editable:g,canUndo:x,canRedo:b}){for(let v of [i.btn,s?.btn,a?.btn])v&&(v.hidden=!g);m.hidden=!g,u.hidden=!g,s?.setDisabled(!x),a?.setDisabled(!b);}}}function Is(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-notes"),i=chunkQPYQDJ2Q_cjs.w(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 s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-notes-title");s.textContent=t("pptx.notes.title"),i.appendChild(s);let a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-notes-chevron");a.setAttribute("aria-hidden","true"),i.appendChild(a);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-notes-body");l.id="slide-notes-content",r.appendChild(l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-notes-toolbar");l.appendChild(p);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",p.appendChild(d);let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-notes-rich-editor");u.contentEditable="true",u.setAttribute("role","textbox"),u.setAttribute("aria-multiline","true"),u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),l.appendChild(u);let m=e.createElement("textarea");m.className="pptxv-notes-textarea",m.name="slide-notes",m.spellcheck=true,m.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),l.appendChild(m);let g=false,x=null,b=false,v=chunkYOEVEUFZ_cjs.tg(),f=[],S,y,h=k=>{v=k,u.hidden=!v,m.hidden=v,p.hidden=!b,d.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(v));},C=()=>{if(!b)return;let k=chunkYOEVEUFZ_cjs.ug(u);f=k.segments,o(k.text,k.segments);},w=(k,T,E)=>{let L=e.createElement("button");L.type="button",L.className="pptxv-notes-tool",L.textContent=k,L.title=T,L.setAttribute("aria-label",T),L.addEventListener("mousedown",M=>M.preventDefault()),L.addEventListener("click",()=>{u.focus(),E(),C();}),p.insertBefore(L,d);};w("B",t("pptx.notes.bold"),()=>chunkYOEVEUFZ_cjs.wg("bold")),w("I",t("pptx.notes.italic"),()=>chunkYOEVEUFZ_cjs.wg("italic")),w("U",t("pptx.notes.underline"),()=>chunkYOEVEUFZ_cjs.wg("underline")),w("S",t("pptx.notes.strikethrough"),()=>chunkYOEVEUFZ_cjs.wg("strikeThrough")),w("\u2022",t("pptx.notes.bulletList"),()=>{f=chunkYOEVEUFZ_cjs.vg(u,f,"bullet").segments,u.innerHTML=chunkYOEVEUFZ_cjs.qg(f);}),w("1.",t("pptx.notes.numberedList"),()=>{f=chunkYOEVEUFZ_cjs.vg(u,f,"numbered").segments,u.innerHTML=chunkYOEVEUFZ_cjs.qg(f);}),w("\u2192",t("pptx.notes.indent"),()=>{f=chunkYOEVEUFZ_cjs.vg(u,f,"indent").segments,u.innerHTML=chunkYOEVEUFZ_cjs.qg(f);}),w("\u2190",t("pptx.notes.outdent"),()=>{f=chunkYOEVEUFZ_cjs.vg(u,f,"outdent").segments,u.innerHTML=chunkYOEVEUFZ_cjs.qg(f);}),w("\u2197",t("pptx.notes.insertLink"),()=>{let k=e.getSelection()?.toString()??"",T=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!T)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),k)??k;chunkYOEVEUFZ_cjs.yg(chunkYOEVEUFZ_cjs.xg(T),E);}),w("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!S)return;let k=chunkYOEVEUFZ_cjs.zg([S],L=>t("pptx.notes.slideN",{n:L}),y),T=e.createElement("iframe");T.setAttribute("aria-hidden","true"),T.setAttribute("sandbox","allow-same-origin"),T.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(T);let E=T.contentWindow?.document;if(!E){T.remove();return}E.open(),E.write(k),E.close(),setTimeout(()=>{T.contentWindow?.focus(),T.contentWindow?.print(),setTimeout(()=>T.remove(),1e3);},200);}),d.addEventListener("click",()=>{v?(C(),m.value=chunkYOEVEUFZ_cjs.pg(f)):(f=chunkYOEVEUFZ_cjs.og(m.value),u.innerHTML=chunkYOEVEUFZ_cjs.qg(f)),h(!v);});let A=()=>{b&&o(m.value);};m.addEventListener("change",A),m.addEventListener("blur",A),u.addEventListener("blur",C);let P=()=>{r.dataset.collapsed=g?"false":"true",i.setAttribute("aria-expanded",String(g)),l.hidden=!g,a.textContent=g?"\u25BE":"\u25B8";};return P(),h(v),{el:r,update({slide:k,editable:T,notesStyle:E}){b=T,S=k,y=E;let L=k!==void 0;m.disabled=!L,m.readOnly=!b,u.contentEditable=String(b&&L),p.hidden=!b,m.placeholder=t(L?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let M=k?.id??null;M!==x&&(x=M,f=chunkYOEVEUFZ_cjs.sg(k,E),m.value=chunkYOEVEUFZ_cjs.pg(f),u.innerHTML=chunkYOEVEUFZ_cjs.qg(f));},setExpanded(k){g=k,P();}}}function RE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-present-swatch");s.type="button",s.dataset.pptxPresentSwatch=i,s.style.backgroundColor=i;let a=t(n.swatchLabelKey,{color:i});return s.title=a,s.setAttribute("aria-label",a),s.addEventListener("click",l=>{l.stopPropagation(),n.onPick(i);}),o.appendChild(s),{color:i,swatch:s}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let s of r){let a=s.color===i;s.swatch.classList.toggle("is-selected",a),s.swatch.setAttribute("aria-pressed",String(a));}}}}function je(e,t,n){let o=H(e,{label:t(n.labelKey),icon:n.icon,className:`pptxv-present-btn${n.className?` ${n.className}`:""}`,onClick:n.onClick});return o.btn.dataset.pptxPresentControl=n.id,o}function NI(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-group"),r=je(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let s=je(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),a=RE(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,s.btn,a.el),{el:o,toggle:r,palette:a,bar:i}}function OE(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-toolbar-wrap");for(let[P,k]of Object.entries(chunkYOEVEUFZ_cjs.Ok()))r.style.setProperty(P,k);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-toolbar");i.setAttribute("data-pptx-present-toolbar",""),i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria")),r.appendChild(i);let s=P=>{let k=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-divider");return k.dataset.pptxPresentControl=P,k},a=je(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-present-counter");l.dataset.pptxPresentControl="counter";let p=je(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-timer");d.dataset.pptxPresentControl="timer",d.title=t("pptx.presenter.elapsed"),d.setAttribute("aria-label",t("pptx.presenter.elapsed"));let u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-present-elapsed");d.append(chunkQPYQDJ2Q_cjs.K(e,"timer"),u);let m=je(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),g=null,x=()=>{f.palette.setOpen(g==="pen"),S.palette.setOpen(g==="highlighter");},b=()=>{g=null,x();},v=P=>NI(e,t,{...P,onSelect:()=>{b(),n.setTool(P.id);},onPick:k=>{b(),n.setColor(k),n.setTool(P.id),o(P.id,k);},onCaret:()=>{g=g===P.id?null:P.id,x();}}),f=v({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunkYOEVEUFZ_cjs.Kk,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),S=v({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunkYOEVEUFZ_cjs.Lk,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),y=je(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{b(),n.setTool("eraser");}}),h=je(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{b(),n.toggleBlackboard();}}),C=je(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),w=je(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),A=je(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(a.btn,l,p.btn,s("divider-navigation"),d,s("divider-timer"),m.btn,f.el,S.el,y.btn,h.btn,C.btn,s("divider-tools"),w.btn,A.btn);for(let P of ["pointerdown","click"])i.addEventListener(P,k=>k.stopPropagation());return {wrap:r,bar:i,previous:a,counter:l,next:p,elapsedText:u,laser:m,pen:f,highlighter:S,eraser:y,blackboard:h,clear:C,presenterView:w,end:A,closePalettes:b}}function Ls(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunkYOEVEUFZ_cjs.Kk[0]??"#ff0000",s=chunkYOEVEUFZ_cjs.Lk[0]??"#ffff00",a=OE(e,t,o,(A,P)=>{A==="pen"?i=P:s=P,d();}),{wrap:l,bar:p}=a;function d(){a.counter.textContent=chunkYOEVEUFZ_cjs.Nk(r.current,r.total),a.previous.setDisabled(r.current<=0),a.next.setDisabled(r.current>=r.total-1),a.laser.setActive(r.tool==="laser"),a.pen.toggle.setActive(r.tool==="pen"),a.highlighter.toggle.setActive(r.tool==="highlighter"),a.eraser.setActive(r.tool==="eraser"),a.blackboard.setActive(chunkYOEVEUFZ_cjs.Rk(r.blackout,r.tool)),a.clear.setDisabled(!r.hasAnnotations),a.presenterView.setActive(r.presenterViewActive),a.pen.bar.style.backgroundColor=i,a.highlighter.bar.style.backgroundColor=s,a.pen.palette.setValue(i),a.highlighter.palette.setValue(s);}let u=null,m=false,g=false,x=0,b=null,v=A=>{m=A,l.style.opacity=A?"1":"0",l.style.pointerEvents=A?"auto":"none";},f=()=>{u!==null&&(window.clearTimeout(u),u=null);},S=()=>{f(),u=window.setTimeout(()=>{g||v(false);},chunkYOEVEUFZ_cjs.Jk);},y=A=>{let P=n.getBoundingClientRect();if(chunkYOEVEUFZ_cjs.Mk(A.clientY,P.height,P.top)){v(true),S();return}v(true),S();},h=A=>{A.target instanceof Node&&!p.contains(A.target)&&a.closePalettes();};l.addEventListener("mouseenter",()=>{g=true,f(),v(true);}),l.addEventListener("mouseleave",()=>{g=false,S();});let C=()=>{a.elapsedText.textContent=chunkYOEVEUFZ_cjs.fk(x===0?0:Date.now()-x);},w=()=>{e.removeEventListener("mousemove",y),e.removeEventListener("mousedown",h),f(),b!==null&&(window.clearInterval(b),b=null),x=0,g=false,a.closePalettes(),C(),v(false);};return v(false),C(),d(),{el:l,update(A){Object.assign(r,A),d();},setPresenting(A){if(!A){w();return}x=Date.now(),C(),b??=window.setInterval(C,1e3),e.addEventListener("mousemove",y),e.addEventListener("mousedown",h),v(true),S();},toggleVisible(){if(m){f(),v(false);return}v(true),S();},dispose(){w(),l.remove();}}}function Ms(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=H(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),s=!chunkYOEVEUFZ_cjs.cq("navigation",o),a=s?H(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,l=s?H(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-presentation-touch-counter");p.setAttribute("aria-live","polite");for(let d of [i.btn,a?.btn,l?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...a?[a.btn]:[],...l?[l.btn]:[],p),{el:r,update(d,u){let m=chunkYOEVEUFZ_cjs.rn(d,u);a?.setDisabled(m.previousDisabled),l?.setDisabled(m.nextDisabled),p.textContent=m.counterLabel;}}}function Ds(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-protected-view");o.hidden=true,o.setAttribute("role","alert"),o.appendChild(chunkQPYQDJ2Q_cjs.K(e,"lock"));let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-protected-view-text"),i=chunkQPYQDJ2Q_cjs.w(e,"strong");i.textContent=t("pptx.security.protectedViewTitle"),r.append(i,": ",t("pptx.options.trust.protectedViewInfo"));let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-protected-view-enable");return s.type="button",s.textContent=t("pptx.security.enableEditing"),s.addEventListener("click",n),o.append(r,s),{el:o,setActive(a){o.hidden=!a;}}}function HE(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-readonly-banner");s.dataset.testid="pptx-readonly-banner",s.hidden=true,s.setAttribute("role","alert"),s.appendChild(chunkQPYQDJ2Q_cjs.K(e,"lock"));let a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-readonly-banner-text"),l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-readonly-banner-edit");l.type="button",l.dataset.testid="pptx-readonly-edit-anyway",l.textContent=t("pptx.readOnly.editAnyway"),l.addEventListener("click",n);let p=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-readonly-banner-dismiss");p.type="button",p.dataset.testid="pptx-readonly-dismiss",p.setAttribute("aria-label",t("pptx.readOnly.dismiss")),p.appendChild(chunkQPYQDJ2Q_cjs.K(e,"close")),p.addEventListener("click",o);let d=chunkQPYQDJ2Q_cjs.w(e,"form","pptxv-readonly-banner-password-form");d.dataset.testid="pptx-readonly-password-form",d.hidden=true;let u=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-sr-only");u.textContent=t("pptx.readOnly.passwordLabel"),u.setAttribute("for","pptxv-readonly-password-input");let m=chunkQPYQDJ2Q_cjs.w(e,"input","pptxv-readonly-banner-password-input");m.id="pptxv-readonly-password-input",m.type="password",m.dataset.testid="pptx-readonly-password-input",m.placeholder=t("pptx.readOnly.passwordPlaceholder");let g=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-readonly-banner-unlock");g.type="submit",g.dataset.testid="pptx-readonly-unlock",g.textContent=t("pptx.readOnly.unlock");let x=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-readonly-banner-password-cancel");x.type="button",x.dataset.testid="pptx-readonly-password-cancel",x.textContent=t("pptx.common.cancel"),x.addEventListener("click",i);let b=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-readonly-banner-password-error");return b.dataset.testid="pptx-readonly-password-error",b.setAttribute("role","alert"),b.id="pptxv-readonly-password-error",b.hidden=true,d.addEventListener("submit",v=>{v.preventDefault(),r(m.value);}),d.append(u,m,g,x,b),s.append(a,l,p,d),{el:s,update(v,f,S){let y=v!==null&&!f;if(s.hidden=!y,!y||!v)return;s.dataset.kind=v.kind??"",a.textContent=t(v.messageKey);let h=S.promptOpen;if(l.hidden=h,p.hidden=h,d.hidden=!h,!h)return;m.disabled=S.checking,g.disabled=S.checking;let C=S.error!==null;m.setAttribute("aria-invalid",String(C)),m.setAttribute("aria-describedby",C?b.id:""),C||m.removeAttribute("aria-describedby"),b.hidden=!C,C&&(b.textContent=t(S.error==="wrong-password"?"pptx.readOnly.wrongPassword":"pptx.readOnly.unsupportedAlgorithm"));}}}function FE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let s=chunkQPYQDJ2Q_cjs.w(e,"header","pptxv-eqdlg-header"),a=chunkQPYQDJ2Q_cjs.w(e,"h2");a.textContent=t("pptx.equation.insertTitle");let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-eqdlg-close");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.settings.close")),s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-eqdlg-preview"),d=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-eqdlg-field"),u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-eqdlg-label");u.textContent=t("pptx.equation.latexInput");let m=e.createElement("textarea");m.className="pptxv-eqdlg-input",m.rows=3,m.placeholder="\\frac{a}{b} + \\sqrt{c}",m.spellcheck=false;let g=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-eqdlg-hint");g.textContent=t("pptx.equation.latexHint"),d.append(u,m,g);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-eqdlg-field"),b=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-eqdlg-label");b.textContent=t("pptx.equation.templates");let v=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-eqdlg-grid"),f=[],S=chunkYOEVEUFZ_cjs.Hb();for(let[M,D]of chunkYOEVEUFZ_cjs.Eb.entries()){let I=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-eqdlg-template");I.type="button",I.title=t(D.i18nKey);let R=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-eqdlg-template-math");R.innerHTML=S[M]??"";let O=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-eqdlg-template-label");O.textContent=t(D.i18nKey),I.append(R,O),I.addEventListener("click",()=>{m.value=D.latex,k(),m.focus();}),v.appendChild(I),f.push(I);}x.append(b,v);let y=()=>{let M=m.value.trim();if(!M)return null;try{let D=chunkYOEVEUFZ_cjs.Db(M);return Object.keys(D).length>0?D:null}catch{return null}},h=true,C,w=chunkQPYQDJ2Q_cjs.w(e,"footer","pptxv-eqdlg-footer"),A=H(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>E(false)}),P=H(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let M=y();M&&(n(M,C),m.value="",k(),E(false));}});P.btn.classList.add("is-primary"),w.append(A.btn,P.btn),i.append(s,p,d,x,w),o.append(r,i);let k=()=>{let M=chunkYOEVEUFZ_cjs.Gb(m.value);M?(p.classList.remove("is-empty"),p.innerHTML=M):(p.classList.add("is-empty"),p.textContent=t("pptx.equation.previewPlaceholder"));let D=m.value;for(let[I,R]of f.entries())R.classList.toggle("is-active",chunkYOEVEUFZ_cjs.Eb[I]?.latex===D);P.setDisabled(!h||y()===null);};m.addEventListener("input",k),o.addEventListener("keydown",M=>{M.stopPropagation(),M.key==="Escape"?E(false):M.key==="Enter"&&(M.ctrlKey||M.metaKey)&&(M.preventDefault(),P.btn.click());}),r.addEventListener("click",()=>E(false)),l.addEventListener("click",()=>E(false));let T=false,E=M=>{T=M,o.hidden=!T,T?m.focus():C=void 0;},L=()=>{let M=C!==void 0,D=t(M?"pptx.equation.editTitle":"pptx.equation.insertTitle"),I=t(M?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),a.textContent=D,P.btn.textContent=I,P.btn.title=I,P.btn.setAttribute("aria-label",I);};return k(),{el:o,toggle:()=>{T||(C=void 0,m.value="",L(),k()),E(!T);},setOpen:E,isOpen:()=>T,setEditable(M){h=M,m.disabled=!M,P.setDisabled(!M||y()===null);},openEdit(M,D){C=M,m.value=chunkYOEVEUFZ_cjs.Cb(D),L(),k(),E(true);}}}function Rs(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(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 s=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-findreplace-checkbox"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),s.append(a,e.createTextNode(t("pptx.findReplace.matchCase")));let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-findreplace-status");l.setAttribute("aria-live","polite");let p=()=>{let f=n.search(r.value,a.checked);l.textContent=f>0?t("pptx.findReplace.matchCount",{current:1,total:f}):t("pptx.findReplace.noMatches");},d=H(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:p}),u=H(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,a.checked),p();}}),m=H(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,a.checked),p();}}),g=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",p),r.addEventListener("keydown",f=>{f.key==="Escape"&&(f.stopPropagation(),v(false));});let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-findreplace-row");x.append(r,i,s,d.btn,u.btn,m.btn,g.btn),o.append(x,l);let b=false,v=f=>{b=f,o.hidden=!b,b&&r.focus();};return {el:o,toggle:()=>v(!b),setOpen:v,isOpen:()=>b,setEditable(f){i.disabled=!f,u.setDisabled(!f),m.setDisabled(!f);}}}function VE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=He(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:g=>n.setSlideBackgroundColor(g),onCommit:g=>n.pushRecentColor?.(g)},"#ffffff"),i=H(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),s=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-format-background-row"),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-format-background-label");l.textContent=t("pptx.slideBackground.colour"),a.append(l,r.el,i.btn,s.btn),o.appendChild(a);let p=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-format-background-hide-row"),d=e.createElement("input");d.type="checkbox",d.addEventListener("change",()=>{n.setHideBackgroundGraphics(d.checked);}),p.append(d,e.createTextNode(t("pptx.slideBackground.hideBackgroundGraphics"))),o.appendChild(p);let u=false,m=g=>{u=g,o.hidden=!u;};return {el:o,toggle:()=>m(!u),setOpen:m,isOpen:()=>u,setEditable(g){r.setDisabled(!g),i.setDisabled(!g);}}}function Fo(e,t,n){if(!t)return n;let o=e(t);return o&&o!==t?o:n}function Os(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-gallery-tile");i.type="button",i.setAttribute(chunkYOEVEUFZ_cjs.ur,n.id),i.setAttribute("aria-pressed",String(n.applied)),i.classList.toggle("is-applied",n.applied);let s=chunkYOEVEUFZ_cjs.yr(n,t);return i.title=s,i.setAttribute("aria-label",s),i.innerHTML=n.previewSvg,i.disabled=o,i.addEventListener("mousedown",a=>a.preventDefault()),i.addEventListener("click",()=>r(n)),i}function _I(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-gallery-section");if(i.dataset.gallerySection=n.id,n.titleKey||n.title){let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-gallery-heading");a.textContent=Fo(t,n.titleKey,n.title??""),i.appendChild(a);}let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-gallery-grid");s.style.gridTemplateColumns=`repeat(${Math.max(1,n.columns)}, max-content)`;for(let a of n.items)s.appendChild(Os(e,t,a,o,r));return i.appendChild(s),i}function BE(e,t,n,o,r,i){n.replaceChildren(...o.sections.filter(s=>s.items.length>0).map(s=>_I(e,t,s,r,i)));}var GI=4;function Ye(e,t,n){let o=()=>{let{top:r,left:i,right:s}=chunkYOEVEUFZ_cjs.bl(t.getBoundingClientRect(),{alignRight:n?.alignRight});e.style.position="fixed",e.style.margin="0",e.style.top=`${r+GI}px`,e.style.left=i===null?"auto":`${i}px`,e.style.right=s===null?"auto":`${s}px`;};return o(),window.addEventListener("resize",o),document.addEventListener("scroll",o,true),{update:o,destroy(){window.removeEventListener("resize",o),document.removeEventListener("scroll",o,true);}}}var UI={shapeStyles:"paintbrush",shapeEffects:"sparkles",wordArtStyles:"font-color",pictureStyles:"image",bullets:"bullet-list",numbering:"numbered-list",tableStyles:"table",chartStyles:"chart",chartColors:"paintbrush",chartQuickLayout:"layout",smartArtStyles:"smart-art",smartArtColors:"paintbrush",themeColors:"paintbrush",themeFonts:"font-color"};function st(e,t,n,o,r={}){let i=n.mode==="inline",s=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-gallery${i?" pptxv-gallery-inline":""}`);r.chevronOnly||s.setAttribute(chunkYOEVEUFZ_cjs.Wq,n.control);let a=i?chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-gallery-strip"):null,l=chunkQPYQDJ2Q_cjs.w(e,"button",i?"pptxv-gallery-more":`pptxv-dropdown-trigger pptxv-gallery-trigger${r.chevronOnly?" pptxv-gallery-chevron":""}`);l.type="button",l.setAttribute(chunkYOEVEUFZ_cjs.sr,n.gallery),l.setAttribute("aria-haspopup","true"),l.setAttribute("aria-expanded","false");let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-dropdown-text");!i&&!r.chevronOnly&&l.append(chunkQPYQDJ2Q_cjs.K(e,UI[n.gallery]),p),l.appendChild(chunkQPYQDJ2Q_cjs.K(e,"chevron-down"));let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-gallery-popup");d.setAttribute(chunkYOEVEUFZ_cjs.tr,n.gallery),d.setAttribute("role","dialog"),d.hidden=true,a&&s.appendChild(a),s.append(l);let u=null,m=true,g=null,x=true,b=h=>{s.contains(h.target)||f(false);};function v(){x&&u&&(BE(e,t,d,u,m,S),x=false);}function f(h){let C=h&&!m;C&&v(),d.hidden=!C,C?s.append(d):d.remove(),l.setAttribute("aria-expanded",String(C)),l.classList.toggle("is-active",C),g?.destroy(),g=C?Ye(d,l):null,e.removeEventListener("pointerdown",b),C&&e.addEventListener("pointerdown",b);}let S=h=>{f(false),o.pick(n.gallery,h.id),chunkYOEVEUFZ_cjs.Gl(s.closest(".pptxv"));};l.addEventListener("mousedown",h=>h.preventDefault()),l.addEventListener("click",h=>{h.stopPropagation(),f(d.hidden===true);}),s.addEventListener("keydown",h=>{h.key==="Escape"&&d.hidden!==true&&(h.stopPropagation(),f(false),l.focus());});let y={el:s,trigger:l,popup:d,isOpen:()=>d.hidden!==true,close:()=>f(false),refresh(h,C){u=chunkYOEVEUFZ_cjs.lr(n.gallery,h),m=!C||u.disabled||!chunkYOEVEUFZ_cjs.xr(u);let w=Fo(t,u.labelKey,u.label);p.textContent=w;let A=i?t("pptx.gallery.more",{name:w}):w;l.title=A,l.setAttribute("aria-label",A),l.disabled=m,s.classList.toggle("is-disabled",m),a?.replaceChildren(...chunkYOEVEUFZ_cjs.wr(u).map(P=>Os(e,t,P,m,S))),x=true,d.hidden!==true&&v(),m?f(false):g?.update();}};return o.register(y),y}function Hs(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");o.setAttribute(chunkYOEVEUFZ_cjs.Vq,t);let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row"),i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");return i.textContent=n,o.append(r,i),{el:o,row:r}}function KI(e,t,n,o){let r=Hs(e,n.group,Fo(t,n.labelKey,n.label));for(let i of n.galleries)r.row.appendChild(st(e,t,i,o).el);return r.el}function zE(e,t,n){let o=new Map;for(let{id:r}of chunkYOEVEUFZ_cjs.aq){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content pptxv-ribbon-contextual-content");i.dataset.ribbonContextualPane=r;for(let s of chunkYOEVEUFZ_cjs.nr[r])i.appendChild(KI(e,t,s,n));o.set(r,i);}return o}function NE(e,t,n){for(let[o,r]of t)n.includes(o)?r.parentElement!==e&&e.appendChild(r):r.remove();}var _E={element:null};function yt(e){let t=[],n=_E,o=false,r=[],i=()=>{for(let s of t)s.refresh(n,o);};return {context:()=>n,register(s){t.push(s),s.refresh(n,o);},sync(s,a){let l=s??_E,p=[l.element,l.theme?.colorScheme,l.theme?.fontScheme,l.theme?.name,l.resolveStyleMatrix!==void 0,a];n=l,o=a,!(p.length===r.length&&p.every((d,u)=>d===r[u]))&&(r=p,i());},pick(s,a){let l=chunkYOEVEUFZ_cjs.mr(s,a,n);l&&e(l);},closeAll(){for(let s of t)s.close();}}}function GE(e,t,n){let o=chunkYOEVEUFZ_cjs.gg(t);if(!o||!("textSegments"in t))return;let r=chunkYOEVEUFZ_cjs.Bh(t.textSegments);if(chunkYOEVEUFZ_cjs.hg(e)!==r)return false;let i=chunkYOEVEUFZ_cjs.ys(e,r),s=e.ownerDocument.createElement("div");return s.dataset.pptxTextFlow="",chunkYOEVEUFZ_cjs.Mh(s,o)?(e.replaceChildren(s),n(s,o),i&&chunkYOEVEUFZ_cjs.ig(o,s,i),true):false}function UE(e){let t=Array.from(e.childNodes).filter(n=>n.nodeType===3?(n.nodeValue??"").length>0:n instanceof HTMLElement&&!n.hasAttribute("data-pptx-bullet-marker"));return t.length!==1||!(t[0]instanceof HTMLElement)?false:t[0].tagName==="BR"||UE(t[0])}function WI(e){return (e.matches("[data-seg-idx]")&&!e.hasAttribute("data-pptx-bullet-marker")?e:e.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])"))?.dataset.segIdx}function KE(e,t){let o=e.getSelection()?.anchorNode,i=(o?.nodeType===Node.ELEMENT_NODE?o:o?.parentElement)?.closest("[data-seg-idx]");if(!i||!t.contains(i))return;let s=i.closest("div, p"),a=s?.hasAttribute("data-pptx-text-flow"),l=a&&s?.previousElementSibling?.hasAttribute("data-pptx-text-flow")&&s.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])")===i,p=s&&s!==t&&(!a||l)&&t.contains(s)?s:i,d=p.previousElementSibling,u=d instanceof HTMLElement&&WI(d)===i.dataset.segIdx&&UE(d)?d:p;u.dataset.pptxParagraphStart="";}function WE(e,t,n){let o=e.ownerDocument,r=e;if(t?.length){let i=o.createElement("div");i.dataset.pptxTextFlow="",r=i,t.forEach((s,a)=>{let l=o.createElement("span");l.dataset.segIdx=String(a),chunkYOEVEUFZ_cjs.ag(s)&&(l.dataset.pptxBulletMarker="",l.contentEditable="false");let p=a>0&&chunkYOEVEUFZ_cjs.ag(t[a-1]),d=s.bulletInfo&&!s.bulletInfo.none;s.text.length===0&&a===t.length-1&&(p||d)?(l.dataset.pptxEmptyRun="",l.appendChild(o.createElement("br"))):l.textContent=s.text,i.appendChild(l);}),e.appendChild(i);}else e.textContent=n;return r}function Gr(e,t,n){let o=chunkYOEVEUFZ_cjs.e(e)?e:void 0,r=o?.textSegments,i=o?.textStyle,s=n?.elementId===e.id?chunkYOEVEUFZ_cjs.Qr(n,t):void 0;return {text:t,textSegments:s?.textSegments??chunkYOEVEUFZ_cjs.oh(t,r,i)}}function Fs(e,t){if(chunkYOEVEUFZ_cjs.e(e))return chunkYOEVEUFZ_cjs.Eg(e.textStyle,e.height,t)}function Vs(e,t){return chunkYOEVEUFZ_cjs.e(e)?chunkYOEVEUFZ_cjs.Fg(e.textStyle,e.height,t):"unchanged"}function Ur(e){return !e||!chunkYOEVEUFZ_cjs.e(e)||!chunkYOEVEUFZ_cjs._e(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function io(){if(typeof document>"u")return;let e=document.querySelector("[data-inline-editor]");return e?chunkYOEVEUFZ_cjs.hg(e):void 0}function Kr(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,s=chunkYOEVEUFZ_cjs.e(i)?i:void 0,a=s?.text??"",l=s?.textStyle?.fontSize,p=s?.textStyle?.fontFamily,d=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-inline-editor pptxv-inline-text-editor",{...chunkQPYQDJ2Q_cjs.z(i),...typeof l=="number"?{fontSize:`${l}px`}:{},...p!==void 0?{fontFamily:p}:{},left:`${o.x*r}px`,top:`${o.y*r}px`,width:`${o.width}px`,height:`${o.height}px`,transform:`scale(${r})`,transformOrigin:"top left"});d.contentEditable="true",d.spellcheck=e.spellCheck??false,d.dataset.inlineEditor="",d.setAttribute("role","textbox"),d.setAttribute("aria-multiline","true");let u=d,m=!!e.collaboration?.patcher.isActive(),g=m?void 0:chunkYOEVEUFZ_cjs.gg(i),x,b;g?(u=t.createElement("div"),u.dataset.pptxTextFlow="",chunkYOEVEUFZ_cjs.Mh(u,g),d.append(u)):m||(u=WE(d,s?.textSegments,a));let v=chunkYOEVEUFZ_cjs.hg(d),f=false,S=()=>{let w=x?.read();return w?.kind==="supported"?w.snapshot:void 0},y=w=>{if(f)return;let A=x?.read();if(w!==null&&m&&A?.kind==="unsupported"&&(A.reason==="composition-active"||A.reason==="input-active"))return;let P=A?.kind==="supported"?A.snapshot:void 0;m&&!P&&(w=null),w!==null&&P&&(w=P.text),f=true,d.contains(t.activeElement)&&chunkYOEVEUFZ_cjs.Hl(d),w!==null&&(P?chunkYOEVEUFZ_cjs.Rr(i,w,P):w!==v)&&(P?e.onCommit(w,P):e.onCommit(w)),x?.dispose(),d.remove(),e.onClose();};d.addEventListener("input",w=>{if(x){x.refresh();return}w.inputType==="insertParagraph"&&KE(t,d),e.onInput?.(chunkYOEVEUFZ_cjs.hg(d));}),d.addEventListener("blur",()=>y(chunkYOEVEUFZ_cjs.hg(d))),d.addEventListener("keydown",w=>{if(e.onLiveFormatKey?.(w)){w.preventDefault(),w.stopPropagation();return}w.stopPropagation(),w.key==="Escape"&&(w.preventDefault(),y(chunkYOEVEUFZ_cjs.hg(d)));}),d.addEventListener("pointerdown",w=>w.stopPropagation());let h=()=>{let w=x?.readSelection();e.onSelectionChange?.(w?w.kind==="supported"?w.selection:null:chunkYOEVEUFZ_cjs.lg(s?.textSegments));};d.addEventListener("keyup",h),d.addEventListener("pointerup",h);let C=(w,A)=>{d.style.textDecoration="none",d.style.textDecorationLine="none",u=w,x=chunkYOEVEUFZ_cjs.jg(w,A,{isCurrent:()=>!f&&d.isConnected,onRead:P=>e.onInput?.(P.kind==="supported"?P.snapshot.text:P.text,P.kind==="supported"?P.snapshot:void 0)});};return n.appendChild(d),m?(b=chunkYOEVEUFZ_cjs.Nh(d,i,{...e.collaboration,onCancel:()=>y(null)}),x=b,b||y(null)):g&&C(u,g),f||d.focus(),f||chunkYOEVEUFZ_cjs.Sg(u),{el:d,checkModel:b?.checkModel,readAccepted:b?.readAccepted,activateList:w=>!f&&(!!x||GE(d,w,C)),readSnapshot:S,readList:()=>x?.read(),formatSnapshot:w=>x?.format(w).kind==="supported",commit:()=>y(chunkYOEVEUFZ_cjs.hg(d)),cancel:()=>y(null)}}var $I=24,qI=1,jI=400;function Le(e){return e!==void 0&&chunkYOEVEUFZ_cjs.e(e)}function Wr(e){return e!==void 0&&chunkYOEVEUFZ_cjs.f(e)}function lt(e){let t=Le(e)?e.textStyle:void 0,n=Le(e)?e.textSegments?.find(i=>i.text)?.style:void 0,o=t?.fontSize??n?.fontSize,r=Le(e)?chunkYOEVEUFZ_cjs.bg(e):"none";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:o===void 0?$I:chunkYOEVEUFZ_cjs.fh(o),fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,colorRef:t?.colorRef??n?.colorRef,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:r==="mixed"?"none":r,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function St(e,t){if(!Le(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>chunkYOEVEUFZ_cjs.cg(r,t));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function ao(e,t){let n=lt(e);return St(e,{[t]:!n[t]})}function Vo(e,t){let n=Math.min(jI,Math.max(qI,t));return St(e,{fontSize:chunkYOEVEUFZ_cjs.gh(n)})}function Bs(e,t){return Vo(e,lt(e).fontSize+t)}function $E(e,t){return Vo(e,chunkYOEVEUFZ_cjs.ih(lt(e).fontSize,t))}function zs(e,t,n){return St(e,{color:t,colorRef:n})}function Ns(e,t){return St(e,{highlightColor:t})}function pt(e,t){return Wr(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function _s(e,t){return St(e,{fontFamily:t})}function Gs(e,t){return St(e,{characterSpacing:t})}var YI={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Us(e){let t=lt(e).hasTextShadow;return St(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:YI)}function Ks(e,t){if(!Le(e)||!e.textSegments)return {};let n=io(),o=n!==void 0?chunkYOEVEUFZ_cjs.oh(n,e.textSegments,e.textStyle):e.textSegments,r=chunkYOEVEUFZ_cjs.Tg(o,null,t);return {textSegments:r,text:r.map(i=>i.text).join("")}}function Ws(e){return St(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})}function se(e,t){return e.setAttribute(chunkYOEVEUFZ_cjs.Vq,t),e}function z(e,t){return e.setAttribute(chunkYOEVEUFZ_cjs.Wq,t),e}function qE(e,...t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-contents");return n.append(...t),n}function q(e,t,...n){return se(qE(e,...n),t)}function Ot(e,t,...n){return z(qE(e,...n),t)}function jE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-arrange-extras"),r=H(e,{label:t("pptx.contextMenu.group"),icon:"group",onClick:n.groupSelected}),i=H(e,{label:t("pptx.contextMenu.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),s=e.createElement("input");return s.type="number",s.className="pptxv-field-input pptxv-arrange-stroke",s.min="0",s.max="120",s.step="0.5",s.value=String(chunkYOEVEUFZ_cjs.Ur),s.title=t("pptx.ribbon.strokeWidth"),s.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),s.addEventListener("keydown",a=>a.stopPropagation()),s.addEventListener("change",()=>{let a=Number.parseFloat(s.value);Number.isFinite(a)&&n.setStrokeWidth(Math.max(0,a));}),z(r.btn,"home.arrange.group"),z(i.btn,"home.arrange.ungroup"),z(s,"home.arrange.outlineWidth"),o.append(r.btn,i.btn,s),{el:o,update({editable:a,selectedCount:l,selectionGroupable:p,selectedElement:d}){let u=d??null;r.setDisabled(!chunkYOEVEUFZ_cjs.Vr(a,l,p)),i.setDisabled(!chunkYOEVEUFZ_cjs.Wr(a,u)),s.disabled=!chunkYOEVEUFZ_cjs.Xr(a,u);let m=chunkYOEVEUFZ_cjs.Yr(u);e.activeElement!==s&&(s.value=String(m));}}}function $s(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown"),o=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-dropdown-trigger");if(o.type="button",o.title=t.label,o.setAttribute("aria-label",t.label),o.setAttribute("aria-haspopup","menu"),o.setAttribute("aria-expanded","false"),o.dataset.pptxRibbonControl=t.control,t.icon&&o.appendChild(chunkQPYQDJ2Q_cjs.K(e,t.icon)),t.text){let a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-dropdown-text");a.textContent=t.text,o.appendChild(a);}o.appendChild(chunkQPYQDJ2Q_cjs.K(e,"chevron-down"));let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t.label),r.hidden=true,n.append(o,r);let i=null,s=a=>{r.hidden=!a,o.setAttribute("aria-expanded",String(a)),o.classList.toggle("is-active",a),i?.destroy(),i=a?Ye(r,o):null;};for(let a of t.items){if(a.groupLabel){let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown-group");p.setAttribute("role","presentation"),p.textContent=a.groupLabel,r.appendChild(p);}let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-dropdown-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,Object.assign(l.dataset,a.dataset??{}),l.addEventListener("click",()=>{s(false),a.run(),l.blur(),chunkYOEVEUFZ_cjs.Gl(n.closest(".pptxv"));}),r.appendChild(l);}return o.addEventListener("click",a=>{a.stopPropagation(),s(r.hidden===true);}),e.addEventListener("pointerdown",a=>{!r.hidden&&!n.contains(a.target)&&s(false);}),{el:n,trigger:o,setDisabled(a,l){o.disabled=a,o.title=a&&l?l:t.label,a&&s(false);},close:()=>s(false)}}var YE="pptx.image.cropHint";function XE(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-arrange-extras"),i=chunkYOEVEUFZ_cjs.cq("mergeShapes",o)?null:$s(e,{label:t(chunkYOEVEUFZ_cjs.Nl),icon:"merge-shapes",control:"merge-shapes",items:chunkYOEVEUFZ_cjs.Pl.map(l=>({label:t(l.labelKey),dataset:{pptxMergeOp:l.operation},run:()=>n.mergeShapes(l.operation)}))});i&&(z(i.el,"home.arrange.mergeShapes"),r.appendChild(i.el));let s=null,a=null;if(!chunkYOEVEUFZ_cjs.cq("crop",o)){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-arrange-extras");l.dataset.pptxCropControls="true",s=H(e,{label:t(chunkYOEVEUFZ_cjs.bt),icon:"crop",onClick:n.toggleCropMode}),s.btn.dataset.pptxRibbonControl="crop";let p=null,d=chunkYOEVEUFZ_cjs.Ss.map(u=>{let m=u.group!==p?t(chunkYOEVEUFZ_cjs.Ts[u.group]):void 0;return p=u.group,{label:u.id,groupLabel:m,dataset:{pptxCropAspect:u.id},run:()=>n.cropToAspect(u.ratioWidth,u.ratioHeight)}});d.push({label:t(chunkYOEVEUFZ_cjs.ct),dataset:{pptxCropAction:"fill"},run:n.cropFill},{label:t(chunkYOEVEUFZ_cjs.dt),dataset:{pptxCropAction:"fit"},run:n.cropFit}),a=$s(e,{label:t(chunkYOEVEUFZ_cjs.et),control:"crop-menu",items:d}),z(l,"home.arrange.crop"),l.append(s.btn,a.el),r.appendChild(l);}return {el:r,update({editable:l,canMergeShapes:p,canCrop:d,cropActive:u}){if(i?.setDisabled(!(l&&p),t(chunkYOEVEUFZ_cjs.Ol)),s){let m=l&&(d||u);s.setDisabled(!m),s.btn.title=t(m?chunkYOEVEUFZ_cjs.bt:YE),s.setActive(u);}a?.setDisabled(!(l&&(d||u)),t(YE));}}}var XI=[{edge:"left",label:"left",icon:"align-left"},{edge:"centerH",label:"center",icon:"align-center"},{edge:"right",label:"right",icon:"align-right"},{edge:"top",label:"top",icon:"align-top"},{edge:"middle",label:"middle",icon:"align-middle"},{edge:"bottom",label:"bottom",icon:"align-bottom"}],QE=3;function ZE(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(r,"home.arrange");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.arrange.groupLabel"),r.appendChild(s);let a=XI.map(C=>H(e,{label:t(chunkQPYQDJ2Q_cjs.F[C.label]),icon:C.icon,onClick:()=>n.alignElements(C.edge)})),l=H(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),p=H(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),d=H(e,{label:t("pptx.arrange.format"),icon:"copy",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});d.btn.title=t("pptx.arrange.formatPainter");let u=H(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),m=H(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),g=H(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),x=H(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),b=H(e,{label:t("pptx.arrange.back"),icon:"send-back",onClick:n.sendToBack});b.btn.title=t("pptx.arrange.sendToBack");let v=H(e,{label:t("pptx.arrange.front"),icon:"bring-front",onClick:n.bringToFront});v.btn.title=t("pptx.arrange.bringToFront");let f=H(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",textLabel:t("pptx.arrange.duplicate"),onClick:n.duplicate}),S=H(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),y=jE(e,t,n),h=XE(e,t,n,o);return z(u.btn,"home.arrange.flipHorizontal"),z(m.btn,"home.arrange.flipVertical"),z(g.btn,"home.arrange.sendBackward"),z(x.btn,"home.arrange.bringForward"),z(b.btn,"home.arrange.sendToBack"),z(v.btn,"home.arrange.bringToFront"),z(f.btn,"home.arrange.duplicate"),z(S.btn,"home.arrange.delete"),i.append(Ot(e,"home.arrange.align",...a.map(C=>C.btn),l.btn,p.btn),d.btn,u.btn,m.btn,y.el,h.el,g.btn,x.btn,b.btn,v.btn,f.btn,S.btn),{el:r,update({editable:C,hasSelection:w,formatPainterActive:A,selectedCount:P,selectionGroupable:k,selectedElement:T,canMergeShapes:E=false,canCrop:L=false,cropActive:M=false}){let D=C&&w;for(let I of [...a,u,m,g,x,b,v,f,S])I.setDisabled(!D);y.update({editable:C,selectedCount:P,selectionGroupable:k,selectedElement:T}),h.update({editable:C,canMergeShapes:E,canCrop:L,cropActive:M}),d.setDisabled(!C||!w&&!A),d.btn.dataset.active=String(A),l.setDisabled(!C||P<QE),p.setDisabled(!C||P<QE);}}}function JE(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(o,"home.clipboard");let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let s=H(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),a=H(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),l=H(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),p=H(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return p.btn.dataset.testid="format-painter-toggle",z(s.btn,"home.clipboard.paste"),z(a.btn,"home.clipboard.cut"),z(l.btn,"home.clipboard.copy"),z(p.btn,"home.clipboard.formatPainter"),r.append(s.btn,a.btn,l.btn,p.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:m,formatPainterActive:g}){s.setDisabled(!m||!u),a.setDisabled(!m||!d),l.setDisabled(!d),p.setDisabled(!m||!d&&!g),p.btn.dataset.active=String(g);}}}function xe(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown"),o=chunkQPYQDJ2Q_cjs.w(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=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkQPYQDJ2Q_cjs.K(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let s=false,a,l=new Map,p=null,d=b=>{s=b,i.hidden=!b,o.setAttribute("aria-expanded",String(b)),o.classList.toggle("is-active",b),b?(p?.destroy(),p=Ye(i,o)):(p?.destroy(),p=null);},u=()=>{for(let[b,v]of l){let f=a!==void 0&&v===a;b.classList.toggle("is-selected",f),b.setAttribute("aria-selected",String(f));}},m=null,g=b=>JSON.stringify(b.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),x=b=>{i.replaceChildren(),l.clear();for(let v of b){if(v.groupLabel){let S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-dropdown-group");S.setAttribute("role","presentation"),S.textContent=v.groupLabel,i.appendChild(S);}let f=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-dropdown-item");if(f.type="button",f.setAttribute("role","option"),f.setAttribute("aria-selected","false"),f.textContent=v.label,v.hint){let S=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-dropdown-item-hint");S.textContent=v.hint,f.appendChild(S);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{d(false),t.onSelect(v.value);}),i.appendChild(f),l.set(f,v.value);}u();};return x(t.items),o.addEventListener("click",b=>{b.stopPropagation(),d(!s);}),e.addEventListener("pointerdown",b=>{s&&!n.contains(b.target)&&d(false);}),{el:n,setDisabled(b){o.disabled=b,b&&d(false);},setTriggerText(b){r.textContent=b;},setSelected(b){a=b,u();},setItems(b){let v=g(b);v!==m&&(m=v,x(b),u());},close:()=>d(false)}}var so=chunkYOEVEUFZ_cjs.wo;function QI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function dt(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-swatch-picker"),r=chunkQPYQDJ2Q_cjs.w(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(chunkQPYQDJ2Q_cjs.K(e,n.icon));let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-swatch-menu");s.hidden=true,o.appendChild(s);let a=null;if(n.onSelectTheme){let y=n.onSelectTheme;a=Ie(e,t,C=>{v(false),y(C);}),s.appendChild(a.el);let h=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-swatch-standard-label");h.textContent=t("pptx.colorPicker.standardColors"),s.appendChild(h);}let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-swatch-grid");s.appendChild(l);let p=Rt(e,t,y=>{v(false),n.onSelect(y);});s.appendChild(p.el);let d=n.fallback,u,m=new Map,g=()=>{for(let[y,h]of m)y.classList.toggle("is-selected",h===d);p.setSelected(d),a?.setSelected(u,d),i.style.backgroundColor=d;},x=false,b=null,v=y=>{x=y,s.hidden=!y,r.setAttribute("aria-expanded",String(y)),r.classList.toggle("is-active",y),y?(b?.destroy(),b=Ye(s,r)):(b?.destroy(),b=null);};for(let y of n.swatches){let h=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=y,h.setAttribute("aria-label",y),h.addEventListener("click",()=>{v(false),n.onSelect(y);}),l.appendChild(h),m.set(h,y);}let f=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-swatch-custom");f.textContent=t("pptx.ribbon.customColour");let S=e.createElement("input");return S.type="color",S.className="pptxv-swatch-custom-input",S.addEventListener("input",()=>n.onSelect(S.value)),f.appendChild(S),s.appendChild(f),r.addEventListener("click",y=>{y.stopPropagation(),v(!x);}),e.addEventListener("pointerdown",y=>{x&&!o.contains(y.target)&&v(false);}),g(),{el:o,setValue(y){d=QI(y,n.fallback),S.value=d,g();},setDisabled(y){r.disabled=y,p.setDisabled(y),a?.setDisabled(y),y&&v(false);},setRecentColors(y){p.setColors(y);},setThemeColorMap(y){a?.setThemeColorMap(y);},setSelectedRef(y){u=y,g();}}}var ZI=12;function eT(e,t,n,o=yt(()=>{})){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(r,"home.drawing");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.groupDrawing"),r.appendChild(s);let a=xe(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunkYOEVEUFZ_cjs.oo.slice(0,ZI).map(x=>({label:t(x.i18nKey),value:x.type})),onSelect:x=>n.insertShape(x)}),l=xe(e,{triggerLabel:t("pptx.ribbon.arrange"),triggerText:t("pptx.ribbon.arrange"),icon:"bring-front",items:[{label:t("pptx.contextMenu.bringForward"),value:n.bringForward},{label:t("pptx.contextMenu.sendBackward"),value:n.sendBackward},{label:t("pptx.contextMenu.bringToFront"),value:n.bringToFront},{label:t("pptx.contextMenu.sendToBack"),value:n.sendToBack},{label:t("pptx.ribbon.group"),value:n.groupSelected},{label:t("pptx.ribbon.ungroup"),value:n.ungroupSelected}],onSelect:x=>x()}),p=dt(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:chunkYOEVEUFZ_cjs.Ki,fallback:"#ffffff",onSelect:x=>n.setShapeFill(x),onSelectTheme:x=>n.setShapeFill(x.hex,x.ref)}),d=dt(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:chunkYOEVEUFZ_cjs.Ki,fallback:"#000000",onSelect:x=>n.setShapeStroke(x),onSelectTheme:x=>n.setShapeStroke(x.hex,x.ref)}),u=x=>{let b=chunkYOEVEUFZ_cjs.or.find(v=>v.control===x);if(!b)throw new Error(`Missing fixed gallery placement ${x}`);return b},m=st(e,t,u("home.drawing.quickStyles"),o),g=st(e,t,u("home.drawing.shapeEffects"),o);return z(a.el,"home.drawing.shapes"),z(l.el,"home.drawing.arrange"),z(p.el,"home.drawing.shapeFill"),z(d.el,"home.drawing.shapeOutline"),i.append(a.el,l.el,m.el,p.el,d.el,g.el),{el:r,update({editable:x,hasSelection:b,recentColors:v,themeColorMap:f,fillColor:S,fillColorRef:y,strokeColor:h,strokeColorRef:C}){a.setDisabled(!x);let w=x&&b;l.setDisabled(!w),p.setDisabled(!w),d.setDisabled(!w),p.setRecentColors(v??[]),d.setRecentColors(v??[]),p.setThemeColorMap(f),d.setThemeColorMap(f),p.setSelectedRef(y),d.setSelectedRef(C),S!==void 0&&p.setValue(S),h!==void 0&&d.setValue(h);}}}function tT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(o,"home.editing");let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let s=H(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),a=H(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),l=JI(e,t,n);return z(s.btn,"home.editing.find"),z(a.btn,"home.editing.replace"),z(l.el,"home.editing.select"),r.append(s.btn,a.btn,l.el),{el:o,update({editable:p}){l.setDisabled(!p);}}}function JI(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu-host"),r=H(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>a(!s)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let s=false,a=p=>{s=p,i.hidden=!p,r.btn.setAttribute("aria-expanded",String(p)),r.btn.classList.toggle("is-active",p);},l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-primary-menu-item");return l.type="button",l.textContent=t("pptx.editing.selectAll"),l.addEventListener("mousedown",p=>p.preventDefault()),l.addEventListener("click",()=>{a(false),n.selectAll();}),i.appendChild(l),e.addEventListener("pointerdown",p=>{s&&!o.contains(p.target)&&a(false);}),o.append(r.btn,i),{el:o,setDisabled(p){r.btn.disabled=p,l.disabled=p,p&&a(false);}}}var oT=2;function nT(e,t){return chunkYOEVEUFZ_cjs.po(t).flatMap(n=>n.entries.map((o,r)=>({label:o.family,value:o.family,style:{fontFamily:o.family},...r===0?{groupLabel:e(n.labelKey)}:{},...o.themeRole?{hint:e(`pptx.font.role.${o.themeRole}`)}:{}})))}function rT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(o,"home.font");let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let s=xe(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:nT(t,{}),onSelect:n.setFontFamily});s.el.classList.add("pptxv-font-family-dd");let a=xe(e,{triggerLabel:t("pptx.ribbon.fontSize"),triggerText:"24",items:chunkYOEVEUFZ_cjs.hh.map(w=>({label:String(w),value:w})),onSelect:n.setFontSize});a.el.classList.add("pptxv-font-size-dd");let l=H(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),p=H(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),d=H(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),u=H(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),m=H(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),g=H(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-oT)}),x=H(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(oT)}),b=H(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),v=xe(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkYOEVEUFZ_cjs.jh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.setCharacterSpacing});v.el.querySelector(".pptxv-dropdown-text")?.remove();let f=xe(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkYOEVEUFZ_cjs.lh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.changeCase});f.el.querySelector(".pptxv-dropdown-text")?.remove();let S=dt(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:so,fallback:"#000000",onSelect:n.setTextColor,onSelectTheme:w=>n.setTextColor(w.hex,w.ref)}),y=dt(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:so,fallback:"#ffff00",onSelect:n.setHighlightColor});z(s.el,"home.font.fontFamily"),z(a.el,"home.font.fontSize"),z(g.btn,"home.font.decreaseFontSize"),z(x.btn,"home.font.increaseFontSize"),z(l.btn,"home.font.bold"),z(p.btn,"home.font.italic"),z(d.btn,"home.font.underline"),z(u.btn,"home.font.strikethrough"),z(m.btn,"home.font.shadow"),z(b.btn,"home.font.clearFormatting"),z(v.el,"home.font.characterSpacing"),z(f.el,"home.font.changeCase"),z(S.el,"home.font.fontColor"),z(y.el,"home.font.highlightColor"),r.append(s.el,a.el,g.btn,x.btn,l.btn,p.btn,d.btn,u.btn,m.btn,b.btn,v.el,f.el,S.el,y.el);let h=[l,p,d,u],C=[g,x,l,p,d,u,m,b,v,f,S,y];return {el:o,update({canFormat:w,editable:A,text:P,themeFonts:k,embeddedFontFamilies:T,customFontFamilies:E,recentColors:L,themeColorMap:M}){s.setItems(nT(t,{themeFonts:k,embeddedFonts:T,customFonts:E})),l.setActive(P.bold),p.setActive(P.italic),d.setActive(P.underline),u.setActive(P.strikethrough),m.setActive(P.hasTextShadow),s.setTriggerText(P.fontFamily??chunkYOEVEUFZ_cjs.qo(P.placeholderType,k)),s.setSelected(P.fontFamily),a.setTriggerText(String(P.fontSize)),a.setSelected(P.fontSize),S.setValue(P.color),y.setValue(P.highlightColor),S.setRecentColors(L??[]),y.setRecentColors(L??[]),S.setThemeColorMap(M),S.setSelectedRef(P.colorRef),s.setDisabled(!A||!w),a.setDisabled(!A||!w);for(let D of C)D.setDisabled(!A||!w);for(let D of h)(!A||!w)&&D.setActive(false);}}}var eL=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],tL=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],qs=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft",control:"home.paragraph.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter",control:"home.paragraph.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight",control:"home.paragraph.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify",control:"home.paragraph.justify"}];function iT(e,t,n,o,r){let i=chunkYOEVEUFZ_cjs.or.find(a=>a.control===o),s=z(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-split-gallery"),o);return s.appendChild(n),i&&s.appendChild(st(e,t,i,r,{chevronOnly:true}).el),s}function aT(e,t,n,o=yt(()=>{})){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(r,"home.paragraph");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.paragraph"),r.appendChild(s);let a=H(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),l=H(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList});for(let{btn:v}of [a,l])v.addEventListener("mousedown",f=>f.preventDefault());let p=H(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),d=H(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),u=qs.map(v=>H(e,{label:t(v.labelKey),icon:v.icon,onClick:()=>n.setTextAlign(v.align)})),m=xe(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkYOEVEUFZ_cjs.kh.map(v=>({label:v.label,value:v.value})),onSelect:n.setLineSpacing});m.el.querySelector(".pptxv-dropdown-text")?.remove();let g=xe(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"change-case",items:eL.map(v=>({label:t(v.labelKey),value:v.value})),onSelect:n.setTextDirection});g.el.querySelector(".pptxv-dropdown-text")?.remove();let x=xe(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:tL.map(v=>({label:t(v.labelKey),value:v.count})),onSelect:n.setColumnCount});x.el.querySelector(".pptxv-dropdown-text")?.remove(),z(p.btn,"home.paragraph.decreaseIndent"),z(d.btn,"home.paragraph.increaseIndent");for(let[v,f]of qs.entries())z(u[v].btn,f.control);z(m.el,"home.paragraph.lineSpacing"),z(g.el,"home.paragraph.textDirection"),z(x.el,"home.paragraph.columns"),i.append(iT(e,t,a.btn,"home.paragraph.bullets",o),iT(e,t,l.btn,"home.paragraph.numbering",o),p.btn,d.btn,...u.map(v=>v.btn),m.el,g.el,x.el);let b=[a,l,p,d,...u,m,g,x];return {el:r,update({canFormat:v,editable:f,text:S}){a.setActive(S.listType==="bullet"),l.setActive(S.listType==="numbered");for(let[y,h]of qs.entries())u[y].setActive(S.align===h.align);m.setSelected(S.lineSpacing);for(let y of b)y.setDisabled(!f||!v);}}}var js=1280,Ys=720,lT=144,pT=lT/js,oL=Math.round(Ys*pT),sT;function dT(e,t,n,o){sT??=chunkQPYQDJ2Q_cjs.J();let r=chunkYOEVEUFZ_cjs.Jf(n,{slideWidth:js,slideHeight:Ys,...o?{scheme:o}:{},idFor:a=>`tpl-preview-${n}-${a}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-preview",{width:`${lT}px`,height:`${oL}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return s.setAttribute("aria-hidden","true"),s.appendChild(chunkQPYQDJ2Q_cjs.A({document:e,slide:i,canvasSize:{width:js,height:Ys},mediaDataUrls:new Map,registry:sT,t,scale:pT})),s}function cT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.slideTemplates.galleryTitle")),i.tabIndex=-1;let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog-header"),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog-heading"),l=chunkQPYQDJ2Q_cjs.w(e,"h2");l.textContent=t("pptx.slideTemplates.galleryTitle");let p=chunkQPYQDJ2Q_cjs.w(e,"p");p.textContent=t("pptx.slideTemplates.galleryDescription"),a.append(l,p);let d=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",s.append(a,d);let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog-body"),m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(m);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tpl-dialog-footer"),x=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tpl-dialog-cancel");x.type="button",x.textContent=t("pptx.slideTemplates.cancel");let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tpl-dialog-insert");b.type="button",b.textContent=t("pptx.slideTemplates.insert"),b.disabled=true,g.append(x,b),i.append(s,u,g),o.append(r,i);let v,f=null;function S(A){v=A,b.disabled=false;for(let P of m.querySelectorAll('[role="option"]')){let k=P.dataset.templateId===A;P.setAttribute("aria-selected",String(k)),P.classList.toggle("is-selected",k);}}function y(A){A&&(n.onInsert(A),C());}function h(){let A=n.getScheme?.();m.replaceChildren();for(let P of chunkYOEVEUFZ_cjs.If){let k=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tpl-option");k.type="button",k.dataset.templateId=P.id,k.setAttribute("role","option"),k.setAttribute("aria-selected",String(v===P.id)),k.setAttribute("aria-label",t(P.nameKey)),k.title=t(P.descriptionKey),k.classList.toggle("is-selected",v===P.id),k.appendChild(dT(e,t,P.id,A));let T=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tpl-option-label");T.textContent=t(P.nameKey),k.append(T),k.addEventListener("click",()=>S(P.id)),k.addEventListener("dblclick",()=>y(P.id)),m.appendChild(k);}}function C(){o.hidden||(o.hidden=true,f?.focus(),f=null);}function w(A){if(A.key==="Escape"){A.preventDefault(),C();return}if(A.key!=="Tab")return;let P=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(P.length===0)return;let k=P[0],T=P[P.length-1];A.shiftKey&&e.activeElement===k?(A.preventDefault(),T.focus()):!A.shiftKey&&e.activeElement===T&&(A.preventDefault(),k.focus());}return r.addEventListener("click",C),d.addEventListener("click",C),x.addEventListener("click",C),b.addEventListener("click",()=>y(v)),o.addEventListener("keydown",w),{el:o,open(A){let P=e.defaultView?.HTMLElement;f=P&&e.activeElement instanceof P?e.activeElement:null,h(),o.parentElement!==A&&A.appendChild(o),o.hidden=false,i.focus();},close:C}}var nL=128,rL=72;function mT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu pptxv-layout-menu");o.dataset.testid="layout-gallery-menu",o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);});let s=null;return {el:o,setItems(a,l){let p=JSON.stringify([a.map(d=>[d.path,d.name]),l.currentLayoutPath??"",a.map(d=>l.previews.get(d.path)?1:0)]);if(p!==s){s=p,o.replaceChildren();for(let d of a){let u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunkYOEVEUFZ_cjs.vo(d,l.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(iL(e,l.previews.get(d.path),l.renderPreview));let m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-layout-tile-name");m.textContent=d.name,u.appendChild(m),u.title=d.name,u.addEventListener("click",()=>{i(false),n(d);}),o.appendChild(u);}}},toggle:()=>i(!r),close:()=>i(false)}}function iL(e,t,n){let o=chunkYOEVEUFZ_cjs.uo(t,nL,rL),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-layout-tile-thumb");r.style.width=`${o.boxWidth}px`,r.style.height=`${o.boxHeight}px`,r.style.backgroundColor=o.backgroundColor;let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-layout-tile-surface");i.style.width=`${o.surfaceWidth}px`,i.style.height=`${o.surfaceHeight}px`,i.style.transform=`scale(${o.scale})`;let s=t&&n?n(t,o):void 0;s&&i.appendChild(s);for(let a of o.frames){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-layout-tile-frame");l.style.left=`${a.left}px`,l.style.top=`${a.top}px`,l.style.width=`${a.width}px`,l.style.height=`${a.height}px`,l.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(l);}return r.appendChild(i),r}function uT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(o,"home.slides");let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slides-split"),a=H(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-slides-caret");l.type="button",l.title=t("pptx.home.chooseLayout"),l.setAttribute("aria-label",t("pptx.home.chooseLayout")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkQPYQDJ2Q_cjs.K(e,"chevron-down"));let p=mT(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a.btn,l,p.el);let d=cT(e,t,{onInsert:f=>n.insertSlideFromTemplate(f),getScheme:()=>n.getTemplateScheme?.()}),u=H(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let f=u.btn.closest(".pptxv")??e.body;d.open(f);}}),m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-slides-menu-host"),g=H(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>x.toggle()});g.btn.setAttribute("aria-haspopup","menu");let x=mT(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));m.append(g.btn,x.el);let b=H(e,{label:t("pptx.animations.reset"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});b.btn.title=t("pptx.sections.resetSlideTitle");let v=H(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return v.btn.title=t("pptx.sections.addSection"),z(s,"home.slides.newSlide"),z(u.btn,"home.slides.slideTemplates"),z(m,"home.slides.layout"),z(b.btn,"home.slides.reset"),z(v.btn,"home.slides.section"),r.append(s,u.btn,m,b.btn,v.btn),{el:o,update({editable:f,slideCount:S,layouts:y,layoutPreviews:h,currentLayoutPath:C}){let w=y.length>0,A=h??new Map;p.setItems(y,{previews:A,renderPreview:n.renderLayoutPreview}),x.setItems(y,{previews:A,currentLayoutPath:C,renderPreview:n.renderLayoutPreview}),a.setDisabled(!f),l.hidden=!w,l.disabled=!f,u.setDisabled(!f),g.setDisabled(!f||!w),b.setDisabled(!f||S===0),v.setDisabled(!f||S===0),f||(p.close(),x.close(),d.close());}}}var aL=100;function xT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=n.galleryHub??yt(g=>r.applyRibbonGalleryResult(g)),s=JE(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=uT(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,insertSlideFromTemplate:r.insertSlideFromTemplate,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName")),getTemplateScheme:()=>r.getTemplateScheme(),renderLayoutPreview:(g,x)=>chunkQPYQDJ2Q_cjs.A({document:e,slide:{id:`layout-preview-${g.path}`,rId:"",slideNumber:0,elements:g.elements.slice(0,aL),backgroundColor:x.backgroundColor},canvasSize:{width:x.surfaceWidth,height:x.surfaceHeight},mediaDataUrls:new Map,registry:chunkQPYQDJ2Q_cjs.J(),t})}),l=rT(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=aT(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing,setTextDirection:r.setTextDirection,setColumnCount:r.setColumnCount},i),d=tT(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),u=eT(e,t,{insertShape:g=>r.insert("shape",g),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke},i),m=ZE(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,setStrokeWidth:r.setShapeStrokeWidth,toggleFormatPainter:r.toggleFormatPainter,duplicate:r.duplicateSelected,delete:r.deleteSelected,mergeShapes:r.mergeShapes,toggleCropMode:r.toggleCropMode,cropToAspect:r.cropToAspect,cropFill:r.cropFill,cropFit:r.cropFit},n.hiddenActions);return o.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el),{el:o,update({editable:g,selectedElement:x,hasClipboard:b,slideCount:v,selectedCount:f,selectionGroupable:S,formatPainterActive:y,layouts:h,layoutPreviews:C,currentLayoutPath:w,themeFonts:A,embeddedFontFamilies:P,customFontFamilies:k,recentColors:T,themeColorMap:E,canMergeShapes:L,canCrop:M,cropActive:D}){let I=Le(x),R=lt(x),O=x!==void 0,B=x&&chunkYOEVEUFZ_cjs.f(x)?x.shapeStyle:void 0;s.update({hasSelection:O,hasClipboard:b,editable:g,formatPainterActive:y}),a.update({editable:g,slideCount:v,layouts:h,layoutPreviews:C,currentLayoutPath:w}),l.update({canFormat:I,editable:g,text:R,themeFonts:A,embeddedFontFamilies:P,customFontFamilies:k,recentColors:T,themeColorMap:E}),p.update({canFormat:I,editable:g,text:R}),d.update({editable:g}),u.update({editable:g,hasSelection:O,recentColors:T,themeColorMap:E,fillColor:B?.fillColor,fillColorRef:B?.fillColorRef,strokeColor:B?.strokeColor,strokeColorRef:B?.strokeColorRef}),m.update({editable:g,hasSelection:O,formatPainterActive:y,selectedCount:f,selectionGroupable:S,selectedElement:x,canMergeShapes:L,canCrop:M,cropActive:D});}}}function gT(e,t,n){return {editable:e,selectedElement:t,hasClipboard:n.hasClipboard,formatPainterActive:n.formatPainterActive??false,slideCount:n.slideCount,selectedCount:n.selectedCount??0,selectionGroupable:n.selectionGroupable??true,layouts:n.layouts??[],layoutPreviews:n.layoutPreviews,currentLayoutPath:n.currentLayoutPath,themeFonts:n.themeFonts,embeddedFontFamilies:n.embeddedFontFamilies,customFontFamilies:n.customFontFamilies,recentColors:n.recentColors??[],themeColorMap:n.themeColorMap,canMergeShapes:n.canMergeShapes,canCrop:n.canCrop,cropActive:n.cropActive}}function Xs(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,s=a=>{i=a,r.hidden=!a,o?.(a);};for(let a of n){a.separatorBefore&&r.appendChild(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu-sep"));let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-primary-menu-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,l.addEventListener("click",()=>{s(false),a.run();}),r.appendChild(l);}return e.addEventListener("pointerdown",a=>{i&&!r.parentElement?.contains(a.target)&&s(false);}),{el:r,toggle:()=>s(!i),close:()=>s(false),isOpen:()=>i}}function bT(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 chunkYOEVEUFZ_cjs.cq("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function fT(e,t,n){let{file:o,nav:r}=t,i=o.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,s=[];chunkYOEVEUFZ_cjs.cq("export",n)||s.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.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()},{label:e("pptx.file.saveAsPptTooltip"),run:()=>o.saveAsPpt()});let a=chunkYOEVEUFZ_cjs.br(i,"print");return a&&s.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true}),s.push({label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage(),separatorBefore:!a},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true}),chunkYOEVEUFZ_cjs.br(i,"options")&&s.push({label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")}),s.push({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()}),s}function vT(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-primary"),i=H(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-present-split"),a=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-present-main");a.type="button",a.title=t("pptx.present.presentTooltip"),a.textContent=t("pptx.toolbar.present"),a.addEventListener("click",()=>n.slideShow.startFromCurrent());let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-present-caret");l.type="button",l.title=t("pptx.present.optionsTooltip"),l.setAttribute("aria-label",t("pptx.present.optionsTooltip")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkQPYQDJ2Q_cjs.K(e,"chevron-down"));let p=Xs(e,t("pptx.present.optionsTooltip"),bT(t,n,o),f=>{l.classList.toggle("is-active",f),l.setAttribute("aria-expanded",String(f));});l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a,l,p.el),r.appendChild(s);let d=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent=t("pptx.customShows.addShow"),d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-primary-sep"));let u=H(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(u.btn);let m=H(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()}),g=n.nav.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq;chunkYOEVEUFZ_cjs.br(g,"options")&&r.appendChild(m.btn);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-primary-menu-host"),b=Xs(e,t("pptx.ribbon.moreActions"),fT(t,n,o)),v=H(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>b.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),x.append(v.btn,b.el),r.appendChild(x),{el:r,setEditState({editable:f}){r.hidden=!f,f||(p.close(),b.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var Bo=[{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"}],$r="home";function Qs(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let s=new Map,a=new Map;for(let x of chunkYOEVEUFZ_cjs.dq(Bo,o)){let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-ribbon-tab");x.id==="file"&&b.classList.add("pptxv-ribbon-tab-file"),b.type="button",b.setAttribute("role","tab");let v=t(x.labelKey);b.textContent=v,b.addEventListener("click",()=>n(x.id)),i.appendChild(b),s.set(x.id,b),a.set(x.id,v);}let l=new Map,p=[],d=null,u=null,m=()=>{let x=[...s,...l];for(let[b,v]of x){let f=b===d;v.classList.toggle("is-active",f),v.setAttribute("aria-selected",String(f));}},g=x=>{if(!(x.length===p.length&&x.every((b,v)=>p[v]===b))){p=[...x];for(let b of l.values())b.remove();l.clear();for(let b of x){let v=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-ribbon-tab pptxv-ribbon-tab-contextual");v.type="button",v.setAttribute("role","tab"),v.setAttribute(chunkYOEVEUFZ_cjs.vr,b),v.textContent=t(chunkYOEVEUFZ_cjs.qr(b)),v.addEventListener("click",()=>n(b)),i.insertBefore(v,u),l.set(b,v);}m();}};if(r){u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tabrow-spacer"),i.appendChild(u);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-tabrow-actions");if(!chunkYOEVEUFZ_cjs.cq("record",o)){let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-tabrow-record");b.type="button",b.title=t("pptx.titleBar.record"),b.setAttribute("aria-label",t("pptx.titleBar.record"));let v=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-tabrow-record-dot");v.setAttribute("aria-hidden","true");let f=chunkQPYQDJ2Q_cjs.w(e,"span");f.textContent=t("pptx.titleBar.record"),b.append(v,f),b.addEventListener("click",()=>r.startRecording()),x.appendChild(b);}i.appendChild(x);}return {el:i,setActive(x){d=x,m();},setContextualTabs:g,setHiddenTabs(x){for(let[b,v]of s)v.hidden=b!=="file"&&x.has(b);},applyScreenTips(x){for(let[b,v]of s){let f=x(a.get(b)??"");f?v.title=f:v.removeAttribute("title");}}}}var sL=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkYOEVEUFZ_cjs.Ic},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkYOEVEUFZ_cjs.Kc},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkYOEVEUFZ_cjs.Jc}];function hT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of sL){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-gallery-column"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-animation-gallery-caption");a.textContent=t(i.labelKey);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-gallery-items");for(let p of i.presets){let d=t(`pptx.animation.preset.${p}`),u=H(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,p)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function zo(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 No(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");i.setAttribute("aria-label",t(n));for(let s of o){let a=e.createElement("option");a.value=s,a.textContent=t(`${n}.${s}`),i.appendChild(a);}return r.appendChild(i),{label:r,select:i}}function yT(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint"),i.addEventListener("dragover",a=>a.preventDefault()),i.addEventListener("drop",a=>{a.preventDefault();let l=a.dataTransfer?.getData("text/plain");l&&r.moveAnimation(l,o);});let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-animation-timeline-name");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${n.join(", ")}`,i.append(s),i}function ST(e,t,n,o,r,i,s,a){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-row");l.draggable=s,l.addEventListener("dragstart",m=>m.dataTransfer?.setData("text/plain",n.elementId)),l.addEventListener("dragover",m=>m.preventDefault()),l.addEventListener("drop",m=>{m.preventDefault();let g=m.dataTransfer?.getData("text/plain");g&&a.moveAnimation(g,o);}),l.classList.toggle("is-selected",n.elementId===i);let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-animation-timeline-name");p.textContent=`${o+1}. ${chunkYOEVEUFZ_cjs.ud(n,t)}`;let d=H(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>a.reorderAnimation(n.elementId,"up")}),u=H(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>a.reorderAnimation(n.elementId,"down")});return d.setDisabled(!s||o===0),u.setDisabled(!s||o===r-1),l.append(p,d.btn,u.btn),l}function CT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(o,"animations.advancedAnimation");let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let s=H(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),a=H(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunkYOEVEUFZ_cjs._d)}),l=H(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),p=H(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});p.btn.title=t("pptx.animations.openPanelTooltip");let d=H(e,{label:t("pptx.animations.trigger"),icon:"cursor",textLabel:t("pptx.animations.trigger"),onClick:n.openAnimationPanel}),u=H(e,{label:t("pptx.animations.painter"),icon:"copy",textLabel:t("pptx.animations.painter"),onClick:()=>{}}),m=H(e,{label:t("pptx.animations.remove"),icon:"trash",textLabel:t("pptx.animations.remove"),onClick:n.removeAnimation});m.btn.title=t("pptx.animations.removeTooltip"),z(l.btn,"animations.animation.effectOptions"),z(p.btn,"animations.advancedAnimation.animationPane"),z(d.btn,"animations.advancedAnimation.trigger"),z(u.btn,"animations.advancedAnimation.animationPainter"),z(m.btn,"animations.advancedAnimation.remove"),r.append(s.btn,a.btn,l.btn,p.btn,d.btn,u.btn,m.btn);let g=[s,a,l,d,m];return {el:o,setDisabled(x){for(let b of g)b.setDisabled(x);u.setDisabled(true);}}}var wT=0;function ET(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup");se(n,"animations.timing");let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),wT+=1;let i=`pptx-animation-start-${wT}`,s=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-field-label");s.htmlFor=i,s.textContent=t("pptx.animations.start");let a=e.createElement("select");a.id=i,a.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),a.appendChild(u);}let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.animations.duration");let p=e.createElement("input");return p.type="number",p.min="0",p.step="0.1",p.value="0.5",p.disabled=true,p.setAttribute("aria-label",t("pptx.animations.duration")),o.append(Ot(e,"animations.timing.start",s,a),Ot(e,"animations.timing.duration",l,p)),{el:n}}function TT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunkYOEVEUFZ_cjs.Vd){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-motion-path-gallery-column"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-motion-path-gallery-caption");a.textContent=t(chunkYOEVEUFZ_cjs.Wd(i));let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-motion-path-gallery-items");for(let p of chunkYOEVEUFZ_cjs.Yd(i)){let d=t(chunkYOEVEUFZ_cjs.Xd(p.id)),u=H(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(p.id)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function PT(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),i,s=()=>{chunkYOEVEUFZ_cjs.fe(e,i);},a=H(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:s});a.btn.title=t("pptx.animations.previewTooltip");let l=se(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup"),"animations.preview");z(a.btn,"animations.preview.preview");let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");p.appendChild(a.btn);let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),l.append(p,d),r.appendChild(l);let u=se(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup"),"animations.animation"),m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");m.textContent=t("pptx.animations.animation");let g=hT(e,t,(O,B)=>n.addAnimation(O,B));z(g.el,"animations.animation.gallery"),u.append(g.el,m),r.appendChild(u);let x=se(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup"),"animations.motionPath"),b=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");b.textContent=t("pptx.animation.motionPath");let v=TT(e,t,O=>n.applyMotionPath(O));z(v.el,"animations.motionPath.gallery"),x.append(v.el,b),r.appendChild(x);let f=CT(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(f.el),r.appendChild(ET(e,t).el);let S=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline"),y=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");y.textContent=t("pptx.animation.timeline");let h=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timeline-list"),C=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-animation-timing-controls"),w=e.createElement("select");w.setAttribute("aria-label",t("pptx.animation.trigger"));let A=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let O of A){let B=e.createElement("option");B.value=O,B.textContent=t(`pptx.animation.trigger.${O}`),w.appendChild(B);}let P=zo(e,t("pptx.animation.duration"),500),k=zo(e,t("pptx.animation.delay"),0),T=No(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),E=No(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),L=No(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),M=No(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=zo(e,t("pptx.animation.repeatCount"),1),I=zo(e,t("pptx.animations.triggerShape"),0);I.input.type="text",I.input.min="",I.input.max="",C.append(w,P.label,k.label,T.label,E.label,L.label,D.label,M.label,I.label),S.append(y,h,C),r.appendChild(S);let R=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:w.value,durationMs:P.input.valueAsNumber,delayMs:k.input.valueAsNumber,direction:T.select.value,sequence:E.select.value,timingCurve:L.select.value,repeatCount:D.input.valueAsNumber,repeatMode:M.select.value,triggerShapeId:w.value==="onShapeClick"?I.input.value:void 0});};for(let O of [w,T.select,E.select,L.select,M.select])O.addEventListener("change",R);return P.input.addEventListener("change",R),k.input.addEventListener("change",R),D.input.addEventListener("change",R),I.input.addEventListener("change",R),{el:r,update({editable:O,hasSelection:B,selectedElementId:F,animations:V,animationTimelineAnchors:_}){let N=!O||!B;g.setDisabled(N),v.setDisabled(N),a.setDisabled(N),f.setDisabled(N);let W=[...V].sort((K,j)=>(K.order??0)-(j.order??0));i=W.find(({elementId:K})=>K===F);let X=chunkYOEVEUFZ_cjs.id(W,_??[]),ie=new Map(W.map(K=>[K.elementId,K]));h.replaceChildren(...X.flatMap((K,j)=>{if(K.kind==="native")return [yT(e,t,K.targetIds,j,n)];let Y=ie.get(K.elementId);return Y?[ST(e,t,Y,j,X.length,F,O,n)]:[]})),S.hidden=W.length===0,C.hidden=!i,w.value=i?.trigger??"onClick",I.input.value=i?.triggerShapeId??"",I.label.hidden=w.value!=="onShapeClick",P.input.value=String(i?.durationMs??500),k.input.value=String(i?.delayMs??0);let G=i?chunkYOEVEUFZ_cjs.Hc([i],i.elementId):[];T.label.hidden=G.length===0;for(let K of T.select.options)K.hidden=!G.includes(K.value);T.select.value=chunkYOEVEUFZ_cjs.Gc(i,G)??"fromBottom",E.select.value=i?.sequence??"asOne",L.select.value=chunkYOEVEUFZ_cjs.Ec(i?.timingCurve),M.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let K of [w,P.input,k.input,T.select,E.select,L.select,M.select,D.input,I.input])K.disabled=!O;}}}function AT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-gallery-host"),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-theme-gallery");r.hidden=true,t.btn.title=n,t.btn.setAttribute("aria-haspopup","true"),t.btn.setAttribute("aria-expanded","false");let i=false,s=null,a=l=>{i=l,r.hidden=!l,t.btn.setAttribute("aria-expanded",String(l)),s?.destroy(),s=l?Ye(r,t.btn):null;};return t.btn.addEventListener("click",l=>{l.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",l=>{i&&!o.contains(l.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function lL(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function kT(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),a=AT(e,H(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle"));a.gallery.setAttribute("role","menu"),a.gallery.setAttribute("aria-label",t("pptx.themes.gallery.ariaLabel"));let l=chunkYOEVEUFZ_cjs.Ja.map(x=>{let b=H(e,{label:x.name,text:x.name,onClick:()=>{n.applyPresentationTheme(x.id),a.close();}});return b.btn.setAttribute("role","menuitemradio"),b.btn.setAttribute("aria-checked","false"),b.btn.dataset.themePreset=x.id,a.gallery.appendChild(lL(e,b,`linear-gradient(135deg, ${x.colorScheme.accent1}, ${x.colorScheme.accent2})`)),b}),p=AT(e,H(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{}}),t("pptx.ribbon.editThemeTitle"));p.gallery.classList.add("pptxv-deck-theme-editor"),p.gallery.dataset.deckThemeEditor="";let d=null,u={editable:false,colorScheme:void 0,fontScheme:void 0,themeName:void 0};p.button.btn.addEventListener("click",()=>{d||(d=Vr(e,t,{applyThemeEdit:x=>{n.applyThemeEdit(x),p.close();}}),d.update(u),p.gallery.appendChild(d.el));});let m=H(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});m.btn.title=t("pptx.ribbon.slideSizeTitle");let g=H(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});if(g.btn.title=t("pptx.ribbon.formatBackgroundTitle"),z(a.el,"design.themes.browseThemes"),z(p.el,"design.themes.editTheme"),z(m.btn,"design.customize.slideSize"),z(g.btn,"design.customize.formatBackground"),s.appendChild(q(e,"design.themes",a.el,p.el)),i){let x=Hs(e,"design.variants",t("pptx.ribbon.groupVariants"));for(let b of chunkYOEVEUFZ_cjs.or)b.control.startsWith("design.variants.")&&x.row.appendChild(st(e,t,b,i).el);s.appendChild(x.el),i.register({refresh(b,v){let f=chunkYOEVEUFZ_cjs.Ka(b.theme)?.id;for(let S of l)S.btn.setAttribute("aria-checked",String(S.btn.dataset.themePreset===f));u={editable:v,colorScheme:b.theme?.colorScheme,fontScheme:b.theme?.fontScheme,themeName:b.theme?.name},d?.update(u);},close(){}});}return s.appendChild(q(e,"design.customize",m.btn,g.btn)),{el:s,setEditable(x){a.button.setDisabled(!x),p.button.setDisabled(!x),g.setDisabled(!x);for(let b of l)b.setDisabled(!x);x||(a.close(),p.close());}}}var pL=[1,2,3,4,6,8,12,16],Zs=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select",control:"draw.tools.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen",control:"draw.tools.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter",control:"draw.tools.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser",control:"draw.tools.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function IT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=se(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.draw"),r.appendChild(s);let a=Zs.map(g=>H(e,{label:t(g.labelKey),icon:g.icon,onClick:()=>n.setTool(g.tool)}));for(let[g,x]of Zs.entries())x.control&&z(a[g].btn,x.control);i.append(...a.map(g=>g.btn)),o.appendChild(r);let l=se(chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rgroup-row");l.appendChild(p);let d=dt(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:so,fallback:"#000000",onSelect:g=>n.setColor(g)}),u=xe(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:pL.map(g=>({label:`${g} px`,value:g})),onSelect:g=>n.setWidth(g)});z(d.el,"draw.tools.penColor"),z(u.el,"draw.tools.penWidth"),p.append(d.el,u.el),o.appendChild(l);let m=[...a,d,u];return {el:o,setEditable(g){for(let x of m)x.setDisabled(!g);},update(g){for(let[x,b]of Zs.entries())a[x].setActive(g.tool===b.tool);d.setValue(g.color),d.setRecentColors(g.recentColors??[]),u.setSelected(g.width),u.setTriggerText(`${g.width} px`);}}}var LT="3.9.0";function MT(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-account");n.appendChild(r);let i={...chunkYOEVEUFZ_cjs.Wp,...chunkYOEVEUFZ_cjs.Up().profile};r.appendChild(cL(e,t,i,a=>{i=a,chunkYOEVEUFZ_cjs.$p(i);}));let s=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-account-section");r.appendChild(s),mL(e,t,s),r.appendChild(uL(e,t)),o?.enabled&&r.appendChild(xL(e,t,o));}function cL(e,t,n,o){let r=n,i=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-account-section"),s=e.createElement("h2");s.textContent=t("pptx.account.profile.title"),i.appendChild(s);let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-account-profile-row"),l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-account-avatar"),p=()=>{l.textContent=chunkYOEVEUFZ_cjs.Yp(r),l.style.background=r.avatarColor;};p();let d=e.createElement("label");d.className="pptxv-account-name-field";let u=e.createElement("span");u.textContent=t("pptx.account.profile.nameLabel");let m=e.createElement("input");m.type="text",m.placeholder=t("pptx.account.profile.namePlaceholder"),m.value=r.displayName,m.addEventListener("input",()=>{r={...r,displayName:m.value},p(),o(r);}),d.append(u,m),a.append(l,d),i.appendChild(a);let g=e.createElement("p");g.className="pptxv-account-swatch-label",g.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(g);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-parity-swatch-row"),b=(v,f)=>{r={...r,avatarColor:f},p();for(let S of x.querySelectorAll("button"))S.classList.toggle("is-active",S===v);o(r);};for(let v of chunkYOEVEUFZ_cjs.Xp){let f=e.createElement("button");f.type="button",f.className="pptxv-account-color-swatch",f.classList.toggle("is-active",v===r.avatarColor),f.style.background=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>b(f,v)),x.appendChild(f);}return i.appendChild(x),i}function mL(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 s=e.createElement("button");s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.storage.clear"),n.appendChild(s);let a=e.createElement("p");a.className="pptxv-account-notice",a.hidden=true,n.appendChild(a);async function l(){let p=await chunkYOEVEUFZ_cjs.Zp();r.textContent=p.presentationCount>0?t("pptx.account.storage.usage",{count:p.presentationCount,size:chunkYOEVEUFZ_cjs.ap(p.totalBytes)}):t("pptx.account.storage.usageEmpty");}l(),s.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkYOEVEUFZ_cjs._p(),a.hidden=false,a.textContent=t("pptx.account.storage.clearedNotice"),await l()))();});}function uL(e,t){let n=chunkQPYQDJ2Q_cjs.w(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:LT}),n.appendChild(i),n}function xL(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(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 a=e.createElement("p");return a.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(a),o}let s=e.createElement("button");return s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.signIn.button"),s.addEventListener("click",()=>n.onSignIn()),o.appendChild(s),o}var kL={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},DT="http://www.w3.org/2000/svg";function RT(e,t){return _o(e,kL[t],17)}function _o(e,t,n){let o=e.createElementNS(DT,"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 s=e.createElementNS(DT,r);for(let[a,l]of Object.entries(i))l!==void 0&&s.setAttribute(a,String(l));o.appendChild(s);}return o}function Ct(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 Js(e,t,n,o){let r=Ct(e,"",n,o);return r.appendChild(RT(e,t)),r}function OT(e,t,n,o){let r=Js(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var KL={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,saveAsPpt:lucide.Database,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus};function FT(e,t,n,o,r,i,s,a=chunkYOEVEUFZ_cjs.Zq){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-bs-actions");if(t==="export"&&chunkYOEVEUFZ_cjs.cq("export",s))return l;let p={protect:n.openPasswordProtection,inspect:n.openDocumentProperties,embedFonts:n.openFontEmbedding,signatures:n.openDigitalSignatures,versionHistory:n.openVersionHistory,saveAsPptx:n.save,saveAsPpsx:n.saveAsPpsx,saveAsPptm:n.saveAsPptm,saveAsPpt:n.saveAsPpt,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare};for(let d of chunkYOEVEUFZ_cjs.kr(chunkYOEVEUFZ_cjs.bp(t),a)){if(d.id==="saveAsPptm"&&!o)continue;let u=p[d.id],m=Ct(e,"",()=>r(()=>u?.())),g=e.createElement("b");g.appendChild(_o(e,KL[d.id],22));let x=e.createElement("span"),b=e.createElement("strong");b.textContent=i(d.titleKey);let v=e.createElement("small");v.textContent=i(d.bodyKey),x.append(b,v),m.append(g,x),l.appendChild(m);}return l}function el(e,t){let n=e.createElement("span");return n.textContent=t,n}function VT(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-backstage");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",t("pptx.backstage.title"));let a=e.createElement("aside"),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-bs-back-row"),p=Js(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back")),l.append(p);let d=e.createElement("nav");a.append(l,d);let u=e.createElement("main");s.append(a,u);let m=n.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,g=chunkYOEVEUFZ_cjs.jr(chunkYOEVEUFZ_cjs.Wo,m),x=g.some(E=>E.id==="home")?"home":g[0]?.id??"home",b=false,v="",f=[];(async()=>{f=await chunkYOEVEUFZ_cjs.Zo(t,n.getRecentPresentationsCount());let E=u.querySelector(".pptxv-bs-recent");E&&A(E);})();function S(E){E?.(),E&&o();}function y(E){if(E==="close")return o();if(E==="save")return S(n.save);if(E==="options")return S(n.openSettings);x=E,T();}function h(){d.replaceChildren();for(let E of g){E.group&&!d.querySelector("i")&&d.appendChild(e.createElement("i"));let L=OT(e,E.id,t(E.labelKey),()=>y(E.id));L.setAttribute("data-pptx-backstage-nav-item",""),L.classList.toggle("active",x===E.id),x===E.id&&L.setAttribute("aria-current","page"),d.appendChild(L);}}function C(){let E=e.createElement("h2");E.textContent=t("pptx.backstage.newHeading");let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-bs-templates");for(let M of chunkYOEVEUFZ_cjs.Xo){let D=Ct(e,"",()=>S(()=>n.createPresentation(M.id))),I=e.createElement("b");I.style.background=M.preview;let R=e.createElement("strong");R.textContent=t(M.nameKey);let O=e.createElement("small");O.textContent=t(M.descriptionKey),D.append(I,R,O),L.appendChild(D);}u.append(E,L);}function w(){let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-bs-recent"),L=e.createElement("pptx-ui-search");L.className="pptxv-bs-search",L.setAttribute("data-pptx-search-surface",""),L.setAttribute("data-pptx-search-input",""),L.placeholder=t("pptx.backstage.searchPlaceholder"),L.setAttribute("aria-label",L.placeholder),L.value=v,L.addEventListener("input",()=>{v=L.value,A(E);}),u.appendChild(L),x==="open"&&u.appendChild(Ct(e,t("pptx.backstage.browseDevice"),()=>S(n.openFile),"pptxv-bs-primary"));let M=e.createElement("h2");M.textContent=t("pptx.backstage.recentHeading"),A(E),u.append(M,E);}function A(E){let L=e.createElement("header");L.replaceChildren(el(e,t("pptx.backstage.columnName")),el(e,t("pptx.backstage.columnModified")),el(e,t("pptx.backstage.columnSize"))),E.replaceChildren(L);let M=v.trim().toLowerCase(),D=M?f.filter(I=>`${I.name} ${I.location}`.toLowerCase().includes(M)):f;for(let I of D){let R=Ct(e,"",()=>S(()=>n.openRecentFile(I.key))),O=chunkQPYQDJ2Q_cjs.w(e,"span","name"),B=e.createElement("b");B.textContent="P";let F=e.createElement("span"),V=e.createElement("strong");V.textContent=I.name;let _=e.createElement("small");_.textContent=I.location,F.append(V,_),O.append(B,F);let N=e.createElement("span");N.textContent=chunkYOEVEUFZ_cjs.$o(I.timestamp,Date.now(),t);let W=e.createElement("span");W.textContent=chunkYOEVEUFZ_cjs.ap(I.size),R.append(O,N,W),E.appendChild(R);}if(!D.length){let I=e.createElement("p");I.textContent=t("pptx.backstage.noRecent"),E.appendChild(I);}}function P(){u.appendChild(FT(e,x,n,b,S,t,r,m));}function k(){let E=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-bs-card"),L=e.createElement("b");L.appendChild(_o(e,lucide.Settings,24));let M=e.createElement("h2");M.textContent=t("pptx.backstage.optionsTitle");let D=e.createElement("p");D.textContent=t("pptx.backstage.optionsBody"),E.append(L,M,D),E.appendChild(Ct(e,t("pptx.backstage.openOptions"),()=>S(n.openSettings),"pptxv-bs-primary")),u.appendChild(E);}function T(){h(),u.replaceChildren();let E=e.createElement("h1");E.textContent=t(x==="home"?"pptx.backstage.greeting":chunkYOEVEUFZ_cjs.Wo.find(M=>M.id===x)?.labelKey??"pptx.backstage.nav.home"),u.appendChild(E),(x==="home"||x==="new")&&C(),(x==="home"||x==="open")&&w(),["info","saveAs","print","share","export"].includes(x)&&P(),x==="options"&&k(),x==="account"&&MT(e,t,u,i);let L=e.createElement("footer");L.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,u.appendChild(L);}return T(),{el:s,setHasMacros(E){b=E,x==="saveAs"&&T();}}}function BT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=q(e,"help.help");o.appendChild(r);let i=H(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")}),s=H(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),a=H(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});return z(i.btn,"help.help.options"),z(s.btn,"help.help.keyboardShortcuts"),z(a.btn,"help.help.accessibility"),chunkYOEVEUFZ_cjs.br(n.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,"options")&&r.append(i.btn,s.btn),r.append(a.btn),o}function zT(e,t,n){let o=xe(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkYOEVEUFZ_cjs._l.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 qr(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-select-button"),o=e.createElement("select");o.className="pptxv-select-button-select",o.title=t.selectLabel,o.setAttribute("aria-label",t.selectLabel);for(let[a,l]of t.items.entries()){let p=e.createElement("option");p.value=String(a),p.textContent=l.label,o.appendChild(p);}n.appendChild(o);let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-btn pptxv-btn-pill pptxv-select-button-commit");r.type="button",r.title=t.buttonTitle??t.buttonLabel,r.setAttribute("aria-label",t.buttonLabel),t.icon&&r.appendChild(chunkQPYQDJ2Q_cjs.K(e,t.icon));let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let s=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let a=s();a!==void 0&&t.onCommit(a);}),{el:n,setDisabled(a){r.disabled=a;},value:s}}function NT(e,t,n){return qr(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunkYOEVEUFZ_cjs.tn.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var $L=[{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 _T(e,t,n){let o=xe(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:$L.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}var qL={freeformShape:"pen",curve:"shapes"};function GT(e,t,n,o){let r=null,i=n.map(s=>{let a=t(chunkYOEVEUFZ_cjs.Ks[s]),l=H(e,{label:a,icon:qL[s],textLabel:a,onClick:()=>o(r===s?null:s)});return l.btn.dataset.pptxDrawingTool=s,l.setActive(false),{tool:s,handle:l}});return {buttons:i.map(({handle:s})=>s.btn),setActive(s){r=s;for(let{tool:a,handle:l}of i)l.setActive(a===s);},setDisabled(s){for(let{handle:a}of i)a.setDisabled(s);}}}function UT(e,t,n){let o=H(e,{label:t("pptx.hyperlinkDialog.title"),icon:"link",textLabel:t("pptx.hyperlinkDialog.title"),onClick:n});return o.setDisabled(true),o}function KT(e,t,n){return qr(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunkYOEVEUFZ_cjs.oo.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var tl=600,ol=340,WT=64;function $T(e,t,n){let o=WT/tl,r=Math.round(ol*o),i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-option-preview",{width:`${WT}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let s=chunkQPYQDJ2Q_cjs.w(e,"div",void 0,{width:`${tl}px`,height:`${ol}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(s);let a=chunkYOEVEUFZ_cjs.no(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[a]},canvasSize:{width:tl,height:ol},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,barChart3D:false,lineChart3D:false,areaChart3D:false,pieChart3D:false,presenting:false,registry:chunkQPYQDJ2Q_cjs.u(),renderElement:()=>null},u=chunkQPYQDJ2Q_cjs.H(a,0,d);return u&&s.appendChild(u),i}function qT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkQPYQDJ2Q_cjs.w(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 s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-dialog-header"),a=chunkQPYQDJ2Q_cjs.w(e,"h2");a.textContent=t("pptx.smartart.insertTitle");let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-dialog-close");l.type="button",l.setAttribute("aria-label",t("pptx.smartart.close")),l.textContent="\xD7",s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-dialog-body"),d=chunkQPYQDJ2Q_cjs.w(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-gallery"),m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(m),p.append(d,u);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-smartart-dialog-footer"),x=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-dialog-cancel");x.type="button",x.textContent=t("pptx.smartart.cancel");let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-dialog-insert");b.type="button",b.textContent=t("pptx.smartart.insert"),b.disabled=true,g.append(x,b),i.append(s,p,g),o.append(r,i);let v="list",f,S=null;function y(k){f=k,b.disabled=false;for(let T of m.querySelectorAll('[role="option"]')){let E=T.dataset.layout===k.layout;T.setAttribute("aria-selected",String(E)),T.classList.toggle("is-selected",E);}}function h(k){k&&(n(k.layout,k.defaultItems),A());}function C(){m.replaceChildren();for(let k of chunkYOEVEUFZ_cjs.$l.filter(T=>T.category===v)){let T=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-option");T.type="button",T.dataset.layout=k.layout,T.setAttribute("role","option"),T.setAttribute("aria-selected",String(f?.layout===k.layout)),T.classList.toggle("is-selected",f?.layout===k.layout);let E=$T(e,t,k.layout),L=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-smartart-option-label");L.textContent=t(k.labelKey),T.append(E,L),T.addEventListener("click",()=>y(k)),T.addEventListener("dblclick",()=>h(k)),m.appendChild(T);}}function w(k){v=k,f=void 0,b.disabled=true;for(let T of d.querySelectorAll("button")){let E=T.dataset.category===k;T.classList.toggle("is-active",E),T.setAttribute("aria-pressed",String(E));}C();}for(let k of chunkYOEVEUFZ_cjs.am){let T=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-smartart-category");T.type="button",T.dataset.category=k.id,T.textContent=t(k.labelKey),T.addEventListener("click",()=>w(k.id)),d.appendChild(T);}w(v);function A(){o.hidden||(o.hidden=true,S?.focus(),S=null);}function P(k){if(k.key==="Escape"){k.preventDefault(),A();return}if(k.key!=="Tab")return;let T=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(T.length===0)return;let E=T[0],L=T[T.length-1];k.shiftKey&&e.activeElement===E?(k.preventDefault(),L.focus()):!k.shiftKey&&e.activeElement===L&&(k.preventDefault(),E.focus());}return r.addEventListener("click",A),l.addEventListener("click",A),x.addEventListener("click",A),b.addEventListener("click",()=>h(f)),o.addEventListener("keydown",P),{el:o,open(k){let T=e.defaultView?.HTMLElement;S=T&&e.activeElement instanceof T?e.activeElement:null,o.parentElement!==k&&k.appendChild(o),o.hidden=false,i.focus();},close:A}}function jT(e,t,n){let o=qT(e,t,n),r=H(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();}}}function YT(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content");s.classList.add("pptxv-ribbon-insert-content");let a=H(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),l=KT(e,t,C=>n.insert("shape",C)),p=GT(e,t,n.armFreeformTool?n.visibleDrawingTools?.()??[]:[],C=>n.armFreeformTool?.(C)),d=H(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),u=H(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});u.btn.title=t("pptx.ribbon.insertMedia");let m=H(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),g=NT(e,t,C=>n.insertChart(C)),x=jT(e,t,(C,w)=>n.insertSmartArt(C,w)),b=H(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});b.btn.title=t("pptx.insert.insertEquation");let v=zT(e,t,C=>n.insertActionButton(C)),f=_T(e,t,C=>n.insertField(C)),S=UT(e,t,i),y=H(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});z(a.btn,"insert.text.textBox"),z(l.el,"insert.illustrations.shapes"),z(d.btn,"insert.images.pictures"),z(u.btn,"insert.media.media"),z(m.btn,"insert.tables.table"),z(g.el,"insert.illustrations.chart"),z(x.el,"insert.illustrations.smartArt"),z(b.btn,"insert.symbols.equation"),z(v.el,"insert.links.action"),z(f.el,"insert.text.field"),z(S.btn,"insert.links.link"),s.append(q(e,"insert.text",a.btn),q(e,"insert.illustrations",l.el,...p.buttons),q(e,"insert.images",d.btn),q(e,"insert.media",u.btn),q(e,"insert.tables",m.btn),q(e,"insert.illustrations",g.el,x.el),q(e,"insert.symbols",b.btn),q(e,"insert.links",v.el),q(e,"insert.text",f.el),q(e,"insert.links",S.btn),q(e,"insert.text",y.btn));let h=[a,l,p,d,u,m,g,x,b,v,f,y];return {el:s,setEditable(C){for(let w of h)w.setDisabled(!C);},setHasSelection(C){S.setDisabled(!C);},setFreeformTool(C){p.setActive(C);}}}function XT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=p=>{let d=H(e,{label:t(p),text:t(p),onClick:()=>{}});return d.setDisabled(true),d.btn},s=i("pptx.record.cameo"),a=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),l=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,q(e,"record.camera",z(s,"record.camera.cameo")),q(e,"record.record",z(a.btn,"record.record.fromBeginning"),z(l.btn,"record.record.fromCurrent")),q(e,"record.manage",z(i("pptx.record.clear"),"record.manage.clear"),z(i("pptx.record.resetToCameo"),"record.manage.reset")),q(e,"record.help",z(i("pptx.record.learnMore"),"record.help.learnMore"))),o}function QT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=(g,x)=>H(e,{label:t(g),text:t(g),onClick:x}).btn,i=g=>{let x=H(e,{label:t(g),text:t(g),onClick:()=>{}});return x.setDisabled(true),x.btn},s=r("pptx.review.spelling",n.toggleSpellCheck);s.title=t("pptx.review.toggleSpellCheck");let a=H(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});a.btn.title=t("pptx.review.accessibilityCheckTooltip");let l=r("pptx.review.language",()=>n.openSettings("general"));l.title=t("pptx.review.languageTooltip");let p=H(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});p.btn.title=t("pptx.ribbon.compareTitle");let d=r("pptx.toolbar.comments",n.openComments);d.title=t("pptx.review.toggleComments");let u=r("pptx.review.showComments",n.openComments),m=(g,x)=>z(i(g),x);return o.append(q(e,"review.proofing",z(s,"review.proofing.spelling"),m("pptx.review.thesaurus","review.proofing.thesaurus")),q(e,"review.accessibility",z(a.btn,"review.accessibility.check")),q(e,"review.language",m("pptx.review.translate","review.language.translate"),l),q(e,"review.compare",m("pptx.review.markAllRead","review.compare.markAllRead"),z(p.btn,"review.compare.compare")),q(e,"review.comments",z(d,"review.comments.newComment"),m("pptx.common.delete","review.comments.delete"),m("pptx.common.previous","review.comments.previous"),m("pptx.common.next","review.comments.next"),z(u,"review.comments.showComments")),q(e,"review.protect",m("pptx.review.readOnly","review.protect.readOnly"),m("pptx.review.restrictPermission","review.protect.restrictPermission")),q(e,"review.ink",m("pptx.review.hideInk","review.ink.hideInk"))),chunkYOEVEUFZ_cjs.br(n.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,"options")||l.remove(),{el:o,setEditable:g=>p.setDisabled(!g)}}function jL(e,t,n,o){let r=t(n.labelKey),i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-show-option"),s=e.createElement("input");return s.type="checkbox",s.disabled=n.unsupported,s.setAttribute("aria-label",r),n.unsupported||s.addEventListener("change",()=>{let a=chunkYOEVEUFZ_cjs.Gi(n.id,s.checked);a&&o.updateShowOptions(a);}),i.append(s,e.createTextNode(r)),{el:i,descriptor:n,input:s}}function ZT(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning});i.btn.title=t("pptx.slideShow.fromBeginningTooltip");let s=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent});s.btn.title=t("pptx.slideShow.fromCurrentTooltip");let a=H(e,{label:t("pptx.slideShow.presenterView"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView});a.btn.title=t("pptx.slideShow.presenterViewTooltip");let l=H(e,{label:t("pptx.slideShow.customShow"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),p=chunkYOEVEUFZ_cjs.cq("broadcast",o)?null:H(e,{label:t("pptx.slideShow.broadcast"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast});p&&(z(p.btn,"slideShow.present.broadcast"),p.btn.title=t("pptx.slideShow.broadcastTooltip"));let d=H(e,{label:t("pptx.slideShow.rehearseCoach"),text:t("pptx.slideShow.rehearseCoach"),onClick:()=>{}});d.setDisabled(true);let u=H(e,{label:t("pptx.slideShow.setUp"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp});u.btn.title=t("pptx.slideShow.setUpTooltip");let m=H(e,{label:t("pptx.slideShow.hideSlide"),text:t("pptx.slideShow.hideSlide"),onClick:()=>n.toggleHideSlide()});m.btn.setAttribute("aria-pressed","false");let g=H(e,{label:t("pptx.slideShow.rehearseTimings"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal});g.btn.title=t("pptx.slideShow.rehearseTimingsTooltip");let x=H(e,{label:t("pptx.titleBar.record"),text:t("pptx.titleBar.record"),onClick:n.startRehearsal}),b=H(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles});b.btn.title=t("pptx.slideShow.subtitlesTooltip");let v=H(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings}),f=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-show-options"),S=chunkYOEVEUFZ_cjs.Ei.map(h=>jL(e,t,h,n));f.append(...S.map(h=>h.el));let y=()=>{let h=n.showOptions();for(let C of S)C.input.checked=C.descriptor.unsupported?false:chunkYOEVEUFZ_cjs.Fi(h,C.descriptor.id);};return y(),z(i.btn,"slideShow.startSlideShow.fromBeginning"),z(s.btn,"slideShow.startSlideShow.fromCurrent"),z(a.btn,"slideShow.present.presenterView"),z(l.btn,"slideShow.startSlideShow.customShow"),z(d.btn,"slideShow.setUp.rehearseWithCoach"),z(u.btn,"slideShow.setUp.setUpSlideShow"),z(m.btn,"slideShow.setUp.hideSlide"),z(g.btn,"slideShow.setUp.rehearseTimings"),z(x.btn,"slideShow.setUp.record"),z(b.btn,"slideShow.captions.subtitles"),z(v.btn,"slideShow.captions.subtitleSettings"),r.append(q(e,"slideShow.startSlideShow",i.btn,s.btn),q(e,"slideShow.present",a.btn),q(e,"slideShow.startSlideShow",l.btn),q(e,"slideShow.present",...p?[p.btn]:[]),q(e,"slideShow.setUp",d.btn,u.btn,m.btn,g.btn,x.btn),f,q(e,"slideShow.captions",b.btn,v.btn)),{el:r,syncOptions:y,setSubtitlesVisible:h=>b.setActive(h),setHideSlideActive:h=>{m.setActive(h),m.btn.setAttribute("aria-pressed",String(h));}}}function JT(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-advance"),r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-transition-advance-row"),s=e.createElement("input");s.type="checkbox",s.checked=true,s.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(s,e.createTextNode(t("pptx.ribbon.onMouseClick")));let a=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-transition-advance-row"),l=e.createElement("input");l.type="checkbox",l.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let p=e.createElement("input");p.type="text",p.className="pptxv-transition-advance-seconds",p.value=chunkYOEVEUFZ_cjs.zi,p.disabled=true,p.title=t("pptx.ribbon.advanceAfterSeconds"),p.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),a.append(l,e.createTextNode(t("pptx.ribbon.afterDuration")),p);let d=()=>({advanceOnClick:s.checked,advanceAfter:l.checked,advanceAfterText:p.value}),u=false,m=()=>{p.disabled=u||!l.checked;};return s.addEventListener("change",()=>n(d())),l.addEventListener("change",()=>{m(),n(d());}),p.addEventListener("change",()=>n(d())),p.addEventListener("keydown",g=>g.stopPropagation()),z(i,"transitions.timing.advanceOnClick"),z(a,"transitions.timing.advanceAfter"),o.append(i,a),{el:o,setValue(g){s.checked=g.advanceOnClick,l.checked=g.advanceAfter,e.activeElement!==p&&(p.value=g.advanceAfterText),m();},setDisabled(g){u=g,s.disabled=g,l.disabled=g,m();}}}function YL(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function eP(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunkYOEVEUFZ_cjs.Ai},s=H(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunkYOEVEUFZ_cjs.Li(chunkYOEVEUFZ_cjs.Ci(void 0,i),e)});s.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(s.btn);let a=H(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});a.btn.title=t("pptx.ribbon.applyTransitionToAll");function l(){for(let C of m)C.handle.setActive(C.type===i.type);}let p=C=>{i={...i,...C},l(),n.applyDraft(i,false);},d=JT(e,t,C=>p(C)),u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-transition-gallery"),m=chunkYOEVEUFZ_cjs.yi.map(C=>{let w=H(e,{label:t(C.labelKey),text:t(C.labelKey),onClick:()=>p({type:C.type})});return u.appendChild(w.btn),{type:C.type,handle:w}});r.appendChild(u);let g=re(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:C=>p({durationSec:Math.max(0,C)})});g.setValue(i.durationSec),g.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(g.el);let x=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-transition-sound"),b=e.createElement("select");b.setAttribute("aria-label",t("pptx.ribbon.sound"));let v=e.createElement("input");v.type="file",v.accept="audio/*",v.style.display="none";let f=e.createElement("button");f.type="button",f.className="pptxv-transition-sound-preview",f.setAttribute("aria-label",t("pptx.animation.sound.preview")),f.textContent="\u25B6",f.disabled=true,x.append(e.createTextNode(t("pptx.ribbon.sound")),b,f,v),r.appendChild(x);function S(){let C=n.readTransition();b.replaceChildren();for(let w of chunkYOEVEUFZ_cjs.ri(C)){let A=e.createElement("option");A.value=w.value,A.textContent=w.i18nKey?t(w.i18nKey):w.label??"",b.appendChild(A);}b.value=chunkYOEVEUFZ_cjs.si(C),f.disabled=!chunkYOEVEUFZ_cjs.vi(C);}S(),b.addEventListener("change",()=>{if(b.value===chunkYOEVEUFZ_cjs.qi){v.click(),b.value=chunkYOEVEUFZ_cjs.si(n.readTransition());return}if(b.value===chunkYOEVEUFZ_cjs.pi){n.applyChange(chunkYOEVEUFZ_cjs.wi());return}let C=chunkYOEVEUFZ_cjs.ui(b.value);C&&n.applyChange(C);}),f.addEventListener("click",()=>{let C=chunkYOEVEUFZ_cjs.vi(n.readTransition());if(!C)return;let w=chunkYOEVEUFZ_cjs.nd(C);w&&Mt(w.dataUrl);}),v.addEventListener("change",()=>{let C=v.files?.[0];v.value="",C&&chunkYOEVEUFZ_cjs.xi(C).then(w=>{w&&n.applyChange(chunkYOEVEUFZ_cjs.ti({name:C.name,dataUrl:w}));});}),r.appendChild(a.btn),r.appendChild(d.el);let y=H(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});y.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(y.btn),z(s.btn,"transitions.preview.preview"),z(u,"transitions.transitionToThisSlide.gallery"),z(g.el,"transitions.timing.duration"),z(x,"transitions.timing.sound"),z(a.btn,"transitions.timing.applyToAll"),r.replaceChildren(q(e,"transitions.preview",s.btn),q(e,"transitions.transitionToThisSlide",u),q(e,"transitions.timing",g.el,x,a.btn,d.el),y.btn);let h=()=>{l(),g.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){S();let C=n.readDraft()??chunkYOEVEUFZ_cjs.Ai;YL(C,i)||(i=C,h());},setEditable(C){for(let w of m)w.handle.setDisabled(!C);g.setDisabled(!C),b.disabled=!C,a.setDisabled(!C),d.setDisabled(!C);}}}function tP(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=(T,E)=>H(e,{label:t(T),text:t(T),onClick:E}),s=T=>{let E=i(T,()=>{});return E.setDisabled(true),E.btn},a=i("pptx.view.normal",n.normalView);a.btn.title=t("pptx.statusBar.normalView");let l=i("pptx.slideSorter.title",n.openSlideSorter);l.btn.title=t("pptx.view.slideSorterTooltip");let p=i("pptx.view.outlineView",n.openOutlineView);p.btn.title=t("pptx.view.outlineViewTooltip");let d=i("pptx.view.readingView",n.openReadingView),u=i("pptx.master.title",()=>n.toggleMasterView?.());u.btn.title=t("pptx.view.slideMasterTooltip");let m=i("pptx.ruler.rulers",()=>n.toggleViewOption("showRulers")),g=i("pptx.grid.grid",()=>n.toggleViewOption("showGrid")),x=i("pptx.view.guides",()=>n.toggleViewOption("showGuides"));x.btn.title=t("pptx.ribbon.toggleGuides");let b=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),v=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),f=i("pptx.view.selection",n.openSelectionPane);f.btn.title=t("pptx.selectionPane.title");let S=i("pptx.ribbon.eyedropper",n.activateEyedropper);S.btn.title=t("pptx.view.eyedropperTooltip");let y=i("pptx.view.hGuide",()=>n.addGuide("h"));y.btn.title=t("pptx.view.addHorizontalGuide");let h=i("pptx.view.vGuide",()=>n.addGuide("v"));h.btn.title=t("pptx.view.addVerticalGuide");let C=!chunkYOEVEUFZ_cjs.cq("zoom",o),w=C?i("pptx.view.zoomToFit",n.zoomToFit):null;w&&(w.btn.title=t("pptx.view.zoomToFitTooltip"));let A=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());A.btn.dataset.testid="template-edit-toggle",A.btn.title=t("pptx.view.templateEditingTooltip");let P=(T,E)=>z(T.btn,E),k=(T,E)=>z(s(T),E);return r.append(q(e,"view.presentationViews",P(a,"view.presentationViews.normal"),P(l,"view.presentationViews.slideSorter"),P(p,"view.presentationViews.outline"),P(d,"view.presentationViews.readingView")),q(e,"view.masterViews",P(u,"view.masterViews.slideMaster"),k("pptx.master.handoutMasterTitle","view.masterViews.handoutMaster"),k("pptx.master.notesMasterTitle","view.masterViews.notesMaster")),q(e,"view.show",P(m,"view.show.ruler"),P(g,"view.show.gridlines"),P(x,"view.show.guides"),P(b,"view.show.snapToGrid"),P(f,"view.show.selectionPane"),P(S,"view.show.eyedropper"),P(v,"view.show.snapToShape"),Ot(e,"view.show.addGuide",y.btn,h.btn)),q(e,"view.zoom",...C?[k("pptx.slideSorter.zoom","view.zoom.zoom"),w?.btn??[]].flat():[]),q(e,"view.window",P(A,"view.window.templateEditing"),k("pptx.view.macros","view.window.macros"))),w&&z(w.btn,"view.zoom.fitToWindow"),{el:r,setEditable(T){A.setDisabled(!T),u.setDisabled(!T),S.setDisabled(!T);},setViewOptions(T){m.setActive(T.showRulers),g.setActive(T.showGrid),x.setActive(T.showGuides),b.setActive(T.snapToGrid),v.setActive(T.snapToShape);},setTemplateEditing(T){let E=t(T?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");A.btn.textContent=E,A.btn.title=t("pptx.view.templateEditingTooltip"),A.btn.setAttribute("aria-label",E),A.setActive(T);}}}function jr(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let s=vT(e,t,n,o);i.append(s.el);let a=Qs(e,t,G=>O(G),o,{startRecording:()=>n.slideShow.startRehearsal()});a.el.hidden=true,i.appendChild(a.el);let l=Rs(e,t,n.findReplace);i.appendChild(l.el);let p=FE(e,t,(G,K)=>K?n.edit.updateEquation(K,G):n.insert.insertEquation(G));i.appendChild(p.el);let d=VE(e,t,n.edit);i.appendChild(d.el);let u=yt(G=>n.edit.applyRibbonGalleryResult(G)),m=G=>chunkYOEVEUFZ_cjs.cq(G,o),g=m("file")?null:VT(e,t,n.file,()=>O("home"),o,r),x=m("home")?null:xT(e,t,{edit:n.edit,onToggleFindReplace:()=>l.toggle(),hiddenActions:o,galleryHub:u}),b=m("insert")?null:YT(e,t,n.insert,()=>p.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=m("draw")?null:IT(e,t,n.draw),f=false,S=()=>n.nav.toggleInspector?.(),y=()=>{n.nav.clearSelection?.(),f||S();},h=m("design")?null:kT(e,t,n.design,()=>d.toggle(),y,u),C=m("transitions")?null:eP(e,t,n.transitions,S),w=m("animations")?null:PT(e,t,n.edit,S),A=m("slideShow")?null:ZT(e,t,n.slideShow,o),P=m("record")?null:XT(e,t,n.slideShow),k=m("review")?null:QT(e,t,n.nav),T=m("view")?null:tP(e,t,n.nav,o),E=m("help")?null:BT(e,t,n.nav),L={file:g?.el,home:x?.el,insert:b?.el,draw:v?.el,design:h?.el,transitions:C?.el,animations:w?.el,slideShow:A?.el,record:P??void 0,review:k?.el,view:T?.el,help:E??void 0},M=chunkYOEVEUFZ_cjs.dq(Bo,o);for(let G of M){let K=L[G.id];K&&(K.hidden=true,i.appendChild(K));}let D=zE(e,t,u);for(let[G,K]of D)K.hidden=true,L[G]=K;let I=M.find(G=>G.id===$r)?.id??M[0]?.id??$r,R=I;function O(G){if(L[G]){G!==R&&u.closeAll(),R=G,a.setActive(G);for(let K of Object.keys(L)){let j=L[K];j&&(j.hidden=K!==G);}}}O(R);let B,F={hasClipboard:false,slideCount:0,selectedCount:0},V=()=>{let G=chunkYOEVEUFZ_cjs.pr(B??null,n.nav.getCustomization?.());a.setContextualTabs(G),NE(i,D,G);let K=chunkYOEVEUFZ_cjs.rr(R,G,I);K!==R&&O(K);},_=()=>{u.sync(F.galleryContext,W),V(),x?.update(gT(W,B,F));},N=()=>{w?.update({editable:W,hasSelection:B!==void 0,selectedElementId:F.selectedElementId,animations:F.animations??[],animationTimelineAnchors:F.animationTimelineAnchors??[]});},W=false,X=new Set;return {el:i,update(){},setEditState(G){s.setEditState(G),a.el.hidden=!G.editable;},setNotesExpanded(){},setAutosaveStatus:(G,K)=>s.setAutosaveStatus(G,K),setEditable(G){W=G,k?.setEditable(G),T?.setEditable(G),b?.setEditable(G),v?.setEditable(G),l.setEditable(G),p.setEditable(G),d.setEditable(G),h?.setEditable(G),C?.setEditable(G),C?.sync(),A?.syncOptions(),_(),N();},setDrawState:G=>{v?.update(G),b?.setFreeformTool(G.freeformTool??null);},setTemplateEditing:G=>T?.setTemplateEditing(G),setViewOptions:G=>T?.setViewOptions(G),setHasMacros:G=>g?.setHasMacros(G),setSubtitlesVisible:G=>A?.setSubtitlesVisible(G),setHideSlideActive:G=>A?.setHideSlideActive(G),setInspectorOpen:G=>{f=G,s.setInspectorOpen(G);},toggleFindReplace:()=>l.toggle(),openEquationEditor:(G,K)=>p.openEdit(G,K),showDefaultTab:()=>O(I),setHiddenOptionTabs:G=>{if(X=new Set(G.filter(K=>K!=="file")),a.setHiddenTabs(X),X.has(R)){let K=X.has("home")?M.find(j=>!X.has(j.id))?.id:"home";K&&O(K);}},applyScreenTips:G=>a.applyScreenTips(G),updateSelection(G,K){B=G,F=K,b?.setHasSelection(G!==void 0),_(),N();}}}var oP=0;function XL(){return oP+=1,`pptxv-ribbon-${oP}`}function nP(e,t,n){let o=XL();t.setAttribute(chunkYOEVEUFZ_cjs.Xq,o);let r=e.createElement("style");r.dataset.pptxRibbonCustomization="";let i=s=>{r.textContent=chunkYOEVEUFZ_cjs.Yq(s??chunkYOEVEUFZ_cjs.Zq,o);};return i(n),t.appendChild(r),{el:r,token:o,update:i}}function rP(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-run-program-notices");o.dataset.testid="pptx-run-program-notices",o.hidden=true,o.setAttribute("style",chunkYOEVEUFZ_cjs.Jo()),o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.hyperlink.actionRunProgram"));let r=chunkYOEVEUFZ_cjs.Tj(typeof navigator>"u"?void 0:navigator);function i(s){let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-run-program-notice");a.dataset.testid="pptx-run-program-notice",a.dataset.target=s.target,a.setAttribute("role","status");let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-run-program-notice-message");if(l.textContent=t(s.messageKey,{target:s.target}),a.appendChild(l),r){let d=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-run-program-notice-copy");d.type="button",d.dataset.testid="pptx-run-program-notice-copy",d.textContent=t(s.copyLabelKey),d.addEventListener("click",()=>{navigator.clipboard.writeText(s.target);}),a.appendChild(d);}let p=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-run-program-notice-dismiss");return p.type="button",p.dataset.testid="pptx-run-program-notice-dismiss",p.setAttribute("aria-label",t("pptx.compatibility.dismiss")),p.appendChild(chunkQPYQDJ2Q_cjs.K(e,"close")),p.addEventListener("click",()=>n(s.id)),a.appendChild(p),a}return {el:o,update(s){o.hidden=s.length===0,o.replaceChildren(...s.map(i));}}}function nl(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-shortcuts-panel");n.hidden=true,n.dataset.pptxShortcutsPanel="true",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false"),n.setAttribute("aria-label",t("pptx.shortcuts.title"));let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-shortcuts-header"),r=chunkQPYQDJ2Q_cjs.w(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-shortcuts-close");i.type="button",i.textContent=t("pptx.shortcuts.close"),i.setAttribute("aria-label",t("pptx.common.close")),o.append(r,i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-shortcuts-list");for(let l of chunkYOEVEUFZ_cjs.yp){let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-shortcuts-row"),d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-shortcuts-action");d.textContent=t(l.actionKey);let u=chunkQPYQDJ2Q_cjs.w(e,"kbd","pptxv-shortcuts-keys");u.textContent=l.shortcut,p.append(d,u),s.appendChild(p);}n.append(o,s);let a=()=>{n.hidden=true;};return i.addEventListener("click",a),{el:n,toggle(){n.hidden=!n.hidden;},close:a,isOpen:()=>!n.hidden}}function iP(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-statusbar"),s=()=>{let P=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-counter");a.setAttribute("aria-live","polite");let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-text");l.textContent=t("pptx.statusBar.language");let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(a,s(),l,s(),p),i.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-spacer"));let d=false,u="",m="idle",g=()=>{p.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),p.classList.toggle("is-saving",m==="saving"),p.classList.toggle("is-error",m==="error");};g();let x=!chunkYOEVEUFZ_cjs.cq("notes",o),b=!chunkYOEVEUFZ_cjs.cq("fullscreen",o),v=!chunkYOEVEUFZ_cjs.cq("zoom",o),f=null;if(x){f=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),f.type="button",f.title=t("pptx.statusBar.toggleNotes"),f.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),f.setAttribute("aria-pressed","false"),f.setAttribute("data-pptx-compact",""),f.appendChild(QL(e,"sticky-note"));let P=chunkQPYQDJ2Q_cjs.w(e,"span");P.textContent=t("pptx.notes.title"),f.appendChild(P),f.addEventListener("click",n.toggleNotes);}let S=H(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});S.btn.setAttribute("data-pptx-compact","");let y=H(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});y.btn.setAttribute("data-pptx-compact","");let h=b?H(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;h?.btn.setAttribute("data-pptx-compact","");let C=null,w=null,A=null;return v&&(C=H(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),C.btn.setAttribute("data-pptx-compact",""),w=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-statusbar-zoom"),w.type="button",w.title=t("pptx.statusBar.zoomToFit"),w.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),w.setAttribute("data-pptx-compact",""),w.addEventListener("click",n.zoomToFit),A=H(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),A.btn.setAttribute("data-pptx-compact","")),i.append(...f?[f]:[],s(),S.btn,y.btn,...h?[h.btn]:[],...[],s(),...C&&w&&A?[C.btn,w,A.btn]:[]),{el:i,update({current:P,total:k,zoomPercent:T}){a.textContent=k>0?t("pptx.statusBar.slideOf",{current:P+1,total:k}):t("pptx.statusBar.noSlides"),w&&(w.textContent=`${Math.round(T)}%`);},setNotesExpanded(P){f?.setAttribute("aria-pressed",String(P)),f?.classList.toggle("is-active",P);},setSaveStatus(P,k){u=P,m=k,g();},setDirty(P){d=P,g();},setPresenting(P){S.btn.classList.toggle("is-active",!P),h?.btn.classList.toggle("is-active",P);}}}function QL(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-statusbar-icon");return n.appendChild(ZL(e,t)),n}function ZL(e,t){return chunkQPYQDJ2Q_cjs.K(e,t)}function Yr(e){return e.masterViewTarget?{document:{slideMasters:e.slideMasters,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster},target:{tab:e.masterViewTab,masterIndex:e.masterViewTarget.masterIndex,layoutIndex:e.masterViewTarget.layoutIndex}}:null}function U(e){let t=Yr(e);if(t)return chunkYOEVEUFZ_cjs.gp(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function aP(e,t){return Yr(e)||!e.editTemplateMode||chunkYOEVEUFZ_cjs.Le(t)?U(e):e.slides[e.currentSlide]?.elements??[]}function sP(e,t,n){return Yr(e)||!e.editTemplateMode||chunkYOEVEUFZ_cjs.Le(t)?Z(e,n):{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:n}:o)}}function Z(e,t){let n=Yr(e);if(n){let r=chunkYOEVEUFZ_cjs.hp(n.document,n.target,t);return r?.slideMasters?{slideMasters:r.slideMasters}:r?.notesMaster?{notesMaster:r.notesMaster}:r?.handoutMaster?{handoutMaster:r.handoutMaster}:{slideMasters:e.slideMasters}}let o=e.slides[e.currentSlide];return o?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[o.id]:t}}:{slides:e.slides.map((r,i)=>i===e.currentSlide?{...r,elements:t}:r)}:{slides:e.slides}}function J(e,t){return U(e).find(n=>n.id===t)}function Go(e){return chunkYOEVEUFZ_cjs.ns({mruColors:e.presentationProperties.mruColors})}function ct(e,t){let n=e.get(),o=Go(n),r=chunkYOEVEUFZ_cjs.os(o,t);r!==o&&e.set({presentationProperties:{...n.presentationProperties,...chunkYOEVEUFZ_cjs.ps(r)}});}function JL(e){return e&&chunkYOEVEUFZ_cjs.f(e)?{fillColor:e.shapeStyle?.fillColor,fillColorRef:e.shapeStyle?.fillColorRef,strokeColor:e.shapeStyle?.strokeColor,strokeColorRef:e.shapeStyle?.strokeColorRef,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,fillColorRef:void 0,strokeColor:void 0,strokeColorRef:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function rl(e,t=null,n=[],o=null,r=new Map,i=null,s=[],a=void 0){let l=JL(e),p=e?chunkYOEVEUFZ_cjs.Lg(e):void 0,d=e?chunkYOEVEUFZ_cjs.Ym(e):void 0,u=e?chunkYOEVEUFZ_cjs._m(e):void 0,m=e?chunkYOEVEUFZ_cjs.an(e):void 0,g=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunkYOEVEUFZ_cjs.af(e),croppable:chunkYOEVEUFZ_cjs._e(e,"crop"),arrowheadsChangeable:chunkYOEVEUFZ_cjs._e(e,"changeArrowheads"),canShape:Wr(e),canText:Le(e),isImage:e!==void 0&&chunkYOEVEUFZ_cjs.d(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,isGroup:e?.type==="group",groupChildCount:e?.type==="group"&&Array.isArray(e.children)?e.children.length:void 0,isOle:e?.type==="ole",oleObjectType:e?.type==="ole"?e.oleObjectType:void 0,oleFileName:e?.type==="ole"?e.fileName:void 0,oleIsLinked:e?.type==="ole"&&e.isLinked===true,oleName:e?.type==="ole"?e.oleName:void 0,oleElement:e?.type==="ole"?e:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:l.fillColor,fillColorRef:l.fillColorRef,strokeColor:l.strokeColor,strokeColorRef:l.strokeColorRef,strokeWidth:l.strokeWidth,shapeStyle:e&&chunkYOEVEUFZ_cjs.f(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:l.fillOpacity,strokeOpacity:l.strokeOpacity,gradientEnabled:e!==void 0&&chunkYOEVEUFZ_cjs.Sm(e),gradient:e?chunkYOEVEUFZ_cjs.Rm(e):chunkYOEVEUFZ_cjs.Xm(),vAlign:p?.vAlign??"top",textWrap:e?chunkYOEVEUFZ_cjs.Og(e):"square",autoFitMode:e?chunkYOEVEUFZ_cjs.Pg(e):"none",characterSpacing:p?.characterSpacing??0,lineSpacing:p?.lineSpacing??1,lineSpacingExactPt:p?.lineSpacingExactPt??null,paragraphSpacingBefore:p?.paragraphSpacingBefore??0,paragraphSpacingAfter:p?.paragraphSpacingAfter??0,paragraphIndent:p?.paragraphIndent??0,paragraphMarginLeft:p?.paragraphMarginLeft??0,textDirection:p?.textDirection??"horizontal",textRtl:p?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:d?.brightness??0,imageContrast:d?.contrast??0,imageSaturation:d?.saturation??0,imageArtisticEffect:e&&chunkYOEVEUFZ_cjs.d(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkYOEVEUFZ_cjs.d(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkYOEVEUFZ_cjs.d(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkYOEVEUFZ_cjs.d(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkYOEVEUFZ_cjs.d(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkYOEVEUFZ_cjs.d(e)?e.imageEffects?.colorWash:void 0,altText:e?chunkYOEVEUFZ_cjs.Dm(e).altText:"",title:e?chunkYOEVEUFZ_cjs.Dm(e).title:"",showAccessibilitySection:e!==void 0&&chunkYOEVEUFZ_cjs.Em(e),chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunkYOEVEUFZ_cjs.r(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkYOEVEUFZ_cjs.r(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:u?.cropLeft??0,cropTop:u?.cropTop??0,cropRight:u?.cropRight??0,cropBottom:u?.cropBottom??0,tableHeaderRow:m?.firstRowHeader??false,tableBandedRows:m?.bandedRows??false,tableBandedColumns:m?.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:m?.cellPadding??0,selectedTableCell:g?t:null,selectedTableCells:g?n:[],tableCellStyle:g?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(x=>x.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0,recentColors:s,themeColorMap:a}}function eM(e){let t=U(e);return e.selectedElementIds.every(n=>chunkYOEVEUFZ_cjs._e(t.find(o=>o.id===n)??null,"group"))}function tM(e){let t=U(e);return e.selectedElementIds.map(n=>t.find(o=>o.id===n)).filter(n=>n!==void 0)}function Uo(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 oM(e,t,n){return {element:t??null,themeColorMap:e.colorScheme?chunkYOEVEUFZ_cjs.P(e.colorScheme):void 0,theme:{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme},resolveStyleMatrix:n?o=>n.resolveStyleMatrixReferences(o):void 0}}function lP(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||(o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen),t.presenting))return;let s=i?e.selectedElement(t):void 0;o?.updateSelection(s,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,selectionGroupable:eM(t),formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],animationTimelineAnchors:t.slides[t.currentSlide]?.animationTimelineAnchors??[],layouts:Uo(t),layoutPreviews:e.layoutPreviews?.(),currentLayoutPath:t.slides[t.currentSlide]?.layoutPath,themeFonts:{heading:t.fontScheme?.majorFont?.latin,body:t.fontScheme?.minorFont?.latin},embeddedFontFamilies:t.embeddedFonts.map(l=>l.name),customFontFamilies:t.customFontFamilies,recentColors:Go(t),themeColorMap:t.colorScheme?chunkYOEVEUFZ_cjs.P(t.colorScheme):void 0,canMergeShapes:i&&chunkYOEVEUFZ_cjs.Kl(tM(t)),canCrop:t.selectedElementIds.length===1&&chunkYOEVEUFZ_cjs.Ys(s),cropActive:t.cropSession!==null,galleryContext:oM(t,s,e.getHandler?.())}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth,recentColors:Go(t),freeformTool:t.freeformTool}),r?.update(rl(s,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection,Go(t),t.colorScheme?chunkYOEVEUFZ_cjs.P(t.colorScheme):void 0));let a=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,hasDeckElements:t.slides.some(l=>l.elements.length>0),elements:a?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:s?.id,comments:a?.comments??[],commentMentionAuthors:Hr(t.modernCommentAuthors,t.commentAuthors),customShows:t.customShows,docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:a,editTemplateMode:t.editTemplateMode,slideMasters:t.slideMasters,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.themeName,tagCollections:t.tagCollections,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function pP(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkYOEVEUFZ_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function dP(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=()=>{o?.remove(),o=null,r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(p,d,u)=>{r?.remove();let m=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu",{left:`${d}px`,top:`${u}px`});m.setAttribute("role","menu"),m.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));for(let g of Uo(n.get())){let x=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-context-menu-item");x.type="button",x.setAttribute("role","menuitem"),x.textContent=g.name,x.addEventListener("click",()=>{n.set({currentSlide:p}),e.getEditActions().applyLayout(g.path),s();}),m.appendChild(x);}(e.host.closest(".pptxv")??t.body).appendChild(m),pP(m,t,d,u),r=m;},l=(p,d,u)=>{let m=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-context-menu-item");return m.type="button",m.setAttribute("role","menuitem"),m.textContent=p.countLabelKey?e.getTranslator()(p.labelKey,{count:u}):e.getTranslator()(p.labelKey),m.disabled=p.disabled===true,m.addEventListener("click",()=>{switch(p.id){case "new-slide":s(),e.addSlideAfter(d.index);break;case "duplicate":s(),e.duplicateSlides(d.selectedIndexes);break;case "delete":s(),e.deleteSlides(d.selectedIndexes);break;case "layout":o?.remove(),o=null,a(d.index,d.x,d.y);break;case "hide":s(),e.toggleHideSlides(d.selectedIndexes);break;case "add-section":s(),e.getEditActions().sections.addSection(e.getTranslator()("pptx.sections.defaultName"),d.index);break;default:s();}}),m};return {open(p,d){s();let u=p.selectedIndexes.map(g=>d[g]).filter(g=>!!g),m=chunkYOEVEUFZ_cjs.Fl({selectedCount:u.length,hasHiddenInSelection:u.some(g=>g.hidden),hasVisibleInSelection:u.some(g=>!g.hidden),wouldDeleteAllSlides:u.length>=d.length});o=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu",{left:`${p.x}px`,top:`${p.y}px`}),o.dataset.pptxContextMenu="true",o.dataset.pptxSlidePaneContextMenu="true",o.setAttribute("role","menu"),o.setAttribute("aria-label",e.getTranslator()("pptx.slidesPane.contextMenu.newSlide"));for(let g of m){if(g.separatorBefore){let x=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu-separator");x.setAttribute("role","separator"),o.appendChild(x);}o.appendChild(l(g,p,u.length));}(e.host.closest(".pptxv")??t.body).appendChild(o),pP(o,t,p.x,p.y),i=g=>{if(g instanceof KeyboardEvent&&g.key!=="Escape")return;let x=g.target;x instanceof Node&&(o?.contains(x)||r?.contains(x))||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},close:s,destroy:s}}function cP(){let e=[],t=null;return {isSelected(n){return e.includes(n)},onClick(n,o,r){let i=chunkYOEVEUFZ_cjs.El({clickedId:o,orderedIds:r,selectedIds:e,anchorId:t,ctrlKey:n.ctrlKey,metaKey:n.metaKey,shiftKey:n.shiftKey});e=i.selectedIds,t=i.anchorId;},openContextMenu(n,o,r,i){let s=i[r];if(s===void 0)return null;let l=(e.length>0&&e.includes(s)?e:[s]).map(p=>i.indexOf(p)).filter(p=>p!==-1);return {x:n,y:o,index:r,selectedIndexes:l}}}}function mP(e){let{doc:t,t:n,actions:o}=e,r=chunkYOEVEUFZ_cjs.yf(e.sections,e.slides);return r.map((i,s)=>{let a=chunkQPYQDJ2Q_cjs.w(t,"section","pptxv-thumb-section"),l=chunkQPYQDJ2Q_cjs.w(t,"header","pptxv-thumb-section-header"),p=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-thumb-section-toggle");if(p.type="button",p.setAttribute("aria-expanded",String(!i.section?.collapsed)),p.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(a.dataset.sectionId=i.section.id,p.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunkQPYQDJ2Q_cjs.w(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,l.appendChild(d);}if(l.appendChild(p),i.section&&o){let d=chunkQPYQDJ2Q_cjs.w(t,"span","pptxv-thumb-section-actions"),u=(m,g,x,b=false)=>{let v=chunkQPYQDJ2Q_cjs.w(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=m,v.setAttribute("aria-label",m),v.textContent=g,v.disabled=b,v.addEventListener("click",x),d.appendChild(v);};u(n("pptx.sections.rename"),"\u270E",()=>{let m=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);m!=null&&o.rename(i.section.id,m);}),u(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),s===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),s===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),l.appendChild(d);}if(a.appendChild(l),!i.section?.collapsed){let d=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,m)=>d.appendChild(e.buildSlide(u,i.slideIndexes[m]))),a.appendChild(d);}return a})}var Ko=128;function il(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-thumbs");i.setAttribute("role","navigation"),i.setAttribute("aria-label",t("pptx.sections.slides"));let s=cP(),a=r?dP({doc:e,store:r.store,getTranslator:()=>t,getEditActions:r.getEditActions,addSlideAfter:r.addSlideAfter,duplicateSlides:r.duplicateSlides,deleteSlides:r.deleteSlides,toggleHideSlides:r.toggleHideSlides,host:i}):null;i.addEventListener("keydown",P=>{if(P.key!=="Enter"||!r)return;let k=P.target;k instanceof HTMLElement&&k.dataset.slideIndex!==void 0&&(P.preventDefault(),r.addSlideAfter(x));});let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-thumbs-list");i.appendChild(l);let p=null,d=false,u=false,m=()=>{p&&(p.hidden=!d||u);};if(o){p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-thumbs-footer"),p.hidden=true;let P=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-thumbs-add");P.type="button",P.appendChild(chunkQPYQDJ2Q_cjs.K(e,"plus")),P.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),P.addEventListener("click",()=>o()),p.appendChild(P),i.appendChild(p);}let g=new Map,x=0,b=[],v={width:1,height:1},f=null,S=[],y,h=1,C=false,w=(P,k,T)=>{let E=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-thumb");E.type="button",E.dataset.slideIndex=String(k),E.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:k+1}));let L=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-thumb-num");L.textContent=String(k+1);let M=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(v.height*T)}px`});M.appendChild(f(P,T)),E.append(L,M);let D=chunkYOEVEUFZ_cjs.Rp(P.hidden,"rail",k);if(D.marker&&D.labelId){E.setAttribute(chunkYOEVEUFZ_cjs.Np,D.marker),E.setAttribute("aria-describedby",D.labelId);let I=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-thumb-hidden");I.id=D.labelId,I.appendChild(chunkQPYQDJ2Q_cjs.K(e,"eye-off"));let R=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-sr-only");R.textContent=t(chunkYOEVEUFZ_cjs.Op),I.appendChild(R),M.appendChild(I);}return s.isSelected(P.id)&&k!==x&&E.classList.add("is-selected"),E.addEventListener("click",I=>{s.onClick(I,P.id,b.map(R=>R.id)),E.classList.toggle("is-selected",s.isSelected(P.id)&&k!==x),n(k);}),a&&E.addEventListener("contextmenu",I=>{I.preventDefault();let R=s.openContextMenu(I.clientX,I.clientY,k,b.map(O=>O.id));R&&a.open(R,b);}),g.set(k,E),E},A=()=>{if(!f)return;g=new Map;let P=Ko/Math.max(v.width,1);if(S.length>0){l.replaceChildren(...mP({doc:e,t,sections:S,slides:b,actions:y,buildSlide:(M,D)=>w(M,D,P)})),g.get(x)?.classList.add("is-active");return}let k=C?chunkYOEVEUFZ_cjs.np(b.length,h,l.scrollTop,l.clientHeight||600):chunkYOEVEUFZ_cjs.np(b.length,h,0,b.length*h,0),T=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});C&&(T.style.position="absolute",T.style.insetInline="0",T.style.top=`${k.offsetY}px`);for(let M=k.startIndex;M<=k.endIndex;M+=1){let D=b[M];D&&T.appendChild(w(D,M,P));}let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-thumbs-space",{position:"relative",height:C?`${k.totalHeight}px`:"auto"});C&&(E.dataset.virtualized="true"),E.appendChild(T),l.replaceChildren(E);let L=g.get(x);L?.classList.add("is-active"),L?.setAttribute("aria-current","page");};return l.addEventListener("scroll",()=>{C&&A();}),{el:i,render(P,k,T,E,L){u=false,m(),b=P,v=k,f=T,S=E??[],y=L;let M=Ko/Math.max(k.width,1);h=Math.round(k.height*M)+8,C=!E?.length&&P.length>=chunkYOEVEUFZ_cjs.mp,i.classList.toggle("pptxv-thumbs-virtualized",C),A(),this.setActive(x);},setActive(P){if(x=P,C){let T=P*h,E=T+h,L=l.clientHeight||600;T<l.scrollTop?l.scrollTop=T:E>l.scrollTop+L&&(l.scrollTop=Math.max(0,E-L)),A();}g.forEach((T,E)=>{T.classList.toggle("is-active",E===P),E===P?T.setAttribute("aria-current","page"):T.removeAttribute("aria-current");});let k=g.get(P);k&&typeof k.scrollIntoView=="function"&&k.scrollIntoView({block:"nearest"});},setVisible(P){i.hidden=!P;},setAddSlideVisible(P){d=P,m();},renderMasters(P,k,T,E,L){u=true,m(),l.replaceChildren(),g=new Map,C=false,i.classList.remove("pptxv-thumbs-virtualized");let M=Ko/Math.max(k.width,1),D=(I,R,O,B)=>{let F=chunkQPYQDJ2Q_cjs.w(e,"button",`pptxv-thumb${B===null?"":" pptxv-master-layout"}`);F.type="button",F.setAttribute("aria-label",R),F.classList.toggle("is-active",L.masterIndex===O&&L.layoutIndex===B),L.masterIndex===O&&L.layoutIndex===B&&F.setAttribute("aria-current","page");let V=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-thumb-num");V.textContent=R;let _=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(k.height*M)}px`});_.appendChild(T(I,M)),F.append(V,_),F.addEventListener("click",()=>E(O,B)),l.appendChild(F);};P.forEach((I,R)=>{D({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),R,null),I.layouts?.forEach((O,B)=>D({id:O.path,rId:"",slideNumber:0,elements:[...I.elements??[],...O.elements??[]],backgroundColor:O.backgroundColor??I.backgroundColor,backgroundImage:O.backgroundImage??I.backgroundImage},O.name||t("pptx.master.layout"),R,B));});}}}function nM(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function uP(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-cmdsearch"),r=e.createElement("pptx-ui-search");r.className="pptxv-cmdsearch-box",r.setAttribute("variant","titlebar"),r.setAttribute("data-pptx-search-surface",""),r.setAttribute("data-pptx-search-input",""),r.placeholder=t("pptx.titleBar.searchPlaceholder"),r.setAttribute("aria-label",t("pptx.titleBar.search")),o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-cmdsearch-menu");i.hidden=true,o.appendChild(i);let s=()=>{i.hidden=true,i.replaceChildren();},a=d=>{r.value="",s(),d.run();},l=[],p=()=>{if(l=nM(r.value,n,t),r.value.trim().length===0){s();return}if(i.replaceChildren(),l.length===0){let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),i.appendChild(d);}for(let d of l){let u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",m=>{m.preventDefault(),a(d);}),i.appendChild(u);}i.hidden=false;};return r.addEventListener("input",p),r.addEventListener("focus",p),r.addEventListener("blur",s),r.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?a(l[0]):d.key==="Escape"&&(r.value="",s());}),{el:o}}var rM={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function xP(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-autosave"),a=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-autosave-label");a.textContent=t("pptx.titleBar.autoSave");let l=n.autosaveToggleAvailable??true,p=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t(l?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),l||(p.disabled=true,p.classList.add("is-disabled")),p.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-switch-knob"));let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-autosave-label");s.append(a,p,d),o.appendChild(s);let u=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{l&&(i=n.onToggleAutosave(),u(),L());});let m=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(m);let g=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-qat");o.appendChild(g);let x=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(x);let b={editable:true,canUndo:false,canRedo:false},v=null,f=null,S=false,y=()=>{m.hidden=!b.editable,x.hidden=S||!b.editable;},h=D=>{D==="save"?n.save():D==="undo"?n.undo():D==="redo"?n.redo():n.quickAccess?.run(D);},C=()=>{g.replaceChildren(),v=null,f=null;let D=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};g.hidden=!D.visible||!b.editable,n.onQuickAccessVisibilityChange?.(g.hidden);for(let I of D.commandIds){if((I==="undo"||I==="redo")&&chunkYOEVEUFZ_cjs.cq(I,n.hiddenActions))continue;let R=chunkYOEVEUFZ_cjs.fq.find(V=>V.id===I);if(!R)continue;let O=t(R.labelKey),B=rM[R.icon],F=H(e,{label:O,icon:B,text:B===void 0?"Ab":void 0,textLabel:D.showCommandLabels?O:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(I)});if(n.quickAccess){let V=n.quickAccess.screenTip(O);V===void 0?F.btn.removeAttribute("title"):F.btn.title=V;}I==="undo"?(v=F,F.setDisabled(!b.canUndo)):I==="redo"&&(f=F,F.setDisabled(!b.canRedo)),g.appendChild(F.btn);}},w=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-file"),A=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-filename");A.textContent=n.fileName||t(chunkYOEVEUFZ_cjs.Fo);let P=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-dot");P.textContent="\u2022",P.setAttribute("aria-hidden","true");let k=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-status");w.append(A,P,k),o.appendChild(w);let T="idle",E=false,L=()=>{k.textContent=t(chunkYOEVEUFZ_cjs.Eo({autosaveState:T,isDirty:E,autosaveEnabled:i})),k.classList.toggle("is-error",i&&T==="error"),k.classList.toggle("is-saving",i&&T==="saving");},M=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-titlebar-search");return M.appendChild(uP(e,t,n.commands).el),o.appendChild(M),u(),L(),y(),C(),{el:o,setEditState(D){b=D,s.hidden=!D.editable,y();let I=n.quickAccess?.getState();g.hidden=!D.editable||I?.visible===false,n.onQuickAccessVisibilityChange?.(g.hidden),P.hidden=!D.editable,k.hidden=!D.editable,M.hidden=!D.editable,v?.setDisabled(!D.canUndo),f?.setDisabled(!D.canRedo);},setAutosaveState(D){T=D,L();},setDirty(D){E=D,L();},setAutosaveEnabled(D){i=D,u(),L();},refreshQuickAccess:C,getQuickAccessElement:()=>g,dockQuickAccessElement(){o.insertBefore(g,x);},setQuickAccessDetached(D){S=D,y();}}}function al(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(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,s=null,a=false;n.showToolbar&&n.showTitleBar!==false&&(r=xP(e,t,{...n.titleBar,onQuickAccessVisibilityChange:D=>{a&&s&&(s.hidden=D),n.titleBar.onQuickAccessVisibilityChange?.(D);}}),o.appendChild(r.el)),n.showToolbar&&(i=jr(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el),nP(e,o,n.ribbonHandlers.nav.getCustomization?.()),s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-qat-row"),s.hidden=true,o.appendChild(s));let l=n.showToolbar?Ds(e,t,()=>n.onEnableEditing()):null;l&&o.appendChild(l.el);let p=n.showToolbar?HE(e,t,()=>n.onEditAnywayFromReadOnly(),()=>n.onDismissReadOnlyBanner(),D=>n.onSubmitReadOnlyPassword(D),()=>n.onCancelReadOnlyPasswordPrompt()):null;p&&o.appendChild(p.el);let d=null,u=n.showToolbar?ks(e,t,{openMenu:()=>d?.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;u&&(u.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(u.el));let m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-body");o.appendChild(m);let g=is(e,t,n.onSelectSlide);o.appendChild(g.el);let x=nl(e,t);o.appendChild(x.el);let b=Ps(e,t);m.appendChild(b.el);let v=null;n.showThumbnails&&(v=il(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide(),n.thumbnailMenu),m.appendChild(v.el));let f=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-viewport");f.setAttribute("data-pptx-viewport",""),m.appendChild(f);let S=null;n.showInspector&&(S=_r(e,t,n.inspectorHandlers),S.setEditable(n.editable),m.appendChild(S.el));let y=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-stage-wrap");f.appendChild(y);let h=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-empty");h.textContent=t("pptx.statusBar.noSlides"),h.hidden=true,f.appendChild(h);let C=Is(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(C.el),n.showNotes===false&&(C.el.style.display="none");let w=n.showToolbar&&n.showStatusBar!==false?iP(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;w&&o.appendChild(w.el),d=n.showToolbar?As(e,t,n.ribbonHandlers,n.onSelectSlide,S?.el??null,n.hiddenActions):null,d&&(d.setEditable(n.editable),o.appendChild(d.el));let A=Ms(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);A.update(0,0),o.appendChild(A.el);let P=Ls(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(P.el);let k=aw(e,t,D=>n.onDismissCompatToast(D),()=>n.onDismissAllCompatToasts());o.appendChild(k.el),chunkYOEVEUFZ_cjs.Si(C.el,D=>k.setBottomInset(D));let T=rP(e,t,D=>n.onDismissRunProgramNotice(D));o.appendChild(T.el);let E=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-overlay pptxv-loading");E.textContent=t("pptx.common.loading"),E.setAttribute("role","status"),E.setAttribute("aria-live","polite"),E.hidden=true,o.appendChild(E);let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-overlay pptxv-error");L.setAttribute("role","alert");let M=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-error-message");return L.appendChild(M),L.hidden=true,o.appendChild(L),{root:o,ribbon:i,titleBar:r,inspector:S,accessibility:g,shortcuts:x,masterSidebar:b,thumbnails:v,viewport:f,stageWrap:y,notes:C,statusBar:w,mobileToolbar:u,mobileActionSheets:d,presentationTouchControls:A,presentationToolbar:P,setLoading(D){E.hidden=!D,o.setAttribute("aria-busy",String(D));},setError(D){L.hidden=D===null,M.textContent=D??"";},setEmpty(D){h.hidden=!D,y.hidden=D;},setPresenting(D){o.classList.toggle("pptxv-presenting",D),P.setPresenting(D);},setQuickAccessPosition(D){if(!(!r||!s))if(D==="below"){let I=r.getQuickAccessElement();s.appendChild(I),a=true,s.hidden=I.hidden,r.setQuickAccessDetached(true);}else a=false,r.dockQuickAccessElement(),s.hidden=true,r.setQuickAccessDetached(false);},setProtectedView(D){l?.setActive(D);},setReadOnlyRecommendation(D,I,R){p?.update(D,I,R);},setCompatToasts(D,I){k.update(D,I);},setRunProgramNotices(D){T.update(D);}}}async function lo(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunkYOEVEUFZ_cjs.tt(e,r,i),typeof o=="function"&&o(r,i);}})}function sl(e,t){return chunkYOEVEUFZ_cjs.ee(e,t)}function gP(e,t){sl(e,t)?.dispatchEvent(new MouseEvent("dblclick",{bubbles:true,cancelable:true}));}function bP(e){return (t,n)=>lo(e,{scale:n.width/(t.width||1),x:t.x,y:t.y,width:t.width,height:t.height,useCORS:true,allowTaint:true,backgroundColor:null,logging:false})}function fP(e,t,n){let o=sl(e,n);if(!o)return;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=J(t.get(),n);chunkYOEVEUFZ_cjs.St(o,i,s,e,chunkYOEVEUFZ_cjs.Rt(a?.name,"Picture"),{scale:2,html2canvasFallback:bP(o)});}async function Xr(e,t,n){let o=sl(e,t);if(!o)return null;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=await chunkYOEVEUFZ_cjs.Tt(o,i,s,e,{scale:2,html2canvasFallback:bP(o)});return chunkYOEVEUFZ_cjs.Yl(n,a)}function Qr(e,t,n){t.set({inspectorOpen:true}),requestAnimationFrame(()=>{requestAnimationFrame(()=>chunkYOEVEUFZ_cjs.Vl(e,n));});}function Zr(e){let t=e instanceof Element?e.closest("td"):null;if(!t||t.dataset.rowIndex===void 0||t.dataset.cellIndex===void 0)return null;let n={row:Number(t.dataset.rowIndex),column:Number(t.dataset.cellIndex)};return Number.isFinite(n.row)&&Number.isFinite(n.column)?n:null}function pl(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=Zr(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:chunkYOEVEUFZ_cjs.Rl(e.selectedTableCells.map(({row:i,column:s})=>({row:i,col:s})),t.tableData),isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function vP(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function dl(e,t,n){let o=t.getEditActions(),r=n?.cell??null,i=chunkYOEVEUFZ_cjs.Ql(e);if(i)return o.mergeShapes(i);switch(e){case "copy":return o.copy();case "cut":return o.cut();case "paste":return o.paste();case "duplicate":return o.duplicateSelected();case "delete":return o.deleteSelected();case "bring-forward":return o.bringForward();case "send-backward":return o.sendBackward();case "bring-front":return o.bringToFront();case "send-back":return o.sendToBack();case "group":return o.groupSelected();case "ungroup":return o.ungroupSelected();case "crop":return o.enterCropMode();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return iM(t);case "table-insert-row-above":return r?o.mutateTableStructure(r,"insertRowAbove"):void 0;case "table-insert-row-below":return r?o.mutateTableStructure(r,"insertRowBelow"):void 0;case "table-delete-row":return r?o.mutateTableStructure(r,"deleteRow"):void 0;case "table-insert-col-left":return r?o.mutateTableStructure(r,"insertColumnLeft"):void 0;case "table-insert-col-right":return r?o.mutateTableStructure(r,"insertColumnRight"):void 0;case "table-delete-col":return r?o.mutateTableStructure(r,"deleteColumn"):void 0;case "table-merge-selected":return o.mergeTableCells(t.store.get().selectedTableCells);case "table-merge-right":return r?vP(o,r,"right"):void 0;case "table-merge-down":return r?vP(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0;case "edit-text":return ll(t,s=>gP(t.doc,s));case "edit-points":return ll(t,s=>{t.startEditPoints?.(s);});case "save-as-picture":return ll(t,s=>fP(t.doc,t.store,s));case "edit-alt-text":return Qr(t.doc,t.store,chunkYOEVEUFZ_cjs.Ul("edit-alt-text"));case "size-and-position":return Qr(t.doc,t.store,chunkYOEVEUFZ_cjs.Ul("size-and-position"));case "format-shape":return Qr(t.doc,t.store,chunkYOEVEUFZ_cjs.Ul("format-shape"))}}function ll(e,t){let n=e.store.get().selectedElementId;n&&t(n);}function iM(e){let t=e.store.get(),n=t.slides[t.currentSlide]?.elements.find(({id:o})=>o===t.selectedElementId)??null;e.getAi()?.fixElement(n,t.currentSlide);}function aM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkYOEVEUFZ_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function cl(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(d,u)=>{let m=chunkQPYQDJ2Q_cjs.w(t,"button",`pptxv-context-menu-item${d.danger?" is-danger":""}`);return m.type="button",m.setAttribute("role","menuitem"),m.textContent=e.getTranslator()(d.labelKey),m.disabled=d.disabled===true,m.addEventListener("click",()=>{s(),dl(d.id,e,u);}),m},l=(d,u,m,g)=>{r=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`}),r.dataset.pptxContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.contextMenu.ariaLabel"));for(let x of d){if(x.separatorBefore){let b=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu-separator");b.setAttribute("role","separator"),r.appendChild(b);}r.appendChild(a(x,u));}(o.closest(".pptxv")??t.body).appendChild(r),aM(r,t,m,g),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{let u=n.get(),m=e.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq;if(!u.editable||u.presenting||!m.elementMenuEnabled)return;let g=chunkYOEVEUFZ_cjs.Jl(chunkYOEVEUFZ_cjs.Fm(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!g||!chunkYOEVEUFZ_cjs.jo(g,u.editTemplateMode))return;d.preventDefault(),s(),u.selectedElementIds.includes(g)||e.selectElement(g);let x=Zr(d.target);x&&!n.get().selectedTableCells.some(({row:y,column:h})=>y===x.row&&h===x.column)&&n.set({selectedTableCell:x,selectedTableCells:[x]});let b=n.get(),v=J(b,g)??null,f=pl(b,v,d.target),S=chunkYOEVEUFZ_cjs.hr(chunkYOEVEUFZ_cjs.Sl({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:b.selectedElementIds.length>1,selectionGroupable:b.selectedElementIds.every(y=>chunkYOEVEUFZ_cjs._e(J(b,y)??null,"group")),aiEnabled:e.getAi()!==null,hasClipboard:b.clipboardPayload!==null,editPoints:e.startEditPoints?chunkYOEVEUFZ_cjs.Es(v):void 0,canMergeShapes:chunkYOEVEUFZ_cjs.Kl(b.selectedElementIds.map(y=>J(b,y))),canCrop:chunkYOEVEUFZ_cjs.Ys(v)}),m);S.length>0&&l(S,f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function sM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkYOEVEUFZ_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function ml(e){let{doc:t,store:n,root:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=d=>{switch(d){case "next":e.next();break;case "previous":e.prev();break;case "seeAllSlides":e.showAllSlides();break;case "presenterView":e.togglePresenterView();break;case "pointerArrow":e.setPointerTool("none");break;case "pointerPen":e.setPointerTool("pen");break;case "pointerHighlighter":e.setPointerTool("highlighter");break;case "pointerLaser":e.setPointerTool("laser");break;case "eraseInk":e.eraseAnnotations();break;case "blankBlack":e.toggleBlank("black");break;case "blankWhite":e.toggleBlank("white");break;case "endShow":e.exitPresentation();break}},l=(d,u)=>{r=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-showmenu",{left:`${d}px`,top:`${u}px`}),r.dataset.pptxPresentationMenu="true",r.setAttribute("role","menu"),chunkYOEVEUFZ_cjs.Tk({seeAllSlides:true,presenterView:true,pointerTools:true,eraseInk:true,blankBlack:true,blankWhite:true}).forEach((g,x)=>{if(x>0){let b=chunkQPYQDJ2Q_cjs.w(t,"hr","pptxv-showmenu-separator");b.setAttribute("role","separator"),r?.appendChild(b);}for(let b of g.items){let v=chunkQPYQDJ2Q_cjs.w(t,"button");v.type="button",v.setAttribute("role","menuitem"),v.dataset.itemId=b.id,v.textContent=e.getTranslator()(b.labelKey),v.addEventListener("click",()=>{s(),a(b.id);}),r?.appendChild(v);}}),o.appendChild(r),sM(r,t,d,u),i=g=>{g instanceof KeyboardEvent&&g.key!=="Escape"||g.target instanceof Node&&r?.contains(g.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{n.get().presenting&&(d.preventDefault(),s(),e.shouldShow()&&l(d.clientX,d.clientY));};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function ul(e,t){let n=chunkYOEVEUFZ_cjs.cl(),o=s=>{let a=t.isSlideShowStartEnabled?.()===false?null:chunkYOEVEUFZ_cjs.Cl(s,{isPresenting:t.isPresenting?.()??false});if(a){s.preventDefault(),a==="fromBeginning"?t.startFromBeginning?.():t.startFromCurrent?.();return}let l=s.target;if(!(l&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(l.tagName))){if(t.isPresenting?.()){lM(s,t,n);return}switch(s.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}s.preventDefault();}},r=chunkYOEVEUFZ_cjs.gb(),i=s=>{if(!t.isPresenting?.()||!chunkYOEVEUFZ_cjs.Hk())return;let a=chunkYOEVEUFZ_cjs.hb(s,r);a.intent==="next-slide"?(s.preventDefault(),t.next()):a.intent==="previous-slide"&&(s.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function lM(e,t,n){if(!chunkYOEVEUFZ_cjs.Hk())return;let o=chunkYOEVEUFZ_cjs.dl(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");return;case "toggleSubtitles":t.toggleSubtitles?.();break;case "toggleChrome":t.toggleChrome?.();break;case "showAllSlides":t.showAllSlides?.();break;}}var pM=.1,dM=8;function xl(e,t){let n=chunkYOEVEUFZ_cjs.qn({getScale:t.getScale,minScale:pM,maxScale:dM,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:a=>{t.isSwipeEnabled()&&(a===-1?t.onNext():t.onPrevious());}}}),o=a=>n.onTouchStart(a),r=a=>n.onTouchMove(a),i=a=>n.onTouchEnd(a),s=()=>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",s,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",s,true),n.cancel();}}function gl(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,s=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",s),{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",s);}}}var Ae=chunkYOEVEUFZ_cjs.Yf,bl=chunkYOEVEUFZ_cjs.Zf;function fl(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunkQPYQDJ2Q_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunkQPYQDJ2Q_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,s=1,a={width:0,height:0},l=null,p=(m,g)=>{i&&(g.stopPropagation(),g.preventDefault(),g.currentTarget?.setPointerCapture?.(g.pointerId),l=m);},d=(m,g)=>{let x=l;l=null;let b=g.currentTarget;if(x!==m||!i||!b)return;try{b.releasePointerCapture?.(g.pointerId);}catch{}let v=b.getBoundingClientRect(),f=m==="h"?g.clientY-v.top:g.clientX-v.left,S=chunkYOEVEUFZ_cjs.$f(f,s,m==="h"?a.height:a.width);S!==null&&t(m,S);};o.addEventListener("pointerdown",m=>p("h",m)),o.addEventListener("pointerup",m=>d("h",m)),r.addEventListener("pointerdown",m=>p("v",m)),r.addEventListener("pointerup",m=>d("v",m));let u=(m,g,x,b)=>{let v=x*b.scale,f=g==="h";chunkQPYQDJ2Q_cjs.y(m,{width:f?v:Ae,height:f?Ae:v}),m.replaceChildren(),m.appendChild(chunkQPYQDJ2Q_cjs.x(e,"rect",{class:"pptxv-ruler-bg",width:f?v:Ae,height:f?Ae:v}));let S=b.selection;if(S){let y=(f?S.x:S.y)*b.scale,h=Math.max((f?S.width:S.height)*b.scale,1);m.appendChild(chunkQPYQDJ2Q_cjs.x(e,"rect",{class:"pptxv-ruler-highlight",x:f?y:0,y:f?0:y,width:f?h:Ae,height:f?Ae:h}));}for(let y of chunkYOEVEUFZ_cjs._f(x,b.scale,b.unit)){let h=Ae-Ae*(y.isMajor?.6:.3);if(m.appendChild(chunkQPYQDJ2Q_cjs.x(e,"line",{class:"pptxv-ruler-tick",x1:f?y.position:Ae,y1:f?Ae:y.position,x2:f?y.position:h,y2:f?h:y.position,"stroke-width":y.isMajor?1:.5})),!y.label)continue;let C=chunkQPYQDJ2Q_cjs.x(e,"text",{class:"pptxv-ruler-label",x:f?y.position+2:2,y:f?bl+1:y.position+bl+2,"font-size":bl});C.textContent=y.label,m.appendChild(C);}m.appendChild(chunkQPYQDJ2Q_cjs.x(e,"line",{class:"pptxv-ruler-edge",x1:f?0:Ae-.5,y1:f?Ae-.5:0,x2:f?v:Ae-.5,y2:f?Ae-.5:v}));};return {mount(m){n.parentNode!==m&&m.append(n,o,r);},update(m){i=m.draggable,s=m.scale,a=m.canvasSize,n.hidden=!m.visible,o.style.display=m.visible?"":"none",r.style.display=m.visible?"":"none",o.classList.toggle("is-draggable",m.draggable),r.classList.toggle("is-draggable",m.draggable),m.visible&&(u(o,"h",m.canvasSize.width,m),u(r,"v",m.canvasSize.height,m));},destroy(){n.remove(),o.remove(),r.remove();}}}function cM(e){let t={presentFromStart:()=>e.startPresentationFromBeginning(),print:()=>{e.print();},exportPdf:()=>{e.exportPdf();},newSlide:()=>e.getEditActions().addSlide(),spellCheck:()=>e.getEditActions().toggleSpellCheck(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut()};return n=>t[n]?.()}function vl(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:s}=e,a=()=>e.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq,l=al(t,o,{...QC(a()),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:e.isAutosaveSwitchOn?.()??r.autosave!==false,autosaveToggleAvailable:e.isAutosaveToggleAvailable?.()??r.autosave!==false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:mM(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>ZC(e.getQuickAccessOptions(),a()),run:cM(e),screenTip:M=>e.quickAccessScreenTip(M)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:M=>e.setPresentationPointerTool?.(M),setColor:M=>e.setPresentationPointerColor?.(M),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},onEnableEditing:()=>e.enableEditingFromProtectedView(),onEditAnywayFromReadOnly:()=>e.editAnywayFromReadOnlyRecommendation(),onDismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),onSubmitReadOnlyPassword:M=>e.submitReadOnlyPassword(M),onCancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),onDismissCompatToast:M=>e.dismissCompatToast(M),onDismissAllCompatToasts:()=>e.dismissAllCompatToasts(),onDismissRunProgramNotice:M=>e.dismissRunProgramNotice(M),thumbnailMenu:{store:i,getEditActions:()=>e.getEditActions(),addSlideAfter:M=>e.addSlide(M),duplicateSlides:M=>e.duplicateSlides(M),deleteSlides:M=>e.deleteSlides(M),toggleHideSlides:M=>e.toggleHideSlides(M)},...XC(e)}),p=Ro(l.root,e.initialTheme??r.theme,[]);n.appendChild(l.root),l.statusBar?.setNotesExpanded(i.get().notesExpanded),l.statusBar?.setDirty(i.get().dirty),l.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),l.titleBar?.setDirty(i.get().dirty),l.setProtectedView(i.get().protectedView),l.setReadOnlyRecommendation(i.get().readOnlyRecommendation,i.get().readOnlyBannerDismissed,{promptOpen:i.get().readOnlyPasswordPromptOpen,error:i.get().readOnlyPasswordError,checking:i.get().readOnlyCheckingPassword}),l.setCompatToasts(i.get().compatToasts,i.get().inspectorOpen?chunkYOEVEUFZ_cjs.Io:0),l.setRunProgramNotices(i.get().runProgramNotices);let d=ul(l.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,toggleSubtitles:e.toggleSubtitles,toggleChrome:()=>l.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides,startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),isSlideShowStartEnabled:()=>chunkYOEVEUFZ_cjs.ar(a(),"presentMode")}),u=xl(l.root,{getScale:()=>s.effectiveScale(),onPinchZoom:M=>e.setZoom(M),isSwipeEnabled:()=>{let M=i.get();return M.presenting||!M.editable},onNext:()=>{let M=i.get();rs({presenting:M.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:M.slides[M.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),m=t.createElement("button");m.type="button",m.setAttribute("data-pptx-end-of-show",""),m.className="pptxv-presentation-end",Object.assign(m.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let g=t.createElement("span");Object.assign(g.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),g.textContent=o("pptx.presentation.endOfSlideShow"),m.appendChild(g),m.addEventListener("click",M=>{M.stopPropagation(),e.next();});let x=()=>{let M=i.get(),D=M.presenting&&M.endOfShow;D&&m.parentElement!==l.root?l.root.appendChild(m):!D&&m.parentElement&&m.remove();},b=i.subscribe(x);x();let v=null,f=i.subscribe((M,D)=>{M.presenting&&M.currentSlide!==D.currentSlide&&(v=D.currentSlide),D.presenting&&!M.presenting&&(v=null);}),S=rw(i,M=>e.goToSlide(M)),y=ew({goToSlide:M=>e.goToSlide(M),next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),confirmExternalHyperlink:e.confirmExternalHyperlink,getStageRoot:()=>l.stageWrap,getPreviousPresentedSlide:()=>v,getCurrentSlide:()=>{let M=i.get();return M.slides[M.currentSlide]},customShowRunner:S,addRunProgramNotice:M=>e.addRunProgramNotice(M)}),h=M=>{let D=i.get();!D.presenting||!(M.target instanceof Element)||!M.target.closest(".pptxv-stage")||!tw({target:M.target,presenting:D.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:D.slides[D.currentSlide],slideCount:D.slides.length,runner:y})||e.next();};l.root.addEventListener("click",h);let C=M=>{if(!(M.target instanceof Element))return;let D=M.target.closest("a.pptxv-link"),I=D?.getAttribute("href");!D||!I||(M.preventDefault(),(e.confirmExternalHyperlink?.(I)??true)&&chunkYOEVEUFZ_cjs.ad(I));};l.root.addEventListener("click",C);let w=ow({getState:()=>i.get(),subscribe:M=>i.subscribe(M),next:()=>e.next()}),A=nw({getPresenting:()=>i.get().presenting,subscribe:M=>i.subscribe(M),root:l.root,cancelAutoAdvance:w.cancel,rearmAutoAdvance:w.rearm}),P=ml({doc:t,store:i,root:l.root,getTranslator:()=>e.t,shouldShow:()=>e.shouldShowPresentationContextMenu?.()??true,next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),showAllSlides:()=>e.showPresentationAllSlides?.(),togglePresenterView:()=>e.togglePresenterView?.(),setPointerTool:M=>e.setPresentationPointerTool?.(M),eraseAnnotations:()=>e.erasePresentationAnnotations?.(),toggleBlank:M=>e.togglePresentationBlank?.(M)}),k=()=>{l.root.removeEventListener("click",h),l.root.removeEventListener("click",C),w.detach(),A(),b(),f(),S.dispose(),m.remove(),P.destroy();},T={current:void 0},E=gl(l.root,M=>{if(!M&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){T.current?.enter();return}i.set({presenting:M});});T.current=E;let L=null;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(()=>{i.get().zoom==="fit"&&s.renderStage();}),L.observe(l.viewport)),{chrome:l,presentation:E,detachKeyboard:d,detachTouchGestures:u,detachPresentationClick:k,resizeObserver:L,appliedThemeVars:p}}function mM(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function hl(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function yl(e){return {doc:e.doc,container:e.container,t:e.t,options:e.getChromeOptions(),getCustomization:()=>e.getResolvedCustomization(),store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),setZoom:t=>e.setZoom(t),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(),isAutosaveSwitchOn:()=>e.isAutosaveSwitchOn(),isAutosaveToggleAvailable:()=>e.isAutosaveToggleAvailable(),startPresentationFromBeginning:()=>{e.goToSlide(e.firstShowSlideIndex()),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(),toggleHideCurrentSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),clearSelection:()=>e.selectElements([]),readTransitionDraft:()=>{let t=e.store.get();return chunkYOEVEUFZ_cjs.Bi(t.slides[t.currentSlide])},readTransition:()=>{let t=e.store.get();return t.slides[t.currentSlide]?.transition},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),addSlide:t=>e.addSlide(t),duplicateSlides:t=>e.duplicateSlides(t),deleteSlides:t=>e.deleteSlides(t),toggleHideSlides:t=>e.toggleHideSlides(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),firstShowSlideIndex:()=>e.firstShowSlideIndex(),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"};e.updatePresenterSnapshot({pointer:{...n,tool:n.tool===t?"none":t}});},setPresentationPointerColor:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,tool:"none"};e.updatePresenterSnapshot({pointer:{...n,color:t}});},togglePresenterView:()=>e.togglePresenterView(),showPresentationAllSlides:()=>e.showPresentationAllSlides(),shouldShowPresentationContextMenu:()=>e.shouldShowPresentationContextMenu(),classifyPresentationExit:()=>e.classifyPresentationExit(),erasePresentationAnnotations:()=>e.clearPresentationAnnotations(),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),togglePresentationBlackboard:()=>{let t=e.getPresenterSnapshot(),n=t.pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"},o=chunkYOEVEUFZ_cjs.Sk(t.blackout,n.tool);e.updatePresenterSnapshot({blackout:o.blackout,pointer:{...n,tool:o.tool}});},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),exportJson:()=>e.exportJson(),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(),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),armFreeformTool:t=>e.editor.armFreeformTool(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t),enableEditingFromProtectedView:()=>e.enableEditingFromProtectedView(),editAnywayFromReadOnlyRecommendation:()=>e.editAnywayFromReadOnlyRecommendation(),dismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),submitReadOnlyPassword:t=>e.submitReadOnlyPassword(t),cancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),dismissCompatToast:t=>e.dismissCompatToast(t),dismissAllCompatToasts:()=>e.dismissAllCompatToasts(),addRunProgramNotice:t=>e.addRunProgramNotice(t),dismissRunProgramNotice:t=>e.dismissRunProgramNotice(t),confirmExternalHyperlink:t=>e.confirmExternalHyperlink(t)}}function uM(e,t){let{width:n,height:o}=chunkYOEVEUFZ_cjs.qt(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let s=e.ownerDocument.createElement("canvas");s.width=n,s.height=o;let a=s.getContext("2d");if(!a)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");a.drawImage(e,0,0,n,o),r=s;}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 Sl(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=chunkYOEVEUFZ_cjs.pt,onProgress:i,signal:s}=t,a=e.store.get().slides.length;if(a===0)return;let l=chunkYOEVEUFZ_cjs.ot({totalSlides:a,slideDurationMs:n,slideTimingsMs:o}),p=[];for(let m of l){if(s?.aborted)throw chunkYOEVEUFZ_cjs.sj();i?.(m.slideIndex,a);let g=await e.rasterizeSlide(m.slideIndex);p.push({...uM(g,r),delayCs:m.delayCs});}let d=chunkYOEVEUFZ_cjs.rt(p,l[0].delayCs);i?.(a,a);let u=new ArrayBuffer(d.byteLength);new Uint8Array(u).set(d),chunkYOEVEUFZ_cjs.kt(new Blob([u],{type:"image/gif"}),`${e.baseName}.gif`);}function xM(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 Ht(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let s=n?.[r]??o?.[r]??chunkQPYQDJ2Q_cjs.C[r]??chunkQPYQDJ2Q_cjs.D(r);return xM(s,i)}}function Jr(e,t,n,o={}){return chunkYOEVEUFZ_cjs.U.exportSlide(e,t,n,o)}function hP(e,t={}){return chunkYOEVEUFZ_cjs.U.exportAll(e,t)}async function wl(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,s=r??chunkYOEVEUFZ_cjs.Ft,a=e.store.get(),l=a.slides,p=chunkYOEVEUFZ_cjs.ut(i,l.length),d=chunkYOEVEUFZ_cjs.xt(p.colorMode),u=chunkYOEVEUFZ_cjs.wt(chunkYOEVEUFZ_cjs.vt(p.slideRange,a.currentSlide,l.length,p.customRangeFrom,p.customRangeTo),l,e.getIncludeHiddenSlides?.()??false);if(p.printWhat==="outline"){let y=`<div class="outline-page">${chunkYOEVEUFZ_cjs.zt(u,l)}</div>`;return s(Cl("Outline",y,p,d))}if(u.length===0)return false;if(p.printWhat==="slides"){let{width:y,height:h}=a.canvasSize,C=[];for(let w=0;w<u.length;w++){if(o?.aborted)throw chunkYOEVEUFZ_cjs.sj();n?.(w,u.length),C.push(Jr(l[u[w]],y,h));}return n?.(u.length,u.length),s(chunkYOEVEUFZ_cjs.st(C,y,h,{title:"Slides (Vector)",orientation:p.orientation,colorFilter:d,scaleToFit:p.scaleToFit}))}let m=e.getTranslator?.()??Ht(),g=r?void 0:chunkYOEVEUFZ_cjs.Dt(m("pptx.print.preparingToPrint"));if(!r&&!g)return false;let x=e.getPrintHighQuality?.()?2:1,b=[];for(let y=0;y<u.length;y++){if(o?.aborted)throw g?.close(),chunkYOEVEUFZ_cjs.sj();n?.(y,u.length);let h=await e.rasterizeSlide(u[y],x);b.push(h.toDataURL("image/png"));}n?.(u.length,u.length);let v=y=>g?(chunkYOEVEUFZ_cjs.Et(g,y),true):s(y);if(p.printWhat==="notes"){let y=chunkYOEVEUFZ_cjs.At(b,u,l);return v(Cl("Notes Pages",y,p,d))}let f=chunkYOEVEUFZ_cjs.Bt(b,u,p.slidesPerPage,a.handoutMaster),S=`Handout ${p.slidesPerPage} per page`;return v(Cl(S,f,p,d))}function Cl(e,t,n,o){return chunkYOEVEUFZ_cjs.Ct({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides,scaleToFit:n.scaleToFit})}function gM(e){return new Promise(t=>{setTimeout(t,e);})}async function bM(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:chunkYOEVEUFZ_cjs.It([...chunkYOEVEUFZ_cjs.Ht]),videoBitsPerSecond:t.videoBitsPerSecond}),s=[];i.ondataavailable=l=>{l.data.size>0&&s.push(l.data);};let a=new Promise((l,p)=>{i.onstop=()=>{l();},i.onerror=()=>{p(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();try{let l=chunkYOEVEUFZ_cjs.Gt({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),p=chunkYOEVEUFZ_cjs.Jt(t.fps);for(let d of l){t.onRecordProgress?.(d.slideIndex,l.length);for(let u=0;u<d.frameCount;u++){if(t.signal?.aborted)throw i.stop(),chunkYOEVEUFZ_cjs.sj();o.drawImage(e[d.slideIndex],0,0),await t.waitMs(p);}}return i.stop(),await a,new Blob(s,{type:"video/webm"})}finally{chunkYOEVEUFZ_cjs.Kt(r);}}async function El(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:s,onRecordProgress:a,signal:l}=t,p=e.store.get().slides.length;if(p===0)return;let d=[];for(let m=0;m<p;m++){if(l?.aborted)throw chunkYOEVEUFZ_cjs.sj();s?.(m,p),d.push(await e.rasterizeSlide(m));}let u=await bM(d,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:a,signal:l,waitMs:e.waitMs??gM});s?.(p,p),chunkYOEVEUFZ_cjs.kt(u,`${e.baseName}.webm`);}function fM(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,sections:e.sections,presentationProperties:e.presentationProperties,headerFooter:e.headerFooter,coreProperties:e.coreProperties,appProperties:e.appProperties,customProperties:e.customProperties,customShows:e.customShows,embeddedFonts:e.embeddedFonts,slideMasters:e.slideMasters,themeOptions:e.themeOptions,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster,hasMacros:e.hasMacros,tableStyleMap:e.tableStyleMap,tableStylesDefaultId:e.tableStylesDefaultId,tags:e.tagCollections,theme:e.colorScheme||e.fontScheme||e.themeName?{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme}:void 0}}function Tl(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,rasterizeSlideToRaster:e.rasterizeSlideToRaster,baseName:chunkYOEVEUFZ_cjs.jt(e.fileName),getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality};async function o(p,d){if(t)return p;t=true;try{return await d()}finally{t=false;}}async function r(p){if(e.rasterizeSlideToRaster)return e.rasterizeSlideToRaster(p);let d=await e.rasterizeSlide(p);return {kind:"canvas",canvas:d,strategy:"html2canvas",width:d.width,height:d.height}}async function i(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length))return o(void 0,async()=>{let m=await r(u);chunkYOEVEUFZ_cjs.lt(await chunkYOEVEUFZ_cjs.Qt(m),`${n.baseName}-slide-${u+1}.png`);})}async function s(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let m=await r(u),g=await chunkYOEVEUFZ_cjs.Pt(m);await navigator.clipboard.write([new ClipboardItem({"image/png":g})]);})}async function a(p={}){let d=e.store.get();if(d.slides.length===0)return;let{onProgress:u,signal:m}=p;return o(void 0,async()=>{let{jsPDF:g}=await import('jspdf'),{width:x,height:b}=d.canvasSize,v=x>=b?"landscape":"portrait",f=new g({orientation:v,unit:"px",format:[x,b],compress:!0}),S=d.slides.length;for(let y=0;y<S;y++){if(m?.aborted)throw chunkYOEVEUFZ_cjs.sj();if(u?.(y,S),y>0&&f.addPage([x,b],v),e.rasterizeSlideToTiles){let h=await e.rasterizeSlideToTiles(y);for(let C of h.tiles){let w=chunkYOEVEUFZ_cjs.Nt(C,h.fullWidth,h.fullHeight,x,b);f.addImage(C.canvas.toDataURL("image/png"),"PNG",w.x,w.y,w.width,w.height);}}else {let h=await e.rasterizeSlide(y);f.addImage(h.toDataURL("image/png"),"PNG",0,0,x,b);}}f.save(`${n.baseName}.pdf`);})}function l(){chunkYOEVEUFZ_cjs.nt(fM(e.store.get()),e.fileName);}return {exportSlidePng:i,copySlideAsImage:s,exportPdf:a,exportJson:l,exportGif:p=>o(void 0,()=>Sl(n,p)),exportVideo:p=>o(void 0,()=>El(n,p)),print:p=>o(false,()=>wl(n,p))}}function Pl(e){let{doc:t}=e,n=null,o=null,r=null,i=null,s=null,a=()=>{let p=e.getTranslator();n=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-backdrop"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let d=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-panel");o=chunkQPYQDJ2Q_cjs.w(t,"h3");let u=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-track");r=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-fill"),u.appendChild(r);let m=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-status");i=chunkQPYQDJ2Q_cjs.w(t,"span"),s=chunkQPYQDJ2Q_cjs.w(t,"span","pptxv-export-progress-pct"),m.append(i,s);let g=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-export-progress-actions"),x=chunkQPYQDJ2Q_cjs.w(t,"button");x.type="button",x.textContent=p("pptx.export.cancel"),x.addEventListener("click",()=>e.onCancel()),g.appendChild(x),d.append(o,u,m,g),n.appendChild(d),t.body.appendChild(n);},l=(p,d)=>{let u=chunkYOEVEUFZ_cjs.oj(p);r&&(r.style.width=`${u}%`),i&&(i.textContent=d),s&&(s.textContent=`${u}%`);};return {open(p,d){this.close(),a(),n?.setAttribute("aria-label",p),o&&(o.textContent=p),l(0,d);},update(p,d){l(p,d);},close(){n?.remove(),n=null,o=null,r=null,i=null,s=null;}}}function Al(e){let t=null,n=s=>e.getTranslator()(s),o=(s,a)=>{let l=new AbortController;return t=l,a&&(a.aborted?l.abort():a.addEventListener("abort",()=>l.abort(),{once:true})),e.modal.open(s,n("pptx.export.capturingSlides")),l},r=()=>{t=null,e.modal.close();},i=(s,a)=>{chunkYOEVEUFZ_cjs.tj(a)||console.error(`[pptx-vanilla-viewer] ${s} export failed:`,a);};return {async runPdf(s={}){let a=o(n("pptx.ribbon.exportPdf"),s.signal);try{await e.controller.exportPdf({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkYOEVEUFZ_cjs.pj(l,p),chunkYOEVEUFZ_cjs.rj(n("pptx.export.rendering"),l,p));}}),e.modal.update(chunkYOEVEUFZ_cjs.mj,n("pptx.export.buildingPdf")),e.modal.update(chunkYOEVEUFZ_cjs.nj,n("pptx.export.buildingPdf"));}catch(l){i("PDF",l);}finally{r();}},async runGif(s={}){let a=o(n("pptx.ribbon.exportGif"),s.signal);try{await e.controller.exportGif({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkYOEVEUFZ_cjs.pj(l,p),chunkYOEVEUFZ_cjs.rj(n("pptx.export.encoding"),l,p));}}),e.modal.update(chunkYOEVEUFZ_cjs.nj,n("pptx.export.savingFile"));}catch(l){i("GIF",l);}finally{r();}},async runVideo(s={}){let a=o(n("pptx.ribbon.exportVideo"),s.signal);try{await e.controller.exportVideo({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkYOEVEUFZ_cjs.pj(l,p,45),chunkYOEVEUFZ_cjs.rj(n("pptx.export.capturing"),l,p));},onRecordProgress:(l,p)=>{s.onRecordProgress?.(l,p),e.modal.update(chunkYOEVEUFZ_cjs.qj(l,p),chunkYOEVEUFZ_cjs.rj(n("pptx.export.recording"),l,p));}}),e.modal.update(chunkYOEVEUFZ_cjs.nj,n("pptx.export.savingFile"));}catch(l){i("Video",l);}finally{r();}},cancel(){t?.abort(),t=null,e.modal.close();}}}function ei(e,t){return chunkYOEVEUFZ_cjs.Cg({headerFooter:e.headerFooter,customProperties:e.customProperties,slide:t})}function vM(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function kl(e){let t=chunkQPYQDJ2Q_cjs.w(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??vM;async function o(a,l){let p=e.store.get(),d=p.slides[a];if(!d)throw new Error(`Export failed: no slide at index ${a}`);t.replaceChildren();let u=chunkQPYQDJ2Q_cjs.A({document:e.doc,slide:d,canvasSize:p.canvasSize,mediaDataUrls:p.mediaDataUrls,fieldContext:ei(p,d),registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:false});t.appendChild(u),await n();let m=2*e.getImageResolutionScale()*l;return {stage:u,naturalWidth:p.canvasSize.width,naturalHeight:p.canvasSize.height,scale:m,html2canvasFallback:(g,x)=>lo(u,{backgroundColor:"#ffffff",scale:x.width/(g.width||1),x:g.x,y:g.y,width:g.width,height:g.height,logging:false})}}async function r(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunkYOEVEUFZ_cjs.Mt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function i(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunkYOEVEUFZ_cjs.Lt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function s(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return (await chunkYOEVEUFZ_cjs.Ot(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})).canvas}return {rasterizeSlide:s,rasterizeSlideToRaster:r,rasterizeSlideToTiles:i,destroy(){t.remove();}}}var Wo=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)}exportJson(){this.exporter.exportJson();}};function Il(e){let t=kl(e),n=Tl({store:e.store,rasterizeSlide:t.rasterizeSlide,rasterizeSlideToRaster:t.rasterizeSlideToRaster,rasterizeSlideToTiles:t.rasterizeSlideToTiles,fileName:e.fileName,getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality}),o=Pl({doc:e.doc,getTranslator:e.getTranslator,onCancel:()=>r.cancel()}),r=Al({modal:o,controller:n,getTranslator:e.getTranslator});return {exportSlidePng:i=>n.exportSlidePng(i),copySlideAsImage:i=>n.copySlideAsImage(i),exportPdf:i=>r.runPdf(i),exportJson:()=>n.exportJson(),exportGif:i=>r.runGif(i),exportVideo:i=>r.runVideo(i),print:i=>n.print(i),destroy:()=>{r.cancel(),t.destroy();}}}var ti=class extends Wo{get customizationApi(){return this.customization.controller.api}getCustomization(){return this.customizationApi.getCustomization()}setCustomization(t){this.customizationApi.setCustomization(t);}updateCustomization(t){this.customizationApi.updateCustomization(t);}resetCustomization(){this.customizationApi.resetCustomization();}hideRibbonTab(t){this.customizationApi.hideRibbonTab(t);}showRibbonTab(t){this.customizationApi.showRibbonTab(t);}hideRibbonGroup(t){this.customizationApi.hideRibbonGroup(t);}showRibbonGroup(t){this.customizationApi.showRibbonGroup(t);}hideToolbarButton(t){this.customizationApi.hideToolbarButton(t);}showToolbarButton(t){this.customizationApi.showToolbarButton(t);}hideRibbonControl(t){this.customizationApi.hideRibbonControl(t);}showRibbonControl(t){this.customizationApi.showRibbonControl(t);}hideOptionsPage(t){this.customizationApi.hideOptionsPage(t);}showOptionsPage(t){this.customizationApi.showOptionsPage(t);}hideOptionsSection(t){this.customizationApi.hideOptionsSection(t);}showOptionsSection(t){this.customizationApi.showOptionsSection(t);}hideSetting(t){this.customizationApi.hideSetting(t);}showSetting(t){this.customizationApi.showSetting(t);}lockSetting(t,n,o){this.customizationApi.lockSetting(t,n,o);}unlockSetting(t){this.customizationApi.unlockSetting(t);}setSettingDefault(t,n){this.customizationApi.setSettingDefault(t,n);}hideBackstagePage(t){this.customizationApi.hideBackstagePage(t);}showBackstagePage(t){this.customizationApi.showBackstagePage(t);}hideBackstageCard(t){this.customizationApi.hideBackstageCard(t);}showBackstageCard(t){this.customizationApi.showBackstageCard(t);}hideContextMenuCommand(t){this.customizationApi.hideContextMenuCommand(t);}showContextMenuCommand(t){this.customizationApi.showContextMenuCommand(t);}hideCanvasContextMenuCommand(t){this.customizationApi.hideCanvasContextMenuCommand(t);}showCanvasContextMenuCommand(t){this.customizationApi.showCanvasContextMenuCommand(t);}disableShortcut(t){this.customizationApi.disableShortcut(t);}enableShortcut(t){this.customizationApi.enableShortcut(t);}remapShortcut(t,n){this.customizationApi.remapShortcut(t,n);}setPanelVisible(t,n){this.customizationApi.setPanelVisible(t,n);}setFeatureEnabled(t,n){this.customizationApi.setFeatureEnabled(t,n);}setDialogAvailable(t,n){this.customizationApi.setDialogAvailable(t,n);}};function Ll(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let s=t.readInlineList?.();if(s?.kind==="unsupported")return;let a=s?.kind==="supported"&&s.snapshot.elementId===r?s.snapshot:void 0,l=a?{...i,text:a.text,textSegments:a.textSegments}:i,p=n(l,a);if(Object.keys(p).length!==0){if(a&&chunkYOEVEUFZ_cjs.e(l)&&("textStyle"in p||"textSegments"in p)){let d=Object.fromEntries(Object.entries(p.textStyle??{}).filter(([g,x])=>x!==l.textStyle?.[g])),u=("textSegments"in p?p.textSegments:a.textSegments)?.map(g=>chunkYOEVEUFZ_cjs.cg(g,d)),m=chunkYOEVEUFZ_cjs.Bh(u);if(m!==a.text)t.cancelInlineList?.();else if(!t.formatInlineList?.({elementId:r,text:m,textSegments:u}))return;p={...p,text:m,textSegments:u};}t.pushHistory(),e.set(Z(o,U(o).map(d=>d.id===r?{...d,...p}:d))),t.commitChange();}}}function Ml(e){let{store:t,ops:n}=e,o=(i,s)=>{let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l?.animations?.some(d=>d.elementId===i))return;let p=s(l.animations);n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(a.slides,a.currentSlide,{animations:p})}),n.commitChange();},r=()=>t.get().slides[t.get().currentSlide]?.animationTimelineAnchors??[];return {addAnimation(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let d=chunkYOEVEUFZ_cjs.Zc(p.animations??[],l,i,s);n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},removeAnimation(){let i=t.get(),s=i.selectedElementId,a=i.slides[i.currentSlide];if(!i.editable||!s||!a?.animations?.length)return;let l=chunkYOEVEUFZ_cjs._c(a.animations,s);l.length!==a.animations.length&&(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(i.slides,i.currentSlide,{animations:l})}),n.commitChange());},setAnimationEffect(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let u=(i==="entrance"?chunkYOEVEUFZ_cjs.Nc:i==="exit"?chunkYOEVEUFZ_cjs.Oc:chunkYOEVEUFZ_cjs.Pc)(p.animations??[],l,s);n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(a.slides,a.currentSlide,{animations:u})}),n.commitChange();},applyMotionPath(i){if(i==="custom")return;let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=l.animations??[],d=i==="none"?chunkYOEVEUFZ_cjs.ce(p,a):chunkYOEVEUFZ_cjs.be(p,a,i);n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(s.slides,s.currentSlide,{animations:d})}),n.commitChange();},setMotionPathData(i){let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=chunkYOEVEUFZ_cjs.ae(l.animations??[],a,i);n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(s.slides,s.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(i,s){o(i,a=>{let l=[...a];return s.durationMs!==void 0&&(l=chunkYOEVEUFZ_cjs.Sc(l,i,s.durationMs)),s.delayMs!==void 0&&(l=chunkYOEVEUFZ_cjs.Tc(l,i,s.delayMs)),s.trigger!==void 0&&(l=chunkYOEVEUFZ_cjs.Qc(l,i,s.trigger)),s.direction!==void 0&&(l=chunkYOEVEUFZ_cjs.Vc(l,i,s.direction)),s.sequence!==void 0&&(l=chunkYOEVEUFZ_cjs.Wc(l,i,s.sequence)),s.timingCurve!==void 0&&(l=chunkYOEVEUFZ_cjs.Uc(l,i,s.timingCurve)),s.repeatCount!==void 0&&(l=chunkYOEVEUFZ_cjs.Xc(l,i,s.repeatCount)),s.repeatMode!==void 0&&(l=chunkYOEVEUFZ_cjs.Yc(l,i,s.repeatMode)),s.triggerShapeId!==void 0&&(l=chunkYOEVEUFZ_cjs.Rc(l,i,s.triggerShapeId||void 0)),s.triggerBookmark!==void 0&&(l=chunkYOEVEUFZ_cjs.hd(l,i,s.triggerBookmark)),s.afterAnimation!==void 0&&(l=chunkYOEVEUFZ_cjs.sd(l,i,s.afterAnimation)),s.afterAnimationColor!==void 0&&(l=chunkYOEVEUFZ_cjs.td(l,i,s.afterAnimationColor)),l});},setAnimationSound(i,s){o(i,a=>chunkYOEVEUFZ_cjs.qd(a,i,s));},setAnimationStockSound(i,s){o(i,a=>chunkYOEVEUFZ_cjs.pd(a,i,s));},reorderAnimation(i,s){o(i,a=>chunkYOEVEUFZ_cjs.ld(a,r(),i,s==="up"?-1:1));},moveAnimation(i,s){o(i,a=>{let l=chunkYOEVEUFZ_cjs.id(a,r()),p=chunkYOEVEUFZ_cjs.jd(l,`editor:${i}`,s);return chunkYOEVEUFZ_cjs.kd(a,p)});}}}function yP(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 Dl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return yP(e,chunkYOEVEUFZ_cjs.Me(r,n))}function Rl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return yP(e,chunkYOEVEUFZ_cjs.Ne(r,n))}function Ol(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 oi(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function Hl(e,t,n){return t.map(r=>e.find(i=>i.id===r)).every(r=>chunkYOEVEUFZ_cjs._e(r,"group"))?chunkYOEVEUFZ_cjs.o(e,t,n):{elements:[...e],groupId:null}}function Fl(e,t,n,o=false){let r=e.find(i=>i.id===t);return chunkYOEVEUFZ_cjs._e(r,"group")?chunkYOEVEUFZ_cjs.p(e,t,n,{intoTemplate:o}):{elements:[...e],childIds:[]}}function Vl(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let s=t.get(),a=s.selectedElementId;if(!s.editable||!a)return;let l=aP(s,a);i(l,a)!==l&&(n.pushHistory(),t.set(sP(s,a,i(l,a))),n.commitChange());};return {bringForward:()=>r(chunkYOEVEUFZ_cjs.vf),sendBackward:()=>r(chunkYOEVEUFZ_cjs.wf),bringToFront:()=>r(chunkYOEVEUFZ_cjs.tf),sendToBack:()=>r(chunkYOEVEUFZ_cjs.uf),alignElements(i){let s=t.get();if(s.selectedElementIds.length<2){o(a=>Ol(a,i,s.canvasSize));return}n.pushHistory(),t.set(Z(s,Dl(U(s),s.selectedElementIds,i))),n.commitChange();},distributeElements(i){let s=t.get();!s.editable||s.selectedElementIds.length<3||(n.pushHistory(),t.set(Z(s,Rl(U(s),s.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>oi(i,"horizontal")),flipVertical:()=>o(i=>oi(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let s=Hl(U(i),i.selectedElementIds,i.editTemplateMode?chunkYOEVEUFZ_cjs.tl(true,i.selectedElementIds[0]):chunkYOEVEUFZ_cjs.sl());s.groupId&&(n.pushHistory(),t.set({...Z(i,s.elements),selectedElementId:s.groupId,selectedElementIds:[s.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),s=i.selectedElementId,a=U(i),l=n.selectedElement(i);if(!i.editable||!s||!a||!l||l.type!=="group")return;let p=l.children.map(u=>i.editTemplateMode?chunkYOEVEUFZ_cjs.tl(true,u.id||l.id):chunkYOEVEUFZ_cjs.sl()),d=Fl(a,s,p,i.editTemplateMode);d.childIds.length!==0&&(n.pushHistory(),t.set({...Z(i,d.elements),selectedElementId:d.childIds.at(-1)??null,selectedElementIds:d.childIds}),n.commitChange());}}}function Bl(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:SP(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(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:SP(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}},setHideBackgroundGraphics(o){let r=t.get();!r.editable||r.masterViewTarget||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(r.slides,r.currentSlide,{showMasterShapes:!o})}),n.commitChange());}}}function SP(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,s)=>s===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function zl(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkYOEVEUFZ_cjs.ul(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkYOEVEUFZ_cjs.ul(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkYOEVEUFZ_cjs.vl(r.element);n.pushHistory(),t.set({...Z(o,[...U(o),i]),selectedElementId:i.id,selectedElementIds:[i.id],pasteOptionsToolbar:[{id:i.id,sourceClone:i}]}),n.commitChange();},pasteWithFormat(o){let r=t.get(),i=r.clipboardPayload;if(!r.editable||!i||!r.slides[r.currentSlide])return null;let s=chunkYOEVEUFZ_cjs.vl(i.element),a=o==="picture"?s:chunkYOEVEUFZ_cjs.Xl(s,o);return n.pushHistory(),t.set({...Z(r,[...U(r),a]),selectedElementId:a.id,selectedElementIds:[a.id],pasteOptionsToolbar:[{id:a.id,sourceClone:s}]}),n.commitChange(),a.id},reformatPasted(o,r,i){i!=="picture"&&CP(t,n,o,chunkYOEVEUFZ_cjs.Xl(r,i));},replaceElement(o,r){CP(t,n,o,r);}}}function CP(e,t,n,o){let r=e.get();t.pushHistory(),e.set(Z(r,U(r).map(i=>i.id===n?o:i))),t.commitChange();}function Nl(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((s,a)=>r||a===0?{...s,themePath:o}:s)}),n.commitChange()))();},applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){let s=t.get();if(!s.editable)return;n.pushHistory();let a=s.colorScheme?{...s.colorScheme}:void 0,l=chunkYOEVEUFZ_cjs.R({slides:s.slides,theme:{colorScheme:s.colorScheme,fontScheme:s.fontScheme},themeColorMap:a},o,r,i),p=Object.keys(s.templateElementsBySlideId).length?Object.fromEntries(Object.entries(s.templateElementsBySlideId).map(([d,u])=>[d,chunkYOEVEUFZ_cjs.Q(u,a??{},o)])):s.templateElementsBySlideId;t.set({slides:l.slides,templateElementsBySlideId:p,colorScheme:l.theme?.colorScheme??o,fontScheme:l.theme?.fontScheme??r,themeName:i}),n.commitChange();},updateTagCollections(o){t.get().editable&&(t.set({tagCollections:o}),n.commitChange());},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Nr(r.slides,r.currentSlide,o)}),n.commitChange());},setTemplateBackground(o,r){let i=e.getHandler();!i||!t.get().editable||(i.setTemplateBackground(o,r),t.set({slideMasters:t.get().slideMasters.map(s=>s.path===o?{...s,backgroundColor:r}:s)}),n.commitChange());},getTemplateBackgroundColor(o){return e.getHandler()?.getTemplateBackgroundColor(o)},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());},updateSlideSize(o){!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0||t.get().editable&&(t.set({slideSize:{...o},canvasSize:chunkYOEVEUFZ_cjs.kj(o)}),n.commitChange());},applySlideSizeRescale(o,r){if(!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0)return;let i=t.get();if(!i.editable)return;let s=chunkYOEVEUFZ_cjs.lj({current:i.slideSize,canvas:i.canvasSize}).size;n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.as(i.slides,s,o,r),slideSize:{...o},canvasSize:chunkYOEVEUFZ_cjs.kj(o)}),n.commitChange();},updateTableStyleMap(o){let r=t.get();if(!r.editable)return;let i=chunkYOEVEUFZ_cjs.up({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();},deleteTableStyle(o){let r=t.get();if(!r.editable)return;let i=chunkYOEVEUFZ_cjs.vp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();}}}function ni(e,t,n,o){let r=we(e,t,t("pptx.hyperlink.editTitle")),i=chunkYOEVEUFZ_cjs.hm(n),s=(p,d)=>{let u=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-select"),m=chunkQPYQDJ2Q_cjs.w(e,"span");m.textContent=p;let g=chunkQPYQDJ2Q_cjs.w(e,"input");return g.type="text",g.value=d,u.append(m,g),r.body.appendChild(u),g},a=s(t("pptx.hyperlink.urlLabel"),i.url);a.placeholder=t("pptx.hyperlink.urlPlaceholder");let l=s(t("pptx.hyperlink.tooltipLabel"),i.tooltip);ae(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunkYOEVEUFZ_cjs.jm()),r.close();}),ae(e,r.footer,t("pptx.common.cancel"),r.close),ae(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunkYOEVEUFZ_cjs.im(n,{url:a.value,tooltip:l.value})),r.close();},true);}function wP(e,t,n){let o=we(e,t,t("pptx.pasteSpecial.dialogTitle")),r="keep-source-formatting";Br(e,o.body,"paste-special-format",chunkYOEVEUFZ_cjs.Wl.map(i=>({value:i.id,label:t(i.labelKey)})),r,i=>{r=i;}),ae(e,o.footer,t("pptx.common.cancel"),()=>o.close()),ae(e,o.footer,t("pptx.common.ok"),()=>{o.close(),n.onConfirm(r);},true);}var ri=new WeakMap;function hM(e,t){e.addEventListener("pointerdown",n=>{n.stopPropagation(),e.setPointerCapture(n.pointerId);}),e.addEventListener("pointermove",n=>{if(!e.hasPointerCapture(n.pointerId))return;let o=ri.get(e),r=e.offsetParent;if(!o||!r)return;let i=r.getBoundingClientRect(),s=o.scale||1,a=o.axis==="h"?(n.clientY-i.top)/s:(n.clientX-i.left)/s;t.onMoveGuide(o.id,a);}),e.addEventListener("pointerup",n=>{try{e.releasePointerCapture(n.pointerId);}catch{}}),e.addEventListener("dblclick",n=>{n.stopPropagation();let o=ri.get(e);o&&t.onRemoveGuide(o.id);});}function EP(e,t,n,o,r){let i=new Map;t.querySelectorAll(".pptxv-alignment-guide").forEach(a=>{let l=a.dataset.guideId;l!==void 0&&i.set(l,a);});let s=new Set;for(let a of n){s.add(a.id);let l=i.get(a.id);l||(l=e.createElement("div"),l.dataset.guideId=a.id,r&&hM(l,r),t.appendChild(l)),l.className=`pptxv-alignment-guide is-${a.axis}${r?" is-interactive":""}`,l.style[a.axis==="h"?"top":"left"]=`${a.position*o}px`,ri.set(l,{id:a.id,axis:a.axis,scale:o});}for(let[a,l]of i)s.has(a)||(ri.delete(l),l.remove());}function yM(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="chart"?t:null}function TP(e){let{doc:t,t:n,store:o,ops:r}=e,i=t.createElement("div");i.className="pptxv-chart-quick-actions",i.setAttribute("data-pptx-chart-quick-actions","");let s=null;function a(b,v){let f=o.get();!f.editable||!U(f).some(S=>S.id===b)||(r.pushHistory(),o.set(Z(f,U(f).map(S=>S.id===b?{...S,chartData:v}:S))),r.commitChange());}function l(b){b.preventDefault(),b.stopPropagation();}function p(b){s=s===b?null:b,x();}function d(b,v){let f=t.createElement("button");return f.type="button",f.className="pptxv-chart-quick-btn",f.disabled=!v,f.dataset.testid=`chart-quick-action-${b.id}`,f.setAttribute("aria-label",n(b.labelKey)),f.title=n(b.labelKey),f.style.left=`${b.x}px`,f.style.top=`${b.y}px`,f.style.width=`${b.size}px`,f.style.height=`${b.size}px`,f.appendChild(chunkQPYQDJ2Q_cjs.K(t,b.id==="elements"?"plus":b.id==="styles"?"paintbrush":"filter")),f.addEventListener("pointerdown",l),f.addEventListener("click",()=>p(b.id)),f}function u(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-elements-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickElements"),h.appendChild(C);for(let w of b.elements){let A=t.createElement("label");A.className="row";let P=t.createElement("input");P.type="checkbox",P.disabled=!f,P.checked=w.checked,P.dataset.testid=`chart-quick-element-${w.key}`,P.addEventListener("pointerdown",l),P.addEventListener("change",()=>{let T=v.chartData;T&&(a(v.id,chunkYOEVEUFZ_cjs.mc(T,w.key,P.checked)),x());});let k=t.createElement("span");k.textContent=n(w.labelKey),A.append(P,k),h.appendChild(A);}return h}function m(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card pptxv-chart-quick-styles",h.dataset.testid="chart-quick-styles-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;for(let C of b.styles.presets){let w=t.createElement("button");w.type="button",w.className="pptxv-chart-quick-swatch",w.classList.toggle("is-applied",C.applied),w.disabled=!f,w.dataset.testid=`chart-quick-style-${C.id}`,w.setAttribute("aria-label",n(C.labelKey)),w.setAttribute("aria-pressed",String(C.applied)),w.title=n(C.labelKey);let A=t.createElement("span");A.className="swatch-row";for(let P of C.colors.slice(0,5)){let k=t.createElement("span");k.style.backgroundColor=P,A.appendChild(k);}w.appendChild(A),w.addEventListener("pointerdown",l),w.addEventListener("click",()=>{let P=v.chartData;if(!P)return;let k=chunkYOEVEUFZ_cjs.kc(P,C.id);k&&a(v.id,k),x();}),h.appendChild(w);}return h}function g(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-filters-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickFilters"),h.appendChild(C);for(let w of b.filters.series){let A=t.createElement("label");A.className="row";let P=t.createElement("input");P.type="checkbox",P.disabled=!f,P.checked=w.visible,P.dataset.testid=`chart-quick-filter-${w.key}`,P.addEventListener("pointerdown",l),P.addEventListener("change",()=>{let T=v.chartData;if(!T)return;let E=w.seriesIndex!==void 0?chunkYOEVEUFZ_cjs.hc(T,w.seriesIndex):chunkYOEVEUFZ_cjs.ic(T,w.filteredIndex);E&&a(v.id,E),x();});let k=t.createElement("span");k.className="name",k.textContent=w.name,A.append(P,k),h.appendChild(A);}return h}function x(){let b=o.get(),v=yM(b);if(i.replaceChildren(),!v||!v.chartData)return;let f=e.getScale()||1,S=chunkYOEVEUFZ_cjs.oc({isChartSelected:true,chartData:v.chartData,selectionBox:{x:v.x*f,y:v.y*f,width:v.width*f,height:v.height*f}});if(S){s&&!S.buttons.some(y=>y.id===s)&&(s=null);for(let y of S.buttons){if(i.appendChild(d(y,b.editable)),s!==y.id)continue;let h=y.x+chunkYOEVEUFZ_cjs.nc+4,C=y.y;y.id==="elements"?i.appendChild(u(S,v,b.editable,h,C)):y.id==="styles"?i.appendChild(m(S,v,b.editable,h,C)):i.appendChild(g(S,v,b.editable,h,C));}}}return {root:i,mount(b){b.appendChild(i),x();},sync:x,dispose(){s=null,i.remove();}}}function PP(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function AP(e){let{doc:t,store:n,ops:o}=e,r=t.createElement("div");r.className="pptxv-connector-endpoints",r.setAttribute("data-pptx-connector-endpoints","");let i=null,s=m=>{let g=r.getBoundingClientRect(),x=e.getScale()||1;return {x:(m.clientX-g.left)/x,y:(m.clientY-g.top)/x}},a=m=>{i&&(i={kind:i.kind,...s(m)},u());},l=m=>{let g=i;i=null,p();let x=n.get(),b=PP(x);if(!g||!b){u();return}let v=U(x),f=s(m),S=chunkYOEVEUFZ_cjs.Yg(chunkYOEVEUFZ_cjs.Xg(v.filter(C=>C.id!==b.id)),f.x,f.y),y=chunkYOEVEUFZ_cjs.Zg(b,v,g.kind,f,S),h=chunkYOEVEUFZ_cjs._g(b,y);o.pushHistory(),n.set(Z(x,v.map(C=>C.id===b.id?h:C))),o.commitChange();},p=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l);};function d(m,g){let x=t.createElement("button");x.type="button",x.className="pptxv-connector-endpoint",m.attached&&x.classList.add("is-attached"),x.dataset.pptxConnectorEndpoint=m.kind,x.dataset.pptxConnectorAttached=String(m.attached),x.setAttribute("aria-label",e.label(m.kind));let b=i?.kind===m.kind?i:m;return x.style.left=`${b.x*g}px`,x.style.top=`${b.y*g}px`,x.addEventListener("pointerdown",v=>{v.preventDefault(),v.stopPropagation(),i={kind:m.kind,...s(v)},window.addEventListener("pointermove",a),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),u();}),x}function u(){let m=n.get(),g=PP(m);if(r.replaceChildren(),!g)return;let x=e.getScale()||1,b=U(m);if(i){let v=chunkYOEVEUFZ_cjs.Xg(b.filter(S=>S.id!==g.id)),f=chunkYOEVEUFZ_cjs.Yg(v,i.x,i.y);for(let S of v){let y=t.createElement("div");y.className="pptxv-connection-site",y.setAttribute("data-pptx-connection-site",""),f?.elementId===S.elementId&&f.siteIndex===S.siteIndex&&y.classList.add("is-snapped"),y.style.left=`${S.x*x}px`,y.style.top=`${S.y*x}px`,r.appendChild(y);}}for(let v of chunkYOEVEUFZ_cjs.Wg(g))r.appendChild(d(v,x));}return {root:r,isActive:()=>i!==null,mount(m){m.appendChild(r),u();},sync:u,dispose(){p(),i=null,r.remove();}}}var kP="http://www.w3.org/2000/svg";function _l(e,t){e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`;}function IP(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-crop-overlay",{position:"absolute",overflow:"visible",zIndex:"50",pointerEvents:"none"});o.dataset.pptxCropOverlay="true";let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-crop-ghost",{position:"absolute",pointerEvents:"auto",cursor:"move"}),i=e.createElement("img");i.alt="",i.draggable=false,Object.assign(i.style,{display:"block",width:"100%",height:"100%",pointerEvents:"none",userSelect:"none"}),r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-crop-frame",{position:"absolute",boxSizing:"border-box",pointerEvents:"auto",cursor:"move"});s.dataset.pptxCropFrame="true";let a=d=>{d.button===0&&n.onPanPointerDown(d);};r.addEventListener("pointerdown",a),s.addEventListener("pointerdown",a),o.append(r,s);let l=new Map,p=d=>{let u=l.get(d);if(u)return u;let m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-crop-handle",{position:"absolute",pointerEvents:"auto",touchAction:"none"});m.dataset.pptxCropHandle=d,m.setAttribute("role","button"),m.setAttribute("aria-label",t);let g=e.createElementNS(kP,"svg");g.setAttribute("aria-hidden","true"),Object.assign(g.style,{position:"absolute",inset:"0",overflow:"visible"});let x=e.createElementNS(kP,"path");x.setAttribute("fill","#000000"),x.setAttribute("stroke","#ffffff"),g.appendChild(x),m.appendChild(g),m.addEventListener("pointerdown",v=>{v.button===0&&n.onHandlePointerDown(d,v);}),o.appendChild(m);let b={node:m,path:x,svg:g};return l.set(d,b),b};return {root:o,update(d,u,m){let g=chunkYOEVEUFZ_cjs.Xs(d,u);o.style.left=`${d.x}px`,o.style.top=`${d.y}px`,o.style.width=`${d.width}px`,o.style.height=`${d.height}px`,o.style.transform=d.rotation?`rotate(${d.rotation}deg)`:"",_l(r,g.ghost),r.style.clipPath=g.ghost.clipPath,r.style.opacity=String(g.ghost.opacity),i.style.transform=g.ghost.transform,m&&i.getAttribute("src")!==m&&(i.src=m),_l(s,g.frame);let x=u>0?1/u:1;s.style.outline=`${x}px solid rgba(0, 0, 0, 0.6)`;for(let b of g.handles){let v=p(b.id);_l(v.node,b),v.node.style.cursor=b.cursor,v.svg.setAttribute("width",String(b.width)),v.svg.setAttribute("height",String(b.height)),v.path.setAttribute("d",b.path),v.path.setAttribute("stroke-width",String(x));}},mount(d){if(!d){o.remove();return}(o.parentElement!==d||d.lastElementChild!==o)&&d.appendChild(o);},unmount(){o.remove();}}}var SM="[data-pptx-crop-controls]";function CM(e){return e instanceof HTMLElement&&(e.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(e.tagName))}function LP(e){let{doc:t,store:n,actions:o}=e,r=null,i=null,s=null,a=x=>x.cropSession?J(x,x.cropSession.elementId):void 0,l=(x,b)=>{let v=a(n.get());if(!v)return;x.preventDefault(),x.stopPropagation(),s?.stop();let f=chunkYOEVEUFZ_cjs.Os(v),S=e.getScale()>0?e.getScale():1,y=x.clientX,h=x.clientY;n.set({interactionActive:true});let C=A=>{let P=chunkYOEVEUFZ_cjs.Rs((A.clientX-y)/S,(A.clientY-h)/S,f.rotation);o.previewCrop(b(f,P.dx,P.dy));},w=()=>{t.removeEventListener("pointermove",C),t.removeEventListener("pointerup",w),t.removeEventListener("pointercancel",w),s=null,n.set({interactionActive:false});};t.addEventListener("pointermove",C),t.addEventListener("pointerup",w),t.addEventListener("pointercancel",w),s={stop:w};},p=()=>(r??=IP(t,e.getTranslator()(chunkYOEVEUFZ_cjs.ft),{onHandlePointerDown:(x,b)=>l(b,(v,f,S)=>chunkYOEVEUFZ_cjs.Ps(v,x,f,S)),onPanPointerDown:x=>l(x,chunkYOEVEUFZ_cjs.Qs)}),r),d=x=>{if(!n.get().cropSession||CM(x.target)||i&&x.target instanceof Node&&x.target!==t.body&&!i.contains(x.target))return;let b=chunkYOEVEUFZ_cjs.at(x.key);b&&(x.preventDefault(),x.stopImmediatePropagation(),b==="commit"?o.commitCropMode():o.cancelCropMode());},u=x=>{if(!n.get().cropSession||s)return;let b=x.target instanceof Element?x.target:null;b&&(r?.root.contains(b)||b.closest(SM))||o.commitCropMode();},m=n.subscribe((x,b)=>{let v=x.cropSession;if(!v)return;let f=x.selectedElementIds.length===1&&x.selectedElementIds[0]===v.elementId;(x.currentSlide!==b.currentSlide||!f||!x.editable||x.presenting)&&o.commitCropMode();}),g=()=>{s?.stop(),r?.unmount(),t.removeEventListener("keydown",d,true),t.removeEventListener("pointerdown",u),i=null;};return {attach(x){g(),i=x,t.addEventListener("keydown",d,true),t.addEventListener("pointerdown",u);},sync(){let x=n.get(),b=x.editable&&!x.presenting?a(x):void 0;if(!b){r?.unmount();return}let v=p();v.update(b,e.getScale(),chunkYOEVEUFZ_cjs.nf(b,new Map(x.mediaDataUrls))),v.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},isDragging:()=>s!==null,detach:g,destroy(){g(),m(),r=null;}}}function MP(e){if(e.length===0)return null;if(e.length>1){let n=chunkYOEVEUFZ_cjs.gf(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 DP(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Gl(e){let t=null,n=a=>{let{x:l,y:p}=DP(a.clientX,a.clientY,e.getStageOrigin(),e.getScale());return chunkYOEVEUFZ_cjs.Km(l,p,a)};function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",s);}function r(a){!t||a.pointerId!==t.pointerId||(t.points.push(n(a)),e.onStrokePreview?.(t.points));}function i(a){if(!t||a.pointerId!==t.pointerId)return;t.points.push(n(a));let l=t;o(),t=null,e.onStrokePreview?.(null),e.onCommitStroke({points:l.points,color:e.getColor(),width:e.getWidth(),tool:l.tool});}function s(a){!t||a.pointerId!==t.pointerId||(o(),t=null,e.onStrokePreview?.(null));}return {onStagePointerDown(a){if(a.button!==0)return;let l=e.getTool();if(l!=="select"){if(l==="eraser"){let p=chunkYOEVEUFZ_cjs.Fm(a.target,e.getStageRoot());p&&(a.preventDefault(),a.stopPropagation(),e.onEraseAt(p));return}a.preventDefault(),a.stopPropagation(),t={tool:l,pointerId:a.pointerId,points:[n(a)]},e.onStrokePreview?.(t.points),window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",s);}},isActive:()=>t!==null,dispose(){let a=t!==null;o(),t=null,a&&e.onStrokePreview?.(null);}}}function Ul(e){let t=chunkQPYQDJ2Q_cjs.x(e,"svg",{"aria-hidden":"true","data-pptx-ink-live-preview":"true"});return t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.pointerEvents="none",t.style.zIndex="46",{root:t,mount(n){if(!n){t.remove();return}t.parentElement!==n&&n.appendChild(t);},update(n,o){if(!n){t.replaceChildren();return}let r=Math.max(o.width,1),i=Math.max(o.height,1);t.setAttribute("width",String(r)),t.setAttribute("height",String(i)),t.setAttribute("viewBox",`0 0 ${r} ${i}`),t.replaceChildren(chunkQPYQDJ2Q_cjs.G(e,n,void 0));},destroy(){t.remove();}}}function Kl(e){let{store:t,editActions:n,interactions:o}=e,r=Ul(e.doc),i=l=>l==="highlighter"?"highlighter":l==="freeform"?"freeform":"pen",s=Gl({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:l=>n.commitStroke(l),onEraseAt:l=>n.eraseInkElement(l),onStrokePreview:l=>{if(!l){r.update(null,t.get().canvasSize);return}r.mount(e.getStageRoot());let p=chunkYOEVEUFZ_cjs.Mm({points:[...l],color:t.get().drawColor,width:t.get().drawWidth,tool:i(t.get().drawTool)});r.update(p,t.get().canvasSize);}}),a=l=>l.editable&&!l.presenting&&l.drawTool!=="select";return {isActive:()=>s.isActive(),onStagePointerDown(l){if(a(t.get())){s.onStagePointerDown(l);return}o.onStagePointerDown(l);},onStageDblClick(l){a(t.get())||o.onStageDblClick(l);},syncCursor(l){if(!l)return;let p=t.get();l.dataset.drawTool=a(p)?p.drawTool:"select";},setTool(l){let p=t.get();p.drawTool!==l&&(l!=="select"&&o.closeInline(true),t.set({drawTool:l,selectedElementId:l==="select"?p.selectedElementId:null}));},setColor:l=>t.set({drawColor:l}),setWidth:l=>t.set({drawWidth:Math.max(1,Math.round(l))}),dispose:()=>{s.dispose(),r.destroy();}}}function wM(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function EM(e,t){let n=e.at(-1);return n?e.map(o=>o.id===n.id?{...o,mentions:t}:o):e}function TM(e,t,n){return e.map(o=>{if(o.id!==t)return o;let r=o.replies?.at(-1);return r?{...o,replies:o.replies?.map(i=>i.id===r.id?{...i,mentions:n}:i)}:o})}function RP(e){let t=()=>e.getUserName?.()||"You",n=o=>{let r=e.store.get();if(!r.editable||!r.slides[r.currentSlide])return null;let i=o(r.slides[r.currentSlide].comments??[]);return i?(e.ops.pushHistory(),e.store.set({slides:wM(r.slides,r.currentSlide,()=>i)}),e.ops.commitChange(),i):null};return {addComment(o,r,i){let s=n(a=>{let l=chunkYOEVEUFZ_cjs.dn(a,o,t(),void 0,void 0,r);return l&&i?.length?EM(l,i):l});return s?s[s.length-1]?.id??null:null},addCommentReply(o,r,i){let s=n(l=>{let p=chunkYOEVEUFZ_cjs.gn(l,o,r,t());return p&&i?.length?TM(p,o,i):p});return s?s.find(l=>l.id===o)?.replies?.at(-1)?.id??null:null},editComment(o,r){n(i=>chunkYOEVEUFZ_cjs.fn(i,o,r));},deleteComment(o){n(r=>chunkYOEVEUFZ_cjs.en(r,o));},toggleCommentResolved(o){n(r=>chunkYOEVEUFZ_cjs.hn(r,o));}}}function OP(e,t){let n=U(e).find(o=>o.id===t);if(n)return n;for(let o of e.slides){let r=o.elements.find(i=>i.id===t);if(r)return r}}var HP=(e,t)=>({...e,...t});function po(e,t,n){let o=U(e);return o.some(r=>r.id===t)?Z(e,o.map(r=>r.id===t?HP(r,n):r)):{slides:e.slides.map(r=>r.elements.some(i=>i.id===t)?{...r,elements:r.elements.map(i=>i.id===t?HP(i,n):i)}:r)}}var PM=e=>({...chunkYOEVEUFZ_cjs.Ns(e),...chunkYOEVEUFZ_cjs.Ms(e)});function FP(e,t){let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,o=e.querySelector(`[data-element-id="${n}"] img`);return o&&o.naturalWidth>0&&o.naturalHeight>0?{width:o.naturalWidth,height:o.naturalHeight}:void 0}function VP(e){let{doc:t,store:n,ops:o}=e,r=p=>{if(!p.editable||p.selectedElementIds.length!==1)return;let d=o.selectedElement(p);return chunkYOEVEUFZ_cjs.Ys(d)?d:void 0},i=p=>{let d=n.get(),u=d.cropSession,m=u?OP(d,u.elementId):r(d);if(!m)return;let g=p(m);if(u){n.set(po(d,m.id,g));return}o.pushHistory(),n.set(po(d,m.id,g)),o.commitChange();},s=()=>{let p=n.get();if(p.cropSession)return;let d=chunkYOEVEUFZ_cjs.Zs(r(p));d&&n.set({cropSession:d});},a=()=>{let p=n.get(),d=p.cropSession;if(!d)return;let u=OP(p,d.elementId);if(!u||!chunkYOEVEUFZ_cjs.$s(d,u)){n.set({cropSession:null});return}let m=PM(u);n.set({...po(p,d.elementId,chunkYOEVEUFZ_cjs._s(d)),cropSession:null}),o.pushHistory(),n.set(po(n.get(),d.elementId,m)),o.commitChange();};return {toggleCropMode(){n.get().cropSession?a():s();},enterCropMode:s,commitCropMode:a,cancelCropMode:()=>{let p=n.get(),d=p.cropSession;d&&n.set({...po(p,d.elementId,chunkYOEVEUFZ_cjs._s(d)),cropSession:null,interactionActive:false});},previewCrop(p){let d=n.get();d.cropSession&&n.set(po(d,d.cropSession.elementId,p));},cropToAspect:(p,d)=>i(u=>chunkYOEVEUFZ_cjs.Us(u,p,d)),cropFill:()=>i(p=>chunkYOEVEUFZ_cjs.Vs(p,FP(t,p.id))),cropFit:()=>i(p=>chunkYOEVEUFZ_cjs.Ws(p,FP(t,p.id)))}}function BP(e){let{store:t,ops:n,deck:o}=e;return {applyRibbonGalleryResult(r){let i=t.get();if(i.editable){if(r.kind==="element"){let s=U(i);if(!s.some(a=>a.id===r.elementId))return;n.pushHistory(),t.set(Z(i,s.map(a=>a.id===r.elementId?{...a,...r.patch}:a))),n.commitChange();return}if(r.kind==="themeColorScheme"){o.applyThemeEdit({colorScheme:r.colorScheme,fontScheme:i.fontScheme??{},name:r.name});return}i.colorScheme&&o.applyThemeEdit({colorScheme:i.colorScheme,fontScheme:r.fontScheme,name:r.name});}}}}function Wl(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkYOEVEUFZ_cjs.Lm(o);i&&(n.pushHistory(),t.set({slides:chunkYOEVEUFZ_cjs.Lr(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=chunkYOEVEUFZ_cjs.Ir(r.slides,r.currentSlide,o);if(!i||i.type!=="ink"&&i.type!=="contentPart")return false;n.pushHistory();let s=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:chunkYOEVEUFZ_cjs.Jr(r.slides,r.currentSlide,o),selectedElementId:s}),n.commitChange(),true}}}var AM={width:320,height:80},kM={width:600,height:250},IM={width:200,height:150},zP={width:240,height:0};function Ne(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 $l(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkYOEVEUFZ_cjs.h("Text",{fontSize:18,color:"#000000"}),r=AM;break;case "table":o={...chunkYOEVEUFZ_cjs.sf(3,3),id:chunkYOEVEUFZ_cjs.n("table")},r=kM;break;case "shape":n==="connector"?(o=chunkYOEVEUFZ_cjs.j({type:"straight",stroke:{color:"#000000",width:2}}),r=zP):(o=chunkYOEVEUFZ_cjs.i(n),r=n==="line"?zP:IM);break}return o.width=r.width,o.height=r.height,Ne(o,t),o}function LM(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),s=Math.max(1,Math.round(i/(r||1)));n({width:i,height:s});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function ii(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 s=new FileReader;s.onload=async()=>{let a=typeof s.result=="string"?s.result:"";if(!a){n(null);return}let l=Math.round(t.width*.6),{width:p,height:d}=await LM(a,l),u={id:chunkYOEVEUFZ_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:p,height:d,imageData:a};Ne(u,t),n(u);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var MM={width:420,height:64},Ft={width:640,height:360};function DM(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||Ft.width,i=o.videoHeight||Ft.height;if(r>Ft.width||i>Ft.height){let s=Math.min(Ft.width/r,Ft.height/i);n({width:Math.round(r*s),height:Math.round(i*s)});return}n({width:r,height:i});},o.onerror=()=>n(Ft),o.src=t;})}function ql(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 s=chunkYOEVEUFZ_cjs.ho(i.type);if(!s){n(null);return}let a=new FileReader;a.onload=async()=>{let l=typeof a.result=="string"?a.result:"";if(!l){n(null);return}let p=s==="audio"?MM:await DM(e,l),d={id:chunkYOEVEUFZ_cjs.n("media"),type:"media",mediaType:s,mediaMimeType:i.type||void 0,mediaData:l,x:0,y:0,width:p.width,height:p.height};Ne(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var NP={width:400,height:80},_P={width:600,height:340},GP={width:200,height:40};function jl(e,t){let n=chunkYOEVEUFZ_cjs.vn(e);return Ne(n,t),n}function Yl(e,t,n){let o={id:chunkYOEVEUFZ_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:_P.width,height:_P.height,smartArtData:chunkYOEVEUFZ_cjs.bm(e,t,r=>chunkYOEVEUFZ_cjs.n(`smartart-node-${r}`))};return Ne(o,n),o}function Xl(e,t){let n="[Equation]",o={id:chunkYOEVEUFZ_cjs.n("equation"),type:"shape",x:0,y:0,width:NP.width,height:NP.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Ne(o,t),o}function Ql(e,t){let n=chunkYOEVEUFZ_cjs.Zl(e,chunkYOEVEUFZ_cjs.n("actionbutton"));return n?(Ne(n,t),n):null}function Zl(e,t){return chunkYOEVEUFZ_cjs.rf(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Jl(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkYOEVEUFZ_cjs.n("field"),type:"shape",x:0,y:0,width:GP.width,height:GP.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Ne(r,n),r}function UP(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((s,a)=>o.has(`${i}:${a}`)?{...s,style:{...s.style,...n}}:s)}))}}function KP(e,t,n){switch(n){case "insertRowAbove":return chunkYOEVEUFZ_cjs.ve(e,t.row,"above");case "insertRowBelow":return chunkYOEVEUFZ_cjs.ve(e,t.row,"below");case "deleteRow":return chunkYOEVEUFZ_cjs.we(e,t.row);case "insertColumnLeft":return chunkYOEVEUFZ_cjs.xe(e,t.column,"left");case "insertColumnRight":return chunkYOEVEUFZ_cjs.xe(e,t.column,"right");case "deleteColumn":return chunkYOEVEUFZ_cjs.ye(e,t.column)}}function WP(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100));return {...e,columnWidths:chunkYOEVEUFZ_cjs.Ke(e.columnWidths,t,o)}}function $P(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function qP(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunkYOEVEUFZ_cjs.pe(n,e)?chunkYOEVEUFZ_cjs.qe(n,e):e}function jP(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=chunkYOEVEUFZ_cjs.De(e,t.row,t.column);return i?{...e,rows:i.map((s,a)=>({...s,cells:s.cells.map((l,p)=>a>=t.row&&a<t.row+o&&p>=t.column&&p<t.column+r?{...l,hMerge:void 0,vMerge:void 0}:l)}))}:e}var RM={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function ep(e){return {toggleElementLock:()=>e(t=>({locks:chunkYOEVEUFZ_cjs.bf(!chunkYOEVEUFZ_cjs.af(t))})),setTextVerticalAlign:t=>e(n=>chunkYOEVEUFZ_cjs.Ng(n,t)),setTextWrap:t=>e(n=>chunkYOEVEUFZ_cjs.Qg(n,t)),setAutoFitMode:t=>e(n=>chunkYOEVEUFZ_cjs.Rg(n,t)),setTextAdvanced:t=>e(n=>chunkYOEVEUFZ_cjs.Mg(n,t)),setTextStyle:(t,n)=>e(o=>{if(!("textStyle"in o))return {};if(n&&o.textSegments?.length){let r=io(),i=r!==void 0?chunkYOEVEUFZ_cjs.oh(r,o.textSegments,o.textStyle):o.textSegments;return {textSegments:chunkYOEVEUFZ_cjs.mg(i,n,t).newSegments,...r!==void 0?{text:r}:{}}}return {textStyle:{...o.textStyle,...t}}}),setFillOpacity:t=>e(n=>pt(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>pt(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkYOEVEUFZ_cjs.Tm(n,t)),addGradientStop:(t,n)=>e(o=>chunkYOEVEUFZ_cjs.Um(o,t,n)),removeGradientStop:t=>e(n=>chunkYOEVEUFZ_cjs.Vm(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkYOEVEUFZ_cjs.Wm(o,t,n)),setImageBrightness:t=>e(n=>chunkYOEVEUFZ_cjs.Zm(n,{brightness:t})),setImageContrast:t=>e(n=>chunkYOEVEUFZ_cjs.Zm(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkYOEVEUFZ_cjs.Zm(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkYOEVEUFZ_cjs.$m(o,{[RM[t]]:n})),setImageEffects:t=>e(n=>chunkYOEVEUFZ_cjs.d(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkYOEVEUFZ_cjs.s(n)})),setAltText:t=>e(()=>({altText:t})),setTitle:t=>e(()=>({title:t})),setOleName:t=>e(n=>n.type==="ole"?chunkYOEVEUFZ_cjs.Uf(t):{}),setOleContent:t=>e(n=>n.type==="ole"?t:{}),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkYOEVEUFZ_cjs.bn(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkYOEVEUFZ_cjs.bn(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkYOEVEUFZ_cjs.cn(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}}),setTableData:(t,n)=>e(o=>o.type==="table"?{tableData:t,...n?{rawXml:n}:{}}:{}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,s)=>s===t?{...i,cells:i.cells.map((a,l)=>l===n?{...a,style:{...a.style,...o}}:a)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:UP(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>{if(o.type!=="table"||!o.tableData)return {};let r=KP(o,t,n);return r===o?{}:{tableData:r.tableData,rawXml:r.rawXml}}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:WP(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:$P(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:qP(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:jP(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>co(o,r=>chunkYOEVEUFZ_cjs.E(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>co(o,r=>chunkYOEVEUFZ_cjs.I(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>co(o,r=>n==="add"?chunkYOEVEUFZ_cjs.C(r,"New item"):n==="addChild"?chunkYOEVEUFZ_cjs.H(r,t,"New item"):n==="remove"?chunkYOEVEUFZ_cjs.D(r,t):n==="promote"?chunkYOEVEUFZ_cjs.F(r,t):chunkYOEVEUFZ_cjs.G(r,t))),replaceSmartArtData:t=>e(n=>co(n,()=>t)),setSmartArtLayout:t=>e(n=>co(n,o=>chunkYOEVEUFZ_cjs.M(o,t))),setSmartArtColorScheme:t=>e(n=>co(n,o=>({...o,colorScheme:t})))}}function co(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunkYOEVEUFZ_cjs.wn(n,e.id,o)}}function tp(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,widthEmu:e.slideSize?.widthEmu,heightEmu:e.slideSize?.heightEmu,slideSizeType:e.slideSize?.type,slideMasters:e.slideMasters,presentationProperties:e.presentationProperties,customShows:e.customShows,sections:e.sections}}function op(e){return e.masterViewTarget?{tab:e.masterViewTab,...e.masterViewTarget}:null}function OM(e,t){let n=e[t.masterIndex];return t.layoutIndex===null?n?.name??"":n?.layouts?.[t.layoutIndex]?.name??""}async function HM(e,t){let n=[];for(let s of t){n.push({id:s.path,rId:"",slideNumber:0,elements:s.elements??[]});for(let a of s.layouts??[])n.push({id:a.path,rId:"",slideNumber:0,elements:a.elements??[]});}let{paths:o,refs:r}=chunkYOEVEUFZ_cjs.Oa(n);if(o.size===0)return [...t];let i=new Map;return await Promise.all(Array.from(o).map(async s=>{try{let a=await e.getImageData(s);a&&i.set(s,a);}catch{}})),t.map(s=>({...s,elements:chunkYOEVEUFZ_cjs.La(s.elements??[],i,r),layouts:s.layouts?.map(a=>({...a,elements:chunkYOEVEUFZ_cjs.La(a.elements??[],i,r)}))}))}function YP(e){let{doc:t,store:n,ops:o}=e;return {async runMasterViewCrudAction(r){let i=e.getTranslator(),s=n.get(),a=op(s),l=e.getHandler();if(!a||!l||!s.editable)return;let p=tp(s);if(!chunkYOEVEUFZ_cjs.kp(p,a).find(x=>x.id===r)?.enabled)return;let u;if(r==="renameLayout"||r==="renameMaster"){let x=t.defaultView?.prompt(i("pptx.masterView.renamePrompt"),OM(s.slideMasters,a));if(!x)return;u=x;}let m=await chunkYOEVEUFZ_cjs.lp(l,p,r,a,{name:u});if(!m.ok){t.defaultView?.alert(i(chunkYOEVEUFZ_cjs.jp(r,m.reason)));return}o.pushHistory(),e.setHandler(m.handler);let g=await HM(m.handler,m.data.slideMasters??[]);n.set({slideMasters:g,masterViewTarget:{masterIndex:m.target.masterIndex,layoutIndex:m.target.layoutIndex},selectedElementId:null,selectedElementIds:[]}),o.commitChange();}}}function FM(e){let t=new Map(U(e).map(n=>[n.id,n]));return e.selectedElementIds.map(n=>t.get(n)).filter(n=>n!==void 0)}function XP(e){let{store:t,ops:n}=e;return {mergeShapes(o){let r=t.get();if(!r.editable)return;let i=chunkYOEVEUFZ_cjs.Ll(o,FM(r));if(!i)return;let s=i.created.map(a=>a.id);n.pushHistory(),t.set({...Z(r,chunkYOEVEUFZ_cjs.Ml(U(r),i)),selectedElementId:s.at(-1)??null,selectedElementIds:s}),n.commitChange();}}}function np(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(),s=o.trim();if(!i.editable||!s||!i.slides[r])return null;let a=chunkYOEVEUFZ_cjs.zf(i.sections,i.slides,s,r),l=a.sections.find(p=>!i.sections.some(d=>d.id===p.id));return n(a.sections,a.slides),l?.id??null},renameSection(o,r){let i=e.get(),s=r.trim(),a=i.sections.find(p=>p.id===o);if(!i.editable||!a||!s||a.name===s)return;let l=chunkYOEVEUFZ_cjs.Af(i.sections,i.slides,o,s);n(l.sections,l.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(s=>s.id===o))return;let i=chunkYOEVEUFZ_cjs.Bf(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),s=r==="up"?chunkYOEVEUFZ_cjs.Cf(i.sections,o):chunkYOEVEUFZ_cjs.Df(i.sections,o);!i.editable||s===i.sections||n(s,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let s=chunkYOEVEUFZ_cjs.Ef(i.sections,i.slides,o,r);s.sections!==i.sections&&n(s.sections,s.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 $o(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function rp(e){let{store:t,ops:n}=e;function o(r,i,s){let a=e.getHandler();a&&a.applyLayoutToSlide(r,i,[...t.get().slides]).then(async l=>{let p=await a.getTemplateElementsForSlide(l.id),d=t.get();if(d.slides[r]?.id===s){n.pushHistory();let u=[...d.slides];u[r]=l,t.set({slides:u,templateElementsBySlideId:{...d.templateElementsBySlideId,[l.id]:p}}),n.commitChange();}},()=>{}).catch(()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,s=chunkYOEVEUFZ_cjs.Gf(i+1),a=$o([...r.slides.slice(0,i),s,...r.slides.slice(i)]);t.set({slides:a,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=r.currentSlide+1,a={...chunkYOEVEUFZ_cjs.l(i),id:chunkYOEVEUFZ_cjs.Ff()},l=r.templateElementsBySlideId[i.id]??[],p=$o([...r.slides.slice(0,s),a,...r.slides.slice(s)]);t.set({slides:p,templateElementsBySlideId:{...r.templateElementsBySlideId,[a.id]:l.map(chunkYOEVEUFZ_cjs.k)},currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=$o(r.slides.filter((l,p)=>p!==r.currentSlide)),s=Math.min(r.currentSlide,i.length-1),a={...r.templateElementsBySlideId};delete a[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:a,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let s=t.get();if(!s.editable||!r)return;n.pushHistory();let a=s.currentSlide+1,l={...chunkYOEVEUFZ_cjs.Gf(a+1),layoutPath:r,...i?{layoutName:i}:{}},p=$o([...s.slides.slice(0,a),l,...s.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(a,r,l.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let s=i.currentSlide+1,a=chunkYOEVEUFZ_cjs.Kf(r,chunkYOEVEUFZ_cjs.Ff(),s+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunkYOEVEUFZ_cjs.Hf(i.colorScheme)}),l=$o([...i.slides.slice(0,s),a,...i.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunkYOEVEUFZ_cjs.Hf(t.get().colorScheme)},applyLayout(r){let i=t.get(),s=i.slides[i.currentSlide];!i.editable||!s||!r||o(i.currentSlide,r,s.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],s=chunkYOEVEUFZ_cjs.Hi(i);!r.editable||!i||!s||o(r.currentSlide,s,i.id);}}}var VM=24;function qo(e,t){if(!Le(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 ai(e,t,n){if(!Le(e))return {};let o=n?.text??io(),r=o===void 0?e:{...e,text:o,textSegments:n?.textSegments??chunkYOEVEUFZ_cjs.oh(o,e.textSegments,e.textStyle)},i=chunkYOEVEUFZ_cjs.kg(r.textSegments,{preserveCaret:true});return i.kind!=="supported"||i.snapshot&&i.snapshot.elementId!==e.id?{}:{...o===void 0?{}:{text:o},...chunkYOEVEUFZ_cjs.ng(r,t,i.selection,i.snapshot?.textSegments).patch}}function si(e,t){let n=lt(e).paragraphMarginLeft,o=Math.max(0,n+t*VM);return qo(e,{paragraphMarginLeft:o})}function ip(e,t){return qo(e,{align:t})}function ap(e,t){return qo(e,{lineSpacing:t})}function QP(e,t){return qo(e,{textDirection:t})}function ZP(e,t){return qo(e,{columnCount:Math.max(1,Math.round(t))})}function sp(e,t){return {toggleBold:()=>t(n=>ao(n,"bold")),toggleItalic:()=>t(n=>ao(n,"italic")),toggleUnderline:()=>t(n=>ao(n,"underline")),toggleStrikethrough:()=>t(n=>ao(n,"strikethrough")),toggleTextShadow:()=>t(n=>Us(n)),changeFontSize:n=>t(o=>Bs(o,n)),stepFontSize:n=>t(o=>$E(o,n)),setFontSize:n=>t(o=>Vo(o,n)),setFontFamily:n=>t(o=>_s(o,n)),setTextColor:(n,o)=>{ct(e,n),t(r=>zs(r,n,o));},setHighlightColor:n=>{ct(e,n),t(o=>Ns(o,n));},setCharacterSpacing:n=>t(o=>Gs(o,n)),changeCase:n=>t((o,r)=>{if(!r)return Ks(o,n);let{text:i,textSegments:s}=chunkYOEVEUFZ_cjs.As(r,null,n);return {text:i,textSegments:s}}),clearFormatting:()=>t(n=>Ws(n)),toggleBulletList:()=>t((n,o)=>ai(n,"bullet",o)),toggleNumberedList:()=>t((n,o)=>ai(n,"numbered",o)),increaseIndent:()=>t(n=>si(n,1)),decreaseIndent:()=>t(n=>si(n,-1)),setTextAlign:n=>t(o=>ip(o,n)),setLineSpacing:n=>t(o=>ap(o,n)),setTextDirection:n=>t(o=>QP(o,n)),setColumnCount:n=>t(o=>ZP(o,n))}}function lp(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,s){let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l)return;let p=Math.max(0,Math.round(r));n.pushHistory();let d=s?{advanceOnClick:s.onClick,advanceAfterMs:s.afterMs}:{};if(i){let u={type:o,durationMs:p,...d};t.set({slides:chunkYOEVEUFZ_cjs.Or(a.slides,{transition:u})});}else {let u={...l.transition,type:o,durationMs:p,...d};t.set({slides:chunkYOEVEUFZ_cjs.Nr(a.slides,a.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),s=i.slides[i.currentSlide];if(!i.editable||!s)return;let a=chunkYOEVEUFZ_cjs.Ci(s,o),l=new Set(chunkYOEVEUFZ_cjs.Di(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((p,d)=>l.has(d)?{...p,transition:{...a}}:p)}),n.commitChange();},applyTransitionChange(o){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=chunkYOEVEUFZ_cjs.oi(i.transition,o);t.set({slides:chunkYOEVEUFZ_cjs.Nr(r.slides,r.currentSlide,{transition:s})}),n.commitChange();}}}var BM=new Set(["showGuides","snapToGrid","snapToShape"]);function pp(e){return BM.has(e)}function JP(e){return {autoSave:true,spellCheck:false,reducedMotion:false,showGrid:e.showGrid,showRulers:e.showRulers,snapToGrid:e.snapToGrid,snapToObjects:e.snapToShape,showGuides:e.showGuides}}function dp(e,t){let n=chunkYOEVEUFZ_cjs.Ap({viewProperties:t},JP(e));return {snapToGrid:n.snapToGrid,snapToShape:n.snapToObjects??e.snapToShape,showGuides:n.showGuides??e.showGuides}}function cp(e,t,n){let o=JP({...e,[t]:n}),r=chunkYOEVEUFZ_cjs.Bp(o);return {...e.viewProperties,slideViewPr:{...e.viewProperties?.slideViewPr,...r.slideViewPr},...r.gridSpacing?{gridSpacing:r.gridSpacing}:{}}}function mp(e){let{doc:t,store:n,ops:o}=e,r=Ll(n,o),i=Nl({store:n,ops:o,getHandler:e.getHandler}),s=a=>{if(!a)return;let l=n.get();!l.editable||!l.slides[l.currentSlide]||(o.pushHistory(),n.set({slides:chunkYOEVEUFZ_cjs.Lr(l.slides,l.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {insertElement:s,...sp(n,r),...Vl({store:n,ops:o,applyToSelected:r}),...zl({store:n,ops:o}),...rp({store:n,ops:o,getHandler:e.getHandler}),...Bl({store:n,ops:o}),...lp({store:n,ops:o}),...Ml({store:n,ops:o}),...ep(r),...Wl({store:n,ops:o}),...i,...BP({store:n,ops:o,deck:i}),...XP({store:n,ops:o}),...VP({doc:t,store:n,ops:o}),sections:np(n,o),masterView:YP({doc:t,getTranslator:e.getTranslator,store:n,ops:o,getHandler:e.getHandler,setHandler:e.setHandler}),comments:RP({store:n,ops:o,getUserName:e.getUserName}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:(a,l)=>{ct(n,a),r(p=>pt(p,chunkYOEVEUFZ_cjs.Ii(a,l)));},setShapeStroke:(a,l)=>{ct(n,a),r(p=>pt(p,chunkYOEVEUFZ_cjs.Ji(a,l)));},setShapeStrokeWidth:a=>r(l=>pt(l,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(l=>pt(l,a)),setShapeType:a=>r(l=>l.type==="shape"?{shapeType:a}:{}),pushRecentColor:a=>ct(n,a),setGeometry(a){r(()=>{let l={};return a.x!==void 0&&Number.isFinite(a.x)&&(l.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(l.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(l.width=Math.max(chunkYOEVEUFZ_cjs.q,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(l.height=Math.max(chunkYOEVEUFZ_cjs.q,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(l.rotation=a.rotation),l});},insert(a,l){let p=n.get();p.slides[p.currentSlide]&&s($l(a,p.canvasSize,l));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await ii(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await ql(t,a.canvasSize));},insertChart(a=chunkYOEVEUFZ_cjs.un){let l=n.get();l.slides[l.currentSlide]&&s(jl(a,l.canvasSize));},insertSmartArt(a,l){let p=n.get();p.slides[p.currentSlide]&&s(Yl(a,l,p.canvasSize));},insertEquation(a){let l=n.get();l.slides[l.currentSlide]&&s(Xl(a,l.canvasSize));},updateEquation:(a,l)=>o.updateEquation(a,l),insertActionButton(a){let l=n.get();l.slides[l.currentSlide]&&s(Ql(a,l.canvasSize));},insertField(a,l){let p=n.get();if(!p.slides[p.currentSlide])return;let d=l??Zl(a,{slideNumber:p.currentSlide+1});s(Jl(a,d,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),l=U(a).filter(p=>chunkYOEVEUFZ_cjs.jo(p.id,a.editTemplateMode)).map(p=>p.id);l.length>0&&o.select(l.at(-1)??null,l);},toggleViewOption(a){let l=n.get(),p=!l[a];n.set(pp(a)?{[a]:p,viewProperties:cp(l,a,p)}:{[a]:p});for(let d of t.querySelectorAll(".pptxv"))d.classList.toggle(`pptxv-${a}`,p);},addGuide(a,l){let p=n.get(),d=chunkYOEVEUFZ_cjs.cm(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,l===void 0?d:{...d,position:l}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await ii(t,n.get().canvasSize);!a||a.type!=="image"||r(l=>l.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 up(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?chunkYOEVEUFZ_cjs.km(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let l=chunkYOEVEUFZ_cjs.km(a.slides,r,{matchCase:s}),{slides:p,replacements:d}=chunkYOEVEUFZ_cjs.lm(a.slides,l,0,i);return o(p,d),d},replaceAll(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let{slides:l,replacements:p}=chunkYOEVEUFZ_cjs.mm(a.slides,r,i,{matchCase:s});return o(l,p),p}}}function eA(e,t,n){let o=()=>{let l=n.store.get(),p=n.getHandler(),d=l.slides[l.currentSlide];return !l.editable||l.loading||l.error||l.presenting||l.masterViewTarget||l.editTemplateMode||l.drawTool!=="select"||n.isEditing()||!d||!p?null:{documentId:p,slideId:d.id,canvasSize:l.canvasSize}},r=()=>chunkYOEVEUFZ_cjs.fo(e,{getCanvas:()=>t,getTarget:o,insertElement:n.insertElement}),i=o(),s=r(),a=n.store.subscribe(()=>{let l=o();(l?.documentId!==i?.documentId||l?.slideId!==i?.slideId||l?.canvasSize.width!==i?.canvasSize.width||l?.canvasSize.height!==i?.canvasSize.height)&&(s(),s=r()),i=l;});return ()=>{a(),s();}}function xp(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunkYOEVEUFZ_cjs.Uq(t,{canPaste:e.canPaste?.(),hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunkYOEVEUFZ_cjs.zl(t.target),isControlTarget:chunkYOEVEUFZ_cjs.Al(t.target)},e.getKeyboardCustomization?.());if(!(n===null||n==="prevSlide"||n==="nextSlide"))switch(t.preventDefault(),n){case "escape":if(e.cancelFormatPainter()||e.closeShortcuts())return;e.deselect();break;case "toggleShortcuts":e.toggleShortcuts();break;case "find":e.toggleFind?.();break;case "undo":e.undo();break;case "redo":e.redo();break;case "paste":e.paste();break;case "selectAll":e.selectAll();break;case "delete":e.deleteSelected();break;case "duplicate":e.duplicateSelected();break;case "copy":e.copySelected();break;case "cut":e.cutSelected();break;case "group":e.groupSelected();break;case "ungroup":e.ungroupSelected();break;case "nudge":e.nudgeSelected(o??0,r??0);break;case "alignLeft":e.setTextAlign?.("left");break;case "alignCenter":e.setTextAlign?.("center");break;case "alignRight":e.setTextAlign?.("right");break;case "alignJustify":e.setTextAlign?.("justify");break;case "increaseFontSize":e.stepFontSize?.("increase");break;case "decreaseFontSize":e.stepFontSize?.("decrease");break;case "copyFormat":e.copyFormat?.();break;case "pasteFormat":e.pasteFormat?.();break;case "newSlide":e.addSlide?.();break;case "hyperlink":e.openHyperlink?.();break;case "findReplace":e.toggleFindReplace?.();break;case "clearFormatting":e.clearFormatting?.();break;case "cycleSelectionNext":e.cycleSelection?.("next");break;case "cycleSelectionPrev":e.cycleSelection?.("prev");break;case "pasteSpecial":e.onPasteSpecial?.();break;}}}var zM=e=>t=>J(e,t);function li(e,t){return chunkYOEVEUFZ_cjs.jo(t,e.editTemplateMode)&&chunkYOEVEUFZ_cjs._e(J(e,t),"select")}function jo(e,t,n){return chunkYOEVEUFZ_cjs.cf(t,zM(e),n)}function tA(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return jo(e,n,"move").length>0}var NM=chunkYOEVEUFZ_cjs.Ze(void 0);function _M(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function pi(e){return e.selectedElementIds.reduce((t,n)=>_M(t,chunkYOEVEUFZ_cjs.Ze(J(e,n))),NM)}function oA(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 nA(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function rA(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),s=J(i,t);if(s?.type!=="table"||!s.tableData?.rows[n]?.cells[o])return;let a=e.transformCommittedText?e.transformCommittedText(r):r;e.pushHistory();let l=s.tableData.rows.map((p,d)=>({...p,cells:p.cells.map((u,m)=>d===n&&m===o?chunkYOEVEUFZ_cjs.oe(u,a):u)}));e.store.set(Z(i,U(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:l}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=J(o,t);!r||!chunkYOEVEUFZ_cjs.e(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(Z(o,U(o).map(i=>i.id===t&&chunkYOEVEUFZ_cjs.e(i)?{...i,textSegments:i.textSegments?.map(s=>{if(!s.equationXml)return s;let{equationSourceXml:a,...l}=s;return {...l,equationXml:n}})}:i))),e.commitChange());}}}var GM=100,UM=800;function gp(e){let{store:t}=e,n=new chunkYOEVEUFZ_cjs.xf({maxDepth:GM}),o=0,r=(m=t.get())=>m.selectedElementId?J(m,m.selectedElementId):void 0,i=(m,g=m?[m]:[])=>t.set(nA(m,g)),s=()=>({slides:chunkYOEVEUFZ_cjs.Kr(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunkYOEVEUFZ_cjs.m(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)}),a=(m="")=>{n.record(s(),m),o=0,e.onHistoryChange();},l=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},p=(m,g)=>{let x=t.get(),b=U(x).map(v=>v.id===m?{...v,...g}:v);t.set(Z(x,b));},d=m=>{m&&(t.set({slides:chunkYOEVEUFZ_cjs.Kr(m.slides),sections:structuredClone(m.sections),coreProperties:structuredClone(m.coreProperties),appProperties:structuredClone(m.appProperties),customProperties:structuredClone(m.customProperties),templateElementsBySlideId:chunkYOEVEUFZ_cjs.m(m.templateElementsBySlideId),slideMasters:structuredClone(m.slideMasters),notesMaster:structuredClone(m.notesMaster),handoutMaster:structuredClone(m.handoutMaster),handoutSlidesPerPage:m.handoutSlidesPerPage,presentationProperties:structuredClone(m.presentationProperties),headerFooter:structuredClone(m.headerFooter),customShows:structuredClone(m.customShows),interactionActive:false}),l());},u=rA({store:t,pushHistory:a,commitChange:l,transformCommittedText:e.transformCommittedText});return {readInlineList:e.readInlineList,formatInlineList:e.formatInlineList,cancelInlineList:e.cancelInlineList,selectedElement:r,select:i,pushHistory:a,commitChange:l,patchGeometry:p,deleteSelected(){let m=t.get(),g=m.selectedElementId;!m.editable||!g||!r(m)||(a(),t.set({...Z(m,U(m).filter(x=>!m.selectedElementIds.includes(x.id))),selectedElementId:null,selectedElementIds:[]}),l());},duplicateSelected(){let m=t.get(),g=m.selectedElementId;if(!m.editable||!g)return null;let x=r(m);if(!x)return null;let b=chunkYOEVEUFZ_cjs._(x);return b.x+=20,b.y+=20,a(),t.set({...Z(m,[...U(m),b]),selectedElementId:b.id,selectedElementIds:[b.id]}),l(),b.id},nudgeSelected(m,g){let x=t.get(),b=r(x),v=x.selectedElementId;if(!b||!v)return;let f=Date.now();f-o>UM&&a(),o=f,t.set(Z(x,U(x).map(S=>S.id===v?{...S,x:b.x+m,y:b.y+g}:S))),l();},commitInlineText(m,g,x){let b=t.get(),v=J(b,m);if(!v)return;let f=e.transformCommittedText?e.transformCommittedText(g):g;a();let S=typeof document<"u"?document.querySelector("[data-inline-editor]"):null,y=Fs(v,S),h=Vs(v,S);t.set(Z(b,U(b).map(C=>C.id===m?{...C,...Gr(v,f,x),...y!==void 0?{height:y}:{},...h!=="unchanged"?{textStyle:{...v.textStyle,autoFitFontScale:h.fontScale,autoFitLineSpacingReduction:h.lnSpcReduction}}:{}}:C))),l();},commitNotes(m,g){let x=t.get(),b=x.slides[x.currentSlide];!x.editable||!b||b.notes===m&&g===void 0||(a(),t.set({slides:chunkYOEVEUFZ_cjs.Mr(x.slides,x.currentSlide,m,g)}),l());},setHandoutSlidesPerPage(m){oA({store:t,pushHistory:a,commitChange:l},m);},applyFormatPainter(m,g){let x=t.get(),b=J(x,m),v=J(x,g);return !x.editable||!b||!v||m===g?false:(a(),t.set(Z(x,U(x).map(f=>f.id===g?chunkYOEVEUFZ_cjs.nh(f,chunkYOEVEUFZ_cjs.mh(b)):f))),l(),true)},...u,updateDocumentProperties(m,g,x){t.get().editable&&(a(),t.set({coreProperties:structuredClone(m),appProperties:structuredClone(g),customProperties:structuredClone(x)}),l());},updatePresentationProperties(m){t.get().editable&&(a(),t.set({presentationProperties:structuredClone(m)}),l());},updateSections(m){t.get().editable&&(a(),t.set({sections:structuredClone(m)}),l());},updateHeaderFooter(m){t.get().editable&&(a(),t.set({headerFooter:structuredClone(m)}),l());},updateCustomShows(m){t.get().editable&&(a(),t.set({customShows:structuredClone(m)}),l());},undo(){d(n.undo(s())?.snapshot);},redo(){d(n.redo(s())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(m){n.setMaxDepth(m);},async save(m="pptx"){let g=e.getHandler();if(!g)throw new Error("No presentation is loaded.");let x=t.get(),b=e.getPendingInlineTextEdit?.(),v=b?e.transformCommittedText?.(b.snapshot.text)??b.snapshot.text:void 0,f=b&&"masterView"in b.target?chunkYOEVEUFZ_cjs.Tr(x,b.target.masterView,b.snapshot,v):null,S=chunkYOEVEUFZ_cjs.mo(x.slides,x.templateElementsBySlideId).map(h=>b&&"slideId"in b.target&&h.id===b.target.slideId?{...h,elements:[...chunkYOEVEUFZ_cjs.Sr(h.elements,b.snapshot,v)]}:h),y=await chunkYOEVEUFZ_cjs.tp(g,S,chunkYOEVEUFZ_cjs.xp({sections:x.sections,coreProperties:x.coreProperties,appProperties:x.appProperties,customProperties:x.customProperties,headerFooter:x.headerFooter,presentationProperties:x.presentationProperties,viewProperties:x.viewProperties,customShows:x.customShows,tagCollections:x.tagCollections,slideMasters:f?.slideMasters??x.slideMasters,notesMaster:f?.notesMaster??x.notesMaster,handoutMaster:f?.handoutMaster??x.handoutMaster,tableStyleMap:x.tableStyleMap,tableStylesDefaultId:x.tableStylesDefaultId,tableStylesToDelete:x.tableStylesToDelete,outputFormat:m,slideSize:chunkYOEVEUFZ_cjs.lj({current:x.slideSize,canvas:x.canvasSize}).size,embedFonts:x.embedFonts}),{password:x.presentationPassword,passwordProtected:x.presentationPassword!==null});return t.set({dirty:false}),y}}}function iA(e){let{doc:t,store:n,ops:o}=e,r=null,i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l);if(!p)return;let d=e.getScale();r.el.style.left=`${Math.min(r.startX,p.x)*d}px`,r.el.style.top=`${Math.min(r.startY,p.y)*d}px`,r.el.style.width=`${Math.abs(p.x-r.startX)*d}px`,r.el.style.height=`${Math.abs(p.y-r.startY)*d}px`;}function a(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l),d=n.get(),u=p?jo(d,chunkYOEVEUFZ_cjs.Re({startX:r.startX,startY:r.startY,currentX:p.x,currentY:p.y},U(d)),"select"):[],m=r.additive?chunkYOEVEUFZ_cjs.Se(d.selectedElementIds,u):u;r.el.remove(),r=null,i(),o.select(m.at(-1)??null,m);}return {isActive:()=>r!==null,begin(l){let p=e.stagePoint(l),d=e.getOverlayRoot();if(!p||!d)return;let u=t.createElement("div");u.className="pptxv-marquee",d.appendChild(u),r={pointerId:l.pointerId,startX:p.x,startY:p.y,additive:chunkYOEVEUFZ_cjs.Te(l),el:u},window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a);},dispose(){r?.el.remove(),r=null,i();}}}function aA(e){let{event:t,elementId:n,state:o,store:r,ops:i}=e;if(o.eyedropperActive){let d=t.target instanceof Element?t.target:null,u=d?getComputedStyle(d):null,m=u?.backgroundColor||u?.color;return m&&e.onEyedropper?.(m),r.set({eyedropperActive:false}),true}let s=t.target instanceof Element?t.target.closest("td"):null;if(!n||s?.dataset.rowIndex===void 0||s.dataset.cellIndex===void 0)return false;let a={row:Number(s.dataset.rowIndex),column:Number(s.dataset.cellIndex)},l=o.selectedTableCell,p=t.shiftKey&&o.selectedElementId===n&&l?$M(l,a,WM(o,n)):[a];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&l?l:a,selectedTableCells:p}),true}function bp(e,t,n=10){return t?{...e,x:Math.round(e.x/n)*n,y:Math.round(e.y/n)*n}:e}function sA(e){return e.snapToShape?U(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}var KM={rows:[],columnWidths:[]};function WM(e,t){let n=J(e,t);return (n?.type==="table"?n.tableData:void 0)??KM}function $M(e,t,n){let o=chunkYOEVEUFZ_cjs.re(e.row,e.column,t.row,t.column,n);return chunkYOEVEUFZ_cjs.se(o).map(({row:r,col:i})=>({row:r,column:i}))}function lA(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 pA(e,t){if(t.size===0)return;let n=e.get(),o=U(n),r=chunkYOEVEUFZ_cjs.Ug(o,t);r.length!==0&&e.set(Z(n,chunkYOEVEUFZ_cjs.Vg(o,r)));}var qM={move:"move",resize:"resize",rotate:"rotate"};function dA(e){let{store:t,ops:n}=e,o=[],r=null,i="move",s=new Set,a=l=>{let p=t.get(),d=U(p).filter(m=>p.selectedElementIds.includes(m.id));if(d.length>1&&p.selectedElementIds.includes(l))return chunkYOEVEUFZ_cjs.gf(d)??void 0;let u=J(p,l);return u?{x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation??0}:void 0};return chunkYOEVEUFZ_cjs.Pr({getScale:e.getScale,getElementBox:a,getSiblings:()=>sA(t.get()),getStageOrigin(){let l=e.getOverlay()?.root.getBoundingClientRect();return {left:l?.left??0,top:l?.top??0}},onStart(l,p){let d=t.get();i=p,o=U(d).filter(u=>d.selectedElementIds.includes(u.id)).map(({id:u,x:m,y:g,width:x,height:b,rotation:v})=>({id:u,x:m,y:g,width:x,height:b,rotation:v})),r=chunkYOEVEUFZ_cjs.gf(o),s=new Set(jo(d,o.length>0?o.map(u=>u.id):[l],qM[p])),n.pushHistory(),t.set({interactionActive:true});},onPreview(l,p){let d=t.get();if(l=bp(l,d.snapToGrid,chunkYOEVEUFZ_cjs.Ye(d.viewProperties?.gridSpacing,10)),o.length>1&&r&&i!=="rotate"){let u=i==="move"?chunkYOEVEUFZ_cjs.hf(o,l.x-r.x,l.y-r.y):chunkYOEVEUFZ_cjs.if(o,r,l);for(let m of u)s.has(m.id)&&n.patchGeometry(m.id,{...m,rotation:m.rotation??0});}else s.has(l.id)&&n.patchGeometry(l.id,l);e.getOverlay()?.setSnapLines(p,e.getScale());},onEnd(l,p,d){if(e.getOverlay()?.setSnapLines([],1),l&&o.length<=1&&s.has(d)){let u=t.get(),m=bp(l,u.snapToGrid,chunkYOEVEUFZ_cjs.Ye(u.viewProperties?.gridSpacing,10));n.patchGeometry(d,m);}t.set({interactionActive:false}),p&&(pA(t,new Set([...s,d])),n.commitChange());}})}function cA(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 mA(e){return e.masterViewTarget?{masterView:{tab:e.masterViewTab,...e.masterViewTarget}}:e.slides[e.currentSlide]?{slideId:e.slides[e.currentSlide].id}:void 0}function uA(e,t,n){let o=e.slides[e.currentSlide];return n&&!e.masterViewTarget&&o?.elements.some(r=>r.id===t)?{patcher:n,slideId:o.id}:void 0}function xA(e,t,n){let o=e.slides[e.currentSlide];if(!n?.readAccepted||!t||!("slideId"in t)||e.loading||e.masterViewTarget||o?.id!==t.slideId)return;let r=n.readAccepted();if(!r||!n.checkModel?.(o.elements.find(s=>s.id===r.elementId)))return;let i=chunkYOEVEUFZ_cjs.Sr(o.elements,r);return i===o.elements?void 0:e.slides.map(s=>s===o?{...o,elements:[...i]}:s)}function gA(e,t,n){if(!(!t||!fp(e,t))){if(n?.kind==="unsupported"&&(n.reason==="composition-active"||n.reason==="input-active"))throw new Error("Finish the current text input before saving.");if(n?.kind==="supported")return {snapshot:n.snapshot,target:t}}}function fp(e,t){return !(!t||!e.editable||e.presenting||e.loading||e.error||"slideId"in t&&(e.masterViewTarget||e.slides[e.currentSlide]?.id!==t.slideId)||"masterView"in t&&JSON.stringify({tab:e.masterViewTab,...e.masterViewTarget})!==JSON.stringify(t.masterView))}function bA(e,t,n,o,r=()=>true){let i=chunkYOEVEUFZ_cjs.zs(e);return {read(){let s=t();if(s?.checkModel){if(!r()||!s.checkModel(n())){o();return}return s.readList()}if(s?.readList()&&!r()){o();return}let a=n();if(a&&!s?.readList()&&s?.activateList(a)===false){let d=chunkYOEVEUFZ_cjs.hg(s.el);return o(),{kind:"unsupported",reason:"model-replaced",text:d}}let l=s?.readList();if(!l)return l;let p=i.check(a,l);if(p.kind==="retire")return o(),{kind:"unsupported",reason:"model-replaced",text:l.kind==="supported"?l.snapshot.text:l.text};if(p.kind==="format"){if(!s?.formatSnapshot(p.snapshot)){o();return}return s.readList()}return l},format(s){let a=t()?.formatSnapshot(s)??false;return a&&i.expect(s),a}}}var jM=2;function fA(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return [];let t=e.selectedElementId?J(e,e.selectedElementId):void 0;return t?chunkYOEVEUFZ_cjs.ph(t):[]}function vA(e){let{store:t,ops:n}=e,o=null,r=l=>{if(!o)return;let{elementId:p}=o,d=t.get(),u=U(d);t.set(Z(d,u.map(m=>m.id===p&&chunkYOEVEUFZ_cjs.f(m)?{...m,shapeAdjustments:{...m.shapeAdjustments,...l}}:m)));},i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!o)return;let p=e.getScale(),d=p>0?p:1,u=(l.clientX-o.startClientX)/d,m=(l.clientY-o.startClientY)/d;if(!o.moved){if(Math.hypot(l.clientX-o.startClientX,l.clientY-o.startClientY)<=jM)return;o.moved=true,n.pushHistory(),t.set({interactionActive:true});}r(chunkYOEVEUFZ_cjs.qh(o,u,m));}function a(){let l=o?.moved??false;o=null,i(),l&&(t.set({interactionActive:false}),n.commitChange());}return {begin(l,p){let d=t.get(),u=d.selectedElementId,m=u?J(d,u):void 0;!u||!m||!p||!chunkYOEVEUFZ_cjs.f(m)||(l.preventDefault(),l.stopPropagation(),o=chunkYOEVEUFZ_cjs.rh(m,p,l.clientX,l.clientY),window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a));},isActive:()=>o!==null,dispose(){o=null,i();}}}function hA(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:s}=e,a=t.createElement("input");a.type="text",a.className="pptxv-inline-editor pptxv-table-cell-editor",a.dataset.inlineEditor="",a.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(a.style,{boxSizing:"border-box",width:"100%",height:"100%"});let l=t.createDocumentFragment();for(;n.firstChild;)l.appendChild(n.firstChild);n.appendChild(a);let p=false,d=m=>{m.composedPath().includes(a)||u(true);},u=m=>{p||(p=true,t.removeEventListener("pointerdown",d,true),m&&s.commitTableCell(o.id,r,i,a.value),n.isConnected?n.replaceChildren(m?t.createTextNode(a.value):l):a.remove());};return a.addEventListener("blur",()=>u(true)),a.addEventListener("pointerdown",m=>m.stopPropagation()),a.addEventListener("keydown",m=>{m.stopPropagation(),m.key==="Escape"?u(false):m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),u(true));}),t.addEventListener("pointerdown",d,true),a.focus(),a.select(),{close:u}}function di(e){let t=e.elementId??chunkYOEVEUFZ_cjs.Fm(e.event.target,e.stage),n=t?J(e.state,t):void 0,o=n&&chunkYOEVEUFZ_cjs.e(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||!chunkYOEVEUFZ_cjs.$e(n)?{handled:false,tableSession:null}:{handled:true,tableSession:hA({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var YM=500;function XM(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 yA(e,t,n){let o=XM(e,t),r=chunkYOEVEUFZ_cjs.Fm(e.target,n)??chunkYOEVEUFZ_cjs.Fm(o,n);return {cell:o,id:r}}function SA(){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}`,s=e?.key===i&&t.timeStamp-e.time<=YM;return e=s?null:{key:i,time:t.timeStamp},s}}function CA(e){let t=SA(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:s}=yA(o,e.doc,e.getStage());if(!i||!t(o,s,i))return;let a=di({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:s,cell:i,onEditEquation:e.onEditEquation});a.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(a.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function wA(e){let{doc:t,store:n,ops:o}=e,r=null,i,s,a=null,l=CA({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:h=>a=h,onEditEquation:e.onEditEquation}),p=dA({store:n,ops:o,getScale:e.getScale,getOverlay:e.getOverlay}),d=vA({store:n,ops:o,getScale:e.getScale}),u=h=>lA(e.getOverlay()?.root,e.getScale(),h),m=iA({doc:t,store:n,ops:o,getScale:e.getScale,getOverlayRoot:()=>e.getOverlay()?.root??null,stagePoint:u}),g=cA(),x=h=>{a?.close(h),a=null;let C=r;h?C?.commit():C?.cancel();},b=()=>s?.read()??r?.readList(),v=h=>e.getStageRoot()?.querySelector(`[data-element-id="${CSS.escape(h)}"]`)??null,f=(h,C)=>{v(h)?.classList.toggle("pptxv-inline-editing-source",C);},S=h=>{let C=n.get(),w=J(C,h),A=e.getOverlay();!w||!Ur(w)||!A||r||(o.select(h),A.setEditing(true),f(h,true),i=mA(C),r=Kr({doc:t,overlayRoot:A.root,box:{x:w.x,y:w.y,width:w.width,height:w.height,rotation:w.rotation??0},scale:e.getScale(),element:w,spellCheck:C.spellCheckEnabled,collaboration:uA(C,h,e.getLivePatcher?.()),onInput:P=>e.onInlineTextInput?.(h,P),onCommit:(P,k)=>{e.flushInlineTextInput?.(),o.commitInlineText(h,P,k);},onSelectionChange:P=>n.set({selectedTextRange:P}),onLiveFormatKey:e.onInlineLiveFormatKey,onClose(){r=null,i=void 0,s=void 0,e.getOverlay()?.setEditing(false),f(h,false);}}),s=bA(w,()=>r,()=>J(n.get(),h),()=>x(false),()=>fp(n.get(),i)&&C.editTemplateMode===n.get().editTemplateMode));},y=(h,C)=>{let w=n.get(),A=di({event:h,state:w,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(A.handled){a=A.tableSession;return}C&&li(w,C)&&S(C);};return {onStagePointerDown(h){let C=n.get();if(!C.editable||C.presenting||h.button!==0)return;let w=chunkYOEVEUFZ_cjs.Fm(h.target,e.getStageRoot());if((r||a)&&x(true),aA({event:h,elementId:w,state:C,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(C.formatPainterSourceId){w&&li(C,w)&&o.applyFormatPainter(C.formatPainterSourceId,w),n.set({formatPainterSourceId:null});return}let A=w!==null&&li(C,w);if(g(h.pointerType,A?w:null,h.timeStamp||Date.now())){h.preventDefault(),y(h,w);return}if(!A){m.begin(h);return}if(chunkYOEVEUFZ_cjs.Te(h)){let P=C.selectedElementIds.includes(w)?C.selectedElementIds.filter(k=>k!==w):[...C.selectedElementIds,w];o.select(P.at(-1)??null,P);return}(C.selectedElementId!==w||C.selectedElementIds.length!==1)&&o.select(w,[w]),tA(n.get(),w)&&(h.preventDefault(),h.stopPropagation(),p.begin("move",w,h));},onStagePointerMove(h){if(!e.onCursorMove)return;let C=e.getOverlay()?.root.getBoundingClientRect(),w=e.getScale();!C||!(w>0)||e.onCursorMove((h.clientX-C.left)/w,(h.clientY-C.top)/w);},onStageDblClick(h){let C=n.get();if(!C.editable||C.presenting||r||a)return;let w=chunkYOEVEUFZ_cjs.Fm(h.target,e.getStageRoot());y(h,w);},beginHandleGesture(h,C,w){let A=n.get(),P=A.selectedElementId,k=pi(A);!P||(h==="resize"?!k.resizable:!k.rotatable)||(C.preventDefault(),C.stopPropagation(),p.begin(h,P,C,w));},beginAdjustGesture:(h,C)=>d.begin(h,C),closeInline:x,readInlineList:b,retainAcceptedInlineText(){let h=xA(n.get(),i,r);h&&n.set({slides:h});},formatInlineList:h=>s?.format(h)??false,readPendingInlineTextEdit:()=>gA(n.get(),i,b()),hasActivePointerInteraction:()=>p.isActive()||d.isActive()||m.isActive(),inlineActive:()=>r!==null||a!==null,dispose(){x(false),l(),p.dispose(),d.dispose(),m.dispose();}}}var vp="#0ea5e9";function EA(e,t,n){let o=chunkQPYQDJ2Q_cjs.x(e,"svg",{role:"img","aria-label":t("pptx.animation.motionPath.overlay"),"data-pptx-motion-path-overlay":"true"});o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.zIndex="45",o.style.pointerEvents="none";let r=chunkQPYQDJ2Q_cjs.x(e,"path",{fill:"none",stroke:vp,"stroke-width":2,"stroke-dasharray":"6 4","vector-effect":"non-scaling-stroke"}),i=chunkQPYQDJ2Q_cjs.x(e,"circle",{r:5,fill:vp,opacity:.55}),s=chunkQPYQDJ2Q_cjs.x(e,"circle",{r:7,fill:"#ffffff",stroke:vp,"stroke-width":2,"aria-label":t("pptx.animation.motionPath.endHandle"),"data-pptx-motion-path-handle":"end"});o.append(r,i,s);let a=null,l=null,p=(x,b)=>({originX:x.x+x.width/2,originY:x.y+x.height/2,slideWidth:b.canvasSize.width,slideHeight:b.canvasSize.height}),d=(x,b,v)=>{let f=chunkYOEVEUFZ_cjs.Rd(x,b),S=chunkYOEVEUFZ_cjs.Sd(x,b);chunkQPYQDJ2Q_cjs.y(r,{d:f}),chunkQPYQDJ2Q_cjs.y(i,{cx:b.originX,cy:b.originY}),chunkQPYQDJ2Q_cjs.y(s,{cx:S.x,cy:S.y}),s.style.pointerEvents=v?"auto":"none",s.style.cursor=v?"move":"";},u=()=>{let x=l;l=null,e.defaultView?.removeEventListener("pointermove",m),e.defaultView?.removeEventListener("pointerup",g),e.defaultView?.removeEventListener("pointercancel",g),x&&x.draft!==x.basePath&&n(x.draft);};function m(x){if(!l||x.pointerId!==l.pointerId)return;let b=l.scale||1,v=(x.clientX-l.startClientX)/b,f=(x.clientY-l.startClientY)/b,S=chunkYOEVEUFZ_cjs.Sd(l.basePath,l.frame),y=(S.x+v-l.frame.originX)/l.frame.slideWidth,h=(S.y+f-l.frame.originY)/l.frame.slideHeight;l.draft=chunkYOEVEUFZ_cjs.Td(l.basePath,y,h),d(l.draft,l.frame,true);}function g(x){l&&x.pointerId===l.pointerId&&u();}return s.addEventListener("pointerdown",x=>{let b=a?.element,v=a?.path;!b||!v||!a?.canEdit||!chunkYOEVEUFZ_cjs.Ud(v)||(x.stopPropagation(),x.preventDefault(),l={pointerId:x.pointerId,startClientX:x.clientX,startClientY:x.clientY,basePath:v,frame:p(b,a),scale:a.scale,draft:v},e.defaultView?.addEventListener("pointermove",m),e.defaultView?.addEventListener("pointerup",g),e.defaultView?.addEventListener("pointercancel",g));}),{root:o,mount(x){if(!a?.element||!a.path){o.remove();return}x&&o.parentElement!==x?x.appendChild(o):x||o.remove();},update(x){a=x;let{element:b,path:v}=x;if(!b||!v){o.remove();return}l||(chunkQPYQDJ2Q_cjs.y(o,{width:x.canvasSize.width,height:x.canvasSize.height}),d(v,p(b,x),x.canEdit&&chunkYOEVEUFZ_cjs.Ud(v)));},destroy(){u(),o.remove();}}}function TA(e){let t=null;return {attach(){t?.destroy(),t=EA(e.doc,e.getTranslator(),e.onChangePath);},sync(){if(!t)return;let n=e.store.get(),o=n.editable&&!n.presenting,r=o?e.getSelectedElement(n):void 0,i=n.slides[n.currentSlide];t.update({element:r??null,path:r?chunkYOEVEUFZ_cjs.$d(i?.animations??[],r.id):void 0,canvasSize:n.canvasSize,scale:e.getScale(),canEdit:o}),t.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},detach(){t?.destroy(),t=null;}}}function PA(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-context-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t("pptx.editPoints.menu")),r.dataset.pptxEditPointsMenu="true",r.style.position="absolute",r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.transform=`scale(${n.inverseScale})`,r.style.transformOrigin="0 0",r.style.zIndex="61";let i=s=>s.stopPropagation();r.addEventListener("pointerdown",i),r.addEventListener("mousedown",i),r.addEventListener("click",i),r.addEventListener("contextmenu",s=>{s.preventDefault(),s.stopPropagation();});for(let s of n.entries){if(s.separatorBefore){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-context-menu-separator");l.setAttribute("role","separator"),r.appendChild(l);}let a=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-context-menu-item");if(a.type="button",a.dataset.pptxEditPointsCommand=s.id,s.checked===void 0)a.setAttribute("role","menuitem");else {a.setAttribute("role","menuitemcheckbox"),a.setAttribute("aria-checked",String(s.checked));let l=chunkQPYQDJ2Q_cjs.w(e,"span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",l.style.width="12px",l.style.marginRight="6px",l.textContent=s.checked?"\u2713":"",a.appendChild(l);}a.appendChild(e.createTextNode(t(s.labelKey))),a.disabled=s.disabled===true,a.addEventListener("click",()=>o(s.id)),r.appendChild(a);}return r}function QM(e,t,n){t.replaceChildren();let o=r=>({[chunkYOEVEUFZ_cjs.Bs]:r});t.appendChild(chunkQPYQDJ2Q_cjs.x(e,"rect",{width:"100%",height:"100%",fill:"transparent"}));for(let r of n.segments){let i=chunkQPYQDJ2Q_cjs.x(e,"path",{d:r.d,fill:"none",stroke:"transparent","stroke-width":n.hitStrokeWidth,"pointer-events":"stroke",...o(r.target)});i.style.cursor="copy",t.appendChild(i);}t.appendChild(chunkQPYQDJ2Q_cjs.x(e,"path",{d:n.outlineD,fill:"none",stroke:chunkYOEVEUFZ_cjs.Cs.outlineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));for(let r of n.handles){t.appendChild(chunkQPYQDJ2Q_cjs.x(e,"line",{x1:r.anchorX,y1:r.anchorY,x2:r.x,y2:r.y,stroke:chunkYOEVEUFZ_cjs.Cs.handleLineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));let i=chunkQPYQDJ2Q_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:chunkYOEVEUFZ_cjs.Cs.handleFill,stroke:chunkYOEVEUFZ_cjs.Cs.handleStroke,"stroke-width":n.outlineWidth,...o(r.target)});i.style.cursor="move",t.appendChild(i);}for(let r of n.nodes){let i=chunkQPYQDJ2Q_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:r.selected?chunkYOEVEUFZ_cjs.Cs.selectedNodeFill:chunkYOEVEUFZ_cjs.Cs.nodeFill,stroke:r.selected?chunkYOEVEUFZ_cjs.Cs.selectedNodeStroke:chunkYOEVEUFZ_cjs.Cs.nodeStroke,"stroke-width":n.outlineWidth,"data-pptx-edit-points-node-type":r.type,"data-selected":r.selected?"true":void 0,...o(r.target)});i.style.cursor="move",t.appendChild(i);}}function AA(e){let{doc:t,t:n}=e,o=e.element.id,r=e.canvasSize,i=e.scale,s=null,a=null,l=chunkQPYQDJ2Q_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.editPoints.overlay"),"data-pptx-edit-points-overlay":"true","data-pptx-edit-points-element":o});l.style.position="absolute",l.style.left="0",l.style.top="0",l.style.zIndex="60",l.style.touchAction="none";let p=()=>{chunkQPYQDJ2Q_cjs.y(l,{width:r.width,height:r.height});let g=d.view(i);QM(t,l,g),s?.remove(),s=g.menu?PA(t,n,g.menu,x=>d.runCommand(x)):null,s&&a&&a.appendChild(s);},d=new chunkYOEVEUFZ_cjs.Ds(e.element,{onCommit:g=>e.onCommit(o,g),onExit:()=>e.onExit(),onChange:()=>p(),hiddenCommands:e.hiddenCommands}),u=g=>chunkYOEVEUFZ_cjs.Hs(g,l,r.width,r.height);l.addEventListener("pointerdown",g=>{g.stopPropagation(),g.button===0&&(g.preventDefault(),l.setPointerCapture?.(g.pointerId),d.pointerDown(u(g)));}),l.addEventListener("pointermove",g=>d.pointerMove(u(g))),l.addEventListener("pointerup",g=>{l.hasPointerCapture?.(g.pointerId)&&l.releasePointerCapture(g.pointerId),d.pointerUp(u(g));}),l.addEventListener("contextmenu",g=>{g.preventDefault(),g.stopPropagation(),d.contextMenu(u(g));});for(let g of ["mousedown","click","dblclick"])l.addEventListener(g,x=>x.stopPropagation());let m=t.defaultView?chunkYOEVEUFZ_cjs.Is(d,t.defaultView):()=>{};return p(),{elementId:o,root:l,mount(g){if(a=g,!g){l.remove(),s?.remove();return}l.parentElement!==g&&g.appendChild(l),s&&s.parentElement!==g&&g.appendChild(s);},update(g,x,b){let v=b!==i||x.width!==r.width||x.height!==r.height;r=x,i=b,d.reconcile(g),v&&p();},destroy(){m(),l.remove(),s?.remove(),s=null;}}}var hp="#2f528f";function kA(e){let{doc:t,t:n,tool:o}=e,r=e.canvasSize,i=chunkQPYQDJ2Q_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.freeformTool.overlay"),"data-pptx-freeform-tool-overlay":o});i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.zIndex="60",i.style.cursor="crosshair",i.style.touchAction="none";let s=chunkQPYQDJ2Q_cjs.x(t,"rect",{width:"100%",height:"100%",fill:"transparent"}),a=chunkQPYQDJ2Q_cjs.x(t,"g",{"pointer-events":"none"});i.append(s,a);let l=()=>{chunkQPYQDJ2Q_cjs.y(i,{width:r.width,height:r.height});let m=p.view();a.replaceChildren(),m.previewD&&a.appendChild(chunkQPYQDJ2Q_cjs.x(t,"path",{d:m.previewD,fill:"none",stroke:hp,"stroke-width":m.strokeWidth,"pointer-events":"none"})),m.start&&a.appendChild(chunkQPYQDJ2Q_cjs.x(t,"circle",{cx:m.start.x,cy:m.start.y,r:m.start.size/2,fill:m.start.armed?hp:"#ffffff",stroke:hp,"stroke-width":m.strokeWidth,"pointer-events":"none","data-pptx-freeform-start":m.start.armed?"armed":"idle"}));},p=new chunkYOEVEUFZ_cjs.Ls({tool:o,onCommit:m=>e.onCommit(m),onCancel:()=>e.onCancel(),onChange:()=>l()});p.setScale(e.scale);let d=m=>chunkYOEVEUFZ_cjs.Gs(i,m.clientX,m.clientY,r.width,r.height);i.addEventListener("pointerdown",m=>{m.stopPropagation(),m.preventDefault(),i.setPointerCapture?.(m.pointerId),p.pointerDown({...d(m),button:m.button});}),i.addEventListener("pointermove",m=>p.pointerMove(d(m))),i.addEventListener("pointerup",m=>{i.hasPointerCapture?.(m.pointerId)&&i.releasePointerCapture(m.pointerId),p.pointerUp();}),i.addEventListener("dblclick",m=>{m.stopPropagation(),p.doubleClick();}),i.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();});for(let m of ["mousedown","click"])i.addEventListener(m,g=>g.stopPropagation());let u=t.defaultView?chunkYOEVEUFZ_cjs.Is(p,t.defaultView):()=>{};return l(),{tool:o,root:i,mount(m){m?i.parentElement!==m&&m.appendChild(i):i.remove();},update(m,g){r=m,p.setScale(g),l();},destroy(){u(),i.remove();}}}function IA(e){let{doc:t,store:n}=e,o=null,r=null,i=()=>e.getStageWrap()?.querySelector(".pptxv-stage")??null,s=()=>{let u=e.getCustomization?.();return u?chunkYOEVEUFZ_cjs.cr(u):true},a=()=>{let u=o;o=null,u?.destroy();},l=()=>{let u=r;r=null,u?.destroy();},p=(u,m)=>{a(),r&&r.tool!==m&&l(),r??=kA({doc:t,t:e.getTranslator(),tool:m,canvasSize:u.canvasSize,scale:e.getScale(),onCommit:g=>{n.set({freeformTool:null}),e.insertElement(g);},onCancel:()=>n.set({freeformTool:null})}),r.update(u.canvasSize,e.getScale()),r.mount(i());},d=(u,m)=>{l();let g=J(u,m);if(!g||!chunkYOEVEUFZ_cjs.Fs(g)||!s()){a(),n.set({editPointsElementId:null});return}o&&o.elementId!==m&&a(),o??=AA({doc:t,t:e.getTranslator(),element:g,canvasSize:u.canvasSize,scale:e.getScale(),hiddenCommands:e.getCustomization?.()?.hiddenEditPointsCommands,onCommit:(x,b)=>e.applyElementPatch(x,b),onExit:()=>{a(),n.set({editPointsElementId:null});}}),o.update(g,u.canvasSize,e.getScale()),o.mount(i());};return {startEditPoints(u){let m=n.get();return !m.editable||!s()||!chunkYOEVEUFZ_cjs.Fs(J(m,u))?false:(n.set({editPointsElementId:u,freeformTool:null}),true)},armFreeformTool(u){n.set({freeformTool:u,...u?{editPointsElementId:null}:{}});},isEditingPoints(u){return u!==null&&n.get().editPointsElementId===u},sync(){let u=n.get(),m=u.editable&&!u.presenting;m&&u.freeformTool?p(u,u.freeformTool):m&&u.editPointsElementId?d(u,u.editPointsElementId):(l(),a());},detach(){l(),a();}}}function ZM(e){let t=e?e.length===2?"corner":e==="n"||e==="s"?"horizontal-edge":"vertical-edge":"rotate",n=e?"var(--pptxv-resize-size, 10px)":"var(--pptxv-rotate-size, 12px)",{frame:o,artwork:r}=chunkYOEVEUFZ_cjs.Ve(t,{width:n,height:n,radius:e?"2px":"50%",fill:"#fff",borderColor:"var(--pptx-ring)"});return {frame:{...o,marginLeft:`calc(${o.width} / -2)`,marginTop:`calc(${o.height} / -2)`},artwork:r}}function yp(e,t){let{frame:n,artwork:o}=ZM(t);Object.assign(e.style,n);let r=chunkQPYQDJ2Q_cjs.w(e.ownerDocument,"span","pptxv-control-artwork",o);r.setAttribute("data-pptx-handle-artwork",""),r.setAttribute("aria-hidden","true"),e.appendChild(r);}function Sp(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-editor-overlay"),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-sel-box");r.style.borderColor=chunkYOEVEUFZ_cjs.We("var(--pptx-ring)"),r.hidden=true,o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-chunkYOEVEUFZ_cjs.Qe}px`,height:`${chunkYOEVEUFZ_cjs.Qe}px`,background:chunkYOEVEUFZ_cjs.We("var(--pptx-ring)")});r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-chunkYOEVEUFZ_cjs.Qe}px`});s.type="button",s.setAttribute("data-pptx-compact",""),s.dataset.pptxHandleKind="rotate",s.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),s.addEventListener("pointerdown",x=>n.onRotatePointerDown(x)),yp(s),r.appendChild(s);let a,l,p=[];for(let x of chunkYOEVEUFZ_cjs.Oe){let{fx:b,fy:v}=chunkYOEVEUFZ_cjs.Pe[x],f=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-sel-handle",{left:`${b*100}%`,top:`${v*100}%`,cursor:chunkYOEVEUFZ_cjs.Pe[x].cursor});f.type="button",f.setAttribute("data-pptx-compact",""),f.dataset.handle=x,f.dataset.pptxHandleKind="resize",f.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:x})),f.addEventListener("pointerdown",S=>n.onHandlePointerDown(x,S)),f.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span",void 0,chunkYOEVEUFZ_cjs.Ue(x))),f.firstElementChild?.setAttribute("data-pptx-handle-hit",""),yp(f,x),r.appendChild(f),p.push(f);}let d=[];function u(x){let b=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-adjust-handle");return b.type="button",b.setAttribute("data-pptx-compact",""),b.dataset.pptxHandleKind="adjust",b.setAttribute("aria-label",t("pptx.selectionOverlay.adjust")),b.addEventListener("pointerdown",v=>{let f=m[x];f&&n.onAdjustPointerDown(v,f);}),r.appendChild(b),b}let m=[],g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-snap-layer");return o.appendChild(g),{root:o,mount(x){o.parentElement!==x?(x.appendChild(o),l!==x&&(a?.(),l=x,a=chunkYOEVEUFZ_cjs.Xe(s,{stem:i}))):x.lastElementChild!==o&&x.appendChild(o);},setBox(x,b){if(!x){r.hidden=true;return}r.hidden=false,r.style.left=`${x.x*b}px`,r.style.top=`${x.y*b}px`,r.style.width=`${x.width*b}px`,r.style.height=`${x.height*b}px`,r.style.setProperty("--pptx-selection-width",`${x.width*b}px`),r.style.setProperty("--pptx-selection-height",`${x.height*b}px`),r.style.borderWidth=`${b}px`,r.style.transform=x.rotation?`rotate(${x.rotation}deg)`:"none";},setHandleVisibility({resizable:x,rotatable:b}){for(let v of p)v.hidden=!x;i.hidden=!b,s.hidden=!b;},setAdjustHandles(x,b){for(;d.length<x.length;)d.push(u(d.length));m=x,d.forEach((v,f)=>{let S=x[f];v.hidden=S===void 0,S&&(v.style.left=`${S.left*b}px`,v.style.top=`${S.top*b}px`,v.style.cursor=S.cursor,v.dataset.pptxAdjustKey=S.key);});},setSnapLines(x,b){g.replaceChildren();for(let v of x){let f=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-snap-line pptxv-snap-${v.axis==="v"?"v":"h"}`);v.axis==="v"?f.style.left=`${v.position*b}px`:f.style.top=`${v.position*b}px`,g.appendChild(f);}},setEditing(x){o.classList.toggle("is-editing",x),r.style.zIndex=x?"7":"";},destroy(){a?.(),o.remove();}}}var JM={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",ppt:"application/vnd.ms-powerpoint"};function Cp(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=null,a=null,l=()=>{let I={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(I),e.getChrome().titleBar?.setEditState(I),e.getChrome().mobileToolbar?.setEditState(I);},p=gp({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>l(),transformCommittedText:e.transformCommittedText,getPendingInlineTextEdit:()=>h.readPendingInlineTextEdit?.(),readInlineList:()=>h.readInlineList?.(),formatInlineList:I=>h.formatInlineList?.(I)??false,cancelInlineList:()=>h.closeInline(false)}),d=mp({doc:t,getTranslator:e.getTranslator,store:n,ops:p,getHandler:e.getHandler,setHandler:e.setHandler,getUserName:e.getUserName}),u=up({store:n,ops:p}),m=(I,R)=>{let O=n.get();!O.editable||!U(O).some(B=>B.id===I)||(p.pushHistory(),n.set(Z(O,U(O).map(B=>B.id===I?{...B,...R}:B))),p.commitChange());},g=()=>{let I=n.get(),R=U(I).find(O=>O.id===I.selectedElementId);R&&ni(t,e.getTranslator(),R,O=>m(R.id,O));},x=()=>{let I=n.get();I.formatPainterSourceId&&I.selectedElementId&&p.applyFormatPainter(I.formatPainterSourceId,I.selectedElementId);},b=I=>{let R=chunkYOEVEUFZ_cjs.yl(I);if(R==="bold")return d.toggleBold(),true;if(R==="italic")return d.toggleItalic(),true;if(R==="underline")return d.toggleUnderline(),true;let{action:O}=chunkYOEVEUFZ_cjs.Uq(I,{isEditingText:true,canEdit:true,hasSelection:true},e.getKeyboardCustomization?.());switch(O){case "alignLeft":return d.setTextAlign("left"),true;case "alignCenter":return d.setTextAlign("center"),true;case "alignRight":return d.setTextAlign("right"),true;case "alignJustify":return d.setTextAlign("justify"),true;case "increaseFontSize":return d.stepFontSize("increase"),true;case "decreaseFontSize":return d.stepFontSize("decrease"),true;case "copyFormat":return d.toggleFormatPainter(),true;case "pasteFormat":return x(),true;case "hyperlink":return g(),true;case "clearFormatting":return d.clearFormatting(),true;case "find":case "findReplace":return e.getChrome().ribbon?.toggleFindReplace(),true;default:return false}},v=new Map,f=false;function S(){let I=e.getHandler();return I&&!f&&v.size===0&&(f=true,I.getLayoutPreviews().then(R=>{v=new Map(R.map(O=>[O.path,O])),y();}).catch(()=>{}).finally(()=>{f=false;})),v}let y=lP({store:n,getChrome:e.getChrome,selectedElement:I=>p.selectedElement(I),layoutPreviews:S,getHandler:e.getHandler}),h=wA({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getLivePatcher:e.getLivePatcher,getStageRoot:()=>s?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(I,R)=>e.getChrome().ribbon?.openEquationEditor(I,R),onEyedropper:I=>d.setShapeFill(I),onInlineLiveFormatKey:b}),C=Kl({doc:t,store:n,editActions:d,interactions:h,getScale:e.getScale,getStageOrigin(){let I=o?.root.getBoundingClientRect();return {left:I?.left??0,top:I?.top??0}},getStageRoot:()=>s?.querySelector(".pptxv-stage")??null}),w=TA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getSelectedElement:I=>p.selectedElement(I),onChangePath:I=>d.setMotionPathData(I)}),A=IA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getCustomization:e.getCustomization,applyElementPatch:(I,R)=>m(I,R),insertElement:I=>d.insertElement(I)}),P=LP({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,actions:d}),k=()=>{if(y(),w.sync(),A.sync(),P.sync(),!o)return;let I=n.get(),R=I.editable&&!I.presenting&&!I.cropSession?U(I).filter(B=>I.selectedElementIds.includes(B.id)&&!A.isEditingPoints(B.id)):[];o.setBox(MP(R),e.getScale());let O=pi(I);o.setHandleVisibility({resizable:O.resizable,rotatable:O.rotatable}),o.setAdjustHandles(I.cropSession?[]:fA(I),e.getScale()),r?.sync(),i?.sync(),EP(t,o.root,I.showGuides?I.guides:[],e.getScale(),I.editable&&!I.presenting?{onMoveGuide:(B,F)=>{let V=n.get();n.set({guides:chunkYOEVEUFZ_cjs.dm(V.guides,B,F,V.canvasSize)});},onRemoveGuide:B=>{n.set({guides:chunkYOEVEUFZ_cjs.em(n.get().guides,B)});}}:void 0);},T=xp({getKeyboardCustomization:e.getKeyboardCustomization,isActive:()=>{let I=n.get();return I.editable&&!I.presenting&&!h.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>d.copy(),cutSelected:()=>d.cut(),paste:()=>d.paste(),canPaste:()=>{let I=n.get();return !!(I.clipboardPayload&&I.slides[I.currentSlide])},selectAll:()=>d.selectAll(),groupSelected:()=>d.groupSelected(),ungroupSelected:()=>d.ungroupSelected(),nudgeSelected:(I,R)=>p.nudgeSelected(I,R),undo:()=>p.undo(),redo:()=>p.redo(),cancelFormatPainter:()=>n.get().formatPainterSourceId?(n.set({formatPainterSourceId:null}),true):false,toggleShortcuts:()=>e.getChrome().shortcuts.toggle(),toggleFind:()=>e.getChrome().ribbon?.toggleFindReplace(),closeShortcuts:()=>{let I=e.getChrome().shortcuts;return I.isOpen()?(I.close(),true):false},setTextAlign:I=>d.setTextAlign(I),stepFontSize:I=>d.stepFontSize(I),copyFormat:()=>d.toggleFormatPainter(),pasteFormat:x,addSlide:()=>d.addSlide(),openHyperlink:g,toggleFindReplace:()=>e.getChrome().ribbon?.toggleFindReplace(),clearFormatting:()=>d.clearFormatting(),cycleSelection:I=>{let R=n.get(),O=U(R).map(F=>F.id),B=chunkYOEVEUFZ_cjs.Bl(O,R.selectedElementId,I);B&&p.select(B,[B]);},onPasteSpecial:()=>{n.get().clipboardPayload&&wP(t,e.getTranslator(),{onConfirm:I=>{let R=d.pasteWithFormat(I);if(!R||I!=="picture")return;let O=n.get().pasteOptionsToolbar?.find(B=>B.id===R)?.sourceClone;O&&requestAnimationFrame(()=>{Xr(t,R,O).then(B=>{B&&d.replaceElement(R,B);});});}});}}),E=I=>{chunkYOEVEUFZ_cjs.Gl(a),C.onStagePointerDown(I);},L,M=()=>{L?.(),L=void 0,h.closeInline(true),h.closeInline(false),s?.removeEventListener("pointerdown",E),s?.removeEventListener("pointermove",h.onStagePointerMove),s?.removeEventListener("dblclick",C.onStageDblClick),a?.removeEventListener("keydown",T),s=null,a=null,o?.destroy(),o=null,r?.dispose(),r=null,i?.dispose(),i=null,w.detach(),A.detach(),P.detach();},D=n.subscribe((I,R)=>{if(R.editable&&!I.editable&&h.retainAcceptedInlineText?.(),h.readInlineList?.(),I.loading&&!R.loading&&h.closeInline(false),I.currentSlide!==R.currentSlide&&(h.closeInline(true),I.selectedElementId)){p.select(null);return}if((I.slides!==R.slides||I.templateElementsBySlideId!==R.templateElementsBySlideId||I.slideMasters!==R.slideMasters||I.notesMaster!==R.notesMaster||I.handoutMaster!==R.handoutMaster)&&I.selectedElementId&&!p.selectedElement(I)){p.select(null);return}I.editable!==R.editable&&(I.editable||(h.closeInline(true),I.selectedElementId&&p.select(null)),l()),(I.drawTool!==R.drawTool||I.editable!==R.editable)&&C.syncCursor(s),k();});return {attachChrome(){M();let I=e.getChrome();o=Sp(t,e.getTranslator(),{onHandlePointerDown(R,O){h.beginHandleGesture("resize",O,R);},onRotatePointerDown(R){h.beginHandleGesture("rotate",R);},onAdjustPointerDown(R,O){h.beginAdjustGesture(R,O);}}),r=AP({doc:t,store:n,ops:p,getScale:e.getScale,label:R=>e.getTranslator()(R==="start"?"pptx.canvas.connectorEndpointStart":"pptx.canvas.connectorEndpointEnd")}),i=TP({doc:t,t:e.getTranslator(),store:n,ops:p,getScale:e.getScale}),w.attach(),s=I.stageWrap,a=I.root,P.attach(a),L=eA(a,s,{store:n,getHandler:e.getHandler,isEditing:h.inlineActive,insertElement:d.insertElement}),s.addEventListener("pointerdown",E),s.addEventListener("pointermove",h.onStagePointerMove),s.addEventListener("dblclick",C.onStageDblClick),a.addEventListener("keydown",T),o.mount(s),r.mount(s),i.mount(s),l(),C.syncCursor(s),k();},detachChrome:M,onStageRendered(){o&&s&&(o.mount(s),r?.mount(s),i?.mount(s),k());},hasActivePointerInteraction:()=>h.hasActivePointerInteraction()||C.isActive()||P.isDragging()||!!r?.isActive(),capturesKeyboard(){let I=n.get();return I.editable&&(I.selectedElementId!==null||h.inlineActive())},reset(){h.closeInline(false),C.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",editPointsElementId:null,freeformTool:null,formatPainterSourceId:null,cropSession:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),l();},setEditable(I){n.set({editable:I,...I?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:I=>p.setHistoryDepth(I),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:I=>p.select(I.at(-1)??null,I),applyElementPatch:m,commitElementUpdates(I,R){p.pushHistory(R),n.set({slides:I}),p.commitChange();},commitSlides(I,R=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:I,currentSlide:Math.max(0,Math.min(R,I.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:I=>C.setTool(I),setDrawColor:I=>{ct(n,I),C.setColor(I);},setDrawWidth:I=>C.setWidth(I),startEditPoints:I=>A.startEditPoints(I),armFreeformTool:I=>A.armFreeformTool(I),getEditActions:()=>d,getFindReplaceActions:()=>u,commitNotes:(I,R)=>p.commitNotes(I,R),setHandoutSlidesPerPage:I=>p.setHandoutSlidesPerPage(I),updateDocumentProperties:(I,R,O)=>p.updateDocumentProperties(I,R,O),updatePresentationProperties:I=>p.updatePresentationProperties(I),updateSections:I=>p.updateSections(I),updateHeaderFooter:I=>p.updateHeaderFooter(I),updateCustomShows:I=>p.updateCustomShows(I),save:I=>p.save(I),async downloadAs(I,R){let O=await p.save(I);chunkYOEVEUFZ_cjs.kt(new Blob([O],{type:JM[I]}),chunkYOEVEUFZ_cjs.zj(R,I));},async downloadPptx(I){await this.downloadAs("pptx",I);},destroy(){D(),P.destroy(),h.dispose(),C.dispose(),M();}}}async function wp(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 mo(e,t){let n=new chunkYOEVEUFZ_cjs.Z,o=[];try{let r=await n.load(e,{allowExternalImages:t?.allowExternalImages}),i=u=>n.getImageData(u),s=await eD(n,r.slides,o),a=await tD(n,r.slides),l=await chunkYOEVEUFZ_cjs.Qa(a,i),p=await chunkYOEVEUFZ_cjs.Ra(r.tableStyleMap,i),d=await chunkYOEVEUFZ_cjs.Sa(l,i);return {handler:n,slides:d,sections:r.sections??[],presentationProperties:r.presentationProperties??{},viewProperties:r.viewProperties,headerFooter:r.headerFooter??{},coreProperties:r.coreProperties,appProperties:r.appProperties,customProperties:r.customProperties??[],customShows:r.customShows??[],modernCommentAuthors:r.modernCommentAuthors??[],commentAuthors:r.commentAuthors??[],embeddedFonts:r.embeddedFonts??[],hasDigitalSignatures:r.hasDigitalSignatures??!1,digitalSignatureCount:r.digitalSignatureCount??0,isPasswordProtected:r.isPasswordProtected??!1,canvasSize:{width:r.width??chunkYOEVEUFZ_cjs.ba,height:r.height??chunkYOEVEUFZ_cjs.ca},mediaDataUrls:s,colorScheme:r.theme?.colorScheme,fontScheme:r.theme?.fontScheme,themeName:r.theme?.name,tagCollections:r.tags??[],tableStyleMap:p,tableStylesDefaultId:r.tableStylesDefaultId,slideMasters:r.slideMasters??[],themeOptions:r.themeOptions??[],notesMaster:r.notesMaster,handoutMaster:r.handoutMaster,hasMacros:r.hasMacros??!1,modifyVerifier:r.modifyVerifier,warnings:r.warnings??[],slideSize:typeof r.widthEmu=="number"&&typeof r.heightEmu=="number"&&r.widthEmu>0&&r.heightEmu>0?{widthEmu:r.widthEmu,heightEmu:r.heightEmu,type:r.slideSizeType??""}:void 0,notesCanvasSize:typeof r.notesWidthEmu=="number"&&typeof r.notesHeightEmu=="number"&&r.notesWidthEmu>0&&r.notesHeightEmu>0?{width:Math.round(r.notesWidthEmu/9525),height:Math.round(r.notesHeightEmu/9525)}:void 0,blobUrls:o}}catch(r){throw mt(o),n.dispose(),r}}function mt(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function eD(e,t,n){let o=[];for(let s of t)chunkYOEVEUFZ_cjs.Ma(s.elements,o);let r=new Map;await Promise.all(o.map(async s=>{let a=await chunkYOEVEUFZ_cjs.Pa(s,e);if(a.missing||!a.mediaPath||!a.url){s.mediaMissing=true;return}r.set(a.mediaPath,a.url),a.isBlobUrl&&n.push(a.url);}));let i=chunkYOEVEUFZ_cjs.Na(t).filter(s=>!r.has(s));return await Promise.all(i.map(async s=>{try{let a=await e.getMediaArrayBuffer(s);if(a){let l=URL.createObjectURL(new Blob([a]));n.push(l),r.set(s,l);}}catch{}})),r}async function tD(e,t){let{paths:n,refs:o}=chunkYOEVEUFZ_cjs.Oa(t);if(n.size===0)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let s=await e.getImageData(i);s&&r.set(i,s);}catch{}})),t.map(i=>{let s=chunkYOEVEUFZ_cjs.La(i.elements,r,o);return s===i.elements?i:{...i,elements:s}})}function ci(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let s of Object.keys(o))if(o[s]!==t[s]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let s of Array.from(n))s(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function mi(){return {slides:[],sections:[],presentationProperties:{},viewProperties:void 0,headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],modernCommentAuthors:[],commentAuthors:[],activeCustomShowId:null,embeddedFonts:[],outlineFontsTick:0,embedFonts:true,customFontFamilies:[],hasDigitalSignatures:false,digitalSignatureCount:0,isPasswordProtected:false,presentationPassword:null,templateElementsBySlideId:{},slideMasters:[],themeOptions:[],notesMaster:void 0,notesCanvasSize:void 0,handoutMaster:void 0,hasMacros:false,masterViewTab:"slides",handoutSlidesPerPage:4,masterViewTarget:null,canvasSize:{width:chunkYOEVEUFZ_cjs.ba,height:chunkYOEVEUFZ_cjs.ca},slideSize:void 0,mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,themeName:void 0,tagCollections:[],tableStyleMap:void 0,tableStylesDefaultId:void 0,tableStylesToDelete:[],currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,protectedView:false,selectedElementId:null,selectedElementIds:[],selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null,formatPainterSourceId:null,editTemplateMode:false,dirty:false,interactionActive:false,notesExpanded:false,inspectorOpen:true,remotePresences:[],cursors:[],followedClientId:null,clipboardPayload:null,pasteOptionsToolbar:null,drawTool:"select",editPointsElementId:null,freeformTool:null,drawColor:chunkYOEVEUFZ_cjs.ea,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,showGuides:true,guides:[],eyedropperActive:false,cropSession:null,spellCheckEnabled:false,readOnlyRecommendation:null,readOnlyBannerDismissed:false,modifyVerifier:void 0,readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null,readOnlyCheckingPassword:false,compatToasts:[],runProgramNotices:[]}}function Vt(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function LA(e){let{options:t,store:n}=e,o=null,r=[],i=0;function s(){mt(r),mt(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function a(l,p="user",d){let u=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let m=await wp(l),g=await mo(m,{allowExternalImages:e.getAllowExternalContent?.()});if(u!==i){mt(g.blobUrls),g.handler.dispose();return}s(),o=g.handler,r=g.blobUrls;let x=chunkYOEVEUFZ_cjs.lo(g.slides);e.onContentApplying?.(p);let b=p==="user"&&!d?.skipProtectedView&&t.editable===!0&&(e.shouldOpenProtectedView?.()??!1),v=chunkYOEVEUFZ_cjs.bs({modifyVerifier:g.modifyVerifier,customProperties:g.customProperties}),f=t.editable===!0&&v.kind!==null&&v.defaultReadOnly,S=dp(n.get(),g.viewProperties),y=chunkYOEVEUFZ_cjs.ds([...g.warnings,...g.slides.flatMap(h=>h.warnings??[])]);n.set({slides:x.slides,protectedView:b,readOnlyRecommendation:v.kind===null?null:v,readOnlyBannerDismissed:!1,modifyVerifier:g.modifyVerifier??void 0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null,readOnlyCheckingPassword:!1,compatToasts:y,...S,sections:g.sections,presentationProperties:g.presentationProperties,viewProperties:g.viewProperties,headerFooter:g.headerFooter,coreProperties:g.coreProperties,appProperties:g.appProperties,customProperties:g.customProperties,customShows:g.customShows,modernCommentAuthors:g.modernCommentAuthors,commentAuthors:g.commentAuthors,activeCustomShowId:chunkYOEVEUFZ_cjs.Ip(g.presentationProperties,g.customShows)??null,embeddedFonts:g.embeddedFonts,embedFonts:chunkYOEVEUFZ_cjs.ro(g.embeddedFonts.map(h=>h.name)).initialEnabled,hasDigitalSignatures:g.hasDigitalSignatures,digitalSignatureCount:g.digitalSignatureCount,isPasswordProtected:g.isPasswordProtected,templateElementsBySlideId:x.templateElementsBySlideId,slideMasters:g.slideMasters,themeOptions:g.themeOptions,notesMaster:g.notesMaster,notesCanvasSize:g.notesCanvasSize,handoutMaster:g.handoutMaster,hasMacros:g.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:g.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:g.canvasSize,slideSize:g.slideSize,mediaDataUrls:g.mediaDataUrls,colorScheme:g.colorScheme,fontScheme:g.fontScheme,themeName:g.themeName,tagCollections:g.tagCollections,tableStyleMap:g.tableStyleMap,tableStylesDefaultId:g.tableStylesDefaultId,tableStylesToDelete:[],currentSlide:Vt(t.initialSlide??0,x.slides.length),loading:!1}),e.setEditableForLoad?.(b||f?!1:t.editable===!0),e.onContentApplied?.(p),t.onLoad?.({slideCount:g.slides.length,canvasSize:g.canvasSize});}catch(m){if(u!==i)return;let g=e.getTranslator(),x=m instanceof chunkYOEVEUFZ_cjs.L?g("pptx.security.currentlyProtected"):m instanceof Error?m.message:String(m);n.set({loading:false,error:x}),t.onError?.(x,m);}}return {load:a,releaseLoaded:s,getHandler:()=>o,setHandler:l=>{o?.dispose(),o=l;},invalidate:()=>{i++;}}}var oD=22;function nD(e){return e.map(t=>`${t.key}@${t.level}`).join("\0")}function MA(e,t,n,o){t.querySelector(`[${chunkYOEVEUFZ_cjs.nl}]`)?.remove();let r=o.slides,i="",s=false,a=new Map,l=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-outline-view");l.setAttribute(chunkYOEVEUFZ_cjs.nl,"true"),l.setAttribute("role","region"),l.setAttribute("aria-label",n("pptx.view.outlineView"));let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-outline-view-header"),d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-outline-view-title");d.textContent=n("pptx.view.outlineView");let u=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-outline-view-hint");u.textContent=n("pptx.outline.hint");let m=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-outline-view-btn",onClick:()=>{y(),o.onClose();}});p.append(d,u,m.btn);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-outline-view-list");l.append(p,g);let x=h=>{if(!o.canEdit)return;let C=chunkYOEVEUFZ_cjs.xl(r,h,{canvas:o.canvasSize});C.changed&&(r=C.slides,o.commit(C.slides,C.activeSlideIndex),v(),f(C.focusKey));},b=h=>{let C=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-outline-view-row",{paddingLeft:`${h.level*oD}px`}),w=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-outline-view-number");w.textContent=h.kind==="title"?String(h.slideIndex+1):"";let A=e.createElement("input");return A.type="text",A.className=`pptxv-outline-view-input${h.kind==="title"?" is-title":""}`,A.value=h.text,A.readOnly=!o.canEdit,A.setAttribute(chunkYOEVEUFZ_cjs.ol,h.key),A.setAttribute(chunkYOEVEUFZ_cjs.pl,String(h.slideIndex+1)),A.setAttribute(chunkYOEVEUFZ_cjs.ql,String(h.level)),A.setAttribute("aria-label",n(h.kind==="title"?"pptx.outline.titleLine":"pptx.outline.bodyLine")),A.addEventListener("input",()=>x({type:"setText",key:h.key,text:A.value})),A.addEventListener("keydown",P=>{let{edit:k,preventDefault:T}=chunkYOEVEUFZ_cjs.wl(P,h.key);T&&P.preventDefault(),k&&x(k);}),a.set(h.key,A),C.append(w,A),C};function v(){let h=chunkYOEVEUFZ_cjs.rl(r),C=nD(h);if(C===i){for(let w of h){let A=a.get(w.key);A&&A.value!==w.text&&(A.value=w.text);}return}i=C,a.clear(),g.replaceChildren(...h.map(w=>b(w)));}function f(h){let C=h?a.get(h):void 0;C&&e.activeElement!==C&&(C.focus(),C.setSelectionRange(C.value.length,C.value.length));}let S=o.subscribe?.(h=>{!s&&h!==r&&(r=h,v());});function y(){s||(s=true,S?.(),l.remove());}return v(),t.appendChild(l),{el:l,close:y}}function DA(e){let t=null,n=()=>{t?.close(),t=null;};return {open(){n();let o=e.store.get();t=MA(e.doc,e.root(),e.t,{slides:o.slides,canvasSize:o.canvasSize,canEdit:o.editable,subscribe:r=>e.store.subscribe(i=>r(i.slides)),commit:(r,i)=>e.editor.commitSlides(r,i),onClose:()=>{t=null;}});},close:n}}function RA(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunkQPYQDJ2Q_cjs.w(e,"header"),s=chunkQPYQDJ2Q_cjs.w(e,"h2");s.textContent=n("pptx.selectionPane.title");let a=chunkQPYQDJ2Q_cjs.w(e,"button");a.type="button",a.textContent="\xD7",a.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(s,a),r.appendChild(i);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-workspace-list"),p={elements:o.elements,selectedIds:o.selectedIds},d=null,u=new Map,m=()=>{for(let[v,f]of u)f.classList.toggle("is-selected",p.selectedIds.includes(v));},g=()=>{if(d===p.elements){m();return}if(d=p.elements,u.clear(),l.replaceChildren(),!p.elements.length){let v=chunkQPYQDJ2Q_cjs.w(e,"p");v.textContent=n("pptx.selectionPane.empty"),l.appendChild(v);return}[...p.elements].reverse().forEach((v,f)=>{let S=rD(e,n,v,p.elements.length-f-1,o,p.selectedIds);u.set(v.id,S),l.appendChild(S);});};g(),r.appendChild(l);let x=o.subscribe?.(v=>{p=v,!l.querySelector(".pptxv-selection-rename")&&g();})??null,b={close(){x?.(),r.remove();}};return a.addEventListener("click",()=>{b.close(),o.onClose?.();}),t.appendChild(r),b}function rD(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-selection-row");s.draggable=true,s.dataset.index=String(o),s.classList.toggle("is-selected",i.includes(n.id));let a=chunkQPYQDJ2Q_cjs.w(e,"span");a.textContent="\u2630";let l=chunkQPYQDJ2Q_cjs.w(e,"button");l.type="button",l.dataset.pptxSelectionName="true",l.textContent=OA(n,o),l.addEventListener("click",()=>r.onSelect(n.id)),l.addEventListener("dblclick",()=>iD(e,t,s,l,n,o,r.onRename));let p=chunkQPYQDJ2Q_cjs.w(e,"button");return p.type="button",p.textContent=n.hidden?"\u25CB":"\u25C9",p.setAttribute("aria-label",t(n.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),p.addEventListener("click",()=>r.onToggleHidden(n.id)),s.addEventListener("dragstart",d=>d.dataTransfer?.setData("text/plain",String(o))),s.addEventListener("dragover",d=>d.preventDefault()),s.addEventListener("drop",d=>{d.preventDefault();let u=Number(d.dataTransfer?.getData("text/plain"));Number.isInteger(u)&&r.onReorder(u,o);}),s.append(a,l,p),s}function iD(e,t,n,o,r,i,s){let a=OA(r,i),l=e.createElement("input");l.type="text",l.className="pptxv-selection-rename",l.setAttribute("aria-label",t("pptx.selectionPane.renameElement")),l.value=a,o.hidden=true,n.insertBefore(l,o),l.focus(),l.select();let p=false,d=u=>{if(p)return;p=true,chunkYOEVEUFZ_cjs.Hl(l),l.remove(),o.hidden=false;let m=u?chunkYOEVEUFZ_cjs.Il(a,l.value):null;m&&(o.textContent=m.name.length>0?m.name:HA(r,i),s(r.id,m.name));};l.addEventListener("keydown",u=>{u.key==="Enter"?d(true):u.key==="Escape"&&d(false);}),l.addEventListener("blur",()=>d(true));}function OA(e,t){return e.name&&e.name.trim().length>0?e.name.trim():HA(e,t)}function HA(e,t){return chunkYOEVEUFZ_cjs.e(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function aD(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}function FA(e){let t=null,n=()=>{t?.close(),t=null;},o=()=>{let r=e.store.get();return r.slides[r.currentSlide]};return {open(){n(),t=RA(e.doc,e.root(),e.t,{elements:o()?.elements??[],selectedIds:e.store.get().selectedElementIds,subscribe:r=>{let i=o()?.elements??[],s=e.store.get().selectedElementIds;return e.store.subscribe(a=>{let l=a.slides[a.currentSlide]?.elements??[],p=a.selectedElementIds;l===i&&aD(p,s)||(i=l,s=p,r({elements:i,selectedIds:s}));})},onClose:()=>{t=null;},onSelect:r=>e.editor.selectElements([r]),onToggleHidden:r=>e.editor.applyElementPatch(r,{hidden:!o()?.elements.find(i=>i.id===r)?.hidden}),onRename:(r,i)=>e.editor.applyElementPatch(r,{name:i}),onReorder:(r,i)=>{let s=e.store.get(),a=s.slides[s.currentSlide];if(!a||r===i)return;let l=[...a.elements],[p]=l.splice(r,1);l.splice(i,0,p),e.editor.commitSlides(s.slides.map((d,u)=>u===s.currentSlide?{...d,elements:l}:d));}});},close:n}}var Ep=Symbol("pptxv-comments-panel-dispose");function VA(e,t,n,o,r){let i=t.querySelector("[data-pptx-comments-panel]");i?.[Ep]?.(),i?.remove();let s=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-workspace-pane");s.dataset.pptxCommentsPanel="true";let a=chunkQPYQDJ2Q_cjs.w(e,"header"),l=chunkQPYQDJ2Q_cjs.w(e,"h2");l.textContent=n("pptx.toolbar.comments");let p=chunkQPYQDJ2Q_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.common.close")),a.append(l,p),s.appendChild(a);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-workspace-list"),u=Fr(e,n,r,o.getAuthors),m=chunkQPYQDJ2Q_cjs.w(e,"p");m.textContent=n("pptx.comments.noneOnSlide"),d.append(u.el,m);let g=()=>{let C=o.getComments();m.hidden=C.length>0,u.update(C,true);},x=chunkQPYQDJ2Q_cjs.w(e,"textarea");x.placeholder=n("pptx.comments.addPlaceholder");let b=[],v=no({doc:e,t:n,field:x,getAuthors:o.getAuthors,getMentions:()=>b,onChange:C=>{x.value=C.text,b=C.mentions;}}),f=chunkQPYQDJ2Q_cjs.w(e,"button");f.type="button",f.textContent=n("pptx.comments.addComment"),f.addEventListener("click",()=>{r.addComment(x.value,void 0,b)&&(x.value="",b=[]);}),d.append(x,v.el,f),s.appendChild(d);let S=o.getComments(),y=()=>{h(),v.destroy(),delete s[Ep];},h=o.subscribe(()=>{if(!s.isConnected){y();return}let C=o.getComments();C!==S&&(S=C,g());});s[Ep]=y,p.addEventListener("click",()=>{y(),s.remove();}),g(),t.appendChild(s);}function BA(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunkQPYQDJ2Q_cjs.w(e,"header"),s=chunkQPYQDJ2Q_cjs.w(e,"div"),a=chunkQPYQDJ2Q_cjs.w(e,"h2");a.textContent=n("pptx.compare.title");let l=chunkQPYQDJ2Q_cjs.w(e,"p");l.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.compare.close")),i.append(s,p),r.appendChild(i);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compare-actions"),u=chunkQPYQDJ2Q_cjs.w(e,"button");u.type="button",u.textContent=n("pptx.compare.acceptAll"),u.addEventListener("click",()=>{o.onAcceptAll(),r.remove();}),d.appendChild(u),r.appendChild(d);let m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-compare-list"),g=o.result.diffs.filter(x=>x.status!=="unchanged");if(g.length===0){let x=chunkQPYQDJ2Q_cjs.w(e,"p");x.textContent=n("pptx.compare.noDifferences"),m.appendChild(x);}for(let x of g)m.appendChild(sD(e,n,x,o.onAccept));r.appendChild(m),t.appendChild(r),p.addEventListener("click",()=>r.remove());}function sD(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"article","pptxv-compare-row"),i=chunkQPYQDJ2Q_cjs.w(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${lD(n.status)}`)}`;let s=chunkQPYQDJ2Q_cjs.w(e,"p");s.textContent=n.changes.map(d=>d.description).join("; ")||i.textContent;let a=chunkQPYQDJ2Q_cjs.w(e,"div"),l=chunkQPYQDJ2Q_cjs.w(e,"button");l.type="button",l.textContent=t("pptx.compare.reject");let p=chunkQPYQDJ2Q_cjs.w(e,"button");return p.type="button",p.textContent=t("pptx.compare.accept"),l.addEventListener("click",()=>{r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),p.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),a.append(l,p),r.append(i,s,a),r}function lD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function zA(e,t,n){let{shows:o,slides:r,onSave:i,onSetActive:s,onRun:a}=n,l=we(e,t,t("pptx.customShows.title")),p=structuredClone(o),d=n.activeShowId,u=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-custom-shows-active"),m=chunkQPYQDJ2Q_cjs.w(e,"span");m.textContent=t("pptx.customShows.selectCustomShow");let g=e.createElement("select");g.setAttribute("aria-label",t("pptx.customShows.selectCustomShow")),g.addEventListener("change",()=>{d=g.value||null,s(d);}),u.append(m,g),l.body.appendChild(u);let x=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-custom-shows");l.body.appendChild(x);let b=()=>{g.replaceChildren();let f=e.createElement("option");f.value="",f.textContent=t("pptx.customShows.allSlides"),g.appendChild(f);for(let S of p){let y=e.createElement("option");y.value=S.id,y.textContent=S.name,g.appendChild(y);}g.value=p.some(({id:S})=>S===d)?d??"":"";},v=()=>{x.replaceChildren(),p.forEach(f=>{let S=chunkQPYQDJ2Q_cjs.w(e,"article"),y=chunkQPYQDJ2Q_cjs.w(e,"input");y.value=f.name,y.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),y.addEventListener("change",()=>{f.name=y.value.trim()||f.name,b();});let h=chunkQPYQDJ2Q_cjs.w(e,"span");h.textContent=`${f.slideRIds.length}/${r.length}`;let C=chunkQPYQDJ2Q_cjs.w(e,"button");C.type="button",C.textContent=t("pptx.slideShow.fromBeginning"),C.addEventListener("click",()=>{d=f.id,s(f.id),a(f),l.close();});let w=chunkQPYQDJ2Q_cjs.w(e,"button");w.type="button",w.textContent=t("pptx.customShows.delete"),w.addEventListener("click",()=>{p=p.filter(({id:P})=>P!==f.id),d===f.id&&(d=null,s(null)),v(),b();});let A=chunkQPYQDJ2Q_cjs.w(e,"div");r.forEach(P=>{let k=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-check"),T=e.createElement("input");T.type="checkbox",T.checked=f.slideRIds.includes(P.rId),T.addEventListener("change",()=>{f.slideRIds=T.checked?[...f.slideRIds,P.rId]:f.slideRIds.filter(E=>E!==P.rId),h.textContent=`${f.slideRIds.length}/${r.length}`;}),k.append(T,e.createTextNode(`${t("pptx.rehearse.slide")} ${P.slideNumber}`)),A.appendChild(k);}),S.append(y,h,C,w,A),x.appendChild(S);});};ae(e,l.footer,t("pptx.customShows.createNew"),()=>{p.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:r.map(({rId:f})=>f)}),v(),b();}),ae(e,l.footer,t("pptx.common.cancel"),l.close),ae(e,l.footer,t("pptx.common.ok"),()=>{i(p),s(p.some(({id:f})=>f===d)?d:null),l.close();},true),v(),b();}function NA(e,t,n){let o=we(e,t,t("pptx.headerFooter.title")),r=chunkYOEVEUFZ_cjs.go(n.value),i=qe(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),s=qe(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),a=qe(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),l=chunkQPYQDJ2Q_cjs.w(e,"input");l.type="text",l.value=r.footerText??"",l.placeholder=t("pptx.headerFooter.footerPlaceholder"),l.hidden=!a.checked,o.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=!a.checked;});let p=d=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:s.checked,hasFooter:a.checked,footerText:l.value},d),o.close();};ae(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>p("all")),ae(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>p("current"),true);}function _A(e,t,n,o,r){let i=we(e,t,t("pptx.print.title")),s=(b,v)=>{let f=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-select"),S=chunkQPYQDJ2Q_cjs.w(e,"span");S.textContent=b;let y=e.createElement("select");for(let[h,C]of v){let w=e.createElement("option");w.value=h,w.textContent=C,y.appendChild(w);}return f.append(S,y),i.body.appendChild(f),y},a=s(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-parity-range");l.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let d=e.createElement("input");d.type="number",d.min="1",d.max=String(n),d.value=String(n),l.append(p,e.createTextNode(t("pptx.slideShow.to")),d),i.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=a.value!=="custom";});let u=s(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]);r?.printWhat&&(u.value=r.printWhat);let m=s(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),g=s(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["blackAndWhite",t("pptx.print.blackAndWhite")]]);r?.colorMode&&(g.value=r.colorMode);let x=qe(e,i.body,t("pptx.print.frameSlides"),r?.frameSlides??false);ae(e,i.footer,t("pptx.common.cancel"),i.close),ae(e,i.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(d.value),printWhat:u.value,orientation:m.value,colorMode:g.value,frameSlides:x.checked,scaleToFit:r?.scaleToFit??true}),i.close();},true);}var pD=24;function GA(e,t,n,o){let r=o.slides.length;if(t.querySelector(`[${chunkYOEVEUFZ_cjs.el}]`)?.remove(),r===0)return null;let i=chunkYOEVEUFZ_cjs.hl(o.initialSlideIndex,r),s={width:0,height:0},a=false,l=chunkYOEVEUFZ_cjs.cl(),p=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-reading-view");p.setAttribute(chunkYOEVEUFZ_cjs.el,"true"),p.setAttribute("role","region"),p.setAttribute("aria-label",n("pptx.view.readingView")),p.tabIndex=-1;let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-reading-view-viewport"),u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-reading-view-bar"),m=H(e,{label:n("pptx.common.previous"),icon:"chevron-left",className:"pptxv-reading-view-btn",onClick:()=>f({command:"previous"})}),g=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-reading-view-counter");g.setAttribute(chunkYOEVEUFZ_cjs.fl,"true");let x=H(e,{label:n("pptx.common.next"),icon:"chevron-right",className:"pptxv-reading-view-btn",onClick:()=>f({command:"next"})}),b=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-reading-view-btn",onClick:()=>f({command:"exit"})});u.append(m.btn,g,x.btn,b.btn),p.append(d,u);let v=()=>{let P=o.slides[i.slideIndex];g.textContent=chunkYOEVEUFZ_cjs.Nk(i.slideIndex,r),m.setDisabled(!chunkYOEVEUFZ_cjs.kl(i)),x.setDisabled(!chunkYOEVEUFZ_cjs.ll(i,r));let k=Math.max(o.canvasSize.width,1),T=Math.max(o.canvasSize.height,1),E=chunkYOEVEUFZ_cjs.ml(o.canvasSize,s,pD),L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-reading-view-stage",{width:`${k*E}px`,height:`${T*E}px`});L.setAttribute(chunkYOEVEUFZ_cjs.gl,"true"),L.setAttribute("aria-roledescription","slide"),P&&E>0&&L.appendChild(o.renderStage(P,E)),d.replaceChildren(L);},f=P=>{let k=i,T=chunkYOEVEUFZ_cjs.jl(k,P,r);if(k.open&&!T.open){w(),o.onExit(k.slideIndex);return}i=T,v();},S=P=>{let{command:k,swallow:T,preventDefault:E}=chunkYOEVEUFZ_cjs.il(P,l);T&&P.stopPropagation(),E&&P.preventDefault(),k.command!=="none"&&f(k);},y=()=>{let P=d.getBoundingClientRect();(P.width!==s.width||P.height!==s.height)&&(s={width:P.width,height:P.height},v());},h=e.defaultView?.ResizeObserver,C=h?new h(()=>y()):null;function w(){a||(a=true,e.removeEventListener("keydown",S,true),C?.disconnect(),p.remove());}e.addEventListener("keydown",S,true),t.appendChild(p);let A=d.getBoundingClientRect();return s={width:A.width,height:A.height},v(),C?.observe(d),p.focus(),{el:p,close:w}}function UA(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunkQPYQDJ2Q_cjs.w(e,"span"),s=chunkQPYQDJ2Q_cjs.w(e,"strong"),a=chunkQPYQDJ2Q_cjs.w(e,"span"),l={},p=performance.now(),d=p,u=0,m=0,g=false,x=h=>new Date(Math.max(0,h)).toISOString().slice(14,19),b=(h,C)=>{let w=chunkQPYQDJ2Q_cjs.w(e,"button");return w.type="button",w.textContent=h,w.addEventListener("click",C),r.appendChild(w),w},v=b(n("pptx.rehearse.pause"),()=>{if(g=!g,g)u=performance.now();else {let h=performance.now()-u;m+=h,p+=h,d+=h;}v.textContent=n(g?"pptx.rehearse.resume":"pptx.rehearse.pause");}),f=()=>{l[o.currentSlide()]=Math.max(250,performance.now()-p-m),m=0;};b(n("pptx.presenter.next"),()=>{if(g)return;f();let h=o.currentSlide()+1;h<o.slideCount&&(o.navigate(h),p=performance.now());}),b(n("pptx.rehearse.saveTimings"),()=>{f(),o.onSave(l),r.remove();}),b(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,s,a);let S=window.setInterval(()=>{if(g)return;let h=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,s.textContent=`${n("pptx.rehearse.slideTime")}: ${x(h-p)}`,a.textContent=`${n("pptx.rehearse.totalTime")}: ${x(h-d)}`;},250),y=new MutationObserver(()=>{r.isConnected||(clearInterval(S),y.disconnect());});y.observe(t,{childList:true}),t.appendChild(r);}var dD=(e,t,n)=>{chunkYOEVEUFZ_cjs.kt(new Blob([t],{type:n}),e);};function KA(e){let{doc:t,t:n}=e,o=e.store??chunkQPYQDJ2Q_cjs.a(),r=chunkQPYQDJ2Q_cjs.w(t,"section","pptxv-ai-settings"),i=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-ai-settings-intro"),s=chunkQPYQDJ2Q_cjs.w(t,"div"),a=chunkQPYQDJ2Q_cjs.w(t,"p");a.textContent=n("pptx.ai.settingsSectionTitle");let l=chunkQPYQDJ2Q_cjs.w(t,"p","pptxv-ai-settings-count");l.textContent=n("pptx.ai.exportLogsHint"),s.append(a,l),i.append(chunkQPYQDJ2Q_cjs.K(t,"bug"),s);let p=chunkQPYQDJ2Q_cjs.w(t,"p","pptxv-ai-settings-count");p.textContent=n("pptx.ai.exportLogsCounting");let d=chunkQPYQDJ2Q_cjs.w(t,"label","pptxv-ai-settings-detailed"),u=chunkQPYQDJ2Q_cjs.w(t,"input");u.type="checkbox",u.checked=true,d.append(u,t.createTextNode(n("pptx.ai.exportLogsDetailed")));let m=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-ai-settings-actions"),g=chunkQPYQDJ2Q_cjs.w(t,"p","pptxv-ai-settings-status");g.setAttribute("role","status"),g.hidden=true;let x=(v,f)=>{let S=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-ai-settings-btn");return S.type="button",S.append(chunkQPYQDJ2Q_cjs.K(t,"download"),t.createTextNode(n(v))),S.addEventListener("click",()=>{b(f);}),S},b=async(v,f)=>{let S=m.querySelectorAll("button");for(let y of S)y.disabled=true;try{let y=await chunkQPYQDJ2Q_cjs.g(o),h=chunkQPYQDJ2Q_cjs.h(y,{format:v,detailed:u.checked},dD);g.hidden=!1,g.textContent=h>0?n("pptx.ai.exportLogsDone",{count:h}):n("pptx.ai.noChatsToExport");}finally{for(let y of S)y.disabled=false;}};return m.append(x("pptx.ai.exportLogsJson","json"),x("pptx.ai.exportLogsMarkdown","markdown")),r.append(i,p,d,m,g),(async()=>{let v=0;try{v=(await o.listChats()).length;}catch{v=0;}p.textContent=n("pptx.ai.exportLogsStoredCount",{count:v});})(),r}function ui(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-options-row-label");if(o.appendChild(e.createTextNode(t(n.labelKey))),n.infoKey){let r=chunkQPYQDJ2Q_cjs.w(e,"i","pptxv-options-info");r.textContent="i",r.title=t(n.infoKey),r.setAttribute("aria-label",t(n.infoKey)),o.appendChild(r);}return o}function xi(e,t,n){return n.readOnly!==true?false:(e.toggleAttribute("disabled",true),e.title=t("pptx.options.lockedByHost"),true)}function gi(e){return `pptxv-options-row${e.indent?" is-indent":""}`}function cD(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"label",gi(o)),s=e.createElement("pptx-ui-checkbox");s.setAttribute("aria-label",t(o.labelKey)),s.checked=r.getValue(o.group,o.key)===true;let a=xi(s,t,o);s.addEventListener("change",()=>{a||r.setValue(o.group,o.key,s.checked);}),i.append(ui(e,t,o),s),n.appendChild(i);}function mD(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div",gi(o)),s=e.createElement("pptx-ui-select");s.setAttribute("aria-label",t(o.labelKey));for(let p of o.choices){let d=e.createElement("option");d.value=p.value,d.textContent=t(p.labelKey),s.appendChild(d);}let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=xi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(ui(e,t,o),s),n.appendChild(i);}function uD(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div",gi(o)),s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-options-number"),a=e.createElement("input");a.type="number",a.min=String(o.min),a.max=String(o.max),a.step=String(o.step??1),a.setAttribute("aria-label",t(o.labelKey));let l=r.getValue(o.group,o.key);a.value=String(typeof l=="number"?l:o.min);let p=xi(a,t,o);if(a.addEventListener("change",()=>{if(p)return;let d=chunkYOEVEUFZ_cjs.Dq(a.value,o.min,o.max);d!==void 0&&(a.value=String(d),r.setValue(o.group,o.key,d));}),s.appendChild(a),o.unitKey){let d=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-options-unit");d.textContent=t(o.unitKey),s.appendChild(d);}i.append(ui(e,t,o),s),n.appendChild(i);}function xD(e,t,n,o,r){let i=chunkQPYQDJ2Q_cjs.w(e,"div",gi(o)),s=e.createElement("input");s.type="text",s.setAttribute("aria-label",t(o.labelKey)),o.maxLength!==void 0&&(s.maxLength=o.maxLength);let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=xi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(ui(e,t,o),s),n.appendChild(i);}function gD(e,t,n,o,r){o.kind==="toggle"?cD(e,t,n,o,r):o.kind==="select"?mD(e,t,n,o,r):o.kind==="number"?uD(e,t,n,o,r):xD(e,t,n,o,r);}function WA(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-options-section"),a=chunkQPYQDJ2Q_cjs.w(e,"h3");if(a.textContent=t(o.titleKey),s.appendChild(a),o.descriptionKey){let l=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");l.textContent=t(o.descriptionKey),s.appendChild(l);}for(let l of o.controls)gD(e,t,s,l,r);o.special&&i&&i(o,s),n.appendChild(s);}function Xe(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-options-action");return r.type="button",r.textContent=n,r.addEventListener("click",o),t.appendChild(r),r}function qA(){return {selectedId:null}}function $A(e,t,n,o,r,i,s){let a=chunkQPYQDJ2Q_cjs.w(e,"h4");if(a.textContent=o,n.appendChild(a),r.length===0){let d=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-addins-empty");d.textContent=t("pptx.options.addIns.description"),n.appendChild(d);return}let l=e.createElement("table"),p=e.createElement("tbody");for(let d of r){let u=e.createElement("tr");u.className=i.selectedId===d.id?"is-selected":"";let m=e.createElement("td");m.textContent=t(d.nameKey);let g=e.createElement("td");g.textContent=d.location;let x=e.createElement("td");x.textContent=t(`pptx.options.addInType.${d.type}`),u.append(m,g,x),u.addEventListener("click",()=>{i.selectedId=d.id,s();}),p.appendChild(u);}l.appendChild(p),n.appendChild(l);}function jA(e,t,n,o,r,i){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-addins"),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-addins-head");for(let d of ["name","location","type"]){let u=chunkQPYQDJ2Q_cjs.w(e,"span");u.textContent=t(`pptx.options.addIns.${d}`),a.appendChild(u);}s.appendChild(a);let l=chunkYOEVEUFZ_cjs.lq(o);$A(e,t,s,t("pptx.options.addIns.active"),l.filter(d=>d.active),r,i),$A(e,t,s,t("pptx.options.addIns.inactive"),l.filter(d=>!d.active),r,i);let p=l.find(d=>d.id===r.selectedId);if(p){let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-addins-detail"),u=chunkQPYQDJ2Q_cjs.w(e,"p");u.textContent=t(p.nameKey);let m=chunkQPYQDJ2Q_cjs.w(e,"p");m.textContent=t(p.descriptionKey);let g=chunkQPYQDJ2Q_cjs.w(e,"p");g.textContent=p.location,d.append(u,m,g),s.appendChild(d);}n.appendChild(s);}function XA(){return {selectedAvailable:null,selectedCurrent:null}}function YA(e,t,n,o,r,i,s){let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-qa-col"),l=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-qa-title");l.textContent=o;let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-qa-list");p.setAttribute("role","listbox"),p.setAttribute("aria-label",o);for(let d of r){let u=chunkYOEVEUFZ_cjs.fq.find(g=>g.id===d);if(!u)continue;let m=chunkQPYQDJ2Q_cjs.w(e,"button",i===d?"is-selected":"");m.type="button",m.setAttribute("role","option"),m.setAttribute("aria-selected",String(i===d)),m.textContent=t(u.labelKey),m.addEventListener("click",()=>s(d)),p.appendChild(m);}a.append(l,p),n.appendChild(a);}function QA(e,t,n,o,r,i){let s=o.getOptions().quickAccess.commandIds,a=chunkYOEVEUFZ_cjs.hq(s).map(b=>b.id),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-qa");YA(e,t,l,t("pptx.options.quickAccess.chooseCommands"),a,r.selectedAvailable,b=>{r.selectedAvailable=b,i();});let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-qa-arrows"),d=Xe(e,p,`${t("pptx.options.quickAccess.add")} \xBB`,()=>{r.selectedAvailable&&(o.setQuickAccessCommands(chunkYOEVEUFZ_cjs.iq(s,r.selectedAvailable)),r.selectedAvailable=null);});d.disabled=!r.selectedAvailable;let u=Xe(e,p,`\xAB ${t("pptx.options.quickAccess.remove")}`,()=>{r.selectedCurrent&&(o.setQuickAccessCommands(chunkYOEVEUFZ_cjs.jq(s,r.selectedCurrent)),r.selectedCurrent=null);});u.disabled=!r.selectedCurrent,l.appendChild(p),YA(e,t,l,t("pptx.options.quickAccess.currentCommands"),s,r.selectedCurrent,b=>{r.selectedCurrent=b,i();});let m=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-qa-arrows"),g=Xe(e,m,"\u2191",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunkYOEVEUFZ_cjs.kq(s,r.selectedCurrent,"up"));});g.setAttribute("aria-label",t("pptx.options.quickAccess.moveUp")),g.disabled=!r.selectedCurrent;let x=Xe(e,m,"\u2193",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunkYOEVEUFZ_cjs.kq(s,r.selectedCurrent,"down"));});x.setAttribute("aria-label",t("pptx.options.quickAccess.moveDown")),x.disabled=!r.selectedCurrent,l.appendChild(m),n.appendChild(l),Xe(e,n,t("pptx.options.quickAccess.reset"),()=>{o.setQuickAccessCommands([...chunkYOEVEUFZ_cjs.gq]);});}function ZA(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-options-section"),i=chunkQPYQDJ2Q_cjs.w(e,"h3");i.textContent=t("pptx.options.ribbon.tabsTitle");let s=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");s.textContent=t("pptx.options.ribbon.tabsDescription"),r.append(i,s);let a=new Set(o.getOptions().ribbon.hiddenTabIds),l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-ribbon-list");for(let p of chunkYOEVEUFZ_cjs.bq){let d=p.id==="file",u=chunkQPYQDJ2Q_cjs.w(e,"label",`pptxv-parity-check${d?" is-locked":""}`),m=e.createElement("input");m.type="checkbox",m.checked=d||!a.has(p.id),m.disabled=d,m.addEventListener("change",()=>{o.setRibbonTabHidden(p.id,!m.checked);}),u.append(m,e.createTextNode(t(p.labelKey))),l.appendChild(u);}r.appendChild(l),Xe(e,r,t("pptx.options.ribbon.reset"),()=>{o.reset("ribbon");}),n.appendChild(r),Tp(e,t,n);}function Tp(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-options-section"),r=chunkQPYQDJ2Q_cjs.w(e,"h3");r.textContent=t("pptx.settings.keyboardShortcuts"),o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-shortcut-list");for(let{actionKey:s,shortcut:a}of chunkYOEVEUFZ_cjs.zp){let l=chunkQPYQDJ2Q_cjs.w(e,"div"),p=chunkQPYQDJ2Q_cjs.w(e,"span");p.textContent=t(s);let d=chunkQPYQDJ2Q_cjs.w(e,"kbd");d.textContent=a,l.append(p,d),i.appendChild(l);}o.appendChild(i),n.appendChild(o);}function JA(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"input","pptxv-visually-hidden");r.type="file",r.accept=chunkYOEVEUFZ_cjs.so,r.hidden=true;let i=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-options-action");i.type="button",i.textContent=t("pptx.options.general.addFontFile"),i.disabled=!o.enabled,i.addEventListener("click",()=>r.click());let s=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");if(s.setAttribute("role","alert"),s.hidden=true,s.textContent=t("pptx.options.general.customFontError"),r.addEventListener("change",()=>{let p=r.files?.[0];r.value="",p&&(s.hidden=true,chunkYOEVEUFZ_cjs.to(p).then(d=>{d?(o.onRegistered(d.family),o.onRefresh()):s.hidden=false;}).catch(()=>{s.hidden=false;}));}),n.append(i,r,s),!o.enabled){let p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsDisabled"),n.appendChild(p);}let a=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");if(a.textContent=t("pptx.options.general.customFontsAdded"),n.appendChild(a),o.families.length===0){let p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsEmpty"),n.appendChild(p);return}let l=chunkQPYQDJ2Q_cjs.w(e,"ul","pptxv-options-font-list");for(let p of o.families){let d=chunkQPYQDJ2Q_cjs.w(e,"li");d.textContent=p,d.style.fontFamily=p,l.appendChild(d);}n.appendChild(l);}function ek(e,t,n){let{store:o}=n,r=we(e,t,t("pptx.options.title"));r.dialog.classList.add("pptxv-options-dialog");let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-body"),s=chunkQPYQDJ2Q_cjs.w(e,"nav","pptxv-options-nav");s.setAttribute("aria-label",t("pptx.options.title"));let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-options-pane");i.append(s,a),r.body.appendChild(i);let l=chunkYOEVEUFZ_cjs.nq(o.getOptions()),p=n.customization??chunkYOEVEUFZ_cjs.Zq,d=chunkYOEVEUFZ_cjs.gr(chunkYOEVEUFZ_cjs.Eq,p),u=n.aiEnabled===true&&chunkYOEVEUFZ_cjs.fr(p,"ai"),m=n.initialTab??"general",g=false,x=null,b=n.themeOptions.currentKey,v=n.localeOptions.currentCode,f=XA(),S=qA(),y=(I,R)=>{if(I.special==="themePicker")pE(e,R,n.themeOptions.catalog.map(O=>({key:O.key,label:t(O.labelKey),previewColor:O.theme?.colors?.primary??"#6b7280"})),b,O=>{let B=n.themeOptions.catalog.find(F=>F.key===O);B&&(b=O,n.themeOptions.onSelect(B.theme,O),A());});else if(I.special==="clearCache"){let O=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.save.clearCacheDescription"),R.appendChild(O),Xe(e,R,t("pptx.options.save.clearCacheNow"),n.onClearCache);}else I.special==="customFonts"?JA(e,t,R,{enabled:n.store.getOptions().general.enableCustomFontUpload,families:n.customFonts?.list()??[],onRegistered:O=>n.customFonts?.register(O),onRefresh:A}):I.special==="shortcutReference"&&Tp(e,t,R);},h=()=>{let I=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-options-section"),R=chunkQPYQDJ2Q_cjs.w(e,"h3");R.textContent=t("pptx.options.language.displayLanguage");let O=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.language.displayLanguageDescription"),I.append(R,O),Br(e,I,"pptxv-options-locale",n.localeOptions.catalog.map(B=>({value:B.code,label:B.nativeLabel})),v,B=>{v=B,n.localeOptions.onSelect(B),D();}),a.appendChild(I);},C=I=>{for(let R of I.sections)WA(e,t,a,R,o,y);},w=()=>{for(let R of s.querySelectorAll("button"))R.classList.remove("is-active"),R.setAttribute("aria-current","false");x?.classList.add("is-active"),x?.setAttribute("aria-current","true"),a.replaceChildren();let I=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-headline");I.textContent=t("pptx.ai.exportLogsHint"),a.append(I,KA({doc:e,t,store:n.aiChatStore}));};function A(){if(g){w();return}let I=d.find(O=>O.id===m)??d[0];if(!I)return;for(let O of s.querySelectorAll("button")){let B=O.getAttribute("data-tab")===I.id;O.classList.toggle("is-active",B),O.setAttribute("aria-current",String(B));}a.replaceChildren();let R=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-options-headline");R.textContent=t(I.descriptionKey),a.appendChild(R),I.custom==="language"?h():I.custom==="ribbon"?ZA(e,t,a,o):I.custom==="addIns"?jA(e,t,a,n.addinStatus,S,A):(C(I),I.custom==="quickAccess"&&QA(e,t,a,o,f,A));}let P=I=>{m=I,g=false,A();},k=()=>{s.replaceChildren(),s.setAttribute("aria-label",t("pptx.options.title"));for(let I of d){let R=ae(e,s,t(I.labelKey),()=>P(I.id));R.dataset.tab=I.id;}x=null,u&&(x=ae(e,s,t("pptx.ai.settingsSectionTitle"),()=>{g=true,A();}),x.dataset.tab="ai");},T=o.subscribe(()=>{if(!r.dialog.isConnected){T();return}A();}),E=ae(e,r.footer,t("pptx.options.resetAll"),()=>{o.reset();}),L=ae(e,r.footer,t("pptx.common.cancel"),()=>{o.setOptions(l),r.close(),T();}),M=ae(e,r.footer,t("pptx.common.ok"),()=>{r.close(),T();},true);function D(){r.heading.textContent=t("pptx.options.title"),k(),E.textContent=t("pptx.options.resetAll"),L.textContent=t("pptx.common.cancel"),M.textContent=t("pptx.common.ok"),A();}D();}function tk(e,t,n,o,r,i=[]){let s=we(e,t,t("pptx.slideShow.setUpTitle")),a={...n},l=S=>{let y=chunkQPYQDJ2Q_cjs.w(e,"fieldset"),h=chunkQPYQDJ2Q_cjs.w(e,"legend");return h.textContent=S,y.appendChild(h),s.body.appendChild(y),y},p=l(t("pptx.slideShow.showType"));for(let[S,y]of [["presented","pptx.slideShow.presentedBySpeaker"],["browsed","pptx.slideShow.browsedByIndividual"],["kiosk","pptx.slideShow.browsedAtKiosk"]]){let h=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-check"),C=e.createElement("input");C.type="radio",C.name="showType",C.checked=(a.showType??"presented")===S,C.addEventListener("change",()=>{a.showType=S,S==="kiosk"&&(a.loopContinuously=true);}),h.append(C,e.createTextNode(t(y))),p.appendChild(h);}let d=l(t("pptx.slideShow.showSlides")),u=qe(e,d,t("pptx.slideShow.allSlides"),(a.showSlidesMode??"all")==="all");u.type="radio",u.name="range",u.addEventListener("change",()=>{a.showSlidesMode="all";});let m=e.createElement("input");m.type="number",m.min="1",m.max=String(o),m.value=String(a.showSlidesFrom??1);let g=e.createElement("input");g.type="number",g.min="1",g.max=String(o),g.value=String(a.showSlidesTo??o);let x=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-range"),b=e.createElement("input");if(b.type="radio",b.name="range",b.checked=a.showSlidesMode==="range",x.append(b,e.createTextNode(t("pptx.slideShow.from")),m,e.createTextNode(t("pptx.slideShow.to")),g),d.appendChild(x),b.addEventListener("change",()=>{a.showSlidesMode="range";}),i.length>0){let S=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-parity-range"),y=e.createElement("input");y.type="radio",y.name="range",y.dataset.pptxShowSlidesCustom="true",y.checked=a.showSlidesMode==="customShow";let h=e.createElement("select");h.setAttribute("aria-label",t("pptx.slideShow.customShow"));for(let w of i){let A=e.createElement("option");A.value=w.id,A.textContent=w.name,h.appendChild(A);}h.value=a.showSlidesCustomShowId??i[0].id;let C=()=>{a.showSlidesMode="customShow",a.showSlidesCustomShowId=h.value;};y.addEventListener("change",C),h.addEventListener("change",()=>{y.checked&&C();}),S.append(y,e.createTextNode(t("pptx.slideShow.customShow")),h),d.appendChild(S);}let v=l(t("pptx.slideShow.advanceSlides"));for(let[S,y]of [["manual","pptx.slideShow.manually"],["useTimings","pptx.slideShow.useTimings"]]){let h=qe(e,v,t(y),(a.advanceMode??"useTimings")===S);h.type="radio",h.name="advance",h.addEventListener("change",()=>{a.advanceMode=S;});}let f=l(t("pptx.slideShow.showOptions"));for(let[S,y,h]of [["loopContinuously","pptx.slideShow.loopContinuously",false],["showWithNarration","pptx.slideShow.showWithoutNarration",true],["showWithAnimation","pptx.slideShow.showWithoutAnimation",true],["showSubtitles","pptx.slideShow.showSubtitles",false]]){let C=qe(e,f,t(y),h?a[S]===false:!!a[S]);C.addEventListener("change",()=>{a[S]=h?!C.checked:C.checked;});}ae(e,s.footer,t("pptx.common.cancel"),s.close),ae(e,s.footer,t("pptx.common.ok"),()=>{a.showSlidesFrom=Number(m.value),a.showSlidesTo=Number(g.value),r(a),s.close();},true);}function ok(e,t,n,o){t.querySelector("[data-pptx-slide-sorter]")?.remove();let r=chunkQPYQDJ2Q_cjs.w(e,"section","pptxv-slide-sorter");r.dataset.pptxSlideSorter="true",r.setAttribute("role","dialog");let i=chunkQPYQDJ2Q_cjs.w(e,"header"),s=chunkQPYQDJ2Q_cjs.w(e,"h2");s.textContent=n("pptx.slideSorter.title");let a=chunkQPYQDJ2Q_cjs.w(e,"span");a.textContent=n("pptx.slideSorter.slideCount",{count:o.slides.length});let l=chunkQPYQDJ2Q_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.slideSorter.close")),i.append(s,a,l),r.appendChild(i);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-sorter-grid");o.slides.forEach((m,g)=>{let x=chunkQPYQDJ2Q_cjs.w(e,"article","pptxv-sorter-card");x.draggable=true,x.classList.toggle("is-current",g===o.current),x.classList.toggle("is-hidden",!!m.hidden);let b=chunkQPYQDJ2Q_cjs.w(e,"button");b.type="button";let v=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-sorter-num");v.textContent=String(g+1),b.appendChild(v),b.setAttribute("aria-label",n("pptx.compare.slideNumber",{number:g+1}));let f=chunkYOEVEUFZ_cjs.Rp(m.hidden,"sorter",g);if(f.marker&&f.labelId){x.setAttribute(chunkYOEVEUFZ_cjs.Np,f.marker),b.setAttribute("aria-describedby",f.labelId);let y=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-sorter-hidden");y.id=f.labelId,y.textContent=n(chunkYOEVEUFZ_cjs.Op),b.appendChild(y);}b.addEventListener("click",()=>{o.onSelect(g),r.remove();});let S=chunkQPYQDJ2Q_cjs.w(e,"div");for(let[y,h]of [[n("pptx.slideSorter.contextMenu.duplicate"),()=>o.onDuplicate(g)],[n(m.hidden?"pptx.slideSorter.contextMenu.showSlides":"pptx.slideSorter.contextMenu.hideSlides"),()=>o.onToggleHidden(g)],[n("pptx.slideSorter.contextMenu.delete"),()=>o.onDelete(g)]]){let C=chunkQPYQDJ2Q_cjs.w(e,"button");C.type="button",C.textContent=y,C.addEventListener("click",h),S.appendChild(C);}x.addEventListener("dragstart",y=>y.dataTransfer?.setData("text/plain",String(g))),x.addEventListener("dragover",y=>y.preventDefault()),x.addEventListener("drop",y=>{y.preventDefault();let h=Number(y.dataTransfer?.getData("text/plain"));Number.isInteger(h)&&o.onReorder(h,g);}),x.append(b,S),p.appendChild(x);}),r.appendChild(p);let d=()=>{e.removeEventListener("keydown",u),r.remove();},u=m=>{if(!r.isConnected){e.removeEventListener("keydown",u);return}let{action:g}=chunkYOEVEUFZ_cjs.Dl(m,{canEdit:o.canEdit!==false,isTextInputTarget:chunkYOEVEUFZ_cjs.zl(m.target)});if(g==="close"){m.stopPropagation(),d();return}if(g==="delete"){m.preventDefault(),o.onDelete(o.current);return}g==="duplicate"&&(m.preventDefault(),o.onDuplicate(o.current));};e.addEventListener("keydown",u),l.addEventListener("click",d),t.appendChild(r);}function nk(e){let t=()=>e.store.get(),n=null,o=DA(e),r=FA(e);return {openSettings(i="general"){let s=e.getThemeState(),a=e.getLocaleState(),l=i==="shortcuts"?"ribbon":"general";ek(e.doc,(p,d)=>e.t(p,d),{store:e.optionsStore,initialTab:l,aiEnabled:e.aiEnabled,customization:e.getCustomization?.(),addinStatus:e.getAddinStatus(),onClearCache:()=>e.clearOptionsCache(),themeOptions:{catalog:s.catalog,currentKey:s.key,onSelect:p=>e.setTheme(p)},localeOptions:{catalog:a.catalog,currentCode:a.code,onSelect:p=>e.setLocale(p)},customFonts:{list:()=>t().customFontFamilies,register:p=>e.registerCustomFont(p)}});},openSetUpSlideShow(){let i=t();tk(e.doc,e.t,i.presentationProperties,i.slides.length,s=>{e.editor.updatePresentationProperties(s),e.store.set({activeCustomShowId:chunkYOEVEUFZ_cjs.Ip(s,e.store.get().customShows)??null});},i.customShows);},openHeaderFooter(){NA(e.doc,e.t,{value:t().headerFooter,onApply:i=>e.editor.updateHeaderFooter(i)});},openCompare(){bD(e);},openPrintDialog(){_A(e.doc,e.t,t().slides.length,i=>{e.print(i);},chunkYOEVEUFZ_cjs.tq(e.optionsStore.getOptions()));},startRehearsal(){UA(e.doc,e.root(),e.t,{slideCount:t().slides.length,currentSlide:()=>t().currentSlide,navigate:e.goToSlide,onSave:i=>e.editor.commitSlides(chunkYOEVEUFZ_cjs.dd(t().slides,i))});},openSelectionPane(){r.open();},openSlideSorter(){fD(e);},openReadingView(){let i=t();n?.close(),n=GA(e.doc,e.root(),e.t,{slides:i.slides,canvasSize:i.canvasSize,initialSlideIndex:i.currentSlide,renderStage:(s,a)=>e.renderSlideNode(s,a),onExit:s=>{n=null,e.goToSlide(s);}});},closeReadingView(){n?.close(),n=null;},openOutlineView(){o.open();},closeOutlineView(){o.close();},openComments(){VA(e.doc,e.root(),e.t,{getComments:()=>{let i=t();return i.slides[i.currentSlide]?.comments??[]},getAuthors:()=>{let i=t();return Hr(i.modernCommentAuthors,i.commentAuthors)},subscribe:i=>e.store.subscribe(()=>i())},e.editor.getEditActions().comments);},openHyperlink(){let i=t(),s=i.slides[i.currentSlide]?.elements.find(({id:a})=>a===i.selectedElementId);s&&ni(e.doc,e.t,s,a=>e.editor.applyElementPatch(s.id,a));},openCustomShows(){let i=t();zA(e.doc,e.t,{shows:i.customShows,slides:i.slides,activeShowId:i.activeCustomShowId,onSave:s=>e.editor.updateCustomShows(s),onSetActive:s=>e.store.set({activeCustomShowId:s}),onRun:s=>{let a=t().slides.findIndex(({rId:l})=>s.slideRIds.includes(l));a>=0&&e.goToSlide(a),e.enterPresentation();}});}}}async function bD(e){let t=await chunkYOEVEUFZ_cjs.Lj();if(!t)return;let n=await mo(t.buffer,{allowExternalImages:e.optionsStore.getOptions().trust.allowExternalContent});try{let o=chunkYOEVEUFZ_cjs.Vh(e.store.get().slides,n.slides);BA(e.doc,e.root(),e.t,{result:o,onAccept:r=>e.editor.commitSlides(chunkYOEVEUFZ_cjs.Wh(e.store.get().slides,r)),onAcceptAll:()=>e.editor.commitSlides(chunkYOEVEUFZ_cjs.Xh(e.store.get().slides,o))});}finally{mt(n.blobUrls),n.handler.dispose();}}function fD(e){let t=e.store.get();ok(e.doc,e.root(),e.t,{slides:t.slides,current:t.currentSlide,canEdit:t.editable,onSelect:e.goToSlide,onReorder:(n,o)=>vD(e,n,o),onDelete:n=>e.editor.commitSlides(t.slides.filter((o,r)=>r!==n)),onDuplicate:n=>{let o=[...t.slides];o.splice(n+1,0,structuredClone(o[n])),e.editor.commitSlides(o,n+1);},onToggleHidden:n=>e.editor.commitSlides(t.slides.map((o,r)=>r===n?{...o,hidden:!o.hidden}:o))});}function vD(e,t,n){let o=[...e.store.get().slides],[r]=o.splice(t,1);r&&(o.splice(n,0,r),e.editor.commitSlides(o,n));}var hD=2.5,yD=14;function rk(e,t){let n=e.getBoundingClientRect();return {x:Math.min(1,Math.max(0,(t.clientX-n.left)/Math.max(n.width,1))),y:Math.min(1,Math.max(0,(t.clientY-n.top)/Math.max(n.height,1)))}}function ik(e,t){let n=e.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",chunkYOEVEUFZ_cjs.nk(t.points)),n.setAttribute("fill","none"),n.setAttribute("stroke",t.color),n.setAttribute("stroke-width",String(t.width)),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("vector-effect","non-scaling-stroke"),n.setAttribute("opacity",t.tool==="highlighter"?"0.4":"1"),n}function Pp(e){let{stageWrap:t,slideIndex:n,tool:o}=e;if(t.querySelector(".pptxv-presentation-annotations")?.remove(),o==="none")return ()=>{};let r=t.ownerDocument,i=r.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("pptxv-presentation-annotations"),i.setAttribute("viewBox","0 0 100 100"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("aria-label","Presentation annotations"),i.setAttribute("data-pptx-annotation-overlay",""),Object.assign(i.style,{position:"absolute",inset:"0",zIndex:String(chunkYOEVEUFZ_cjs.Qk(e.blackout)),width:"100%",height:"100%",cursor:chunkYOEVEUFZ_cjs.Cr(o),touchAction:"none"});let s=[...e.strokes],a=null,l=null,p=r.createElementNS("http://www.w3.org/2000/svg","circle");p.setAttribute("r","10"),p.setAttribute("fill","#ef4444"),p.setAttribute("vector-effect","non-scaling-stroke"),p.style.filter="drop-shadow(0 0 8px #ef4444)",p.style.display="none";let d=()=>{i.replaceChildren(...s.filter(v=>v.slideIndex===n).map(v=>ik(r,v))),a&&i.append(ik(r,a)),o==="laser"&&i.append(p);},u=v=>{s=v,e.onChange(v),d();},m=v=>{v.preventDefault(),v.stopPropagation();let f=rk(i,v);if(l=v.pointerId,i.setPointerCapture?.(v.pointerId),o==="eraser"){u(chunkYOEVEUFZ_cjs.lk(s,n,f));return}(o==="pen"||o==="highlighter")&&(a={id:`presentation-ink-${crypto.randomUUID()}`,slideIndex:n,tool:o,color:o==="highlighter"&&e.color==="#ef4444"?"#fde047":e.color,width:o==="highlighter"?yD:hD,points:[f]},d());},g=v=>{let f=rk(i,v);if(e.onPointerMove?.(f),o==="laser"){p.setAttribute("cx",String(f.x*100)),p.setAttribute("cy",String(f.y*100)),p.style.display="";return}l===v.pointerId&&(o==="eraser"?u(chunkYOEVEUFZ_cjs.lk(s,n,f)):a&&(a=chunkYOEVEUFZ_cjs.kk(a,f),d()));},x=()=>{l=null,a?.points.length&&a.points.length>1&&u([...s,a]),a=null,d();},b=()=>{p.style.display="none",x();};return i.addEventListener("pointerdown",m),i.addEventListener("pointermove",g),i.addEventListener("pointerup",x),i.addEventListener("pointercancel",x),i.addEventListener("pointerleave",b),t.append(i),d(),()=>i.remove()}function Ap(e,t,n,o){return new Promise(r=>{let i=e.createElement("div");i.className="pptxv-parity-backdrop pptxv-keep-annotations";let s=e.createElement("section");s.className="pptxv-parity-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let a=e.createElement("h2");a.textContent=t("pptx.keepAnnotations.title");let l=e.createElement("div");l.className="pptxv-parity-body",l.textContent=t("pptx.keepAnnotations.description",{count:n,slides:o});let p=e.createElement("footer");p.className="pptxv-parity-footer";let d=e.createElement("button");d.type="button",d.textContent=t("pptx.keepAnnotations.discard");let u=e.createElement("button");u.type="button",u.className="is-primary",u.textContent=t("pptx.keepAnnotations.keep");let m=x=>{e.removeEventListener("keydown",g),i.remove(),r(x);},g=x=>{x.key==="Escape"&&m("discard");};d.addEventListener("click",()=>m("discard")),u.addEventListener("click",()=>m("keep")),e.addEventListener("keydown",g),p.append(d,u),s.append(a,l,p),i.append(s),e.body.append(i),queueMicrotask(()=>u.focus());})}function kp(e){let t=[],n=()=>{},o=null,r=null,i=d=>[String(d.active),String(d.slideIndex),d.pointer?.tool??"none",d.pointer?.color??""].join("|"),s=()=>e.onStrokesChange?.([...t]),a=()=>{n();let d=o,u=d?.pointer?.tool??"none";!d?.active||u==="none"||(n=Pp({stageWrap:d.stageWrap,slideIndex:d.slideIndex,tool:u,color:d.pointer?.color??"#ef4444",blackout:d.blackout,strokes:t,onChange(m){t=m,s();},onPointerMove:e.onPointerMove}));},l=()=>{t=[],s(),a();},p=()=>{let d=e.getSlides(),u=false,m=d.map((g,x)=>{let b=t.filter(v=>v.slideIndex===x&&v.points.length>1).map(v=>chunkYOEVEUFZ_cjs.Lm({points:v.points.map(f=>({x:f.x*(o?.canvasSize.width??960),y:f.y*(o?.canvasSize.height??540)})),color:v.color,width:v.width,tool:v.tool})).filter(v=>v!==null);return b.length===0?g:(u=true,{...g,elements:[...g.elements,...b]})});return u&&e.commitSlides(m),u};return {syncStage(d){let u=i(d),m=d.stageWrap.querySelector(".pptxv-presentation-annotations")===null,g=d.stageWrap!==o?.stageWrap||u!==r;o=d,r=u,(g||m)&&a();let x=d.stageWrap.querySelector(".pptxv-presentation-annotations");x&&(x.style.zIndex=String(chunkYOEVEUFZ_cjs.Qk(d.blackout)));},getStrokes:()=>t,setStrokes(d){t=[...d],s(),a();},hasAnnotations:()=>t.length>0,clear:l,async finishPresentation(){if(t.length===0)return "none";if(e.shouldPromptKeepAnnotations?.()===false)return l(),"discarded";let d=new Set(t.map(m=>m.slideIndex)).size,u=await Ap(e.doc,e.t,t.length,d);return u==="keep"&&p(),l(),u==="keep"?"kept":"discarded"},dispose(){n(),o=null;}}}function ak(e){let t=kp({doc:e.doc,t:e.t,getSlides:()=>e.store.get().slides,commitSlides:n=>e.editor.commitSlides(n),shouldPromptKeepAnnotations:e.shouldPromptKeepAnnotations,onStrokesChange:n=>e.updateSnapshot({inkStrokes:n}),onPointerMove:({x:n,y:o})=>e.updateSnapshot({pointer:{...e.getSnapshot().pointer??{tool:"laser",color:"#ef4444"},x:n,y:o}})});return {sync(n){let o=e.store.get();t.syncStage({stageWrap:e.getChrome().stageWrap,active:o.presenting&&n.inkMarkupVisible!==false,slideIndex:o.currentSlide,canvasSize:o.canvasSize,pointer:n.pointer,blackout:n.blackout});},clear:()=>t.clear(),finish:()=>t.finishPresentation(),dispose:()=>t.dispose()}}async function sk(e){let t=chunkYOEVEUFZ_cjs.Ja.find(({id:s})=>s===e.presetId),n=e.loading.getHandler();if(!t||!n)return false;let o=e.store.get(),r=await n.switchThemePreset({slides:chunkYOEVEUFZ_cjs.mo(o.slides,o.templateElementsBySlideId),width:o.canvasSize.width,height:o.canvasSize.height,themeColorMap:o.colorScheme?{...o.colorScheme}:void 0,theme:{colorScheme:o.colorScheme}},t),i=chunkYOEVEUFZ_cjs.lo(r.slides);return e.editor.commitSlides(i.slides,o.currentSlide),e.store.set({templateElementsBySlideId:i.templateElementsBySlideId,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.name}),true}function Ip(e){let t=null,n=false,o=()=>{n=false,t?.stop(),t=null;},r=()=>{let i=chunkYOEVEUFZ_cjs.Tp();if(!i){e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")});return}t=new i,t.continuous=true,t.interimResults=true,t.lang=e.doc.documentElement.lang||"en-US",t.onresult=s=>e.emit({subtitlesVisible:true,caption:chunkYOEVEUFZ_cjs.Sp(s.resultIndex,s.results)}),t.onerror=()=>e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")}),t.onend=()=>{if(n)try{t?.start();}catch{}},t.start();};return {isActive:()=>n,toggle:()=>n?(o(),e.emit({subtitlesVisible:false,caption:void 0}),false):(n=true,e.emit({subtitlesVisible:true,caption:""}),r(),true),dispose:o}}function uo(e,t,n){e.style.width=`${String(Math.round(t.width*n))}px`,e.style.height=`${String(Math.round(t.height*n))}px`,e.style.overflow="hidden",e.style.position="relative";}function Lp(e,t){return e.width>0?t/e.width:1}function lk(e,t,n){return e.width<=0||e.height<=0?1:Math.max(.01,Math.min(t/e.width,n/e.height))}function Mp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-navigator",o.setAttribute("role","dialog"),o.setAttribute("aria-label",n(chunkYOEVEUFZ_cjs.Wk.title));let r=t.createElement("header");r.className="pptxv-presenter-navigator-header";let i=t.createElement("h2");i.textContent=n(chunkYOEVEUFZ_cjs.Wk.subtitle);let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-navigator-close",s.dataset.pptxPresenterControl="navigator-close";let a=n(chunkYOEVEUFZ_cjs.Wk.close);s.setAttribute("aria-label",a),s.title=a,s.textContent=a,s.addEventListener("click",e.close),r.append(i,s);let l=t.createElement("div");return l.className="pptxv-presenter-navigator-grid",e.slides.forEach((p,d)=>{let u=t.createElement("button");u.type="button",u.className="pptxv-presenter-navigator-tile",u.dataset.slideIndex=String(d),d===e.current&&(u.classList.add("is-current"),u.setAttribute("aria-current","true")),p.hidden===true&&(u.style.opacity=String(chunkYOEVEUFZ_cjs._k.hiddenSlideOpacity)),u.setAttribute("aria-label",n("pptx.presenter.slideLabel",{current:d+1,total:e.slides.length}));let m=t.createElement("div");m.className="pptxv-presenter-navigator-preview",m.setAttribute("aria-hidden","true"),m.append(e.renderSlide(p,e.tileScale)),uo(m,e.canvas,e.tileScale);let g=t.createElement("span");g.className="pptxv-presenter-navigator-caption",g.textContent=String(d+1),u.append(m,g),u.addEventListener("click",()=>e.select(d)),l.append(u);}),o.append(r,l),o}function pk(e,t,n){let o=e.createElement("div");o.className=n;let r=e.createElement("div");r.className="pptxv-presenter-heading",r.textContent=t;let i=e.createElement("div");return i.className="pptxv-presenter-readout",o.append(r,i),{root:o,value:i}}function Dp(e){let{doc:t,t:n}=e,o=t.createElement("aside");o.className="pptxv-presenter-rail";let r=t.createElement("header");r.className="pptxv-presenter-rail-header";let i=pk(t,n(chunkYOEVEUFZ_cjs.Vk.currentTime),"pptxv-presenter-clock"),s=pk(t,n(chunkYOEVEUFZ_cjs.Vk.elapsed),"pptxv-presenter-elapsed");r.append(i.root,s.root);let a=t.createElement("nav");a.className="pptxv-presenter-rail-nav";let l=(L,M)=>{let D=t.createElement("button");D.type="button",D.className="pptxv-presenter-nav-btn",D.dataset.pptxPresenterControl=L;let I=n(M);D.setAttribute("aria-label",I),D.title=I;let R=t.createElement("span");R.textContent=I;let O=chunkQPYQDJ2Q_cjs.K(t,L==="prev"?"chevron-left":"chevron-right");return D.append(...L==="prev"?[O,R]:[R,O]),D.addEventListener("click",()=>e.move(L==="prev"?-1:1)),D},p=l("prev","pptx.presenter.prev"),d=t.createElement("span");d.className="pptxv-presenter-counter";let u=l("next","pptx.presenter.next");a.append(p,d,u);let m=t.createElement("section");m.className="pptxv-presenter-next",m.dataset.pptxPresenterNextPreview="true";let g=t.createElement("div");g.className="pptxv-presenter-heading",g.textContent=n(chunkYOEVEUFZ_cjs.Vk.nextSlidePreview);let x=t.createElement("div");x.className="pptxv-presenter-next-body",m.append(g,x);let b=t.createElement("section");b.className="pptxv-presenter-notes",b.dataset.pptxPresenterNotes="true";let v=t.createElement("div");v.className="pptxv-presenter-notes-header";let f=t.createElement("div");f.className="pptxv-presenter-heading",f.textContent=n(chunkYOEVEUFZ_cjs.Vk.speakerNotes);let S=chunkYOEVEUFZ_cjs.ck,y=t.createElement("div");y.className="pptxv-presenter-notes-body";let h=t.createElement("span");h.className="pptxv-presenter-notes-size";let C=L=>{S=chunkYOEVEUFZ_cjs.dk(S+L),y.style.fontSize=`${String(S)}px`,h.textContent=`${String(S)}px`,A.disabled=S<=chunkYOEVEUFZ_cjs.$j,P.disabled=S>=chunkYOEVEUFZ_cjs.ak;},w=(L,M,D)=>{let I=t.createElement("button");I.type="button",I.className="pptxv-presenter-notes-btn",I.dataset.pptxPresenterControl=L;let R=n(M);return I.setAttribute("aria-label",R),I.title=R,I.append(chunkQPYQDJ2Q_cjs.K(t,D<0?"minus":"plus")),I.addEventListener("click",()=>C(D)),I},A=w("notes-font-decrease","pptx.presenter.decreaseFontSize",-chunkYOEVEUFZ_cjs.bk),P=w("notes-font-increase","pptx.presenter.increaseFontSize",chunkYOEVEUFZ_cjs.bk),k=t.createElement("div");k.className="pptxv-presenter-notes-controls",k.append(A,h,P),v.append(f,k),b.append(v,y),C(0),o.append(r,a,m,b);let T=L=>{y.replaceChildren();let M=L?.notesSegments;if(M?.length){for(let R of chunkYOEVEUFZ_cjs.gk(M)){if(R.kind==="break"){y.append(t.createElement("br"));continue}let O=t.createElement("span");O.textContent=R.text,Object.assign(O.style,R.style),y.append(O);}return}let D=L?.notes?.trim();if(D){y.textContent=D;return}let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunkYOEVEUFZ_cjs.Vk.noNotes),y.append(I);};return {root:o,syncClock:(L,M)=>{i.value.textContent=chunkYOEVEUFZ_cjs.ek(new Date(L)),s.value.textContent=chunkYOEVEUFZ_cjs.fk(M);},syncSlide:()=>{let L=e.getSlides(),M=e.getCurrent();d.textContent=`${String(M+1)} / ${String(L.length)}`,p.disabled=chunkYOEVEUFZ_cjs.Yk(M),u.disabled=chunkYOEVEUFZ_cjs.Xk(),x.replaceChildren();let D=chunkYOEVEUFZ_cjs.Hp(L,M,e.getActiveCustomShow?.(),e.getAuthoredRange?.());if(D){let I=e.previewScale();x.append(e.renderSlide(D,I)),uo(x,e.canvas(),I);}else {x.style.removeProperty("width"),x.style.removeProperty("height");let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunkYOEVEUFZ_cjs.Vk.endOfPresentation),x.append(I);}T(L[M]);}}}var SD={"circle-pause":"circle-pause","circle-play":"circle-play","rotate-ccw":"rotate-ccw","grid-2x2":"grid-2x2","zoom-in":"zoom-in","zoom-out":"zoom-out",scan:"scan","mouse-pointer-2":"mouse-pointer-2","pen-tool":"pen",highlighter:"highlighter",eraser:"eraser",captions:"captions",monitor:"monitor","monitor-off":"monitor-off","arrow-left-right":"arrow-left-right",x:"close"},dk={laser:"laser",pen:"pen",highlighter:"highlighter",eraser:"eraser"};function CD(e,t,n){let o=dk[e];if(o)return (t.pointer?.tool??"none")===o;switch(e){case "blackout-black":return t.blackout==="black";case "blackout-white":return t.blackout==="white";case "captions":return t.subtitlesVisible===true;case "audience":return n;default:return false}}function wD(e,t){let n=dk[e];return n?()=>{let r=t.getSnapshot().pointer?.tool??"none";t.setPointerTool(r===n?"none":n);}:{"timer-toggle":t.toggleTimer,"timer-reset":t.resetTimer,"all-slides":t.showAllSlides,"zoom-in":()=>t.stepZoom(1),"zoom-out":()=>t.stepZoom(-1),"zoom-reset":t.resetZoom,"blackout-black":()=>t.setBlackout("black"),"blackout-white":()=>t.setBlackout("white"),captions:t.toggleCaptions,audience:t.toggleAudience,"swap-displays":t.swapDisplays,end:t.end}[e]}function Rp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-strip";let r=[];for(let i of chunkYOEVEUFZ_cjs.Uk){if(i.kind==="divider"){let d=t.createElement("span");d.className="pptxv-presenter-strip-divider",d.setAttribute("aria-hidden","true"),o.append(d);continue}if(i.kind==="spacer"){let d=t.createElement("span");d.className="pptxv-presenter-strip-spacer",o.append(d);continue}let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-strip-btn",s.dataset.pptxPresenterControl=i.id;let a=wD(i.id,e);if(a&&s.addEventListener("click",a),i.glyph){let d=t.createElement("span");d.textContent=i.glyph,d.setAttribute("aria-hidden","true"),s.append(d);}let l=t.createElement("span");l.className="pptxv-presenter-strip-icon",l.setAttribute("aria-hidden","true"),s.append(l);let p=()=>{let d=e.getSnapshot(),u=CD(i.id,d,e.isAudienceOpen()),m=d.paused===true,g=i.id==="timer-toggle"?m:u,x=g&&i.activeLabelKey?i.activeLabelKey:i.labelKey,b=x?n(x):"";s.setAttribute("aria-label",b),s.title=b,i.kind==="toggle"&&s.setAttribute("aria-pressed",String(u)),s.classList.toggle("is-active",u);let v=g&&i.activeIcon?i.activeIcon:i.icon;l.replaceChildren();let f=v===void 0?void 0:SD[v];f&&l.append(chunkQPYQDJ2Q_cjs.K(t,f));};p(),r.push(p),o.append(s);}return {root:o,sync:()=>{for(let i of r)i();}}}function Op(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter",o.setAttribute("role","region"),o.setAttribute("aria-label",n("pptx.presenter.presenterView"));for(let[h,C]of Object.entries(chunkYOEVEUFZ_cjs.$k()))o.style.setProperty(h,C);let r=Rp({...e,showAllSlides:()=>g()}),i=t.createElement("div");i.className="pptxv-presenter-body";let s=t.createElement("div");s.className="pptxv-presenter-main",s.dataset.pptxPresenterSlide="true";let a=t.createElement("div");a.className="pptxv-presenter-main-frame";let l=t.createElement("div");l.className="pptxv-presenter-badge",s.append(a,l),s.addEventListener("click",()=>{chunkYOEVEUFZ_cjs._j(e.getSnapshot().pointer?.tool)&&e.move(1);});let p=Dp({doc:t,t:n,getSlides:e.getSlides,getCurrent:e.getCurrent,renderSlide:e.renderSlide,previewScale:()=>Lp(e.canvasSize(),chunkYOEVEUFZ_cjs._k.nextPreviewWidth),canvas:e.canvasSize,getActiveCustomShow:e.getActiveCustomShow,getAuthoredRange:e.getAuthoredRange,move:e.move});i.append(s,p.root);let d=t.createElement("div");d.className="pptxv-presenter-progress",d.setAttribute("role","progressbar"),d.setAttribute("aria-valuemin","0"),d.setAttribute("aria-valuemax","100"),d.setAttribute("aria-label",n(chunkYOEVEUFZ_cjs.Vk.timerProgress));let u=t.createElement("div");u.className="pptxv-presenter-progress-fill",d.append(u),o.append(r.root,i,d),e.container.append(o);let m=null;function g(){m?.remove(),m=Mp({doc:t,t:n,slides:e.getSlides(),current:e.getCurrent(),renderSlide:e.renderSlide,tileScale:Lp(e.canvasSize(),chunkYOEVEUFZ_cjs._k.navigatorTileWidth),canvas:e.canvasSize(),select:h=>{e.navigate(h),x();},close:()=>x()}),o.append(m);}function x(){m?.remove(),m=null;}function b(){let h=e.getSlides(),C=e.getCurrent(),w=h[C];if(a.replaceChildren(),w){let A=v();a.append(e.renderSlide(w,A)),uo(a,e.canvasSize(),A);}else {a.style.removeProperty("width"),a.style.removeProperty("height");let A=t.createElement("div");A.className="pptxv-presenter-empty",A.textContent=n(chunkYOEVEUFZ_cjs.Vk.noSlides),a.append(A);}l.textContent=n(chunkYOEVEUFZ_cjs.Vk.slideLabel,{current:C+1,total:h.length}),p.syncSlide(),f();}function v(){let h=chunkYOEVEUFZ_cjs._k.mainPadding*2;return lk(e.canvasSize(),Math.max(1,s.clientWidth-h),Math.max(1,s.clientHeight-h))}function f(){let h=e.getSnapshot().zoom,C=h?.scale??1;a.style.transform=`scale(${String(C)})`,a.style.transformOrigin=`${String((h?.originX??.5)*100)}% ${String((h?.originY??.5)*100)}%`;}function S(){let h=e.getElapsedMs();p.syncClock(Date.now(),h);let C=chunkYOEVEUFZ_cjs.Zk(h);d.setAttribute("aria-valuenow",String(Math.round(C.percent))),d.title=n("pptx.presenter.timerTitle",{elapsed:chunkYOEVEUFZ_cjs.fk(h),segment:C.segment+1}),u.style.width=`${String(C.percent)}%`;}b(),S(),r.sync();let y=setInterval(S,1e3);return {syncSlide:b,syncSnapshot:()=>{r.sync(),f();},showAllSlides:()=>g(),dispose:()=>{clearInterval(y),x(),o.remove();}}}function Hp(e,t){e.querySelectorAll(".pptxv-presenter-effect").forEach(r=>r.remove());let n=r=>{let i=e.ownerDocument.createElement("div");return i.className=`pptxv-presenter-effect ${r}`,e.append(i),i};if(t.blackout!=="none"){let r=n("blank");r.setAttribute("data-pptx-blackout",""),Object.assign(r.style,{position:"absolute",inset:"0",zIndex:String(chunkYOEVEUFZ_cjs.Pk),background:t.blackout,pointerEvents:"none"});}if(t.pointer?.tool==="laser"){let r=n("laser");Object.assign(r.style,{position:"absolute",zIndex:"76",width:"20px",height:"20px",left:`${t.pointer.x*100}%`,top:`${t.pointer.y*100}%`,transform:"translate(-50%,-50%)",borderRadius:"50%",background:"#ef4444",boxShadow:"0 0 20px 8px #ef444488"});}let o=t.inkStrokes?.filter(r=>r.slideIndex===t.slideIndex);if(o?.length){let r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("pptxv-presenter-effect","ink"),r.setAttribute("viewBox","0 0 1 1"),r.setAttribute("preserveAspectRatio","none"),Object.assign(r.style,{position:"absolute",zIndex:"76",inset:"0",width:"100%",height:"100%",pointerEvents:"none"});for(let i of o){let s=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polyline");s.setAttribute("points",i.points.map(({x:a,y:l})=>`${a},${l}`).join(" ")),s.setAttribute("fill","none"),s.setAttribute("stroke",i.color),s.setAttribute("stroke-width",String(i.width)),s.setAttribute("vector-effect","non-scaling-stroke"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),i.tool==="highlighter"&&s.setAttribute("stroke-opacity",".4"),r.appendChild(s);}e.appendChild(r);}if(t.subtitlesVisible&&t.caption){let r=n("caption");r.textContent=t.caption,Object.assign(r.style,{position:"absolute",zIndex:"77",left:"10%",right:"10%",bottom:"32px",padding:"12px 24px",borderRadius:"8px",background:"#000c",color:"#fff",textAlign:"center",fontSize:"20px"});}}function ck(e,t,n,o,r,i){if(n.length===0)return;let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-comment-markers",{position:"absolute",inset:"0",pointerEvents:"none",zIndex:"45"}),a=chunkYOEVEUFZ_cjs.pn(n,o.width,o.height,r("pptx.comments.unknownAuthor"));for(let l of a){let p=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-comment-marker",{position:"absolute",left:`${l.x-chunkYOEVEUFZ_cjs.on/2}px`,top:`${l.y-chunkYOEVEUFZ_cjs.on/2}px`,width:`${chunkYOEVEUFZ_cjs.on}px`,height:`${chunkYOEVEUFZ_cjs.on}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"0",pointerEvents:"auto",cursor:"pointer",borderRadius:"50%",background:"rgba(255, 165, 0, 0.9)",border:"2px solid #fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:"#fff"});p.type="button",p.title=l.title,p.textContent=l.label,p.addEventListener("click",d=>{d.stopPropagation(),i?.(l.commentId);}),s.appendChild(p);}t.appendChild(s);}var ED={sldImg:"pptx.master.notesMasterSlideImage",body:"pptx.master.notesMasterBody",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function mk(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-master-page ${t}`);return r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.backgroundColor=o??"#ffffff",r}function uk(e,t,n,o,r){if(!n){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-canvas-empty");return l.dataset.testid="notes-master-empty",l.textContent=t("pptx.master.noNotesMaster"),l}let i=mk(e,"pptxv-notes-master-page",o,n.backgroundColor);i.dataset.testid="notes-master-page";let s=n.placeholders??[{type:"sldImg"},{type:"body"},{type:"hdr"},{type:"ftr"},{type:"dt"},{type:"sldNum"}],a=chunkYOEVEUFZ_cjs.rg(n.notesStyle,r);for(let l of s){let p=chunkYOEVEUFZ_cjs.dp[l.type];if(!p)continue;let d=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-notes-region is-${l.type}`);d.dataset.region=l.type,d.style.left=`${p.x*o.width}px`,d.style.top=`${p.y*o.height}px`,d.style.width=`${p.w*o.width}px`,d.style.height=`${p.h*o.height}px`,l.type==="body"&&(d.style.fontSize=`${a}px`),d.textContent=t(ED[l.type]??l.type),i.appendChild(d);}return i}var TD=chunkYOEVEUFZ_cjs.ep;function xk(e,t,n,o,r){if(!n){let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-master-canvas-empty");return s.dataset.testid="handout-master-empty",s.textContent=t("pptx.master.noHandoutMaster"),s}let i=mk(e,"pptxv-handout-master-page",o,n.backgroundColor);i.dataset.testid="handout-master-page";for(let[s,a]of TD(r).entries()){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-handout-slot");l.dataset.testid="handout-slot",l.style.left=`${a.x*o.width}px`,l.style.top=`${a.y*o.height}px`,l.style.width=`${a.w*o.width}px`,l.style.height=`${a.h*o.height}px`,l.textContent=t("pptx.master.handoutSlideSlot",{number:s+1}),i.appendChild(l);}for(let[s,a]of [["is-top-left","pptx.master.notesMasterHeader"],["is-top-right","pptx.master.notesMasterDate"],["is-bottom-left","pptx.master.notesMasterFooter"],["is-bottom-right","pptx.master.notesMasterPageNumber"]]){let l=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-handout-corner ${s}`);l.textContent=t(a),i.appendChild(l);}return i}var gk={fitPadding:16,maxFitScale:null};function bk(e,t,n,o){let r=o?{fitPadding:0,maxFitScale:null}:n;if(n.fitPadding!==void 0){let{horizontal:i,vertical:s}=chunkYOEVEUFZ_cjs.ws(r,gk).fitPadding;e.style.padding=`${s}px ${i}px`;}return chunkYOEVEUFZ_cjs.xs({viewportWidth:e.clientWidth,viewportHeight:e.clientHeight,canvasWidth:Math.max(t.width,1),canvasHeight:Math.max(t.height,1),...r},gk).scale}function PD(e){let t=op(e);return t?chunkYOEVEUFZ_cjs.kp(tp(e),t):[]}function Fp(e){let{doc:t,store:n,registry:o}=e,r=ss(),i=null,s=null,a=f=>{i=f;},l=(f,S,y=false,h=false,C=n.get().canvasSize)=>{let w=n.get(),A=chunkYOEVEUFZ_cjs.ko(f,w.templateElementsBySlideId[f.id]??[]),P=A.length?{...f,elements:[...A,...f.elements]}:f;return chunkQPYQDJ2Q_cjs.A({document:t,slide:P,canvasSize:C,mediaDataUrls:w.mediaDataUrls,colorScheme:w.colorScheme,fontScheme:w.fontScheme,tableStyleMap:w.tableStyleMap,fieldContext:ei(w,f),registry:o,t:e.getTranslator(),scale:S,gridSpacingPx:chunkYOEVEUFZ_cjs.Ye(w.viewProperties?.gridSpacing,10),smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:y,slides:w.slides,currentSlideIndex:w.currentSlide,onZoomClick:e.onZoomClick,onSmartArtNodeTextChange:h?e.onSmartArtNodeTextChange:void 0,onSmartArtNodeFillChange:h?e.onSmartArtNodeFillChange:void 0,onChartPointChange:h?e.onChartPointChange:void 0,onTableResizeColumns:h?e.onTableResizeColumns:void 0,onTableResizeRow:h?e.onTableResizeRow:void 0,chartPartSelection:w.chartPartSelection,onChartPartSelect:h?e.onChartPartSelect:void 0,selectedElementIds:h?new Set(w.selectedElementIds):void 0,interactive:h,templateEditing:w.editTemplateMode||w.masterViewTarget!==null,presentationStates:y?r.elementStates:void 0,captureContext:y?a:void 0})},p=f=>{i&&s&&chunkQPYQDJ2Q_cjs.B(i,s,f);},d=f=>{let S=n.get(),y=e.getChrome().viewport;return bk(y,f,e.getFitOptions?.()??{},S.presenting)},u=f=>{let S=n.get();return S.zoom!=="fit"?S.zoom:d(f)},m=()=>u(n.get().canvasSize),g=()=>d(n.get().canvasSize),x=()=>{let f=n.get().canvasSize;return u(f)/d(f)*100},b=()=>{let f=e.getChrome(),S=n.get(),y=S.masterViewTarget,h=y?chunkYOEVEUFZ_cjs.fp({slideMasters:S.slideMasters},{tab:"slides",masterIndex:y.masterIndex,layoutIndex:y.layoutIndex}):S.slides[S.currentSlide],C=y&&S.masterViewTab!=="slides",w=C?S.masterViewTab==="notes"?S.notesCanvasSize??chunkYOEVEUFZ_cjs.cp:chunkYOEVEUFZ_cjs.cp:S.canvasSize,A=C||!!h;f.setEmpty(!A);let P=u(w);f.stageWrap.style.width=`${w.width*P}px`,f.stageWrap.style.height=`${w.height*P}px`;let k=A&&S.editable&&!S.presenting&&!S.loading?Array.from(f.stageWrap.children).find(L=>L.classList.contains("pptxv-editor-overlay")&&L.querySelector("[data-inline-editor]")):void 0;if(k)for(let L of Array.from(f.stageWrap.childNodes))L!==k&&L.remove();else f.stageWrap.replaceChildren();let T=null;if(C){let L=S.masterViewTab==="notes"?S.notesMaster:S.handoutMaster;if(L?.elements?.length)T=l({id:L.path,rId:"",slideNumber:0,elements:L.elements,backgroundColor:L.backgroundColor,backgroundImage:L.backgroundImage},P,false,true,w),T.dataset.testid=S.masterViewTab==="notes"?"notes-master-page":"handout-master-page";else {let M={width:w.width*P,height:w.height*P};T=S.masterViewTab==="notes"?uk(t,e.getTranslator(),S.notesMaster,M,P):xk(t,e.getTranslator(),S.handoutMaster,M,S.handoutSlidesPerPage);}}else h&&(T=l(h,P,S.presenting,true,w),S.editable&&!S.presenting&&ck(t,T,h.comments??[],w,e.getTranslator(),e.onCommentMarkerClick));T&&h&&f.stageWrap.insertBefore(T,k??null);let E=P/d(w)*100;f.ribbon?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:E}),f.statusBar?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:E}),f.presentationTouchControls.update(S.currentSlide,S.slides.length),f.mobileActionSheets?.setThumbnailRenderer((L,M)=>l(L,M),S.canvasSize.width,S.canvasSize.height),f.mobileActionSheets?.update(S.currentSlide,S.slides,h?.comments??[]),f.notes.update({slide:C?void 0:h,editable:S.editable,notesStyle:S.notesMaster?.notesStyle}),e.onStageRendered?.(),T?(s=T,r.syncStage({doc:t,stageWrap:f.stageWrap,stage:T,slide:h,slideIndex:S.currentSlide,presenting:S.presenting,showWithAnimation:S.presentationProperties.showWithAnimation,mediaDataUrls:S.mediaDataUrls,reRenderElements:p,seedCompleted:S.enteringBackward===true,canvasSize:S.canvasSize,themeColorMap:S.colorScheme?chunkYOEVEUFZ_cjs.P(S.colorScheme):void 0,pixelateMosaicAnimation:e.getPixelateMosaicAnimation()})):(s=null,i=null,r.reset());},v=()=>{let f=n.get(),S=e.getChrome().thumbnails;f.masterViewTarget?(S?.setVisible(false),e.getChrome().masterSidebar.setVisible(true),e.getChrome().masterSidebar.render({tab:f.masterViewTab,masters:f.slideMasters,active:f.masterViewTarget,canvasSize:f.canvasSize,notesBackground:f.notesMaster?.backgroundColor,notesPlaceholders:f.notesMaster?.placeholders,notesMasterPresent:!!f.notesMaster,handoutBackground:f.handoutMaster?.backgroundColor,handoutPlaceholders:f.handoutMaster?.placeholders,handoutMasterPresent:!!f.handoutMaster,handoutSlidesPerPage:f.handoutSlidesPerPage,editable:f.editable,crudActions:PD(f),onCrudAction:e.onMasterCrudAction,renderStage:l,onSelect:(y,h)=>{n.set({masterViewTarget:{masterIndex:y,layoutIndex:h},selectedElementId:null,selectedElementIds:[]});},onTabChange:y=>{n.set({masterViewTab:y,selectedElementId:null,selectedElementIds:[]});},onCollapse:()=>{n.set({masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false,selectedElementId:null,selectedElementIds:[]});},onHandoutSlidesPerPageChange:y=>{e.onHandoutSlidesPerPageChange(y);},onMasterBackgroundColorChange:e.onMasterBackgroundColorChange})):(e.getChrome().masterSidebar.setVisible(false),S?.setVisible(true),S?.render(f.slides,f.canvasSize,l,f.sections,f.editable?{toggle:e.onSectionToggle,rename:e.onSectionRename,delete:e.onSectionDelete,move:e.onSectionMove}:void 0));};return {renderAll(){let f=e.getChrome(),S=n.get();f.setLoading(S.loading),f.setError(S.error),f.setPresenting(S.presenting),v(),b(),f.thumbnails?.setActive(S.currentSlide),f.notes.setExpanded(S.notesExpanded),f.ribbon?.setNotesExpanded(S.notesExpanded),f.mobileActionSheets?.setNotesExpanded(S.notesExpanded),f.ribbon?.setTemplateEditing(S.editTemplateMode),f.ribbon?.setViewOptions(S);},renderStage:b,renderThumbnails:v,renderSlideNode:(f,S)=>l(f,S),effectiveScale:m,fitScale:g,zoomPercent:x,presentationPlayback:r}}function fk(e){let t=fl(e.doc,e.onCreateGuide),n=i=>{if(i.selectedElementIds.length!==1)return null;let s=U(i).find(a=>a.id===i.selectedElementIds[0]);return s?{x:s.x,y:s.y,width:s.width,height:s.height}:null},o=()=>{let i=e.getStageWrap();if(!i)return;t.mount(i);let s=e.store.get();t.update({visible:s.showRulers&&!s.presenting,canvasSize:s.canvasSize,scale:e.getScale(),unit:e.getUnit?.()??"inches",selection:n(s),draggable:s.editable&&!s.presenting});},r=e.store.subscribe(o);return {sync:o,destroy(){r(),t.destroy();}}}var AD={active:true};function bi(e){let{store:t}=e,n="idle",o=null,r=false,i=false,s=false,a=null,l=()=>(e.getActivation?.()??AD).active,p=l(),d=f=>{n=f,e.onStatus?.(f);},u=()=>{o!==null&&(clearTimeout(o),o=null);};async function m(){let f=e.getHandler();if(!(i||!l()||r||!f||!t.get().dirty)){r=true,d("saving");try{let S=await chunkYOEVEUFZ_cjs.tp(f,t.get().slides,void 0,chunkYOEVEUFZ_cjs.sp(e.getSaveIntent?.()));await chunkYOEVEUFZ_cjs.Fj(e.filePath,S),a=null,!i&&l()&&d("saved");}catch{!i&&l()&&d("error");}finally{r=false;}}}let g=()=>{if(!l())return;let f=Date.now();a??=f;let S=chunkYOEVEUFZ_cjs.Qo({intervalMs:e.getIntervalMs(),firstDirtyAt:a,now:f});u(),o=setTimeout(()=>{o=null,m();},S);},x=f=>{i||!chunkYOEVEUFZ_cjs.Ro({alreadyChecked:s,filePath:e.filePath,loading:f.loading,error:f.error,slideCount:f.slides.length,autosaveAllowed:e.isRecoveryAllowed?.()??true})||(s=true,chunkYOEVEUFZ_cjs.To(e.filePath,Date.now(),e.fileName).then(S=>(S&&!i&&(e.onRecovery?.(S.record),e.onRecoveryOffer?.(S)),S)));},b=()=>{let f=l();f===p||i||(p=f,u(),d("idle"),f&&(a=null,t.get().dirty&&g()));},v=t.subscribe((f,S)=>{b(),f.loading&&!S.loading&&(s=false),f.dirty&&(f.dirty!==S.dirty||f.slides!==S.slides)?g():!f.dirty&&S.dirty&&!r&&d("saved"),x(f);});return x(t.get()),{saveNow:m,getStatus:()=>n,refresh:b,isEnabled:l,destroy(){i=true,u(),v();}}}function Vp(e,t,n,o){return new Promise(r=>{let i=false,s=false,a=t(n.titleKey),l=e.createElement("div");l.className="pptxv-parity-backdrop pptxv-autosave-recovery";let p=e.createElement("section");p.className="pptxv-parity-dialog",p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),p.setAttribute("aria-label",a),p.setAttribute("data-pptx-autosave-recovery","true");let d=e.createElement("header");d.className="pptxv-parity-header";let u=e.createElement("h2");u.textContent=a,d.append(u);let m=e.createElement("div");m.className="pptxv-parity-body";let g=e.createElement("p");g.className="pptxv-autosave-recovery-message",g.textContent=t(n.messageKey,n.messageParams);let x=e.createElement("p");x.className="pptxv-autosave-recovery-age",x.textContent=t("pptx.autosave.recovery.savedLabel",{when:t(n.ageKey,n.ageParams)}),m.append(g,x);let b=e.createElement("footer");b.className="pptxv-parity-footer";let v=e.createElement("button");v.type="button",v.textContent=t(n.discardKey),v.setAttribute("aria-label",t(n.discardKey));let f=e.createElement("button");f.type="button",f.className="is-primary",f.textContent=t(n.restoreKey),f.setAttribute("aria-label",t(n.restoreKey)),b.append(v,f);let S=h=>{s||(s=true,e.removeEventListener("keydown",y),l.remove(),r(h));},y=h=>{h.key==="Escape"&&!i&&S("dismiss");};v.addEventListener("click",()=>{i||(i=true,p.setAttribute("aria-busy","true"),v.disabled=true,f.disabled=true,(async()=>{try{await o?.(),S("discard");}catch{i=false,p.removeAttribute("aria-busy"),v.disabled=false,f.disabled=false;}})());}),f.addEventListener("click",()=>{i||S("restore");}),e.addEventListener("keydown",y),p.append(d,m,b),l.append(p),e.body.append(l),queueMicrotask(()=>f.focus());})}function Bp(e){let t=e.hostAutosave??true,n,o=()=>chunkYOEVEUFZ_cjs.Oo({hostAutosave:e.hostAutosave,userEnabled:t,canEdit:e.store.get().editable,filePath:e.filePath}),r=null,i=false,s=async d=>{i=true;try{if(await Vp(e.doc,e.getTranslator(),d.prompt,()=>chunkYOEVEUFZ_cjs.Vo(d.record))==="restore"){chunkYOEVEUFZ_cjs.Aj(d.record);try{await e.loadFile(chunkYOEVEUFZ_cjs.Uo(d.record));}catch(m){throw chunkYOEVEUFZ_cjs.Bj(d.record),m}}}finally{i=false;}},a=()=>{let d=r;!d||i||!chunkYOEVEUFZ_cjs.So({prompt:d.prompt,presenting:e.store.get().presenting})||(r=null,s(d).catch(()=>{}));},l=e.store.subscribe((d,u)=>{u.presenting&&!d.presenting&&a();}),p=bi({store:e.store,getHandler:e.getHandler,filePath:e.filePath,fileName:e.fileName,getIntervalMs:()=>chunkYOEVEUFZ_cjs.Po({hostIntervalMs:e.hostIntervalMs,optionsIntervalSeconds:n}),getSaveIntent:e.getSaveIntent,onStatus:e.onStatus,getActivation:o,isRecoveryAllowed:()=>e.hostAutosave!==false,onRecovery:e.onRecovery,onRecoveryOffer:d=>{r=d,a();}});return {saveNow:()=>p.saveNow(),isEnabled:()=>p.isEnabled(),isPreferred:()=>o().toggleAvailable&&t,getActivation:o,setEnabled(d){return !o().toggleAvailable||t===d?false:(t=d,p.refresh(),true)},setOptionsIntervalMs(d){n=typeof d=="number"&&Number.isFinite(d)?d/1e3:void 0;},destroy:()=>{l(),p.destroy();}}}var kD="Presenter";function vk(e,t){return {...e,userName:t?.trim()||kD,role:"owner"}}function wt(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-field"),i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-modal-label");i.textContent=t,r.appendChild(i);let s=e.createElement("input");return s.type="text",s.className="pptxv-modal-input",s.placeholder=n,s.addEventListener("input",()=>o(s.value)),r.appendChild(s),{el:r,input:s}}function fi(e,t,n,o){let r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-field"),i=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-modal-label");i.textContent=n,r.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-link-row");r.appendChild(s);let a=e.createElement("input");a.type="text",a.className="pptxv-modal-input",a.readOnly=true,a.addEventListener("focus",()=>a.select()),s.appendChild(a);let l=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-btn");return l.type="button",l.textContent=t("pptx.broadcast.copyLinkBtn"),l.addEventListener("click",o),s.appendChild(l),{el:r,input:a,setValue(p){a.value=p;},setCopied(p){l.textContent=t(p?"pptx.share.copied":"pptx.broadcast.copyLinkBtn");}}}function vi(e,t,n){let o=false,r,i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-backdrop");i.hidden=true,i.addEventListener("pointerdown",x=>{x.target===i&&n.onClose();});let s=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-panel");s.tabIndex=-1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.addEventListener("pointerdown",x=>x.stopPropagation()),i.appendChild(s);let a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-header");s.appendChild(a);let l=chunkQPYQDJ2Q_cjs.w(e,"h2","pptxv-modal-title");a.appendChild(l);let p=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),p.addEventListener("click",()=>n.onClose()),a.appendChild(p);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-body");s.appendChild(d);let u=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-footer");s.appendChild(u);function m(x){l.textContent=x,s.setAttribute("aria-label",x);}m(n.title);function g(){let x=n.themeHost?.(),b=x?.ownerDocument.defaultView;if(!x||!b)return;let v=b.getComputedStyle(x);for(let f of Object.keys(chunkYOEVEUFZ_cjs.Fa())){let S=v.getPropertyValue(f).trim();S&&i.style.setProperty(f,S);}}return {el:i,bodyEl:d,footerEl:u,setTitle(x){m(x);},setOpen(x){x!==o&&(o=x,i.hidden=!x,x?(g(),r=chunkYOEVEUFZ_cjs.Gm(s,{onEscape:n.onClose})):(r?.(),r=void 0));},destroy(){r?.(),i.remove();}}}var ID=2e3;function hk(e,t,n,o){let r=chunkYOEVEUFZ_cjs.Pj(),i=false,s=null,a=vi(e,t,{title:t("pptx.broadcast.startTitle"),onClose:()=>a.setOpen(false),themeHost:o});e.body.appendChild(a.el);let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-section"),p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-desc");p.textContent=t("pptx.broadcast.idleDesc"),l.appendChild(p);let d=wt(e,t("pptx.broadcast.roomId"),t("pptx.broadcast.roomIdPlaceholder"),A=>{r={...r,roomId:A},w();});l.appendChild(d.el);let u=wt(e,t("pptx.broadcast.serverUrl"),t("pptx.broadcast.serverUrlPlaceholder"),A=>{r={...r,serverUrl:A},w();}),m=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");m.textContent=t("pptx.broadcast.p2pHint"),u.el.appendChild(m),l.appendChild(u.el);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-section"),x=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.broadcast.liveDesc"),g.appendChild(x);let b=fi(e,t,t("pptx.broadcast.viewerLink"),()=>{C();});g.appendChild(b.el);let v=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");v.textContent=t("pptx.broadcast.viewerHint"),g.appendChild(v);let f=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");f.textContent=t("pptx.broadcast.p2pServerValue"),g.appendChild(f);let S=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-danger-btn");S.type="button",S.textContent=t("pptx.broadcast.stopBroadcast"),S.addEventListener("click",()=>n.onStop()),g.appendChild(S),a.bodyEl.append(l,g);let y=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-btn");y.type="button",y.textContent=t("pptx.common.close"),y.addEventListener("click",()=>a.setOpen(false)),a.footerEl.appendChild(y);let h=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");h.type="button",h.textContent=t("pptx.broadcast.startBroadcast"),h.addEventListener("click",()=>{let A=chunkYOEVEUFZ_cjs.Rj(r);A&&n.onStart(A);}),a.footerEl.appendChild(h);async function C(){chunkYOEVEUFZ_cjs.Tj(typeof navigator>"u"?void 0:navigator)&&(await navigator.clipboard.writeText(b.input.value),b.setCopied(true),s!==null&&clearTimeout(s),s=setTimeout(()=>b.setCopied(false),ID));}function w(){a.setTitle(t(i?"pptx.broadcast.broadcastingTitle":"pptx.broadcast.startTitle")),l.hidden=i,g.hidden=!i,h.hidden=i,h.disabled=!chunkYOEVEUFZ_cjs.Qj(r),m.hidden=chunkYOEVEUFZ_cjs.Oj(r.serverUrl)!=="webrtc",d.input.value=r.roomId,u.input.value=r.serverUrl;}return w(),{el:a.el,open(A,P,k){i=P,i||(r=chunkYOEVEUFZ_cjs.Pj(A)),b.setValue(k),b.setCopied(false),w(),a.setOpen(true);},close(){a.setOpen(false);},setActive(A,P){i=A,b.setValue(P),w();},destroy(){s!==null&&clearTimeout(s),a.destroy();}}}var LD="M0 0 L0 16 L4.5 12.5 L8 20 L10.5 19 L7 11.5 L12 11 Z";function xo(e){let t=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-collab-cursors");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-collab-cursor");i.dataset.clientId=String(r),i.dataset.pptxRemoteCursor=String(r);let s=chunkQPYQDJ2Q_cjs.x(e,"svg",{width:20,height:22,viewBox:"0 0 20 22",focusable:"false"});s.setAttribute("class","pptxv-collab-pointer");let a=chunkQPYQDJ2Q_cjs.x(e,"path",{d:LD,stroke:"#ffffff","stroke-width":1});s.appendChild(a),i.appendChild(s);let l=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-collab-label");return i.appendChild(l),t.appendChild(i),{root:i,path:a,label:l}}return {el:t,update(r,i){let s=new Set;for(let a of r){s.add(a.clientId);let l=n.get(a.clientId);l||(l=o(a.clientId),n.set(a.clientId,l)),l.root.style.transform=`translate(${a.x*i}px, ${a.y*i}px)`,chunkQPYQDJ2Q_cjs.y(l.path,{fill:a.color}),l.label.textContent=chunkYOEVEUFZ_cjs.xh(a.userName),l.label.style.backgroundColor=a.color;}for(let[a,l]of n)s.has(a)||(l.root.remove(),n.delete(a));},destroy(){t.remove();}}}var yk={connected:"pptx.collaboration.status.connected",connecting:"pptx.collaboration.status.connecting",disconnected:"pptx.collaboration.status.disconnected",error:"pptx.collaboration.status.error"};function Sk(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-collab-status");o.hidden=true,o.setAttribute("role","status"),o.setAttribute("data-testid","collaboration-status");let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-collab-status-dot");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-collab-status-text");o.appendChild(i);let s=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-collab-status-retry");return s.type="button",s.textContent=t("pptx.collaboration.retry"),s.hidden=true,s.addEventListener("click",n),o.appendChild(s),{el:o,update(a,l){o.hidden=a==="disconnected",r.className=`pptxv-collab-status-dot is-${a}`,i.textContent=a==="connected"?l===1?t("pptx.collaboration.onePersonHere"):t("pptx.collaboration.peopleHere",{count:l}):t(yk[a]),s.hidden=a!=="error",o.setAttribute("aria-label",t("pptx.collaboration.statusAriaLabel",{status:t(yk[a]),count:l}));},destroy(){o.remove();}}}var MD=2;function DD(e){let t=e.trim().split(/\s+/u);return t.length>=2&&t[0]&&t[t.length-1]?(t[0][0]+t[t.length-1][0]).toUpperCase():e.slice(0,MD).toUpperCase()||"?"}function Ck(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-follow-bar");o.dataset.exportIgnore="true",o.hidden=true;let r=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-follow-status");o.appendChild(r);let i=chunkQPYQDJ2Q_cjs.w(e,"ul","pptxv-follow-list");o.appendChild(i);let s=new Map;function a(p){if(r.replaceChildren(),!p){r.textContent=t("pptx.followMode.followCollaborator");return}r.append(`${t("pptx.followMode.following")} `);let d=chunkQPYQDJ2Q_cjs.w(e,"strong");d.textContent=p.userName,r.appendChild(d),r.append(" ");let u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-follow-stop");u.type="button",u.textContent=t("pptx.followMode.stop"),u.title=t("pptx.followMode.stopFollowing"),u.addEventListener("click",()=>n.onFollow(null)),r.appendChild(u);}function l(p){let d=s.get(p.clientId);if(d)return d;let u=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-follow-peer");u.type="button",u.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-follow-avatar")),u.appendChild(chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-follow-name"));let m=chunkQPYQDJ2Q_cjs.w(e,"li");return m.appendChild(u),i.appendChild(m),s.set(p.clientId,u),u}return {el:o,update(p,d){if(o.hidden=p.length===0,o.hidden)return;let u=p.find(g=>g.clientId===d)??null;a(u);let m=new Set;for(let g of p){m.add(g.clientId);let x=l(g),b=x.firstElementChild,v=x.lastElementChild;b.textContent=DD(g.userName),b.style.backgroundColor=g.userColor,v.textContent=g.userName;let f=g.clientId===d;x.classList.toggle("is-following",f),x.setAttribute("aria-pressed",String(f)),x.title=f?t("pptx.followMode.stopFollowingUser",{name:g.userName}):t("pptx.followMode.followUser",{name:g.userName}),x.onclick=()=>n.onFollow(f?null:g.clientId);}for(let[g,x]of s)m.has(g)||(x.closest("li")?.remove(),s.delete(g));},destroy(){o.remove();}}}var RD=20;function hi(e){let t=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-remote-selections");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-remote-selection");i.dataset.selectionKey=r;let s=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-remote-selection-label");return i.appendChild(s),t.appendChild(i),{root:i,label:s}}return {el:t,update(r,i,s,a){let l=new Map;for(let d of i)l.set(d.id,d);let p=new Set;for(let d of r){if(d.activeSlideIndex!==s||!d.selectedElementId)continue;let u=l.get(d.selectedElementId);if(!u)continue;let m=`${d.clientId}-${u.id}`;p.add(m);let g=n.get(m);g||(g=o(m),n.set(m,g)),g.root.dataset.pptxRemoteSelection=u.id,g.root.style.transform=`translate(${u.x*a}px, ${u.y*a}px)`,g.root.style.width=`${u.width*a}px`,g.root.style.height=`${u.height*a}px`,g.root.style.borderColor=d.userColor,g.label.textContent=chunkYOEVEUFZ_cjs.xh(d.userName,RD),g.label.style.backgroundColor=d.userColor;}for(let[d,u]of n)p.has(d)||(u.root.remove(),n.delete(d));},destroy(){t.remove();}}}function wk(e,t,n,o,r){let i=chunkYOEVEUFZ_cjs.Xj(),s=false,a="create",l="",p={status:"disconnected",connectedCount:0,config:null,remoteUsers:[]},d=false,u,m=vi(e,t,{title:t("pptx.toolbar.share"),onClose:()=>m.setOpen(false),themeHost:o});e.body.appendChild(m.el);let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-section"),x=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.share.formDescription");let b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-share-tabs");b.setAttribute("role","tablist");let v=chunkQPYQDJ2Q_cjs.w(e,"button");v.type="button",v.textContent=t("pptx.share.createSession");let f=chunkQPYQDJ2Q_cjs.w(e,"button");f.type="button",f.textContent=t("pptx.share.joinSession"),b.append(v,f),g.append(b,x);let S=wt(e,t("pptx.share.invitationLabel"),t("pptx.share.invitationPlaceholder"),G=>{l=G,ie();});g.appendChild(S.el);let y=wt(e,t("pptx.share.roomId"),t("pptx.share.roomIdPlaceholder"),G=>{i={...i,roomId:G},ie();});g.appendChild(y.el);let h=wt(e,t("pptx.share.yourName"),t("pptx.share.yourNamePlaceholder"),G=>{i={...i,userName:G},ie();});g.appendChild(h.el);let C=wt(e,t("pptx.share.serverUrl"),t("pptx.share.serverPlaceholder"),G=>{i={...i,serverUrl:G},ie();}),w=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");w.textContent=t("pptx.share.p2pHint"),C.el.appendChild(w),g.appendChild(C.el);let A=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-section"),P=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-share-status-row"),k=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-collab-status-dot");P.appendChild(k);let T=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-share-status-text");P.appendChild(T);let E=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-share-count");P.appendChild(E),A.appendChild(P);let L=fi(e,t,t("pptx.share.shareLink"),()=>{L.input.value&&e.defaultView?.navigator.clipboard.writeText(L.input.value).then(()=>{d=true,L.setCopied(true),clearTimeout(u),u=setTimeout(()=>{d=false,L.setCopied(false);},2e3);});});A.appendChild(L.el);let M=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");M.textContent=t("pptx.share.shareHint"),A.appendChild(M);let D=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-share-details"),I=chunkQPYQDJ2Q_cjs.w(e,"span");D.appendChild(I);let R=chunkQPYQDJ2Q_cjs.w(e,"span");D.appendChild(R),A.appendChild(D);let O=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-modal-hint");O.textContent=t("pptx.share.p2pServerValue"),A.appendChild(O);let B=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-modal-field"),F=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-modal-label");F.textContent=t("pptx.share.connectedUsers"),B.appendChild(F);let V=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-share-users-list");B.appendChild(V),A.appendChild(B);let _=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-danger-btn");_.type="button",_.textContent=t("pptx.share.stopSharing"),_.addEventListener("click",()=>n.onStop()),A.appendChild(_),m.bodyEl.append(g,A);let N=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-btn");N.type="button",N.addEventListener("click",()=>m.setOpen(false)),m.footerEl.appendChild(N);let W=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");W.type="button",W.textContent=t("pptx.share.startSharing"),W.addEventListener("click",()=>{let G=a==="join"?chunkYOEVEUFZ_cjs.Uj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):chunkYOEVEUFZ_cjs.Zj(i);G&&n.onStart(G);}),m.footerEl.appendChild(W);function X(){let G=p.config,K=chunkYOEVEUFZ_cjs.Oj(G?.serverUrl??"")==="webrtc";k.className=`pptxv-collab-status-dot is-${p.status}`,T.textContent=p.status,E.textContent=t("pptx.collaboration.userCount",{count:p.connectedCount});let j=G?chunkYOEVEUFZ_cjs.Wj(G,e.defaultView?{origin:e.defaultView.location.origin,pathname:e.defaultView.location.pathname}:void 0):"";L.el.hidden=!j,M.hidden=!j,L.setValue(j),L.setCopied(d),D.hidden=!G,G&&(I.replaceChildren(`${t("pptx.share.room")} `,Object.assign(e.createElement("code"),{textContent:G.roomId})),R.replaceChildren(`${t("pptx.share.server")} `,Object.assign(e.createElement("code"),{textContent:K?t("pptx.share.p2pServerValue"):G.serverUrl}))),O.hidden=!!G||!K;let Y=G?chunkYOEVEUFZ_cjs.Jh({localUserName:G.userName,localUserInitials:r?.(),localUserColor:G.userColor,remoteUsers:p.remoteUsers}):[];B.hidden=Y.length===0,V.replaceChildren(...Y.map(ue=>{let Te=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-share-user"),Me=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-share-user-avatar");if(Me.style.backgroundColor=ue.color,ue.avatarUrl){let ne=e.createElement("img");ne.src=ue.avatarUrl,ne.alt="",Me.appendChild(ne);}else Me.textContent=ue.initials;Te.appendChild(Me);let Xo=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-share-user-name");Xo.textContent=ue.name,Te.appendChild(Xo);let Tt=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-share-user-tag");return Tt.textContent=ue.isLocal?t("pptx.share.you"):t("pptx.notes.slideN",{n:ue.slideNumber??1}),Te.appendChild(Tt),Te}));}function ie(){m.setTitle(t(s?"pptx.share.collaborationActive":"pptx.toolbar.share")),g.hidden=s,A.hidden=!s,W.hidden=s,N.textContent=t(s?"pptx.share.close":"pptx.share.cancel"),v.setAttribute("aria-selected",String(a==="create")),f.setAttribute("aria-selected",String(a==="join")),x.textContent=t(a==="join"?"pptx.share.joinDescription":"pptx.share.formDescription"),S.el.hidden=a!=="join",y.el.hidden=a==="join",W.textContent=t(a==="join"?"pptx.share.joinSession":"pptx.share.startSharing"),W.disabled=a==="join"?!chunkYOEVEUFZ_cjs.Vj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):!chunkYOEVEUFZ_cjs.Yj(i),w.hidden=chunkYOEVEUFZ_cjs.Oj(i.serverUrl)!=="webrtc",y.input.value=i.roomId,h.input.value=i.userName,C.input.value=i.serverUrl,S.input.value=l,X();}return v.addEventListener("click",()=>{a="create",ie();}),f.addEventListener("click",()=>{a="join",ie();}),ie(),{el:m.el,open(G,K){s=K,s||(i=chunkYOEVEUFZ_cjs.Xj(G),l=""),ie(),m.setOpen(true);},close(){m.setOpen(false);},setActive(G){s=G,ie();},updateSession(G){p=G,X();},destroy(){clearTimeout(u),m.destroy();}}}function Ek(e){let{doc:t}=e,n=e.getTranslator(),o=e.getChrome(),r="",i="";function s(){if(!r)return "";let E=t.defaultView?.location;return chunkYOEVEUFZ_cjs.Sj(r,i,E?{origin:E.origin,pathname:E.pathname}:void 0)}let a=()=>e.getChrome().root,l=wk(t,n,{onStart:E=>{e.startCollaboration(E).then(()=>l.setActive(true));},onStop:()=>{e.stopCollaboration(),l.setActive(false),l.close();}},a,e.getUserInitials),p=hk(t,n,{onStart:E=>{r=E.roomId,i=E.serverUrl;let L=vk(E,e.shareDefaults?.userName);e.startCollaboration(L).then(()=>p.setActive(true,s()));},onStop:()=>{e.stopCollaboration(),r="",i="",p.setActive(false,""),p.close();}},a),d=Sk(t,n,()=>{let E=e.getConfig();E&&e.startCollaboration(E);}),u=null,m=null,g=()=>{l.open(e.shareDefaults,e.getStatus()!=="disconnected");},x=()=>{p.open({roomId:r,serverUrl:i},e.getStatus()!=="disconnected",s());},b=!chunkYOEVEUFZ_cjs.cq("share",e.hiddenActions),v=o.ribbon?.el.querySelector(".pptxv-ribbon-primary")??null,f=o.ribbon?.el.querySelector(".pptxv-tabrow-actions")??null;if(v){if(b){if(u=chunkQPYQDJ2Q_cjs.w(t,"button",f?"pptxv-tabrow-share":"pptxv-btn"),u.type="button",u.title=n("pptx.toolbar.share"),u.setAttribute("aria-label",n("pptx.toolbar.share")),u.appendChild(chunkQPYQDJ2Q_cjs.K(t,"share")),f){let E=chunkQPYQDJ2Q_cjs.w(t,"span");E.textContent=n("pptx.toolbar.share"),u.appendChild(E);}u.addEventListener("click",g),(f??v).appendChild(u);}e.showCollaborationStatus!==false&&v.appendChild(d.el);}let S=o.mobileToolbar?.collaborationHost??null;S&&b&&(m=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-mobile-toolbar-btn pptxv-mobile-share"),m.type="button",m.title=n("pptx.toolbar.share"),m.setAttribute("aria-label",n("pptx.toolbar.share")),m.appendChild(chunkQPYQDJ2Q_cjs.K(t,"share")),m.addEventListener("click",g),S.appendChild(m));let y=xo(t),h=hi(t),C=Ck(t,n,{onFollow:E=>e.followUser(E)});function w(){let E=e.getChrome(),L=E.stageWrap;h.el.parentElement!==L&&L.appendChild(h.el),y.el.parentElement!==L&&L.appendChild(y.el),C.el.parentElement!==E.root&&E.root.appendChild(C.el);}function A(E){return e.getStatus()==="disconnected"?0:E.remotePresences.length+1}function P(E){return {status:e.getStatus(),connectedCount:A(E),config:e.getConfig(),remoteUsers:E.remotePresences}}function k(E){w(),y.update(E.cursors,e.getScale()),h.update(E.remotePresences,E.slides[E.currentSlide]?.elements??[],E.currentSlide,e.getScale()),C.update(E.remotePresences,E.followedClientId),d.update(e.getStatus(),A(E)),l.updateSession(P(E));}k(e.store.get());let T=e.store.subscribe((E,L)=>{(E.cursors!==L.cursors||E.remotePresences!==L.remotePresences||E.followedClientId!==L.followedClientId||E.currentSlide!==L.currentSlide||E.slides!==L.slides||E.zoom!==L.zoom)&&k(E);});return {onStatusChange(E){k(e.store.get()),E==="disconnected"&&(l.setActive(false),p.setActive(false,""));},openShare:g,openBroadcast:x,destroy(){T(),u?.remove(),m?.remove(),d.destroy(),y.destroy(),h.destroy(),C.destroy(),l.destroy(),p.destroy();}}}function Tk(e){let{provider:t,transport:n}=e,o=null;function r(){o!==null&&(clearTimeout(o),o=null);}function i(){e.isActive()&&(e.setStatus("disconnected"),e.reArmGate());}return n==="webrtc"?(e.setStatus("connected"),t.onStatus(s=>{s?e.setStatus("connected"):i();}),{cancelConnectTimer:r}):(t.onStatus(s=>{s?(r(),e.setStatus("connected")):i();}),t.connectedNow?e.setStatus("connected"):o=setTimeout(()=>{o=null,e.onConnectTimeout();},chunkYOEVEUFZ_cjs.sh),{cancelConnectTimer:r})}function Pk(e){let t=false,n=null;return {isReadOnly:()=>t,setReadOnly(o){o!==t&&(t=o,e.onReadOnlyChange?e.onReadOnlyChange(o):o?(n=e.store.get().editable,e.setEditable(false)):n!==null&&(e.setEditable(n),n=null));}}}function Ak(e,t,n){let o=chunkYOEVEUFZ_cjs.Gh(e,{gate:n.gate,factories:n.factories,livePatcher:n.livePatcher,role:t.role,sessionIntent:t.sessionIntent,adoptSlides:n.adoptSlides,onStatus:n.setStatus,onReadOnlyChange:n.setReadOnly,onSuspend:n.cancelWriteBack,onReady:({seedEmptyRoom:r})=>{r&&n.resetBaseline(),n.flushLocal();}});return {contentLoaded(r){!o.handleLoad(r)&&o.canWrite()&&n.flushLocal();},dispose:o}}var OD=1e5;function kk(e){return e!==void 0&&e>0?e:OD}function Ik(e,t,n,o){let r=chunkYOEVEUFZ_cjs.Hh(t,n),i=t.clientID??-1,s=0,a=chunkYOEVEUFZ_cjs.Ih();function l(){let{width:d,height:u}=o(),{list:m,cursors:g,changed:x}=a.project(t.getStates(),i,kk(d),kk(u),s);if(!x)return;let b=e.get().followedClientId;e.set({remotePresences:m,cursors:g,followedClientId:b!==null&&!m.some(v=>v.clientId===b)?null:b});}t.on("change",l),t.on("update",l);let p=setInterval(()=>r.flush(),chunkYOEVEUFZ_cjs.th);return l(),{setCursor(d,u,m=s){s=m,r.update({cursorX:d,cursorY:u,activeSlideIndex:m});},setSelection(d,u=s){s=u,r.update({selectedElementId:d,activeSlideIndex:u});},setActiveSlide(d){s=Math.max(0,Math.floor(d)),r.update({activeSlideIndex:s}),l();},followUser(d){e.set({followedClientId:d});},destroy(){clearInterval(p),t.off?.("change",l),t.off?.("update",l),r.dispose(),e.set({remotePresences:[],cursors:[],followedClientId:null});}}}async function zp(e,t,n){if(e==="webrtc"){let{WebrtcProvider:s}=await import('y-webrtc'),a=new s(t.roomId,n,{signaling:t.signaling?.length?t.signaling:void 0,password:t.authToken||void 0}),l=chunkYOEVEUFZ_cjs.Th(t.roomId,a.awareness);return {awareness:a.awareness,onStatus:p=>a.on("status",d=>p(!!d.connected)),connectedNow:true,onSynced:p=>a.on("synced",d=>{d?.synced!==false&&p();}),syncedNow:false,destroy:()=>{l.announce(),l.dispose(),chunkYOEVEUFZ_cjs.Sh(a.awareness),a.destroy();}}}let{WebsocketProvider:o}=await import('y-websocket'),r=new o(t.serverUrl,t.roomId,n,{params:t.authToken?{token:t.authToken}:void 0}),i=chunkYOEVEUFZ_cjs.Th(t.roomId,r.awareness);return {awareness:r.awareness,onStatus:s=>r.on("status",a=>{a.status==="connected"?s(true):a.status==="disconnected"&&s(false);}),connectedNow:r.wsconnected,onSynced:s=>r.on("sync",a=>{a&&s();}),syncedNow:r.synced,destroy:()=>{i.announce(),i.dispose(),chunkYOEVEUFZ_cjs.Sh(r.awareness),r.disconnect(),r.destroy();}}}async function Lk(e,t){let n=await import('yjs'),o=e.externalSession?.doc??new n.Doc,r={createMap:()=>new n.Map,createArray:()=>new n.Array,createText:()=>new n.Text,createTextPositions:i=>chunkYOEVEUFZ_cjs.Oh(i,{read:()=>n.snapshot(o),equal:n.equalSnapshots,subscribeBeforeObservers:s=>(o.on("beforeObserverCalls",s),()=>o.off("beforeObserverCalls",s))})};if(e.externalSession){let i=chunkYOEVEUFZ_cjs.Ah(e.externalSession.awareness);return {doc:e.externalSession.doc,factories:r,awareness:i.awareness,dispose:i.dispose}}try{let i=await zp(t,e,o);return {doc:o,factories:r,awareness:i.awareness,provider:i,dispose(){i.destroy(),o.destroy();}}}catch(i){throw o.destroy(),i}}function Mk(e,t){let n="",o=false;function r(l,p,d,u){if(!l||!p||o||u)return;let m=e.get().slides,g=JSON.stringify(m);g!==n&&(n=g,chunkYOEVEUFZ_cjs.Fh(m,l,p),d&&t(d));}function i(l,p,d=false){if(!l)return false;let u=chunkYOEVEUFZ_cjs.Ch(l);return u.length===0&&!d?false:(s(u,p),true)}function s(l,p){n=JSON.stringify(l),o=true;try{e.set({slides:l,currentSlide:Vt(e.get().currentSlide,l.length)});}finally{o=false;}t(p);}function a(){n="",o=false;}return {flushLocalSlides:r,applyRemoteSlides:i,adoptSlides:s,isApplyingRemote:()=>o,reset:a}}function Dk(e){return chunkYOEVEUFZ_cjs.Uh({getYDoc:e.getYDoc,serialize:()=>{let t=e.getYDoc(),n=e.getHandler();return !t||!n?null:n.save(chunkYOEVEUFZ_cjs.Ch(t),e.getSaveOptions?.())}})}function Bt(e){let{store:t}=e,n="disconnected",o=false,r=null,i=0,s=null,a=null,l=null,p=null,d=Pk(e),u=null,m=null,g=null,x=null,b=false,v=chunkYOEVEUFZ_cjs.Kh();function f(E){E!==n&&(n=E,e.onStatusChange?.(E));}let S=Dk({getYDoc:()=>a,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions}),y=Mk(t,E=>{(!E.externalSession||C.isOpen())&&S.schedule(E);});function h(){y.flushLocalSlides(a,l,u,d.isReadOnly());}let C=chunkYOEVEUFZ_cjs.Ph(h);async function w(E){k();let L=i;u=E;try{chunkYOEVEUFZ_cjs.vh(E.roomId);}catch{f("error");return}let M=E.transport??chunkYOEVEUFZ_cjs.Oj(E.serverUrl);if(!E.externalSession&&M==="websocket"&&chunkYOEVEUFZ_cjs.wh(E.serverUrl)){f("error");return}f("connecting"),d.setReadOnly(!!E.externalSession||E.role==="viewer");try{let D=await Lk(E,M);if(L!==i){D.dispose();return}if(r=D,a=D.doc,l=D.factories,p=Ik(t,D.awareness,{userName:E.userName,userColor:E.userColor??chunkYOEVEUFZ_cjs.uh,userAvatar:E.userAvatar,role:E.role},()=>({width:t.get().canvasSize.width,height:t.get().canvasSize.height})),E.externalSession||(m=chunkYOEVEUFZ_cjs.Dh(a,(I,R)=>{R?.origin===chunkYOEVEUFZ_cjs.Eh||y.isApplyingRemote()||y.applyRemoteSlides(a,E);})),g=t.subscribe((I,R)=>{I.slides!==R.slides&&!b&&C.isOpen()&&h();}),o=!0,E.externalSession)s=Ak(E.externalSession,E,{factories:D.factories,livePatcher:v,gate:C,setStatus:f,setReadOnly:d.setReadOnly,flushLocal:h,resetBaseline:y.reset,cancelWriteBack:S.cancel,adoptSlides:I=>y.adoptSlides(I,E)});else if(D.provider){let I=D.provider;v.configure(d.isReadOnly()?null:a,d.isReadOnly()?null:l),I.onSynced(()=>C.open()),I.syncedNow?C.open():C.arm(),x=Tk({provider:I,transport:M,setStatus:f,isActive:()=>o,reArmGate:()=>{C.reset(),C.arm();},onConnectTimeout:()=>{n!=="connected"&&(k(),f("error"));}});}}catch{L===i&&(k(),f("error"));}}function A(E){b=true;}function P(E){let L=b;if(b=false,!(!o||!a||!u)){if(s){s.contentLoaded(E);return}chunkYOEVEUFZ_cjs.Qh(E,chunkYOEVEUFZ_cjs.Ch(a).length)&&y.applyRemoteSlides(a,u)||L&&C.isOpen()&&h();}}function k(){i+=1,s?.dispose(),s=null,x?.cancelConnectTimer(),x=null,b=false,S.cancel(),C.reset(),y.reset(),m?.(),m=null,g?.(),g=null,p?.destroy(),p=null,r?.dispose(),r=null,a=null,l=null,v.configure(null,null),o=false,d.setReadOnly(false),f("disconnected");}let T=chunkYOEVEUFZ_cjs.Rh({leaveOnBeforeUnload:()=>!u?.externalSession,leave:k,rejoin:()=>{u&&w(u);}});return {start:w,stop:k,isActive:()=>o,isReadOnly:d.isReadOnly,getStatus:()=>n,setCursor:(E,L,M)=>p?.setCursor(E,L,M),setSelection:(E,L)=>p?.setSelection(E,L),setActiveSlide:E=>p?.setActiveSlide(E),followUser:E=>p?.followUser(E??null),getConfig:()=>u,beginContentLoad:A,notifyContentLoaded:P,livePatcher:v,destroy:()=>{T(),k();}}}var HD="presentation.pptx";function FD(e,t){switch(e){case "saving":return t("pptx.autosave.saving");case "saved":return t("pptx.autosave.savedShort");case "error":return t("pptx.autosave.saveFailed");default:return ""}}function Rk(e){let{options:t}=e,n=Bp({doc:e.doc,store:e.store,getHandler:e.getHandler,getTranslator:e.getTranslator,hostAutosave:t.autosave,hostIntervalMs:t.autosaveIntervalMs,filePath:t.autosaveFilePath??HD,fileName:t.fileName,getSaveIntent:()=>({password:e.store.get().presentationPassword,passwordProtected:e.store.get().isPasswordProtected}),onStatus:l=>{e.getChrome().ribbon?.setAutosaveStatus(FD(l,e.getTranslator()),l),e.getChrome().titleBar?.setAutosaveState(l),t.onAutosaveStatus?.(l);},onRecovery:l=>t.onAutosaveRecovery?.(l),loadFile:l=>e.loadFile(l)}),o=null,r=Bt({store:e.store,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:e.setEditable,onReadOnlyChange:e.onCollaborationReadOnlyChange,onStatusChange:l=>{t.onCollaborationStatus?.(l),o?.(l);}});t.collaboration&&r.start(t.collaboration);let i=e.store.subscribe((l,p)=>{if(r.isActive()&&(l.currentSlide!==p.currentSlide&&r.setActiveSlide(l.currentSlide),l.selectedElementId!==p.selectedElementId&&r.setSelection(l.selectedElementId??void 0,l.currentSlide),l.followedClientId!==null&&l.remotePresences!==p.remotePresences)){let d=l.remotePresences.find(u=>u.clientId===l.followedClientId);d&&d.activeSlideIndex!==l.currentSlide&&e.goToSlide(d.activeSlideIndex);}}),s=()=>Ek({doc:e.doc,store:e.store,getChrome:e.getChrome,getTranslator:e.getTranslator,getScale:e.getScale,startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),getStatus:()=>r.getStatus(),getConfig:()=>r.getConfig(),followUser:l=>r.followUser(l),shareDefaults:t.shareDefaults,hiddenActions:e.getHiddenActions?e.getHiddenActions():t.hiddenActions,showCollaborationStatus:e.isShareAvailable?.()??true,getUserInitials:e.getUserInitials}),a=s();return o=l=>a.onStatusChange(l),{startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),isCollaborationReadOnly:()=>r.isReadOnly(),getCollaborationStatus:()=>r.getStatus(),getCollaborationLivePatcher:()=>r.livePatcher,setCollaborationCursor:(l,p)=>r.setCursor(l,p,e.store.get().currentSlide),publishCollaborationInlineText:(l,p)=>{let d=e.store.get();chunkYOEVEUFZ_cjs.Lh(r.livePatcher,d.slides[d.currentSlide],l,p);},flushCollaborationLivePatch:()=>r.livePatcher.flush(),followCollaborationUser:l=>r.followUser(l),beginCollaborationContentLoad:l=>r.beginContentLoad(l),notifyCollaborationContentLoaded:l=>r.notifyContentLoaded(l),autosaveNow:()=>n.saveNow(),setAutosaveEnabled(l){n.setEnabled(l)&&t.onToggleAutosave?.(l);},isAutosaveEnabled:()=>n.isEnabled(),isAutosavePreferred:()=>n.isPreferred(),getAutosaveActivation:()=>n.getActivation(),setAutosaveIntervalMs:l=>n.setOptionsIntervalMs(l),openBroadcast:()=>a.openBroadcast(),openShare:()=>a.openShare(),remountUi(){a.destroy(),a=s(),a.onStatusChange(r.getStatus());},destroy(){i(),a.destroy(),r.destroy(),n.destroy();}}}function Ok(e,t,n){if(e===t)return false;let o=new Set(e),r=new Set(t);return n.some(i=>i.type==="chart"&&o.has(i.id)!==r.has(i.id))}function Np(e){let{renderer:t,callbacks:n}=e;return (o,r)=>{let i=e.getChrome();o.loading!==r.loading&&i.setLoading(o.loading),o.error!==r.error&&i.setError(o.error),o.presenting!==r.presenting&&(i.setPresenting(o.presenting),i.statusBar?.setPresenting(o.presenting),n.onPresentationChange?.(o.presenting)),((o.slides!==r.slides||o.sections!==r.sections||o.canvasSize!==r.canvasSize||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||o.outlineFontsTick!==r.outlineFontsTick)&&!o.interactionActive||r.interactionActive&&!o.interactionActive)&&t.renderThumbnails(),(o.slides!==r.slides||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom||o.canvasSize!==r.canvasSize||o.presenting!==r.presenting||o.editTemplateMode!==r.editTemplateMode||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||Ok(r.selectedElementIds,o.selectedElementIds,U(o)))&&t.renderStage(),o.currentSlide!==r.currentSlide&&(i.thumbnails?.setActive(o.currentSlide),n.onSlideChange?.(o.currentSlide)),(o.slides!==r.slides||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom)&&(i.statusBar?.update({current:o.currentSlide,total:o.slides.length,zoomPercent:t.zoomPercent()}),i.presentationTouchControls.update(o.currentSlide,o.slides.length),i.presentationToolbar.update({current:o.currentSlide,total:o.slides.length}),i.mobileActionSheets?.update(o.currentSlide,o.slides,o.slides[o.currentSlide]?.comments??[])),o.zoom!==r.zoom&&n.onZoomChange?.(t.effectiveScale()),o.selectedElementId!==r.selectedElementId&&n.onSelectionChange?.(o.selectedElementId),o.dirty!==r.dirty&&(i.statusBar?.setDirty(o.dirty),i.titleBar?.setDirty(o.dirty),n.onDirtyChange?.(o.dirty)),o.editable!==r.editable&&(i.root.classList.toggle("pptxv-editable",o.editable),i.notes.update({slide:o.slides[o.currentSlide],editable:o.editable,notesStyle:o.notesMaster?.notesStyle}),i.mobileActionSheets?.setEditable(o.editable)),o.protectedView!==r.protectedView&&i.setProtectedView(o.protectedView),(o.readOnlyRecommendation!==r.readOnlyRecommendation||o.readOnlyBannerDismissed!==r.readOnlyBannerDismissed||o.readOnlyPasswordPromptOpen!==r.readOnlyPasswordPromptOpen||o.readOnlyPasswordError!==r.readOnlyPasswordError||o.readOnlyCheckingPassword!==r.readOnlyCheckingPassword)&&i.setReadOnlyRecommendation(o.readOnlyRecommendation,o.readOnlyBannerDismissed,{promptOpen:o.readOnlyPasswordPromptOpen,error:o.readOnlyPasswordError,checking:o.readOnlyCheckingPassword}),(o.compatToasts!==r.compatToasts||o.inspectorOpen!==r.inspectorOpen)&&i.setCompatToasts(o.compatToasts,o.inspectorOpen?chunkYOEVEUFZ_cjs.Io:0),o.runProgramNotices!==r.runProgramNotices&&i.setRunProgramNotices(o.runProgramNotices),o.notesExpanded!==r.notesExpanded&&(i.notes.setExpanded(o.notesExpanded),i.ribbon?.setNotesExpanded(o.notesExpanded),i.statusBar?.setNotesExpanded(o.notesExpanded),i.mobileActionSheets?.setNotesExpanded(o.notesExpanded)),o.editTemplateMode!==r.editTemplateMode&&i.ribbon?.setTemplateEditing(o.editTemplateMode),(o.showGrid!==r.showGrid||o.showRulers!==r.showRulers||o.showGuides!==r.showGuides||o.snapToGrid!==r.snapToGrid||o.snapToShape!==r.snapToShape)&&i.ribbon?.setViewOptions(o),o.hasMacros!==r.hasMacros&&i.ribbon?.setHasMacros(o.hasMacros),o.presentationProperties.showSubtitles!==r.presentationProperties.showSubtitles&&i.ribbon?.setSubtitlesVisible(!!o.presentationProperties.showSubtitles),(o.currentSlide!==r.currentSlide||o.slides[o.currentSlide]?.hidden!==r.slides[r.currentSlide]?.hidden)&&i.ribbon?.setHideSlideActive(!!o.slides[o.currentSlide]?.hidden);}}var Hk=`
5
5
  .pptxv-account { display: flex; flex-direction: column; gap: 28px; max-width: 640px; margin-top: 24px; }
6
6
  .pptxv-account-section { padding: 20px; border: 1px solid var(--pptx-border); border-radius: 8px; background: var(--pptx-card); color: var(--pptx-card-foreground); }
7
7
  .pptxv-account-section h2 { margin: 0 0 14px; font-size: 14px; }
@@ -2884,7 +2884,7 @@ label.pptxv-options-row { cursor: pointer; }
2884
2884
  colour-only cue: the shared diagonal slash across the slide number, and the
2885
2885
  state spelled out in words. */
2886
2886
  .pptxv-sorter-num { display: inline-block; padding: 0 3px; }
2887
- .pptxv-sorter-card[data-pptx-slide-hidden] .pptxv-sorter-num { background-image: ${chunk5YHVN3PP_cjs.Pp}; }
2887
+ .pptxv-sorter-card[data-pptx-slide-hidden] .pptxv-sorter-num { background-image: ${chunkYOEVEUFZ_cjs.Pp}; }
2888
2888
  .pptxv-sorter-hidden { display: block; margin-top: 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--pptx-muted-foreground); }
2889
2889
  .pptxv-parity-backdrop { position: fixed; inset: 0; z-index: 1200; border: 0; background: rgb(0 0 0 / .55); }
2890
2890
  .pptxv-parity-dialog { position: fixed; z-index: 1201; top: 50%; left: 50%; display: flex; flex-direction: column; width: min(440px, calc(100vw - 32px)); max-height: 88vh; transform: translate(-50%, -50%); overflow: hidden; border: 1px solid var(--pptx-border); border-radius: 10px; background: var(--pptx-background); color: var(--pptx-foreground); box-shadow: 0 24px 70px rgb(0 0 0 / .34); }
@@ -4267,8 +4267,8 @@ label.pptxv-options-row { cursor: pointer; }
4267
4267
  .pptxv-smartart-categories { flex-basis: 120px; }
4268
4268
  .pptxv-smartart-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
4269
4269
  }
4270
- `;var pe=chunk5YHVN3PP_cjs.Go;function VD(){return `:where(:root) {
4271
- ${Object.entries(chunk5YHVN3PP_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
4270
+ `;var pe=chunkYOEVEUFZ_cjs.Go;function VD(){return `:where(:root) {
4271
+ ${Object.entries(chunkYOEVEUFZ_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
4272
4272
  `)}
4273
4273
  }`}var BD=`
4274
4274
  .pptxv {
@@ -4569,8 +4569,8 @@ ${Object.entries(chunk5YHVN3PP_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
4569
4569
  /* Hidden slide (PowerPoint's Hide Slide): dim the preview and strike the slide
4570
4570
  number with the shared diagonal slash. The slash carries the meaning on its
4571
4571
  own, because dimming is a colour signal and a dark thumbnail looks dim too. */
4572
- .pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-frame > :first-child { opacity: ${chunk5YHVN3PP_cjs.Qp}; }
4573
- .pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-num { background-image: ${chunk5YHVN3PP_cjs.Pp}; }
4572
+ .pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-frame > :first-child { opacity: ${chunkYOEVEUFZ_cjs.Qp}; }
4573
+ .pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-num { background-image: ${chunkYOEVEUFZ_cjs.Pp}; }
4574
4574
  .pptxv-thumb-hidden {
4575
4575
  position: absolute;
4576
4576
  right: 2px;
@@ -4999,7 +4999,7 @@ ${Object.entries(chunk5YHVN3PP_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
4999
4999
  gap: 4px;
5000
5000
  /* Pinned from the shared metric rather than left to emerge from the padding
5001
5001
  + button box, which is how this row ended up 2px shorter than the others. */
5002
- min-height: ${chunk5YHVN3PP_cjs.Ho.height}px;
5002
+ min-height: ${chunkYOEVEUFZ_cjs.Ho.height}px;
5003
5003
  padding: 2px 8px;
5004
5004
  border-top: 1px solid var(--pptx-border);
5005
5005
  background: color-mix(in srgb, var(--pptx-secondary) 50%, transparent);
@@ -5187,6 +5187,6 @@ ${Vk}
5187
5187
  ${n0}
5188
5188
  ${Qk}
5189
5189
  ${Kk}
5190
- ${Zk}`}var p0="pptx-vanilla-viewer-styles";function _p(e){if(e.getElementById(p0))return;let t=e.createElement("style");t.id=p0,t.textContent=yi(),(e.head??e.documentElement).appendChild(t);}function d0(){return yi()}function c0(e){if(!e.editable)return null;let t={selectedElementId:null,selectedElementIds:[]};return e.masterViewTarget?{...t,masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false}:e.slideMasters.length>0?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:"slides",editTemplateMode:true}:e.notesMaster||e.handoutMaster?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:e.notesMaster?"notes":"handout",editTemplateMode:true}:{...t,editTemplateMode:!e.editTemplateMode}}function Gp(e,t){return t.find(n=>n.theme===e)?.key}function m0(e,t,n){let o=t&&n.some(r=>r.key===t)?t:Gp(e.theme,n)??"default";return {key:o,theme:n.find(r=>r.key===o)?.theme??e.theme}}function u0(e){return e.availableLocales?e.availableLocales:Array.from(new Set(["en",...Object.keys(e.messages??{})])).map(n=>chunkIQ7MDPEN_cjs.E.find(o=>o.code===n)??{code:n,label:n,nativeLabel:n})}function x0(e,t,n){return t&&n.some(o=>o.code===t)?t:e.locale??"en"}function g0(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk5YHVN3PP_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function b0(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=null,a=()=>{r?.remove(),r=null,i?.remove(),i=null,s&&(t.removeEventListener("pointerdown",s,true),t.removeEventListener("keydown",s,true),s=null);},l=(m,g)=>{i?.remove();let x=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`});x.setAttribute("role","menu"),x.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));let b=Uo(n.get());for(let v of b){let f=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-context-menu-item");f.type="button",f.setAttribute("role","menuitem"),f.textContent=v.name,f.addEventListener("click",()=>{e.getEditActions().applyLayout(v.path),a();}),x.appendChild(f);}(o.closest(".pptxv")??t.body).appendChild(x),g0(x,t,m,g),i=x;},p=(m,g,x)=>{let b=chunkIQ7MDPEN_cjs.w(t,"button","pptxv-context-menu-item");if(b.type="button",b.setAttribute("role",m.checked===void 0?"menuitem":"menuitemcheckbox"),m.checked!==void 0){b.setAttribute("aria-checked",String(m.checked));let v=chunkIQ7MDPEN_cjs.w(t,"span","pptxv-context-menu-check");v.textContent=m.checked?"\u2713":"",b.appendChild(v);}return b.append(e.getTranslator()(m.labelKey)),b.disabled=m.disabled===true,b.addEventListener("click",()=>{let v=e.getEditActions();switch(m.id){case "paste":a(),v.paste();break;case "layout":r?.remove(),r=null,l(g,x);break;case "reset-slide":a(),v.resetSlide();break;case "format-background":a(),n.set({selectedElementId:null,selectedElementIds:[],inspectorOpen:true});break;case "grid-and-guides":a(),v.toggleViewOption("showGrid");break;case "ruler":a(),v.toggleViewOption("showRulers");break;default:a();}}),b},d=(m,g,x)=>{r=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu",{left:`${g}px`,top:`${x}px`}),r.dataset.pptxContextMenu="true",r.dataset.pptxCanvasContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.canvasContextMenu.ariaLabel"));for(let b of m){if(b.separatorBefore){let v=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(p(b,g,x));}(o.closest(".pptxv")??t.body).appendChild(r),g0(r,t,g,x),s=b=>{if(b instanceof KeyboardEvent&&b.key!=="Escape")return;let v=b.target;v instanceof Node&&(r?.contains(v)||i?.contains(v))||a();},t.addEventListener("pointerdown",s,true),t.addEventListener("keydown",s,true);},u=m=>{let g=n.get();if(!g.editable||g.presenting)return;let x=chunk5YHVN3PP_cjs.Jl(chunk5YHVN3PP_cjs.Fm(m.target,e.getStageRoot()),m.target,g.selectedElementId);if(x&&chunk5YHVN3PP_cjs.jo(x,g.editTemplateMode))return;let b=chunk5YHVN3PP_cjs.ir(chunk5YHVN3PP_cjs.Tl({hasClipboard:g.clipboardPayload!==null,showGrid:g.showGrid,showRulers:g.showRulers}),e.getCustomization?.()??chunk5YHVN3PP_cjs.Zq);b.length!==0&&(m.preventDefault(),a(),d(b,m.clientX,m.clientY));};return o.addEventListener("contextmenu",u),{destroy(){o.removeEventListener("contextmenu",u),a();}}}function Et(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-overlay"),r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-info-scrim"),i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-dialog"),s=()=>o.remove();r.type="button",r.setAttribute("aria-label",t("pptx.common.close")),r.addEventListener("click",s),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=chunkIQ7MDPEN_cjs.w(e,"header"),l=chunkIQ7MDPEN_cjs.w(e,"h2");l.textContent=n;let p=chunkIQ7MDPEN_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),p.addEventListener("click",s),a.append(l,p);let d=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-body"),u=chunkIQ7MDPEN_cjs.w(e,"footer");return i.append(a,d,u),o.append(r,i),e.body.appendChild(o),{overlay:o,body:d,footer:u,close:s}}function Si(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"button","is-primary");o.type="button",o.textContent=t("pptx.common.done"),o.addEventListener("click",n.close),n.footer.appendChild(o);}function f0(e,t,n,o){let r=Et(e,t,t("pptx.digitalSignatures.title")),i=chunkIQ7MDPEN_cjs.w(e,"div",`pptxv-info-notice${n?" is-signed":""}`),s=chunkIQ7MDPEN_cjs.w(e,"b");s.textContent=n?"\u2713":"i";let a=chunkIQ7MDPEN_cjs.w(e,"p");if(a.textContent=n?`${t("pptx.digitalSignatures.signed")} ${t("pptx.digitalSignatures.signatureCount",{count:o})}`:t("pptx.digitalSignatures.noSignatures"),i.append(s,a),r.body.appendChild(i),n){let l=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-notice is-warning"),p=chunkIQ7MDPEN_cjs.w(e,"b");p.textContent="i";let d=chunkIQ7MDPEN_cjs.w(e,"p");d.textContent=t("pptx.digitalSignatures.editWarning"),l.append(p,d),r.body.appendChild(l);}return Si(e,t,r),r.overlay}function v0(e,t,n){let o=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-overlay"),r=chunkIQ7MDPEN_cjs.w(e,"button","pptxv-props-scrim");r.setAttribute("aria-label",t("pptx.common.close"));let i=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-labelledby","pptxv-props-title");let s=structuredClone(n.core??{}),a=structuredClone(n.app??{}),l=n.custom.map(L=>({...L})),p=JSON.stringify({core:s,app:a,custom:l}),d=()=>o.remove();r.addEventListener("click",d);let u=chunkIQ7MDPEN_cjs.w(e,"header"),m=chunkIQ7MDPEN_cjs.w(e,"h2");m.id="pptxv-props-title",m.textContent=t("pptx.documentProperties.dialogTitle");let g=chunkIQ7MDPEN_cjs.w(e,"button");g.type="button",g.setAttribute("aria-label",t("pptx.common.close")),g.textContent="\xD7",g.addEventListener("click",d),u.append(m,g);let x=chunkIQ7MDPEN_cjs.w(e,"nav","pptxv-props-tabs");x.setAttribute("aria-label",t("pptx.documentProperties.dialogTitle"));let b=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-body"),v="summary",f=chunkIQ7MDPEN_cjs.w(e,"button","is-primary"),S=()=>{f&&(f.disabled=!n.editable||JSON.stringify({core:s,app:a,custom:l})===p);},y=(L,M,D)=>{let I=chunkIQ7MDPEN_cjs.w(e,"label"),R=chunkIQ7MDPEN_cjs.w(e,"span");R.textContent=L;let O=chunkIQ7MDPEN_cjs.w(e,"input");return O.value=M,O.disabled=!n.editable,O.addEventListener("input",()=>{D(O.value),S();}),I.append(R,O),I},h=()=>{let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-grid"),M=[["title","pptx.documentProperties.summary.title"],["subject","pptx.documentProperties.summary.subject"],["creator","pptx.documentProperties.summary.author"],["keywords","pptx.documentProperties.summary.keywords"],["category","pptx.documentProperties.summary.category"],["description","pptx.documentProperties.summary.description"]];for(let[D,I]of M)L.appendChild(y(t(I),s[D]??"",R=>s[D]=R));L.append(y(t("pptx.documentProperties.summary.manager"),a.manager??"",D=>{a.manager=D;}),y(t("pptx.documentProperties.summary.company"),a.company??"",D=>{a.company=D;})),b.replaceChildren(L);},C=()=>{let L=chunk5YHVN3PP_cjs.op(n.slides,n.core),M=chunkIQ7MDPEN_cjs.w(e,"dl","pptxv-props-stats"),D=[["pptx.documentProperties.statistics.slides",L.slideCount],["pptx.documentProperties.statistics.hiddenSlides",L.hiddenSlideCount],["pptx.documentProperties.statistics.notes",L.noteCount],["pptx.documentProperties.statistics.elements",L.elementCount],["pptx.documentProperties.statistics.words",L.wordCount],["pptx.documentProperties.statistics.paragraphs",L.paragraphCount],["pptx.documentProperties.created",L.created??"-"],["pptx.documentProperties.modified",L.modified??"-"]];for(let[I,R]of D){let O=chunkIQ7MDPEN_cjs.w(e,"dt");O.textContent=t(I);let B=chunkIQ7MDPEN_cjs.w(e,"dd");B.textContent=String(R),M.append(O,B);}b.replaceChildren(M);},w=()=>{let L=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-custom");l.forEach((D,I)=>{let R=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-props-custom-row"),O=chunkIQ7MDPEN_cjs.w(e,"input");O.value=D.name,O.disabled=!n.editable,O.setAttribute("aria-label",t("pptx.documentProperties.custom.name")),O.addEventListener("input",()=>{D.name=O.value,S();});let B=D.type==="bool"?chunkIQ7MDPEN_cjs.w(e,"select"):chunkIQ7MDPEN_cjs.w(e,"input");if(B instanceof HTMLInputElement&&(B.type=D.type==="i4"?"number":"text"),B instanceof HTMLSelectElement)for(let[_,N]of [["true","pptx.documentProperties.custom.yes"],["false","pptx.documentProperties.custom.no"]]){let W=chunkIQ7MDPEN_cjs.w(e,"option");W.value=_,W.textContent=t(N),B.appendChild(W);}B.value=D.value,B.disabled=!n.editable,B.setAttribute("aria-label",t("pptx.documentProperties.custom.value")),B.addEventListener("input",()=>{D.value=B.value,S();});let F=chunkIQ7MDPEN_cjs.w(e,"select");F.disabled=!n.editable,F.setAttribute("aria-label",t("pptx.documentProperties.custom.type"));for(let[_,N]of [["lpwstr","pptx.documentProperties.custom.typeText"],["i4","pptx.documentProperties.custom.typeNumber"],["filetime","pptx.documentProperties.custom.typeDate"],["bool","pptx.documentProperties.custom.typeYesNo"]]){let W=chunkIQ7MDPEN_cjs.w(e,"option");W.value=_,W.textContent=t(N),F.appendChild(W);}F.value=D.type,F.addEventListener("change",()=>{D.type=F.value,D.type==="bool"&&!["true","false"].includes(D.value)&&(D.value="true"),S(),w();});let V=chunkIQ7MDPEN_cjs.w(e,"button");V.type="button",V.disabled=!n.editable,V.textContent="\xD7",V.setAttribute("aria-label",t("pptx.documentProperties.custom.deleteProperty")),V.addEventListener("click",()=>{l=l.filter((_,N)=>N!==I),S(),w();}),R.append(O,B,F,V),L.appendChild(R);});let M=chunkIQ7MDPEN_cjs.w(e,"button");M.type="button",M.disabled=!n.editable,M.textContent=t("pptx.documentProperties.custom.addProperty"),M.addEventListener("click",()=>{l=[...l,{name:"",value:"",type:"lpwstr"}],S(),w();}),L.appendChild(M),b.replaceChildren(L);},A=()=>{v==="summary"?h():v==="statistics"?C():w();},P=([L,M])=>{let D=chunkIQ7MDPEN_cjs.w(e,"button");D.type="button",D.textContent=t(M),D.addEventListener("click",()=>{v=L;for(let I of x.querySelectorAll("button"))I.classList.toggle("is-active",I===D);A();}),D.classList.toggle("is-active",L===v),x.appendChild(D);};[["summary","pptx.documentProperties.tabs.general"],["statistics","pptx.documentProperties.tabs.statistics"],["custom","pptx.documentProperties.tabs.custom"]].forEach(P);let T=chunkIQ7MDPEN_cjs.w(e,"footer"),E=chunkIQ7MDPEN_cjs.w(e,"button");return E.type="button",E.textContent=t("pptx.common.cancel"),E.addEventListener("click",d),f.type="button",f.textContent=t("pptx.common.save"),S(),f.addEventListener("click",()=>{n.onSave(s,a,l),d();}),T.append(E,f),i.append(u,x,b,T),o.append(r,i),A(),e.body.appendChild(o),o}function h0(e,t,n){let o=Et(e,t,t("pptx.fonts.embedFonts")),r=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.fonts.embedDescription");let i=n.canEmbed!==false,s=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-info-toggle"),a=chunkIQ7MDPEN_cjs.w(e,"input");a.type="checkbox",a.checked=n.enabled,a.disabled=!i,a.addEventListener("change",()=>n.onToggle(a.checked));let l=chunkIQ7MDPEN_cjs.w(e,"span");l.textContent=t("pptx.fonts.enableEmbedding"),s.append(a,l);let p=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-status");p.textContent=t(i?"pptx.fonts.embedKeepsExisting":n.unavailableKey??"pptx.fonts.embedUnavailable");let d=chunk5YHVN3PP_cjs.cj(n.slides),u=new Set(n.embeddedFonts.map(b=>b.name)),m=chunkIQ7MDPEN_cjs.w(e,"h3");m.textContent=`${t("pptx.fonts.usedFonts")} (${d.length})`;let g=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-list"),x=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-status");return x.textContent=t("pptx.fonts.scanning"),g.appendChild(x),chunk5YHVN3PP_cjs.pp(d).then(b=>{if(o.overlay.isConnected){g.replaceChildren();for(let v of d){let f=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-row"),S=chunkIQ7MDPEN_cjs.w(e,"span");S.textContent=v;let y=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-info-badges");if(u.has(v)){let C=chunkIQ7MDPEN_cjs.w(e,"b");C.textContent=t("pptx.fonts.embedded"),y.appendChild(C);}let h=chunkIQ7MDPEN_cjs.w(e,"em");h.classList.toggle("is-missing",!b.has(v)),h.textContent=b.has(v)?"\u2713":t("pptx.fonts.notFound"),y.appendChild(h),f.append(S,y),g.appendChild(f);}}}),o.body.append(r,s,p,m,g),Si(e,t,o),o.overlay}function S0(e,t,n){let o=Et(e,t,t("pptx.security.protectPresentation"));if(n.protected){let m=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-protected");m.textContent=`\u2713 ${t("pptx.security.currentlyProtected")}`,o.body.appendChild(m);}let r=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.security.description");let i=y0(e,t("pptx.security.password")),s=y0(e,t("pptx.security.confirmPassword")),a=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-strength"),l=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-error");if(l.setAttribute("role","alert"),i.input.addEventListener("input",()=>{l.textContent="";let m=chunk5YHVN3PP_cjs.qp(i.input.value);a.textContent=i.input.value?"\u25CF".repeat(m+1):"";}),s.input.addEventListener("input",()=>l.textContent=""),o.body.append(r,i.label,a,s.label,l),n.protected){let m=chunkIQ7MDPEN_cjs.w(e,"button","is-danger");m.type="button",m.textContent=t("pptx.security.removePassword"),m.addEventListener("click",()=>{n.onRemove(),o.close();}),o.footer.appendChild(m);}let p=chunkIQ7MDPEN_cjs.w(e,"span","pptxv-info-spacer"),d=chunkIQ7MDPEN_cjs.w(e,"button");d.type="button",d.textContent=t("pptx.common.cancel"),d.addEventListener("click",o.close);let u=chunkIQ7MDPEN_cjs.w(e,"button","is-primary");return u.type="button",u.textContent=t(n.protected?"pptx.security.updatePassword":"pptx.security.setPassword"),u.addEventListener("click",()=>{let m=chunk5YHVN3PP_cjs.rp(i.input.value,s.input.value);if(m){l.textContent=t(m==="required"?"pptx.security.errorPasswordRequired":m==="mismatch"?"pptx.security.errorPasswordMismatch":"pptx.security.errorPasswordTooShort");return}n.onSet(i.input.value),o.close();}),o.footer.append(p,d,u),o.overlay}function y0(e,t){let n=chunkIQ7MDPEN_cjs.w(e,"label","pptxv-info-field"),o=chunkIQ7MDPEN_cjs.w(e,"span");o.textContent=t;let r=chunkIQ7MDPEN_cjs.w(e,"input");return r.type="password",n.append(o,r),{label:n,input:r}}var zD=10;function C0(e){let{doc:t,store:n,getTranslator:o,onChoose:r}=e,i=null,s;function a(){n.set({pasteOptionsToolbar:null});}function l(){s?.(),s=void 0,i?.remove(),i=null;}function p(u=0){l();let g=n.get().pasteOptionsToolbar?.[0]?.id;if(!g)return;let x=chunk5YHVN3PP_cjs.ee(t,g,{canvasOnly:true});if(!x){let y=t.defaultView;if(y&&u<zD){let h=y.requestAnimationFrame(()=>p(u+1));s=()=>y.cancelAnimationFrame(h);}return}let b=x.getBoundingClientRect(),v=o(),f=chunkIQ7MDPEN_cjs.w(t,"div","pptxv-paste-options");f.setAttribute("role","toolbar"),f.setAttribute("tabindex","-1"),f.setAttribute("aria-label",v("pptx.pasteSpecial.optionsLabel")),f.setAttribute("data-pptx-paste-options",""),f.style.position="fixed",f.style.left=`${b.right+4}px`,f.style.top=`${b.bottom+4}px`,f.addEventListener("mousedown",y=>y.stopPropagation());for(let y of chunk5YHVN3PP_cjs.Wl){let h=chunkIQ7MDPEN_cjs.w(t,"button");h.type="button",h.textContent=v(y.labelKey),h.title=v(y.labelKey),h.addEventListener("click",()=>r(y.id)),f.appendChild(h);}t.body.appendChild(f),i=f;let S=t.defaultView?.setTimeout(()=>{t.addEventListener("pointerdown",a,true),t.addEventListener("keydown",a,true);},0);s=()=>{S!==void 0&&t.defaultView?.clearTimeout(S),t.removeEventListener("pointerdown",a,true),t.removeEventListener("keydown",a,true);};}p();let d=n.subscribe((u,m)=>{u.pasteOptionsToolbar!==m.pasteOptionsToolbar&&p();});return {destroy(){d(),l();}}}function w0(e,t,n){let o=Et(e,t,t("pptx.digitalSignatures.strippedTitle")),r=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-info-notice is-warning"),i=chunkIQ7MDPEN_cjs.w(e,"b");i.textContent="!";let s=chunkIQ7MDPEN_cjs.w(e,"div"),a=chunkIQ7MDPEN_cjs.w(e,"p");a.textContent=t("pptx.digitalSignatures.strippedMessage",{count:n});let l=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-info-description");l.textContent=t("pptx.digitalSignatures.editWarning"),s.append(a,l),r.append(i,s),o.body.appendChild(r);let p=chunkIQ7MDPEN_cjs.w(e,"button");p.type="button",p.textContent=t("pptx.common.cancel"),p.addEventListener("click",o.close);let d=chunkIQ7MDPEN_cjs.w(e,"button","is-primary");return d.type="button",d.textContent=t("pptx.digitalSignatures.strippedConfirm"),d.addEventListener("click",o.close),o.footer.append(p,d),o.overlay}function E0(e,t,n,o){t.querySelector(".pptxv-version-history")?.remove();let r=chunkIQ7MDPEN_cjs.w(e,"aside","pptxv-version-history");r.setAttribute("aria-label",n("pptx.versionHistory.title"));let i=chunkIQ7MDPEN_cjs.w(e,"header"),s=chunkIQ7MDPEN_cjs.w(e,"span");s.textContent="\u25F7";let a=chunkIQ7MDPEN_cjs.w(e,"h2");a.textContent=n("pptx.versionHistory.title");let l=chunkIQ7MDPEN_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.common.close")),l.addEventListener("click",()=>r.remove()),i.append(s,a,l);let p=chunkIQ7MDPEN_cjs.w(e,"div","pptxv-version-content");return p.textContent=n("pptx.common.loading"),r.append(i,p),t.appendChild(r),chunk5YHVN3PP_cjs.Cj(o.filePath).then(d=>{if(p.replaceChildren(),!d){let S=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-version-empty");S.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(S);return}let u=chunkIQ7MDPEN_cjs.w(e,"article"),m=chunkIQ7MDPEN_cjs.w(e,"strong");m.textContent=chunk5YHVN3PP_cjs.Mj(d.timestamp);let g=chunkIQ7MDPEN_cjs.w(e,"small");g.textContent=chunk5YHVN3PP_cjs.Nj(d.timestamp);let x=chunkIQ7MDPEN_cjs.w(e,"p");x.textContent=chunk5YHVN3PP_cjs.ap(d.size);let b=chunkIQ7MDPEN_cjs.w(e,"footer"),v=chunkIQ7MDPEN_cjs.w(e,"button","is-primary");v.type="button",v.textContent=n("pptx.versionHistory.restore"),v.addEventListener("click",()=>{Promise.resolve(o.onRestore(d.data)).then(()=>r.remove());});let f=chunkIQ7MDPEN_cjs.w(e,"button","is-danger");f.type="button",f.textContent=n("pptx.common.delete"),f.addEventListener("click",()=>{chunk5YHVN3PP_cjs.Ej(d.key).then(()=>u.remove()).catch(()=>{});}),b.append(v,f),u.append(m,g,x,b),p.appendChild(u);}).catch(()=>{p.replaceChildren();let d=chunkIQ7MDPEN_cjs.w(e,"p","pptxv-version-empty");d.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(d);}),r}function T0(e,t,n,o){let r=()=>{let d=e.get(),u=d.activeCustomShowId?d.customShows.find(({id:g})=>g===d.activeCustomShowId):void 0,m=chunk5YHVN3PP_cjs.Jp(d.presentationProperties,d.slides.length);return chunk5YHVN3PP_cjs.Dp(d.slides,u,m)},i=(d,u=false)=>{e.set({currentSlide:Vt(d,e.get().slides.length),endOfShow:false,enteringBackward:u});},s=chunk5YHVN3PP_cjs.Fk(),a=()=>{let{zoom:d,fitScale:u,manual:m}=s.getState();e.set({zoom:m?u*d:"fit"});};s.subscribe(a);let l=()=>{let d=t.fitScale();return s.dispatch({type:"set-fit-scale",fitScale:d}),d};return {next:()=>{let d=e.get();if(d.endOfShow){e.set({endOfShow:false}),n?.();return}if(d.presenting&&t.presentationPlayback.advance())return;if(d.presenting){let g=t.presentationPlayback.consumeZoomReturnOnAdvance(d.currentSlide);if(g!==void 0){i(g);return}}let u=r(),m=d.presentationProperties.loopContinuously===true;if(d.presenting&&!m&&!chunk5YHVN3PP_cjs.Gp(d.currentSlide,u)){if(o?.()===false){n?.();return}e.set({endOfShow:true});return}i(d.presenting?chunk5YHVN3PP_cjs.Ep(d.currentSlide,u,{loop:m})??d.currentSlide:d.currentSlide+1);},prev:()=>{if(e.get().endOfShow){e.set({endOfShow:false});return}if(e.get().presenting&&t.presentationPlayback.isSeededCompleted()){t.presentationPlayback.replayCurrentSlide(document);return}let d=e.get();i(d.presenting?chunk5YHVN3PP_cjs.Fp(d.currentSlide,r())??d.currentSlide:d.currentSlide-1,d.presenting);},firstSlide:()=>{let d=e.get();i(d.presenting?chunk5YHVN3PP_cjs.Kp(r())??0:0);},lastSlide:()=>{let d=e.get();i(d.presenting?chunk5YHVN3PP_cjs.Lp(r())??d.slides.length-1:d.slides.length-1);},goToSlide:i,navigateToZoomTarget:d=>{let u=e.get(),m=t.presentationPlayback.navigateToZoomTarget(d,u.currentSlide,u.slides);i(m);},firstShowSlideIndex:()=>chunk5YHVN3PP_cjs.Kp(r())??0,presentationEntryIndex:()=>chunk5YHVN3PP_cjs.Mp(e.get().currentSlide,r()),slideCount:()=>e.get().slides.length,currentSlide:()=>e.get().currentSlide,zoom:()=>t.effectiveScale(),setZoom:d=>{if(d==="fit"){s.dispatch({type:"zoom-to-fit"});return}let u=l();s.dispatch({type:"set-zoom",zoom:u>Number.EPSILON?d/u:d});},zoomIn:()=>{l(),s.dispatch({type:"zoom-in"});},zoomOut:()=>{l(),s.dispatch({type:"zoom-out"});},zoomToFit:()=>s.dispatch({type:"zoom-to-fit"})}}var ND=["pptxv-reduced-motion","pptxv-no-hw-accel","pptxv-compat-display"],P0=[["showGrid","showGrid"],["showRulers","showRulers"],["snapToGrid","snapToGrid"],["spellCheckEnabled","spellCheck"]];function A0(e,t){let n=chunk5YHVN3PP_cjs.Fq(t),o=false,r=a=>{o=true;try{let l=chunk5YHVN3PP_cjs.oq(a),p=e.store.get(),d={};for(let[m,g]of P0)p[m]!==l[g]&&(d[m]=l[g]);Object.keys(d).length>0&&e.store.set(d);let u=e.root();if(u){u.classList.toggle("pptxv-showGrid",l.showGrid),u.classList.toggle("pptxv-showRulers",l.showRulers),u.classList.toggle("pptxv-snapToGrid",l.snapToGrid);let m=new Set(chunk5YHVN3PP_cjs.yq(a,"pptxv"));for(let g of ND)u.classList.toggle(g,m.has(g));u.classList.toggle("pptxv-no-show-popup",!a.advanced.slideShowShowPopupToolbar);}e.isAutosaveEnabled()!==l.autoSave&&e.setAutosaveEnabled(l.autoSave),e.setAutosaveIntervalMs(chunk5YHVN3PP_cjs.rq(a)*1e3),e.setHistoryDepth(chunk5YHVN3PP_cjs.qq(a)),e.setRibbonHiddenTabs(a.ribbon.hiddenTabIds),e.refreshQuickAccess(),e.applyScreenTips(),e.renderStage();}finally{o=false;}},i=n.subscribe(r),s=e.store.subscribe((a,l)=>{if(o)return;let p=n.getOptions(),d=false;for(let[u,m]of P0)a[u]!==l[u]&&chunk5YHVN3PP_cjs.oq(p)[m]!==a[u]&&(p=chunk5YHVN3PP_cjs.pq(p,m,a[u]),d=true);d&&n.setOptions(p);});return {optionsStore:n,getOptions:()=>n.getOptions(),applyAll:()=>r(n.getOptions()),screenTip:(a,l,p)=>chunk5YHVN3PP_cjs.sq(n.getOptions(),a,l,p),transformCommittedText:a=>chunk5YHVN3PP_cjs.eq(a,n.getOptions().proofing),notifyActionSuccess:()=>chunk5YHVN3PP_cjs.Cq(n.getOptions()),notifyAutosaveEnabled(a){!o&&n.getOptions().save.autoSave!==a&&n.setValue("save","autoSave",a);},isProtectedView:()=>chunk5YHVN3PP_cjs.vq(n.getOptions()),dispose(){i(),s();}}}var k0="pptx-vanilla-google-fonts";function I0(e,t){chunk5YHVN3PP_cjs.gj(e,k0,t);}function L0(e){e.getElementById(k0)?.remove();}var Yo=class extends ti{container;doc;options;store;renderer;t;currentTheme;availableThemes;availableLocales;currentThemeKey;currentLocale;lifecycle;editor;exporter;loading;registry;sessions;controls;destroyed=false;presenterChannel=null;audienceWindow=null;presenterSessionId="";presenterSequence=0;presenterSnapshot=chunk5YHVN3PP_cjs.vk();presenterView=null;presenterCaptions=null;presenterShowGuard=chunk5YHVN3PP_cjs.al();userFontsStyle=null;signatureWarningAcknowledged=false;detachSignatureWarning=null;webfontsToken=0;requestedEditable=false;annotations;parityWorkflows;aiChat=null;aiFocus=null;contextMenu=null;canvasContextMenu=null;pasteOptionsToolbar=null;rulers=null;optionsController;customization;constructor(t,n={}){super(),this.container=t,this.doc=t.ownerDocument,this.options=n,this.customization=JC(n),this.requestedEditable=n.editable??false;let o=chunk5YHVN3PP_cjs.Up();this.availableThemes=n.availableThemes??chunk5YHVN3PP_cjs.Ia,this.availableLocales=u0(n);let r=m0(n,o.themeKey,this.availableThemes);this.currentThemeKey=r.key,this.currentTheme=r.theme,this.currentLocale=x0(n,o.localeCode,this.availableLocales),this.t=Ht(this.currentLocale,n.messages),this.registry=n.registry??chunkIQ7MDPEN_cjs.J(),this.store=ci(mi()),this.loading=LA({options:n,store:this.store,getTranslator:()=>this.t,getEditor:()=>this.editor,onContentApplying:a=>this.sessions?.beginCollaborationContentLoad(a),onContentApplied:a=>{this.sessions?.notifyCollaborationContentLoaded(a),a==="bootstrap"&&this.lifecycle?.chrome.ribbon?.showDefaultTab();},getAllowExternalContent:()=>this.optionsController?.getOptions().trust.allowExternalContent??chunk5YHVN3PP_cjs.mq.trust.allowExternalContent,shouldOpenProtectedView:()=>this.optionsController?.isProtectedView()??false,setEditableForLoad:a=>this.setEditable(a)}),this.renderer=Fp({doc:this.doc,store:this.store,registry:this.registry,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getFitOptions:()=>this.options,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getPixelateMosaicAnimation:()=>this.optionsController?.getOptions().advanced.pixelateMosaicAnimation??false,onHandoutSlidesPerPageChange:a=>this.editor?.setHandoutSlidesPerPage(a),onMasterBackgroundColorChange:a=>this.editor?.getEditActions().setSlideBackgroundColor(a),onMasterCrudAction:a=>{this.editor?.getEditActions().masterView.runMasterViewCrudAction(a);},onSectionToggle:a=>this.editor?.getEditActions().sections.toggleSection(a),onSectionRename:(a,l)=>this.editor?.getEditActions().sections.renameSection(a,l),onSectionDelete:a=>this.editor?.getEditActions().sections.deleteSection(a),onSectionMove:(a,l)=>this.editor?.getEditActions().sections.moveSection(a,l),onZoomClick:a=>this.controls.navigateToZoomTarget(a),onCommentMarkerClick:()=>this.parityWorkflows.openComments(),onSmartArtNodeTextChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData||!chunk5YHVN3PP_cjs.Kd(a.smartArtData,l,p))return;let d=chunk5YHVN3PP_cjs.E(a.smartArtData,l,p),u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunk5YHVN3PP_cjs.wn(d,a.id,u)});},onSmartArtNodeFillChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData)return;let d=chunk5YHVN3PP_cjs.I(a.smartArtData,l,{fillColor:p});if(d!==a.smartArtData){let u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunk5YHVN3PP_cjs.wn(d,a.id,u)});}},onChartPointChange:(a,l)=>{a.type==="chart"&&this.editor?.applyElementPatch(a.id,{chartData:l});},onTableResizeColumns:(a,l)=>{a.type!=="table"||!a.tableData||this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,columnWidths:l}});},onTableResizeRow:(a,l,p)=>{if(a.type!=="table"||!a.tableData)return;let d=a.tableData.rows.map((u,m)=>m===l?{...u,height:p}:u);this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,rows:d}});},onChartPartSelect:(a,l)=>{this.store.set({chartPartSelection:{elementId:a.id,part:l}});},onStageRendered:()=>{this.editor?.onStageRendered(),this.rulers?.sync(),this.annotations?.sync(this.presenterSnapshot);}}),this.controls=T0(this.store,this.renderer,()=>{this.exitPresentation();},()=>this.optionsController?.getOptions().advanced.slideShowEndWithBlackSlide),_p(this.doc);let i=chunk5YHVN3PP_cjs.xb(n.fonts??[]);i&&(this.userFontsStyle=this.doc.createElement("style"),this.userFontsStyle.dataset.pptxUserFonts="vanilla",this.userFontsStyle.textContent=i,this.doc.head.appendChild(this.userFontsStyle)),this.lifecycle=vl(yl(this)),this.editor=Cp({doc:this.doc,store:this.store,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),getHandler:()=>this.loading.getHandler(),setHandler:a=>this.loading.setHandler(a),getUserName:()=>this.optionsController?.getOptions().general.userName,transformCommittedText:a=>this.optionsController?.transformCommittedText(a)??a,onChange:n.onChange,onCursorMove:(a,l)=>this.sessions.setCollaborationCursor(a,l),onInlineTextInput:(a,l)=>this.sessions.publishCollaborationInlineText(a,l),getLivePatcher:()=>this.sessions.getCollaborationLivePatcher(),flushInlineTextInput:()=>this.sessions.flushCollaborationLivePatch(),getKeyboardCustomization:()=>this.customization.getResolved().keyboard,getCustomization:()=>this.customization.getResolved()}),this.editor.attachChrome(),this.rulers=fk({doc:this.doc,store:this.store,getStageWrap:()=>this.lifecycle?.chrome.stageWrap??null,getScale:()=>this.renderer.effectiveScale(),getUnit:()=>n.rulerUnit??"inches",onCreateGuide:(a,l)=>this.editor?.getEditActions().addGuide(a,l)}),this.annotations=ak({doc:this.doc,t:this.t,store:this.store,editor:this.editor,getChrome:()=>this.lifecycle.chrome,getSnapshot:()=>this.presenterSnapshot,updateSnapshot:a=>this.updatePresenterSnapshot(a),shouldPromptKeepAnnotations:()=>this.optionsController?.getOptions().advanced.slideShowPromptKeepInkAnnotations??true}),this.exporter=Il({doc:this.doc,container:this.container,store:this.store,registry:this.registry,getTranslator:()=>this.t,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getImageResolutionScale:()=>chunk5YHVN3PP_cjs.uq(this.optionsController.getOptions()),getIncludeHiddenSlides:()=>this.optionsController.getOptions().advanced.printHiddenSlides,getPrintHighQuality:()=>this.optionsController.getOptions().advanced.printHighQuality,fileName:n.fileName}),this.optionsController=A0({store:this.store,root:()=>this.lifecycle?.chrome.root??null,isAutosaveEnabled:()=>this.sessions?.isAutosavePreferred()??true,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),setAutosaveIntervalMs:a=>this.sessions?.setAutosaveIntervalMs(a),setHistoryDepth:a=>this.editor?.setHistoryDepth(a),setRibbonHiddenTabs:a=>this.lifecycle?.chrome.ribbon?.setHiddenOptionTabs(a),refreshQuickAccess:()=>{this.lifecycle?.chrome.titleBar?.refreshQuickAccess(),this.lifecycle?.chrome.setQuickAccessPosition(this.getQuickAccessOptions().position);},applyScreenTips:()=>this.lifecycle?.chrome.ribbon?.applyScreenTips(a=>this.optionsController.screenTip(a)),renderStage:()=>this.renderer.renderStage()},{initial:{save:{autoSave:n.autosave??true}}});let s={doc:this.doc,t:this.t,store:this.store,editor:this.editor,optionsStore:this.optionsController.optionsStore,clearOptionsCache:()=>this.clearOptionsCache(),registerCustomFont:a=>{let l=this.store.get().customFontFamilies;l.includes(a)||this.store.set({customFontFamilies:[...l,a]});},aiEnabled:false,getCustomization:()=>this.customization.getResolved(),root:()=>this.lifecycle.chrome.root,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),print:a=>this.print(a),goToSlide:a=>this.goToSlide(a),renderSlideNode:(a,l)=>this.renderer.renderSlideNode(a,l),enterPresentation:()=>this.enterPresentation(),setTheme:a=>this.setTheme(a),setLocale:a=>this.setLocale(a),getThemeState:()=>({key:this.currentThemeKey,catalog:this.availableThemes}),getLocaleState:()=>({code:this.currentLocale,catalog:this.availableLocales}),getAddinStatus:()=>{let a=!this.optionsController.getOptions().advanced.disable3DRendering;return {smartArt3d:a,model3d:a,collaboration:this.getCollaborationStatus()==="connected"}}};Object.defineProperty(s,"t",{get:()=>this.t}),Object.defineProperty(s,"aiEnabled",{get:()=>this.customization.isAiEnabled()}),this.parityWorkflows=nk(s),this.setupContextMenu(),this.pasteOptionsToolbar=C0({doc:this.doc,store:this.store,getTranslator:()=>this.t,onChoose:a=>{let l=this.store.get().pasteOptionsToolbar?.[0];if(this.store.set({pasteOptionsToolbar:null}),!!l){if(a==="picture"){Xr(this.doc,l.id,l.sourceClone).then(p=>{p&&this.editor.getEditActions().replaceElement(l.id,p);});return}this.editor.getEditActions().reformatPasted(l.id,l.sourceClone,a);}}}),n.editable&&(this.store.set({editable:true}),this.editor.setEditable(true)),this.store.subscribe(Np({getChrome:()=>this.lifecycle.chrome,renderer:this.renderer,callbacks:n})),this.store.subscribe((a,l)=>{this.presenterSessionId&&this.syncAudience(a.currentSlide),this.annotations.sync(this.presenterSnapshot),l.presenting&&!a.presenting&&this.annotations.finish(),(a.currentSlide!==l.currentSlide||a.slides!==l.slides)&&this.presenterView?.syncSlide();}),this.detachSignatureWarning=this.store.subscribe((a,l)=>{a.dirty&&!l.dirty&&a.hasDigitalSignatures&&!this.signatureWarningAcknowledged&&(this.signatureWarningAcknowledged=true,w0(this.doc,this.t,a.digitalSignatureCount));}),this.store.subscribe((a,l)=>{if(a.slides===l.slides&&a.embeddedFonts===l.embeddedFonts)return;chunkIQ7MDPEN_cjs.I.registerEmbeddedFonts(a.embeddedFonts);let p=++this.webfontsToken;chunk5YHVN3PP_cjs.fj(a.slides,a.embeddedFonts).then(d=>p!==this.webfontsToken?null:(I0(this.doc,d),d)),this.syncGlyphOutlineWebfonts(a.slides,a.embeddedFonts,p);}),this.sessions=Rk({doc:this.doc,store:this.store,options:n,getHandler:()=>this.loading.getHandler(),getSaveOptions:()=>{let a=this.store.get();return chunk5YHVN3PP_cjs.xp({headerFooter:a.headerFooter,presentationProperties:a.presentationProperties,viewProperties:a.viewProperties,customShows:a.customShows,sections:a.sections,coreProperties:a.coreProperties,appProperties:a.appProperties,customProperties:a.customProperties,tagCollections:a.tagCollections,slideMasters:a.slideMasters,notesMaster:a.notesMaster,handoutMaster:a.handoutMaster,slideSize:chunk5YHVN3PP_cjs.lj({current:a.slideSize,canvas:a.canvasSize}).size,tableStyleMap:a.tableStyleMap,tableStylesDefaultId:a.tableStylesDefaultId,tableStylesToDelete:a.tableStylesToDelete,embedFonts:a.embedFonts})},getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),setEditable:a=>this.setEditable(a),onCollaborationReadOnlyChange:a=>this.applyEditable(this.requestedEditable&&!a),goToSlide:a=>this.controls.goToSlide(a),loadFile:a=>this.loadFile(a,{skipProtectedView:true}),getUserInitials:()=>this.optionsController?.getOptions().general.userInitials,getHiddenActions:()=>this.getChromeOptions().hiddenActions,isShareAvailable:()=>this.customization.isDialogAvailable("share")}),this.customization.bind(this.optionsController.optionsStore,()=>this.rebuildChrome()),this.optionsController.applyAll(),this.pruneExpiredAutosaveSnapshots(),this.renderer.renderAll(),this.setupAiChat(),n.source!==void 0&&this.loading.load(n.source,"bootstrap"),this.connectAudienceRole();}syncGlyphOutlineWebfonts(t,n,o){let r=chunk5YHVN3PP_cjs.dj(t),i=chunk5YHVN3PP_cjs.ej(r,n.map(s=>s.name));i.length!==0&&chunk5YHVN3PP_cjs.fj(t,n).then(async s=>{if(o!==this.webfontsToken||!s)return;let a=[{bold:false,italic:false},{bold:true,italic:false}],l=false;for(let p of i)for(let d of a){if(o!==this.webfontsToken)return;let u=await chunk5YHVN3PP_cjs.Ab(s,p,d.bold,d.italic,fetch);u&&chunkIQ7MDPEN_cjs.I.registerFontBytes(p,d.bold,d.italic,u)&&(l=true);}l&&o===this.webfontsToken&&this.store.set({outlineFontsTick:this.store.get().outlineFontsTick+1});});}setupContextMenu(){this.contextMenu?.destroy(),this.contextMenu=cl({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),selectElement:t=>this.editor.selectElements([t]),openComments:()=>this.parityWorkflows.openComments(),openHyperlink:()=>this.parityWorkflows.openHyperlink(),getAi:()=>this.aiFocus,getCustomization:()=>this.customization.getResolved(),startEditPoints:t=>this.editor.startEditPoints(t)}),this.canvasContextMenu?.destroy(),this.canvasContextMenu=b0({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),getCustomization:()=>this.customization.getResolved()});}setupAiChat(){let t=this.options.ai;if(this.aiChat?.destroy(),!t||!this.customization.isAiEnabled()){this.aiChat=null,this.aiFocus=null;return}let n=os({store:this.store,requestOpen:()=>this.aiChat?.open()});this.aiFocus=n;let o=ts({store:this.store,editor:this.editor,goToSlide:r=>this.controls.goToSlide(r),ensureEditable:()=>{this.store.get().editable||this.setEditable(true);},getHandler:()=>this.loading.getHandler(),applyThemeUpdates:r=>this.applyAiThemeUpdates(r),getFocusedTargets:()=>n.getEffectiveTargets()});this.aiChat=ns({doc:this.doc,chrome:this.lifecycle.chrome,t:this.t,bridge:o,config:t,store:this.store,controller:n,goToSlide:r=>this.controls.goToSlide(r)});}applyAiThemeUpdates(t){t.colorScheme&&(this.store.set({colorScheme:{...this.store.get().colorScheme??{},...t.colorScheme}}),this.renderer.renderAll());}async loadFile(t,n){this.signatureWarningAcknowledged=false,await this.loading.load(t,"user",n);}openFile(){(async()=>{let t=await chunk5YHVN3PP_cjs.Lj();t&&await this.loadFile(t.buffer);})();}openRecentFile(t){(async()=>{let n=await chunk5YHVN3PP_cjs._o(t);n&&await this.loadFile(n);})();}createPresentation(t){this.editor.commitSlides(chunk5YHVN3PP_cjs.Yo(t),0);}async loadUrl(t){this.signatureWarningAcknowledged=false,await this.loading.load(t);}next=()=>this.controls.next();prev=()=>this.controls.prev();goToSlide=t=>this.controls.goToSlide(t);toggleHideCurrentSlide=()=>this.toggleHideSlides([this.store.get().currentSlide]);goToFirstSlide=()=>this.controls.firstSlide();goToLastSlide=()=>this.controls.lastSlide();firstShowSlideIndex=()=>this.controls.firstShowSlideIndex();getSlideCount=()=>this.controls.slideCount();getCurrentSlide=()=>this.controls.currentSlide();getZoom=()=>this.controls.zoom();setZoom(t){this.controls.setZoom(t);}zoomIn=()=>this.controls.zoomIn();zoomOut=()=>this.controls.zoomOut();zoomToFit=()=>this.controls.zoomToFit();zoomReset=()=>this.controls.setZoom(1);goTo=t=>this.goToSlide(t);goPrev=()=>this.prev();goNext=()=>this.next();getContent=()=>this.save();getMode=()=>{let t=this.store.get();return t.masterViewTarget?"master":t.presenting?"present":t.editable?"edit":"preview"};setMode=t=>{if(t==="present"){this.enterPresentation();return}this.store.get().presenting&&this.exitPresentation(),this.setEditable(t==="edit"||t==="master"),t==="master"&&!this.store.get().masterViewTarget&&this.toggleMasterNavigation(),t!=="master"&&this.store.get().masterViewTarget&&this.toggleMasterNavigation();};getActiveSlideIndex=()=>this.getCurrentSlide();setActiveSlideIndex=t=>this.goToSlide(t);isDirty=()=>this.store.get().dirty;getSlides=()=>this.store.get().slides;getSlide=t=>this.store.get().slides[t];getActiveSlide=()=>this.getSlide(this.getCurrentSlide());getElements=(t=this.getCurrentSlide())=>this.getSlide(t)?.elements??[];getElementById=(t,n=this.getCurrentSlide())=>this.getElements(n).find(o=>o.id===t);updateElements=async(t,n)=>{chunk5YHVN3PP_cjs.gt(t,n,{getTarget:()=>{let o=this.store.get();return {canEdit:o.editable&&!o.protectedView&&!(o.readOnlyRecommendation?.defaultReadOnly&&!o.readOnlyBannerDismissed),mode:this.getMode(),loaded:!o.loading&&!o.error,editTemplateMode:o.editTemplateMode}},getSlides:()=>this.store.get().slides,hasActivePointerInteraction:()=>this.editor.hasActivePointerInteraction(),commitPendingText:()=>this.container.querySelector("[data-inline-editor]")?.blur(),commitSlides:(o,r)=>this.editor.commitElementUpdates(o,r)});};updateElement=(t,n)=>this.editor.applyElementPatch(t,n);addElement=t=>{let n=this.store.get(),o=chunk5YHVN3PP_cjs.do(t,{canEdit:n.editable&&!n.protectedView&&!(n.readOnlyRecommendation?.defaultReadOnly&&!n.readOnlyBannerDismissed),mode:this.getMode(),hasActiveSlide:!n.loading&&!n.error&&!!n.slides[n.currentSlide],editTemplateMode:n.editTemplateMode});if(o)return this.container.querySelector("[data-inline-editor]")?.blur(),this.editor.getEditActions().insertElement(o),o.id};deleteElements=t=>{this.editor.selectElements(t),this.editor.deleteSelected();};duplicateElement=t=>(this.editor.selectElements([t]),this.editor.duplicateSelected()??void 0);getSelectedElementIds=()=>[...this.store.get().selectedElementIds];selectElements=t=>this.editor.selectElements(t);clearSelection=()=>this.editor.selectElements([]);addSlide=(t=this.store.get().slides.length-1)=>{let n=[...this.store.get().slides],o=Math.min(Math.max(t+1,0),n.length);n.splice(o,0,chunk5YHVN3PP_cjs.Gf(o+1,chunk5YHVN3PP_cjs.Ff)),this.editor.commitSlides(this.renumber(n),o);};deleteSlides=t=>{let n=new Set(t),o=this.store.get().slides.filter((r,i)=>!n.has(i));o.length>0&&this.editor.commitSlides(this.renumber(o));};duplicateSlides=t=>{let n=new Set(t),o=this.store.get().slides.flatMap((r,i)=>n.has(i)?[r,{...chunk5YHVN3PP_cjs.l(r),id:chunk5YHVN3PP_cjs.Ff()}]:[r]);this.editor.commitSlides(this.renumber(o));};moveSlide=(t,n)=>{let o=[...this.store.get().slides];if(!o[t]||n<0||n>=o.length||t===n)return;let[r]=o.splice(t,1);o.splice(n,0,r),this.editor.commitSlides(this.renumber(o),n);};toggleHideSlides=t=>{let n=new Set(t);this.editor.commitSlides(this.store.get().slides.map((o,r)=>n.has(r)?{...o,hidden:!o.hidden}:o));};renumber(t){return t.map((n,o)=>({...n,slideNumber:o+1}))}toggleNotes(){this.store.set({notesExpanded:!this.store.get().notesExpanded});}setTheme(t){this.lifecycle.appliedThemeVars=Ro(this.lifecycle.chrome.root,t,this.lifecycle.appliedThemeVars),this.currentTheme=t;let n=Gp(t,this.availableThemes);n!==void 0&&(this.currentThemeKey=n,this.options.onThemeChange?this.options.onThemeChange(n):chunk5YHVN3PP_cjs.Vp({themeKey:n}));}applyPresentationTheme(t){sk({presetId:t,loading:this.loading,store:this.store,editor:this.editor});}openAccessibility(){this.lifecycle.chrome.accessibility.open(chunk5YHVN3PP_cjs.nm(this.store.get().slides));}openSettings(t="general"){this.customization.isDialogAvailable("options")&&this.parityWorkflows.openSettings(t);}openSetUpSlideShow(){this.parityWorkflows.openSetUpSlideShow();}toggleSubtitles(){let t=this.store.get().presentationProperties;this.editor.updatePresentationProperties({...t,showSubtitles:!t.showSubtitles});}openHeaderFooter(){this.parityWorkflows.openHeaderFooter();}openCompare(){this.parityWorkflows.openCompare();}openPrintDialog(){this.customization.isDialogAvailable("print")&&this.parityWorkflows.openPrintDialog();}startRehearsal(){this.parityWorkflows.startRehearsal();}openSelectionPane(){this.parityWorkflows.openSelectionPane();}openSlideSorter(){this.parityWorkflows.openSlideSorter();}openReadingView(){this.parityWorkflows.openReadingView();}openOutlineView(){this.parityWorkflows.openOutlineView();}openComments(){this.parityWorkflows.openComments();}openHyperlink(){this.parityWorkflows.openHyperlink();}openCustomShows(){this.parityWorkflows.openCustomShows();}openDocumentProperties(){let t=this.store.get();v0(this.doc,this.t,{slides:t.slides,core:t.coreProperties,app:t.appProperties,custom:t.customProperties,editable:t.editable,onSave:(n,o,r)=>this.editor.updateDocumentProperties(n,o,r)});}openFontEmbedding(){let t=this.store.get(),n=chunk5YHVN3PP_cjs.ro(t.embeddedFonts.map(o=>o.name));h0(this.doc,this.t,{slides:t.slides,embeddedFonts:t.embeddedFonts,enabled:t.embedFonts,canEmbed:n.interactive,unavailableKey:n.disabledReasonKey,onToggle:o=>this.store.set({embedFonts:o})});}openDigitalSignatures(){let t=this.store.get();f0(this.doc,this.t,t.hasDigitalSignatures,t.digitalSignatureCount);}openPasswordProtection(){S0(this.doc,this.t,{protected:this.store.get().isPasswordProtected,onSet:t=>{this.store.set({isPasswordProtected:true,presentationPassword:t});},onRemove:()=>{this.store.set({isPasswordProtected:false,presentationPassword:null});}});}openVersionHistory(){E0(this.doc,this.lifecycle.chrome.root,this.t,{filePath:this.options.autosaveFilePath??"presentation.pptx",onRestore:t=>this.loadFile(t,{skipProtectedView:true})});}openPresenterView(){this.store.set({notesExpanded:true}),this.presenterView?.dispose(),this.presenterView=Op(this.buildPresenterViewOptions()),this.markPresenterConsoleOpen(true),this.store.get().presenting||this.enterPresentation();}openAudienceWindow(){this.closeAudienceWindow(),this.store.get().presenting&&this.presenterShowGuard.expectAudienceBounce();let t=window.open("about:blank","pptx-viewer-audience","popup=yes,width=1280,height=720");if(!t){this.presenterShowGuard.disarm();return}this.audienceWindow=t,this.presenterSessionId=chunk5YHVN3PP_cjs.uk(),this.presenterView?.syncSnapshot();let n=this.presenterSessionId,o=chunk5YHVN3PP_cjs.wk(window.location.href,n);chunk5YHVN3PP_cjs.zk(window).then(i=>{i&&this.audienceWindow===t&&!t.closed&&chunk5YHVN3PP_cjs.Ak(t,i);});let r=this.loading.getHandler();if(!r){this.closeAudienceWindow();return}r.save(this.store.get().slides).then(i=>chunk5YHVN3PP_cjs.Ck(n,i)).then(()=>t.location.replace(o)).catch(()=>this.closeAudienceWindow());}getPresenterChannel(){try{return this.presenterChannel??=new BroadcastChannel(chunk5YHVN3PP_cjs.sk),this.presenterChannel}catch{return null}}isAudienceWindowOpen(){return !!(this.audienceWindow&&!this.audienceWindow.closed)}syncAudience(t=this.getCurrentSlide()){this.presenterSessionId&&this.getPresenterChannel()?.postMessage({origin:chunk5YHVN3PP_cjs.tk,type:"presenter-state",sessionId:this.presenterSessionId,snapshot:{...this.presenterSnapshot,slideIndex:t,sequence:++this.presenterSequence}});}getPresenterSnapshot(){return this.presenterSnapshot}updatePresenterSnapshot(t){this.presenterSnapshot=chunk5YHVN3PP_cjs.mk(this.presenterSnapshot,t),Hp(this.lifecycle.chrome.root,this.presenterSnapshot),this.syncAudience(this.presenterSnapshot.slideIndex),this.annotations.sync(this.presenterSnapshot),this.syncPresentationToolbar(),this.presenterView?.syncSnapshot();}buildPresenterViewOptions(){return {doc:this.doc,t:this.t,container:this.lifecycle.chrome.root,getSnapshot:()=>this.presenterSnapshot,getSlides:()=>this.store.get().slides,getCurrent:()=>this.getCurrentSlide(),getElapsedMs:()=>this.presenterSnapshot.elapsedMs??0,canvasSize:()=>this.store.get().canvasSize,getActiveCustomShow:()=>{let t=this.store.get();return t.activeCustomShowId?t.customShows.find(({id:n})=>n===t.activeCustomShowId)??null:null},getAuthoredRange:()=>{let t=this.store.get();return chunk5YHVN3PP_cjs.Jp(t.presentationProperties,t.slides.length)},renderSlide:(t,n)=>this.renderer.renderSlideNode(t,n),navigate:t=>this.goToSlide(t),move:t=>t===1?this.controls.next():this.controls.prev(),isAudienceOpen:()=>this.isAudienceWindowOpen(),toggleTimer:()=>this.updatePresenterSnapshot({paused:!this.presenterSnapshot.paused}),resetTimer:()=>this.updatePresenterSnapshot({paused:false,elapsedMs:0}),stepZoom:t=>this.updatePresenterSnapshot({zoom:chunk5YHVN3PP_cjs.jk(this.presenterSnapshot.zoom??{scale:1,originX:.5,originY:.5},t)}),resetZoom:()=>this.updatePresenterSnapshot({zoom:{scale:1,originX:.5,originY:.5}}),setPointerTool:t=>this.updatePresenterSnapshot({pointer:{...this.presenterSnapshot.pointer??{x:.5,y:.5,color:"#ef4444"},tool:t}}),setBlackout:t=>this.updatePresenterSnapshot({blackout:this.presenterSnapshot.blackout===t?"none":t}),toggleCaptions:()=>this.togglePresenterCaptions(),toggleAudience:()=>this.isAudienceWindowOpen()?this.closeAudienceWindow():this.openAudienceWindow(),swapDisplays:()=>this.swapPresenterDisplays(),end:()=>{this.closeAudienceWindow(),this.exitPresentation();}}}clearPresentationAnnotations(){this.annotations.clear();}markPresenterConsoleOpen(t){this.lifecycle.chrome.root.classList.toggle("pptxv-presenter-open",t);}syncPresentationToolbar(){this.lifecycle.chrome.presentationToolbar.update({tool:this.presenterSnapshot.pointer?.tool??"none",blackout:this.presenterSnapshot.blackout,hasAnnotations:(this.presenterSnapshot.inkStrokes?.length??0)>0,presenterViewActive:this.presenterView!==null});}togglePresenterView(){if(this.presenterView){this.closeAudienceWindow(),this.presenterView.dispose(),this.presenterView=null,this.presenterCaptions?.dispose(),this.presenterCaptions=null,this.markPresenterConsoleOpen(false),this.syncPresentationToolbar();return}this.openPresenterView(),this.syncPresentationToolbar();}showPresentationAllSlides(){this.presenterView||(this.openPresenterView(),this.syncPresentationToolbar()),this.presenterView?.showAllSlides();}shouldShowPresentationContextMenu(){return this.optionsController?.getOptions().advanced.slideShowShowMenuOnRightClick??true}togglePresenterCaptions(){this.presenterCaptions??=Ip({doc:this.doc,t:this.t,emit:t=>this.updatePresenterSnapshot(t)}),this.presenterCaptions.toggle();}swapPresenterDisplays(){let t=this.audienceWindow;!t||t.closed||chunk5YHVN3PP_cjs.Bk(window,t);}classifyPresentationExit(){return this.presenterShowGuard.classifyFullscreenExit()}connectAudienceRole(){let t=chunk5YHVN3PP_cjs.xk(window.location.hash),n=this.getPresenterChannel();n&&(n.addEventListener("message",o=>{let r=o.data;chunk5YHVN3PP_cjs.yk(r)&&(t&&r.sessionId===t?(r.type==="presenter-state"&&(this.presenterSnapshot=r.snapshot,Hp(this.lifecycle.chrome.root,r.snapshot),this.goToSlide(r.snapshot.slideIndex)),r.type==="presenter-slide-change"&&this.goToSlide(r.slideIndex),r.type==="presenter-exit"&&chunk5YHVN3PP_cjs.Ik(window)&&this.store.set({endOfShow:true})):r.type==="audience-ready"&&r.sessionId===this.presenterSessionId&&this.syncAudience());}),t&&(n.postMessage({origin:chunk5YHVN3PP_cjs.tk,type:"audience-ready",sessionId:t}),this.options.source===void 0&&chunk5YHVN3PP_cjs.Dk(t).then(async o=>{o&&(await this.loading.load(o,"bootstrap"),await this.enterPresentation());})));}closeAudienceWindow(){let t=this.presenterSessionId;t&&(this.getPresenterChannel()?.postMessage({origin:chunk5YHVN3PP_cjs.tk,type:"presenter-exit",sessionId:t}),chunk5YHVN3PP_cjs.Ek(t));try{this.audienceWindow?.close();}catch{}this.audienceWindow=null,this.presenterSessionId="",this.presenterView?.syncSnapshot();}setLocale(t){this.t=Ht(t,this.options.messages),this.currentLocale=t,this.rebuildChrome(),this.options.onLocaleChange?this.options.onLocaleChange(t):chunk5YHVN3PP_cjs.Vp({localeCode:t});}setEditable(t){this.requestedEditable=t,this.applyEditable(t&&!this.sessions?.isCollaborationReadOnly());}applyEditable(t){this.store.set({editable:t}),this.editor.setEditable(t);}enableEditingFromProtectedView(){this.store.set({protectedView:false}),this.setEditable(true);}editAnywayFromReadOnlyRecommendation(){if(this.store.get().readOnlyRecommendation?.requiresPassword){this.store.set({readOnlyPasswordPromptOpen:true,readOnlyPasswordError:null});return}this.store.set({readOnlyBannerDismissed:true}),this.setEditable(true);}dismissReadOnlyBanner(){this.store.set({readOnlyBannerDismissed:true});}cancelReadOnlyPasswordPrompt(){this.store.set({readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null});}submitReadOnlyPassword(t){this.checkReadOnlyPassword(t);}async checkReadOnlyPassword(t){this.store.set({readOnlyCheckingPassword:true});try{let n=await chunk5YHVN3PP_cjs.cs(this.store.get().modifyVerifier,t);n.ok?(this.store.set({readOnlyBannerDismissed:!0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null}),this.setEditable(!0)):this.store.set({readOnlyPasswordError:n.reason});}finally{this.store.set({readOnlyCheckingPassword:false});}}dismissCompatToast(t){this.store.set({compatToasts:this.store.get().compatToasts.filter(n=>n.id!==t)});}dismissAllCompatToasts(){this.store.set({compatToasts:[]});}addRunProgramNotice(t){this.store.set({runProgramNotices:[...this.store.get().runProgramNotices,t]});}dismissRunProgramNotice(t){this.store.set({runProgramNotices:this.store.get().runProgramNotices.filter(n=>n.id!==t)});}confirmExternalHyperlink(t){return chunk5YHVN3PP_cjs.wq(this.optionsController.getOptions(),t)?window.confirm(`${this.t("pptx.options.trust.confirmHyperlinks")}
5190
+ ${Zk}`}var p0="pptx-vanilla-viewer-styles";function _p(e){if(e.getElementById(p0))return;let t=e.createElement("style");t.id=p0,t.textContent=yi(),(e.head??e.documentElement).appendChild(t);}function d0(){return yi()}function c0(e){if(!e.editable)return null;let t={selectedElementId:null,selectedElementIds:[]};return e.masterViewTarget?{...t,masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false}:e.slideMasters.length>0?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:"slides",editTemplateMode:true}:e.notesMaster||e.handoutMaster?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:e.notesMaster?"notes":"handout",editTemplateMode:true}:{...t,editTemplateMode:!e.editTemplateMode}}function Gp(e,t){return t.find(n=>n.theme===e)?.key}function m0(e,t,n){let o=t&&n.some(r=>r.key===t)?t:Gp(e.theme,n)??"default";return {key:o,theme:n.find(r=>r.key===o)?.theme??e.theme}}function u0(e){return e.availableLocales?e.availableLocales:Array.from(new Set(["en",...Object.keys(e.messages??{})])).map(n=>chunkQPYQDJ2Q_cjs.E.find(o=>o.code===n)??{code:n,label:n,nativeLabel:n})}function x0(e,t,n){return t&&n.some(o=>o.code===t)?t:e.locale??"en"}function g0(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkYOEVEUFZ_cjs.$g({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${s}px`,e.style.top=`${a}px`;}function b0(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=null,a=()=>{r?.remove(),r=null,i?.remove(),i=null,s&&(t.removeEventListener("pointerdown",s,true),t.removeEventListener("keydown",s,true),s=null);},l=(m,g)=>{i?.remove();let x=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`});x.setAttribute("role","menu"),x.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));let b=Uo(n.get());for(let v of b){let f=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-context-menu-item");f.type="button",f.setAttribute("role","menuitem"),f.textContent=v.name,f.addEventListener("click",()=>{e.getEditActions().applyLayout(v.path),a();}),x.appendChild(f);}(o.closest(".pptxv")??t.body).appendChild(x),g0(x,t,m,g),i=x;},p=(m,g,x)=>{let b=chunkQPYQDJ2Q_cjs.w(t,"button","pptxv-context-menu-item");if(b.type="button",b.setAttribute("role",m.checked===void 0?"menuitem":"menuitemcheckbox"),m.checked!==void 0){b.setAttribute("aria-checked",String(m.checked));let v=chunkQPYQDJ2Q_cjs.w(t,"span","pptxv-context-menu-check");v.textContent=m.checked?"\u2713":"",b.appendChild(v);}return b.append(e.getTranslator()(m.labelKey)),b.disabled=m.disabled===true,b.addEventListener("click",()=>{let v=e.getEditActions();switch(m.id){case "paste":a(),v.paste();break;case "layout":r?.remove(),r=null,l(g,x);break;case "reset-slide":a(),v.resetSlide();break;case "format-background":a(),n.set({selectedElementId:null,selectedElementIds:[],inspectorOpen:true});break;case "grid-and-guides":a(),v.toggleViewOption("showGrid");break;case "ruler":a(),v.toggleViewOption("showRulers");break;default:a();}}),b},d=(m,g,x)=>{r=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu",{left:`${g}px`,top:`${x}px`}),r.dataset.pptxContextMenu="true",r.dataset.pptxCanvasContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.canvasContextMenu.ariaLabel"));for(let b of m){if(b.separatorBefore){let v=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(p(b,g,x));}(o.closest(".pptxv")??t.body).appendChild(r),g0(r,t,g,x),s=b=>{if(b instanceof KeyboardEvent&&b.key!=="Escape")return;let v=b.target;v instanceof Node&&(r?.contains(v)||i?.contains(v))||a();},t.addEventListener("pointerdown",s,true),t.addEventListener("keydown",s,true);},u=m=>{let g=n.get();if(!g.editable||g.presenting)return;let x=chunkYOEVEUFZ_cjs.Jl(chunkYOEVEUFZ_cjs.Fm(m.target,e.getStageRoot()),m.target,g.selectedElementId);if(x&&chunkYOEVEUFZ_cjs.jo(x,g.editTemplateMode))return;let b=chunkYOEVEUFZ_cjs.ir(chunkYOEVEUFZ_cjs.Tl({hasClipboard:g.clipboardPayload!==null,showGrid:g.showGrid,showRulers:g.showRulers}),e.getCustomization?.()??chunkYOEVEUFZ_cjs.Zq);b.length!==0&&(m.preventDefault(),a(),d(b,m.clientX,m.clientY));};return o.addEventListener("contextmenu",u),{destroy(){o.removeEventListener("contextmenu",u),a();}}}function Et(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-overlay"),r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-info-scrim"),i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-dialog"),s=()=>o.remove();r.type="button",r.setAttribute("aria-label",t("pptx.common.close")),r.addEventListener("click",s),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=chunkQPYQDJ2Q_cjs.w(e,"header"),l=chunkQPYQDJ2Q_cjs.w(e,"h2");l.textContent=n;let p=chunkQPYQDJ2Q_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),p.addEventListener("click",s),a.append(l,p);let d=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-body"),u=chunkQPYQDJ2Q_cjs.w(e,"footer");return i.append(a,d,u),o.append(r,i),e.body.appendChild(o),{overlay:o,body:d,footer:u,close:s}}function Si(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"button","is-primary");o.type="button",o.textContent=t("pptx.common.done"),o.addEventListener("click",n.close),n.footer.appendChild(o);}function f0(e,t,n,o){let r=Et(e,t,t("pptx.digitalSignatures.title")),i=chunkQPYQDJ2Q_cjs.w(e,"div",`pptxv-info-notice${n?" is-signed":""}`),s=chunkQPYQDJ2Q_cjs.w(e,"b");s.textContent=n?"\u2713":"i";let a=chunkQPYQDJ2Q_cjs.w(e,"p");if(a.textContent=n?`${t("pptx.digitalSignatures.signed")} ${t("pptx.digitalSignatures.signatureCount",{count:o})}`:t("pptx.digitalSignatures.noSignatures"),i.append(s,a),r.body.appendChild(i),n){let l=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-notice is-warning"),p=chunkQPYQDJ2Q_cjs.w(e,"b");p.textContent="i";let d=chunkQPYQDJ2Q_cjs.w(e,"p");d.textContent=t("pptx.digitalSignatures.editWarning"),l.append(p,d),r.body.appendChild(l);}return Si(e,t,r),r.overlay}function v0(e,t,n){let o=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-overlay"),r=chunkQPYQDJ2Q_cjs.w(e,"button","pptxv-props-scrim");r.setAttribute("aria-label",t("pptx.common.close"));let i=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-labelledby","pptxv-props-title");let s=structuredClone(n.core??{}),a=structuredClone(n.app??{}),l=n.custom.map(L=>({...L})),p=JSON.stringify({core:s,app:a,custom:l}),d=()=>o.remove();r.addEventListener("click",d);let u=chunkQPYQDJ2Q_cjs.w(e,"header"),m=chunkQPYQDJ2Q_cjs.w(e,"h2");m.id="pptxv-props-title",m.textContent=t("pptx.documentProperties.dialogTitle");let g=chunkQPYQDJ2Q_cjs.w(e,"button");g.type="button",g.setAttribute("aria-label",t("pptx.common.close")),g.textContent="\xD7",g.addEventListener("click",d),u.append(m,g);let x=chunkQPYQDJ2Q_cjs.w(e,"nav","pptxv-props-tabs");x.setAttribute("aria-label",t("pptx.documentProperties.dialogTitle"));let b=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-body"),v="summary",f=chunkQPYQDJ2Q_cjs.w(e,"button","is-primary"),S=()=>{f&&(f.disabled=!n.editable||JSON.stringify({core:s,app:a,custom:l})===p);},y=(L,M,D)=>{let I=chunkQPYQDJ2Q_cjs.w(e,"label"),R=chunkQPYQDJ2Q_cjs.w(e,"span");R.textContent=L;let O=chunkQPYQDJ2Q_cjs.w(e,"input");return O.value=M,O.disabled=!n.editable,O.addEventListener("input",()=>{D(O.value),S();}),I.append(R,O),I},h=()=>{let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-grid"),M=[["title","pptx.documentProperties.summary.title"],["subject","pptx.documentProperties.summary.subject"],["creator","pptx.documentProperties.summary.author"],["keywords","pptx.documentProperties.summary.keywords"],["category","pptx.documentProperties.summary.category"],["description","pptx.documentProperties.summary.description"]];for(let[D,I]of M)L.appendChild(y(t(I),s[D]??"",R=>s[D]=R));L.append(y(t("pptx.documentProperties.summary.manager"),a.manager??"",D=>{a.manager=D;}),y(t("pptx.documentProperties.summary.company"),a.company??"",D=>{a.company=D;})),b.replaceChildren(L);},C=()=>{let L=chunkYOEVEUFZ_cjs.op(n.slides,n.core),M=chunkQPYQDJ2Q_cjs.w(e,"dl","pptxv-props-stats"),D=[["pptx.documentProperties.statistics.slides",L.slideCount],["pptx.documentProperties.statistics.hiddenSlides",L.hiddenSlideCount],["pptx.documentProperties.statistics.notes",L.noteCount],["pptx.documentProperties.statistics.elements",L.elementCount],["pptx.documentProperties.statistics.words",L.wordCount],["pptx.documentProperties.statistics.paragraphs",L.paragraphCount],["pptx.documentProperties.created",L.created??"-"],["pptx.documentProperties.modified",L.modified??"-"]];for(let[I,R]of D){let O=chunkQPYQDJ2Q_cjs.w(e,"dt");O.textContent=t(I);let B=chunkQPYQDJ2Q_cjs.w(e,"dd");B.textContent=String(R),M.append(O,B);}b.replaceChildren(M);},w=()=>{let L=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-custom");l.forEach((D,I)=>{let R=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-props-custom-row"),O=chunkQPYQDJ2Q_cjs.w(e,"input");O.value=D.name,O.disabled=!n.editable,O.setAttribute("aria-label",t("pptx.documentProperties.custom.name")),O.addEventListener("input",()=>{D.name=O.value,S();});let B=D.type==="bool"?chunkQPYQDJ2Q_cjs.w(e,"select"):chunkQPYQDJ2Q_cjs.w(e,"input");if(B instanceof HTMLInputElement&&(B.type=D.type==="i4"?"number":"text"),B instanceof HTMLSelectElement)for(let[_,N]of [["true","pptx.documentProperties.custom.yes"],["false","pptx.documentProperties.custom.no"]]){let W=chunkQPYQDJ2Q_cjs.w(e,"option");W.value=_,W.textContent=t(N),B.appendChild(W);}B.value=D.value,B.disabled=!n.editable,B.setAttribute("aria-label",t("pptx.documentProperties.custom.value")),B.addEventListener("input",()=>{D.value=B.value,S();});let F=chunkQPYQDJ2Q_cjs.w(e,"select");F.disabled=!n.editable,F.setAttribute("aria-label",t("pptx.documentProperties.custom.type"));for(let[_,N]of [["lpwstr","pptx.documentProperties.custom.typeText"],["i4","pptx.documentProperties.custom.typeNumber"],["filetime","pptx.documentProperties.custom.typeDate"],["bool","pptx.documentProperties.custom.typeYesNo"]]){let W=chunkQPYQDJ2Q_cjs.w(e,"option");W.value=_,W.textContent=t(N),F.appendChild(W);}F.value=D.type,F.addEventListener("change",()=>{D.type=F.value,D.type==="bool"&&!["true","false"].includes(D.value)&&(D.value="true"),S(),w();});let V=chunkQPYQDJ2Q_cjs.w(e,"button");V.type="button",V.disabled=!n.editable,V.textContent="\xD7",V.setAttribute("aria-label",t("pptx.documentProperties.custom.deleteProperty")),V.addEventListener("click",()=>{l=l.filter((_,N)=>N!==I),S(),w();}),R.append(O,B,F,V),L.appendChild(R);});let M=chunkQPYQDJ2Q_cjs.w(e,"button");M.type="button",M.disabled=!n.editable,M.textContent=t("pptx.documentProperties.custom.addProperty"),M.addEventListener("click",()=>{l=[...l,{name:"",value:"",type:"lpwstr"}],S(),w();}),L.appendChild(M),b.replaceChildren(L);},A=()=>{v==="summary"?h():v==="statistics"?C():w();},P=([L,M])=>{let D=chunkQPYQDJ2Q_cjs.w(e,"button");D.type="button",D.textContent=t(M),D.addEventListener("click",()=>{v=L;for(let I of x.querySelectorAll("button"))I.classList.toggle("is-active",I===D);A();}),D.classList.toggle("is-active",L===v),x.appendChild(D);};[["summary","pptx.documentProperties.tabs.general"],["statistics","pptx.documentProperties.tabs.statistics"],["custom","pptx.documentProperties.tabs.custom"]].forEach(P);let T=chunkQPYQDJ2Q_cjs.w(e,"footer"),E=chunkQPYQDJ2Q_cjs.w(e,"button");return E.type="button",E.textContent=t("pptx.common.cancel"),E.addEventListener("click",d),f.type="button",f.textContent=t("pptx.common.save"),S(),f.addEventListener("click",()=>{n.onSave(s,a,l),d();}),T.append(E,f),i.append(u,x,b,T),o.append(r,i),A(),e.body.appendChild(o),o}function h0(e,t,n){let o=Et(e,t,t("pptx.fonts.embedFonts")),r=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.fonts.embedDescription");let i=n.canEmbed!==false,s=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-info-toggle"),a=chunkQPYQDJ2Q_cjs.w(e,"input");a.type="checkbox",a.checked=n.enabled,a.disabled=!i,a.addEventListener("change",()=>n.onToggle(a.checked));let l=chunkQPYQDJ2Q_cjs.w(e,"span");l.textContent=t("pptx.fonts.enableEmbedding"),s.append(a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-status");p.textContent=t(i?"pptx.fonts.embedKeepsExisting":n.unavailableKey??"pptx.fonts.embedUnavailable");let d=chunkYOEVEUFZ_cjs.cj(n.slides),u=new Set(n.embeddedFonts.map(b=>b.name)),m=chunkQPYQDJ2Q_cjs.w(e,"h3");m.textContent=`${t("pptx.fonts.usedFonts")} (${d.length})`;let g=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-list"),x=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-status");return x.textContent=t("pptx.fonts.scanning"),g.appendChild(x),chunkYOEVEUFZ_cjs.pp(d).then(b=>{if(o.overlay.isConnected){g.replaceChildren();for(let v of d){let f=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-row"),S=chunkQPYQDJ2Q_cjs.w(e,"span");S.textContent=v;let y=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-info-badges");if(u.has(v)){let C=chunkQPYQDJ2Q_cjs.w(e,"b");C.textContent=t("pptx.fonts.embedded"),y.appendChild(C);}let h=chunkQPYQDJ2Q_cjs.w(e,"em");h.classList.toggle("is-missing",!b.has(v)),h.textContent=b.has(v)?"\u2713":t("pptx.fonts.notFound"),y.appendChild(h),f.append(S,y),g.appendChild(f);}}}),o.body.append(r,s,p,m,g),Si(e,t,o),o.overlay}function S0(e,t,n){let o=Et(e,t,t("pptx.security.protectPresentation"));if(n.protected){let m=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-protected");m.textContent=`\u2713 ${t("pptx.security.currentlyProtected")}`,o.body.appendChild(m);}let r=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.security.description");let i=y0(e,t("pptx.security.password")),s=y0(e,t("pptx.security.confirmPassword")),a=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-strength"),l=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-error");if(l.setAttribute("role","alert"),i.input.addEventListener("input",()=>{l.textContent="";let m=chunkYOEVEUFZ_cjs.qp(i.input.value);a.textContent=i.input.value?"\u25CF".repeat(m+1):"";}),s.input.addEventListener("input",()=>l.textContent=""),o.body.append(r,i.label,a,s.label,l),n.protected){let m=chunkQPYQDJ2Q_cjs.w(e,"button","is-danger");m.type="button",m.textContent=t("pptx.security.removePassword"),m.addEventListener("click",()=>{n.onRemove(),o.close();}),o.footer.appendChild(m);}let p=chunkQPYQDJ2Q_cjs.w(e,"span","pptxv-info-spacer"),d=chunkQPYQDJ2Q_cjs.w(e,"button");d.type="button",d.textContent=t("pptx.common.cancel"),d.addEventListener("click",o.close);let u=chunkQPYQDJ2Q_cjs.w(e,"button","is-primary");return u.type="button",u.textContent=t(n.protected?"pptx.security.updatePassword":"pptx.security.setPassword"),u.addEventListener("click",()=>{let m=chunkYOEVEUFZ_cjs.rp(i.input.value,s.input.value);if(m){l.textContent=t(m==="required"?"pptx.security.errorPasswordRequired":m==="mismatch"?"pptx.security.errorPasswordMismatch":"pptx.security.errorPasswordTooShort");return}n.onSet(i.input.value),o.close();}),o.footer.append(p,d,u),o.overlay}function y0(e,t){let n=chunkQPYQDJ2Q_cjs.w(e,"label","pptxv-info-field"),o=chunkQPYQDJ2Q_cjs.w(e,"span");o.textContent=t;let r=chunkQPYQDJ2Q_cjs.w(e,"input");return r.type="password",n.append(o,r),{label:n,input:r}}var zD=10;function C0(e){let{doc:t,store:n,getTranslator:o,onChoose:r}=e,i=null,s;function a(){n.set({pasteOptionsToolbar:null});}function l(){s?.(),s=void 0,i?.remove(),i=null;}function p(u=0){l();let g=n.get().pasteOptionsToolbar?.[0]?.id;if(!g)return;let x=chunkYOEVEUFZ_cjs.ee(t,g,{canvasOnly:true});if(!x){let y=t.defaultView;if(y&&u<zD){let h=y.requestAnimationFrame(()=>p(u+1));s=()=>y.cancelAnimationFrame(h);}return}let b=x.getBoundingClientRect(),v=o(),f=chunkQPYQDJ2Q_cjs.w(t,"div","pptxv-paste-options");f.setAttribute("role","toolbar"),f.setAttribute("tabindex","-1"),f.setAttribute("aria-label",v("pptx.pasteSpecial.optionsLabel")),f.setAttribute("data-pptx-paste-options",""),f.style.position="fixed",f.style.left=`${b.right+4}px`,f.style.top=`${b.bottom+4}px`,f.addEventListener("mousedown",y=>y.stopPropagation());for(let y of chunkYOEVEUFZ_cjs.Wl){let h=chunkQPYQDJ2Q_cjs.w(t,"button");h.type="button",h.textContent=v(y.labelKey),h.title=v(y.labelKey),h.addEventListener("click",()=>r(y.id)),f.appendChild(h);}t.body.appendChild(f),i=f;let S=t.defaultView?.setTimeout(()=>{t.addEventListener("pointerdown",a,true),t.addEventListener("keydown",a,true);},0);s=()=>{S!==void 0&&t.defaultView?.clearTimeout(S),t.removeEventListener("pointerdown",a,true),t.removeEventListener("keydown",a,true);};}p();let d=n.subscribe((u,m)=>{u.pasteOptionsToolbar!==m.pasteOptionsToolbar&&p();});return {destroy(){d(),l();}}}function w0(e,t,n){let o=Et(e,t,t("pptx.digitalSignatures.strippedTitle")),r=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-info-notice is-warning"),i=chunkQPYQDJ2Q_cjs.w(e,"b");i.textContent="!";let s=chunkQPYQDJ2Q_cjs.w(e,"div"),a=chunkQPYQDJ2Q_cjs.w(e,"p");a.textContent=t("pptx.digitalSignatures.strippedMessage",{count:n});let l=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-info-description");l.textContent=t("pptx.digitalSignatures.editWarning"),s.append(a,l),r.append(i,s),o.body.appendChild(r);let p=chunkQPYQDJ2Q_cjs.w(e,"button");p.type="button",p.textContent=t("pptx.common.cancel"),p.addEventListener("click",o.close);let d=chunkQPYQDJ2Q_cjs.w(e,"button","is-primary");return d.type="button",d.textContent=t("pptx.digitalSignatures.strippedConfirm"),d.addEventListener("click",o.close),o.footer.append(p,d),o.overlay}function E0(e,t,n,o){t.querySelector(".pptxv-version-history")?.remove();let r=chunkQPYQDJ2Q_cjs.w(e,"aside","pptxv-version-history");r.setAttribute("aria-label",n("pptx.versionHistory.title"));let i=chunkQPYQDJ2Q_cjs.w(e,"header"),s=chunkQPYQDJ2Q_cjs.w(e,"span");s.textContent="\u25F7";let a=chunkQPYQDJ2Q_cjs.w(e,"h2");a.textContent=n("pptx.versionHistory.title");let l=chunkQPYQDJ2Q_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.common.close")),l.addEventListener("click",()=>r.remove()),i.append(s,a,l);let p=chunkQPYQDJ2Q_cjs.w(e,"div","pptxv-version-content");return p.textContent=n("pptx.common.loading"),r.append(i,p),t.appendChild(r),chunkYOEVEUFZ_cjs.Cj(o.filePath).then(d=>{if(p.replaceChildren(),!d){let S=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-version-empty");S.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(S);return}let u=chunkQPYQDJ2Q_cjs.w(e,"article"),m=chunkQPYQDJ2Q_cjs.w(e,"strong");m.textContent=chunkYOEVEUFZ_cjs.Mj(d.timestamp);let g=chunkQPYQDJ2Q_cjs.w(e,"small");g.textContent=chunkYOEVEUFZ_cjs.Nj(d.timestamp);let x=chunkQPYQDJ2Q_cjs.w(e,"p");x.textContent=chunkYOEVEUFZ_cjs.ap(d.size);let b=chunkQPYQDJ2Q_cjs.w(e,"footer"),v=chunkQPYQDJ2Q_cjs.w(e,"button","is-primary");v.type="button",v.textContent=n("pptx.versionHistory.restore"),v.addEventListener("click",()=>{Promise.resolve(o.onRestore(d.data)).then(()=>r.remove());});let f=chunkQPYQDJ2Q_cjs.w(e,"button","is-danger");f.type="button",f.textContent=n("pptx.common.delete"),f.addEventListener("click",()=>{chunkYOEVEUFZ_cjs.Ej(d.key).then(()=>u.remove()).catch(()=>{});}),b.append(v,f),u.append(m,g,x,b),p.appendChild(u);}).catch(()=>{p.replaceChildren();let d=chunkQPYQDJ2Q_cjs.w(e,"p","pptxv-version-empty");d.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(d);}),r}function T0(e,t,n,o){let r=()=>{let d=e.get(),u=d.activeCustomShowId?d.customShows.find(({id:g})=>g===d.activeCustomShowId):void 0,m=chunkYOEVEUFZ_cjs.Jp(d.presentationProperties,d.slides.length);return chunkYOEVEUFZ_cjs.Dp(d.slides,u,m)},i=(d,u=false)=>{e.set({currentSlide:Vt(d,e.get().slides.length),endOfShow:false,enteringBackward:u});},s=chunkYOEVEUFZ_cjs.Fk(),a=()=>{let{zoom:d,fitScale:u,manual:m}=s.getState();e.set({zoom:m?u*d:"fit"});};s.subscribe(a);let l=()=>{let d=t.fitScale();return s.dispatch({type:"set-fit-scale",fitScale:d}),d};return {next:()=>{let d=e.get();if(d.endOfShow){e.set({endOfShow:false}),n?.();return}if(d.presenting&&t.presentationPlayback.advance())return;if(d.presenting){let g=t.presentationPlayback.consumeZoomReturnOnAdvance(d.currentSlide);if(g!==void 0){i(g);return}}let u=r(),m=d.presentationProperties.loopContinuously===true;if(d.presenting&&!m&&!chunkYOEVEUFZ_cjs.Gp(d.currentSlide,u)){if(o?.()===false){n?.();return}e.set({endOfShow:true});return}i(d.presenting?chunkYOEVEUFZ_cjs.Ep(d.currentSlide,u,{loop:m})??d.currentSlide:d.currentSlide+1);},prev:()=>{if(e.get().endOfShow){e.set({endOfShow:false});return}if(e.get().presenting&&t.presentationPlayback.isSeededCompleted()){t.presentationPlayback.replayCurrentSlide(document);return}let d=e.get();i(d.presenting?chunkYOEVEUFZ_cjs.Fp(d.currentSlide,r())??d.currentSlide:d.currentSlide-1,d.presenting);},firstSlide:()=>{let d=e.get();i(d.presenting?chunkYOEVEUFZ_cjs.Kp(r())??0:0);},lastSlide:()=>{let d=e.get();i(d.presenting?chunkYOEVEUFZ_cjs.Lp(r())??d.slides.length-1:d.slides.length-1);},goToSlide:i,navigateToZoomTarget:d=>{let u=e.get(),m=t.presentationPlayback.navigateToZoomTarget(d,u.currentSlide,u.slides);i(m);},firstShowSlideIndex:()=>chunkYOEVEUFZ_cjs.Kp(r())??0,presentationEntryIndex:()=>chunkYOEVEUFZ_cjs.Mp(e.get().currentSlide,r()),slideCount:()=>e.get().slides.length,currentSlide:()=>e.get().currentSlide,zoom:()=>t.effectiveScale(),setZoom:d=>{if(d==="fit"){s.dispatch({type:"zoom-to-fit"});return}let u=l();s.dispatch({type:"set-zoom",zoom:u>Number.EPSILON?d/u:d});},zoomIn:()=>{l(),s.dispatch({type:"zoom-in"});},zoomOut:()=>{l(),s.dispatch({type:"zoom-out"});},zoomToFit:()=>s.dispatch({type:"zoom-to-fit"})}}var ND=["pptxv-reduced-motion","pptxv-no-hw-accel","pptxv-compat-display"],P0=[["showGrid","showGrid"],["showRulers","showRulers"],["snapToGrid","snapToGrid"],["spellCheckEnabled","spellCheck"]];function A0(e,t){let n=chunkYOEVEUFZ_cjs.Fq(t),o=false,r=a=>{o=true;try{let l=chunkYOEVEUFZ_cjs.oq(a),p=e.store.get(),d={};for(let[m,g]of P0)p[m]!==l[g]&&(d[m]=l[g]);Object.keys(d).length>0&&e.store.set(d);let u=e.root();if(u){u.classList.toggle("pptxv-showGrid",l.showGrid),u.classList.toggle("pptxv-showRulers",l.showRulers),u.classList.toggle("pptxv-snapToGrid",l.snapToGrid);let m=new Set(chunkYOEVEUFZ_cjs.yq(a,"pptxv"));for(let g of ND)u.classList.toggle(g,m.has(g));u.classList.toggle("pptxv-no-show-popup",!a.advanced.slideShowShowPopupToolbar);}e.isAutosaveEnabled()!==l.autoSave&&e.setAutosaveEnabled(l.autoSave),e.setAutosaveIntervalMs(chunkYOEVEUFZ_cjs.rq(a)*1e3),e.setHistoryDepth(chunkYOEVEUFZ_cjs.qq(a)),e.setRibbonHiddenTabs(a.ribbon.hiddenTabIds),e.refreshQuickAccess(),e.applyScreenTips(),e.renderStage();}finally{o=false;}},i=n.subscribe(r),s=e.store.subscribe((a,l)=>{if(o)return;let p=n.getOptions(),d=false;for(let[u,m]of P0)a[u]!==l[u]&&chunkYOEVEUFZ_cjs.oq(p)[m]!==a[u]&&(p=chunkYOEVEUFZ_cjs.pq(p,m,a[u]),d=true);d&&n.setOptions(p);});return {optionsStore:n,getOptions:()=>n.getOptions(),applyAll:()=>r(n.getOptions()),screenTip:(a,l,p)=>chunkYOEVEUFZ_cjs.sq(n.getOptions(),a,l,p),transformCommittedText:a=>chunkYOEVEUFZ_cjs.eq(a,n.getOptions().proofing),notifyActionSuccess:()=>chunkYOEVEUFZ_cjs.Cq(n.getOptions()),notifyAutosaveEnabled(a){!o&&n.getOptions().save.autoSave!==a&&n.setValue("save","autoSave",a);},isProtectedView:()=>chunkYOEVEUFZ_cjs.vq(n.getOptions()),dispose(){i(),s();}}}var k0="pptx-vanilla-google-fonts";function I0(e,t){chunkYOEVEUFZ_cjs.gj(e,k0,t);}function L0(e){e.getElementById(k0)?.remove();}var Yo=class extends ti{container;doc;options;store;renderer;t;currentTheme;availableThemes;availableLocales;currentThemeKey;currentLocale;lifecycle;editor;exporter;loading;registry;sessions;controls;destroyed=false;presenterChannel=null;audienceWindow=null;presenterSessionId="";presenterSequence=0;presenterSnapshot=chunkYOEVEUFZ_cjs.vk();presenterView=null;presenterCaptions=null;presenterShowGuard=chunkYOEVEUFZ_cjs.al();userFontsStyle=null;signatureWarningAcknowledged=false;detachSignatureWarning=null;webfontsToken=0;requestedEditable=false;annotations;parityWorkflows;aiChat=null;aiFocus=null;contextMenu=null;canvasContextMenu=null;pasteOptionsToolbar=null;rulers=null;optionsController;customization;constructor(t,n={}){super(),this.container=t,this.doc=t.ownerDocument,this.options=n,this.customization=JC(n),this.requestedEditable=n.editable??false;let o=chunkYOEVEUFZ_cjs.Up();this.availableThemes=n.availableThemes??chunkYOEVEUFZ_cjs.Ia,this.availableLocales=u0(n);let r=m0(n,o.themeKey,this.availableThemes);this.currentThemeKey=r.key,this.currentTheme=r.theme,this.currentLocale=x0(n,o.localeCode,this.availableLocales),this.t=Ht(this.currentLocale,n.messages),this.registry=n.registry??chunkQPYQDJ2Q_cjs.J(),this.store=ci(mi()),this.loading=LA({options:n,store:this.store,getTranslator:()=>this.t,getEditor:()=>this.editor,onContentApplying:a=>this.sessions?.beginCollaborationContentLoad(a),onContentApplied:a=>{this.sessions?.notifyCollaborationContentLoaded(a),a==="bootstrap"&&this.lifecycle?.chrome.ribbon?.showDefaultTab();},getAllowExternalContent:()=>this.optionsController?.getOptions().trust.allowExternalContent??chunkYOEVEUFZ_cjs.mq.trust.allowExternalContent,shouldOpenProtectedView:()=>this.optionsController?.isProtectedView()??false,setEditableForLoad:a=>this.setEditable(a)}),this.renderer=Fp({doc:this.doc,store:this.store,registry:this.registry,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getFitOptions:()=>this.options,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getPixelateMosaicAnimation:()=>this.optionsController?.getOptions().advanced.pixelateMosaicAnimation??false,onHandoutSlidesPerPageChange:a=>this.editor?.setHandoutSlidesPerPage(a),onMasterBackgroundColorChange:a=>this.editor?.getEditActions().setSlideBackgroundColor(a),onMasterCrudAction:a=>{this.editor?.getEditActions().masterView.runMasterViewCrudAction(a);},onSectionToggle:a=>this.editor?.getEditActions().sections.toggleSection(a),onSectionRename:(a,l)=>this.editor?.getEditActions().sections.renameSection(a,l),onSectionDelete:a=>this.editor?.getEditActions().sections.deleteSection(a),onSectionMove:(a,l)=>this.editor?.getEditActions().sections.moveSection(a,l),onZoomClick:a=>this.controls.navigateToZoomTarget(a),onCommentMarkerClick:()=>this.parityWorkflows.openComments(),onSmartArtNodeTextChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData||!chunkYOEVEUFZ_cjs.Kd(a.smartArtData,l,p))return;let d=chunkYOEVEUFZ_cjs.E(a.smartArtData,l,p),u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunkYOEVEUFZ_cjs.wn(d,a.id,u)});},onSmartArtNodeFillChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData)return;let d=chunkYOEVEUFZ_cjs.I(a.smartArtData,l,{fillColor:p});if(d!==a.smartArtData){let u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunkYOEVEUFZ_cjs.wn(d,a.id,u)});}},onChartPointChange:(a,l)=>{a.type==="chart"&&this.editor?.applyElementPatch(a.id,{chartData:l});},onTableResizeColumns:(a,l)=>{a.type!=="table"||!a.tableData||this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,columnWidths:l}});},onTableResizeRow:(a,l,p)=>{if(a.type!=="table"||!a.tableData)return;let d=a.tableData.rows.map((u,m)=>m===l?{...u,height:p}:u);this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,rows:d}});},onChartPartSelect:(a,l)=>{this.store.set({chartPartSelection:{elementId:a.id,part:l}});},onStageRendered:()=>{this.editor?.onStageRendered(),this.rulers?.sync(),this.annotations?.sync(this.presenterSnapshot);}}),this.controls=T0(this.store,this.renderer,()=>{this.exitPresentation();},()=>this.optionsController?.getOptions().advanced.slideShowEndWithBlackSlide),_p(this.doc);let i=chunkYOEVEUFZ_cjs.xb(n.fonts??[]);i&&(this.userFontsStyle=this.doc.createElement("style"),this.userFontsStyle.dataset.pptxUserFonts="vanilla",this.userFontsStyle.textContent=i,this.doc.head.appendChild(this.userFontsStyle)),this.lifecycle=vl(yl(this)),this.editor=Cp({doc:this.doc,store:this.store,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),getHandler:()=>this.loading.getHandler(),setHandler:a=>this.loading.setHandler(a),getUserName:()=>this.optionsController?.getOptions().general.userName,transformCommittedText:a=>this.optionsController?.transformCommittedText(a)??a,onChange:n.onChange,onCursorMove:(a,l)=>this.sessions.setCollaborationCursor(a,l),onInlineTextInput:(a,l)=>this.sessions.publishCollaborationInlineText(a,l),getLivePatcher:()=>this.sessions.getCollaborationLivePatcher(),flushInlineTextInput:()=>this.sessions.flushCollaborationLivePatch(),getKeyboardCustomization:()=>this.customization.getResolved().keyboard,getCustomization:()=>this.customization.getResolved()}),this.editor.attachChrome(),this.rulers=fk({doc:this.doc,store:this.store,getStageWrap:()=>this.lifecycle?.chrome.stageWrap??null,getScale:()=>this.renderer.effectiveScale(),getUnit:()=>n.rulerUnit??"inches",onCreateGuide:(a,l)=>this.editor?.getEditActions().addGuide(a,l)}),this.annotations=ak({doc:this.doc,t:this.t,store:this.store,editor:this.editor,getChrome:()=>this.lifecycle.chrome,getSnapshot:()=>this.presenterSnapshot,updateSnapshot:a=>this.updatePresenterSnapshot(a),shouldPromptKeepAnnotations:()=>this.optionsController?.getOptions().advanced.slideShowPromptKeepInkAnnotations??true}),this.exporter=Il({doc:this.doc,container:this.container,store:this.store,registry:this.registry,getTranslator:()=>this.t,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getImageResolutionScale:()=>chunkYOEVEUFZ_cjs.uq(this.optionsController.getOptions()),getIncludeHiddenSlides:()=>this.optionsController.getOptions().advanced.printHiddenSlides,getPrintHighQuality:()=>this.optionsController.getOptions().advanced.printHighQuality,fileName:n.fileName}),this.optionsController=A0({store:this.store,root:()=>this.lifecycle?.chrome.root??null,isAutosaveEnabled:()=>this.sessions?.isAutosavePreferred()??true,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),setAutosaveIntervalMs:a=>this.sessions?.setAutosaveIntervalMs(a),setHistoryDepth:a=>this.editor?.setHistoryDepth(a),setRibbonHiddenTabs:a=>this.lifecycle?.chrome.ribbon?.setHiddenOptionTabs(a),refreshQuickAccess:()=>{this.lifecycle?.chrome.titleBar?.refreshQuickAccess(),this.lifecycle?.chrome.setQuickAccessPosition(this.getQuickAccessOptions().position);},applyScreenTips:()=>this.lifecycle?.chrome.ribbon?.applyScreenTips(a=>this.optionsController.screenTip(a)),renderStage:()=>this.renderer.renderStage()},{initial:{save:{autoSave:n.autosave??true}}});let s={doc:this.doc,t:this.t,store:this.store,editor:this.editor,optionsStore:this.optionsController.optionsStore,clearOptionsCache:()=>this.clearOptionsCache(),registerCustomFont:a=>{let l=this.store.get().customFontFamilies;l.includes(a)||this.store.set({customFontFamilies:[...l,a]});},aiEnabled:false,getCustomization:()=>this.customization.getResolved(),root:()=>this.lifecycle.chrome.root,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),print:a=>this.print(a),goToSlide:a=>this.goToSlide(a),renderSlideNode:(a,l)=>this.renderer.renderSlideNode(a,l),enterPresentation:()=>this.enterPresentation(),setTheme:a=>this.setTheme(a),setLocale:a=>this.setLocale(a),getThemeState:()=>({key:this.currentThemeKey,catalog:this.availableThemes}),getLocaleState:()=>({code:this.currentLocale,catalog:this.availableLocales}),getAddinStatus:()=>{let a=!this.optionsController.getOptions().advanced.disable3DRendering;return {smartArt3d:a,model3d:a,collaboration:this.getCollaborationStatus()==="connected"}}};Object.defineProperty(s,"t",{get:()=>this.t}),Object.defineProperty(s,"aiEnabled",{get:()=>this.customization.isAiEnabled()}),this.parityWorkflows=nk(s),this.setupContextMenu(),this.pasteOptionsToolbar=C0({doc:this.doc,store:this.store,getTranslator:()=>this.t,onChoose:a=>{let l=this.store.get().pasteOptionsToolbar?.[0];if(this.store.set({pasteOptionsToolbar:null}),!!l){if(a==="picture"){Xr(this.doc,l.id,l.sourceClone).then(p=>{p&&this.editor.getEditActions().replaceElement(l.id,p);});return}this.editor.getEditActions().reformatPasted(l.id,l.sourceClone,a);}}}),n.editable&&(this.store.set({editable:true}),this.editor.setEditable(true)),this.store.subscribe(Np({getChrome:()=>this.lifecycle.chrome,renderer:this.renderer,callbacks:n})),this.store.subscribe((a,l)=>{this.presenterSessionId&&this.syncAudience(a.currentSlide),this.annotations.sync(this.presenterSnapshot),l.presenting&&!a.presenting&&this.annotations.finish(),(a.currentSlide!==l.currentSlide||a.slides!==l.slides)&&this.presenterView?.syncSlide();}),this.detachSignatureWarning=this.store.subscribe((a,l)=>{a.dirty&&!l.dirty&&a.hasDigitalSignatures&&!this.signatureWarningAcknowledged&&(this.signatureWarningAcknowledged=true,w0(this.doc,this.t,a.digitalSignatureCount));}),this.store.subscribe((a,l)=>{if(a.slides===l.slides&&a.embeddedFonts===l.embeddedFonts)return;chunkQPYQDJ2Q_cjs.I.registerEmbeddedFonts(a.embeddedFonts);let p=++this.webfontsToken;chunkYOEVEUFZ_cjs.fj(a.slides,a.embeddedFonts).then(d=>p!==this.webfontsToken?null:(I0(this.doc,d),d)),this.syncGlyphOutlineWebfonts(a.slides,a.embeddedFonts,p);}),this.sessions=Rk({doc:this.doc,store:this.store,options:n,getHandler:()=>this.loading.getHandler(),getSaveOptions:()=>{let a=this.store.get();return chunkYOEVEUFZ_cjs.xp({headerFooter:a.headerFooter,presentationProperties:a.presentationProperties,viewProperties:a.viewProperties,customShows:a.customShows,sections:a.sections,coreProperties:a.coreProperties,appProperties:a.appProperties,customProperties:a.customProperties,tagCollections:a.tagCollections,slideMasters:a.slideMasters,notesMaster:a.notesMaster,handoutMaster:a.handoutMaster,slideSize:chunkYOEVEUFZ_cjs.lj({current:a.slideSize,canvas:a.canvasSize}).size,tableStyleMap:a.tableStyleMap,tableStylesDefaultId:a.tableStylesDefaultId,tableStylesToDelete:a.tableStylesToDelete,embedFonts:a.embedFonts})},getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),setEditable:a=>this.setEditable(a),onCollaborationReadOnlyChange:a=>this.applyEditable(this.requestedEditable&&!a),goToSlide:a=>this.controls.goToSlide(a),loadFile:a=>this.loadFile(a,{skipProtectedView:true}),getUserInitials:()=>this.optionsController?.getOptions().general.userInitials,getHiddenActions:()=>this.getChromeOptions().hiddenActions,isShareAvailable:()=>this.customization.isDialogAvailable("share")}),this.customization.bind(this.optionsController.optionsStore,()=>this.rebuildChrome()),this.optionsController.applyAll(),this.pruneExpiredAutosaveSnapshots(),this.renderer.renderAll(),this.setupAiChat(),n.source!==void 0&&this.loading.load(n.source,"bootstrap"),this.connectAudienceRole();}syncGlyphOutlineWebfonts(t,n,o){let r=chunkYOEVEUFZ_cjs.dj(t),i=chunkYOEVEUFZ_cjs.ej(r,n.map(s=>s.name));i.length!==0&&chunkYOEVEUFZ_cjs.fj(t,n).then(async s=>{if(o!==this.webfontsToken||!s)return;let a=[{bold:false,italic:false},{bold:true,italic:false}],l=false;for(let p of i)for(let d of a){if(o!==this.webfontsToken)return;let u=await chunkYOEVEUFZ_cjs.Ab(s,p,d.bold,d.italic,fetch);u&&chunkQPYQDJ2Q_cjs.I.registerFontBytes(p,d.bold,d.italic,u)&&(l=true);}l&&o===this.webfontsToken&&this.store.set({outlineFontsTick:this.store.get().outlineFontsTick+1});});}setupContextMenu(){this.contextMenu?.destroy(),this.contextMenu=cl({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),selectElement:t=>this.editor.selectElements([t]),openComments:()=>this.parityWorkflows.openComments(),openHyperlink:()=>this.parityWorkflows.openHyperlink(),getAi:()=>this.aiFocus,getCustomization:()=>this.customization.getResolved(),startEditPoints:t=>this.editor.startEditPoints(t)}),this.canvasContextMenu?.destroy(),this.canvasContextMenu=b0({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),getCustomization:()=>this.customization.getResolved()});}setupAiChat(){let t=this.options.ai;if(this.aiChat?.destroy(),!t||!this.customization.isAiEnabled()){this.aiChat=null,this.aiFocus=null;return}let n=os({store:this.store,requestOpen:()=>this.aiChat?.open()});this.aiFocus=n;let o=ts({store:this.store,editor:this.editor,goToSlide:r=>this.controls.goToSlide(r),ensureEditable:()=>{this.store.get().editable||this.setEditable(true);},getHandler:()=>this.loading.getHandler(),applyThemeUpdates:r=>this.applyAiThemeUpdates(r),getFocusedTargets:()=>n.getEffectiveTargets()});this.aiChat=ns({doc:this.doc,chrome:this.lifecycle.chrome,t:this.t,bridge:o,config:t,store:this.store,controller:n,goToSlide:r=>this.controls.goToSlide(r)});}applyAiThemeUpdates(t){t.colorScheme&&(this.store.set({colorScheme:{...this.store.get().colorScheme??{},...t.colorScheme}}),this.renderer.renderAll());}async loadFile(t,n){this.signatureWarningAcknowledged=false,await this.loading.load(t,"user",n);}openFile(){(async()=>{let t=await chunkYOEVEUFZ_cjs.Lj();t&&await this.loadFile(t.buffer);})();}openRecentFile(t){(async()=>{let n=await chunkYOEVEUFZ_cjs._o(t);n&&await this.loadFile(n);})();}createPresentation(t){this.editor.commitSlides(chunkYOEVEUFZ_cjs.Yo(t),0);}async loadUrl(t){this.signatureWarningAcknowledged=false,await this.loading.load(t);}next=()=>this.controls.next();prev=()=>this.controls.prev();goToSlide=t=>this.controls.goToSlide(t);toggleHideCurrentSlide=()=>this.toggleHideSlides([this.store.get().currentSlide]);goToFirstSlide=()=>this.controls.firstSlide();goToLastSlide=()=>this.controls.lastSlide();firstShowSlideIndex=()=>this.controls.firstShowSlideIndex();getSlideCount=()=>this.controls.slideCount();getCurrentSlide=()=>this.controls.currentSlide();getZoom=()=>this.controls.zoom();setZoom(t){this.controls.setZoom(t);}zoomIn=()=>this.controls.zoomIn();zoomOut=()=>this.controls.zoomOut();zoomToFit=()=>this.controls.zoomToFit();zoomReset=()=>this.controls.setZoom(1);goTo=t=>this.goToSlide(t);goPrev=()=>this.prev();goNext=()=>this.next();getContent=()=>this.save();getMode=()=>{let t=this.store.get();return t.masterViewTarget?"master":t.presenting?"present":t.editable?"edit":"preview"};setMode=t=>{if(t==="present"){this.enterPresentation();return}this.store.get().presenting&&this.exitPresentation(),this.setEditable(t==="edit"||t==="master"),t==="master"&&!this.store.get().masterViewTarget&&this.toggleMasterNavigation(),t!=="master"&&this.store.get().masterViewTarget&&this.toggleMasterNavigation();};getActiveSlideIndex=()=>this.getCurrentSlide();setActiveSlideIndex=t=>this.goToSlide(t);isDirty=()=>this.store.get().dirty;getSlides=()=>this.store.get().slides;getSlide=t=>this.store.get().slides[t];getActiveSlide=()=>this.getSlide(this.getCurrentSlide());getElements=(t=this.getCurrentSlide())=>this.getSlide(t)?.elements??[];getElementById=(t,n=this.getCurrentSlide())=>this.getElements(n).find(o=>o.id===t);updateElements=async(t,n)=>{chunkYOEVEUFZ_cjs.gt(t,n,{getTarget:()=>{let o=this.store.get();return {canEdit:o.editable&&!o.protectedView&&!(o.readOnlyRecommendation?.defaultReadOnly&&!o.readOnlyBannerDismissed),mode:this.getMode(),loaded:!o.loading&&!o.error,editTemplateMode:o.editTemplateMode}},getSlides:()=>this.store.get().slides,hasActivePointerInteraction:()=>this.editor.hasActivePointerInteraction(),commitPendingText:()=>this.container.querySelector("[data-inline-editor]")?.blur(),commitSlides:(o,r)=>this.editor.commitElementUpdates(o,r)});};updateElement=(t,n)=>this.editor.applyElementPatch(t,n);addElement=t=>{let n=this.store.get(),o=chunkYOEVEUFZ_cjs.do(t,{canEdit:n.editable&&!n.protectedView&&!(n.readOnlyRecommendation?.defaultReadOnly&&!n.readOnlyBannerDismissed),mode:this.getMode(),hasActiveSlide:!n.loading&&!n.error&&!!n.slides[n.currentSlide],editTemplateMode:n.editTemplateMode});if(o)return this.container.querySelector("[data-inline-editor]")?.blur(),this.editor.getEditActions().insertElement(o),o.id};deleteElements=t=>{this.editor.selectElements(t),this.editor.deleteSelected();};duplicateElement=t=>(this.editor.selectElements([t]),this.editor.duplicateSelected()??void 0);getSelectedElementIds=()=>[...this.store.get().selectedElementIds];selectElements=t=>this.editor.selectElements(t);clearSelection=()=>this.editor.selectElements([]);addSlide=(t=this.store.get().slides.length-1)=>{let n=[...this.store.get().slides],o=Math.min(Math.max(t+1,0),n.length);n.splice(o,0,chunkYOEVEUFZ_cjs.Gf(o+1,chunkYOEVEUFZ_cjs.Ff)),this.editor.commitSlides(this.renumber(n),o);};deleteSlides=t=>{let n=new Set(t),o=this.store.get().slides.filter((r,i)=>!n.has(i));o.length>0&&this.editor.commitSlides(this.renumber(o));};duplicateSlides=t=>{let n=new Set(t),o=this.store.get().slides.flatMap((r,i)=>n.has(i)?[r,{...chunkYOEVEUFZ_cjs.l(r),id:chunkYOEVEUFZ_cjs.Ff()}]:[r]);this.editor.commitSlides(this.renumber(o));};moveSlide=(t,n)=>{let o=[...this.store.get().slides];if(!o[t]||n<0||n>=o.length||t===n)return;let[r]=o.splice(t,1);o.splice(n,0,r),this.editor.commitSlides(this.renumber(o),n);};toggleHideSlides=t=>{let n=new Set(t);this.editor.commitSlides(this.store.get().slides.map((o,r)=>n.has(r)?{...o,hidden:!o.hidden}:o));};renumber(t){return t.map((n,o)=>({...n,slideNumber:o+1}))}toggleNotes(){this.store.set({notesExpanded:!this.store.get().notesExpanded});}setTheme(t){this.lifecycle.appliedThemeVars=Ro(this.lifecycle.chrome.root,t,this.lifecycle.appliedThemeVars),this.currentTheme=t;let n=Gp(t,this.availableThemes);n!==void 0&&(this.currentThemeKey=n,this.options.onThemeChange?this.options.onThemeChange(n):chunkYOEVEUFZ_cjs.Vp({themeKey:n}));}applyPresentationTheme(t){sk({presetId:t,loading:this.loading,store:this.store,editor:this.editor});}openAccessibility(){this.lifecycle.chrome.accessibility.open(chunkYOEVEUFZ_cjs.nm(this.store.get().slides));}openSettings(t="general"){this.customization.isDialogAvailable("options")&&this.parityWorkflows.openSettings(t);}openSetUpSlideShow(){this.parityWorkflows.openSetUpSlideShow();}toggleSubtitles(){let t=this.store.get().presentationProperties;this.editor.updatePresentationProperties({...t,showSubtitles:!t.showSubtitles});}openHeaderFooter(){this.parityWorkflows.openHeaderFooter();}openCompare(){this.parityWorkflows.openCompare();}openPrintDialog(){this.customization.isDialogAvailable("print")&&this.parityWorkflows.openPrintDialog();}startRehearsal(){this.parityWorkflows.startRehearsal();}openSelectionPane(){this.parityWorkflows.openSelectionPane();}openSlideSorter(){this.parityWorkflows.openSlideSorter();}openReadingView(){this.parityWorkflows.openReadingView();}openOutlineView(){this.parityWorkflows.openOutlineView();}openComments(){this.parityWorkflows.openComments();}openHyperlink(){this.parityWorkflows.openHyperlink();}openCustomShows(){this.parityWorkflows.openCustomShows();}openDocumentProperties(){let t=this.store.get();v0(this.doc,this.t,{slides:t.slides,core:t.coreProperties,app:t.appProperties,custom:t.customProperties,editable:t.editable,onSave:(n,o,r)=>this.editor.updateDocumentProperties(n,o,r)});}openFontEmbedding(){let t=this.store.get(),n=chunkYOEVEUFZ_cjs.ro(t.embeddedFonts.map(o=>o.name));h0(this.doc,this.t,{slides:t.slides,embeddedFonts:t.embeddedFonts,enabled:t.embedFonts,canEmbed:n.interactive,unavailableKey:n.disabledReasonKey,onToggle:o=>this.store.set({embedFonts:o})});}openDigitalSignatures(){let t=this.store.get();f0(this.doc,this.t,t.hasDigitalSignatures,t.digitalSignatureCount);}openPasswordProtection(){S0(this.doc,this.t,{protected:this.store.get().isPasswordProtected,onSet:t=>{this.store.set({isPasswordProtected:true,presentationPassword:t});},onRemove:()=>{this.store.set({isPasswordProtected:false,presentationPassword:null});}});}openVersionHistory(){E0(this.doc,this.lifecycle.chrome.root,this.t,{filePath:this.options.autosaveFilePath??"presentation.pptx",onRestore:t=>this.loadFile(t,{skipProtectedView:true})});}openPresenterView(){this.store.set({notesExpanded:true}),this.presenterView?.dispose(),this.presenterView=Op(this.buildPresenterViewOptions()),this.markPresenterConsoleOpen(true),this.store.get().presenting||this.enterPresentation();}openAudienceWindow(){this.closeAudienceWindow(),this.store.get().presenting&&this.presenterShowGuard.expectAudienceBounce();let t=window.open("about:blank","pptx-viewer-audience","popup=yes,width=1280,height=720");if(!t){this.presenterShowGuard.disarm();return}this.audienceWindow=t,this.presenterSessionId=chunkYOEVEUFZ_cjs.uk(),this.presenterView?.syncSnapshot();let n=this.presenterSessionId,o=chunkYOEVEUFZ_cjs.wk(window.location.href,n);chunkYOEVEUFZ_cjs.zk(window).then(i=>{i&&this.audienceWindow===t&&!t.closed&&chunkYOEVEUFZ_cjs.Ak(t,i);});let r=this.loading.getHandler();if(!r){this.closeAudienceWindow();return}r.save(this.store.get().slides).then(i=>chunkYOEVEUFZ_cjs.Ck(n,i)).then(()=>t.location.replace(o)).catch(()=>this.closeAudienceWindow());}getPresenterChannel(){try{return this.presenterChannel??=new BroadcastChannel(chunkYOEVEUFZ_cjs.sk),this.presenterChannel}catch{return null}}isAudienceWindowOpen(){return !!(this.audienceWindow&&!this.audienceWindow.closed)}syncAudience(t=this.getCurrentSlide()){this.presenterSessionId&&this.getPresenterChannel()?.postMessage({origin:chunkYOEVEUFZ_cjs.tk,type:"presenter-state",sessionId:this.presenterSessionId,snapshot:{...this.presenterSnapshot,slideIndex:t,sequence:++this.presenterSequence}});}getPresenterSnapshot(){return this.presenterSnapshot}updatePresenterSnapshot(t){this.presenterSnapshot=chunkYOEVEUFZ_cjs.mk(this.presenterSnapshot,t),Hp(this.lifecycle.chrome.root,this.presenterSnapshot),this.syncAudience(this.presenterSnapshot.slideIndex),this.annotations.sync(this.presenterSnapshot),this.syncPresentationToolbar(),this.presenterView?.syncSnapshot();}buildPresenterViewOptions(){return {doc:this.doc,t:this.t,container:this.lifecycle.chrome.root,getSnapshot:()=>this.presenterSnapshot,getSlides:()=>this.store.get().slides,getCurrent:()=>this.getCurrentSlide(),getElapsedMs:()=>this.presenterSnapshot.elapsedMs??0,canvasSize:()=>this.store.get().canvasSize,getActiveCustomShow:()=>{let t=this.store.get();return t.activeCustomShowId?t.customShows.find(({id:n})=>n===t.activeCustomShowId)??null:null},getAuthoredRange:()=>{let t=this.store.get();return chunkYOEVEUFZ_cjs.Jp(t.presentationProperties,t.slides.length)},renderSlide:(t,n)=>this.renderer.renderSlideNode(t,n),navigate:t=>this.goToSlide(t),move:t=>t===1?this.controls.next():this.controls.prev(),isAudienceOpen:()=>this.isAudienceWindowOpen(),toggleTimer:()=>this.updatePresenterSnapshot({paused:!this.presenterSnapshot.paused}),resetTimer:()=>this.updatePresenterSnapshot({paused:false,elapsedMs:0}),stepZoom:t=>this.updatePresenterSnapshot({zoom:chunkYOEVEUFZ_cjs.jk(this.presenterSnapshot.zoom??{scale:1,originX:.5,originY:.5},t)}),resetZoom:()=>this.updatePresenterSnapshot({zoom:{scale:1,originX:.5,originY:.5}}),setPointerTool:t=>this.updatePresenterSnapshot({pointer:{...this.presenterSnapshot.pointer??{x:.5,y:.5,color:"#ef4444"},tool:t}}),setBlackout:t=>this.updatePresenterSnapshot({blackout:this.presenterSnapshot.blackout===t?"none":t}),toggleCaptions:()=>this.togglePresenterCaptions(),toggleAudience:()=>this.isAudienceWindowOpen()?this.closeAudienceWindow():this.openAudienceWindow(),swapDisplays:()=>this.swapPresenterDisplays(),end:()=>{this.closeAudienceWindow(),this.exitPresentation();}}}clearPresentationAnnotations(){this.annotations.clear();}markPresenterConsoleOpen(t){this.lifecycle.chrome.root.classList.toggle("pptxv-presenter-open",t);}syncPresentationToolbar(){this.lifecycle.chrome.presentationToolbar.update({tool:this.presenterSnapshot.pointer?.tool??"none",blackout:this.presenterSnapshot.blackout,hasAnnotations:(this.presenterSnapshot.inkStrokes?.length??0)>0,presenterViewActive:this.presenterView!==null});}togglePresenterView(){if(this.presenterView){this.closeAudienceWindow(),this.presenterView.dispose(),this.presenterView=null,this.presenterCaptions?.dispose(),this.presenterCaptions=null,this.markPresenterConsoleOpen(false),this.syncPresentationToolbar();return}this.openPresenterView(),this.syncPresentationToolbar();}showPresentationAllSlides(){this.presenterView||(this.openPresenterView(),this.syncPresentationToolbar()),this.presenterView?.showAllSlides();}shouldShowPresentationContextMenu(){return this.optionsController?.getOptions().advanced.slideShowShowMenuOnRightClick??true}togglePresenterCaptions(){this.presenterCaptions??=Ip({doc:this.doc,t:this.t,emit:t=>this.updatePresenterSnapshot(t)}),this.presenterCaptions.toggle();}swapPresenterDisplays(){let t=this.audienceWindow;!t||t.closed||chunkYOEVEUFZ_cjs.Bk(window,t);}classifyPresentationExit(){return this.presenterShowGuard.classifyFullscreenExit()}connectAudienceRole(){let t=chunkYOEVEUFZ_cjs.xk(window.location.hash),n=this.getPresenterChannel();n&&(n.addEventListener("message",o=>{let r=o.data;chunkYOEVEUFZ_cjs.yk(r)&&(t&&r.sessionId===t?(r.type==="presenter-state"&&(this.presenterSnapshot=r.snapshot,Hp(this.lifecycle.chrome.root,r.snapshot),this.goToSlide(r.snapshot.slideIndex)),r.type==="presenter-slide-change"&&this.goToSlide(r.slideIndex),r.type==="presenter-exit"&&chunkYOEVEUFZ_cjs.Ik(window)&&this.store.set({endOfShow:true})):r.type==="audience-ready"&&r.sessionId===this.presenterSessionId&&this.syncAudience());}),t&&(n.postMessage({origin:chunkYOEVEUFZ_cjs.tk,type:"audience-ready",sessionId:t}),this.options.source===void 0&&chunkYOEVEUFZ_cjs.Dk(t).then(async o=>{o&&(await this.loading.load(o,"bootstrap"),await this.enterPresentation());})));}closeAudienceWindow(){let t=this.presenterSessionId;t&&(this.getPresenterChannel()?.postMessage({origin:chunkYOEVEUFZ_cjs.tk,type:"presenter-exit",sessionId:t}),chunkYOEVEUFZ_cjs.Ek(t));try{this.audienceWindow?.close();}catch{}this.audienceWindow=null,this.presenterSessionId="",this.presenterView?.syncSnapshot();}setLocale(t){this.t=Ht(t,this.options.messages),this.currentLocale=t,this.rebuildChrome(),this.options.onLocaleChange?this.options.onLocaleChange(t):chunkYOEVEUFZ_cjs.Vp({localeCode:t});}setEditable(t){this.requestedEditable=t,this.applyEditable(t&&!this.sessions?.isCollaborationReadOnly());}applyEditable(t){this.store.set({editable:t}),this.editor.setEditable(t);}enableEditingFromProtectedView(){this.store.set({protectedView:false}),this.setEditable(true);}editAnywayFromReadOnlyRecommendation(){if(this.store.get().readOnlyRecommendation?.requiresPassword){this.store.set({readOnlyPasswordPromptOpen:true,readOnlyPasswordError:null});return}this.store.set({readOnlyBannerDismissed:true}),this.setEditable(true);}dismissReadOnlyBanner(){this.store.set({readOnlyBannerDismissed:true});}cancelReadOnlyPasswordPrompt(){this.store.set({readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null});}submitReadOnlyPassword(t){this.checkReadOnlyPassword(t);}async checkReadOnlyPassword(t){this.store.set({readOnlyCheckingPassword:true});try{let n=await chunkYOEVEUFZ_cjs.cs(this.store.get().modifyVerifier,t);n.ok?(this.store.set({readOnlyBannerDismissed:!0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null}),this.setEditable(!0)):this.store.set({readOnlyPasswordError:n.reason});}finally{this.store.set({readOnlyCheckingPassword:false});}}dismissCompatToast(t){this.store.set({compatToasts:this.store.get().compatToasts.filter(n=>n.id!==t)});}dismissAllCompatToasts(){this.store.set({compatToasts:[]});}addRunProgramNotice(t){this.store.set({runProgramNotices:[...this.store.get().runProgramNotices,t]});}dismissRunProgramNotice(t){this.store.set({runProgramNotices:this.store.get().runProgramNotices.filter(n=>n.id!==t)});}confirmExternalHyperlink(t){return chunkYOEVEUFZ_cjs.wq(this.optionsController.getOptions(),t)?window.confirm(`${this.t("pptx.options.trust.confirmHyperlinks")}
5191
5191
 
5192
- ${t}`):true}setEditTemplateMode(t){let n=this.store.get();!n.editable||n.editTemplateMode===t||this.store.set({editTemplateMode:t,selectedElementId:null,selectedElementIds:[]});}toggleTemplateEditing(){this.setEditTemplateMode(!this.store.get().editTemplateMode);}toggleMasterNavigation(){let t=c0(this.store.get());t&&this.store.set(t);}undo=()=>this.editor.undo();redo=()=>this.editor.redo();toggleAutosave(){return this.setAutosaveEnabled(!this.sessions.isAutosavePreferred()),this.isAutosaveSwitchOn()}isAutosaveToggleAvailable=()=>this.sessions?.getAutosaveActivation().toggleAvailable??this.options.autosave!==false;isAutosaveSwitchOn=()=>this.sessions?.isAutosavePreferred()??this.isAutosaveToggleAvailable();getQuickAccessOptions(){return this.optionsController?.getOptions().quickAccess??chunk5YHVN3PP_cjs.mq.quickAccess}quickAccessScreenTip(t){return this.optionsController?.screenTip(t)??t}getChartFollowDataPoint(){return this.optionsController?.getOptions().advanced.chartPropertiesFollowDataPoint??true}getTableStyleMap(){return this.store.get().tableStyleMap}getThemeColorMap(){let t=this.store.get().colorScheme;return t?chunk5YHVN3PP_cjs.P(t):void 0}getRecentPresentationsCount(){return this.optionsController?.getOptions().advanced.recentPresentationsCount??chunk5YHVN3PP_cjs.mq.advanced.recentPresentationsCount}canUndo=()=>this.editor.canUndo();canRedo=()=>this.editor.canRedo();async save(t="pptx"){let n=await this.editor.save(t);return this.afterSuccessfulSave(t),n}async downloadAs(t,n){await this.editor.downloadAs(t,n),this.afterSuccessfulSave(t);}async downloadPptx(t){await this.editor.downloadPptx(t),this.afterSuccessfulSave("pptx");}afterSuccessfulSave(t){this.optionsController.notifyActionSuccess(),t==="pptx"&&chunk5YHVN3PP_cjs.zq(this.optionsController.getOptions())&&chunk5YHVN3PP_cjs.Ej(this.autosaveFilePath()).catch(()=>{});}autosaveFilePath(){return this.options.autosaveFilePath??"presentation.pptx"}async pruneExpiredAutosaveSnapshots(){try{let t=await chunk5YHVN3PP_cjs.Dj(),n=chunk5YHVN3PP_cjs.Bq(t,this.optionsController.getOptions());await Promise.all(n.map(o=>chunk5YHVN3PP_cjs.Ej(o)));}catch{}}deleteSelected=()=>this.editor.deleteSelected();getSelectedElementId=()=>this.editor.getSelectedElementId();async enterPresentation(){this.controls.goToSlide(this.controls.presentationEntryIndex()),await this.lifecycle.presentation.enter();}async exitPresentation(){chunk5YHVN3PP_cjs.Gk()&&await this.lifecycle.presentation.exit();}getRegistry=()=>this.registry;getHandler=()=>this.loading.getHandler();startCollaboration(t){return this.sessions.startCollaboration(t)}stopCollaboration=()=>this.sessions.stopCollaboration();getCollaborationStatus=()=>this.sessions.getCollaborationStatus();autosaveNow(){return this.sessions.autosaveNow()}setAutosaveEnabled(t){this.sessions.setAutosaveEnabled(t),this.lifecycle.chrome.titleBar?.setAutosaveEnabled(this.isAutosaveSwitchOn());}isAutosaveEnabled=()=>this.sessions.isAutosaveEnabled();openBroadcast(){this.customization.isDialogAvailable("broadcast")&&this.sessions.openBroadcast();}openShare(){this.customization.isDialogAvailable("share")&&this.sessions.openShare();}destroy(){this.destroyed||(this.destroyed=true,this.customization.destroy(),chunk5YHVN3PP_cjs.Aq(this.optionsController.getOptions())&&this.clearOptionsCache(),this.aiChat?.destroy(),this.aiChat=null,this.aiFocus=null,this.contextMenu?.destroy(),this.contextMenu=null,this.canvasContextMenu?.destroy(),this.canvasContextMenu=null,this.pasteOptionsToolbar?.destroy(),this.pasteOptionsToolbar=null,this.rulers?.destroy(),this.rulers=null,this.parityWorkflows.closeReadingView(),this.parityWorkflows.closeOutlineView(),this.closeAudienceWindow(),this.presenterChannel?.close(),this.sessions.destroy(),this.optionsController.dispose(),this.detachSignatureWarning?.(),this.loading.invalidate(),this.editor.destroy(),this.annotations.dispose(),this.exporter.destroy(),this.userFontsStyle?.remove(),this.webfontsToken++,L0(this.doc),hl(this.lifecycle,()=>this.editor?.detachChrome()),this.loading.releaseLoaded());}clearOptionsCache(){(async()=>{try{let t=await chunk5YHVN3PP_cjs.Dj();await Promise.all(t.map(n=>chunk5YHVN3PP_cjs.Ej(n.key)));}catch{}})();}effective3DFlags(){return chunk5YHVN3PP_cjs.xq({smartArt3D:this.options.smartArt3D??false,surfaceChart3D:this.options.surfaceChart3D??false,barChart3D:this.options.barChart3D??false,lineChart3D:this.options.lineChart3D??false,areaChart3D:this.options.areaChart3D??false,pieChart3D:this.options.pieChart3D??false},this.optionsController.getOptions())}getChromeOptions(){return this.customization.getChromeOptions()}getResolvedCustomization(){return this.customization.getResolved()}rebuildChrome(){this.remountChrome(),this.editor.attachChrome(),this.setupContextMenu(),this.setupAiChat(),this.sessions.remountUi(),this.renderer.renderAll();}remountChrome(){hl(this.lifecycle,()=>this.editor?.detachChrome()),this.lifecycle=vl(yl(this)),this.optionsController.applyAll();}};function M0(e,t={}){return new Yo(e,t)}function D0(e){let{store:t}=e,n=xo(e.document),o=hi(e.document),r=false,i=false,s=false,a=false,l=()=>chunk5YHVN3PP_cjs.yh({authorizedCanEdit:e.getCanEdit(),configured:r,readOnly:i,sourcePending:e.getSourcePending?.()??false,sourceError:e.getSourceError?.()??!!t.get().error,status:d.getStatus(),remoteUsers:t.get().remotePresences}),p=()=>{if(!(s||a)){a=true;try{let m=l();t.get().editable!==m.canEdit&&t.set({editable:m.canEdit}),n.update(r?t.get().cursors:[],e.getScale?.()??1),o.update(m.remoteUsers,t.get().slides[t.get().currentSlide]?.elements??[],t.get().currentSlide,e.getScale?.()??1),e.onStateChange?.(m);}finally{a=false;}}},d=Bt({store:t,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:m=>t.set({editable:m}),onReadOnlyChange:m=>{i=m,p();},onStatusChange:p}),u=t.subscribe((m,g)=>{m.currentSlide!==g.currentSlide&&d.setActiveSlide(m.currentSlide),m.selectedElementId!==g.selectedElementId&&d.setSelection(m.selectedElementId??void 0,m.currentSlide),p();});return p(),{controller:d,cursorOverlay:n,selectionOverlay:o,getState:l,refresh:p,async setConfig(m){s||(r=!!m,m?await d.start(m):d.stop(),p());},destroy(){s||(s=true,u(),d.destroy(),n.destroy(),o.destroy());}}}Object.defineProperty(exports,"applyStyleMap",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.v}});Object.defineProperty(exports,"createDefaultRegistry",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.J}});Object.defineProperty(exports,"createEl",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.w}});Object.defineProperty(exports,"createElementRendererRegistry",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.u}});Object.defineProperty(exports,"createSvgEl",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.x}});Object.defineProperty(exports,"keyToLabel",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.D}});Object.defineProperty(exports,"renderSlideStage",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.A}});Object.defineProperty(exports,"translationsEn",{enumerable:true,get:function(){return chunkIQ7MDPEN_cjs.C}});Object.defineProperty(exports,"BACKSTAGE_CARD_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Mq}});Object.defineProperty(exports,"BACKSTAGE_PAGE_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Lq}});Object.defineProperty(exports,"CANVAS_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Oq}});Object.defineProperty(exports,"EDITOR_SHORTCUT_ACTION_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Pq}});Object.defineProperty(exports,"ELEMENT_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Nq}});Object.defineProperty(exports,"OPTIONS_PAGE_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Iq}});Object.defineProperty(exports,"OPTIONS_SECTION_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Jq}});Object.defineProperty(exports,"OPTIONS_SETTING_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Kq}});Object.defineProperty(exports,"PPTX_OPEN_ACCEPT",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.vj}});Object.defineProperty(exports,"PRESENTATION_OPEN_EXTENSIONS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.uj}});Object.defineProperty(exports,"RIBBON_TAB_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Gq}});Object.defineProperty(exports,"TOOLBAR_BUTTON_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Hq}});Object.defineProperty(exports,"VIEWER_DIALOG_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Sq}});Object.defineProperty(exports,"VIEWER_EXPORT_FORMAT_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Tq}});Object.defineProperty(exports,"VIEWER_FEATURE_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Rq}});Object.defineProperty(exports,"VIEWER_PANEL_IDS",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Qq}});Object.defineProperty(exports,"buildInlineTextCommitPatch",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Rr}});Object.defineProperty(exports,"canInteractWithElement",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs._e}});Object.defineProperty(exports,"createImageElementFromFile",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.eo}});Object.defineProperty(exports,"defaultCssVars",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Fa}});Object.defineProperty(exports,"defaultRadius",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Da}});Object.defineProperty(exports,"defaultThemeColors",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Ca}});Object.defineProperty(exports,"describeCollaborationShellState",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.zh}});Object.defineProperty(exports,"forgetSessionDeck",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Jj}});Object.defineProperty(exports,"getSessionTabId",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Gj}});Object.defineProperty(exports,"isLegacyBinaryPresentation",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.xj}});Object.defineProperty(exports,"isSupportedPresentationFile",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.wj}});Object.defineProperty(exports,"loadPresentationDeck",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Dk}});Object.defineProperty(exports,"loadSessionDeck",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Ij}});Object.defineProperty(exports,"overlayInlineTextSnapshot",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Sr}});Object.defineProperty(exports,"parsePresentationSessionId",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.xk}});Object.defineProperty(exports,"presentationBaseName",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.yj}});Object.defineProperty(exports,"rememberSessionDeck",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Hj}});Object.defineProperty(exports,"restoreSessionDeck",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Kj}});Object.defineProperty(exports,"savedPresentationFileName",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.zj}});Object.defineProperty(exports,"themeToCssVars",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Ea}});Object.defineProperty(exports,"vermilionDarkTheme",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Ha}});Object.defineProperty(exports,"vermilionLightTheme",{enumerable:true,get:function(){return chunk5YHVN3PP_cjs.Ga}});exports.PptxViewer=Yo;exports.canInlineEditElement=Ur;exports.createCollaborationController=Bt;exports.createCollaborationCursors=xo;exports.createCollaborationShell=D0;exports.createInitialViewerState=mi;exports.createPptxViewer=M0;exports.createRibbon=jr;exports.createStore=ci;exports.createTranslator=Ht;exports.exportAllSlidesToSvg=hP;exports.exportSlideToSvg=Jr;exports.getViewerCss=d0;exports.loadPresentation=mo;exports.openInlineEditor=Kr;exports.renderToCanvas=lo;exports.revokeBlobUrls=mt;
5192
+ ${t}`):true}setEditTemplateMode(t){let n=this.store.get();!n.editable||n.editTemplateMode===t||this.store.set({editTemplateMode:t,selectedElementId:null,selectedElementIds:[]});}toggleTemplateEditing(){this.setEditTemplateMode(!this.store.get().editTemplateMode);}toggleMasterNavigation(){let t=c0(this.store.get());t&&this.store.set(t);}undo=()=>this.editor.undo();redo=()=>this.editor.redo();toggleAutosave(){return this.setAutosaveEnabled(!this.sessions.isAutosavePreferred()),this.isAutosaveSwitchOn()}isAutosaveToggleAvailable=()=>this.sessions?.getAutosaveActivation().toggleAvailable??this.options.autosave!==false;isAutosaveSwitchOn=()=>this.sessions?.isAutosavePreferred()??this.isAutosaveToggleAvailable();getQuickAccessOptions(){return this.optionsController?.getOptions().quickAccess??chunkYOEVEUFZ_cjs.mq.quickAccess}quickAccessScreenTip(t){return this.optionsController?.screenTip(t)??t}getChartFollowDataPoint(){return this.optionsController?.getOptions().advanced.chartPropertiesFollowDataPoint??true}getTableStyleMap(){return this.store.get().tableStyleMap}getThemeColorMap(){let t=this.store.get().colorScheme;return t?chunkYOEVEUFZ_cjs.P(t):void 0}getRecentPresentationsCount(){return this.optionsController?.getOptions().advanced.recentPresentationsCount??chunkYOEVEUFZ_cjs.mq.advanced.recentPresentationsCount}canUndo=()=>this.editor.canUndo();canRedo=()=>this.editor.canRedo();async save(t="pptx"){let n=await this.editor.save(t);return this.afterSuccessfulSave(t),n}async downloadAs(t,n){await this.editor.downloadAs(t,n),this.afterSuccessfulSave(t);}async downloadPptx(t){await this.editor.downloadPptx(t),this.afterSuccessfulSave("pptx");}afterSuccessfulSave(t){this.optionsController.notifyActionSuccess(),t==="pptx"&&chunkYOEVEUFZ_cjs.zq(this.optionsController.getOptions())&&chunkYOEVEUFZ_cjs.Ej(this.autosaveFilePath()).catch(()=>{});}autosaveFilePath(){return this.options.autosaveFilePath??"presentation.pptx"}async pruneExpiredAutosaveSnapshots(){try{let t=await chunkYOEVEUFZ_cjs.Dj(),n=chunkYOEVEUFZ_cjs.Bq(t,this.optionsController.getOptions());await Promise.all(n.map(o=>chunkYOEVEUFZ_cjs.Ej(o)));}catch{}}deleteSelected=()=>this.editor.deleteSelected();getSelectedElementId=()=>this.editor.getSelectedElementId();async enterPresentation(){this.controls.goToSlide(this.controls.presentationEntryIndex()),await this.lifecycle.presentation.enter();}async exitPresentation(){chunkYOEVEUFZ_cjs.Gk()&&await this.lifecycle.presentation.exit();}getRegistry=()=>this.registry;getHandler=()=>this.loading.getHandler();startCollaboration(t){return this.sessions.startCollaboration(t)}stopCollaboration=()=>this.sessions.stopCollaboration();getCollaborationStatus=()=>this.sessions.getCollaborationStatus();autosaveNow(){return this.sessions.autosaveNow()}setAutosaveEnabled(t){this.sessions.setAutosaveEnabled(t),this.lifecycle.chrome.titleBar?.setAutosaveEnabled(this.isAutosaveSwitchOn());}isAutosaveEnabled=()=>this.sessions.isAutosaveEnabled();openBroadcast(){this.customization.isDialogAvailable("broadcast")&&this.sessions.openBroadcast();}openShare(){this.customization.isDialogAvailable("share")&&this.sessions.openShare();}destroy(){this.destroyed||(this.destroyed=true,this.customization.destroy(),chunkYOEVEUFZ_cjs.Aq(this.optionsController.getOptions())&&this.clearOptionsCache(),this.aiChat?.destroy(),this.aiChat=null,this.aiFocus=null,this.contextMenu?.destroy(),this.contextMenu=null,this.canvasContextMenu?.destroy(),this.canvasContextMenu=null,this.pasteOptionsToolbar?.destroy(),this.pasteOptionsToolbar=null,this.rulers?.destroy(),this.rulers=null,this.parityWorkflows.closeReadingView(),this.parityWorkflows.closeOutlineView(),this.closeAudienceWindow(),this.presenterChannel?.close(),this.sessions.destroy(),this.optionsController.dispose(),this.detachSignatureWarning?.(),this.loading.invalidate(),this.editor.destroy(),this.annotations.dispose(),this.exporter.destroy(),this.userFontsStyle?.remove(),this.webfontsToken++,L0(this.doc),hl(this.lifecycle,()=>this.editor?.detachChrome()),this.loading.releaseLoaded());}clearOptionsCache(){(async()=>{try{let t=await chunkYOEVEUFZ_cjs.Dj();await Promise.all(t.map(n=>chunkYOEVEUFZ_cjs.Ej(n.key)));}catch{}})();}effective3DFlags(){return chunkYOEVEUFZ_cjs.xq({smartArt3D:this.options.smartArt3D??false,surfaceChart3D:this.options.surfaceChart3D??false,barChart3D:this.options.barChart3D??false,lineChart3D:this.options.lineChart3D??false,areaChart3D:this.options.areaChart3D??false,pieChart3D:this.options.pieChart3D??false},this.optionsController.getOptions())}getChromeOptions(){return this.customization.getChromeOptions()}getResolvedCustomization(){return this.customization.getResolved()}rebuildChrome(){this.remountChrome(),this.editor.attachChrome(),this.setupContextMenu(),this.setupAiChat(),this.sessions.remountUi(),this.renderer.renderAll();}remountChrome(){hl(this.lifecycle,()=>this.editor?.detachChrome()),this.lifecycle=vl(yl(this)),this.optionsController.applyAll();}};function M0(e,t={}){return new Yo(e,t)}function D0(e){let{store:t}=e,n=xo(e.document),o=hi(e.document),r=false,i=false,s=false,a=false,l=()=>chunkYOEVEUFZ_cjs.yh({authorizedCanEdit:e.getCanEdit(),configured:r,readOnly:i,sourcePending:e.getSourcePending?.()??false,sourceError:e.getSourceError?.()??!!t.get().error,status:d.getStatus(),remoteUsers:t.get().remotePresences}),p=()=>{if(!(s||a)){a=true;try{let m=l();t.get().editable!==m.canEdit&&t.set({editable:m.canEdit}),n.update(r?t.get().cursors:[],e.getScale?.()??1),o.update(m.remoteUsers,t.get().slides[t.get().currentSlide]?.elements??[],t.get().currentSlide,e.getScale?.()??1),e.onStateChange?.(m);}finally{a=false;}}},d=Bt({store:t,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:m=>t.set({editable:m}),onReadOnlyChange:m=>{i=m,p();},onStatusChange:p}),u=t.subscribe((m,g)=>{m.currentSlide!==g.currentSlide&&d.setActiveSlide(m.currentSlide),m.selectedElementId!==g.selectedElementId&&d.setSelection(m.selectedElementId??void 0,m.currentSlide),p();});return p(),{controller:d,cursorOverlay:n,selectionOverlay:o,getState:l,refresh:p,async setConfig(m){s||(r=!!m,m?await d.start(m):d.stop(),p());},destroy(){s||(s=true,u(),d.destroy(),n.destroy(),o.destroy());}}}Object.defineProperty(exports,"applyStyleMap",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.v}});Object.defineProperty(exports,"createDefaultRegistry",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.J}});Object.defineProperty(exports,"createEl",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.w}});Object.defineProperty(exports,"createElementRendererRegistry",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.u}});Object.defineProperty(exports,"createSvgEl",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.x}});Object.defineProperty(exports,"keyToLabel",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.D}});Object.defineProperty(exports,"renderSlideStage",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.A}});Object.defineProperty(exports,"translationsEn",{enumerable:true,get:function(){return chunkQPYQDJ2Q_cjs.C}});Object.defineProperty(exports,"BACKSTAGE_CARD_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Mq}});Object.defineProperty(exports,"BACKSTAGE_PAGE_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Lq}});Object.defineProperty(exports,"CANVAS_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Oq}});Object.defineProperty(exports,"EDITOR_SHORTCUT_ACTION_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Pq}});Object.defineProperty(exports,"ELEMENT_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Nq}});Object.defineProperty(exports,"OPTIONS_PAGE_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Iq}});Object.defineProperty(exports,"OPTIONS_SECTION_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Jq}});Object.defineProperty(exports,"OPTIONS_SETTING_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Kq}});Object.defineProperty(exports,"PPTX_OPEN_ACCEPT",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.vj}});Object.defineProperty(exports,"PRESENTATION_OPEN_EXTENSIONS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.uj}});Object.defineProperty(exports,"RIBBON_TAB_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Gq}});Object.defineProperty(exports,"TOOLBAR_BUTTON_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Hq}});Object.defineProperty(exports,"VIEWER_DIALOG_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Sq}});Object.defineProperty(exports,"VIEWER_EXPORT_FORMAT_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Tq}});Object.defineProperty(exports,"VIEWER_FEATURE_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Rq}});Object.defineProperty(exports,"VIEWER_PANEL_IDS",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Qq}});Object.defineProperty(exports,"buildInlineTextCommitPatch",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Rr}});Object.defineProperty(exports,"canInteractWithElement",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs._e}});Object.defineProperty(exports,"createImageElementFromFile",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.eo}});Object.defineProperty(exports,"defaultCssVars",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Fa}});Object.defineProperty(exports,"defaultRadius",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Da}});Object.defineProperty(exports,"defaultThemeColors",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Ca}});Object.defineProperty(exports,"describeCollaborationShellState",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.zh}});Object.defineProperty(exports,"forgetSessionDeck",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Jj}});Object.defineProperty(exports,"getSessionTabId",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Gj}});Object.defineProperty(exports,"isLegacyBinaryPresentation",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.xj}});Object.defineProperty(exports,"isSupportedPresentationFile",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.wj}});Object.defineProperty(exports,"loadPresentationDeck",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Dk}});Object.defineProperty(exports,"loadSessionDeck",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Ij}});Object.defineProperty(exports,"overlayInlineTextSnapshot",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Sr}});Object.defineProperty(exports,"parsePresentationSessionId",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.xk}});Object.defineProperty(exports,"presentationBaseName",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.yj}});Object.defineProperty(exports,"rememberSessionDeck",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Hj}});Object.defineProperty(exports,"restoreSessionDeck",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Kj}});Object.defineProperty(exports,"savedPresentationFileName",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.zj}});Object.defineProperty(exports,"themeToCssVars",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Ea}});Object.defineProperty(exports,"vermilionDarkTheme",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Ha}});Object.defineProperty(exports,"vermilionLightTheme",{enumerable:true,get:function(){return chunkYOEVEUFZ_cjs.Ga}});exports.PptxViewer=Yo;exports.canInlineEditElement=Ur;exports.createCollaborationController=Bt;exports.createCollaborationCursors=xo;exports.createCollaborationShell=D0;exports.createInitialViewerState=mi;exports.createPptxViewer=M0;exports.createRibbon=jr;exports.createStore=ci;exports.createTranslator=Ht;exports.exportAllSlidesToSvg=hP;exports.exportSlideToSvg=Jr;exports.getViewerCss=d0;exports.loadPresentation=mo;exports.openInlineEditor=Kr;exports.renderToCanvas=lo;exports.revokeBlobUrls=mt;