@eigenpal/docx-editor-core 1.2.0 → 1.2.1
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/{chunk-XCKTBNKN.js → chunk-KGTEBLB6.js} +1 -1
- package/dist/{chunk-L24C5TEX.mjs → chunk-RKDVY7I3.mjs} +1 -1
- package/dist/{chunk-RORPREG3.js → chunk-UGV4KRQB.js} +1 -1
- package/dist/{chunk-6JKM7TWJ.mjs → chunk-WKUHYMDO.mjs} +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-painter/index.d.mts +1 -1
- package/dist/layout-painter/index.d.ts +1 -1
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +14 -1
- package/dist/layout-painter/renderPage.d.ts +14 -1
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkAMB6Y77B_js=require('./chunk-AMB6Y77B.js'),chunkSORYYVJ7_js=require('./chunk-SORYYVJ7.js'),chunkLTHT4A4S_js=require('./chunk-LTHT4A4S.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkROG4MNOR_js=require('./chunk-ROG4MNOR.js'),chunkZBFNOJGY_js=require('./chunk-ZBFNOJGY.js'),chunkBHBOAP6Z_js=require('./chunk-BHBOAP6Z.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function Ve(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let l=o(m);if(l.length===0||!("height"in m))continue;let h=m.y-e.margins.top,u=h+m.height;l.forEach((y,b)=>{let g=`${b}:${y.id}`,f=a.get(g);f?(f.top=Math.min(f.top,h),f.bottom=Math.max(f.bottom,u)):(a.set(g,{group:y,depth:b,top:h,bottom:u}),i.push(g));});}let p=2,d=[];for(let m of i){let{group:l,depth:h,top:u,bottom:y}=a.get(m),b=h*(p+1),g=r.createElement("div");g.className="layout-block-sdt-box",g.dataset.sdtGroupId=l.id,g.dataset.sdtType=l.sdtType,g.dataset.sdtDepth=String(h+1),l.tag!=null&&(g.dataset.sdtTag=l.tag),l.alias!=null&&(g.dataset.sdtAlias=l.alias),l.lock!=null&&(g.dataset.sdtLock=l.lock),g.style.position="absolute",g.style.left=`${b}px`,g.style.top=`${u-p}px`,g.style.width=`${n-b*2}px`,g.style.height=`${y-u+p*2}px`;let f=l.alias||l.tag||l.sdtType;if(f){let w=r.createElement("span");w.className="layout-block-sdt-label",w.textContent=f,g.appendChild(w);}let x=gt(l.sdtType);if(x&&l.tag!=null&&!l.bound&&l.lock!=="contentLocked"&&l.lock!=="sdtContentLocked"){let w=r.createElement("button");w.type="button",w.className="layout-sdt-widget",w.dataset.sdtWidget=x,w.dataset.sdtTag=l.tag,w.dataset.sdtGroupId=l.id,w.setAttribute("aria-label",`${x} control ${l.alias||l.tag}`),x==="dropdown"?w.setAttribute("aria-haspopup","listbox"):x==="date"&&w.setAttribute("aria-haspopup","dialog"),w.textContent=x==="dropdown"?"\u25BE":x==="date"?"\u{1F4C5}":l.checked?"\u2612":"\u2610",g.appendChild(w);}if(l.repeatingItem&&!l.bound){let w=r.createElement("div");w.className="layout-sdt-repeat-controls";for(let s of ["add","remove"]){let c=r.createElement("button");c.type="button",c.className="layout-sdt-repeat-btn",c.dataset.sdtRepeat=s,c.dataset.sdtGroupId=l.id,c.setAttribute("aria-label",s==="add"?"Add item":"Remove item"),c.textContent=s==="add"?"\uFF0B":"\u2715",w.appendChild(c);}g.appendChild(w);}t.appendChild(g),d.push(g);}mt(t,d);}function gt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function mt(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(p,d)=>{for(let m of t){let l=m.getBoundingClientRect(),h=p>=l.left&&p<=l.right&&d>=l.top&&d<=l.bottom;h!==m.classList.contains("is-active")&&m.classList.toggle("is-active",h);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:p=>p(),r=false,a=0,i=0;e.addEventListener("mousemove",p=>{a=p.clientX,i=p.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let p of t)p.classList.remove("is-active");});}function ln(e,t,n){let o=new Set,r=e.content.size,a=i=>{let p=e.resolve(Math.max(0,Math.min(i,r)));for(let d=1;d<=p.depth;d++)p.node(d).type.name==="blockSdt"&&o.add(`sdt@${p.before(d)}`);};return a(t),n!==t&&a(n),o}function dn(e,t){let n=e.querySelectorAll(".layout-block-sdt-box");for(let o of n){let r=o.dataset.sdtGroupId,a=r!=null&&t.has(r);a!==o.classList.contains("is-focused")&&o.classList.toggle("is-focused",a);}}var Y={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function ut(e){return e.kind==="paragraph"}function ht(e){return e.kind==="table"}function yt(e){return e.kind==="image"}function le(e){e.style.position="absolute",e.style.overflow="hidden";}function bt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.paragraph}`,le(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function xt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.table}`,le(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function kt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.image}`,le(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function Te(e,t,n={}){let o=n.document??document;if(ut(e))return bt(e,t,o);if(ht(e))return xt(e,t,o);if(yt(e))return kt(e,t,o);let r=o.createElement("div");r.className=Y.fragment,le(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var v={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function j(e){return e.kind==="lineBreak"}function U(e){return e.kind==="field"}var Ye={image:"layout-image",imageAnchored:"layout-image-anchored"};function te(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ne(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=Ye.image,e.isAnchored&&i.classList.add(Ye.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=a.createElement("img");if(p.src=t.src,p.alt=t.alt??"",p.style.width="100%",p.style.height="100%",p.style.objectFit="contain",p.style.display="block",t.transform&&(p.style.transform=t.transform),p.draggable=false,t.hlinkHref){let d=a.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(p),i.appendChild(d);}else i.appendChild(p);return i}function St(e,t,n){if(t.fontFamily&&(e.style.fontFamily=chunkN3Y5BUKV_js.a(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(a=>!n||!n.has(a));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function K(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function oe(e,t,n){let o=t.createElement("span");if(o.className=`${v.run} ${v.text}`,St(o,e,n),K(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var Tt=1e3;function de(e,t,n,o){let r=t.createElement("span");r.className=`${v.run} ${v.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,K(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?wt(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(Tt),r.appendChild(i);}else r.textContent="\xA0";return r}function wt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function qe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function Ue(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function Ft(e,t){let n=t.createElement("img");n.className=`${v.run} ${v.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),te(e)&&ne(n,e);let o=qe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,Ue(a,e),K(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",Ue(n,e),K(n,e.pmStart,e.pmEnd),n}function Xe(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),te(e)&&ne(o,e);let r=qe(e.transform);if(r!==0){let a=Ze(e.width,e.height,r);n.style.height=`${a.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return K(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function ce(e,t){let n;return chunkSORYYVJ7_js.f(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=Xe(e,t):n=Ft(e,t),It(n,e),n}function It(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function we(e,t){let n=t.createElement("br");return n.className=`${v.run} ${v.lineBreak}`,K(n,e.pmStart,e.pmEnd),n}function pe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return oe(r,t,n?.resolvedCommentIds)}function Fe(e,t,n){if(z(e))return oe(e,t,n?.resolvedCommentIds);if(O(e))return de(e,t,48,void 0);if(G(e))return ce(e,t);if(j(e))return we(e,t);if(U(e)&&n)return pe(e,t,n);let o=t.createElement("span");return o.className=v.run,o}function et(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(z(a)){let i=r===t.fromRun?t.fromChar:0,p=r===t.toRun?t.toChar:a.text.length;if(i>0||p<a.text.length){let d=a.text.slice(i,p);n.push({...a,text:d,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+p:void 0});}else n.push(a);}else n.push(a);}return n}function Je(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Qe(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Ct(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Rt(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(z(a))o+=a.text;else if(U(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(O(a)||j(a))break}return o}var Et=.5;function Lt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(O(i)||j(i))break;if(z(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(U(i)){let p;i.fieldType==="PAGE"&&o?p=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?p=String(o.totalPages):p=i.fallback??"",r+=n(p,i.fontSize,i.fontFamily,i.bold,i.italic);}else G(i)&&!chunkSORYYVJ7_js.f(i)&&(r+=i.width||0);}return r}function Pt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a="Calibri",i=false,p=false)=>{if(!n)return o.length*7;let d=chunkN3Y5BUKV_js.a(a).cssFallback,m=r*96/72,l=[];return p&&l.push("italic"),i&&l.push("bold"),l.push(`${m}px`,d),n.font=l.join(" "),n.measureText(o).width}}function fe(e,t,n,o,r){let a=o.createElement("div");a.className=v.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=et(e,t);if(i.length===1&&G(i[0])){let x=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=Je(x),a.dataset.flexLine="true";}else i.some(G)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=Je(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let g=o.createElement("span");return g.className=`${v.run} layout-empty-run`,g.innerHTML=" ",a.appendChild(g),a}let p=n==="justify",d=false;p&&r&&(d=!r.isLastLine||r.paragraphEndsWithLineBreak,d&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(g=>z(g)&&g.highlight);a.style.overflow=m?"hidden":"visible";let l=i.some(O),h,u=Pt(o);if(l){let g=r?.tabStops?.map(Ct),f=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;h={explicitStops:g,leftIndent:f};}let y=0,b=r?.leftIndentPx??0;if(r?.isFirstLine){let g=r?.firstLineIndentPx??0;y=b+g;}else y=b;for(let g=0;g<i.length;g++){let f=i[g];if(O(f)&&h){let x=Lt(i,g,u,r?.context),w=Rt(i,g,r?.context),s=w.indexOf("."),c=s>=0?u(w.slice(0,s)):0,T=chunkLTHT4A4S_js.r(y,h,{followingWidth:x,decimalPrefixWidth:c}),k=r?.lineRightEdgePx,S=x,R=false;for(let E=g+1;E<i.length&&!j(i[E]);E++)if(O(i[E])){R=true;break}if(k!==void 0&&T.alignment==="end"&&!R&&y+T.width+S>=k-Et){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r?.isFirstLine&&r.firstLineIndentPx&&r.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r.firstLineIndentPx}px`);let E=de(f,o,0,T.leader);E.style.flex="1 1 0",E.style.minWidth="0",E.style.width="auto",a.appendChild(E);for(let P=g+1;P<i.length;P++){let C=i[P];if(O(C)||j(C))break;if(z(C))a.appendChild(oe(C,o,r?.context?.resolvedCommentIds));else if(U(C)&&r?.context)a.appendChild(pe(C,o,r.context));else if(G(C)){if(chunkSORYYVJ7_js.f(C))continue;let Q=Qe(C);r?.renderedInlineImageKeys?.has(Q)||(r?.renderedInlineImageKeys?.add(Q),a.appendChild(ce(C,o)));}else a.appendChild(Fe(C,o,r?.context));}break}let L=T.width;k!==void 0&&y+L+S>k&&(L=Math.max(1,k-y-S));let F=de(f,o,L,T.leader);a.appendChild(F),y+=L;}else if(z(f)){let x=oe(f,o,r?.context?.resolvedCommentIds);if(f.highlight){let T=(f.fontSize?f.fontSize*96/72:14.67)*1.2,k=Math.max(0,t.lineHeight-T);if(k>0){let S=k/2;x.style.paddingTop=`${S}px`,x.style.paddingBottom=`${S}px`;}}a.appendChild(x);let w=f.fontSize||11,s=f.fontFamily||"Calibri";y+=u(f.text,w,s,f.bold,f.italic);}else if(G(f)){if(chunkSORYYVJ7_js.f(f))continue;let x=Qe(f);if(r?.renderedInlineImageKeys?.has(x))continue;r?.renderedInlineImageKeys?.add(x);let w=ce(f,o);a.appendChild(w),f.displayMode!=="block"&&f.wrapType!=="topAndBottom"&&(y+=f.width);}else if(j(f)){let x=we(f,o);a.appendChild(x);}else if(U(f)&&r?.context){let x=pe(f,o,r.context);a.appendChild(x);let w=f.fallback??"";f.fieldType==="PAGE"?w=String(r.context.pageNumber):f.fieldType==="NUMPAGES"&&(w=String(r.context.totalPages));let s=f.fontSize||11,c=f.fontFamily||"Calibri";y+=u(w,s,c,f.bold,f.italic);}else {let x=Fe(f,o,r?.context);a.appendChild(x);}}return a}function re(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function tt(e,t){return !e&&!t||!e||!t?false:re(e.top,t.top)&&re(e.bottom,t.bottom)&&re(e.left,t.left)&&re(e.right,t.right)&&re(e.between,t.between)}function A(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=v.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),K(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let p=t.attrs?.pPrIns,d=t.attrs?.pPrDel;if(p||d){let k=p??d;i.classList.add("layout-revision-pmark"),i.classList.add(p?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(k.revisionId),i.dataset.revisionAuthor=k.author,k.date&&(i.dataset.revisionDate=k.date);}let m=n.lines.slice(e.fromLine,e.toLine),l=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let h=t.attrs?.bidi;h&&(i.dir="rtl"),l?l==="center"?i.style.textAlign="center":l==="right"?i.style.textAlign="right":l==="left"?i.style.textAlign="left":i.style.textAlign=h?"right":"left":h&&(i.style.textAlign="right");let u=t.attrs?.indent,y=0,b=0;u&&(h?(u.left&&u.left>0&&(b=u.left),u.right&&u.right>0&&(y=u.right)):(u.left&&u.left>0&&(y=u.left),u.right&&u.right>0&&(b=u.right)));let g=t.attrs?.borders;if(g){let k=C=>{switch(C){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};i.style.boxSizing="border-box";let S=C=>`${C.width}px ${k(C.style)} ${C.color}`,R=tt(r.prevBorders,g),I=tt(g,r.nextBorders),L=R?g.between:g.top,F=I?void 0:g.bottom,E=a.createElement("div");if(E.className="layout-paragraph-border",E.style.position="absolute",E.style.pointerEvents="none",E.style.boxSizing="border-box",E.style.left=`${y-(g.left?.space??0)}px`,E.style.right=`${b-(g.right?.space??0)}px`,E.style.top=`${-(L?.space??0)}px`,E.style.bottom=`${-(F?.space??0)}px`,L&&(E.style.borderTop=S(L)),F&&(E.style.borderBottom=S(F)),g.left&&(E.style.borderLeft=S(g.left)),g.right&&(E.style.borderRight=S(g.right)),(L||F||g.left||g.right)&&i.appendChild(E),g.bar){let C=a.createElement("div");C.style.position="absolute",C.style.left="-8px",C.style.top="0",C.style.bottom="0",C.style.borderLeft=S(g.bar),i.style.position="relative",i.appendChild(C);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let f=e.width-y-b,w=t.runs[t.runs.length-1]?.kind==="lineBreak",s=n.lines.length,c=0;u?.hanging&&u.hanging>0?c=-u.hanging:u?.firstLine&&u.firstLine>0&&(c=u.firstLine);let T=r.renderedInlineImageKeys??new Set;for(let k=0;k<m.length;k++){let S=m[k],R=e.fromLine+k,I=R===s-1,L=R===0&&!e.continuesFromPrev,F=S.leftOffset??0,E=S.rightOffset??0,P=f;if(L){let B=u?.hanging&&u.hanging>0,M=u?.firstLine&&u.firstLine>0;B&&u?.hanging?P=f+u.hanging:M&&u?.firstLine&&(P=f-u.firstLine);}if(vt(S,t)){let B=a.createElement("div");B.className=`${v.line} layout-line-split`,B.style.position="relative",B.style.height=`${S.lineHeight}px`,B.style.lineHeight=`${S.lineHeight}px`;for(let M of S.segments){let ke={fromRun:M.fromRun,fromChar:M.fromChar,toRun:M.toRun,toChar:M.toChar,width:M.width,ascent:S.ascent,descent:S.descent,lineHeight:S.lineHeight},_=fe(t,ke,l,a,{availableWidth:M.availableWidth,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${M.leftOffset}px`,_.style.top="0",_.style.width=`${M.availableWidth}px`,B.appendChild(_);}i.appendChild(B);continue}let C=fe(t,S,l,a,{availableWidth:P-F-E,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T,lineRightEdgePx:e.width-b-E});if(F>0||E>0){F>0&&(C.style.marginLeft=`${F}px`),E>0&&(C.style.marginRight=`${E}px`);let B=P-F-E;B>0&&(C.style.width=`${B}px`);}S.floatSkipBefore&&S.floatSkipBefore>0&&(C.style.marginTop=`${S.floatSkipBefore}px`);let Q=u?.hanging&&u.hanging>0,Be=u?.firstLine&&u.firstLine>0,ct=C.dataset.flexLine==="true";if(L?y>0&&Q?(C.style.paddingLeft=`${y}px`,ct||(C.style.textIndent=`-${u.hanging}px`)):y>0&&Be?(C.style.paddingLeft=`${y}px`,C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Be&&(C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Q&&(C.style.paddingLeft=`${u.hanging}px`),b>0&&(C.style.paddingRight=`${b}px`),L&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let B=u?.hanging??0,M=u?.firstLine??0,ke=B>0?Math.max(0,y-B):y+M;C.style.paddingLeft=`${ke}px`,C.style.textIndent="0";let{fontFamily:_,fontSize:pt}=chunkLTHT4A4S_js.s(t),ft=Bt(t.attrs.listMarker,chunkLTHT4A4S_js.t(t),a,_,pt,t.attrs.listMarkerRevision);C.insertBefore(ft,C.firstChild);}i.appendChild(C);}if((p||d)&&!e.continuesOnNext){let k=i.lastElementChild;if(k){let S=a.createElement("span");S.className="layout-revision-pmark-glyph",p?S.classList.add("layout-revision-ins"):S.classList.add("layout-revision-del"),S.textContent="\xB6",S.setAttribute("aria-hidden","true"),k.appendChild(S);}}return i}function vt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Bt(e,t,n,o,r,a){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=chunkN3Y5BUKV_js.a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a==="ins"?i.style.color="#2e7d32":a==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),te(r)&&ne(i,r),a.appendChild(i),o.appendChild(a);}return o}function Ie(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var D={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Mt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let p=i;for(let m of p.runs){if(m.kind!=="image")continue;let l=m;if(!chunkSORYYVJ7_js.f(l))continue;let h=l.position,u=l.distTop??0,y=l.distBottom??0,b=l.distLeft??12,g=l.distRight??12,f="left",x=0;if(h?.horizontal){let s=h.horizontal;s.align==="right"?(f="right",x=n-l.width):s.align==="left"?x=0:s.align==="center"?x=(n-l.width)/2:s.posOffset!==void 0&&(x=chunk4Q2IP5FW_js.e(s.posOffset),f=x>n/2?"right":"left");}else l.cssFloat==="right"&&(f="right",x=n-l.width);let w=r;if(h?.vertical){let s=h.vertical;s.posOffset!==void 0?w=r+chunk4Q2IP5FW_js.e(s.posOffset):s.align==="top"&&(w=0);}x=Math.max(0,Math.min(x,n-l.width)),o.push({src:l.src,width:l.width,height:l.height,alt:l.alt,transform:l.transform,x,y:w,side:f,distTop:u,distBottom:y,distLeft:b,distRight:g,wrapText:chunkSORYYVJ7_js.h(l.cssFloat),wrapType:l.wrapType,pmStart:l.pmStart,pmEnd:l.pmEnd});}let d=t.blocks[a];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function $t(e,t,n,o){let r=o.createElement("div");r.className=D.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,p=Math.max(0,t.width-a-i);r.style.width=`${p}px`;let d=Mt(e,t,p),m;if(d.length>0){m=d.filter(chunkSORYYVJ7_js.d).map(b=>{let g=b.x+b.width+b.distRight,f=b.y-b.distTop,x=b.y+b.height+b.distBottom,w=0,s=0,c=b.wrapText??"bothSides";return c==="right"?w=g:c==="left"?s=p-(b.x-b.distLeft):b.side==="left"?w=g:s=p-(b.x-b.distLeft),{leftMargin:w,rightMargin:s,topY:f,bottomY:x}});let y=d.filter(chunkSORYYVJ7_js.e);y.length>0&&r.appendChild(X(y,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let l=0,h=0;for(let y=0;y<e.blocks.length;y++){let b=e.blocks[y],g=t.blocks[y];if(b?.kind==="paragraph"&&g?.kind==="paragraph"){let f=b,x=g,w=f.attrs?.spacing,s=Math.max(h,w?.before??0);l+=s,m&&m.length>0&&(x=chunkLTHT4A4S_js.v(f,p,{floatingZones:m,paragraphYOffset:l}));let c={blockId:f.id,width:p,height:x.totalHeight,fromLine:0,toLine:x.lines.length,pmStart:f.pmStart,pmEnd:f.pmEnd},T={...n,insideTableCell:true},k=A(c,f,x,T,{document:o});k.style.position="relative",s>0&&(k.style.marginTop=`${s}px`),r.appendChild(k),l+=x.totalHeight,h=w?.after??0;}else if(b?.kind==="table"&&g?.kind==="table"){let f=b,x=g,w=h,s=Ht(f,x,n,o);s.style.position="relative",w>0&&(s.style.marginTop=`${w}px`),r.appendChild(s),l+=w+(g.totalHeight??0),h=0;}}h>0&&(r.style.paddingBottom=`${h}px`);let u=d.filter(y=>!chunkSORYYVJ7_js.e(y));return u.length>0&&r.appendChild(X(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Ht(e,t,n,o){let r=o.createElement("div");r.className=`${D.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let a=e.rows[0],i=a?.trackedIns,p=a?.trackedDel,d=(b,g)=>!!b&&!!g&&(b.author??"")===(g.author??"")&&(b.date??null)===(g.date??null),m=e.rows.length>0&&e.rows.every(b=>i?d(b.trackedIns,i):p?d(b.trackedDel,p):false);if(m){let b=i??p,g=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${g}`),r.dataset.revisionId=String(b.revisionId),r.dataset.revisionAuthor=b.author,b.date&&(r.dataset.revisionDate=b.date);}let l=[],h=0;for(let b=0;b<t.rows.length;b++)l.push(h),h+=t.rows[b]?.height??0;l.push(h);let u=new Map,y=0;for(let b=0;b<e.rows.length;b++){let g=e.rows[b],f=t.rows[b];if(!g||!f)continue;let x=Ce(g,f,b,y,t.columnWidths,e.rows.length,n,o,u,l,void 0,m);r.appendChild(x),y+=f.height;}return r.style.height=`${y}px`,r}function ge(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function At(e,t,n,o,r,a,i,p){let d=i.createElement("div");d.className=D.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==p&&Ie(d,"cell",e.trackedMarker.kind,e.trackedMarker.info),d.style.position="absolute",d.style.left=`${n}px`,d.style.top="0",d.style.width=`${t.width}px`,d.style.height=`${o}px`,d.style.overflow="hidden",d.style.boxSizing="border-box";let m=e.padding?.top??1,l=e.padding?.right??7,h=e.padding?.bottom??1,u=e.padding?.left??7;if(d.style.padding=`${m}px ${l}px ${h}px ${u}px`,e.borders&&(r.isFirstRow&&ge(d,"top",e.borders.top),ge(d,"right",e.borders.right),ge(d,"bottom",e.borders.bottom),r.isFirstCol&&ge(d,"left",e.borders.left)),e.background&&(d.style.backgroundColor=e.background),e.noWrap&&(d.style.whiteSpace="nowrap"),e.verticalAlign)switch(d.style.display="flex",d.style.flexDirection="column",e.verticalAlign){case "top":d.style.justifyContent="flex-start";break;case "center":d.style.justifyContent="center";break;case "bottom":d.style.justifyContent="flex-end";break}let y=$t(e,t,a,i);if(d.appendChild(y),e.blocks.length>0){let b=e.blocks[0],g=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(d.dataset.pmStart=String(b.pmStart)),g&&"pmEnd"in g&&g.pmEnd!==void 0&&(d.dataset.pmEnd=String(g.pmEnd));}return d}function Ce(e,t,n,o,r,a,i,p,d,m,l,h){let u=p.createElement("div");u.className=D.row,h||(e.trackedDel?Ie(u,"row","del",e.trackedDel):e.trackedIns&&Ie(u,"row","ins",e.trackedIns)),u.style.position="absolute",u.style.left="0",u.style.top=`${o}px`,u.style.width="100%",u.style.height=`${t.height}px`,u.dataset.rowIndex=String(n);let y=new Set;if(d){for(let[,f]of d)if(f.startRow<n&&f.startRow+f.rowSpan>n)for(let x=0;x<f.colSpan;x++)y.add(f.columnIndex+x);}let b=0,g=0;for(;y.has(g);)b+=r[g]??0,g++;for(let f=0;f<e.cells.length;f++){let x=e.cells[f],w=t.cells[f];if(!x||!w)continue;let s=x.colSpan??1,c=x.rowSpan??1,T=t.height;if(c>1&&m){T=0;for(let F=n;F<n+c&&F<m.length-1;F++)T+=(m[F+1]??0)-(m[F]??0);T===0&&(T=t.height*c);}let k=n===0||l===true,R=g===0;g+s>=r.length;let L=At(x,w,b,T,{isFirstRow:k,isFirstCol:R},i,p,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(L.dataset.cellIndex=String(f),L.dataset.columnIndex=String(g),c>1&&(L.dataset.rowSpan=String(c)),u.appendChild(L),c>1&&d){let F=`${n}-${g}`;d.set(F,{cell:x,cellMeasure:w,columnIndex:g,startRow:n,rowSpan:c,colSpan:s,x:b,totalHeight:T});}for(let F=0;F<s&&g+F<r.length;F++)b+=r[g+F]??0;for(g+=s;y.has(g);)b+=r[g]??0,g++;}return u}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=D.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=t.rows[0],d=p?.trackedIns,m=p?.trackedDel,l=(s,c)=>!!s&&!!c&&(s.author??"")===(c.author??"")&&(s.date??null)===(c.date??null),h=t.rows.length>0&&t.rows.every(s=>d?l(s.trackedIns,d):m?l(s.trackedDel,m):false);if(h){let s=d??m,c=d?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${c}`),i.dataset.revisionId=String(s.revisionId),i.dataset.revisionAuthor=s.author,s.date&&(i.dataset.revisionDate=s.date),i.style.overflow="visible";}let u=0;for(let s=0;s<n.columnWidths.length-1;s++){u+=n.columnWidths[s]??0;let c=a.createElement("div");c.className=D.resizeHandle,c.style.position="absolute",c.style.left=`${u-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}let y=[],b=0;for(let s=0;s<n.rows.length;s++)y.push(b),b+=n.rows[s]?.height??0;y.push(b);let g=new Map,f=e.headerRowCount??0,x=0;if(f>0&&e.continuesFromPrev)for(let s=0;s<f;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,s===0,h);k.dataset.repeatedHeader="true",i.appendChild(k),x+=T.height;}for(let s=e.fromRow;s<e.toRow;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=f>0&&e.continuesFromPrev?false:e.continuesFromPrev&&s===e.fromRow,S=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,k,h);i.appendChild(S),x+=T.height;}let w=0;for(let s=e.fromRow;s<e.toRow;s++)if(w+=n.rows[s]?.height??0,s<e.toRow-1){let c=a.createElement("div");c.className=D.rowResizeHandle,c.style.position="absolute",c.style.left="0",c.style.top=`${w-3}px`,c.style.width="100%",c.style.height="6px",c.style.cursor="row-resize",c.style.zIndex="10",c.dataset.rowIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}if(e.toRow===t.rows.length){let s=a.createElement("div");s.className=D.tableEdgeHandleBottom,s.style.position="absolute",s.style.left="0",s.style.top=`${w-3}px`,s.style.width="100%",s.style.height="6px",s.style.cursor="row-resize",s.style.zIndex="10",s.dataset.rowIndex=String(t.rows.length-1),s.dataset.tableBlockId=String(e.blockId),s.dataset.isEdge="bottom",e.pmStart!==void 0&&(s.dataset.tablePmStart=String(e.pmStart)),i.appendChild(s);}if(e.toRow===t.rows.length){let s=n.columnWidths.reduce((T,k)=>T+k,0),c=a.createElement("div");c.className=D.tableEdgeHandleRight,c.style.position="absolute",c.style.left=`${s-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(n.columnWidths.length-1),c.dataset.tableBlockId=String(e.blockId),c.dataset.isEdge="right",e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}return i}var zt={textBox:"layout-textbox"};function J(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=zt.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",Ot(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",h=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${l} ${h}`;}let p=t.margins??chunkDROCYKAR_js.a;i.style.padding=`${p.top}px ${p.right}px ${p.bottom}px ${p.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=e.width-p.left-p.right,m=0;for(let l=0;l<t.content.length;l++){let h=t.content[l],u=n.innerMeasures[l];if(!u)continue;let y={blockId:h.id,width:d,height:u.totalHeight,pmStart:h.pmStart,pmEnd:h.pmEnd,fromLine:0,toLine:u.lines.length},b=A(y,h,u,{...o,positioning:"flow"},{document:a});i.appendChild(b),m+=u.totalHeight;}return i}function Ot(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function nt(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:a}=Dt(e,n,o),i=_t(e,t,o);return {x:r,y:i,side:a}}function Dt(e,t,n){let o=e.position?.horizontal;if(!o)return e.cssFloat==="right"?{x:t-e.width,side:"right"}:{x:0,side:"left"};let r=Nt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(o.posOffset!==void 0){let a=r.base+chunk4Q2IP5FW_js.e(o.posOffset);return {x:a,side:a>t/2?"right":"left"}}return {x:r.base,side:"left"}}function Nt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function _t(e,t,n){let o=e.position?.vertical;if(!o)return t;let r=Wt(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e.height:t:o.posOffset!==void 0?r.base+chunk4Q2IP5FW_js.e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Wt(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,a=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:a,size:r};default:return {base:0,size:a}}}function ot(e){return e?.align??e?.alignment}function Gt(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ot(n),r=n.posOffset!==void 0?chunk4Q2IP5FW_js.e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function jt(e,t,n){let o=t.position.horizontal;if(!o){e.style.left="0";return}let r=ot(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)}px`;return}if(r==="right"){e.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e.style.left=`${(n.contentWidth-t.width)/2}px`;return}e.style.left="0";}function rt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ee(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,p=[],d=0;for(let m=0;m<e.blocks.length;m++){let l=e.blocks[m],h=e.measures[m];if(!(!l||!h))if(l.kind==="paragraph"){if(h.kind!=="paragraph")continue;let u=l,y=h,b=u.attrs?.spacing?.before??0,g=d,f=[];for(let c of u.runs)if(c.kind==="image"&&"position"in c&&c.position){let T=c;p.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:g,position:T.position});}else f.push(c);let x={...u,runs:f},w={blockId:u.id,width:i,height:y.totalHeight,fromLine:0,toLine:y.lines.length,pmStart:u.pmStart,pmEnd:u.pmEnd},s=A(w,x,y,{...t,positioning:"absolute"},{document:r});s.style.top=`${d+b}px`,s.style.left="0",s.style.width=`${i}px`,a.appendChild(s),d+=y.totalHeight;}else if(l.kind==="table"){if(h.kind!=="table")continue;let u={blockId:l.id,width:h.totalWidth,height:h.totalHeight,fromRow:0,toRow:h.rows.length,pmStart:l.pmStart,pmEnd:l.pmEnd},y=Z(u,l,h,{...t,positioning:"absolute"},{document:r});if(l.floating){let{left:b,top:g}=rt(l.floating,o);y.style.top=`${g}px`,y.style.left=`${b}px`,a.appendChild(y);}else y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.totalHeight;}else if(l.kind==="image"){if(h.kind!=="image")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=q(u,l,h,{...t},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else if(l.kind==="textBox"){if(h.kind!=="textBox")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=J(u,l,h,{...t,positioning:"absolute"},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else l.kind==="sectionBreak"||l.kind==="pageBreak"||l.kind==="columnBreak"||chunkDROCYKAR_js.c(l,"renderHeaderFooterContent");}for(let m of p){let l=r.createElement("img");l.src=m.src,l.width=m.width,l.height=m.height,m.alt&&(l.alt=m.alt),l.style.position="absolute",l.style.display="block",l.style.width=`${m.width}px`,l.style.height=`${m.height}px`,l.style.maxWidth="none",l.style.maxHeight="none",jt(l,m,o),l.style.top=`${Gt(m,o)}px`,a.appendChild(l);}return a}var me=12,it=6;function Kt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Le=8;function no(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function Pe(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let p=i.pmStart??-1,d=i.pmEnd??-1;if(p>=0&&d>=0&&o.pmPos>=p&&o.pmPos<d){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function Vt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Le,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:Le}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Le,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Yt(e,t,n,o){let r=chunkZBFNOJGY_js.c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=chunkAMB6Y77B_js.c(r,{theme:o.theme??void 0}),i=Vt(a,t),p=o.measureBlocks(i,n),d=p.reduce((m,l)=>l.kind==="paragraph"||l.kind==="table"?m+l.totalHeight:l.kind==="image"||l.kind==="textBox"?m+l.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:p,height:d}}function oo(e,t,n,o){let r=new Map,a=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&a.set(d.id,d);let i=1,p=new Set;for(let d of t){if(p.has(d.footnoteId))continue;p.add(d.footnoteId);let m=a.get(d.footnoteId);m&&(r.set(d.footnoteId,Yt(m,i,n,o)),i++);}return r}function at(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let p=t.get(i);p&&(a+=p.height);}a>0&&(a+=me,n.set(o,a));}return n}function ro(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,p=Pe(i.pages,r),d=at(p,a);if(d.size===0)return {layout:i,pageFootnoteMap:p,converged:true};let m=i,l=false;for(let h=0;h<it;h++){m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d});let u=Pe(m.pages,r),y=at(u,a);if(p=u,Kt(d,y)){d=y,l=true;break}d=y;}l||(m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d}),p=Pe(m.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${it} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[h,u]of p){let y=m.pages.find(b=>b.number===h);y&&(y.footnoteIds=u);}return {layout:m,pageFootnoteMap:p,converged:l}}function io(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let p=[];for(let d of i){let m=r.get(d);if(!m)continue;let l=t.get(d),h=l?.displayNumber??0;p.push({displayNumber:String(h),text:chunkROG4MNOR_js.x(m),content:l});}p.length>0&&o.set(a,p);}return o}function Ut(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let a=0;for(let i=0;i<e.blocks.length;i++){let p=e.blocks[i],d=e.measures[i];if(!(!p||!d)){if(p.kind==="paragraph"&&d.kind==="paragraph"){let m=p.attrs?.spacing?.before??0,l={blockId:p.id,width:t,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromLine:0,toLine:d.lines.length},h=A(l,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});h.style.top=`${a+m}px`,h.style.left="0",h.style.width=`${t}px`,h.style.height=`${d.totalHeight}px`,r.appendChild(h),a+=d.totalHeight;}else if(p.kind==="table"&&d.kind==="table"){let m={blockId:p.id,width:d.totalWidth,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromRow:0,toRow:d.rows.length},l=Z(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.totalHeight;}else if(p.kind==="image"&&d.kind==="image"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=q(m,p,d,{...n},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}else if(p.kind==="textBox"&&d.kind==="textBox"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=J(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}}}return r}function Xt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function st(e){let t=me;for(let n of e)n.content&&(t+=n.content.height);return t}function lt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,p=(me-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${p}px`,a.style.marginTop=`${p}px`,r.appendChild(a);for(let d of e)r.appendChild(d.content?Ut(d.content,t,n,o):Xt(d,o));return r}function ve(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function dt(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function qt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Zt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var ue=2,Jt=8;function Qt(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,p=qt(n),d=o>=Jt;if(i&&i.optionsHash===p&&d){let f=i.pageStates,x=i.pageDataMap,w=a.__pageObserver,s=[];for(let k of e)s.push(dt(k));let c=i.totalPages!==o,T=Math.min(f.length,e.length);for(let k=0;k<T;k++){let S=f[k],R=s[k];if(S.fingerprint===R&&!c){let F=x.get(S.element);F&&(F.page=e[k]);continue}let I=S.element,L=x.get(I);L&&(L.page=e[k],L.rendered&&en(I,x,o,n)),S.fingerprint=R,ie(I,e[k].size.w,e[k].size.h,n),I.dataset.pageNumber=String(e[k].number);}if(e.length>f.length){let k=n.document??document;for(let S=f.length;S<e.length;S++){let R=e[S],I=k.createElement("div");I.className=n.pageClassName??N.page,I.dataset.pageNumber=String(R.number),I.dataset.pageIndex=String(S),ie(I,R.size.w,R.size.h,n),t.appendChild(I),f.push({element:I,fingerprint:s[S]}),x.set(I,{page:R,index:S,rendered:false}),w&&w.observe(I);}}if(e.length<f.length){for(let k=f.length-1;k>=e.length;k--){let S=f[k].element;w&&w.unobserve(S),x.delete(S),t.removeChild(S);}f.length=e.length;}for(let k=0;k<f.length;k++){let S=x.get(f[k].element);S&&(S.index=k);}return i.totalPages=o,i.currentOptions=n,"incremental"}let l=a.__pageObserver;l&&(l.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,Zt(t,r);let h=[],u=[];for(let f=0;f<e.length;f++){let x=e[f];if(u.push(dt(x)),d){let s=(n.document??document).createElement("div");s.className=n.pageClassName??N.page,s.dataset.pageNumber=String(x.number),s.dataset.pageIndex=String(f),ie(s,x.size.w,x.size.h,n),t.appendChild(s),h.push(s);}else {let{context:w,pageOptions:s}=ve(x,o,n),c=ye(x,w,s);t.appendChild(c),h.push(c);}}if(!d)return "full";let y=new Map;for(let f=0;f<e.length;f++)y.set(h[f],{page:e[f],index:f,rendered:false});let b=new IntersectionObserver(f=>{let x=a.__pageRenderState;if(!x)return;let{currentOptions:w,totalPages:s,pageDataMap:c}=x;for(let R of f){let I=R.target,L=c.get(I);if(L&&R.isIntersecting){he(I,c,s,w);for(let F=-ue;F<=ue;F++){let E=L.index+F;E>=0&&E<x.pageStates.length&&E!==L.index&&he(x.pageStates[E].element,c,s,w);}}}let T=window.innerHeight,k=T*3,S=new Set;for(let[R,I]of c){if(!I.rendered)continue;let L=R.getBoundingClientRect();L.bottom>-k&&L.top<T+k&&S.add(I.index);}for(let[R,I]of c){if(!I.rendered)continue;let L=false;for(let F of S)if(Math.abs(I.index-F)<=ue+1){L=true;break}!L&&S.size>0&&tn(R,c);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let f of h)b.observe(f);a.__pageObserver=b,a.__pageRenderState={pageStates:h.map((f,x)=>({element:f,fingerprint:u[x]})),totalPages:o,optionsHash:p,pageDataMap:y,currentOptions:n};let g=Math.min(e.length,ue+3);for(let f=0;f<g;f++)he(h[f],y,o,n);return "full"}function he(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=ve(r.page,n,o),p=ye(r.page,a,i);for(;p.firstChild;)e.appendChild(p.firstChild);r.rendered=true;}function en(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=ve(r.page,n,o),d=ye(r.page,a,i).querySelector(`.${N.content}`),m=e.querySelector(`.${N.content}`);d&&m?e.replaceChild(d,m):(e.innerHTML="",r.rendered=false,he(e,t,n,o));}function tn(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}var N={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ie(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=chunkN3Y5BUKV_js.a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function nn(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function be(e){return e?.space!==void 0?chunk4Q2IP5FW_js.i(e.space):0}function xe(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=chunkBHBOAP6Z_js.c(t,n,o);for(let[d,m]of Object.entries(r))e.style[d]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let d=parseFloat(e.style[i]);(!Number.isFinite(d)||d<3)&&(e.style[i]="3px");}}function on(e,t,n){let o=t.pageBorders;if(!o||!nn(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(h=>h&&h.style!=="none"&&h.style!=="nil"))return null;let a=o.offsetFrom??"text",i=be(o.top),p=be(o.right),d=be(o.bottom),m=be(o.left),l=n.createElement("div");return l.className="layout-page-border",l.style.position="absolute",l.style.pointerEvents="none",l.style.boxSizing="border-box",l.style.zIndex=o.zOrder==="back"?"0":"20",a==="page"?(l.style.top=`${i}px`,l.style.right=`${p}px`,l.style.bottom=`${d}px`,l.style.left=`${m}px`):(l.style.top=`${Math.max(0,e.margins.top-i)}px`,l.style.right=`${Math.max(0,e.margins.right-p)}px`,l.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,l.style.left=`${Math.max(0,e.margins.left-m)}px`),xe(l,o.top,"Top",t.theme),xe(l,o.bottom,"Bottom",t.theme),xe(l,o.left,"Left",t.theme),xe(l,o.right,"Right",t.theme),l}function rn(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function an(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function sn(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!chunkSORYYVJ7_js.f(i))continue;let p=i.distTop??0,d=i.distBottom??0,m=i.distLeft??12,l=i.distRight??12,{x:h,y:u,side:y}=Re(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:y,x:h,y:u,distTop:p,distBottom:d,distLeft:m,distRight:l,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:chunkSORYYVJ7_js.h(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function ye(e,t,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??N.page,r.dataset.pageNumber=String(e.number),ie(r,e.size.w,e.size.h,n);let a=on(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=N.content,rn(i,e);let p=nt(e),d=p.contentWidth,m=[],l=[];for(let s of e.fragments)if(s.kind==="paragraph"&&n.blockLookup){let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph"){let T=c.block,k=s.y-e.margins.top,S=sn(T,k,d,p);m.push(...S);}}for(let s of m)chunkSORYYVJ7_js.d(s)&&l.push({side:s.side,x:s.x,y:s.y,width:s.width,height:s.height,distTop:s.distTop,distBottom:s.distBottom,distLeft:s.distLeft,distRight:s.distRight,wrapText:s.wrapText,wrapType:s.wrapType});if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="table")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="table")continue;let k=c.block.floating;if(!k)continue;let S=s.x-e.margins.left,R=s.y-e.margins.top,I=k.topFromText??0,L=k.bottomFromText??0,F=k.leftFromText??12,E=k.rightFromText??12,P=S<d/2?"left":"right";l.push({side:P,x:S,y:R,width:s.width,height:s.height,distTop:I,distBottom:L,distLeft:F,distRight:E});}if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="textBox")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="textBox")continue;let T=c.block;if(!chunkLTHT4A4S_js.E(T))continue;let k=s.y-e.margins.top,S=Re({width:s.width,height:s.height,position:T.position,cssFloat:T.cssFloat},k,d,p);s.x=e.margins.left+S.x,s.y=e.margins.top+S.y,chunkLTHT4A4S_js.F(T)&&l.push({side:S.side,x:S.x,y:S.y,width:s.width,height:s.height,distTop:T.distTop??0,distBottom:T.distBottom??0,distLeft:T.distLeft??12,distRight:T.distRight??12,wrapText:T.wrapText,wrapType:T.wrapType});}let h=l.length>0?chunkLTHT4A4S_js.p(l,d):[],u=m.filter(chunkSORYYVJ7_js.e),y=m.filter(s=>!chunkSORYYVJ7_js.e(s));if(u.length>0){let s=X(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(s);}let b=s=>{if(s.kind!=="paragraph"||!n.blockLookup||!s.blockId)return;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph")return c.block.attrs?.borders},g,f=new Map,x=s=>!n.blockLookup||!s.blockId?[]:n.blockLookup.get(String(s.blockId))?.block.sdtGroups??[],w=(s,c)=>{if(c.length===0)return;let T=c[c.length-1];s.classList.add("layout-block-sdt"),s.dataset.sdtGroupId=T.id,s.dataset.sdtType=T.sdtType,s.dataset.sdtDepth=String(c.length),T.tag!=null&&(s.dataset.sdtTag=T.tag),T.alias!=null&&(s.dataset.sdtAlias=T.alias),T.lock!=null&&(s.dataset.sdtLock=T.lock);};for(let s=0;s<e.fragments.length;s++){let c=e.fragments[s],T,k={...t,section:"body",contentWidth:d},S=c.y-e.margins.top;if(n.blockLookup&&c.blockId){let R=n.blockLookup.get(String(c.blockId));if(c.kind==="paragraph"&&R?.block.kind==="paragraph"&&R?.measure.kind==="paragraph"){let I=R.block,L=s+1<e.fragments.length?b(e.fragments[s+1]):void 0,F=String(c.blockId),E=f.get(F);E||(E=new Set,f.set(F,E));let P=R.measure;h.length>0&&(P=chunkLTHT4A4S_js.v(I,d,{floatingZones:h,paragraphYOffset:S})),T=A(c,I,P,k,{document:o,prevBorders:g,nextBorders:L,renderedInlineImageKeys:E}),g=I.attrs?.borders;}else c.kind==="table"&&R?.block.kind==="table"&&R?.measure.kind==="table"?(T=Z(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="image"&&R?.block.kind==="image"&&R?.measure.kind==="image"?(T=q(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="textBox"&&R?.block.kind==="textBox"&&R?.measure.kind==="textBox"?(T=J(c,R.block,R.measure,k,{document:o}),g=void 0):(T=Te(c,k,{document:o}),g=void 0);}else T=Te(c,k,{document:o}),g=void 0;an(T,c,{left:e.margins.left,top:e.margins.top}),w(T,x(c)),i.appendChild(T);}if(Ve(e,i,d,x,o),y.length>0){let s=X(y,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(s);}if(e.columns&&e.columns.separator&&e.columns.count>1){let s=e.columns.count,c=e.columns.gap,T=(d-(s-1)*c)/s,k=e.size.h-e.margins.top-e.margins.bottom;for(let S=0;S<s-1;S++){let R=(S+1)*T+S*c+c/2,I=o.createElement("div");I.style.position="absolute",I.style.left=`${R}px`,I.style.top="0",I.style.height=`${k}px`,I.style.width="0.5px",I.style.backgroundColor="#000",I.style.pointerEvents="none",i.appendChild(I);}}if(n.footnoteArea&&n.footnoteArea.length>0){let s=lt(n.footnoteArea,d,t,o);s.style.position="absolute";let c=Math.max(e.footnoteReservedHeight??0,st(n.footnoteArea)),T=e.size.h-e.margins.bottom-e.margins.top;s.style.top=`${Math.max(-e.margins.top,T-c)}px`,s.style.left="0",s.style.right="0",i.appendChild(s);}r.appendChild(i);{let c=n.headerDistance??e.margins.header??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.top-c,48),S=n.headerContent?.visualTop??0,R=n.headerContent?.visualBottom??n.headerContent?.height??0,I=Math.max(R-S,24),L=R>k,F=o.createElement("div");F.className=N.header,F.style.position="absolute",F.style.top=`${c+S}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:c,flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.headerContent,{...t,section:"header",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}{let c=n.footerDistance??e.margins.footer??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.bottom-c,48),S=n.footerContent?.visualTop??0,R=n.footerContent?.visualBottom??n.footerContent?.height??0,I=Math.max(R-S,24),L=I>k,F=o.createElement("div");F.className=N.footer,F.style.position="absolute",F.style.top=`${e.size.h-c-I}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-c-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.footerContent,{...t,section:"footer",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}exports.A=Qt;exports.B=N;exports.C=ie;exports.D=ye;exports.a=me;exports.b=it;exports.c=Kt;exports.d=no;exports.e=Pe;exports.f=Vt;exports.g=Yt;exports.h=oo;exports.i=at;exports.j=ro;exports.k=io;exports.l=ln;exports.m=dn;exports.n=Y;exports.o=Te;exports.p=Ye;exports.q=q;exports.r=et;exports.s=fe;exports.t=A;exports.u=X;exports.v=D;exports.w=Z;exports.x=zt;exports.y=J;exports.z=rt;
|
|
1
|
+
'use strict';var chunkAMB6Y77B_js=require('./chunk-AMB6Y77B.js'),chunkSORYYVJ7_js=require('./chunk-SORYYVJ7.js'),chunkLTHT4A4S_js=require('./chunk-LTHT4A4S.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkROG4MNOR_js=require('./chunk-ROG4MNOR.js'),chunkZBFNOJGY_js=require('./chunk-ZBFNOJGY.js'),chunkBHBOAP6Z_js=require('./chunk-BHBOAP6Z.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function Ve(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let l=o(m);if(l.length===0||!("height"in m))continue;let h=m.y-e.margins.top,u=h+m.height;l.forEach((y,b)=>{let g=`${b}:${y.id}`,f=a.get(g);f?(f.top=Math.min(f.top,h),f.bottom=Math.max(f.bottom,u)):(a.set(g,{group:y,depth:b,top:h,bottom:u}),i.push(g));});}let p=2,d=[];for(let m of i){let{group:l,depth:h,top:u,bottom:y}=a.get(m),b=h*(p+1),g=r.createElement("div");g.className="layout-block-sdt-box",g.dataset.sdtGroupId=l.id,g.dataset.sdtType=l.sdtType,g.dataset.sdtDepth=String(h+1),l.tag!=null&&(g.dataset.sdtTag=l.tag),l.alias!=null&&(g.dataset.sdtAlias=l.alias),l.lock!=null&&(g.dataset.sdtLock=l.lock),g.style.position="absolute",g.style.left=`${b}px`,g.style.top=`${u-p}px`,g.style.width=`${n-b*2}px`,g.style.height=`${y-u+p*2}px`;let f=l.alias||l.tag||l.sdtType;if(f){let w=r.createElement("span");w.className="layout-block-sdt-label",w.textContent=f,g.appendChild(w);}let x=gt(l.sdtType);if(x&&l.tag!=null&&!l.bound&&l.lock!=="contentLocked"&&l.lock!=="sdtContentLocked"){let w=r.createElement("button");w.type="button",w.className="layout-sdt-widget",w.dataset.sdtWidget=x,w.dataset.sdtTag=l.tag,w.dataset.sdtGroupId=l.id,w.setAttribute("aria-label",`${x} control ${l.alias||l.tag}`),x==="dropdown"?w.setAttribute("aria-haspopup","listbox"):x==="date"&&w.setAttribute("aria-haspopup","dialog"),w.textContent=x==="dropdown"?"\u25BE":x==="date"?"\u{1F4C5}":l.checked?"\u2612":"\u2610",g.appendChild(w);}if(l.repeatingItem&&!l.bound){let w=r.createElement("div");w.className="layout-sdt-repeat-controls";for(let s of ["add","remove"]){let c=r.createElement("button");c.type="button",c.className="layout-sdt-repeat-btn",c.dataset.sdtRepeat=s,c.dataset.sdtGroupId=l.id,c.setAttribute("aria-label",s==="add"?"Add item":"Remove item"),c.textContent=s==="add"?"\uFF0B":"\u2715",w.appendChild(c);}g.appendChild(w);}t.appendChild(g),d.push(g);}mt(t,d);}function gt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function mt(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(p,d)=>{for(let m of t){let l=m.getBoundingClientRect(),h=p>=l.left&&p<=l.right&&d>=l.top&&d<=l.bottom;h!==m.classList.contains("is-active")&&m.classList.toggle("is-active",h);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:p=>p(),r=false,a=0,i=0;e.addEventListener("mousemove",p=>{a=p.clientX,i=p.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let p of t)p.classList.remove("is-active");});}function dn(e,t,n){let o=new Set,r=e.content.size,a=i=>{let p=e.resolve(Math.max(0,Math.min(i,r)));for(let d=1;d<=p.depth;d++)p.node(d).type.name==="blockSdt"&&o.add(`sdt@${p.before(d)}`);};return a(t),n!==t&&a(n),o}function cn(e,t){let n=e.querySelectorAll(".layout-block-sdt-box");for(let o of n){let r=o.dataset.sdtGroupId,a=r!=null&&t.has(r);a!==o.classList.contains("is-focused")&&o.classList.toggle("is-focused",a);}}var Y={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function ut(e){return e.kind==="paragraph"}function ht(e){return e.kind==="table"}function yt(e){return e.kind==="image"}function de(e){e.style.position="absolute",e.style.overflow="hidden";}function bt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.paragraph}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function xt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.table}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function kt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.image}`,de(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function Te(e,t,n={}){let o=n.document??document;if(ut(e))return bt(e,t,o);if(ht(e))return xt(e,t,o);if(yt(e))return kt(e,t,o);let r=o.createElement("div");r.className=Y.fragment,de(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var v={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function j(e){return e.kind==="lineBreak"}function U(e){return e.kind==="field"}var Ye={image:"layout-image",imageAnchored:"layout-image-anchored"};function te(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ne(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=Ye.image,e.isAnchored&&i.classList.add(Ye.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=a.createElement("img");if(p.src=t.src,p.alt=t.alt??"",p.style.width="100%",p.style.height="100%",p.style.objectFit="contain",p.style.display="block",t.transform&&(p.style.transform=t.transform),p.draggable=false,t.hlinkHref){let d=a.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(p),i.appendChild(d);}else i.appendChild(p);return i}function St(e,t,n){if(t.fontFamily&&(e.style.fontFamily=chunkN3Y5BUKV_js.a(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(a=>!n||!n.has(a));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function K(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function oe(e,t,n){let o=t.createElement("span");if(o.className=`${v.run} ${v.text}`,St(o,e,n),K(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var Tt=1e3;function ce(e,t,n,o){let r=t.createElement("span");r.className=`${v.run} ${v.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,K(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?wt(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(Tt),r.appendChild(i);}else r.textContent="\xA0";return r}function wt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function qe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function Ue(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function Ft(e,t){let n=t.createElement("img");n.className=`${v.run} ${v.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),te(e)&&ne(n,e);let o=qe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,Ue(a,e),K(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",Ue(n,e),K(n,e.pmStart,e.pmEnd),n}function Xe(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),te(e)&&ne(o,e);let r=qe(e.transform);if(r!==0){let a=Ze(e.width,e.height,r);n.style.height=`${a.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return K(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function pe(e,t){let n;return chunkSORYYVJ7_js.f(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=Xe(e,t):n=Ft(e,t),It(n,e),n}function It(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function we(e,t){let n=t.createElement("br");return n.className=`${v.run} ${v.lineBreak}`,K(n,e.pmStart,e.pmEnd),n}function fe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return oe(r,t,n?.resolvedCommentIds)}function Fe(e,t,n){if(z(e))return oe(e,t,n?.resolvedCommentIds);if(O(e))return ce(e,t,48,void 0);if(G(e))return pe(e,t);if(j(e))return we(e,t);if(U(e)&&n)return fe(e,t,n);let o=t.createElement("span");return o.className=v.run,o}function et(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(z(a)){let i=r===t.fromRun?t.fromChar:0,p=r===t.toRun?t.toChar:a.text.length;if(i>0||p<a.text.length){let d=a.text.slice(i,p);n.push({...a,text:d,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+p:void 0});}else n.push(a);}else n.push(a);}return n}function Je(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Qe(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Ct(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Rt(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(z(a))o+=a.text;else if(U(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(O(a)||j(a))break}return o}var Et=.5;function Lt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(O(i)||j(i))break;if(z(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(U(i)){let p;i.fieldType==="PAGE"&&o?p=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?p=String(o.totalPages):p=i.fallback??"",r+=n(p,i.fontSize,i.fontFamily,i.bold,i.italic);}else G(i)&&!chunkSORYYVJ7_js.f(i)&&(r+=i.width||0);}return r}function Pt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a="Calibri",i=false,p=false)=>{if(!n)return o.length*7;let d=chunkN3Y5BUKV_js.a(a).cssFallback,m=r*96/72,l=[];return p&&l.push("italic"),i&&l.push("bold"),l.push(`${m}px`,d),n.font=l.join(" "),n.measureText(o).width}}function ge(e,t,n,o,r){let a=o.createElement("div");a.className=v.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=et(e,t);if(i.length===1&&G(i[0])){let x=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=Je(x),a.dataset.flexLine="true";}else i.some(G)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=Je(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let g=o.createElement("span");return g.className=`${v.run} layout-empty-run`,g.innerHTML=" ",a.appendChild(g),a}let p=n==="justify",d=false;p&&r&&(d=!r.isLastLine||r.paragraphEndsWithLineBreak,d&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(g=>z(g)&&g.highlight);a.style.overflow=m?"hidden":"visible";let l=i.some(O),h,u=Pt(o);if(l){let g=r?.tabStops?.map(Ct),f=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;h={explicitStops:g,leftIndent:f};}let y=0,b=r?.leftIndentPx??0;if(r?.isFirstLine){let g=r?.firstLineIndentPx??0;y=b+g;}else y=b;for(let g=0;g<i.length;g++){let f=i[g];if(O(f)&&h){let x=Lt(i,g,u,r?.context),w=Rt(i,g,r?.context),s=w.indexOf("."),c=s>=0?u(w.slice(0,s)):0,T=chunkLTHT4A4S_js.r(y,h,{followingWidth:x,decimalPrefixWidth:c}),k=r?.lineRightEdgePx,S=x,R=false;for(let E=g+1;E<i.length&&!j(i[E]);E++)if(O(i[E])){R=true;break}if(k!==void 0&&T.alignment==="end"&&!R&&y+T.width+S>=k-Et){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r?.isFirstLine&&r.firstLineIndentPx&&r.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r.firstLineIndentPx}px`);let E=ce(f,o,0,T.leader);E.style.flex="1 1 0",E.style.minWidth="0",E.style.width="auto",a.appendChild(E);for(let P=g+1;P<i.length;P++){let C=i[P];if(O(C)||j(C))break;if(z(C))a.appendChild(oe(C,o,r?.context?.resolvedCommentIds));else if(U(C)&&r?.context)a.appendChild(fe(C,o,r.context));else if(G(C)){if(chunkSORYYVJ7_js.f(C))continue;let Q=Qe(C);r?.renderedInlineImageKeys?.has(Q)||(r?.renderedInlineImageKeys?.add(Q),a.appendChild(pe(C,o)));}else a.appendChild(Fe(C,o,r?.context));}break}let L=T.width;k!==void 0&&y+L+S>k&&(L=Math.max(1,k-y-S));let F=ce(f,o,L,T.leader);a.appendChild(F),y+=L;}else if(z(f)){let x=oe(f,o,r?.context?.resolvedCommentIds);if(f.highlight){let T=(f.fontSize?f.fontSize*96/72:14.67)*1.2,k=Math.max(0,t.lineHeight-T);if(k>0){let S=k/2;x.style.paddingTop=`${S}px`,x.style.paddingBottom=`${S}px`;}}a.appendChild(x);let w=f.fontSize||11,s=f.fontFamily||"Calibri";y+=u(f.text,w,s,f.bold,f.italic);}else if(G(f)){if(chunkSORYYVJ7_js.f(f))continue;let x=Qe(f);if(r?.renderedInlineImageKeys?.has(x))continue;r?.renderedInlineImageKeys?.add(x);let w=pe(f,o);a.appendChild(w),f.displayMode!=="block"&&f.wrapType!=="topAndBottom"&&(y+=f.width);}else if(j(f)){let x=we(f,o);a.appendChild(x);}else if(U(f)&&r?.context){let x=fe(f,o,r.context);a.appendChild(x);let w=f.fallback??"";f.fieldType==="PAGE"?w=String(r.context.pageNumber):f.fieldType==="NUMPAGES"&&(w=String(r.context.totalPages));let s=f.fontSize||11,c=f.fontFamily||"Calibri";y+=u(w,s,c,f.bold,f.italic);}else {let x=Fe(f,o,r?.context);a.appendChild(x);}}return a}function re(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function tt(e,t){return !e&&!t||!e||!t?false:re(e.top,t.top)&&re(e.bottom,t.bottom)&&re(e.left,t.left)&&re(e.right,t.right)&&re(e.between,t.between)}function A(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=v.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),K(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let p=t.attrs?.pPrIns,d=t.attrs?.pPrDel;if(p||d){let k=p??d;i.classList.add("layout-revision-pmark"),i.classList.add(p?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(k.revisionId),i.dataset.revisionAuthor=k.author,k.date&&(i.dataset.revisionDate=k.date);}let m=n.lines.slice(e.fromLine,e.toLine),l=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let h=t.attrs?.bidi;h&&(i.dir="rtl"),l?l==="center"?i.style.textAlign="center":l==="right"?i.style.textAlign="right":l==="left"?i.style.textAlign="left":i.style.textAlign=h?"right":"left":h&&(i.style.textAlign="right");let u=t.attrs?.indent,y=0,b=0;u&&(h?(u.left&&u.left>0&&(b=u.left),u.right&&u.right>0&&(y=u.right)):(u.left&&u.left>0&&(y=u.left),u.right&&u.right>0&&(b=u.right)));let g=t.attrs?.borders;if(g){let k=C=>{switch(C){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};i.style.boxSizing="border-box";let S=C=>`${C.width}px ${k(C.style)} ${C.color}`,R=tt(r.prevBorders,g),I=tt(g,r.nextBorders),L=R?g.between:g.top,F=I?void 0:g.bottom,E=a.createElement("div");if(E.className="layout-paragraph-border",E.style.position="absolute",E.style.pointerEvents="none",E.style.boxSizing="border-box",E.style.left=`${y-(g.left?.space??0)}px`,E.style.right=`${b-(g.right?.space??0)}px`,E.style.top=`${-(L?.space??0)}px`,E.style.bottom=`${-(F?.space??0)}px`,L&&(E.style.borderTop=S(L)),F&&(E.style.borderBottom=S(F)),g.left&&(E.style.borderLeft=S(g.left)),g.right&&(E.style.borderRight=S(g.right)),(L||F||g.left||g.right)&&i.appendChild(E),g.bar){let C=a.createElement("div");C.style.position="absolute",C.style.left="-8px",C.style.top="0",C.style.bottom="0",C.style.borderLeft=S(g.bar),i.style.position="relative",i.appendChild(C);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let f=e.width-y-b,w=t.runs[t.runs.length-1]?.kind==="lineBreak",s=n.lines.length,c=0;u?.hanging&&u.hanging>0?c=-u.hanging:u?.firstLine&&u.firstLine>0&&(c=u.firstLine);let T=r.renderedInlineImageKeys??new Set;for(let k=0;k<m.length;k++){let S=m[k],R=e.fromLine+k,I=R===s-1,L=R===0&&!e.continuesFromPrev,F=S.leftOffset??0,E=S.rightOffset??0,P=f;if(L){let B=u?.hanging&&u.hanging>0,M=u?.firstLine&&u.firstLine>0;B&&u?.hanging?P=f+u.hanging:M&&u?.firstLine&&(P=f-u.firstLine);}if(vt(S,t)){let B=a.createElement("div");B.className=`${v.line} layout-line-split`,B.style.position="relative",B.style.height=`${S.lineHeight}px`,B.style.lineHeight=`${S.lineHeight}px`;for(let M of S.segments){let ke={fromRun:M.fromRun,fromChar:M.fromChar,toRun:M.toRun,toChar:M.toChar,width:M.width,ascent:S.ascent,descent:S.descent,lineHeight:S.lineHeight},_=ge(t,ke,l,a,{availableWidth:M.availableWidth,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${M.leftOffset}px`,_.style.top="0",_.style.width=`${M.availableWidth}px`,B.appendChild(_);}i.appendChild(B);continue}let C=ge(t,S,l,a,{availableWidth:P-F-E,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T,lineRightEdgePx:e.width-b-E});if(F>0||E>0){F>0&&(C.style.marginLeft=`${F}px`),E>0&&(C.style.marginRight=`${E}px`);let B=P-F-E;B>0&&(C.style.width=`${B}px`);}S.floatSkipBefore&&S.floatSkipBefore>0&&(C.style.marginTop=`${S.floatSkipBefore}px`);let Q=u?.hanging&&u.hanging>0,Be=u?.firstLine&&u.firstLine>0,ct=C.dataset.flexLine==="true";if(L?y>0&&Q?(C.style.paddingLeft=`${y}px`,ct||(C.style.textIndent=`-${u.hanging}px`)):y>0&&Be?(C.style.paddingLeft=`${y}px`,C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Be&&(C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Q&&(C.style.paddingLeft=`${u.hanging}px`),b>0&&(C.style.paddingRight=`${b}px`),L&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let B=u?.hanging??0,M=u?.firstLine??0,ke=B>0?Math.max(0,y-B):y+M;C.style.paddingLeft=`${ke}px`,C.style.textIndent="0";let{fontFamily:_,fontSize:pt}=chunkLTHT4A4S_js.s(t),ft=Bt(t.attrs.listMarker,chunkLTHT4A4S_js.t(t),a,_,pt,t.attrs.listMarkerRevision);C.insertBefore(ft,C.firstChild);}i.appendChild(C);}if((p||d)&&!e.continuesOnNext){let k=i.lastElementChild;if(k){let S=a.createElement("span");S.className="layout-revision-pmark-glyph",p?S.classList.add("layout-revision-ins"):S.classList.add("layout-revision-del"),S.textContent="\xB6",S.setAttribute("aria-hidden","true"),k.appendChild(S);}}return i}function vt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Bt(e,t,n,o,r,a){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=chunkN3Y5BUKV_js.a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a==="ins"?i.style.color="#2e7d32":a==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),te(r)&&ne(i,r),a.appendChild(i),o.appendChild(a);}return o}function Ie(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var D={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Mt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let p=i;for(let m of p.runs){if(m.kind!=="image")continue;let l=m;if(!chunkSORYYVJ7_js.f(l))continue;let h=l.position,u=l.distTop??0,y=l.distBottom??0,b=l.distLeft??12,g=l.distRight??12,f="left",x=0;if(h?.horizontal){let s=h.horizontal;s.align==="right"?(f="right",x=n-l.width):s.align==="left"?x=0:s.align==="center"?x=(n-l.width)/2:s.posOffset!==void 0&&(x=chunk4Q2IP5FW_js.e(s.posOffset),f=x>n/2?"right":"left");}else l.cssFloat==="right"&&(f="right",x=n-l.width);let w=r;if(h?.vertical){let s=h.vertical;s.posOffset!==void 0?w=r+chunk4Q2IP5FW_js.e(s.posOffset):s.align==="top"&&(w=0);}x=Math.max(0,Math.min(x,n-l.width)),o.push({src:l.src,width:l.width,height:l.height,alt:l.alt,transform:l.transform,x,y:w,side:f,distTop:u,distBottom:y,distLeft:b,distRight:g,wrapText:chunkSORYYVJ7_js.h(l.cssFloat),wrapType:l.wrapType,pmStart:l.pmStart,pmEnd:l.pmEnd});}let d=t.blocks[a];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function $t(e,t,n,o){let r=o.createElement("div");r.className=D.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,p=Math.max(0,t.width-a-i);r.style.width=`${p}px`;let d=Mt(e,t,p),m;if(d.length>0){m=d.filter(chunkSORYYVJ7_js.d).map(b=>{let g=b.x+b.width+b.distRight,f=b.y-b.distTop,x=b.y+b.height+b.distBottom,w=0,s=0,c=b.wrapText??"bothSides";return c==="right"?w=g:c==="left"?s=p-(b.x-b.distLeft):b.side==="left"?w=g:s=p-(b.x-b.distLeft),{leftMargin:w,rightMargin:s,topY:f,bottomY:x}});let y=d.filter(chunkSORYYVJ7_js.e);y.length>0&&r.appendChild(X(y,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let l=0,h=0;for(let y=0;y<e.blocks.length;y++){let b=e.blocks[y],g=t.blocks[y];if(b?.kind==="paragraph"&&g?.kind==="paragraph"){let f=b,x=g,w=f.attrs?.spacing,s=Math.max(h,w?.before??0);l+=s,m&&m.length>0&&(x=chunkLTHT4A4S_js.v(f,p,{floatingZones:m,paragraphYOffset:l}));let c={blockId:f.id,width:p,height:x.totalHeight,fromLine:0,toLine:x.lines.length,pmStart:f.pmStart,pmEnd:f.pmEnd},T={...n,insideTableCell:true},k=A(c,f,x,T,{document:o});k.style.position="relative",s>0&&(k.style.marginTop=`${s}px`),r.appendChild(k),l+=x.totalHeight,h=w?.after??0;}else if(b?.kind==="table"&&g?.kind==="table"){let f=b,x=g,w=h,s=Ht(f,x,n,o);s.style.position="relative",w>0&&(s.style.marginTop=`${w}px`),r.appendChild(s),l+=w+(g.totalHeight??0),h=0;}}h>0&&(r.style.paddingBottom=`${h}px`);let u=d.filter(y=>!chunkSORYYVJ7_js.e(y));return u.length>0&&r.appendChild(X(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Ht(e,t,n,o){let r=o.createElement("div");r.className=`${D.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let a=e.rows[0],i=a?.trackedIns,p=a?.trackedDel,d=(b,g)=>!!b&&!!g&&(b.author??"")===(g.author??"")&&(b.date??null)===(g.date??null),m=e.rows.length>0&&e.rows.every(b=>i?d(b.trackedIns,i):p?d(b.trackedDel,p):false);if(m){let b=i??p,g=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${g}`),r.dataset.revisionId=String(b.revisionId),r.dataset.revisionAuthor=b.author,b.date&&(r.dataset.revisionDate=b.date);}let l=[],h=0;for(let b=0;b<t.rows.length;b++)l.push(h),h+=t.rows[b]?.height??0;l.push(h);let u=new Map,y=0;for(let b=0;b<e.rows.length;b++){let g=e.rows[b],f=t.rows[b];if(!g||!f)continue;let x=Ce(g,f,b,y,t.columnWidths,e.rows.length,n,o,u,l,void 0,m);r.appendChild(x),y+=f.height;}return r.style.height=`${y}px`,r}function me(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function At(e,t,n,o,r,a,i,p){let d=i.createElement("div");d.className=D.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==p&&Ie(d,"cell",e.trackedMarker.kind,e.trackedMarker.info),d.style.position="absolute",d.style.left=`${n}px`,d.style.top="0",d.style.width=`${t.width}px`,d.style.height=`${o}px`,d.style.overflow="hidden",d.style.boxSizing="border-box";let m=e.padding?.top??1,l=e.padding?.right??7,h=e.padding?.bottom??1,u=e.padding?.left??7;if(d.style.padding=`${m}px ${l}px ${h}px ${u}px`,e.borders&&(r.isFirstRow&&me(d,"top",e.borders.top),me(d,"right",e.borders.right),me(d,"bottom",e.borders.bottom),r.isFirstCol&&me(d,"left",e.borders.left)),e.background&&(d.style.backgroundColor=e.background),e.noWrap&&(d.style.whiteSpace="nowrap"),e.verticalAlign)switch(d.style.display="flex",d.style.flexDirection="column",e.verticalAlign){case "top":d.style.justifyContent="flex-start";break;case "center":d.style.justifyContent="center";break;case "bottom":d.style.justifyContent="flex-end";break}let y=$t(e,t,a,i);if(d.appendChild(y),e.blocks.length>0){let b=e.blocks[0],g=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(d.dataset.pmStart=String(b.pmStart)),g&&"pmEnd"in g&&g.pmEnd!==void 0&&(d.dataset.pmEnd=String(g.pmEnd));}return d}function Ce(e,t,n,o,r,a,i,p,d,m,l,h){let u=p.createElement("div");u.className=D.row,h||(e.trackedDel?Ie(u,"row","del",e.trackedDel):e.trackedIns&&Ie(u,"row","ins",e.trackedIns)),u.style.position="absolute",u.style.left="0",u.style.top=`${o}px`,u.style.width="100%",u.style.height=`${t.height}px`,u.dataset.rowIndex=String(n);let y=new Set;if(d){for(let[,f]of d)if(f.startRow<n&&f.startRow+f.rowSpan>n)for(let x=0;x<f.colSpan;x++)y.add(f.columnIndex+x);}let b=0,g=0;for(;y.has(g);)b+=r[g]??0,g++;for(let f=0;f<e.cells.length;f++){let x=e.cells[f],w=t.cells[f];if(!x||!w)continue;let s=x.colSpan??1,c=x.rowSpan??1,T=t.height;if(c>1&&m){T=0;for(let F=n;F<n+c&&F<m.length-1;F++)T+=(m[F+1]??0)-(m[F]??0);T===0&&(T=t.height*c);}let k=n===0||l===true,R=g===0;g+s>=r.length;let L=At(x,w,b,T,{isFirstRow:k,isFirstCol:R},i,p,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(L.dataset.cellIndex=String(f),L.dataset.columnIndex=String(g),c>1&&(L.dataset.rowSpan=String(c)),u.appendChild(L),c>1&&d){let F=`${n}-${g}`;d.set(F,{cell:x,cellMeasure:w,columnIndex:g,startRow:n,rowSpan:c,colSpan:s,x:b,totalHeight:T});}for(let F=0;F<s&&g+F<r.length;F++)b+=r[g+F]??0;for(g+=s;y.has(g);)b+=r[g]??0,g++;}return u}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=D.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=t.rows[0],d=p?.trackedIns,m=p?.trackedDel,l=(s,c)=>!!s&&!!c&&(s.author??"")===(c.author??"")&&(s.date??null)===(c.date??null),h=t.rows.length>0&&t.rows.every(s=>d?l(s.trackedIns,d):m?l(s.trackedDel,m):false);if(h){let s=d??m,c=d?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${c}`),i.dataset.revisionId=String(s.revisionId),i.dataset.revisionAuthor=s.author,s.date&&(i.dataset.revisionDate=s.date),i.style.overflow="visible";}let u=0;for(let s=0;s<n.columnWidths.length-1;s++){u+=n.columnWidths[s]??0;let c=a.createElement("div");c.className=D.resizeHandle,c.style.position="absolute",c.style.left=`${u-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}let y=[],b=0;for(let s=0;s<n.rows.length;s++)y.push(b),b+=n.rows[s]?.height??0;y.push(b);let g=new Map,f=e.headerRowCount??0,x=0;if(f>0&&e.continuesFromPrev)for(let s=0;s<f;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,s===0,h);k.dataset.repeatedHeader="true",i.appendChild(k),x+=T.height;}for(let s=e.fromRow;s<e.toRow;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=f>0&&e.continuesFromPrev?false:e.continuesFromPrev&&s===e.fromRow,S=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,k,h);i.appendChild(S),x+=T.height;}let w=0;for(let s=e.fromRow;s<e.toRow;s++)if(w+=n.rows[s]?.height??0,s<e.toRow-1){let c=a.createElement("div");c.className=D.rowResizeHandle,c.style.position="absolute",c.style.left="0",c.style.top=`${w-3}px`,c.style.width="100%",c.style.height="6px",c.style.cursor="row-resize",c.style.zIndex="10",c.dataset.rowIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}if(e.toRow===t.rows.length){let s=a.createElement("div");s.className=D.tableEdgeHandleBottom,s.style.position="absolute",s.style.left="0",s.style.top=`${w-3}px`,s.style.width="100%",s.style.height="6px",s.style.cursor="row-resize",s.style.zIndex="10",s.dataset.rowIndex=String(t.rows.length-1),s.dataset.tableBlockId=String(e.blockId),s.dataset.isEdge="bottom",e.pmStart!==void 0&&(s.dataset.tablePmStart=String(e.pmStart)),i.appendChild(s);}if(e.toRow===t.rows.length){let s=n.columnWidths.reduce((T,k)=>T+k,0),c=a.createElement("div");c.className=D.tableEdgeHandleRight,c.style.position="absolute",c.style.left=`${s-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(n.columnWidths.length-1),c.dataset.tableBlockId=String(e.blockId),c.dataset.isEdge="right",e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}return i}var zt={textBox:"layout-textbox"};function J(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=zt.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",Ot(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",h=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${l} ${h}`;}let p=t.margins??chunkDROCYKAR_js.a;i.style.padding=`${p.top}px ${p.right}px ${p.bottom}px ${p.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=e.width-p.left-p.right,m=0;for(let l=0;l<t.content.length;l++){let h=t.content[l],u=n.innerMeasures[l];if(!u)continue;let y={blockId:h.id,width:d,height:u.totalHeight,pmStart:h.pmStart,pmEnd:h.pmEnd,fromLine:0,toLine:u.lines.length},b=A(y,h,u,{...o,positioning:"flow"},{document:a});i.appendChild(b),m+=u.totalHeight;}return i}function Ot(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function nt(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:a}=Dt(e,n,o),i=_t(e,t,o);return {x:r,y:i,side:a}}function Dt(e,t,n){let o=e.position?.horizontal;if(!o)return e.cssFloat==="right"?{x:t-e.width,side:"right"}:{x:0,side:"left"};let r=Nt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(o.posOffset!==void 0){let a=r.base+chunk4Q2IP5FW_js.e(o.posOffset);return {x:a,side:a>t/2?"right":"left"}}return {x:r.base,side:"left"}}function Nt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function _t(e,t,n){let o=e.position?.vertical;if(!o)return t;let r=Wt(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e.height:t:o.posOffset!==void 0?r.base+chunk4Q2IP5FW_js.e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Wt(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,a=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:a,size:r};default:return {base:0,size:a}}}function ot(e){return e?.align??e?.alignment}function Gt(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ot(n),r=n.posOffset!==void 0?chunk4Q2IP5FW_js.e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function jt(e,t,n){let o=t.position.horizontal;if(!o){e.style.left="0";return}let r=ot(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)}px`;return}if(r==="right"){e.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e.style.left=`${(n.contentWidth-t.width)/2}px`;return}e.style.left="0";}function rt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ee(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,p=[],d=0;for(let m=0;m<e.blocks.length;m++){let l=e.blocks[m],h=e.measures[m];if(!(!l||!h))if(l.kind==="paragraph"){if(h.kind!=="paragraph")continue;let u=l,y=h,b=u.attrs?.spacing?.before??0,g=d,f=[];for(let c of u.runs)if(c.kind==="image"&&"position"in c&&c.position){let T=c;p.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:g,position:T.position});}else f.push(c);let x={...u,runs:f},w={blockId:u.id,width:i,height:y.totalHeight,fromLine:0,toLine:y.lines.length,pmStart:u.pmStart,pmEnd:u.pmEnd},s=A(w,x,y,{...t,positioning:"absolute"},{document:r});s.style.top=`${d+b}px`,s.style.left="0",s.style.width=`${i}px`,a.appendChild(s),d+=y.totalHeight;}else if(l.kind==="table"){if(h.kind!=="table")continue;let u={blockId:l.id,width:h.totalWidth,height:h.totalHeight,fromRow:0,toRow:h.rows.length,pmStart:l.pmStart,pmEnd:l.pmEnd},y=Z(u,l,h,{...t,positioning:"absolute"},{document:r});if(l.floating){let{left:b,top:g}=rt(l.floating,o);y.style.top=`${g}px`,y.style.left=`${b}px`,a.appendChild(y);}else y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.totalHeight;}else if(l.kind==="image"){if(h.kind!=="image")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=q(u,l,h,{...t},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else if(l.kind==="textBox"){if(h.kind!=="textBox")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=J(u,l,h,{...t,positioning:"absolute"},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else l.kind==="sectionBreak"||l.kind==="pageBreak"||l.kind==="columnBreak"||chunkDROCYKAR_js.c(l,"renderHeaderFooterContent");}for(let m of p){let l=r.createElement("img");l.src=m.src,l.width=m.width,l.height=m.height,m.alt&&(l.alt=m.alt),l.style.position="absolute",l.style.display="block",l.style.width=`${m.width}px`,l.style.height=`${m.height}px`,l.style.maxWidth="none",l.style.maxHeight="none",jt(l,m,o),l.style.top=`${Gt(m,o)}px`,a.appendChild(l);}return a}var ue=12,it=6;function Kt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Le=8;function oo(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function Pe(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let p=i.pmStart??-1,d=i.pmEnd??-1;if(p>=0&&d>=0&&o.pmPos>=p&&o.pmPos<d){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function Vt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Le,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:Le}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Le,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Yt(e,t,n,o){let r=chunkZBFNOJGY_js.c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=chunkAMB6Y77B_js.c(r,{theme:o.theme??void 0}),i=Vt(a,t),p=o.measureBlocks(i,n),d=p.reduce((m,l)=>l.kind==="paragraph"||l.kind==="table"?m+l.totalHeight:l.kind==="image"||l.kind==="textBox"?m+l.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:p,height:d}}function ro(e,t,n,o){let r=new Map,a=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&a.set(d.id,d);let i=1,p=new Set;for(let d of t){if(p.has(d.footnoteId))continue;p.add(d.footnoteId);let m=a.get(d.footnoteId);m&&(r.set(d.footnoteId,Yt(m,i,n,o)),i++);}return r}function at(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let p=t.get(i);p&&(a+=p.height);}a>0&&(a+=ue,n.set(o,a));}return n}function io(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,p=Pe(i.pages,r),d=at(p,a);if(d.size===0)return {layout:i,pageFootnoteMap:p,converged:true};let m=i,l=false;for(let h=0;h<it;h++){m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d});let u=Pe(m.pages,r),y=at(u,a);if(p=u,Kt(d,y)){d=y,l=true;break}d=y;}l||(m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d}),p=Pe(m.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${it} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[h,u]of p){let y=m.pages.find(b=>b.number===h);y&&(y.footnoteIds=u);}return {layout:m,pageFootnoteMap:p,converged:l}}function ao(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let p=[];for(let d of i){let m=r.get(d);if(!m)continue;let l=t.get(d),h=l?.displayNumber??0;p.push({displayNumber:String(h),text:chunkROG4MNOR_js.x(m),content:l});}p.length>0&&o.set(a,p);}return o}function Ut(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let a=0;for(let i=0;i<e.blocks.length;i++){let p=e.blocks[i],d=e.measures[i];if(!(!p||!d)){if(p.kind==="paragraph"&&d.kind==="paragraph"){let m=p.attrs?.spacing?.before??0,l={blockId:p.id,width:t,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromLine:0,toLine:d.lines.length},h=A(l,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});h.style.top=`${a+m}px`,h.style.left="0",h.style.width=`${t}px`,h.style.height=`${d.totalHeight}px`,r.appendChild(h),a+=d.totalHeight;}else if(p.kind==="table"&&d.kind==="table"){let m={blockId:p.id,width:d.totalWidth,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromRow:0,toRow:d.rows.length},l=Z(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.totalHeight;}else if(p.kind==="image"&&d.kind==="image"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=q(m,p,d,{...n},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}else if(p.kind==="textBox"&&d.kind==="textBox"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=J(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}}}return r}function Xt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function st(e){let t=ue;for(let n of e)n.content&&(t+=n.content.height);return t}function lt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,p=(ue-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${p}px`,a.style.marginTop=`${p}px`,r.appendChild(a);for(let d of e)r.appendChild(d.content?Ut(d.content,t,n,o):Xt(d,o));return r}function ve(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function dt(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function qt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Zt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var he=2,Jt=8;function Qt(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,p=qt(n),d=o>=Jt;if(i&&i.optionsHash===p&&d){let f=i.pageStates,x=i.pageDataMap,w=a.__pageObserver,s=[];for(let k of e)s.push(dt(k));let c=i.totalPages!==o,T=Math.min(f.length,e.length);for(let k=0;k<T;k++){let S=f[k],R=s[k];if(S.fingerprint===R&&!c){let F=x.get(S.element);F&&(F.page=e[k]);continue}let I=S.element,L=x.get(I);L&&(L.page=e[k],L.rendered&&en(I,x,o,n)),S.fingerprint=R,ae(I,e[k].size.w,e[k].size.h,n),I.dataset.pageNumber=String(e[k].number);}if(e.length>f.length){let k=n.document??document;for(let S=f.length;S<e.length;S++){let R=e[S],I=k.createElement("div");I.className=n.pageClassName??N.page,I.dataset.pageNumber=String(R.number),I.dataset.pageIndex=String(S),ae(I,R.size.w,R.size.h,n),t.appendChild(I),f.push({element:I,fingerprint:s[S]}),x.set(I,{page:R,index:S,rendered:false}),w&&w.observe(I);}}if(e.length<f.length){for(let k=f.length-1;k>=e.length;k--){let S=f[k].element;w&&w.unobserve(S),x.delete(S),t.removeChild(S);}f.length=e.length;}for(let k=0;k<f.length;k++){let S=x.get(f[k].element);S&&(S.index=k);}return i.totalPages=o,i.currentOptions=n,"incremental"}let l=a.__pageObserver;l&&(l.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,Zt(t,r);let h=[],u=[];for(let f=0;f<e.length;f++){let x=e[f];if(u.push(dt(x)),d){let s=(n.document??document).createElement("div");s.className=n.pageClassName??N.page,s.dataset.pageNumber=String(x.number),s.dataset.pageIndex=String(f),ae(s,x.size.w,x.size.h,n),t.appendChild(s),h.push(s);}else {let{context:w,pageOptions:s}=ve(x,o,n),c=ye(x,w,s);t.appendChild(c),h.push(c);}}if(!d)return "full";let y=new Map;for(let f=0;f<e.length;f++)y.set(h[f],{page:e[f],index:f,rendered:false});let b=new IntersectionObserver(f=>{let x=a.__pageRenderState;if(!x)return;let{currentOptions:w,totalPages:s,pageDataMap:c}=x;for(let R of f){let I=R.target,L=c.get(I);if(L&&R.isIntersecting){ie(I,c,s,w);for(let F=-he;F<=he;F++){let E=L.index+F;E>=0&&E<x.pageStates.length&&E!==L.index&&ie(x.pageStates[E].element,c,s,w);}}}let T=window.innerHeight,k=T*3,S=new Set;for(let[R,I]of c){if(!I.rendered)continue;let L=R.getBoundingClientRect();L.bottom>-k&&L.top<T+k&&S.add(I.index);}for(let[R,I]of c){if(!I.rendered)continue;let L=false;for(let F of S)if(Math.abs(I.index-F)<=he+1){L=true;break}!L&&S.size>0&&tn(R,c);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let f of h)b.observe(f);a.__pageObserver=b,a.__pageRenderState={pageStates:h.map((f,x)=>({element:f,fingerprint:u[x]})),totalPages:o,optionsHash:p,pageDataMap:y,currentOptions:n};let g=Math.min(e.length,he+3);for(let f=0;f<g;f++)ie(h[f],y,o,n);return "full"}function ie(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=ve(r.page,n,o),p=ye(r.page,a,i);for(;p.firstChild;)e.appendChild(p.firstChild);r.rendered=true;}function en(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=ve(r.page,n,o),d=ye(r.page,a,i).querySelector(`.${N.content}`),m=e.querySelector(`.${N.content}`);d&&m?e.replaceChild(d,m):(e.innerHTML="",r.rendered=false,ie(e,t,n,o));}function tn(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}function nn(e){let n=e.__pageRenderState;if(!n)return 0;let{pageStates:o,totalPages:r,currentOptions:a,pageDataMap:i}=n,p=0;for(let{element:d}of o){let m=i.get(d);!m||m.rendered||(ie(d,i,r,a),p++);}return p}var N={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ae(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=chunkN3Y5BUKV_js.a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function on(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function be(e){return e?.space!==void 0?chunk4Q2IP5FW_js.i(e.space):0}function xe(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=chunkBHBOAP6Z_js.c(t,n,o);for(let[d,m]of Object.entries(r))e.style[d]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let d=parseFloat(e.style[i]);(!Number.isFinite(d)||d<3)&&(e.style[i]="3px");}}function rn(e,t,n){let o=t.pageBorders;if(!o||!on(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(h=>h&&h.style!=="none"&&h.style!=="nil"))return null;let a=o.offsetFrom??"text",i=be(o.top),p=be(o.right),d=be(o.bottom),m=be(o.left),l=n.createElement("div");return l.className="layout-page-border",l.style.position="absolute",l.style.pointerEvents="none",l.style.boxSizing="border-box",l.style.zIndex=o.zOrder==="back"?"0":"20",a==="page"?(l.style.top=`${i}px`,l.style.right=`${p}px`,l.style.bottom=`${d}px`,l.style.left=`${m}px`):(l.style.top=`${Math.max(0,e.margins.top-i)}px`,l.style.right=`${Math.max(0,e.margins.right-p)}px`,l.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,l.style.left=`${Math.max(0,e.margins.left-m)}px`),xe(l,o.top,"Top",t.theme),xe(l,o.bottom,"Bottom",t.theme),xe(l,o.left,"Left",t.theme),xe(l,o.right,"Right",t.theme),l}function an(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function sn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function ln(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!chunkSORYYVJ7_js.f(i))continue;let p=i.distTop??0,d=i.distBottom??0,m=i.distLeft??12,l=i.distRight??12,{x:h,y:u,side:y}=Re(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:y,x:h,y:u,distTop:p,distBottom:d,distLeft:m,distRight:l,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:chunkSORYYVJ7_js.h(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function ye(e,t,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??N.page,r.dataset.pageNumber=String(e.number),ae(r,e.size.w,e.size.h,n);let a=rn(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=N.content,an(i,e);let p=nt(e),d=p.contentWidth,m=[],l=[];for(let s of e.fragments)if(s.kind==="paragraph"&&n.blockLookup){let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph"){let T=c.block,k=s.y-e.margins.top,S=ln(T,k,d,p);m.push(...S);}}for(let s of m)chunkSORYYVJ7_js.d(s)&&l.push({side:s.side,x:s.x,y:s.y,width:s.width,height:s.height,distTop:s.distTop,distBottom:s.distBottom,distLeft:s.distLeft,distRight:s.distRight,wrapText:s.wrapText,wrapType:s.wrapType});if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="table")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="table")continue;let k=c.block.floating;if(!k)continue;let S=s.x-e.margins.left,R=s.y-e.margins.top,I=k.topFromText??0,L=k.bottomFromText??0,F=k.leftFromText??12,E=k.rightFromText??12,P=S<d/2?"left":"right";l.push({side:P,x:S,y:R,width:s.width,height:s.height,distTop:I,distBottom:L,distLeft:F,distRight:E});}if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="textBox")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="textBox")continue;let T=c.block;if(!chunkLTHT4A4S_js.E(T))continue;let k=s.y-e.margins.top,S=Re({width:s.width,height:s.height,position:T.position,cssFloat:T.cssFloat},k,d,p);s.x=e.margins.left+S.x,s.y=e.margins.top+S.y,chunkLTHT4A4S_js.F(T)&&l.push({side:S.side,x:S.x,y:S.y,width:s.width,height:s.height,distTop:T.distTop??0,distBottom:T.distBottom??0,distLeft:T.distLeft??12,distRight:T.distRight??12,wrapText:T.wrapText,wrapType:T.wrapType});}let h=l.length>0?chunkLTHT4A4S_js.p(l,d):[],u=m.filter(chunkSORYYVJ7_js.e),y=m.filter(s=>!chunkSORYYVJ7_js.e(s));if(u.length>0){let s=X(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(s);}let b=s=>{if(s.kind!=="paragraph"||!n.blockLookup||!s.blockId)return;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph")return c.block.attrs?.borders},g,f=new Map,x=s=>!n.blockLookup||!s.blockId?[]:n.blockLookup.get(String(s.blockId))?.block.sdtGroups??[],w=(s,c)=>{if(c.length===0)return;let T=c[c.length-1];s.classList.add("layout-block-sdt"),s.dataset.sdtGroupId=T.id,s.dataset.sdtType=T.sdtType,s.dataset.sdtDepth=String(c.length),T.tag!=null&&(s.dataset.sdtTag=T.tag),T.alias!=null&&(s.dataset.sdtAlias=T.alias),T.lock!=null&&(s.dataset.sdtLock=T.lock);};for(let s=0;s<e.fragments.length;s++){let c=e.fragments[s],T,k={...t,section:"body",contentWidth:d},S=c.y-e.margins.top;if(n.blockLookup&&c.blockId){let R=n.blockLookup.get(String(c.blockId));if(c.kind==="paragraph"&&R?.block.kind==="paragraph"&&R?.measure.kind==="paragraph"){let I=R.block,L=s+1<e.fragments.length?b(e.fragments[s+1]):void 0,F=String(c.blockId),E=f.get(F);E||(E=new Set,f.set(F,E));let P=R.measure;h.length>0&&(P=chunkLTHT4A4S_js.v(I,d,{floatingZones:h,paragraphYOffset:S})),T=A(c,I,P,k,{document:o,prevBorders:g,nextBorders:L,renderedInlineImageKeys:E}),g=I.attrs?.borders;}else c.kind==="table"&&R?.block.kind==="table"&&R?.measure.kind==="table"?(T=Z(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="image"&&R?.block.kind==="image"&&R?.measure.kind==="image"?(T=q(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="textBox"&&R?.block.kind==="textBox"&&R?.measure.kind==="textBox"?(T=J(c,R.block,R.measure,k,{document:o}),g=void 0):(T=Te(c,k,{document:o}),g=void 0);}else T=Te(c,k,{document:o}),g=void 0;sn(T,c,{left:e.margins.left,top:e.margins.top}),w(T,x(c)),i.appendChild(T);}if(Ve(e,i,d,x,o),y.length>0){let s=X(y,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(s);}if(e.columns&&e.columns.separator&&e.columns.count>1){let s=e.columns.count,c=e.columns.gap,T=(d-(s-1)*c)/s,k=e.size.h-e.margins.top-e.margins.bottom;for(let S=0;S<s-1;S++){let R=(S+1)*T+S*c+c/2,I=o.createElement("div");I.style.position="absolute",I.style.left=`${R}px`,I.style.top="0",I.style.height=`${k}px`,I.style.width="0.5px",I.style.backgroundColor="#000",I.style.pointerEvents="none",i.appendChild(I);}}if(n.footnoteArea&&n.footnoteArea.length>0){let s=lt(n.footnoteArea,d,t,o);s.style.position="absolute";let c=Math.max(e.footnoteReservedHeight??0,st(n.footnoteArea)),T=e.size.h-e.margins.bottom-e.margins.top;s.style.top=`${Math.max(-e.margins.top,T-c)}px`,s.style.left="0",s.style.right="0",i.appendChild(s);}r.appendChild(i);{let c=n.headerDistance??e.margins.header??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.top-c,48),S=n.headerContent?.visualTop??0,R=n.headerContent?.visualBottom??n.headerContent?.height??0,I=Math.max(R-S,24),L=R>k,F=o.createElement("div");F.className=N.header,F.style.position="absolute",F.style.top=`${c+S}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:c,flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.headerContent,{...t,section:"header",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}{let c=n.footerDistance??e.margins.footer??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.bottom-c,48),S=n.footerContent?.visualTop??0,R=n.footerContent?.visualBottom??n.footerContent?.height??0,I=Math.max(R-S,24),L=I>k,F=o.createElement("div");F.className=N.footer,F.style.position="absolute",F.style.top=`${e.size.h-c-I}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-c-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.footerContent,{...t,section:"footer",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}exports.A=Qt;exports.B=nn;exports.C=N;exports.D=ae;exports.E=ye;exports.a=ue;exports.b=it;exports.c=Kt;exports.d=oo;exports.e=Pe;exports.f=Vt;exports.g=Yt;exports.h=ro;exports.i=at;exports.j=io;exports.k=ao;exports.l=dn;exports.m=cn;exports.n=Y;exports.o=Te;exports.p=Ye;exports.q=q;exports.r=et;exports.s=ge;exports.t=A;exports.u=X;exports.v=D;exports.w=Z;exports.x=zt;exports.y=J;exports.z=rt;
|