@eigenpal/docx-editor-core 1.6.0 → 1.6.2
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/agent/index.d.mts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-25775MLP.mjs +2 -0
- package/dist/chunk-2AEZLDY4.js +1 -0
- package/dist/chunk-2EFI3BAN.js +59 -0
- package/dist/{chunk-2ZTKTE7P.js → chunk-2EKWMNCY.js} +1 -1
- package/dist/chunk-3QQLHMB6.mjs +4 -0
- package/dist/{chunk-2KUOYHXX.js → chunk-455DUC37.js} +1 -1
- package/dist/chunk-4EATD3FP.js +2 -0
- package/dist/chunk-4VLKSJRK.mjs +1 -0
- package/dist/{chunk-7UMOUKSF.js → chunk-5CLYWBNI.js} +1 -1
- package/dist/chunk-5TLT5TUD.js +1 -0
- package/dist/{chunk-CWPIXUU2.js → chunk-5ZAMEYCA.js} +1 -1
- package/dist/{chunk-YMXWLXVF.mjs → chunk-6BAIXYUY.mjs} +1 -1
- package/dist/chunk-6UCWVS7Y.mjs +1 -0
- package/dist/chunk-7E2TOWBX.mjs +1 -0
- package/dist/{chunk-KSW6W2EK.mjs → chunk-7LPUPZAO.mjs} +2 -2
- package/dist/{chunk-XTPT4TNP.mjs → chunk-AC6JHCPC.mjs} +1 -1
- package/dist/chunk-B3SVS2AF.js +1 -0
- package/dist/{chunk-CDGV7CLS.js → chunk-BA4OW45H.js} +1 -1
- package/dist/chunk-BMP2OSXE.js +1 -0
- package/dist/{chunk-WEQA5PPW.mjs → chunk-CF4SIWV2.mjs} +1 -1
- package/dist/{chunk-GFM6PERG.js → chunk-CMZXBKDH.js} +1 -1
- package/dist/chunk-CRQO6WI3.mjs +2 -0
- package/dist/chunk-DPMR7U7D.js +2 -0
- package/dist/{chunk-QZPVZY6S.mjs → chunk-EEEED6FG.mjs} +1 -1
- package/dist/chunk-IJ2PPHRN.mjs +1 -0
- package/dist/chunk-IUYHWUBF.mjs +1 -0
- package/dist/chunk-LMGFGJTJ.mjs +1 -0
- package/dist/chunk-LZTEPSU2.js +4 -0
- package/dist/chunk-NJBEJTIO.mjs +2 -0
- package/dist/chunk-O5L4BZCZ.mjs +1 -0
- package/dist/chunk-OBRTIXHC.mjs +59 -0
- package/dist/chunk-OSTMAXZZ.mjs +1 -0
- package/dist/chunk-OTXLG6KM.js +1 -0
- package/dist/chunk-PGWY6UFK.js +1 -0
- package/dist/{chunk-6AGU57TL.mjs → chunk-QCPISGPW.mjs} +1 -1
- package/dist/chunk-QI6JDDGO.js +1 -0
- package/dist/chunk-R5DGXEWJ.js +2 -0
- package/dist/{chunk-NY36MZ55.mjs → chunk-RT5AAIEK.mjs} +1 -1
- package/dist/{chunk-RGHRXIIZ.js → chunk-SSL74NAS.js} +3 -3
- package/dist/chunk-T5G3IWCO.mjs +1 -0
- package/dist/{chunk-WQJWT4RB.mjs → chunk-U55TPVTA.mjs} +1 -1
- package/dist/{chunk-5JULVEYK.mjs → chunk-V4DLVFYG.mjs} +1 -1
- package/dist/{chunk-BBJMUBTD.mjs → chunk-VMBCUUZM.mjs} +1 -1
- package/dist/chunk-WA4IJOGH.js +1 -0
- package/dist/{chunk-EJ2JAYRI.js → chunk-XCTYXYEU.js} +1 -1
- package/dist/{chunk-T3UP6LF5.js → chunk-XLY5A37T.js} +1 -1
- package/dist/{chunk-F44XU6G5.js → chunk-XRJFWDCV.js} +1 -1
- package/dist/{chunk-DX5XU6JN.js → chunk-YUHOVME2.js} +1 -1
- package/dist/chunk-ZCYUN3EC.js +1 -0
- package/dist/{chunk-E7UN3PVC.mjs → chunk-ZW3VG4TK.mjs} +1 -1
- package/dist/{content-CbBCrsr0.d.mts → content-BEFz1zcs.d.mts} +1 -1
- package/dist/{content-BebvPfXc.d.ts → content-DNcMlHU0.d.ts} +1 -1
- package/dist/{contentControlValues-Com1GnZS.d.ts → contentControlValues-2pV4M4kG.d.ts} +1 -1
- package/dist/{contentControlValues-DVJyudKU.d.mts → contentControlValues-CKWIIkkr.d.mts} +1 -1
- package/dist/core-plugins.d.mts +1 -1
- package/dist/core-plugins.d.ts +1 -1
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.d.mts +1 -1
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +1 -1
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -3
- package/dist/docx/rezip.d.ts +3 -3
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +2 -2
- package/dist/docx/serializer/index.d.ts +2 -2
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/executor-LAWUSXNG.mjs +1 -0
- package/dist/executor-SJOHUTMY.js +1 -0
- package/dist/{fontLoader-D9SBYuZZ.d.ts → fontLoader-CH12AtFF.d.ts} +1 -1
- package/dist/{fontLoader-B4uFKpAy.d.mts → fontLoader-D3X2Qgb_.d.mts} +1 -1
- package/dist/{headerFooterLayout-CtVsfqxQ.d.ts → headerFooterLayout-BdGTU0IA.d.ts} +31 -16
- package/dist/{headerFooterLayout-D2LZLkDC.d.mts → headerFooterLayout-D5-u-IsD.d.mts} +31 -16
- package/dist/headless.d.mts +4 -4
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +2 -2
- package/dist/layout-bridge/index.d.ts +2 -2
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +1 -1
- package/dist/layout-bridge/measuring/index.d.ts +1 -1
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.ts +1 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +1 -1
- package/dist/layout-engine/index.d.ts +1 -1
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +1 -1
- package/dist/layout-engine/types.d.ts +1 -1
- package/dist/layout-painter/index.d.mts +2 -2
- package/dist/layout-painter/index.d.ts +2 -2
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +2 -2
- package/dist/layout-painter/renderPage.d.ts +2 -2
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +1 -1
- package/dist/managers/AutoSaveManager.d.ts +1 -1
- package/dist/managers/TableSelectionManager.d.mts +1 -1
- package/dist/managers/TableSelectionManager.d.ts +1 -1
- package/dist/managers/types.d.mts +1 -1
- package/dist/managers/types.d.ts +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +8 -8
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-BvO8GGD4.d.mts → nodes-5w_QaI3g.d.mts} +13 -1
- package/dist/{nodes-Bd6tTkp0.d.ts → nodes-qQdZtu3Z.d.ts} +13 -1
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commentIdAllocator.d.mts +1 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +1 -1
- package/dist/prosemirror/commentOps.d.mts +1 -1
- package/dist/prosemirror/commentOps.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +1 -1
- package/dist/prosemirror/conversion/index.d.ts +1 -1
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +3 -3
- package/dist/prosemirror/index.d.ts +3 -3
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +2 -2
- package/dist/prosemirror/plugins/index.d.mts +1 -1
- package/dist/prosemirror/plugins/index.d.ts +1 -1
- package/dist/prosemirror/queries.d.mts +1 -1
- package/dist/prosemirror/queries.d.ts +1 -1
- package/dist/prosemirror/schema/index.d.mts +2 -2
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
- package/dist/{sectionPropertiesSerializer-CzgskSoA.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-D3yI82iZ.d.mts → sectionPropertiesSerializer-DI3OIQ1j.d.mts} +1 -1
- package/dist/types/content.d.mts +1 -1
- package/dist/types/content.d.ts +1 -1
- package/dist/types/document.d.mts +2 -2
- package/dist/types/document.d.ts +2 -2
- package/dist/utils/comments.d.mts +1 -1
- package/dist/utils/comments.d.ts +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/{variableDetector-D2-xDa2O.d.mts → variableDetector-7xBsshP0.d.mts} +1 -1
- package/dist/{variableDetector-d-PpDlNV.d.ts → variableDetector-Bv5Tm0D-.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2KPOGFFR.js +0 -1
- package/dist/chunk-2LVK7EF5.mjs +0 -2
- package/dist/chunk-34DJT72K.js +0 -1
- package/dist/chunk-4JPHW7ZI.js +0 -2
- package/dist/chunk-4QJEMD23.mjs +0 -4
- package/dist/chunk-4QSFBX26.mjs +0 -1
- package/dist/chunk-4SZAFWLV.mjs +0 -1
- package/dist/chunk-6KYOT4E7.js +0 -4
- package/dist/chunk-77X765ZO.js +0 -1
- package/dist/chunk-AXVWVIIN.js +0 -1
- package/dist/chunk-B6FA4MJ5.mjs +0 -1
- package/dist/chunk-BKP5QMTS.js +0 -1
- package/dist/chunk-C2BAPYGJ.js +0 -1
- package/dist/chunk-C57BOE7B.mjs +0 -2
- package/dist/chunk-F24WZXN4.mjs +0 -59
- package/dist/chunk-FETIBXTH.js +0 -1
- package/dist/chunk-IM56AITE.mjs +0 -1
- package/dist/chunk-JQUIUKRO.js +0 -59
- package/dist/chunk-KK673XRZ.mjs +0 -1
- package/dist/chunk-LE67NTCN.mjs +0 -1
- package/dist/chunk-M65C4SQJ.mjs +0 -2
- package/dist/chunk-NO6PIL32.mjs +0 -1
- package/dist/chunk-NTYJIOUE.js +0 -2
- package/dist/chunk-V3NE7Q22.js +0 -2
- package/dist/chunk-WCB25ESG.mjs +0 -1
- package/dist/chunk-WWG6PUWU.js +0 -1
- package/dist/executor-FHL5D4CB.js +0 -1
- package/dist/executor-FL6XGVP3.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$2}from'./chunk-6UCWVS7Y.mjs';import {c,f as f$1,a as a$2,g,b,e}from'./chunk-QCPISGPW.mjs';import {v,w,x,X as X$1,L,M,N as N$1,C,z as z$1,b as b$1}from'./chunk-VMBCUUZM.mjs';import {a as a$1,c as c$3}from'./chunk-7E5VBRDL.mjs';import {x as x$1}from'./chunk-3QQLHMB6.mjs';import {c as c$1}from'./chunk-T5G3IWCO.mjs';import {c as c$4}from'./chunk-PJEB3ZWG.mjs';import {a}from'./chunk-AMENZY5F.mjs';import {f,j as j$1}from'./chunk-KNY7SXPJ.mjs';function tt(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let s=o(m);if(s.length===0||!("height"in m))continue;let b=m.y-e.margins.top,g=b+m.height;s.forEach((u,E)=>{let y=`${E}:${u.id}`,p=a.get(y);p?(p.top=Math.min(p.top,b),p.bottom=Math.max(p.bottom,g)):(a.set(y,{group:u,depth:E,top:b,bottom:g}),i.push(y));});}let d=2,l=[];for(let m of i){let{group:s,depth:b,top:g,bottom:u}=a.get(m),E=b*(d+1),y=r.createElement("div");y.className="layout-block-sdt-box",y.dataset.sdtGroupId=s.id,y.dataset.sdtType=s.sdtType,y.dataset.sdtDepth=String(b+1),s.tag!=null&&(y.dataset.sdtTag=s.tag),s.alias!=null&&(y.dataset.sdtAlias=s.alias),s.lock!=null&&(y.dataset.sdtLock=s.lock),y.style.position="absolute",y.style.left=`${E}px`,y.style.top=`${g-d}px`,y.style.width=`${n-E*2}px`,y.style.height=`${u-g+d*2}px`;let p=s.alias||s.tag||s.sdtType;if(p){let F=r.createElement("span");F.className="layout-block-sdt-label",F.textContent=p,y.appendChild(F);}let w=wt(s.sdtType);if(w&&s.tag!=null&&!s.bound&&s.lock!=="contentLocked"&&s.lock!=="sdtContentLocked"){let F=r.createElement("button");F.type="button",F.className="layout-sdt-widget",F.dataset.sdtWidget=w,F.dataset.sdtTag=s.tag,F.dataset.sdtGroupId=s.id,F.setAttribute("aria-label",`${w} control ${s.alias||s.tag}`),w==="dropdown"?F.setAttribute("aria-haspopup","listbox"):w==="date"&&F.setAttribute("aria-haspopup","dialog"),F.textContent=w==="dropdown"?"\u25BE":w==="date"?"\u{1F4C5}":s.checked?"\u2612":"\u2610",y.appendChild(F);}if(s.repeatingItem&&!s.bound){let F=r.createElement("div");F.className="layout-sdt-repeat-controls";for(let c of ["add","remove"]){let x=r.createElement("button");x.type="button",x.className="layout-sdt-repeat-btn",x.dataset.sdtRepeat=c,x.dataset.sdtGroupId=s.id,x.setAttribute("aria-label",c==="add"?"Add item":"Remove item"),x.textContent=c==="add"?"\uFF0B":"\u2715",F.appendChild(x);}y.appendChild(F);}t.appendChild(y),l.push(y);}It(t,l);}function wt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function It(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(d,l)=>{for(let m of t){let s=m.getBoundingClientRect(),b=d>=s.left&&d<=s.right&&l>=s.top&&l<=s.bottom;b!==m.classList.contains("is-active")&&m.classList.toggle("is-active",b);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:d=>d(),r=false,a=0,i=0;e.addEventListener("mousemove",d=>{a=d.clientX,i=d.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let d of t)d.classList.remove("is-active");});}function Fn(e,t,n){let o=new Set,r=e.content.size,a=i=>{let d=e.resolve(Math.max(0,Math.min(i,r)));for(let l=1;l<=d.depth;l++)d.node(l).type.name==="blockSdt"&&o.add(`sdt@${d.before(l)}`);};return a(t),n!==t&&a(n),o}function Rn(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 U={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function Tt(e){return e.kind==="paragraph"}function Ft(e){return e.kind==="table"}function Rt(e){return e.kind==="image"}function fe(e){e.style.position="absolute",e.style.overflow="hidden";}function Ct(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.paragraph}`,fe(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 Et(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.table}`,fe(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 Lt(e,t,n){let o=n.createElement("div");return o.className=`${U.fragment} ${U.image}`,fe(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(Tt(e))return Ct(e,t,o);if(Ft(e))return Et(e,t,o);if(Rt(e))return Lt(e,t,o);let r=o.createElement("div");r.className=U.fragment,fe(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var P={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 A(e){return e.kind==="text"}function N(e){return e.kind==="tab"}function j(e){return e.kind==="image"}function W(e){return e.kind==="lineBreak"}function X(e){return e.kind==="field"}var nt={image:"layout-image",imageAnchored:"layout-image-anchored"};function oe(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function re(e,t){t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity))),vt(e,t);}function vt(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;if(!(n||o||r||a))return;let i=a+o>0?a/(a+o)*100:50,d=n+r>0?n/(n+r)*100:50;e.style.objectFit="cover",e.style.objectPosition=`${i}% ${d}%`;}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=nt.image,e.isAnchored&&i.classList.add(nt.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 d=a.createElement("img");if(d.src=t.src,d.alt=t.alt??"",d.style.width="100%",d.style.height="100%",d.style.objectFit="contain",d.style.display="block",t.transform&&(d.style.transform=t.transform),d.draggable=false,t.hlinkHref){let l=a.createElement("a");l.href=t.hlinkHref,l.target="_blank",l.rel="noopener noreferrer",l.style.display="block",l.style.width="100%",l.style.height="100%",l.appendChild(d),i.appendChild(l);}else i.appendChild(d);return i}function Pt(e,t,n){if(t.fontFamily&&(e.style.fontFamily=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.style.cursor="pointer",e.style.transition="background-color 0.15s ease",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.fontSize="0.75em",e.style.position="relative",e.style.top="-0.4em"),t.subscript&&(e.style.fontSize="0.75em",e.style.position="relative",e.style.top="0.2em"),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 z(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function Bt(e,t){let n=t.inlineSdtWidget;n&&(e.classList.add("layout-inline-sdt-widget"),e.dataset.sdtWidget=n.kind,e.dataset.sdtGroupId=n.groupId,e.dataset.sdtPos=String(n.pos),n.tag&&(e.dataset.sdtTag=n.tag),n.alias&&(e.dataset.sdtAlias=n.alias),typeof n.checked=="boolean"&&(e.dataset.sdtChecked=String(n.checked),e.setAttribute("aria-checked",String(n.checked))),e.setAttribute("role","checkbox"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",n.alias||n.tag||"Checkbox content control"));}function ie(e,t,n){let o=t.createElement("span");if(o.className=`${P.run} ${P.text}`,Pt(o,e,n),z(o,e.pmStart,e.pmEnd),Bt(o,e),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 Mt=1e3;function ge(e,t,n,o){let r=t.createElement("span");r.className=`${P.run} ${P.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,z(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?$t(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(Mt),r.appendChild(i);}else r.textContent="\xA0";return r}function $t(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function it(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function at(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 ot(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function Ht(e,t){let n=t.createElement("img");n.className=`${P.run} ${P.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"),oe(e)&&re(n,e);let o=it(e.transform);if(o!==0){let r=at(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`,ot(a,e),z(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",e.width>0&&e.height>0&&(n.style.height="auto",n.style.aspectRatio=`${e.width} / ${e.height}`,n.style.maxWidth="100%"),ot(n,e),z(n,e.pmStart,e.pmEnd),n}function rt(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"),oe(e)&&re(o,e);let r=it(e.transform);if(r!==0){let a=at(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 z(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function me(e,t){let n;return c(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=rt(e,t):n=Ht(e,t),At(n,e),n}function At(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 Fe(e,t){let n=t.createElement("br");return n.className=`${P.run} ${P.lineBreak}`,z(n,e.pmStart,e.pmEnd),n}function ue(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 ie(r,t,n?.resolvedCommentIds)}function Re(e,t,n){if(A(e))return ie(e,t,n?.resolvedCommentIds);if(N(e))return ge(e,t,48,void 0);if(j(e))return me(e,t);if(W(e))return Fe(e,t);if(X(e)&&n)return ue(e,t,n);let o=t.createElement("span");return o.className=P.run,o}function dt(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(A(a)){let i=r===t.fromRun?t.fromChar:0,d=r===t.toRun?t.toChar:a.text.length;if(i>0||d<a.text.length){let l=a.text.slice(i,d);n.push({...a,text:l,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+d:void 0});}else n.push(a);}else n.push(a);}return n}function st(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Ot(e,t){let n=e.position?.horizontal;return n?n.align??"left":t}function lt(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function zt(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Dt(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(A(a))o+=a.text;else if(X(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(N(a)||W(a))break}return o}var Nt=.5;function Wt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(N(i)||W(i))break;if(A(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(X(i)){let d;i.fieldType==="PAGE"&&o?d=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?d=String(o.totalPages):d=i.fallback??"",r+=n(d,i.fontSize,i.fontFamily,i.bold,i.italic);}else j(i)&&!c(i)&&(r+=i.width||0);}return r}function _t(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a$1="Calibri",i=false,d=false)=>{if(!n)return o.length*7;let l=a(a$1).cssFallback,m=r*96/72,s=[];return d&&s.push("italic"),i&&s.push("bold"),s.push(`${m}px`,l),n.font=s.join(" "),n.measureText(o).width}}function he(e,t,n,o,r){let a=o.createElement("div");a.className=P.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=dt(e,t);if(i.length===1&&j(i[0])){let y=i[0],p=Ot(y,n);a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=st(p),a.dataset.flexLine="true";}else i.some(j)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=st(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let y=o.createElement("span");return y.className=`${P.run} layout-empty-run`,y.innerHTML=" ",a.appendChild(y),a}let d=n==="justify",l=false;d&&r&&(l=!r.isLastLine||r.paragraphEndsWithLineBreak,l&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(y=>A(y)&&y.highlight);a.style.overflow=m?"hidden":"visible";let s=i.some(N),b,g=_t(o);if(s){let y=r?.tabStops?.map(zt),p=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;b={explicitStops:y,leftIndent:p};}let u=0,E=r?.leftIndentPx??0;if(r?.isFirstLine){let y=r?.firstLineIndentPx??0;u=E+y;}else u=E;for(let y=0;y<i.length;y++){let p=i[y];if(N(p)&&b){let w=Wt(i,y,g,r?.context),F=Dt(i,y,r?.context),c$1=F.indexOf("."),x=c$1>=0?g(F.slice(0,c$1)):0,I=v(u,b,{followingWidth:w,decimalPrefixWidth:x}),k=r?.lineRightEdgePx,S=w,f=false;for(let T=y+1;T<i.length&&!W(i[T]);T++)if(N(i[T])){f=true;break}if(k!==void 0&&I.alignment==="end"&&!f&&u+I.width+S>=k-Nt){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 T=ge(p,o,0,I.leader);T.style.flex="1 1 0",T.style.minWidth="0",T.style.width="auto",a.appendChild(T);for(let v=y+1;v<i.length;v++){let L=i[v];if(N(L)||W(L))break;if(A(L))a.appendChild(ie(L,o,r?.context?.resolvedCommentIds));else if(X(L)&&r?.context)a.appendChild(ue(L,o,r.context));else if(j(L)){if(c(L))continue;let B=lt(L);r?.renderedInlineImageKeys?.has(B)||(r?.renderedInlineImageKeys?.add(B),a.appendChild(me(L,o)));}else a.appendChild(Re(L,o,r?.context));}break}let C=I.width;k!==void 0&&u+C+S>k&&(C=Math.max(1,k-u-S));let R=ge(p,o,C,I.leader);a.appendChild(R),u+=C;}else if(A(p)){let w=ie(p,o,r?.context?.resolvedCommentIds);if(p.highlight){let I=(p.fontSize?p.fontSize*96/72:14.67)*1.2,k=Math.max(0,t.lineHeight-I);if(k>0){let S=k/2;w.style.paddingTop=`${S}px`,w.style.paddingBottom=`${S}px`;}}a.appendChild(w);let F=p.fontSize||11,c=p.fontFamily||"Calibri";u+=g(p.text,F,c,p.bold,p.italic);}else if(j(p)){if(c(p))continue;let w=lt(p);if(r?.renderedInlineImageKeys?.has(w))continue;r?.renderedInlineImageKeys?.add(w);let F=me(p,o);a.appendChild(F),p.displayMode!=="block"&&p.wrapType!=="topAndBottom"&&(u+=p.width);}else if(W(p)){let w=Fe(p,o);a.appendChild(w);}else if(X(p)&&r?.context){let w=ue(p,o,r.context);a.appendChild(w);let F=p.fallback??"";p.fieldType==="PAGE"?F=String(r.context.pageNumber):p.fieldType==="NUMPAGES"&&(F=String(r.context.totalPages));let c=p.fontSize||11,x=p.fontFamily||"Calibri";u+=g(F,c,x,p.bold,p.italic);}else {let w=Re(p,o,r?.context);a.appendChild(w);}}if(!a.querySelector("span[data-pm-start][data-pm-end]")){let y=i.find(W);if(y?.pmStart!==void 0){let p=o.createElement("span");p.className=P.run,z(p,y.pmStart,y.pmStart),p.textContent="\u200B",a.insertBefore(p,a.firstChild);}}return a}function ae(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function ct(e,t){return !e&&!t||!e||!t?false:ae(e.top,t.top)&&ae(e.bottom,t.bottom)&&ae(e.left,t.left)&&ae(e.right,t.right)&&ae(e.between,t.between)}var Gt=/[\u0590-\u085F\u08A0-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Yt=/[\u0041-\u005A\u0061-\u007A\u00C0-\u02B8\u0370-\u0589\u10A0-\u10FF\u1E00-\u1FFF]/;function jt(e){let t=(e.runs??[]).filter(A);if(!t.some(n=>n.rtl))return false;for(let n of t)for(let o of n.text){if(Gt.test(o))return true;if(Yt.test(o))return false}return true}function D(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=P.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),z(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let d=t.attrs?.pPrIns,l=t.attrs?.pPrDel;if(d||l){let k=d??l;i.classList.add("layout-revision-pmark"),i.classList.add(d?"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),s=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let b=!!t.attrs?.bidi||jt(t);b&&(i.dir="rtl"),s?s==="center"?i.style.textAlign="center":s==="right"?i.style.textAlign="right":s==="left"?i.style.textAlign="left":i.style.textAlign=b?"right":"left":b&&(i.style.textAlign="right");let g=t.attrs?.indent,u=0,E=0;g&&(b?(g.left&&g.left>0&&(E=g.left),g.right&&g.right>0&&(u=g.right)):(g.left&&g.left>0&&(u=g.left),g.right&&g.right>0&&(E=g.right)));let y=t.attrs?.borders;if(y){let k=L=>{switch(L){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=L=>`${L.width}px ${k(L.style)} ${L.color}`,f=ct(r.prevBorders,y),h=ct(y,r.nextBorders),C=f?y.between:y.top,R=h?void 0:y.bottom,T=a.createElement("div");if(T.className="layout-paragraph-border",T.style.position="absolute",T.style.pointerEvents="none",T.style.boxSizing="border-box",T.style.left=`${u-(y.left?.space??0)}px`,T.style.right=`${E-(y.right?.space??0)}px`,T.style.top=`${-(C?.space??0)}px`,T.style.bottom=`${-(R?.space??0)}px`,C&&(T.style.borderTop=S(C)),R&&(T.style.borderBottom=S(R)),y.left&&(T.style.borderLeft=S(y.left)),y.right&&(T.style.borderRight=S(y.right)),(C||R||y.left||y.right)&&i.appendChild(T),y.bar){let L=a.createElement("div");L.style.position="absolute",L.style.left="-8px",L.style.top="0",L.style.bottom="0",L.style.borderLeft=S(y.bar),i.style.position="relative",i.appendChild(L);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let p=e.width-u-E,F=t.runs[t.runs.length-1]?.kind==="lineBreak",c=n.lines.length,x$1=0;g?.hanging&&g.hanging>0?x$1=-g.hanging:g?.firstLine&&g.firstLine>0&&(x$1=g.firstLine);let I=r.renderedInlineImageKeys??new Set;for(let k=0;k<m.length;k++){let S=m[k],f=e.fromLine+k,h=f===c-1,C=f===0&&!e.continuesFromPrev,R=S.leftOffset??0,T=S.rightOffset??0,v=p;if(C){let M=g?.hanging&&g.hanging>0,$=g?.firstLine&&g.firstLine>0;M&&g?.hanging?v=p+g.hanging:$&&g?.firstLine&&(v=p-g.firstLine);}if(Vt(S,t)){let M=a.createElement("div");M.className=`${P.line} layout-line-split`,M.style.position="relative",M.style.height=`${S.lineHeight}px`,M.style.lineHeight=`${S.lineHeight}px`;for(let $ of S.segments){let te={fromRun:$.fromRun,fromChar:$.fromChar,toRun:$.toRun,toChar:$.toChar,width:$.width,ascent:S.ascent,descent:S.descent,lineHeight:S.lineHeight},Y=he(t,te,s,a,{availableWidth:$.availableWidth,isLastLine:h,isFirstLine:C,paragraphEndsWithLineBreak:F,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:C?x$1:0,context:o,renderedInlineImageKeys:I});Y.className+=" layout-line-segment",Y.style.position="absolute",Y.style.left=`${$.leftOffset}px`,Y.style.top="0",Y.style.width=`${$.availableWidth}px`,M.appendChild(Y);}i.appendChild(M);continue}let L=he(t,S,s,a,{availableWidth:v-R-T,isLastLine:h,isFirstLine:C,paragraphEndsWithLineBreak:F,tabStops:t.attrs?.tabs,leftIndentPx:u,firstLineIndentPx:C?x$1:0,context:o,renderedInlineImageKeys:I,lineRightEdgePx:e.width-E-T});if(R>0||T>0){R>0&&(L.style.marginLeft=`${R}px`),T>0&&(L.style.marginRight=`${T}px`);let M=v-R-T;M>0&&(L.style.width=`${M}px`);}S.floatSkipBefore&&S.floatSkipBefore>0&&(L.style.marginTop=`${S.floatSkipBefore}px`);let B=g?.hanging&&g.hanging>0,Oe=g?.firstLine&&g.firstLine>0,kt=L.dataset.flexLine==="true";if(C?u>0&&B?(L.style.paddingLeft=`${u}px`,kt||(L.style.textIndent=`-${g.hanging}px`)):u>0&&Oe?(L.style.paddingLeft=`${u}px`,L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:Oe&&(L.style.textIndent=`${g.firstLine}px`):u>0?L.style.paddingLeft=`${u}px`:B&&(L.style.paddingLeft=`${g.hanging}px`),E>0&&(L.style.paddingRight=`${E}px`),C&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let M=g?.hanging??0,$=g?.firstLine??0,te=M>0?u-M:u+$;L.style.paddingLeft=`${Math.max(0,te)}px`,L.style.textIndent="0";let{fontFamily:Y,fontSize:St}=w(t),ze=Kt(t.attrs.listMarker,x(t),a,Y,St,t.attrs.listMarkerRevision);te<0&&u>0&&(ze.style.marginLeft=`${te}px`),L.insertBefore(ze,L.firstChild);}i.appendChild(L);}if((d||l)&&!e.continuesOnNext){let k=i.lastElementChild;if(k){let S=a.createElement("span");S.className="layout-revision-pmark-glyph",d?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 Kt(e,t,n,o,r,a$1){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=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$1==="ins"?i.style.color="#2e7d32":a$1==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function q(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",i.style.maxWidth="none",i.style.maxHeight="none",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),oe(r)&&re(i,r),a.appendChild(i),o.appendChild(a);}return o}function pt(e$1,t,n){let o=[],r=0;for(let a=0;a<e$1.blocks.length;a++){let i=e$1.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let d=i;for(let m of d.runs){if(m.kind!=="image")continue;let s=m;if(!c(s))continue;let b=s.position,g=s.distTop??0,u=s.distBottom??0,E=s.distLeft??12,y=s.distRight??12,p="left",w=0;if(b?.horizontal){let c=b.horizontal;c.align==="right"?(p="right",w=n-s.width):c.align==="left"?w=0:c.align==="center"?w=(n-s.width)/2:c.posOffset!==void 0&&(w=f(c.posOffset),p=w>n/2?"right":"left");}else s.cssFloat==="right"&&(p="right",w=n-s.width);let F=r;if(b?.vertical){let c=b.vertical;c.posOffset!==void 0?F=r+f(c.posOffset):c.align==="top"&&(F=0);}w=Math.max(0,Math.min(w,n-s.width)),o.push({src:s.src,width:s.width,height:s.height,alt:s.alt,transform:s.transform,x:w,y:F,side:p,distTop:g,distBottom:u,distLeft:E,distRight:y,wrapText:e(s.cssFloat),wrapType:s.wrapType,pmStart:s.pmStart,pmEnd:s.pmEnd});}let l=t.blocks[a];l&&l.kind==="paragraph"&&(r+=l.totalHeight);}return o}function Ce(e){return !!e&&e.style!=="none"&&e.style!=="nil"&&e.width!==0}function J(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!Ce(n))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 Ee(e){let t=[],n=0;for(let o of e)t.push(Math.round(n)),n+=o?.height??0;return t.push(Math.round(n)),t}function ft(e,t){let n=e.createElement("div");n.className="layout-table-cut-border",n.style.position="absolute",n.style.left=`${t.x}px`,n.style.width=`${t.width}px`;let o=t.border.width??1;return n.style.top=`${t.edge==="bottom"?t.topY-o:t.topY}px`,J(n,"top",t.border),n}function Le(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 _={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 Ut(e,t,n,o){let r=o.createElement("div");r.className=_.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,d=Math.max(0,t.width-a-i);r.style.width=`${d}px`;let l=pt(e,t,d),m;if(l.length>0){m=l.filter(a$2).map(E=>{let y=E.x+E.width+E.distRight,p=E.y-E.distTop,w=E.y+E.height+E.distBottom,F=0,c=0,x=E.wrapText??"bothSides";return x==="right"?F=y:x==="left"?c=d-(E.x-E.distLeft):E.side==="left"?F=y:c=d-(E.x-E.distLeft),{leftMargin:F,rightMargin:c,topY:p,bottomY:w}});let u=l.filter(b);u.length>0&&r.appendChild(q(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let s=0,b$1=0;for(let u=0;u<e.blocks.length;u++){let E=e.blocks[u],y=t.blocks[u];if(E?.kind==="paragraph"&&y?.kind==="paragraph"){let p=E,w=y,F=p.attrs?.spacing,c=Math.max(b$1,F?.before??0);s+=c,m&&m.length>0&&(w=z$1(p,d,{floatingZones:m,paragraphYOffset:s}));let x={blockId:p.id,width:d,height:w.totalHeight,fromLine:0,toLine:w.lines.length,pmStart:p.pmStart,pmEnd:p.pmEnd},I={...n,insideTableCell:true},k=D(x,p,w,I,{document:o});k.style.position="relative",c>0&&(k.style.marginTop=`${c}px`),r.appendChild(k),s+=w.totalHeight,b$1=F?.after??0;}else if(E?.kind==="table"&&y?.kind==="table"){let p=E,w=y,F=b$1,c=Xt(p,w,n,o);c.style.position="relative",F>0&&(c.style.marginTop=`${F}px`),r.appendChild(c),s+=F+(y.totalHeight??0),b$1=0;}}b$1>0&&(r.style.paddingBottom=`${b$1}px`);let g=l.filter(u=>!b(u));return g.length>0&&r.appendChild(q(g,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Xt(e,t,n,o){let r=o.createElement("div");r.className=`${_.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,d=a?.trackedDel,l=(g,u)=>!!g&&!!u&&(g.author??"")===(u.author??"")&&(g.date??null)===(u.date??null),m=e.rows.length>0&&e.rows.every(g=>i?l(g.trackedIns,i):d?l(g.trackedDel,d):false);if(m){let g=i??d,u=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${u}`),r.dataset.revisionId=String(g.revisionId),r.dataset.revisionAuthor=g.author,g.date&&(r.dataset.revisionDate=g.date);}let s=Ee(t.rows),b=new Map;for(let g=0;g<e.rows.length;g++){let u=e.rows[g],E=t.rows[g];if(!u||!E)continue;let y=ve(u,E,g,s[g]??0,t.columnWidths,e.rows.length,n,o,b,s,void 0,m);r.appendChild(y);}return r.style.height=`${s[e.rows.length]??0}px`,r}function gt(e,t,n,o,r,a,i,d){let l=i.createElement("div");l.className=_.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==d&&Le(l,"cell",e.trackedMarker.kind,e.trackedMarker.info),l.style.position="absolute",l.style.left=`${n}px`,l.style.top="0",l.style.width=`${t.width}px`,l.style.height=`${o}px`,l.style.overflow="hidden",l.style.boxSizing="border-box";let m=e.padding?.top??1,s=e.padding?.right??7,b=e.padding?.bottom??1,g=e.padding?.left??7;l.style.padding=`${m}px ${s}px ${b}px ${g}px`,e.borders&&(r.isFirstRow&&J(l,"top",e.borders.top),J(l,"right",e.borders.right),J(l,"bottom",e.borders.bottom),r.isFirstCol&&J(l,"left",e.borders.left)),e.background&&(l.style.backgroundColor=e.background),e.noWrap&&(l.style.whiteSpace="nowrap");let u=(t.height??0)>=o-.5;if(e.verticalAlign&&!u)switch(l.style.display="flex",l.style.flexDirection="column",e.verticalAlign){case "top":l.style.justifyContent="flex-start";break;case "center":l.style.justifyContent="center";break;case "bottom":l.style.justifyContent="flex-end";break}let E=Ut(e,t,a,i);if(l.appendChild(E),e.blocks.length>0){let y=e.blocks[0],p=e.blocks[e.blocks.length-1];y&&"pmStart"in y&&y.pmStart!==void 0&&(l.dataset.pmStart=String(y.pmStart)),p&&"pmEnd"in p&&p.pmEnd!==void 0&&(l.dataset.pmEnd=String(p.pmEnd));}return l}function qt(e,t){return b$1(e).map(n=>{let o=0;for(let r=0;r<n.columnIndex;r++)o+=t[r]??0;return {rowIndex:n.rowIndex,cellIndex:n.cellIndex,columnIndex:n.columnIndex,x:o,colSpan:n.colSpan,rowSpan:n.rowSpan,cell:e.rows[n.rowIndex].cells[n.cellIndex]}})}function ve(e,t,n,o,r,a,i,d,l,m,s,b){let g=d.createElement("div");g.className=_.row,b||(e.trackedDel?Le(g,"row","del",e.trackedDel):e.trackedIns&&Le(g,"row","ins",e.trackedIns));let u=m&&m.length>n+1?(m[n+1]??0)-(m[n]??0):t.height;g.style.position="absolute",g.style.left="0",g.style.top=`${o}px`,g.style.width="100%",g.style.height=`${u}px`,g.dataset.rowIndex=String(n);let E=new Set;if(l){for(let[,w]of l)if(w.startRow<n&&w.startRow+w.rowSpan>n)for(let F=0;F<w.colSpan;F++)E.add(w.columnIndex+F);}let y=0,p=0;for(;E.has(p);)y+=r[p]??0,p++;for(let w=0;w<e.cells.length;w++){let F=e.cells[w],c=t.cells[w];if(!F||!c)continue;let x=F.colSpan??1,I=F.rowSpan??1,k=u;if(I>1&&m){k=0;for(let T=n;T<n+I&&T<m.length-1;T++)k+=(m[T+1]??0)-(m[T]??0);k===0&&(k=t.height*I);}let S=n===0||s===true,h=p===0;p+x>=r.length;let R=gt(F,c,y,k,{isFirstRow:S,isFirstCol:h},i,d,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(R.dataset.cellIndex=String(w),R.dataset.columnIndex=String(p),I>1&&(R.dataset.rowSpan=String(I)),g.appendChild(R),I>1&&l){let T=`${n}-${p}`;l.set(T,{cell:F,cellMeasure:c,columnIndex:p,startRow:n,rowSpan:I,colSpan:x,x:y,totalHeight:k});}for(let T=0;T<x&&p+T<r.length;T++)y+=r[p+T]??0;for(p+=x;E.has(p);)y+=r[p]??0,p++;}return g}function Q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=_.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}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 d=t.rows[0],l=d?.trackedIns,m=d?.trackedDel,s=(f,h)=>!!f&&!!h&&(f.author??"")===(h.author??"")&&(f.date??null)===(h.date??null),b=t.rows.length>0&&t.rows.every(f=>l?s(f.trackedIns,l):m?s(f.trackedDel,m):false);if(b){let f=l??m,h=l?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${h}`),i.dataset.revisionId=String(f.revisionId),i.dataset.revisionAuthor=f.author,f.date&&(i.dataset.revisionDate=f.date),i.style.overflowX="visible",i.style.overflowY="hidden";}let g=0;for(let f=0;f<n.columnWidths.length-1;f++){g+=n.columnWidths[f]??0;let h=a.createElement("div");h.className=_.resizeHandle,h.style.position="absolute",h.style.left=`${g-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(f),h.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),i.appendChild(h);}let u=Ee(n.rows),E=qt(t,n.columnWidths),y=e.headerRowCount??0,p=0;if(y>0&&e.continuesFromPrev){let f=new Map;for(let h=0;h<y;h++){let C=t.rows[h],R=n.rows[h];if(!C||!R)continue;let T=ve(C,R,h,p,n.columnWidths,t.rows.length,o,a,f,u,h===0,b);T.dataset.repeatedHeader="true",i.appendChild(T),p+=R.height;}}let w=(u[e.fromRow]??0)+(e.topClip??0),F=f=>p+(f-w),c=e.bottomClip!==void 0?Math.round(e.height):F(u[e.toRow]??0);i.style.height=`${c}px`;let x=new Map,I=y>0&&e.continuesFromPrev;for(let f of E){if(f.rowSpan<=1||f.rowIndex>=e.fromRow||f.rowIndex+f.rowSpan<=e.fromRow||I&&f.rowIndex<y)continue;let h=n.rows[f.rowIndex]?.cells?.[f.cellIndex];if(!h)continue;let C=0;for(let B=f.rowIndex;B<f.rowIndex+f.rowSpan&&B<u.length-1;B++)C+=(u[B+1]??0)-(u[B]??0);x.set(`${f.rowIndex}-${f.columnIndex}`,{cell:f.cell,cellMeasure:h,columnIndex:f.columnIndex,startRow:f.rowIndex,rowSpan:f.rowSpan,colSpan:f.colSpan,x:f.x,totalHeight:C});f.rowIndex+f.rowSpan>=t.rows.length;let T=f.columnIndex===0;f.columnIndex+f.colSpan>=n.columnWidths.length;let L=gt(f.cell,h,f.x,C,{isFirstRow:false,isFirstCol:T},o,a);L.style.top=`${F(u[f.rowIndex]??0)}px`,L.dataset.columnIndex=String(f.columnIndex),L.dataset.vmergeContinuation="true",delete L.dataset.pmStart,delete L.dataset.pmEnd,i.appendChild(L);}for(let f=e.fromRow;f<e.toRow;f++){let h=t.rows[f],C=n.rows[f];if(!h||!C)continue;let R=y>0&&e.continuesFromPrev?false:e.continuesFromPrev&&f===e.fromRow&&!e.topClip,T=ve(h,C,f,F(u[f]??0),n.columnWidths,t.rows.length,o,a,x,u,R,b);i.appendChild(T);}let k=(f,h,C,R)=>{for(let T of E){if(T.rowIndex>f||T.rowIndex+T.rowSpan-1<f||R&&!(h==="bottom"?T.rowIndex+T.rowSpan-1>f:T.rowIndex<f))continue;let v=T.cell.borders?.[h];if(!Ce(v))continue;let L=0;for(let B=0;B<T.colSpan;B++)L+=n.columnWidths[T.columnIndex+B]??0;i.appendChild(ft(a,{x:T.x,topY:C,width:L,edge:h,border:v}));}};e.topClip?k(e.fromRow,"top",p,false):e.continuesFromPrev&&k(e.fromRow,"top",p,true),e.bottomClip!==void 0?k(e.toRow-1,"bottom",c,false):e.continuesOnNext&&k(e.toRow-1,"bottom",c,true);for(let f=e.fromRow;f<e.toRow-1;f++){let h=F(u[f+1]??0);if(h<=p||h>=e.height)continue;let C=a.createElement("div");C.className=_.rowResizeHandle,C.style.position="absolute",C.style.left="0",C.style.top=`${h-3}px`,C.style.width="100%",C.style.height="6px",C.style.cursor="row-resize",C.style.zIndex="10",C.dataset.rowIndex=String(f),C.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(C.dataset.tablePmStart=String(e.pmStart)),i.appendChild(C);}let S=e.toRow===t.rows.length&&e.bottomClip===void 0;if(S){let f=a.createElement("div");f.className=_.tableEdgeHandleBottom,f.style.position="absolute",f.style.left="0",f.style.top=`${F(u[e.toRow]??0)-3}px`,f.style.width="100%",f.style.height="6px",f.style.cursor="row-resize",f.style.zIndex="10",f.dataset.rowIndex=String(t.rows.length-1),f.dataset.tableBlockId=String(e.blockId),f.dataset.isEdge="bottom",e.pmStart!==void 0&&(f.dataset.tablePmStart=String(e.pmStart)),i.appendChild(f);}if(S){let f=n.columnWidths.reduce((C,R)=>C+R,0),h=a.createElement("div");h.className=_.tableEdgeHandleRight,h.style.position="absolute",h.style.left=`${f-3}px`,h.style.top="0",h.style.width="6px",h.style.height="100%",h.style.cursor="col-resize",h.style.zIndex="10",h.dataset.columnIndex=String(n.columnWidths.length-1),h.dataset.tableBlockId=String(e.blockId),h.dataset.isEdge="right",e.pmStart!==void 0&&(h.dataset.tablePmStart=String(e.pmStart)),i.appendChild(h);}return i}var Zt={textBox:"layout-textbox"};function ee(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",Jt(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let s=t.outlineStyle||"solid",b=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${s} ${b}`;}let d=t.margins??a$1;i.style.padding=`${d.top}px ${d.right}px ${d.bottom}px ${d.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 l=e.width-d.left-d.right,m=0;for(let s=0;s<t.content.length;s++){let b=t.content[s],g=n.innerMeasures[s];if(!g)continue;let u={blockId:b.id,width:l,height:g.totalHeight,pmStart:b.pmStart,pmEnd:b.pmEnd,fromLine:0,toLine:g.lines.length},E=D(u,b,g,{...o,positioning:"flow"},{document:a});i.appendChild(E),m+=g.totalHeight;}return i}function Jt(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}var Qt="layout-watermark-layer";function en(e,t){let n=Math.max(e.trim().length,1),o=t/(n*.62);return Math.max(24,Math.min(o,180))}function tn(e,t,n){let o=n.createElement("div");o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.whiteSpace="nowrap",o.style.fontWeight="bold",o.style.color=e.color,o.style.fontFamily=a(e.font).cssFallback,o.style.userSelect="none";let r=t.size.w-t.margins.left-t.margins.right,a$1=e.layout==="diagonal"?r*1.3:r,i=e.fontSize!==void 0?e.fontSize*96/72:en(e.text,a$1);o.style.fontSize=`${i}px`,o.style.lineHeight="1",o.style.opacity=e.semitransparent?"0.5":"0.85";let d=e.layout==="diagonal"?-45:0;return o.style.transform=`translate(-50%, -50%) rotate(${d}deg)`,o.style.transformOrigin="center center",o.textContent=e.text,o}function nn(e,t,n){if(!e.dataUrl)return null;let o=n.createElement("img");o.src=e.dataUrl,o.alt="",o.style.position="absolute",o.style.top="50%",o.style.left="50%",o.style.transform="translate(-50%, -50%)";let r=t.size.w-t.margins.left-t.margins.right,a=e.widthEmu!==void 0?e.widthEmu/(914400/96):r*.75;return o.style.width=`${a*(e.scale||1)}px`,o.style.height="auto",e.washout&&(o.style.opacity="0.5",o.style.filter="brightness(1.4) contrast(0.4)"),o}function mt(e,t,n=document){let o=e.kind==="text"?tn(e,t,n):nn(e,t,n);if(!o)return null;let r=n.createElement("div");return r.className=Qt,r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.inset="0",r.style.overflow="hidden",r.style.pointerEvents="none",r.style.zIndex="0",r.appendChild(o),r}function ut(e){return e?.align??e?.alignment}function on(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ut(n),r=n.posOffset!==void 0?f(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 Pe(e,t,n){if(!t)return "0";let o=ut(t);if(t.relativeTo==="page"){if(t.posOffset!==void 0)return `${f(t.posOffset)-n.flowLeft}px`;if(o==="right")return `${n.pageWidth-e-n.flowLeft}px`;if(o==="center")return `${(n.pageWidth-e)/2-n.flowLeft}px`;if(o==="left")return `${-n.flowLeft}px`}return t.posOffset!==void 0?`${f(t.posOffset)}px`:o==="right"?`${n.contentWidth-e}px`:o==="center"?`${(n.contentWidth-e)/2}px`:"0"}function rn(e,t,n){e.style.left=Pe(t.width,t.position.horizontal,n);}function ht(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 Be(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,d=[],l=0;for(let m=0;m<e.blocks.length;m++){let s=e.blocks[m],b=e.measures[m];if(!(!s||!b))if(s.kind==="paragraph"){if(b.kind!=="paragraph")continue;let g=s,u=b,E=g.attrs?.spacing?.before??0,y=l,p=[];for(let x of g.runs)if(x.kind==="image"&&"position"in x&&x.position){let I=x;d.push({src:I.src,width:I.width,height:I.height,alt:I.alt,paragraphY:y,position:I.position});}else p.push(x);let w={...g,runs:p},F={blockId:g.id,width:i,height:u.totalHeight,fromLine:0,toLine:u.lines.length,pmStart:g.pmStart,pmEnd:g.pmEnd},c=D(F,w,u,{...t,positioning:"absolute"},{document:r});c.style.top=`${l+E}px`,c.style.left="0",c.style.width=`${i}px`,a.appendChild(c),l+=u.totalHeight;}else if(s.kind==="table"){if(b.kind!=="table")continue;let g={blockId:s.id,width:b.totalWidth,height:b.totalHeight,fromRow:0,toRow:b.rows.length,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Q(g,s,b,{...t,positioning:"absolute"},{document:r});if(s.floating){let{left:E,top:y}=ht(s.floating,o);u.style.top=`${y}px`,u.style.left=`${E}px`,a.appendChild(u);}else u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=b.totalHeight;}else if(s.kind==="image"){if(b.kind!=="image")continue;let g={blockId:s.id,width:b.width,height:b.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=Z(g,s,b,{...t},{document:r});u.style.top=`${l}px`,u.style.left="0",a.appendChild(u),l+=b.height;}else if(s.kind==="textBox"){if(b.kind!=="textBox")continue;let g={blockId:s.id,width:b.width,height:b.height,pmStart:s.pmStart,pmEnd:s.pmEnd},u=ee(g,s,b,{...t,positioning:"absolute"},{document:r});u.style.top=`${l}px`,u.style.left=Pe(b.width,s.position?.horizontal,o),a.appendChild(u),s.displayMode!=="float"&&(l+=b.height);}else s.kind==="sectionBreak"||s.kind==="pageBreak"||s.kind==="columnBreak"||c$3(s,"renderHeaderFooterContent");}for(let m of d){let s=r.createElement("img");s.src=m.src,s.width=m.width,s.height=m.height,m.alt&&(s.alt=m.alt),s.style.position="absolute",s.style.display="block",s.style.width=`${m.width}px`,s.style.height=`${m.height}px`,s.style.maxWidth="none",s.style.maxHeight="none",rn(s,m,o),s.style.top=`${on(m,o)}px`,a.appendChild(s);}return a}var be=12,Me=6;function an(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}function sn(e,t){for(let[n,o]of t)if((e.get(n)??0)<o)return false;return true}function ln(e,t){let n=new Map(e);for(let[o,r]of t)n.set(o,Math.max(n.get(o)??0,r));return n}var $e=8;function Ro(e){let t=[],n=(o,r)=>{for(let a of o)if(a.kind==="paragraph")for(let i of a.runs)i.kind==="text"&&i.footnoteRefId!=null&&t.push({footnoteId:i.footnoteRefId,pmPos:i.pmStart??0,...r??{}});else a.kind==="table"?a.rows.forEach((i,d)=>{for(let l of i.cells)n(l.blocks,r??{tableBlockId:a.id,rowIndex:d});}):a.kind==="textBox"&&n(a.content,r);};return n(e),t}function ye(e,t){let n=new Map;if(t.length===0)return n;let o=(r,a)=>{let i=n.get(r)??[];i.includes(a)||i.push(a),n.set(r,i);};for(let r of t){let a=false;for(let i of e){for(let d of i.fragments){let l=false;if(r.tableBlockId!=null&&r.rowIndex!=null)l=d.kind==="table"&&d.blockId===r.tableBlockId&&r.rowIndex>=d.fromRow&&r.rowIndex<d.toRow;else {let m=d.pmStart??-1,s=d.pmEnd??-1;l=m>=0&&s>=0&&r.pmPos>=m&&r.pmPos<s;}if(l){o(i.number,r.footnoteId),a=true;break}}if(a)break}}return n}function dn(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:$e,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:$e}:i)}}),o=n[0];if(o.kind==="paragraph"){let r=o,a=r.runs.find(d=>d.kind==="text"),i={kind:"text",text:`${t} `,fontSize:$e,superscript:true,...a?.fontFamily?{fontFamily:a.fontFamily}:{}};n[0]={...r,runs:[i,...r.runs]};}return n}function cn(e,t,n,o){let r=c$1(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=c$2(r,{theme:o.theme??void 0}),i=dn(a,t),d=o.measureBlocks(i,n),l=d.reduce((m,s)=>s.kind==="paragraph"||s.kind==="table"?m+s.totalHeight:s.kind==="image"||s.kind==="textBox"?m+s.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:d,height:l}}function Co(e,t,n,o){let r=new Map,a=new Map;for(let l of e)(l.noteType==="normal"||l.noteType==null)&&a.set(l.id,l);let i=1,d=new Set;for(let l of t){if(d.has(l.footnoteId))continue;d.add(l.footnoteId);let m=a.get(l.footnoteId);m&&(r.set(l.footnoteId,cn(m,i,n,o)),i++);}return r}function He(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let d=t.get(i);d&&(a+=d.height);}a>0&&(a+=be,n.set(o,a));}return n}function Eo(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,d=ye(i.pages,r),l=He(d,a);if(l.size===0)return {layout:i,pageFootnoteMap:d,converged:true};let m=i,s=false;for(let b=0;b<Me;b++){m=X$1(t,n,{...o,footnoteReservedHeights:l});let g=ye(m.pages,r),u=He(g,a);if(d=g,an(l,u)){l=u,s=true;break}l=u;}if(!s){let b=l,g=false;for(let u=0;u<Me;u++){m=X$1(t,n,{...o,footnoteReservedHeights:b}),d=ye(m.pages,r);let E=He(d,a);if(sn(b,E)){g=true;break}b=ln(b,E);}g||(m=X$1(t,n,{...o,footnoteReservedHeights:b}),d=ye(m.pages,r)),console.warn(`[docx-editor] footnote layout did not stabilize within ${Me} passes; settling with conservative page reservations. If footnotes appear misplaced, please file a bug with the document.`);}for(let[b,g]of d){let u=m.pages.find(E=>E.number===b);u&&(u.footnoteIds=g);}return {layout:m,pageFootnoteMap:d,converged:s}}function Lo(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 d=[];for(let l of i){let m=r.get(l);if(!m)continue;let s=t.get(l),b=s?.displayNumber??0;d.push({displayNumber:String(b),text:x$1(m),content:s});}d.length>0&&o.set(a,d);}return o}function pn(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 d=e.blocks[i],l=e.measures[i];if(!(!d||!l)){if(d.kind==="paragraph"&&l.kind==="paragraph"){let m=d.attrs?.spacing?.before??0,s={blockId:d.id,width:t,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromLine:0,toLine:l.lines.length},b=D(s,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});b.style.top=`${a+m}px`,b.style.left="0",b.style.width=`${t}px`,b.style.height=`${l.totalHeight}px`,r.appendChild(b),a+=l.totalHeight;}else if(d.kind==="table"&&l.kind==="table"){let m={blockId:d.id,width:l.totalWidth,height:l.totalHeight,pmStart:d.pmStart,pmEnd:d.pmEnd,fromRow:0,toRow:l.rows.length},s=Q(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.totalHeight;}else if(d.kind==="image"&&l.kind==="image"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=Z(m,d,l,{...n},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}else if(d.kind==="textBox"&&l.kind==="textBox"){let m={blockId:d.id,width:l.width,height:l.height,pmStart:d.pmStart,pmEnd:d.pmEnd},s=ee(m,d,l,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});s.style.top=`${a}px`,s.style.left="0",r.appendChild(s),a+=l.height;}}}return r}function fn(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 yt(e){let t=be;for(let n of e)n.content&&(t+=n.content.height);return t}function bt(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,d=(be-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${d}px`,a.style.marginTop=`${d}px`,r.appendChild(a);for(let l of e)r.appendChild(l.content?pn(l.content,t,n,o):fn(l,o));return r}function Ae(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 xt(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 gn(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 mn(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 xe=2,un=8;function hn(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,d=gn(n),l=o>=un;if(i&&i.optionsHash===d&&l){let p=i.pageStates,w=i.pageDataMap,F=a.__pageObserver,c=[];for(let k of e)c.push(xt(k));let x=i.totalPages!==o,I=Math.min(p.length,e.length);for(let k=0;k<I;k++){let S=p[k],f=c[k];if(S.fingerprint===f&&!x){let R=w.get(S.element);R&&(R.page=e[k]);continue}let h=S.element,C=w.get(h);C&&(C.page=e[k],C.rendered&&yn(h,w,o,n)),S.fingerprint=f,le(h,e[k].size.w,e[k].size.h,n),h.dataset.pageNumber=String(e[k].number);}if(e.length>p.length){let k=n.document??document;for(let S=p.length;S<e.length;S++){let f=e[S],h=k.createElement("div");h.className=n.pageClassName??G.page,h.dataset.pageNumber=String(f.number),h.dataset.pageIndex=String(S),le(h,f.size.w,f.size.h,n),t.appendChild(h),p.push({element:h,fingerprint:c[S]}),w.set(h,{page:f,index:S,rendered:false}),F&&F.observe(h);}}if(e.length<p.length){for(let k=p.length-1;k>=e.length;k--){let S=p[k].element;F&&F.unobserve(S),w.delete(S),t.removeChild(S);}p.length=e.length;}for(let k=0;k<p.length;k++){let S=w.get(p[k].element);S&&(S.index=k);}return i.totalPages=o,i.currentOptions=n,"incremental"}let s=a.__pageObserver;s&&(s.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,mn(t,r);let b=[],g=[];for(let p=0;p<e.length;p++){let w=e[p];if(g.push(xt(w)),l){let c=(n.document??document).createElement("div");c.className=n.pageClassName??G.page,c.dataset.pageNumber=String(w.number),c.dataset.pageIndex=String(p),le(c,w.size.w,w.size.h,n),t.appendChild(c),b.push(c);}else {let{context:F,pageOptions:c}=Ae(w,o,n),x=ke(w,F,c);t.appendChild(x),b.push(x);}}if(!l)return "full";let u=new Map;for(let p=0;p<e.length;p++)u.set(b[p],{page:e[p],index:p,rendered:false});let E=new IntersectionObserver(p=>{let w=a.__pageRenderState;if(!w)return;let{currentOptions:F,totalPages:c,pageDataMap:x}=w;for(let f of p){let h=f.target,C=x.get(h);if(C&&f.isIntersecting){se(h,x,c,F);for(let R=-xe;R<=xe;R++){let T=C.index+R;T>=0&&T<w.pageStates.length&&T!==C.index&&se(w.pageStates[T].element,x,c,F);}}}let I=window.innerHeight,k=I*3,S=new Set;for(let[f,h]of x){if(!h.rendered)continue;let C=f.getBoundingClientRect();C.bottom>-k&&C.top<I+k&&S.add(h.index);}for(let[f,h]of x){if(!h.rendered)continue;let C=false;for(let R of S)if(Math.abs(h.index-R)<=xe+1){C=true;break}!C&&S.size>0&&bn(f,x);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let p of b)E.observe(p);a.__pageObserver=E,a.__pageRenderState={pageStates:b.map((p,w)=>({element:p,fingerprint:g[w]})),totalPages:o,optionsHash:d,pageDataMap:u,currentOptions:n};let y=Math.min(e.length,xe+3);for(let p=0;p<y;p++)se(b[p],u,o,n);return "full"}function se(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),d=ke(r.page,a,i);for(;d.firstChild;)e.appendChild(d.firstChild);r.rendered=true;}function yn(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=Ae(r.page,n,o),l=ke(r.page,a,i).querySelector(`.${G.content}`),m=e.querySelector(`.${G.content}`);l&&m?e.replaceChild(l,m):(e.innerHTML="",r.rendered=false,se(e,t,n,o));}function bn(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}function xn(e){let n=e.__pageRenderState;if(!n)return 0;let{pageStates:o,totalPages:r,currentOptions:a,pageDataMap:i}=n,d=0;for(let{element:l}of o){let m=i.get(l);!m||m.rendered||(se(l,i,r,a),d++);}return d}var G={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function le(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"var(--doc-page-bg, #ffffff)",e.style.overflow="hidden",e.style.fontFamily=a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="var(--doc-page-text, #000000)",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function kn(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function Se(e){return e?.space!==void 0?j$1(e.space):0}function we(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=c$4(t,n,o);for(let[l,m]of Object.entries(r))e.style[l]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let l=parseFloat(e.style[i]);(!Number.isFinite(l)||l<3)&&(e.style[i]="3px");}}function Sn(e,t,n){let o=t.pageBorders;if(!o||!kn(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(b=>b&&b.style!=="none"&&b.style!=="nil"))return null;let a=o.offsetFrom??"text",i=Se(o.top),d=Se(o.right),l=Se(o.bottom),m=Se(o.left),s=n.createElement("div");return s.className="layout-page-border",s.style.position="absolute",s.style.pointerEvents="none",s.style.boxSizing="border-box",s.style.zIndex=o.zOrder==="back"?"0":"20",a==="page"?(s.style.top=`${i}px`,s.style.right=`${d}px`,s.style.bottom=`${l}px`,s.style.left=`${m}px`):(s.style.top=`${Math.max(0,e.margins.top-i)}px`,s.style.right=`${Math.max(0,e.margins.right-d)}px`,s.style.bottom=`${Math.max(0,e.margins.bottom-l)}px`,s.style.left=`${Math.max(0,e.margins.left-m)}px`),we(s,o.top,"Top",t.theme),we(s,o.bottom,"Bottom",t.theme),we(s,o.left,"Left",t.theme),we(s,o.right,"Right",t.theme),s}function wn(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 In(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`;let o=t.y-n.top;e.style.top=`${t.kind==="table"?Math.round(o):o}px`,e.style.width=`${t.width}px`,"height"in t&&t.kind!=="table"&&(e.style.height=`${t.height}px`);}function Tn(e$1,t,n,o){let r=[];for(let a of e$1.runs){if(a.kind!=="image")continue;let i=a;if(!c(i))continue;let d=i.distTop??0,l=i.distBottom??0,m=i.distLeft??12,s=i.distRight??12,{x:b,y:g$1,side:u}=g(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:u,x:b,y:g$1,distTop:d,distBottom:l,distLeft:m,distRight:s,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:e(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function ke(e,t,n={}){let o=n.document??document,r=o.createElement("div");if(r.className=n.pageClassName??G.page,r.dataset.pageNumber=String(e.number),le(r,e.size.w,e.size.h,n),n.watermark){let c=mt(n.watermark,e,o);c&&r.appendChild(c);}let a=Sn(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=G.content,wn(i,e);let d=f$1(e),l=d.contentWidth,m=[],s=[];for(let c of e.fragments)if(c.kind==="paragraph"&&n.blockLookup){let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph"){let I=x.block,k=c.y-e.margins.top,S=Tn(I,k,l,d);m.push(...S);}}for(let c of m)a$2(c)&&s.push({side:c.side,x:c.x,y:c.y,width:c.width,height:c.height,distTop:c.distTop,distBottom:c.distBottom,distLeft:c.distLeft,distRight:c.distRight,wrapText:c.wrapText,wrapType:c.wrapType});if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="table")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="table")continue;let k=x.block.floating;if(!k)continue;let S=c.x-e.margins.left,f=c.y-e.margins.top,h=k.topFromText??0,C=k.bottomFromText??0,R=k.leftFromText??12,T=k.rightFromText??12,v=S<l/2?"left":"right";s.push({side:v,x:S,y:f,width:c.width,height:c.height,distTop:h,distBottom:C,distLeft:R,distRight:T});}if(n.blockLookup)for(let c of e.fragments){if(c.kind!=="textBox")continue;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind!=="textBox")continue;let I=x.block;if(!L(I))continue;let k=c.y-e.margins.top,S=g({width:c.width,height:c.height,position:I.position,cssFloat:I.cssFloat},k,l,d);c.x=e.margins.left+S.x,c.y=e.margins.top+S.y,!(!M(I)&&!N$1(I))&&s.push({side:S.side,x:S.x,y:S.y,width:c.width,height:c.height,distTop:I.distTop??0,distBottom:I.distBottom??0,distLeft:I.distLeft??12,distRight:I.distRight??12,wrapText:I.wrapText,wrapType:I.wrapType});}let b$1=s.length>0?C(s,l):[],g$1=m.filter(b),u=m.filter(c=>!b(c));if(g$1.length>0){let c=q(g$1,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(c);}let E=c=>{if(c.kind!=="paragraph"||!n.blockLookup||!c.blockId)return;let x=n.blockLookup.get(String(c.blockId));if(x?.block.kind==="paragraph")return x.block.attrs?.borders},y,p=new Map,w=c=>!n.blockLookup||!c.blockId?[]:n.blockLookup.get(String(c.blockId))?.block.sdtGroups??[],F=(c,x)=>{if(x.length===0)return;let I=x[x.length-1];c.classList.add("layout-block-sdt"),c.dataset.sdtGroupId=I.id,c.dataset.sdtType=I.sdtType,c.dataset.sdtDepth=String(x.length),I.tag!=null&&(c.dataset.sdtTag=I.tag),I.alias!=null&&(c.dataset.sdtAlias=I.alias),I.lock!=null&&(c.dataset.sdtLock=I.lock);};for(let c=0;c<e.fragments.length;c++){let x=e.fragments[c],I,k={...t,section:"body",contentWidth:l},S=x.y-e.margins.top;if(n.blockLookup&&x.blockId){let f=n.blockLookup.get(String(x.blockId));if(x.kind==="paragraph"&&f?.block.kind==="paragraph"&&f?.measure.kind==="paragraph"){let h=f.block,C=c+1<e.fragments.length?E(e.fragments[c+1]):void 0,R=String(x.blockId),T=p.get(R);T||(T=new Set,p.set(R,T));let v=f.measure;b$1.length>0&&(v=z$1(h,l,{floatingZones:b$1,paragraphYOffset:S})),I=D(x,h,v,k,{document:o,prevBorders:y,nextBorders:C,renderedInlineImageKeys:T}),y=h.attrs?.borders;}else x.kind==="table"&&f?.block.kind==="table"&&f?.measure.kind==="table"?(I=Q(x,f.block,f.measure,k,{document:o}),y=void 0):x.kind==="image"&&f?.block.kind==="image"&&f?.measure.kind==="image"?(I=Z(x,f.block,f.measure,k,{document:o}),y=void 0):x.kind==="textBox"&&f?.block.kind==="textBox"&&f?.measure.kind==="textBox"?(I=ee(x,f.block,f.measure,k,{document:o}),y=void 0):(I=Te(x,k,{document:o}),y=void 0);}else I=Te(x,k,{document:o}),y=void 0;In(I,x,{left:e.margins.left,top:e.margins.top}),F(I,w(x)),i.appendChild(I);}if(tt(e,i,l,w,o),u.length>0){let c=q(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(c);}if(e.columns&&e.columns.separator&&e.columns.count>1){let c=e.columns.count,x=e.columns.gap,I=(l-(c-1)*x)/c,k=e.size.h-e.margins.top-e.margins.bottom;for(let S=0;S<c-1;S++){let f=(S+1)*I+S*x+x/2,h=o.createElement("div");h.style.position="absolute",h.style.left=`${f}px`,h.style.top="0",h.style.height=`${k}px`,h.style.width="0.5px",h.style.backgroundColor="#000",h.style.pointerEvents="none",i.appendChild(h);}}if(n.footnoteArea&&n.footnoteArea.length>0){let c=bt(n.footnoteArea,l,t,o);c.style.position="absolute";let x=Math.max(e.footnoteReservedHeight??0,yt(n.footnoteArea)),I=e.size.h-e.margins.bottom-e.margins.top;c.style.top=`${Math.max(-e.margins.top,I-x)}px`,c.style.left="0",c.style.right="0",i.appendChild(c);}r.appendChild(i);{let x=n.headerDistance??e.margins.header??48,I=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.top-x,48),S=n.headerContent?.visualTop??0,f=n.headerContent?.visualBottom??n.headerContent?.height??0,h=Math.max(f-S,24),C=f>k,R=o.createElement("div");R.className=G.header,R.style.position="absolute",R.style.top=`${x+S}px`,R.style.left=`${e.margins.left}px`,R.style.right=`${e.margins.right}px`,R.style.width=`${I}px`,R.style.height=`${h}px`,R.style.minHeight=`${h}px`;let T=!C;if(n.headerContent&&n.headerContent.blocks.length>0){let v={flowTop:x,flowLeft:e.margins.left,contentWidth:I,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.headerContent,{...t,section:"header",contentWidth:I},n,v);L.style.top=`${-S}px`,L.querySelector("img")&&(T=false),R.appendChild(L);}T&&(R.style.maxHeight=`${k}px`,R.style.overflow="hidden"),r.appendChild(R);}{let x=n.footerDistance??e.margins.footer??48,I=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.bottom-x,48),S=n.footerContent?.visualTop??0,f=n.footerContent?.visualBottom??n.footerContent?.height??0,h=Math.max(f-S,24),C=h>k,R=o.createElement("div");R.className=G.footer,R.style.position="absolute",R.style.top=`${e.size.h-x-h}px`,R.style.left=`${e.margins.left}px`,R.style.right=`${e.margins.right}px`,R.style.width=`${I}px`,R.style.height=`${h}px`,R.style.minHeight=`${h}px`;let T=!C;if(n.footerContent&&n.footerContent.blocks.length>0){let v={flowTop:e.size.h-x-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:I,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},L=Be(n.footerContent,{...t,section:"footer",contentWidth:I},n,v);L.style.top=`${-S}px`,L.querySelector("img")&&(T=false),R.appendChild(L);}T&&(R.style.maxHeight=`${k}px`,R.style.overflow="hidden"),r.appendChild(R);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}export{ht as A,hn as B,xn as C,G as D,le as E,ke as F,be as a,Me as b,an as c,Ro as d,ye as e,dn as f,cn as g,Co as h,He as i,Eo as j,Lo as k,Fn as l,Rn as m,U as n,Te as o,nt as p,Z as q,dt as r,he as s,D as t,q as u,_ as v,Q as w,Zt as x,ee as y,Pe as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-7E2TOWBX.mjs';import {b as b$1}from'./chunk-3NRMSZX2.mjs';import {g as g$1}from'./chunk-KNY7SXPJ.mjs';function h(c){return JSON.parse(JSON.stringify(c))}function g(c,t){let a=0;for(let r=0;r<c.content.length;r++)if(c.content[r].type==="paragraph"){if(a===t)return r;a++;}return -1}function I(c){let t="";for(let a of c.content)if(a.type==="run")for(let r of a.content)r.type==="text"&&(t+=r.text);else if(a.type==="hyperlink"){for(let r of a.children)if(r.type==="run")for(let e of r.content)e.type==="text"&&(t+=e.text);}return t}function b(c,t){return {type:"run",formatting:t,content:[{type:"text",text:c}]}}function P(c,t,a,r){let e=[],o=0,p=false;for(let n of c.content)if(n.type==="run"){let s=n.content.filter(l=>l.type==="text").map(l=>l.text).join(""),i=o,u=o+s.length;if(!p&&t>=i&&t<=u){let l=t-i;l>0&&e.push({...n,content:[{type:"text",text:s.slice(0,l)}]}),e.push(b(a,r||n.formatting)),l<s.length&&e.push({...n,content:[{type:"text",text:s.slice(l)}]}),p=true;}else e.push(n);o=u;}else e.push(n);return p||e.push(b(a,r)),e}function m(c,t,a){let r=[],e=0;for(let o of c.content)if(o.type==="run"){let p=o.content.filter(i=>i.type==="text").map(i=>i.text).join(""),n=e,s=e+p.length;if(s<=t||n>=a)r.push(o);else {let i="";n<t&&(i+=p.slice(0,t-n)),s>a&&(i+=p.slice(a-n)),i.length>0&&r.push({...o,content:[{type:"text",text:i}]});}e=s;}else r.push(o);return r}function C(c,t,a,r){let e=[],o=0;for(let p of c.content)if(p.type==="run"){let n=p.content.filter(u=>u.type==="text").map(u=>u.text).join(""),s=o,i=o+n.length;if(i<=t||s>=a)e.push(p);else if(s>=t&&i<=a)e.push({...p,formatting:{...p.formatting,...r}});else {let u=Math.max(t,s),l=Math.min(a,i);s<u&&e.push({...p,content:[{type:"text",text:n.slice(0,u-s)}]}),e.push({...p,formatting:{...p.formatting,...r},content:[{type:"text",text:n.slice(u-s,l-s)}]}),i>l&&e.push({...p,content:[{type:"text",text:n.slice(l-s)}]});}o=i;}else e.push(p);return e}function A(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e];return o.content=P(o,t.position.offset,t.text,t.formatting),a}function B(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset),n.content=P(n,e.offset,t.text,t.formatting);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length),n.content=P(n,e.offset,t.text,t.formatting);let i=[];for(let u=e.paragraphIndex+1;u<=o.paragraphIndex;u++)i.push(g(r,u));for(let u=i.length-1;u>=0;u--)i[u]!==-1&&r.content.splice(i[u],1);}return a}function E(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=m(n,e.offset,o.offset);}else {let p=g(r,e.paragraphIndex),n=r.content[p],s=I(n);n.content=m(n,e.offset,s.length);let i=g(r,o.paragraphIndex),u=r.content[i];u.content=m(u,0,o.offset),n.content.push(...u.content);let l=[];for(let f=e.paragraphIndex+1;f<=o.paragraphIndex;f++)l.push(g(r,f));for(let f=l.length-1;f>=0;f--)l[f]!==-1&&r.content.splice(l[f],1);}return a}function F(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex===o.paragraphIndex){let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p];n.content=C(n,e.offset,o.offset,t.formatting);}else for(let p=e.paragraphIndex;p<=o.paragraphIndex;p++){let n=g(r,p);if(n===-1)continue;let s=r.content[n],i=I(s),u=0,l=i.length;p===e.paragraphIndex&&(u=e.offset),p===o.paragraphIndex&&(l=o.offset),s.content=C(s,u,l,t.formatting);}return a}function S(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];if(o.formatting={...o.formatting,...t.formatting},"numPr"in t.formatting){let p=t.formatting.numPr;if(p&&p.numId!==void 0&&p.numId!==0){let n=p.ilvl??0,s=p.numId===1,i=s?"\u2022":"1.";if(a.package.numbering){let u=a.package.numbering.nums.find(l=>l.numId===p.numId);if(u){let l=a.package.numbering.abstractNums.find(f=>f.abstractNumId===u.abstractNumId);if(l){let f=l.levels.find(x=>x.ilvl===n);f&&(i=f.lvlText||i);}}}o.listRendering={level:n,numId:p.numId,marker:i,isBullet:s};}else delete o.listRendering;}return a}function H(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e];return o.formatting={...o.formatting,styleId:t.styleId},a}function $(c,t){let a$1=h(c),r=a$1.package.document,e=a(9360,t.columns),o=[];for(let s=0;s<t.rows;s++){let i=[];for(let u=0;u<t.columns;u++){let l=t.data?.[s]?.[u]||"";i.push({type:"tableCell",formatting:e[u]?{width:{value:e[u],type:"dxa"}}:void 0,content:[{type:"paragraph",content:l?[b(l)]:[]}]});}o.push({type:"tableRow",formatting:s===0&&t.hasHeader?{header:true}:void 0,cells:i});}let p={type:"table",formatting:{width:{value:9360,type:"dxa"},layout:"fixed"},columnWidths:e,rows:o},n=g(r,t.position.paragraphIndex);return n===-1?r.content.push(p):r.content.splice(n+1,0,p),a$1}function j(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],n={type:"run",content:[{type:"drawing",image:{type:"image",rId:`rId_img_${Date.now()}`,src:t.src,alt:t.alt,size:{width:g$1(t.width||100),height:g$1(t.height||100)},wrap:{type:"inline"}}}]},s=P(o,t.position.offset,"",void 0),i=false,u=0;for(let l=0;l<s.length;l++){let f=s[l];if(f.type==="run"){let x=f.content.filter(d=>d.type==="text").map(d=>d.text).join("");if(u+=x.length,!i&&u>=t.position.offset){s.splice(l+1,0,n),i=true;break}}}return i||s.push(n),o.content=s,a}function M(c,t){let a=h(c),r=a.package.document,{start:e,end:o}=t.range;if(e.paragraphIndex!==o.paragraphIndex)throw new Error("Hyperlinks cannot span multiple paragraphs");let p=g(r,e.paragraphIndex);if(p===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let n=r.content[p],s=I(n),i=t.displayText||s.slice(e.offset,o.offset);n.content=m(n,e.offset,o.offset);let u={type:"hyperlink",href:t.url,tooltip:t.tooltip,children:[b(i)]},l=false,f=0,x=[];for(let d of n.content)if(d.type==="run"){let T=d.content.filter(y=>y.type==="text").map(y=>y.text).join(""),w=f+T.length;if(!l&&f<=e.offset&&e.offset<=w){let y=e.offset-f;y>0&&x.push({...d,content:[{type:"text",text:T.slice(0,y)}]}),x.push(u),y<T.length&&x.push({...d,content:[{type:"text",text:T.slice(y)}]}),l=true;}else x.push(d);f=w;}else x.push(d);return l||x.push(u),n.content=x,a}function N(c,t){let a=h(c),r=a.package.document,{start:e}=t.range,o=g(r,e.paragraphIndex);if(o===-1)throw new Error(`Paragraph index ${e.paragraphIndex} not found`);let p=r.content[o],n=[];for(let s of p.content)if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&n.push(i);else n.push(s);return p.content=n,a}function k(c,t){let a=h(c),r=a.package.document,e=g(r,t.position.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.position.paragraphIndex} not found`);let o=r.content[e],p=I(o),n=m({...o,content:[...o.content]},t.position.offset,p.length),s=m({...o,content:[...o.content]},0,t.position.offset);o.content=n;let i={type:"paragraph",formatting:o.formatting,content:s};return r.content.splice(e+1,0,i),a}function _(c,t){let a=h(c),r=a.package.document,e=g(r,t.paragraphIndex);if(e===-1)throw new Error(`Paragraph index ${t.paragraphIndex} not found`);let o=r.content[e],p=[];for(let n=1;n<=t.count;n++){let s=g(r,t.paragraphIndex+n);if(s!==-1){let i=r.content[s];o.content.push(...i.content),p.push(s);}}for(let n=p.length-1;n>=0;n--)r.content.splice(p[n],1);return a}function O(c,t){return k(c,{position:t.position})}function W(c,t){let a=h(c);return a.templateVariables||(a.templateVariables=[]),a.templateVariables.includes(t.name)||a.templateVariables.push(t.name),a}function J(c,t){let a=h(c),r=a.package.document;function e(n){for(let s of n.content)if(s.type==="text")for(let[i,u]of Object.entries(t.values)){let l=new RegExp(`\\{${i}\\}`,"g");s.text=s.text.replace(l,u);}}function o(n){for(let s of n.content)if(s.type==="run")e(s);else if(s.type==="hyperlink")for(let i of s.children)i.type==="run"&&e(i);}function p(n){if(n.type==="paragraph")o(n);else if(n.type==="table")for(let s of n.rows)for(let i of s.cells)for(let u of i.content)p(u);}for(let n of r.content)p(n);return a}function L(c,t){let a=b$1.getCommandHandler(t.type);if(a)return a(c,t);switch(t.type){case "insertText":return A(c,t);case "replaceText":return B(c,t);case "deleteText":return E(c,t);case "formatText":return F(c,t);case "formatParagraph":return S(c,t);case "applyStyle":return H(c,t);case "insertTable":return $(c,t);case "insertImage":return j(c,t);case "insertHyperlink":return M(c,t);case "removeHyperlink":return N(c,t);case "insertParagraphBreak":return k(c,t);case "mergeParagraphs":return _(c,t);case "splitParagraph":return O(c,t);case "setVariable":return W(c,t);case "applyVariables":return J(c,t);default:{let r=t;throw new Error(`Unknown command type: ${r.type}`)}}}function ct(c,t){return t.reduce((a,r)=>L(a,r),c)}export{L as a,ct as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {r,q}from'./chunk-NJBEJTIO.mjs';var t=new r(q());t.buildSchema();t.initializeRuntime();var s=t,n=t.getSchema();export{s as a,n as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use strict';var chunkLW5OFHSW_js=require('./chunk-LW5OFHSW.js'),chunkZ3LGMBJC_js=require('./chunk-Z3LGMBJC.js'),chunkB3SVS2AF_js=require('./chunk-B3SVS2AF.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js'),chunk3R7QHNI5_js=require('./chunk-3R7QHNI5.js');var De={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},ee={majorFont:{latin:"Calibri Light",ea:"",cs:"",fonts:{}},minorFont:{latin:"Calibri",ea:"",cs:"",fonts:{}}},ye={name:"Office Theme",colorScheme:De,fontScheme:ee},bt=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"];function Tt(e){if(!e)return null;switch(chunk3R7QHNI5_js.d(e.name||"")){case "srgbClr":return chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val")??null;case "sysClr":{let n=chunk3R7QHNI5_js.j(e,"a","lastClr")??chunk3R7QHNI5_js.j(e,null,"lastClr");if(n)return n;switch(chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val")){case "windowText":case "menuText":case "captionText":case "btnText":return "000000";case "window":case "menu":case "btnFace":case "btnHighlight":return "FFFFFF";case "highlight":return "0078D7";case "highlightText":return "FFFFFF";case "grayText":return "808080";default:return null}}case "schemeClr":{chunk3R7QHNI5_js.j(e,"a","val")??chunk3R7QHNI5_js.j(e,null,"val");return null}default:return null}}function xt(e){let t={...De};if(!e)return t;for(let n of bt){let o=chunk3R7QHNI5_js.e(e,"a",n);if(o){let r=chunk3R7QHNI5_js.i(o);if(r.length>0){let a=Tt(r[0]);a&&(t[n]=a);}}}return t}function Le(e){let t={latin:"",ea:"",cs:"",fonts:{}};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","latin");n&&(t.latin=chunk3R7QHNI5_js.j(n,"a","typeface")??chunk3R7QHNI5_js.j(n,null,"typeface")??"");let o=chunk3R7QHNI5_js.e(e,"a","ea");o&&(t.ea=chunk3R7QHNI5_js.j(o,"a","typeface")??chunk3R7QHNI5_js.j(o,null,"typeface")??"");let r=chunk3R7QHNI5_js.e(e,"a","cs");r&&(t.cs=chunk3R7QHNI5_js.j(r,"a","typeface")??chunk3R7QHNI5_js.j(r,null,"typeface")??"");let a=chunk3R7QHNI5_js.f(e,"a","font");for(let u of a){let l=chunk3R7QHNI5_js.j(u,"a","script")??chunk3R7QHNI5_js.j(u,null,"script"),f=chunk3R7QHNI5_js.j(u,"a","typeface")??chunk3R7QHNI5_js.j(u,null,"typeface");l&&f&&(t.fonts=t.fonts||{},t.fonts[l]=f);}return t}function Ft(e){let t={...ee};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"a","majorFont");n&&(t.majorFont=Le(n));let o=chunk3R7QHNI5_js.e(e,"a","minorFont");return o&&(t.minorFont=Le(o)),t}function Hn(e){if(!e)return {...ye};try{let t=chunk3R7QHNI5_js.c(e);if(!t)return {...ye};let n=chunk3R7QHNI5_js.j(t,"a","name")??chunk3R7QHNI5_js.j(t,null,"name")??"Office Theme",o=chunk3R7QHNI5_js.e(t,"a","themeElements"),r=chunk3R7QHNI5_js.e(o,"a","clrScheme"),a=xt(r),u=chunk3R7QHNI5_js.e(o,"a","fontScheme"),l=Ft(u);return {name:n,colorScheme:a,fontScheme:l}}catch(t){return console.warn("Failed to parse theme:",t),{...ye}}}function Ct(e,t="latin"){if(!e?.fontScheme?.majorFont)return ee.majorFont?.latin??"Calibri Light";let n=e.fontScheme.majorFont;return t==="latin"?n.latin||"Calibri Light":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri Light"}function Xe(e,t="latin"){if(!e?.fontScheme?.minorFont)return ee.minorFont?.latin??"Calibri";let n=e.fontScheme.minorFont;return t==="latin"?n.latin||"Calibri":t==="ea"?n.ea||"":t==="cs"?n.cs||"":n.fonts?.[t]?n.fonts[t]:n.latin||"Calibri"}function Y(e,t){if(!t)return "Calibri";let n=t.toLowerCase().includes("major"),o=t.toLowerCase().includes("minor"),r="latin",a=t.toLowerCase();return a.includes("eastasia")?r="ea":(a.includes("bidi")||a.includes("cs"))&&(r="cs"),n?Ct(e,r):o?Xe(e,r):Xe(e,"latin")}function Oe(e){if(!e)return;let t=chunk3R7QHNI5_js.l(e,"w","w")??0,n=chunk3R7QHNI5_js.j(e,"w","type")??"dxa",o="dxa";return (n==="auto"||n==="dxa"||n==="nil"||n==="pct")&&(o=n),{value:t,type:o}}function D(e){return Oe(e)}function j(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(e,"w","date")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0}}function te(e){return j(e)}function V(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade");(u||l||f||c)&&(o.color={rgb:u??void 0,themeColor:l,themeTint:f??void 0,themeShade:c??void 0});let d=chunk3R7QHNI5_js.j(e,"w","shadow");(d==="1"||d==="true")&&(o.shadow=true);let p=chunk3R7QHNI5_js.j(e,"w","frame");return (p==="1"||p==="true")&&(o.frame=true),o}function ne(e){if(!e)return;let t={},n=V(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=V(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=V(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=V(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));a&&(t.right=a);let u=V(chunk3R7QHNI5_js.e(e,"w","insideH"));u&&(t.insideH=u);let l=V(chunk3R7QHNI5_js.e(e,"w","insideV"));if(l&&(t.insideV=l),Object.keys(t).length!==0)return t}function oe(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","top"));n&&(t.top=n);let o=D(chunk3R7QHNI5_js.e(e,"w","bottom"));o&&(t.bottom=o);let r=D(chunk3R7QHNI5_js.e(e,"w","left")??chunk3R7QHNI5_js.e(e,"w","start"));r&&(t.left=r);let a=D(chunk3R7QHNI5_js.e(e,"w","right")??chunk3R7QHNI5_js.e(e,"w","end"));if(a&&(t.right=a),Object.keys(t).length!==0)return t}function re(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","fill");n&&n!=="auto"&&(t.fill={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","themeFill");if(o){t.fill={themeColor:o};let u=chunk3R7QHNI5_js.j(e,"w","themeFillTint");u&&t.fill&&(t.fill.themeTint=u);let l=chunk3R7QHNI5_js.j(e,"w","themeFillShade");l&&t.fill&&(t.fill.themeShade=l);}let r=chunk3R7QHNI5_js.j(e,"w","color");r&&r!=="auto"&&(t.color={rgb:r});let a=chunk3R7QHNI5_js.j(e,"w","val");if(a&&(t.pattern=a),Object.keys(t).length!==0)return t}function be(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","noHBand");(u==="1"||u==="true")&&(t.noHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","noVBand");(l==="1"||l==="true")&&(t.noVBand=true);let f=chunk3R7QHNI5_js.j(e,"w","val");if(f){let c=parseInt(f,16);isNaN(c)||(c&32&&(t.firstRow=true),c&64&&(t.lastRow=true),c&128&&(t.firstColumn=true),c&256&&(t.lastColumn=true),c&512&&(t.noHBand=true),c&1024&&(t.noVBand=true));}if(Object.keys(t).length!==0)return t}function Te(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","horzAnchor");(n==="margin"||n==="page"||n==="text")&&(t.horzAnchor=n);let o=chunk3R7QHNI5_js.j(e,"w","vertAnchor");(o==="margin"||o==="page"||o==="text")&&(t.vertAnchor=o);let r=chunk3R7QHNI5_js.l(e,"w","tblpX");r!==void 0&&(t.tblpX=r);let a=chunk3R7QHNI5_js.j(e,"w","tblpXSpec");a&&(t.tblpXSpec=a);let u=chunk3R7QHNI5_js.l(e,"w","tblpY");u!==void 0&&(t.tblpY=u);let l=chunk3R7QHNI5_js.j(e,"w","tblpYSpec");l&&(t.tblpYSpec=l);let f=chunk3R7QHNI5_js.l(e,"w","topFromText");f!==void 0&&(t.topFromText=f);let c=chunk3R7QHNI5_js.l(e,"w","bottomFromText");c!==void 0&&(t.bottomFromText=c);let d=chunk3R7QHNI5_js.l(e,"w","leftFromText");d!==void 0&&(t.leftFromText=d);let p=chunk3R7QHNI5_js.l(e,"w","rightFromText");if(p!==void 0&&(t.rightFromText=p),Object.keys(t).length!==0)return t}function kt(e){return e.columnWidths&&e.columnWidths.length>0?e.columnWidths.length:e.rows.length===0?0:e.rows[0].cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function St(e){return e.rows.length}function Mt(e){return e.formatting?.vMerge==="continue"}function Rt(e){return e.formatting?.vMerge==="restart"}function Et(e){return e.rows.length===0?false:e.rows[0].formatting?.header===true}var Pt={richText:"richText",text:"plainText",date:"date",dropDownList:"dropDownList",comboBox:"comboBox",picture:"picture",docPartObj:"buildingBlockGallery",docPartList:"buildingBlockGallery",group:"group",equation:"equation",citation:"citation",bibliography:"bibliography",checkbox:"checkbox"};function Bt(e){if(!e||!e.elements)return "richText";for(let t of e.elements){if(t.type!=="element"||!t.name)continue;let n=chunk3R7QHNI5_js.d(t.name),o=Pt[n];if(o)return o}return "richText"}function vt(e){let t=[];for(let n of e.elements??[])n.type==="element"&&chunk3R7QHNI5_js.d(n.name||"")==="listItem"&&t.push({displayText:chunk3R7QHNI5_js.j(n,"w","displayText")||"",value:chunk3R7QHNI5_js.j(n,"w","value")||""});return t}function ie(e,t){let n={sdtType:Bt(e)};if(e){n.rawPropertiesXml=chunk3R7QHNI5_js.b(e);for(let o of e.elements??[]){if(o.type!=="element"||!o.name)continue;switch(chunk3R7QHNI5_js.d(o.name)){case "id":{let a=chunk3R7QHNI5_js.j(o,"w","val");if(a!=null){let u=parseInt(a,10);Number.isNaN(u)||(n.id=u);}break}case "alias":n.alias=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "tag":n.tag=chunk3R7QHNI5_js.j(o,"w","val")??void 0;break;case "lock":n.lock=chunk3R7QHNI5_js.j(o,"w","val")??"unlocked";break;case "placeholder":{let a=chunk3R7QHNI5_js.e(o,"w","docPart");a&&(n.placeholder=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "showingPlcHdr":{let a=chunk3R7QHNI5_js.j(o,"w","val");n.showingPlaceholder=a==null||!/^(0|false|off)$/i.test(a);break}case "date":{let a=chunk3R7QHNI5_js.e(o,"w","dateFormat");a&&(n.dateFormat=chunk3R7QHNI5_js.j(a,"w","val")??void 0);break}case "dropDownList":case "comboBox":n.listItems=vt(o);break;case "checkbox":{let a=chunk3R7QHNI5_js.e(o,"w14","checked")??chunk3R7QHNI5_js.e(o,"w","checked");n.checked=a?chunk3R7QHNI5_js.j(a,"w14","val")==="1"||chunk3R7QHNI5_js.j(a,"w","val")==="1":false;break}case "dataBinding":{let a={},u=chunk3R7QHNI5_js.j(o,"w","xpath"),l=chunk3R7QHNI5_js.j(o,"w","storeItemID"),f=chunk3R7QHNI5_js.j(o,"w","prefixMappings");u!=null&&(a.xpath=u),l!=null&&(a.storeItemID=l),f!=null&&(a.prefixMappings=f),n.dataBinding=a;break}}}}return t&&(n.rawEndPropertiesXml=chunk3R7QHNI5_js.b(t)),n}var We={183:"\u2022",111:"\u25CB",167:"\u25A0",252:"\u2713",110:"\u25A0",113:"\u25CB",117:"\u25C6",118:"\u2756",168:"\u2713",251:"\u2713",254:"\u2713",61623:"\u2022",61550:"\u25A0",61551:"\u25CB",61607:"\u25A0",61692:"\u2713",8226:"\u2022",9679:"\u25CF",9675:"\u25CB",9632:"\u25A0",9633:"\u25A1",9670:"\u25C6",9671:"\u25C7",8211:"\u2013",8212:"\u2014",62:">",45:"-"};function Nt(e){if(!e||e.trim()==="")return "\u2022";let t=e.charCodeAt(0);return We[t]?We[t]:t>=57344&&t<=63743||t<32||t>=127&&t<160?"\u2022":e}function At(e){let t=e.listRendering;t&&t.isBullet&&(t.marker=Nt(t.marker||""));}function It(e,t,n,o,r,a,u){if(e.content.length===0)return;let l=chunk3R7QHNI5_js.i(t),f=0;function c(d){if(!chunkLW5OFHSW_js.h(d))return;let p=chunkLW5OFHSW_js.j(d);if(!p)return;let w=chunk3R7QHNI5_js.n(d,"wps","wsp");if(w){let h=chunkLW5OFHSW_js.k(w);h&&(p.content=chunkLW5OFHSW_js.g(h,Z,null,n,o,r,a??void 0,u??void 0));}let T={type:"shape",shapeType:"rect",size:p.size,position:p.position,wrap:p.wrap,fill:p.fill,outline:p.outline,textBody:{content:p.content,margins:p.margins}};p.id&&(T.id=p.id);let y={type:"shape",shape:T},x=f;if(x>=e.content.length){x=-1;for(let h=e.content.length-1;h>=0;h--)if(e.content[h].type==="run"){x=h;break}}if(x>=0){let h=e.content[x];h.type==="run"&&h.content.push(y);}}for(let d of l){if(chunk3R7QHNI5_js.d(d.name??"")!=="r")continue;let p=chunk3R7QHNI5_js.i(d);for(let w of p){let T=chunk3R7QHNI5_js.d(w.name??"");if(T==="drawing")c(w);else if(T==="AlternateContent"){let y=chunk3R7QHNI5_js.i(w),h=y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Choice")??y.find(P=>chunk3R7QHNI5_js.d(P.name??"")==="Fallback");if(h)for(let P of chunk3R7QHNI5_js.i(h))chunk3R7QHNI5_js.d(P.name??"")==="drawing"&&c(P);}}f++;}}function q(e,t,n,o,r,a,u){let l=[],f=chunk3R7QHNI5_js.i(e);for(let c of f){let d=c.name??"";if(d==="w:p"||d.endsWith(":p")){let p=Z(c,t,n,o,r,a,u);It(p,c,t,n,o,r,a),At(p),l.push(p);}else if(d==="w:tbl"||d.endsWith(":tbl")){let p=xe(c,t,n,o,r,a,u);l.push(p);}else (d==="w:sdt"||d.endsWith(":sdt"))&&l.push(Ht(c,t,n,o,r,a,u));}return l}function Ht(e,t,n,o,r,a,u){let l=chunk3R7QHNI5_js.e(e,"w","sdtPr"),f=chunk3R7QHNI5_js.e(e,"w","sdtEndPr"),c=chunk3R7QHNI5_js.e(e,"w","sdtContent"),d=ie(l,f),p=c?q(c,t,n,o,r,a,u):[];return {type:"blockSdt",properties:d,content:p}}function ae(e){let t={};if(!e)return t;for(let n of e.split(";")){let o=n.indexOf(":");if(o<0)continue;let r=n.slice(0,o).trim().toLowerCase(),a=n.slice(o+1).trim();r&&(t[r]=a);}return t}function Lt(e){if(!e)return "#C0C0C0";let t=e.trim();return t.startsWith("#")?t:/^[0-9a-fA-F]{6}$/.test(t)?`#${t}`:t}function Ve(e){if(!e)return;let t=e.match(/^(-?[0-9.]+)(pt|px|in|cm|mm)?$/);if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "px":return n;default:return n*96/72}}var je=914400/96;function Xt(e,t,n){if(!e||!t)return {};let o=t.get(e);if(!o?.target)return {};let r=o.target,a=r.split("/").pop()??r,u=[r,r.replace(/^\/+/,""),`word/${r.replace(/^\/+/,"")}`,`word/media/${a}`,`media/${a}`];if(n)for(let l of u){let f=l.toLowerCase();for(let[c,d]of n.entries())if(c.toLowerCase()===f)return {dataUrl:d.dataUrl??d.base64,mediaPath:d.path,contentType:d.mimeType}}return {}}function Fe(e,t){if(t.includes("watermark")||(chunk3R7QHNI5_js.j(e,null,"type")??"").includes("_t136"))return true;let o=chunk3R7QHNI5_js.i(e).find(r=>r.name==="v:imagedata"||r.name?.endsWith(":imagedata"));return !!(o&&(chunk3R7QHNI5_js.j(o,null,"gain")||chunk3R7QHNI5_js.j(o,"o","gain")||chunk3R7QHNI5_js.j(o,null,"blacklevel")))}function Ue(e,t=null,n=null){if(!e)return;let o=chunk3R7QHNI5_js.o(e,"v","shape");for(let r of o){let a=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase(),u=chunk3R7QHNI5_js.i(r),l=u.find(w=>w.name==="v:textpath"||w.name?.endsWith(":textpath")),f=u.find(w=>w.name==="v:imagedata"||w.name?.endsWith(":imagedata"));if(!Fe(r,a)&&!l)continue;let c=ae(chunk3R7QHNI5_js.j(r,null,"style")),d=parseFloat(c.rotation??"0")||0,p=Math.abs(d)>5;if(l){let w=chunk3R7QHNI5_js.j(l,null,"string")??"",x=(ae(chunk3R7QHNI5_js.j(l,null,"style"))["font-family"]??"Calibri").replace(/["']/g,"").replace(/^"|"$/g,"").trim()||"Calibri",h=u.find(M=>M.name==="v:fill"||M.name?.endsWith(":fill")),P=h?chunk3R7QHNI5_js.j(h,null,"opacity"):null,C=P!=null&&parseFloat(P)<1;return {kind:"text",text:w,font:x,color:Lt(chunk3R7QHNI5_js.j(r,null,"fillcolor")),semitransparent:C,layout:p?"diagonal":"horizontal",fontSize:void 0}}if(f){let w=chunk3R7QHNI5_js.j(f,"r","id")??chunk3R7QHNI5_js.j(f,"r","embed")??chunk3R7QHNI5_js.j(f,null,"id")??"",{dataUrl:T,mediaPath:y,contentType:x}=Xt(w,t,n),h=chunk3R7QHNI5_js.j(f,null,"gain"),P=chunk3R7QHNI5_js.j(f,null,"blacklevel"),C=h!=null||P!=null,M=Ve(c.width),m=Ve(c.height);return {kind:"picture",relId:w||void 0,mediaPath:y,contentType:x,dataUrl:T,scale:1,washout:C,widthEmu:M!=null?Math.round(M*je):void 0,heightEmu:m!=null?Math.round(m*je):void 0}}}}function ze(e){switch(e){case "first":return "first";case "even":return "even";default:return "default"}}function _e(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:ze(t),rId:n}}function Ge(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"r","id")??"";return {type:ze(t),rId:n}}function Jn(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"header",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:hdr"||p.name?.endsWith(":hdr")));if(!c)return l;l.content=q(c,n,o,r,a,u,{inHeaderFooter:true});let d=Ue(c,a,u);return d&&(l.watermark=d),l}function eo(e,t="default",n=null,o=null,r=null,a=null,u=null){let l={type:"footer",hdrFtrType:t,content:[]};if(!e)return l;let f=chunk3R7QHNI5_js.a(e);if(!f)return l;let c=f.elements?.find(d=>d.type==="element"&&(d.name==="w:ftr"||d.name?.endsWith(":ftr")));return c&&(l.content=q(c,n,o,r,a,u,{inHeaderFooter:true})),l}function qe(e){switch(e){case "separator":return "separator";case "continuationSeparator":return "continuationSeparator";case "continuationNotice":return "continuationNotice";default:return "normal"}}function $e(e,t,n,o,r,a){let u=q(e,t,n,o,r,a),l=false;for(let f of chunk3R7QHNI5_js.i(e)){let c=f.name??"";if(c==="w:bookmarkStart"||c.endsWith(":bookmarkStart")||c==="w:bookmarkEnd"||c.endsWith(":bookmarkEnd")||c==="w:customXml"||c.endsWith(":customXml")){l=true;break}}return {blocks:u,hasUnmodeled:l}}function Dt(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=qe(l),{blocks:c,hasUnmodeled:d}=$e(e,t,n,o,r,a);return {type:"footnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function ro(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return le(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return le(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:footnotes"||p.name?.endsWith(":footnotes")));if(!c)return le(u,l);let d=chunk3R7QHNI5_js.f(c,"w","footnote");for(let p of d){let w=Dt(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return le(u,l)}function le(e,t){return {byId:e,footnotes:t,getFootnote(n){return e.get(n)},hasFootnote(n){return e.has(n)},getNormalFootnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function Ot(e,t,n,o,r,a){let u=chunk3R7QHNI5_js.l(e,"w","id")??0,l=chunk3R7QHNI5_js.j(e,"w","type"),f=qe(l),{blocks:c,hasUnmodeled:d}=$e(e,t,n,o,r,a);return {type:"endnote",id:u,noteType:f,content:c,...d?{verbatimXml:chunk3R7QHNI5_js.b(e)}:{}}}function io(e,t=null,n=null,o=null,r=null,a=null){let u=new Map,l=[];if(!e)return se(u,l);let f=chunk3R7QHNI5_js.a(e);if(!f)return se(u,l);let c=f.elements?.find(p=>p.type==="element"&&(p.name==="w:endnotes"||p.name?.endsWith(":endnotes")));if(!c)return se(u,l);let d=chunk3R7QHNI5_js.f(c,"w","endnote");for(let p of d){let w=Ot(p,t,n,o,r,a);u.set(w.id,w),l.push(w);}return se(u,l)}function se(e,t){return {byId:e,endnotes:t,getEndnote(n){return e.get(n)},hasEndnote(n){return e.has(n)},getNormalEndnotes(){return t.filter(n=>n.noteType==="normal")},getSeparator(){return t.find(n=>n.noteType==="separator")},getContinuationSeparator(){return t.find(n=>n.noteType==="continuationSeparator")}}}function Ye(e){return e?{decimal:"decimal",upperRoman:"upperRoman",lowerRoman:"lowerRoman",upperLetter:"upperLetter",lowerLetter:"lowerLetter",ordinal:"ordinal",cardinalText:"cardinalText",ordinalText:"ordinalText",bullet:"bullet",chicago:"chicago",none:"none"}[e]:void 0}function Wt(e){switch(e){case "pageBottom":return "pageBottom";case "beneathText":return "beneathText";case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Vt(e){switch(e){case "sectEnd":return "sectEnd";case "docEnd":return "docEnd";default:return}}function Ze(e){switch(e){case "continuous":return "continuous";case "eachSect":return "eachSect";case "eachPage":return "eachPage";default:return}}function Ke(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Wt(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=Ye(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ze(u);}return t}function Qe(e){let t={};if(!e)return t;let n=chunk3R7QHNI5_js.e(e,"w","pos");if(n){let u=chunk3R7QHNI5_js.j(n,"w","val");t.position=Vt(u);}let o=chunk3R7QHNI5_js.e(e,"w","numFmt");if(o){let u=chunk3R7QHNI5_js.j(o,"w","val");t.numFmt=Ye(u);}let r=chunk3R7QHNI5_js.e(e,"w","numStart");r&&(t.numStart=chunk3R7QHNI5_js.l(r,"w","val")??void 0);let a=chunk3R7QHNI5_js.e(e,"w","numRestart");if(a){let u=chunk3R7QHNI5_js.j(a,"w","val");t.numRestart=Ze(u);}return t}function ao(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
2
|
+
`)}function lo(e){let t=[];for(let n of e.content){if(n.type!=="paragraph")continue;let o=[];for(let r of n.content)if(r.type==="run")for(let a of r.content)a.type==="text"&&o.push(a.text);t.push(o.join(""));}return t.join(`
|
|
3
|
+
`)}function so(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function uo(e){return e.noteType==="separator"||e.noteType==="continuationSeparator"||e.noteType==="continuationNotice"}function jt(e,t,n,o){if(!e&&!t)return;let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),Object.keys(r).length>0?r:void 0}function ue(e){if(!e)return;let o={style:chunk3R7QHNI5_js.j(e,"w","val")??"none"},r=chunk3R7QHNI5_js.l(e,"w","sz");r!==void 0&&(o.size=r);let a=chunk3R7QHNI5_js.l(e,"w","space");a!==void 0&&(o.space=a);let u=chunk3R7QHNI5_js.j(e,"w","color"),l=chunk3R7QHNI5_js.j(e,"w","themeColor"),f=chunk3R7QHNI5_js.j(e,"w","themeTint"),c=chunk3R7QHNI5_js.j(e,"w","themeShade"),d=jt(u,l,f,c);d&&(o.color=d);let p=chunk3R7QHNI5_js.j(e,"w","shadow");(p==="1"||p==="true")&&(o.shadow=true);let w=chunk3R7QHNI5_js.j(e,"w","frame");return (w==="1"||w==="true")&&(o.frame=true),o}function Ut(e){switch(e){case "landscape":return "landscape";case "portrait":return "portrait";default:return}}function zt(e){switch(e){case "continuous":return "continuous";case "nextPage":return "nextPage";case "oddPage":return "oddPage";case "evenPage":return "evenPage";case "nextColumn":return "nextColumn";default:return}}function _t(e){switch(e){case "top":return "top";case "center":return "center";case "both":return "both";case "bottom":return "bottom";default:return}}function Gt(e){switch(e){case "continuous":return "continuous";case "newPage":return "newPage";case "newSection":return "newSection";default:return}}function et(e,t){let n={};if(!e)return n;let o=chunk3R7QHNI5_js.e(e,"w","pgSz");if(o){let m=chunk3R7QHNI5_js.l(o,"w","w");m!==void 0&&(n.pageWidth=m);let F=chunk3R7QHNI5_js.l(o,"w","h");F!==void 0&&(n.pageHeight=F);let E=chunk3R7QHNI5_js.j(o,"w","orient"),b=Ut(E);b&&(n.orientation=b);}let r=chunk3R7QHNI5_js.e(e,"w","pgMar");if(r){let m=chunk3R7QHNI5_js.l(r,"w","top");m!==void 0&&(n.marginTop=m);let F=chunk3R7QHNI5_js.l(r,"w","bottom");F!==void 0&&(n.marginBottom=F);let E=chunk3R7QHNI5_js.l(r,"w","left");E!==void 0&&(n.marginLeft=E);let b=chunk3R7QHNI5_js.l(r,"w","right");b!==void 0&&(n.marginRight=b);let k=chunk3R7QHNI5_js.l(r,"w","header");k!==void 0&&(n.headerDistance=k);let B=chunk3R7QHNI5_js.l(r,"w","footer");B!==void 0&&(n.footerDistance=B);let N=chunk3R7QHNI5_js.l(r,"w","gutter");N!==void 0&&(n.gutter=N);}let a=chunk3R7QHNI5_js.e(e,"w","cols");if(a){let m=chunk3R7QHNI5_js.l(a,"w","num");m!==void 0&&(n.columnCount=m);let F=chunk3R7QHNI5_js.l(a,"w","space");F!==void 0&&(n.columnSpace=F);let E=chunk3R7QHNI5_js.j(a,"w","equalWidth");E==="1"||E==="true"?n.equalWidth=true:(E==="0"||E==="false")&&(n.equalWidth=false);let b=chunk3R7QHNI5_js.j(a,"w","sep");(b==="1"||b==="true")&&(n.separator=true);let k=chunk3R7QHNI5_js.f(a,"w","col");if(k.length>0){n.columns=[];for(let B of k){let N={},H=chunk3R7QHNI5_js.l(B,"w","w");H!==void 0&&(N.width=H);let I=chunk3R7QHNI5_js.l(B,"w","space");I!==void 0&&(N.space=I),n.columns.push(N);}n.columnCount===void 0&&(n.columnCount=k.length);}}let u=chunk3R7QHNI5_js.e(e,"w","type");if(u){let m=chunk3R7QHNI5_js.j(u,"w","val"),F=zt(m);F&&(n.sectionStart=F);}let l=chunk3R7QHNI5_js.e(e,"w","vAlign");if(l){let m=chunk3R7QHNI5_js.j(l,"w","val"),F=_t(m);F&&(n.verticalAlign=F);}let f=chunk3R7QHNI5_js.e(e,"w","bidi");f&&(n.bidi=chunk3R7QHNI5_js.m(f));let c=chunk3R7QHNI5_js.f(e,"w","headerReference");c.length>0&&(n.headerReferences=c.map(m=>_e(m)));let d=chunk3R7QHNI5_js.f(e,"w","footerReference");d.length>0&&(n.footerReferences=d.map(m=>Ge(m)));let p=chunk3R7QHNI5_js.e(e,"w","titlePg");p&&(n.titlePg=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","evenAndOddHeaders");w&&(n.evenAndOddHeaders=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","lnNumType");if(T){n.lineNumbers={};let m=chunk3R7QHNI5_js.l(T,"w","start");m!==void 0&&(n.lineNumbers.start=m);let F=chunk3R7QHNI5_js.l(T,"w","countBy");F!==void 0&&(n.lineNumbers.countBy=F);let E=chunk3R7QHNI5_js.l(T,"w","distance");E!==void 0&&(n.lineNumbers.distance=E);let b=chunk3R7QHNI5_js.j(T,"w","restart"),k=Gt(b);k&&(n.lineNumbers.restart=k);}let y=chunk3R7QHNI5_js.e(e,"w","pgBorders");if(y){n.pageBorders={};let m=ue(chunk3R7QHNI5_js.e(y,"w","top"));m&&(n.pageBorders.top=m);let F=ue(chunk3R7QHNI5_js.e(y,"w","bottom"));F&&(n.pageBorders.bottom=F);let E=ue(chunk3R7QHNI5_js.e(y,"w","left"));E&&(n.pageBorders.left=E);let b=ue(chunk3R7QHNI5_js.e(y,"w","right"));b&&(n.pageBorders.right=b);let k=chunk3R7QHNI5_js.j(y,"w","display");(k==="allPages"||k==="firstPage"||k==="notFirstPage")&&(n.pageBorders.display=k);let B=chunk3R7QHNI5_js.j(y,"w","offsetFrom");(B==="page"||B==="text")&&(n.pageBorders.offsetFrom=B);let N=chunk3R7QHNI5_js.j(y,"w","zOrder");(N==="front"||N==="back")&&(n.pageBorders.zOrder=N);}let x=chunk3R7QHNI5_js.e(e,"w","background");if(x){n.background={};let m=chunk3R7QHNI5_js.j(x,"w","color");m&&m!=="auto"&&(n.background.color={rgb:m});let F=chunk3R7QHNI5_js.j(x,"w","themeColor");F&&(n.background.themeColor=F);let E=chunk3R7QHNI5_js.j(x,"w","themeTint");E&&(n.background.themeTint=E);let b=chunk3R7QHNI5_js.j(x,"w","themeShade");b&&(n.background.themeShade=b);}let h=chunk3R7QHNI5_js.e(e,"w","footnotePr");if(h){let m=Ke(h);Object.keys(m).length>0&&(n.footnotePr=m);}let P=chunk3R7QHNI5_js.e(e,"w","endnotePr");if(P){let m=Qe(P);Object.keys(m).length>0&&(n.endnotePr=m);}let C=chunk3R7QHNI5_js.e(e,"w","docGrid");if(C){n.docGrid={};let m=chunk3R7QHNI5_js.j(C,"w","type");(m==="default"||m==="lines"||m==="linesAndChars"||m==="snapToChars")&&(n.docGrid.type=m);let F=chunk3R7QHNI5_js.l(C,"w","linePitch");F!==void 0&&(n.docGrid.linePitch=F);let E=chunk3R7QHNI5_js.l(C,"w","charSpace");E!==void 0&&(n.docGrid.charSpace=E);}let M=chunk3R7QHNI5_js.e(e,"w","paperSrc");if(M){let m=chunk3R7QHNI5_js.l(M,"w","first");m!==void 0&&(n.paperSrcFirst=m);let F=chunk3R7QHNI5_js.l(M,"w","other");F!==void 0&&(n.paperSrcOther=F);}return n}function go(){return {pageWidth:12240,pageHeight:15840,orientation:"portrait",marginTop:1440,marginBottom:1440,marginLeft:1440,marginRight:1440,headerDistance:720,footerDistance:720,gutter:0,columnCount:1,columnSpace:720,equalWidth:true,sectionStart:"nextPage",verticalAlign:"top"}}function Je(e,t){if(!t||t.length===0)return e;let n=new Set((e??[]).map(r=>r.type)),o=t.filter(r=>!n.has(r.type));return o.length===0?e:[...e??[],...o]}function ho(e){if(e.length<2)return e;let t=[e[0]];for(let n=1;n<e.length;n++){let o=t[n-1].properties,r=e[n].properties,a=Je(r.headerReferences,o.headerReferences),u=Je(r.footerReferences,o.footerReferences),l=r.titlePg!==void 0?r.titlePg:o.titlePg;if(a===r.headerReferences&&u===r.footerReferences&&l===r.titlePg){t.push(e[n]);continue}t.push({...e[n],properties:{...r,headerReferences:a,footerReferences:u,titlePg:l}});}return t}function tt(e){if(!e)return;let t=/^(-?[\d.]+)\s*(pt|in|px|cm|mm|pc)?$/.exec(e.trim());if(!t)return;let n=parseFloat(t[1]);if(!isNaN(n))switch(t[2]){case "pt":return n/72*96;case "in":return n*96;case "cm":return n/2.54*96;case "mm":return n/25.4*96;case "pc":return n/6*96;case "px":case void 0:return n;default:return}}function qt(e){return chunk3R7QHNI5_js.j(e,"r","id")??chunk3R7QHNI5_js.j(e,"r","embed")??chunk3R7QHNI5_js.j(e,null,"id")??""}function $t(e){if(!e)return null;let t;if(e.startsWith("data:")){let n=e.indexOf(",");if(n<0)return null;t=e.slice(n+1);}else if(/^[A-Za-z0-9+/]/.test(e)&&!e.includes(":"))t=e;else return null;try{let n=typeof atob=="function"?atob(t):globalThis.Buffer?.from(t,"base64").toString("binary");if(typeof n!="string")return null;let o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}catch{return null}}function Yt(e){if(!e||e.length<24)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71)return {width:t.getUint32(16),height:t.getUint32(20)};if(e[0]===71&&e[1]===73&&e[2]===70)return {width:e[6]|e[7]<<8,height:e[8]|e[9]<<8};if(e[0]===66&&e[1]===77&&e.length>=26)return {width:t.getInt32(18,true),height:Math.abs(t.getInt32(22,true))};if(e[0]===255&&e[1]===216){let n=2;for(;n+9<e.length;){if(e[n]!==255){n++;continue}let o=e[n+1];if(o>=192&&o<=207&&o!==196&&o!==200&&o!==204)return {height:e[n+5]<<8|e[n+6],width:e[n+7]<<8|e[n+8]};let r=e[n+2]<<8|e[n+3];if(r<2)break;n+=2+r;}}return null}function nt(e,t,n){let o=[...chunk3R7QHNI5_js.o(e,"v","shape"),...chunk3R7QHNI5_js.o(e,"v","rect"),...chunk3R7QHNI5_js.o(e,"v","roundrect"),...chunk3R7QHNI5_js.o(e,"v","oval")];for(let r of o){let a=chunk3R7QHNI5_js.i(r).find(h=>h.name==="v:imagedata"||h.name?.endsWith(":imagedata"));if(!a)continue;let u=qt(a);if(!u)continue;let l=(chunk3R7QHNI5_js.j(r,null,"id")??"").toLowerCase();if(Fe(r,l))continue;let{src:f,mimeType:c,filename:d}=chunkLW5OFHSW_js.y(u,t??void 0,n??void 0),p=ae(chunk3R7QHNI5_js.j(r,null,"style")),w=tt(p.width),T=tt(p.height);if(w==null||T==null){let h=Yt($t(f));h&&h.width>0&&h.height>0&&(w==null&&T==null?(w=h.width,T=h.height):w==null?w=T*(h.width/h.height):T=w*(h.height/h.width));}let y={type:"image",rId:u,size:{width:w!=null?chunkBJSG6TEG_js.g(w):0,height:T!=null?chunkBJSG6TEG_js.g(T):0},wrap:{type:"inline"}};f&&(y.src=f),c&&(y.mimeType=c),d&&(y.filename=d);let x=chunk3R7QHNI5_js.j(a,"o","title")??void 0;return x&&(y.title=x),{type:"drawing",image:y}}return null}function ot(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function Zt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function ce(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","b");r&&(o.bold=chunk3R7QHNI5_js.m(r));let a=chunk3R7QHNI5_js.e(e,"w","bCs");a&&(o.boldCs=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","i");u&&(o.italic=chunk3R7QHNI5_js.m(u));let l=chunk3R7QHNI5_js.e(e,"w","iCs");l&&(o.italicCs=chunk3R7QHNI5_js.m(l));let f=chunk3R7QHNI5_js.e(e,"w","u");if(f){let S=chunk3R7QHNI5_js.j(f,"w","val");if(S){o.underline={style:S};let z=chunk3R7QHNI5_js.j(f,"w","color"),_=chunk3R7QHNI5_js.j(f,"w","themeColor");(z||_)&&(o.underline.color=ot(z,_,chunk3R7QHNI5_js.j(f,"w","themeTint"),chunk3R7QHNI5_js.j(f,"w","themeShade")));}}let c=chunk3R7QHNI5_js.e(e,"w","strike");c&&(o.strike=chunk3R7QHNI5_js.m(c));let d=chunk3R7QHNI5_js.e(e,"w","dstrike");d&&(o.doubleStrike=chunk3R7QHNI5_js.m(d));let p=chunk3R7QHNI5_js.e(e,"w","vertAlign");if(p){let S=chunk3R7QHNI5_js.j(p,"w","val");(S==="superscript"||S==="subscript"||S==="baseline")&&(o.vertAlign=S);}let w=chunk3R7QHNI5_js.e(e,"w","smallCaps");w&&(o.smallCaps=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","caps");T&&(o.allCaps=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","vanish");y&&(o.hidden=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","color");x&&(o.color=ot(chunk3R7QHNI5_js.j(x,"w","val"),chunk3R7QHNI5_js.j(x,"w","themeColor"),chunk3R7QHNI5_js.j(x,"w","themeTint"),chunk3R7QHNI5_js.j(x,"w","themeShade")));let h=chunk3R7QHNI5_js.e(e,"w","highlight");if(h){let S=chunk3R7QHNI5_js.j(h,"w","val");S&&(o.highlight=S);}let P=chunk3R7QHNI5_js.e(e,"w","shd");P&&(o.shading=Zt(P));let C=chunk3R7QHNI5_js.e(e,"w","sz");if(C){let S=chunk3R7QHNI5_js.l(C,"w","val");S!==void 0&&(o.fontSize=S);}let M=chunk3R7QHNI5_js.e(e,"w","szCs");if(M){let S=chunk3R7QHNI5_js.l(M,"w","val");S!==void 0&&(o.fontSizeCs=S);}let m=chunk3R7QHNI5_js.e(e,"w","rFonts");if(m){o.fontFamily={ascii:chunk3R7QHNI5_js.j(m,"w","ascii")??void 0,hAnsi:chunk3R7QHNI5_js.j(m,"w","hAnsi")??void 0,eastAsia:chunk3R7QHNI5_js.j(m,"w","eastAsia")??void 0,cs:chunk3R7QHNI5_js.j(m,"w","cs")??void 0};let S=chunk3R7QHNI5_js.j(m,"w","asciiTheme");S&&(o.fontFamily.asciiTheme=S,t&&!o.fontFamily.ascii&&(o.fontFamily.ascii=Y(t,S)));let z=chunk3R7QHNI5_js.j(m,"w","hAnsiTheme");z&&(o.fontFamily.hAnsiTheme=z,t&&!o.fontFamily.hAnsi&&(o.fontFamily.hAnsi=Y(t,z)));let _=chunk3R7QHNI5_js.j(m,"w","eastAsiaTheme");_&&(o.fontFamily.eastAsiaTheme=_,t&&!o.fontFamily.eastAsia&&(o.fontFamily.eastAsia=Y(t,_)));let pe=chunk3R7QHNI5_js.j(m,"w","cstheme");pe&&(o.fontFamily.csTheme=pe,t&&!o.fontFamily.cs&&(o.fontFamily.cs=Y(t,pe)));}let F=chunk3R7QHNI5_js.e(e,"w","spacing");if(F){let S=chunk3R7QHNI5_js.l(F,"w","val");S!==void 0&&(o.spacing=S);}let E=chunk3R7QHNI5_js.e(e,"w","position");if(E){let S=chunk3R7QHNI5_js.l(E,"w","val");S!==void 0&&(o.position=S);}let b=chunk3R7QHNI5_js.e(e,"w","w");if(b){let S=chunk3R7QHNI5_js.l(b,"w","val");S!==void 0&&(o.scale=S);}let k=chunk3R7QHNI5_js.e(e,"w","kern");if(k){let S=chunk3R7QHNI5_js.l(k,"w","val");S!==void 0&&(o.kerning=S);}let B=chunk3R7QHNI5_js.e(e,"w","effect");if(B){let S=chunk3R7QHNI5_js.j(B,"w","val");S&&(o.effect=S);}let N=chunk3R7QHNI5_js.e(e,"w","em");if(N){let S=chunk3R7QHNI5_js.j(N,"w","val");S&&(o.emphasisMark=S);}let H=chunk3R7QHNI5_js.e(e,"w","emboss");H&&(o.emboss=chunk3R7QHNI5_js.m(H));let I=chunk3R7QHNI5_js.e(e,"w","imprint");I&&(o.imprint=chunk3R7QHNI5_js.m(I));let X=chunk3R7QHNI5_js.e(e,"w","outline");X&&(o.outline=chunk3R7QHNI5_js.m(X));let Ce=chunk3R7QHNI5_js.e(e,"w","shadow");Ce&&(o.shadow=chunk3R7QHNI5_js.m(Ce));let ke=chunk3R7QHNI5_js.e(e,"w","rtl");ke&&(o.rtl=chunk3R7QHNI5_js.m(ke));let Se=chunk3R7QHNI5_js.e(e,"w","cs");Se&&(o.cs=chunk3R7QHNI5_js.m(Se));let Me=chunk3R7QHNI5_js.e(e,"w","rStyle");if(Me){let S=chunk3R7QHNI5_js.j(Me,"w","val");S&&(o.styleId=S);}return Object.keys(o).length>0?o:void 0}function Kt(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=(chunk3R7QHNI5_js.j(e,"w","author")??"").trim(),r=(chunk3R7QHNI5_js.j(e,"w","date")??"").trim(),a=(chunk3R7QHNI5_js.j(e,"w","rsid")??"").trim();return {id:Number.isInteger(n)&&n>=0?n:0,author:o.length>0?o:"Unknown",date:r.length>0?r:void 0,rsid:a.length>0?a:void 0}}function Qt(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","rPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","rPr");return {type:"runPropertyChange",info:Kt(a),previousFormatting:ce(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function Jt(e){let t=chunk3R7QHNI5_js.k(e),n=chunk3R7QHNI5_js.j(e,"xml","space")==="preserve";return {type:"text",text:t,preserveSpace:n||void 0}}function en(){return {type:"tab"}}function tn(e){let t=chunk3R7QHNI5_js.j(e,"w","type"),n=chunk3R7QHNI5_js.j(e,"w","clear"),o={type:"break"};return (t==="page"||t==="column"||t==="textWrapping")&&(o.breakType=t),(n==="none"||n==="left"||n==="right"||n==="all")&&(o.clear=n),o}function nn(e){let t=chunk3R7QHNI5_js.j(e,"w","font")??"",n=chunk3R7QHNI5_js.j(e,"w","char")??"";return {type:"symbol",font:t,char:n}}function on(e){return {type:"footnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function rn(e){return {type:"endnoteRef",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function an(e){let t=chunk3R7QHNI5_js.j(e,"w","fldCharType"),n=chunk3R7QHNI5_js.j(e,"w","fldLock")==="true"||chunk3R7QHNI5_js.j(e,"w","fldLock")==="1",o=chunk3R7QHNI5_js.j(e,"w","dirty")==="true"||chunk3R7QHNI5_js.j(e,"w","dirty")==="1",r="begin";return t==="separate"?r="separate":t==="end"&&(r="end"),{type:"fieldChar",charType:r,fldLock:n||void 0,dirty:o||void 0}}function ln(e){return {type:"instrText",text:chunk3R7QHNI5_js.k(e)}}function rt(e,t,n){let o=chunkLW5OFHSW_js.A(e,t??void 0,n??void 0);return o?{type:"drawing",image:o}:null}function fe(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function sn(e,t,n){let o=[],r=chunk3R7QHNI5_js.i(e);for(let a of r)switch(fe(a.name)){case "t":o.push(Jt(a));break;case "tab":o.push(en());break;case "br":o.push(tn(a));break;case "sym":o.push(nn(a));break;case "footnoteReference":o.push(on(a));break;case "endnoteReference":o.push(rn(a));break;case "fldChar":o.push(an(a));break;case "instrText":o.push(ln(a));break;case "softHyphen":o.push({type:"softHyphen"});break;case "noBreakHyphen":o.push({type:"noBreakHyphen"});break;case "drawing":let l=rt(a,t,n);l&&o.push(l);break;case "pict":case "object":{let f=nt(a,t,n);f&&o.push(f);break}case "rPr":break;case "lastRenderedPageBreak":break;case "cr":o.push({type:"break",breakType:"textWrapping"});break;case "AlternateContent":{let c=chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Choice")??chunk3R7QHNI5_js.i(a).find(d=>fe(d.name)==="Fallback");if(c){for(let d of chunk3R7QHNI5_js.i(c))if(fe(d.name)==="drawing"){let w=rt(d,t,n);w?.image?.src&&o.push(w);}}break}case "footnoteRef":o.push({type:"footnoteRefMark"});break;case "endnoteRef":o.push({type:"endnoteRefMark"});break;case "separator":o.push({type:"separator"});break;case "continuationSeparator":o.push({type:"continuationSeparator"});break;}return o}function K(e,t,n,o=null,r=null){let a={type:"run",content:[]},u=chunk3R7QHNI5_js.e(e,"w","rPr");return u&&(a.formatting=ce(u,n),a.propertyChanges=Qt(u,n,t,a.formatting)),a.content=sn(e,o,r),a}function un(e,t,n,o){let r={};return e&&e!=="auto"?r.rgb=e:e==="auto"&&(r.auto=true),t&&(r.themeColor=t),n&&(r.themeTint=n),o&&(r.themeShade=o),r}function fn(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","color");n&&n!=="auto"&&(t.color={rgb:n});let o=chunk3R7QHNI5_js.j(e,"w","fill");o&&o!=="auto"&&(t.fill={rgb:o});let r=chunk3R7QHNI5_js.j(e,"w","themeFill");r&&(t.fill=t.fill||{},t.fill.themeColor=r);let a=chunk3R7QHNI5_js.j(e,"w","themeFillTint");a&&t.fill&&(t.fill.themeTint=a);let u=chunk3R7QHNI5_js.j(e,"w","themeFillShade");u&&t.fill&&(t.fill.themeShade=u);let l=chunk3R7QHNI5_js.j(e,"w","val");return l&&(t.pattern=l),Object.keys(t).length>0?t:void 0}function $(e){if(!e)return;let t=chunk3R7QHNI5_js.j(e,"w","val");if(!t)return;let n={style:t},o=chunk3R7QHNI5_js.j(e,"w","color"),r=chunk3R7QHNI5_js.j(e,"w","themeColor");(o||r)&&(n.color=un(o,r,chunk3R7QHNI5_js.j(e,"w","themeTint"),chunk3R7QHNI5_js.j(e,"w","themeShade")));let a=chunk3R7QHNI5_js.l(e,"w","sz");a!==void 0&&(n.size=a);let u=chunk3R7QHNI5_js.l(e,"w","space");u!==void 0&&(n.space=u);let l=chunk3R7QHNI5_js.j(e,"w","shadow");l&&(n.shadow=l==="1"||l==="true");let f=chunk3R7QHNI5_js.j(e,"w","frame");return f&&(n.frame=f==="1"||f==="true"),n}function cn(e){if(!e)return;let t=chunk3R7QHNI5_js.f(e,"w","tab");if(t.length===0)return;let n=[];for(let o of t){let r=chunk3R7QHNI5_js.l(o,"w","pos"),a=chunk3R7QHNI5_js.j(o,"w","val");if(r!==void 0&&a){let u={position:r,alignment:a},l=chunk3R7QHNI5_js.j(o,"w","leader");l&&(u.leader=l),n.push(u);}}return n.length>0?n:void 0}function dn(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.l(e,"w","w");n!==void 0&&(t.width=n);let o=chunk3R7QHNI5_js.l(e,"w","h");o!==void 0&&(t.height=o);let r=chunk3R7QHNI5_js.j(e,"w","hAnchor");(r==="text"||r==="margin"||r==="page")&&(t.hAnchor=r);let a=chunk3R7QHNI5_js.j(e,"w","vAnchor");(a==="text"||a==="margin"||a==="page")&&(t.vAnchor=a);let u=chunk3R7QHNI5_js.l(e,"w","x");u!==void 0&&(t.x=u);let l=chunk3R7QHNI5_js.l(e,"w","y");l!==void 0&&(t.y=l);let f=chunk3R7QHNI5_js.j(e,"w","xAlign");f&&(t.xAlign=f);let c=chunk3R7QHNI5_js.j(e,"w","yAlign");c&&(t.yAlign=c);let d=chunk3R7QHNI5_js.j(e,"w","wrap");return d&&(t.wrap=d),Object.keys(t).length>0?t:void 0}function de(e,t,n){if(!e)return;let o={},r=chunk3R7QHNI5_js.e(e,"w","jc");if(r){let b=chunk3R7QHNI5_js.j(r,"w","val");b&&(o.alignment=b);}let a=chunk3R7QHNI5_js.e(e,"w","bidi");a&&(o.bidi=chunk3R7QHNI5_js.m(a));let u=chunk3R7QHNI5_js.e(e,"w","spacing");if(u){let b=chunk3R7QHNI5_js.l(u,"w","before");b!==void 0&&(o.spaceBefore=b);let k=chunk3R7QHNI5_js.l(u,"w","after");k!==void 0&&(o.spaceAfter=k);let B=chunk3R7QHNI5_js.l(u,"w","line");B!==void 0&&(o.lineSpacing=B);let N={};b!==void 0&&(N.before=true),k!==void 0&&(N.after=true),(N.before||N.after)&&(o.spacingExplicit=N);let H=chunk3R7QHNI5_js.j(u,"w","lineRule");H&&(o.lineSpacingRule=H);let I=chunk3R7QHNI5_js.j(u,"w","beforeAutospacing");I&&(o.beforeAutospacing=I==="1"||I==="true");let X=chunk3R7QHNI5_js.j(u,"w","afterAutospacing");X&&(o.afterAutospacing=X==="1"||X==="true");}let l=chunk3R7QHNI5_js.e(e,"w","ind");if(l){let b=chunk3R7QHNI5_js.l(l,"w","left");b!==void 0&&(o.indentLeft=b);let k=chunk3R7QHNI5_js.l(l,"w","right");k!==void 0&&(o.indentRight=k);let B=chunk3R7QHNI5_js.l(l,"w","firstLine");B!==void 0&&(o.indentFirstLine=B);let N=chunk3R7QHNI5_js.l(l,"w","hanging");N!==void 0&&(o.indentFirstLine=-N,o.hangingIndent=true);let H=chunk3R7QHNI5_js.l(l,"w","start");H!==void 0&&o.indentLeft===void 0&&(o.indentLeft=H);let I=chunk3R7QHNI5_js.l(l,"w","end");I!==void 0&&o.indentRight===void 0&&(o.indentRight=I);}let f=chunk3R7QHNI5_js.e(e,"w","pBdr");if(f){let b={},k=$(chunk3R7QHNI5_js.e(f,"w","top"));k&&(b.top=k);let B=$(chunk3R7QHNI5_js.e(f,"w","bottom"));B&&(b.bottom=B);let N=$(chunk3R7QHNI5_js.e(f,"w","left"));N&&(b.left=N);let H=$(chunk3R7QHNI5_js.e(f,"w","right"));H&&(b.right=H);let I=$(chunk3R7QHNI5_js.e(f,"w","between"));I&&(b.between=I);let X=$(chunk3R7QHNI5_js.e(f,"w","bar"));X&&(b.bar=X),Object.keys(b).length>0&&(o.borders=b);}let c=chunk3R7QHNI5_js.e(e,"w","shd");c&&(o.shading=fn(c));let d=chunk3R7QHNI5_js.e(e,"w","tabs");d&&(o.tabs=cn(d));let p=chunk3R7QHNI5_js.e(e,"w","keepNext");p&&(o.keepNext=chunk3R7QHNI5_js.m(p));let w=chunk3R7QHNI5_js.e(e,"w","keepLines");w&&(o.keepLines=chunk3R7QHNI5_js.m(w));let T=chunk3R7QHNI5_js.e(e,"w","widowControl");T&&(o.widowControl=chunk3R7QHNI5_js.m(T));let y=chunk3R7QHNI5_js.e(e,"w","pageBreakBefore");y&&(o.pageBreakBefore=chunk3R7QHNI5_js.m(y));let x=chunk3R7QHNI5_js.e(e,"w","contextualSpacing");x&&(o.contextualSpacing=chunk3R7QHNI5_js.m(x));let h=chunk3R7QHNI5_js.e(e,"w","numPr");if(h){let b=chunk3R7QHNI5_js.e(h,"w","numId"),k=chunk3R7QHNI5_js.e(h,"w","ilvl");if(b||k){if(o.numPr={},b){let B=chunk3R7QHNI5_js.l(b,"w","val");B!==void 0&&(o.numPr.numId=B);}if(k){let B=chunk3R7QHNI5_js.l(k,"w","val");B!==void 0&&(o.numPr.ilvl=B);}}}let P=chunk3R7QHNI5_js.e(e,"w","outlineLvl");if(P){let b=chunk3R7QHNI5_js.l(P,"w","val");b!==void 0&&(o.outlineLevel=b);}let C=chunk3R7QHNI5_js.e(e,"w","pStyle");if(C){let b=chunk3R7QHNI5_js.j(C,"w","val");b&&(o.styleId=b);}let M=chunk3R7QHNI5_js.e(e,"w","framePr");M&&(o.frame=dn(M));let m=chunk3R7QHNI5_js.e(e,"w","suppressLineNumbers");m&&(o.suppressLineNumbers=chunk3R7QHNI5_js.m(m));let F=chunk3R7QHNI5_js.e(e,"w","suppressAutoHyphens");F&&(o.suppressAutoHyphens=chunk3R7QHNI5_js.m(F));let E=chunk3R7QHNI5_js.e(e,"w","rPr");return E&&(o.runProperties=ce(E,t)),Object.keys(o).length>0?o:void 0}function pn(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function mn(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function gn(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function it(e,t,n=null,o=null,r=null){let a={type:"hyperlink",children:[]},u=chunk3R7QHNI5_js.j(e,"r","id");if(u&&(a.rId=u,t)){let T=t.get(u);T&&(chunkZ3LGMBJC_js.c(T),a.href=T.target);}let l=chunk3R7QHNI5_js.j(e,"w","anchor");l&&(a.anchor=l,a.href||(a.href=`#${l}`));let f=chunk3R7QHNI5_js.j(e,"w","tooltip");f&&(a.tooltip=f);let c=chunk3R7QHNI5_js.j(e,"w","tgtFrame");c&&(a.target=c);let d=chunk3R7QHNI5_js.j(e,"w","history");(d==="1"||d==="true")&&(a.history=true);let p=chunk3R7QHNI5_js.j(e,"w","docLocation");p&&(a.docLocation=p);let w=chunk3R7QHNI5_js.i(e);for(let T of w)switch(pn(T.name)){case "r":a.children.push(K(T,n,o,t,r));break;case "bookmarkStart":a.children.push(mn(T));break;case "bookmarkEnd":a.children.push(gn(T));break}return a}function Io(e){let t="";for(let n of e.children)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"&&(t+=" ");return t}function Ho(e){return e.href?/^https?:\/\/|^mailto:|^tel:|^ftp:/i.test(e.href):!!e.rId&&!e.anchor}function Lo(e){return !!e.anchor}function Xo(e){return e.href}function Do(e){return e.children.some(t=>t.type==="run")}function Oo(e){return e.children.filter(t=>t.type==="run")}function Wo(e,t){if(e.rId){let n=t.get(e.rId);if(n)return chunkZ3LGMBJC_js.c(n),e.href=n.target,e.href}return e.anchor&&!e.href&&(e.href=`#${e.anchor}`),e.href}function at(e){let t=chunk3R7QHNI5_js.l(e,"w","id")??0,n=chunk3R7QHNI5_js.j(e,"w","name")??"",o={type:"bookmarkStart",id:t,name:n},r=chunk3R7QHNI5_js.l(e,"w","colFirst");r!==void 0&&(o.colFirst=r);let a=chunk3R7QHNI5_js.l(e,"w","colLast");return a!==void 0&&(o.colLast=a),o}function lt(e){return {type:"bookmarkEnd",id:chunk3R7QHNI5_js.l(e,"w","id")??0}}function ut(e){let t="";if(e.type==="text"&&typeof e.text=="string")return e.text;if(e.elements)for(let n of e.elements)if((n.name?.replace(/^.*:/,"")??"")==="t"&&n.elements)for(let r of n.elements)r.type==="text"&&typeof r.text=="string"&&(t+=r.text);else t+=ut(n);return t}function J(e){if(!e)return "";let t=e.indexOf(":");return t>=0?e.substring(t+1):e}function ft(e){let t=new Set(["hyperlink","smartTag","sdt","sdtContent","fldSimple","customXml","ins","del","moveFrom","moveTo"]),n=new Set(["pPr","proofErr","bookmarkStart","bookmarkEnd","commentRangeStart","commentRangeEnd","commentReference","permStart","permEnd","rsidR"]),o=new Set(["t","tab","br","cr","sym","drawing","pict","object","softHyphen","noBreakHyphen","fldChar","instrText","pgNum","separator","continuationSeparator","footnoteRef","endnoteRef","footnoteReference","endnoteReference","ptab","monthShort","monthLong","yearShort","yearLong","dayShort","dayLong"]),r=false;function a(l){for(let f of chunk3R7QHNI5_js.i(l)){let c=J(f.name);if(!n.has(c)){if(c==="lastRenderedPageBreak"){r=true;continue}if(c==="r"){for(let d of chunk3R7QHNI5_js.i(f)){let p=J(d.name);if(p!=="rPr"){if(p==="lastRenderedPageBreak"){r=true;continue}if(p==="br"&&chunk3R7QHNI5_js.j(d,"w","type")==="page")return "forced";if(o.has(p))return "visible"}}continue}if(t.has(c)){let d=a(f);if(d!=="continue")return d;continue}return "continue"}}return "continue"}let u=a(e);return u==="forced"?true:u==="visible"?r:false}function st(e,t){if(!e)return `w:${t}`;let n=e.indexOf(":");return n<0?t:`${e.substring(0,n+1)}${t}`}function ct(e){if(e.type!=="element")return e;let t=J(e.name),n=e.name;return t==="delText"?n=st(e.name,"t"):t==="delInstrText"&&(n=st(e.name,"instrText")),{...e,name:n,elements:e.elements?.map(ct)}}function Q(e){let t=chunk3R7QHNI5_js.j(e,"w","id"),n=t?parseInt(t,10):0,o=chunk3R7QHNI5_js.j(e,"w","author"),r=chunk3R7QHNI5_js.j(e,"w","date"),a=o?.trim()??"",u=r?.trim()??"";return {id:Number.isInteger(n)&&n>=0?n:0,author:a.length>0?a:"Unknown",date:u.length>0?u:void 0}}function hn(e){return Q(e)}function dt(e,t,n,o){if(!e)return;let r=chunk3R7QHNI5_js.f(e,"w","pPrChange").map(a=>{let u=chunk3R7QHNI5_js.e(a,"w","pPr");return {type:"paragraphPropertyChange",info:hn(a),previousFormatting:de(u,t),currentFormatting:o}}).filter(a=>a.previousFormatting||a.currentFormatting);return r.length>0?r:void 0}function wn(e,t,n,o,r){return it(e,t,n,o,r)}function yn(e){return at(e)}function bn(e){return lt(e)}function pt(e){let t=e.trim().match(/^\\?([A-Z]+)/i);if(!t)return "UNKNOWN";let n=t[1].toUpperCase();return ["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE","EDITTIME","REVNUM","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS"].includes(n)?n:"UNKNOWN"}function Tn(e,t,n,o,r){let a=chunk3R7QHNI5_js.j(e,"w","instr")??"",u=pt(a),l={type:"simpleField",instruction:a,fieldType:u,content:[]},f=chunk3R7QHNI5_js.j(e,"w","fldLock");(f==="1"||f==="true")&&(l.fldLock=true);let c=chunk3R7QHNI5_js.j(e,"w","dirty");(c==="1"||c==="true")&&(l.dirty=true);let d=chunk3R7QHNI5_js.i(e);for(let p of d)J(p.name)==="r"&&l.content.push(K(p,t,n,o,r));return l}function U(e,t,n,o,r,a,u="default"){let l=[],f=chunk3R7QHNI5_js.i(e),c=false,d="",p=[],w=[],T=false,y=false,x=false;for(let h of f){let P=J(h.name);switch(P){case "r":{let C=u==="deletion"?ct(h):h,M=K(C,t,n,r,a),m=false,F=false,E=false,b="";for(let k of M.content)k.type==="fieldChar"?k.charType==="begin"?(m=true,k.fldLock&&(y=true),k.dirty&&(x=true)):k.charType==="separate"?F=true:k.charType==="end"&&(E=true):k.type==="instrText"&&(b+=k.text);if(m&&(c=true,T=false,d="",p=[],w=[],y=false,x=false),c){if(b&&(d+=b),F&&(T=true),T&&!E?F||w.push(M):!T&&!m&&p.push(M),E){let k={type:"complexField",instruction:d.trim(),fieldType:pt(d),fieldCode:p,fieldResult:w};y&&(k.fldLock=true),x&&(k.dirty=true),l.push(k),c=false;}}else l.push(M);break}case "hyperlink":l.push(wn(h,r,t,n,a));break;case "bookmarkStart":l.push(yn(h));break;case "bookmarkEnd":l.push(bn(h));break;case "fldSimple":l.push(Tn(h,t,n,r,a));break;case "pPr":break;case "proofErr":case "permStart":case "permEnd":case "customXml":break;case "sdt":{let C=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtPr"||m.name?.endsWith(":sdtPr"))),M=(h.elements??[]).find(m=>m.type==="element"&&(m.name==="w:sdtContent"||m.name?.endsWith(":sdtContent")));if(M){let m=U(M,t,n,null,r,a,u),E={type:"inlineSdt",properties:ie(C??null),content:m.filter(b=>b.type==="run"||b.type==="hyperlink"||b.type==="simpleField"||b.type==="complexField"||b.type==="inlineSdt"||b.type==="mathEquation")};l.push(E);}break}case "ins":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"insertion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "del":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"deletion",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveFrom":{let C=Q(h),M=U(h,t,n,null,r,a,"deletion"),m={type:"moveFrom",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "moveTo":{let C=Q(h),M=U(h,t,n,null,r,a),m={type:"moveTo",info:C,content:M.filter(F=>F.type==="run"||F.type==="hyperlink")};l.push(m);break}case "smartTag":break;case "moveFromRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveFromRangeStart",id:C,name:M});break}case "moveFromRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveFromRangeEnd",id:C});break}case "moveToRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10),M=chunk3R7QHNI5_js.j(h,"w","name")??"";l.push({type:"moveToRangeStart",id:C,name:M});break}case "moveToRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"moveToRangeEnd",id:C});break}case "commentRangeStart":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeStart",id:C});break}case "commentRangeEnd":{let C=parseInt(chunk3R7QHNI5_js.j(h,"w","id")??"0",10);l.push({type:"commentRangeEnd",id:C});break}case "oMath":case "oMathPara":{let C=P==="oMathPara",M=chunk3R7QHNI5_js.b(h),m=ut(h),F={type:"mathEquation",display:C?"block":"inline",ommlXml:M,plainText:m||void 0};l.push(F);break}}}return l}function xn(e){let t="";for(let n of e.content)if(n.type==="run")for(let o of n.content)o.type==="text"?t+=o.text:o.type==="tab"?t+=" ":o.type==="break"&&(o.breakType==="page"?t+="\f":t+=`
|
|
4
|
+
`);else if(n.type==="hyperlink"){for(let o of n.children)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="simpleField"){for(let o of n.content)if(o.type==="run")for(let r of o.content)r.type==="text"&&(t+=r.text);}else if(n.type==="complexField")for(let o of n.fieldResult)for(let r of o.content)r.type==="text"&&(t+=r.text);return t}function mt(e){let t=chunk3R7QHNI5_js.j(e,"w","id");if(t==null)return null;let n=parseInt(t,10);if(Number.isNaN(n))return null;let o=chunk3R7QHNI5_js.j(e,"w","author")??"",r=chunk3R7QHNI5_js.j(e,"w","date")??void 0,a={id:n,author:o};return r&&(a.date=r),a}function Z(e,t,n,o,r=null,a=null,u){let l={type:"paragraph",content:[]},f=chunk3R7QHNI5_js.j(e,"w14","paraId")??chunk3R7QHNI5_js.j(e,"w","paraId");f&&(l.paraId=chunkB3SVS2AF_js.c(f));let c=chunk3R7QHNI5_js.j(e,"w14","textId")??chunk3R7QHNI5_js.j(e,"w","textId");c&&(l.textId=chunkB3SVS2AF_js.c(c)),!u?.inHeaderFooter&&ft(e)&&(l.renderedPageBreakBefore=true);let d=chunk3R7QHNI5_js.e(e,"w","pPr");if(d){l.formatting=de(d,n),l.propertyChanges=dt(d,n,t,l.formatting);let y=chunk3R7QHNI5_js.e(d,"w","rPr");if(y){let h=chunk3R7QHNI5_js.e(y,"w","ins");if(h){let C=mt(h);C&&(l.pPrIns=C);}let P=chunk3R7QHNI5_js.e(y,"w","del");if(P){let C=mt(P);C&&(l.pPrDel=C);}}let x=chunk3R7QHNI5_js.e(d,"w","sectPr");x&&(l.sectionProperties=et(x));}let p=U(e,t,n,o,r,a);l.content=p;let w=l.formatting?.numPr,T=false;if(!w&&l.formatting?.styleId&&t){let y=t.get(l.formatting.styleId);y?.pPr?.numPr&&(w=y.pPr.numPr,T=true,l.formatting||(l.formatting={}),l.formatting.numPr=w,l.formatting.numPrFromStyle=w);}if(w&&o){let y=chunkH57LNDBH_js.d(w,o);if(y){l.listRendering=y;let x=T?Fn(l.formatting?.styleId,t):{left:false,firstLine:false},h=o.getLevel(y.numId,y.level);if(h?.pPr){l.formatting||(l.formatting={});let P=d?chunk3R7QHNI5_js.e(d,"w","ind"):null,C=P!=null&&(chunk3R7QHNI5_js.j(P,"w","left")!==null||chunk3R7QHNI5_js.j(P,"w","start")!==null),M=F=>{let E=P?chunk3R7QHNI5_js.j(P,"w",F):null;if(E===null)return false;let b=parseInt(E,10);return Number.isNaN(b)||b!==0},m=P!=null&&(M("firstLine")||M("hanging"));!C&&!x.left&&h.pPr.indentLeft!==void 0&&(l.formatting.indentLeft=h.pPr.indentLeft),!m&&!x.firstLine&&(h.pPr.indentFirstLine!==void 0&&(l.formatting.indentFirstLine=h.pPr.indentFirstLine),h.pPr.hangingIndent!==void 0&&(l.formatting.hangingIndent=h.pPr.hangingIndent));}}}return l}function Fn(e,t){let n={left:false,firstLine:false};if(!e||!t)return n;let o=new Set,r=e;for(;r&&!o.has(r);){o.add(r);let a=t.get(r);if(!a)break;let u=a.pPr;if(u&&(n.left||(n.left=u.indentLeft!==void 0),n.firstLine||(n.firstLine=u.indentFirstLine!==void 0||u.hangingIndent!==void 0)),n.left&&n.firstLine)break;r=a.basedOn;}return n}function gt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tblW"));n&&(t.width=n);let o=chunk3R7QHNI5_js.e(e,"w","jc");if(o){let x=chunk3R7QHNI5_js.j(o,"w","val");(x==="left"||x==="center"||x==="right"||x==="start")&&(t.justification=x==="start"?"left":x);}let r=D(chunk3R7QHNI5_js.e(e,"w","tblCellSpacing"));r&&(t.cellSpacing=r);let a=D(chunk3R7QHNI5_js.e(e,"w","tblInd"));a&&(t.indent=a);let u=ne(chunk3R7QHNI5_js.e(e,"w","tblBorders"));u&&(t.borders=u);let l=oe(chunk3R7QHNI5_js.e(e,"w","tblCellMar"));l&&(t.cellMargins=l);let f=chunk3R7QHNI5_js.e(e,"w","tblLayout");if(f){let x=chunk3R7QHNI5_js.j(f,"w","type");(x==="fixed"||x==="autofit")&&(t.layout=x);}let c=chunk3R7QHNI5_js.e(e,"w","tblStyle");if(c){let x=chunk3R7QHNI5_js.j(c,"w","val");x&&(t.styleId=x);}let d=be(chunk3R7QHNI5_js.e(e,"w","tblLook"));d&&(t.look=d);let p=re(chunk3R7QHNI5_js.e(e,"w","shd"));p&&(t.shading=p);let w=chunk3R7QHNI5_js.e(e,"w","tblOverlap");if(w){let x=chunk3R7QHNI5_js.j(w,"w","val");(x==="never"||x==="overlap")&&(t.overlap=x);}let T=Te(chunk3R7QHNI5_js.e(e,"w","tblpPr"));if(T&&(t.floating=T),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","bidiVisual"))&&(t.bidi=true),Object.keys(t).length!==0)return t}function Cn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tblPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tblPr");return {type:"tablePropertyChange",info:te(o),previousFormatting:gt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function kn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","trPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","trPr");return {type:"tableRowPropertyChange",info:te(o),previousFormatting:ht(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Sn(e,t){if(!e)return;let n=chunk3R7QHNI5_js.f(e,"w","tcPrChange").map(o=>{let r=chunk3R7QHNI5_js.e(o,"w","tcPr");return {type:"tableCellPropertyChange",info:te(o),previousFormatting:yt(r),currentFormatting:t}}).filter(o=>o.previousFormatting||o.currentFormatting);return n.length>0?n:void 0}function Mn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","ins");if(t)return {type:"tableRowInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","del");if(n)return {type:"tableRowDeletion",info:j(n)}}function Rn(e){if(!e)return;let t=chunk3R7QHNI5_js.e(e,"w","cellIns");if(t)return {type:"tableCellInsertion",info:j(t)};let n=chunk3R7QHNI5_js.e(e,"w","cellDel");if(n)return {type:"tableCellDeletion",info:j(n)};let o=chunk3R7QHNI5_js.e(e,"w","cellMerge");if(o){let r=chunk3R7QHNI5_js.j(o,"w","vMerge"),a=chunk3R7QHNI5_js.j(o,"w","vMergeOrig"),u=l=>l==="rest"||l==="cont";return {type:"tableCellMerge",info:j(o),...u(r)?{vMerge:r}:{},...u(a)?{vMergeOrig:a}:{}}}}function ht(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.e(e,"w","trHeight");if(n){let f=chunk3R7QHNI5_js.l(n,"w","val");f!==void 0&&f>0&&(t.height={value:f,type:"dxa"});let c=chunk3R7QHNI5_js.j(n,"w","hRule");(c==="auto"||c==="atLeast"||c==="exact")&&(t.heightRule=c);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tblHeader"))&&(t.header=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","cantSplit"))&&(t.cantSplit=true);let a=chunk3R7QHNI5_js.e(e,"w","jc");if(a){let f=chunk3R7QHNI5_js.j(a,"w","val");(f==="left"||f==="center"||f==="right")&&(t.justification=f);}chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hidden"))&&(t.hidden=true);let l=wt(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(l&&(t.conditionalFormat=l),Object.keys(t).length!==0)return t}function wt(e){if(!e)return;let t={},n=chunk3R7QHNI5_js.j(e,"w","firstRow");(n==="1"||n==="true")&&(t.firstRow=true);let o=chunk3R7QHNI5_js.j(e,"w","lastRow");(o==="1"||o==="true")&&(t.lastRow=true);let r=chunk3R7QHNI5_js.j(e,"w","firstColumn");(r==="1"||r==="true")&&(t.firstColumn=true);let a=chunk3R7QHNI5_js.j(e,"w","lastColumn");(a==="1"||a==="true")&&(t.lastColumn=true);let u=chunk3R7QHNI5_js.j(e,"w","oddHBand");(u==="1"||u==="true")&&(t.oddHBand=true);let l=chunk3R7QHNI5_js.j(e,"w","evenHBand");(l==="1"||l==="true")&&(t.evenHBand=true);let f=chunk3R7QHNI5_js.j(e,"w","oddVBand");(f==="1"||f==="true")&&(t.oddVBand=true);let c=chunk3R7QHNI5_js.j(e,"w","evenVBand");(c==="1"||c==="true")&&(t.evenVBand=true);let d=chunk3R7QHNI5_js.j(e,"w","firstRowFirstColumn");(d==="1"||d==="true")&&(t.nwCell=true);let p=chunk3R7QHNI5_js.j(e,"w","firstRowLastColumn");(p==="1"||p==="true")&&(t.neCell=true);let w=chunk3R7QHNI5_js.j(e,"w","lastRowFirstColumn");(w==="1"||w==="true")&&(t.swCell=true);let T=chunk3R7QHNI5_js.j(e,"w","lastRowLastColumn");(T==="1"||T==="true")&&(t.seCell=true);let y=chunk3R7QHNI5_js.j(e,"w","val");if(y&&y.length===12&&(y[0]==="1"&&(t.firstRow=true),y[1]==="1"&&(t.lastRow=true),y[2]==="1"&&(t.firstColumn=true),y[3]==="1"&&(t.lastColumn=true),y[4]==="1"&&(t.oddVBand=true),y[5]==="1"&&(t.evenVBand=true),y[6]==="1"&&(t.oddHBand=true),y[7]==="1"&&(t.evenHBand=true),y[8]==="1"&&(t.nwCell=true),y[9]==="1"&&(t.neCell=true),y[10]==="1"&&(t.swCell=true),y[11]==="1"&&(t.seCell=true)),Object.keys(t).length!==0)return t}function yt(e){if(!e)return;let t={},n=D(chunk3R7QHNI5_js.e(e,"w","tcW"));n&&(t.width=n);let o=ne(chunk3R7QHNI5_js.e(e,"w","tcBorders"));o&&(t.borders=o);let r=oe(chunk3R7QHNI5_js.e(e,"w","tcMar"));r&&(t.margins=r);let a=re(chunk3R7QHNI5_js.e(e,"w","shd"));a&&(t.shading=a);let u=chunk3R7QHNI5_js.e(e,"w","vAlign");if(u){let y=chunk3R7QHNI5_js.j(u,"w","val");(y==="top"||y==="center"||y==="bottom")&&(t.verticalAlign=y);}let l=chunk3R7QHNI5_js.e(e,"w","textDirection");if(l){let y=chunk3R7QHNI5_js.j(l,"w","val");y&&(t.textDirection=y);}let f=chunk3R7QHNI5_js.e(e,"w","gridSpan");if(f){let y=chunk3R7QHNI5_js.l(f,"w","val");y!==void 0&&y>1&&(t.gridSpan=y);}let c=chunk3R7QHNI5_js.e(e,"w","vMerge");c&&(chunk3R7QHNI5_js.j(c,"w","val")==="restart"?t.vMerge="restart":t.vMerge="continue"),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","tcFitText"))&&(t.fitText=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","noWrap"))&&(t.noWrap=true),chunk3R7QHNI5_js.m(chunk3R7QHNI5_js.e(e,"w","hideMark"))&&(t.hideMark=true);let T=wt(chunk3R7QHNI5_js.e(e,"w","cnfStyle"));if(T&&(t.conditionalFormat=T),Object.keys(t).length!==0)return t}function En(e,t,n,o,r,a,u){let l=[],f=e.elements||[];for(let c of f){if(!c.name)continue;let d=c.name.split(":").pop();if(d==="p"){let p=Z(c,t,n,o,r,a,u);l.push(p);}else if(d==="tbl"){let p=xe(c,t,n,o,r,a,u);l.push(p);}}return l.length===0&&l.push({type:"paragraph",content:[]}),l}function Pn(e,t,n,o,r,a,u){let l={type:"tableCell",content:[]},f=chunk3R7QHNI5_js.e(e,"w","tcPr"),c=yt(f);return c&&(l.formatting=c),l.propertyChanges=Sn(f,c),l.structuralChange=Rn(f),l.content=En(e,t,n,o,r,a,u),l}function Bn(e,t,n,o,r,a,u){let l={type:"tableRow",cells:[]},f=chunk3R7QHNI5_js.e(e,"w","trPr"),c=ht(f);c&&(l.formatting=c),l.propertyChanges=kn(f,c),l.structuralChange=Mn(f);let d=chunk3R7QHNI5_js.f(e,"w","tc");for(let p of d){let w=Pn(p,t,n,o,r,a,u);l.cells.push(w);}return l}function vn(e){if(!e)return;let t=[],n=chunk3R7QHNI5_js.f(e,"w","gridCol");for(let o of n){let r=chunk3R7QHNI5_js.l(o,"w","w")??0;t.push(r);}if(!(t.length>0&&t.every(o=>o<=0)))return t.length>0?t:void 0}function Nn(e){return e.cells.reduce((t,n)=>t+(n.formatting?.gridSpan??1),0)}function An(e){let t=Math.max(e.columnWidths?.length??0,...e.rows.map(n=>Nn(n)));if(!(t<=1))for(let n of e.rows){if(n.cells.length!==1)continue;let o=n.cells[0];(o.formatting?.gridSpan??1)>=t||o.formatting?.vMerge||o.formatting?.gridSpan==null&&(o.formatting={...o.formatting??{},gridSpan:t});}}function xe(e,t,n,o,r,a,u){let l={type:"table",rows:[]},f=chunk3R7QHNI5_js.e(e,"w","tblPr"),c=gt(f);c&&(l.formatting=c),l.propertyChanges=Cn(f,c);let d=vn(chunk3R7QHNI5_js.e(e,"w","tblGrid"));d&&(l.columnWidths=d);let p=chunk3R7QHNI5_js.f(e,"w","tr");for(let w of p){let T=Bn(w,t,n,o,r,a,u);l.rows.push(T);}return An(l),l}exports.A=uo;exports.B=et;exports.C=go;exports.D=ho;exports.E=K;exports.F=it;exports.G=Io;exports.H=Ho;exports.I=Lo;exports.J=Xo;exports.K=Do;exports.L=Oo;exports.M=Wo;exports.N=xn;exports.O=Z;exports.a=Hn;exports.b=Y;exports.c=Oe;exports.d=V;exports.e=ne;exports.f=oe;exports.g=re;exports.h=be;exports.i=Te;exports.j=kt;exports.k=St;exports.l=Mt;exports.m=Rt;exports.n=Et;exports.o=gt;exports.p=Nt;exports.q=q;exports.r=Jn;exports.s=eo;exports.t=ro;exports.u=io;exports.v=Ke;exports.w=Qe;exports.x=ao;exports.y=lo;exports.z=so;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$2,j,b as b$3}from'./chunk-PJEB3ZWG.mjs';import {a}from'./chunk-OZMNIX6U.mjs';import {c as c$2,d as d$2,a as a$3,b as b$2,g,e,p}from'./chunk-HEJJXAXN.mjs';import {b as b$1,c as c$3}from'./chunk-BGY3CB37.mjs';import {d as d$1,c as c$1,j as j$1}from'./chunk-NTBZRITU.mjs';import {c,d,b,a as a$1,i,f}from'./chunk-MJ6XZFVD.mjs';import {o}from'./chunk-67LVRQIR.mjs';import {a as a$4}from'./chunk-4VLKSJRK.mjs';import {q,d as d$3}from'./chunk-KNY7SXPJ.mjs';import {a as a$5}from'./chunk-QYUPLKLP.mjs';import {Fragment,Schema}from'prosemirror-model';import {PluginKey,Plugin,NodeSelection,TextSelection}from'prosemirror-state';import {AddMarkStep,RemoveMarkStep,AddNodeMarkStep,RemoveNodeMarkStep}from'prosemirror-transform';import {redo,undo,history}from'prosemirror-history';import {toggleMark}from'prosemirror-commands';import {dropCursor}from'prosemirror-dropcursor';import {keymap}from'prosemirror-keymap';function he(n){let t=n.indentLeft;n.numPr?.numId&&t==null&&(t=((n.numPr.ilvl??0)+1)*720);let e={alignment:n.alignment,spaceBefore:n.spaceBefore,spaceAfter:n.spaceAfter,beforeAutospacing:n._originalFormatting?.beforeAutospacing,afterAutospacing:n._originalFormatting?.afterAutospacing,lineSpacing:n.lineSpacing,lineSpacingRule:n.lineSpacingRule,indentLeft:t,indentRight:n.indentRight,indentFirstLine:n.indentFirstLine,hangingIndent:n.hangingIndent,borders:n.borders,shading:n.shading},r=b$3(e);return r.marginTop&&(r["--docx-space-before"]=r.marginTop),r.marginBottom&&(r["--docx-space-after"]=r.marginBottom),Object.entries(r).map(([a,o])=>`${a.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o}`).join("; ")}function xe(n){switch(n){case "upperRoman":return "docx-list-upper-roman";case "lowerRoman":return "docx-list-lower-roman";case "upperLetter":return "docx-list-upper-alpha";case "lowerLetter":return "docx-list-lower-alpha";default:return "docx-list-decimal"}}function ye(n,t,e){if(!n?.numId)return "";let r=n.ilvl??0;return t?`docx-list-bullet docx-list-level-${r}`:`docx-list-numbered ${xe(e)} docx-list-level-${r}`}function M(n){if(!n)return;let t=n.trim(),e=parseFloat(t);if(!(isNaN(e)||e===0)){if(t.endsWith("pt"))return Math.round(e*20);if(t.endsWith("px"))return Math.round(e*15);if(t.endsWith("in"))return Math.round(e*1440);if(t.endsWith("mm"))return Math.round(e*(1440/25.4));if(t.endsWith("cm"))return Math.round(e*(1440/2.54));if(/^[\d.]+$/.test(t))return Math.round(e*15)}}function ke(n){switch(n.trim().toLowerCase()){case "left":case "start":return "left";case "center":return "center";case "right":case "end":return "right";case "justify":return "both";default:return}}function Se(n){if(!n||n==="normal")return;let t=n.trim();if(t.endsWith("%")){let r=parseFloat(t);return isNaN(r)||r===0?void 0:{lineSpacing:Math.round(240*(r/100)),lineSpacingRule:"auto"}}if(/[a-z]/i.test(t)){let r=M(t);return r==null?void 0:{lineSpacing:r,lineSpacingRule:"exact"}}let e=parseFloat(t);if(!(isNaN(e)||e===0))return {lineSpacing:Math.round(240*e),lineSpacingRule:"auto"}}function at(n){let t=n.style,e={};if(t.textAlign){let o=ke(t.textAlign);o&&(e.alignment=o);}let r=t.marginLeft||t.paddingLeft;if(r){let o=M(r);o!=null&&(e.indentLeft=o);}let a=t.marginRight||t.paddingRight;if(a){let o=M(a);o!=null&&(e.indentRight=o);}if(t.textIndent){let o=M(t.textIndent);o!=null&&(o<0?(e.indentFirstLine=Math.abs(o),e.hangingIndent=true):e.indentFirstLine=o);}if(t.lineHeight){let o=Se(t.lineHeight);o&&(e.lineSpacing=o.lineSpacing,e.lineSpacingRule=o.lineSpacingRule);}if(t.marginTop){let o=M(t.marginTop);o!=null&&(e.spaceBefore=o);}if(t.marginBottom){let o=M(t.marginBottom);o!=null&&(e.spaceAfter=o);}return e}var be={content:"inline*",group:"block",attrs:{paraId:{default:null},textId:{default:null},alignment:{default:null},spaceBefore:{default:null},spaceAfter:{default:null},lineSpacing:{default:null},lineSpacingRule:{default:null},spacingExplicit:{default:null},indentLeft:{default:null},indentRight:{default:null},indentFirstLine:{default:null},hangingIndent:{default:false},numPr:{default:null},numPrFromStyle:{default:null},listNumFmt:{default:null},listIsBullet:{default:null},listMarker:{default:null},listMarkerHidden:{default:null},listMarkerFontFamily:{default:null},listMarkerFontSize:{default:null},listMarkerSuffix:{default:null},listLevelNumFmts:{default:null},listAbstractNumId:{default:null},listStartOverride:{default:null},styleId:{default:null},borders:{default:null},shading:{default:null},tabs:{default:null},pageBreakBefore:{default:null},renderedPageBreakBefore:{default:null},keepNext:{default:null},keepLines:{default:null},contextualSpacing:{default:null},defaultTextFormatting:{default:null},sectionBreakType:{default:null},bidi:{default:null},outlineLevel:{default:null},bookmarks:{default:null},_originalFormatting:{default:null},_originalRunBoundaries:{default:null},_sectionProperties:{default:null},pPrIns:{default:null},pPrDel:{default:null},pPrChange:{default:null}},parseDOM:[{tag:"p",getAttrs(n){let t=n,e={paraId:t.dataset.paraId||void 0,alignment:t.dataset.alignment,styleId:t.dataset.styleId||void 0,sectionBreakType:t.dataset.sectionBreak||void 0},r=at(t);return {...r,...e,alignment:e.alignment||r.alignment||void 0}}},...["h1","h2","h3","h4","h5","h6"].map(n=>({tag:n,getAttrs(t){let e=parseInt(n.charAt(1));return {...at(t),styleId:`Heading${e}`,outlineLevel:e-1}}}))],toDOM(n){let t=n.attrs,e=he(t),r=ye(t.numPr,t.listIsBullet,t.listNumFmt),a={};if(e&&(a.style=e),r&&(a.class=r),t.paraId&&(a["data-para-id"]=t.paraId),t.alignment&&(a["data-alignment"]=t.alignment),t.styleId&&(a["data-style-id"]=t.styleId),t.listMarker&&(a["data-list-marker"]=t.listMarker),t.bidi&&(a.dir="rtl"),t.sectionBreakType&&(a["data-section-break"]=t.sectionBreakType,a.class=(a.class?a.class+" ":"")+"docx-section-break"),t.pPrIns||t.pPrDel){let o=t.pPrIns??t.pPrDel,s=t.pPrIns?"ep-revision-ins":"ep-revision-del";a.class=(a.class?a.class+" ":"")+"ep-revision-pmark "+s,a["data-revision-id"]=String(o.revisionId),a["data-revision-author"]=o.author,o.date&&(a["data-revision-date"]=o.date);}else if(Array.isArray(t.pPrChange)&&t.pPrChange.length>0){let o=t.pPrChange[0];a.class=(a.class?a.class+" ":"")+"ep-revision-prop-change",a["data-revision-id"]=String(o.info.id),a["data-revision-author"]=o.info.author,o.info.date&&(a["data-revision-date"]=o.info.date);}return ["p",a,0]}};function S(n,t){return (e,r)=>{let{$from:a,$to:o}=e.selection;if(!r)return true;let s=e.tr,i=new Set;return e.doc.nodesBetween(a.pos,o.pos,(l,d)=>{l.type.name==="paragraph"&&!i.has(d)&&(i.add(d),s=s.setNodeMarkup(d,void 0,{...l.attrs,[n]:t}));}),r(s.scrollIntoView()),true}}function ot(n){return (t,e)=>{let{$from:r,$to:a}=t.selection;if(!e)return true;let o=t.tr,s=new Set;return t.doc.nodesBetween(r.pos,a.pos,(i,l)=>{i.type.name==="paragraph"&&!s.has(l)&&(s.add(l),o=o.setNodeMarkup(l,void 0,{...i.attrs,...n}));}),e(o.scrollIntoView()),true}}function P(n){return (t,e)=>S("alignment",n)(t,e)}function I(n,t="auto"){return (e,r)=>ot({lineSpacing:n,lineSpacingRule:t})(e,r)}function Ee(n=720){return (t,e)=>{let{$from:r,$to:a}=t.selection;if(!e)return true;let o=t.tr,s=new Set;return t.doc.nodesBetween(r.pos,a.pos,(i,l)=>{if(i.type.name==="paragraph"&&!s.has(l)){s.add(l);let d=i.attrs.indentLeft||0;o=o.setNodeMarkup(l,void 0,{...i.attrs,indentLeft:d+n});}}),e(o.scrollIntoView()),true}}function Te(n=720){return (t,e)=>{let{$from:r,$to:a}=t.selection;if(!e)return true;let o=t.tr,s=new Set;return t.doc.nodesBetween(r.pos,a.pos,(i,l)=>{if(i.type.name==="paragraph"&&!s.has(l)){s.add(l);let d=i.attrs.indentLeft||0,c=Math.max(0,d-n);o=o.setNodeMarkup(l,void 0,{...i.attrs,indentLeft:c>0?c:null});}}),e(o.scrollIntoView()),true}}function Me(n){return (t,e)=>(r,a)=>{let{$from:o,$to:s}=r.selection;if(!a)return true;let i=r.tr,l=new Set,d=[];if(e?.runFormatting){let u=e.runFormatting;u.bold&&d.push(n.marks.bold.create()),u.italic&&d.push(n.marks.italic.create()),u.fontSize&&d.push(n.marks.fontSize.create({size:u.fontSize})),u.fontFamily&&d.push(n.marks.fontFamily.create({ascii:u.fontFamily.ascii,hAnsi:u.fontFamily.hAnsi,asciiTheme:u.fontFamily.asciiTheme})),u.color&&!u.color.auto&&d.push(n.marks.textColor.create({rgb:u.color.rgb,themeColor:u.color.themeColor,themeTint:u.color.themeTint,themeShade:u.color.themeShade})),u.underline&&u.underline.style!=="none"&&d.push(n.marks.underline.create({style:u.underline.style,color:u.underline.color})),(u.strike||u.doubleStrike)&&d.push(n.marks.strike.create({double:u.doubleStrike||false}));}let c=[n.marks.bold,n.marks.italic,n.marks.fontSize,n.marks.fontFamily,n.marks.textColor,n.marks.underline,n.marks.strike].filter(Boolean);return r.doc.nodesBetween(o.pos,s.pos,(u,f)=>{if(u.type.name==="paragraph"&&!l.has(f)){l.add(f);let g={...u.attrs,styleId:t};if(e){Object.assign(g,a$3(e));let m=b$2(e,e.numbering);m&&Object.assign(g,m);}if(i=i.setNodeMarkup(f,void 0,g),e){let m=f+1,k=f+u.nodeSize-1;if(k>m){for(let y of c)i=i.removeMark(m,k,y);for(let y of d)i=i.addMark(m,k,y);}}}}),d.length>0&&(i=i.setStoredMarks(d)),a(i.scrollIntoView()),true}}function Nn(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"?null:e.attrs.alignment||null}function Fn(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"?null:e.attrs.tabs||null}function vn(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"?null:e.attrs.styleId||null}function $n(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"?false:!!e.attrs.bidi}var st=c({name:"paragraph",schemaNodeName:"paragraph",nodeSpec:be,onSchemaReady(n){let t=Me(n.schema);return {commands:{setAlignment:e=>P(e),alignLeft:()=>P("left"),alignCenter:()=>P("center"),alignRight:()=>P("right"),alignJustify:()=>P("both"),setLineSpacing:(e,r)=>I(e,r),singleSpacing:()=>I(240),oneAndHalfSpacing:()=>I(360),doubleSpacing:()=>I(480),setSpaceBefore:e=>S("spaceBefore",e),setSpaceAfter:e=>S("spaceAfter",e),increaseIndent:e=>Ee(e),decreaseIndent:e=>Te(e),setIndentLeft:e=>S("indentLeft",e>0?e:null),setIndentRight:e=>S("indentRight",e>0?e:null),setIndentFirstLine:(e,r)=>ot({indentFirstLine:e>0?e:null,hangingIndent:r??false}),applyStyle:(e,r)=>t(e,r),clearStyle:()=>S("styleId",null),insertSectionBreak:e=>S("sectionBreakType",e),removeSectionBreak:()=>S("sectionBreakType",null),generateTOC:()=>(e,r)=>{let a$1=a(e.doc);if(a$1.length===0)return false;if(!r)return true;let{schema:o}=e,s=e.tr,i=[];for(let c of a$1){let u=`_Toc${Math.floor(1e8+Math.random()*9e8)}`;i.push({name:u,level:c.level,text:c.text});let f=s.mapping.map(c.pmPos),m=s.doc.resolve(f).nodeAfter;if(m&&m.type.name==="paragraph"){let R=[...(m.attrs.bookmarks||[]).filter(w=>!w.name.startsWith("_Toc")),{id:Math.floor(Math.random()*2147483647),name:u}];s.setNodeMarkup(f,void 0,{...m.attrs,bookmarks:R});}}let l=[];l.push(o.node("paragraph",{styleId:"TOCHeading",alignment:"center"},[o.text("Table of Contents",[o.marks.bold.create()])]));for(let c of i){let u=c.level*720,f=`TOC${c.level+1}`,g=o.marks.hyperlink.create({href:`#${c.name}`});l.push(o.node("paragraph",{styleId:f,indentLeft:u>0?u:null},[o.text(c.text,[g])]));}let d=s.mapping.map(e.selection.from);return s.insert(d,Fragment.from(l)),r(s.scrollIntoView()),true},toggleBidi:()=>(e,r)=>{let{$from:a}=e.selection,o=a.parent;if(o.type.name!=="paragraph")return false;let s=o.attrs.bidi||false;return S("bidi",s?null:true)(e,r)},setRtl:()=>S("bidi",true),setLtr:()=>S("bidi",null),setTabs:e=>S("tabs",e.length>0?e:null),addTabStop:(e,r="left",a="none")=>(o,s)=>{let{$from:i}=o.selection,l=i.parent;if(l.type.name!=="paragraph")return false;let u=[...(l.attrs.tabs||[]).filter(f=>f.position!==e),{position:e,alignment:r,leader:a}].sort((f,g)=>f.position-g.position);return S("tabs",u)(o,s)},removeTabStop:e=>(r,a)=>{let{$from:o}=r.selection,s=o.parent;if(s.type.name!=="paragraph")return false;let l=(s.attrs.tabs||[]).filter(d=>d.position!==e);return S("tabs",l.length>0?l:null)(r,a)}}}}});function Dn(n){let t=n.schema.marks.hyperlink;return t?e(n,t):false}function Hn(n){let t=n.schema.marks.hyperlink;if(!t)return null;let{empty:e,$from:r,from:a,to:o}=n.selection;if(e){let i=n.storedMarks||r.marks();for(let l of i)if(l.type===t)return {href:l.attrs.href,tooltip:l.attrs.tooltip};return null}let s=null;return n.doc.nodesBetween(a,o,i=>{if(i.isText&&s===null){let l=t.isInSet(i.marks);if(l)return s={href:l.attrs.href,tooltip:l.attrs.tooltip},false}return true}),s}function Wn(n){let{from:t,to:e,empty:r}=n.selection;return r?"":n.doc.textBetween(t,e,"")}function zn(n,t){let e=n.schema.marks.hyperlink;if(!e)return null;let{$from:r}=n.selection,a=r.marks().find(d=>d.type===e);if(!a&&r.nodeAfter&&(a=r.nodeAfter.marks.find(d=>d.type===e)),!a&&r.nodeBefore&&(a=r.nodeBefore.marks.find(d=>d.type===e)),!a&&t&&r.parent.forEach(d=>{if(a||!d.isText)return;let c=d.marks.find(u=>u.type===e&&u.attrs.href===t);c&&(a=c);}),!a)return null;let o=r.start(),s=[],i=null;r.parent.forEach((d,c)=>{let u=o+c,f=u+d.nodeSize;d.isText&&d.marks.some(m=>m.type===e&&m.attrs.href===a.attrs.href)?i?i.end=f:i={start:u,end:f}:i&&(s.push(i),i=null);}),i&&s.push(i);let l=s.find(d=>d.start<=r.pos&&r.pos<=d.end);return l?{mark:a,start:l.start,end:l.end}:null}var it=d({name:"hyperlink",schemaMarkName:"hyperlink",markSpec:{attrs:{href:{},tooltip:{default:null},rId:{default:null}},inclusive:false,parseDOM:[{tag:"a[href]",getAttrs:n=>{let t=n;return {href:t.getAttribute("href")||"",tooltip:t.getAttribute("title")||void 0}}}],toDOM(n){let t=n.attrs,e={href:t.href,target:"_blank",rel:"noopener noreferrer"};return t.tooltip&&(e.title=t.tooltip),["a",e,0]}},onSchemaReady(n){let t=n.schema.marks.hyperlink,e=(o,s)=>(i,l)=>{let{from:d,to:c,empty:u}=i.selection;if(u)return false;if(l){let f=t.create({href:o,tooltip:s||null}),g=i.tr.addMark(d,c,f),m=i.schema.marks.textColor;m&&(g=g.removeMark(d,c,m)),l(g.scrollIntoView());}return true},r=(o,s)=>{let{from:i,to:l,empty:d}=o.selection;if(d){let c=o.selection.$from;if(!c.marks().find(y=>y.type===t))return false;let g=c.pos,m=c.pos;return c.parent.forEach((y,R)=>{if(y.isText){let w=c.start()+R,H=w+y.nodeSize;w<=c.pos&&c.pos<=H&&y.marks.some(fe=>fe.type===t)&&(g=Math.min(g,w),m=Math.max(m,H));}}),s&&s(o.tr.removeMark(g,m,t).scrollIntoView()),true}return s&&s(o.tr.removeMark(i,l,t).scrollIntoView()),true};return {commands:{setHyperlink:e,removeHyperlink:()=>r,insertHyperlink:(o,s,i)=>(l,d)=>{if(d){let c=t.create({href:s,tooltip:i||null}),u=l.schema.text(o,[c]);d(l.tr.replaceSelectionWith(u,false).scrollIntoView());}return true}}}}});function v(...n){return (t,e,r)=>{for(let a of n)if(a(t,e,r))return true;return false}}function we(n,t,e){let r=Array.isArray(n.pPrChange)?n.pPrChange:[];return {...n,pPrChange:[...r,{type:"paragraphPropertyChange",info:{id:e.revisionId,author:e.author,date:e.date??void 0},previousFormatting:t}]}}function lt(n){return (t,e)=>{let{$from:r,$to:a}=t.selection,o=r.parent;if(o.type.name!=="paragraph")return false;let i$1=o.attrs.numPr?.numId===n;if(!e)return true;let l=t.tr,d=new Set,c=i(t);return t.doc.nodesBetween(r.pos,a.pos,(u,f)=>{if(u.type.name==="paragraph"&&!d.has(f)){d.add(f);let g=u.attrs.numPr,m;if(i$1)m={...u.attrs,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null};else {let k=n===1;m={...u.attrs,numPr:{numId:n,ilvl:u.attrs.numPr?.ilvl||0},listIsBullet:k,listNumFmt:k?null:"decimal",listMarker:null};}c&&(m=we(m,{numPr:g??null},c)),l=l.setNodeMarkup(f,void 0,m);}}),c&&l.setMeta(f,true),e(l.scrollIntoView()),true}}var Ce=(n,t)=>lt(1)(n,t),Pe=(n,t)=>lt(2)(n,t),Ie=(n,t)=>{let{$from:e}=n.selection,r=e.parent;if(r.type.name!=="paragraph"||!r.attrs.numPr)return false;let a=r.attrs.numPr.ilvl||0;if(a>=8)return false;if(!t)return true;let o=e.before(e.depth);return t(n.tr.setNodeMarkup(o,void 0,{...r.attrs,numPr:{...r.attrs.numPr,ilvl:a+1},indentLeft:null,indentFirstLine:null,hangingIndent:null}).scrollIntoView()),true},Ae=(n,t)=>{let{$from:e}=n.selection,r=e.parent;if(r.type.name!=="paragraph"||!r.attrs.numPr)return false;let a=r.attrs.numPr.ilvl||0;if(!t)return true;let o=e.before(e.depth);return a<=0?t(n.tr.setNodeMarkup(o,void 0,{...r.attrs,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null,indentLeft:null,indentFirstLine:null,hangingIndent:null}).scrollIntoView()):t(n.tr.setNodeMarkup(o,void 0,{...r.attrs,numPr:{...r.attrs.numPr,ilvl:a-1},indentLeft:null,indentFirstLine:null,hangingIndent:null}).scrollIntoView()),true},Re=(n,t)=>{let{$from:e,$to:r}=n.selection;if(!t)return true;let a=n.tr,o=new Set;return n.doc.nodesBetween(e.pos,r.pos,(s,i)=>{s.type.name==="paragraph"&&s.attrs.numPr&&!o.has(i)&&(o.add(i),a=a.setNodeMarkup(i,void 0,{...s.attrs,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null}));}),t(a.scrollIntoView()),true};function Gn(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"?false:!!e.attrs.numPr?.numId}function jn(n){let{$from:t}=n.selection,e=t.parent;return e.type.name!=="paragraph"||!e.attrs.numPr?.numId?null:{numId:e.attrs.numPr.numId,ilvl:e.attrs.numPr.ilvl||0}}function Ne(){return (n,t)=>{let{$from:e,empty:r}=n.selection;if(!r)return false;let a=e.parent;if(a.type.name!=="paragraph"||!a.attrs.numPr||a.textContent.length>0)return false;if(t){let s=n.tr.setNodeMarkup(e.before(),void 0,{...a.attrs,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null});t(s);}return true}}function Fe(){return (n,t)=>{let{$from:e,empty:r}=n.selection;if(!r)return false;let a=e.parent;if(a.type.name!=="paragraph"||!a.attrs.numPr)return false;if(t){let{tr:s}=n,i=e.pos;s.split(i,1,[{type:n.schema.nodes.paragraph,attrs:{...a.attrs}}]),t(s.scrollIntoView());}return true}}function ve(){return (n,t)=>{let{$from:e,empty:r}=n.selection;if(!r||e.parentOffset!==0)return false;let a=e.parent;if(a.type.name!=="paragraph"||!a.attrs.numPr)return false;if(t){let s=n.tr.setNodeMarkup(e.before(),void 0,{...a.attrs,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null});t(s);}return true}}function $e(){return (n,t)=>{let{$from:e,$to:r}=n.selection,a=[];if(n.doc.nodesBetween(e.pos,r.pos,(o,s)=>{o.type.name==="paragraph"&&o.attrs.numPr&&(o.attrs.numPr.ilvl??0)<8&&a.push({pos:s,attrs:o.attrs});}),a.length===0)return false;if(t){let o=n.tr;for(let{pos:s,attrs:i}of a){let l=i.numPr;o=o.setNodeMarkup(s,void 0,{...i,numPr:{...l,ilvl:(l.ilvl??0)+1},indentLeft:null,indentFirstLine:null,hangingIndent:null});}t(o);}return true}}function Le(){return (n,t)=>{let{$from:e,$to:r}=n.selection,a=[];if(n.doc.nodesBetween(e.pos,r.pos,(o,s)=>{o.type.name==="paragraph"&&o.attrs.numPr&&a.push({pos:s,attrs:o.attrs});}),a.length===0)return false;if(t){let o=n.tr;for(let{pos:s,attrs:i}of a){let l=i.numPr,d=l.ilvl??0;d<=0?o=o.setNodeMarkup(s,void 0,{...i,numPr:null,listIsBullet:null,listNumFmt:null,listMarker:null,indentLeft:null,indentFirstLine:null,hangingIndent:null}):o=o.setNodeMarkup(s,void 0,{...i,numPr:{...l,ilvl:d-1},indentLeft:null,indentFirstLine:null,hangingIndent:null});}t(o);}return true}}function Be(){return (n,t)=>{let{schema:e}=n,r=e.nodes.tab;if(!r)return false;if(t){let a=n.tr.replaceSelectionWith(r.create());t(a.scrollIntoView());}return true}}var dt=b({name:"list",priority:a$1.High,onSchemaReady(){return {commands:{toggleBulletList:()=>Ce,toggleNumberedList:()=>Pe,increaseListLevel:()=>Ie,decreaseListLevel:()=>Ae,removeList:()=>Re},keyboardShortcuts:{Tab:v(c$1(),$e(),Be()),"Shift-Tab":v(d$1(),Le()),"Shift-Enter":()=>false,Enter:v(Ne(),Fe()),Backspace:ve()}}}});var A=new PluginKey("paragraphChangeTracker");function ut(n){let t=0;return n.descendants(e=>{e.type.name==="paragraph"&&t++;}),t}function $(n,t,e){let r=new Set,a=false;return n.nodesBetween(t,e,o=>{if(o.type.name==="paragraph"){let s=o.attrs.paraId;s?r.add(s):a=true;}}),{ids:r,hasUntracked:a}}function Xe(n,t,e){let r=Math.min(t,e),a=Math.max(t,e),o=a>r?a:r+1,s=$(n,r,o);if(s.ids.size>0||s.hasUntracked)return s;try{let i=n.resolve(r);for(let l=i.depth;l>=0;l--){let d=i.node(l);if(d.type.name==="paragraph"){let c=d.attrs.paraId;return c?{ids:new Set([c]),hasUntracked:!1}:{ids:new Set,hasUntracked:!0}}}}catch{}return {ids:new Set,hasUntracked:false}}function Ve(){return new Plugin({key:A,state:{init(n,t){return {changedParaIds:new Set,structuralChange:false,hasUntrackedChanges:false,paragraphCount:ut(t.doc)}},apply(n,t){if(n.getMeta(A)==="clear")return {changedParaIds:new Set,structuralChange:false,hasUntrackedChanges:false,paragraphCount:t.paragraphCount};if(!n.docChanged)return t;let e=ut(n.doc),r={changedParaIds:new Set(t.changedParaIds),structuralChange:t.structuralChange,hasUntrackedChanges:t.hasUntrackedChanges,paragraphCount:e};t.paragraphCount!==e&&(r.structuralChange=true);for(let a=0;a<n.steps.length;a++){let o=n.steps[a],s=n.mapping.slice(a+1);if(o instanceof AddMarkStep||o instanceof RemoveMarkStep){let l=s.map(o.from,1),d=s.map(o.to,-1);if(d<=l)continue;let{ids:c,hasUntracked:u}=Xe(n.doc,l,d);for(let f of c)r.changedParaIds.add(f);u&&(r.hasUntrackedChanges=true);continue}if(o instanceof AddNodeMarkStep||o instanceof RemoveNodeMarkStep){let l=s.map(o.pos,1),d=n.doc.nodeAt(l);if(!d)continue;let c=l+d.nodeSize,{ids:u,hasUntracked:f}=$(n.doc,l,c);for(let g of u)r.changedParaIds.add(g);f&&(r.hasUntrackedChanges=true);continue}o.getMap().forEach((l,d,c,u)=>{let f=s.map(c,1),g=s.map(u,-1);if(g<f)return;let{ids:m,hasUntracked:k}=$(n.doc,f,g);for(let y of m)r.changedParaIds.add(y);k&&(r.hasUntrackedChanges=true);});}return r}}})}function L(n){return A.getState(n)}function tr(n){return L(n)?.changedParaIds??new Set}function er(n){return L(n)?.structuralChange??false}function nr(n){return L(n)?.hasUntrackedChanges??false}function rr(n){return n.tr.setMeta(A,"clear")}var ct=b({name:"paragraphChangeTracker",defaultOptions:{},onSchemaReady(){return {plugins:[Ve()]}}});var B=new PluginKey("paraIdAllocator");function pt(n){let t=new Set,e=[];return n.descendants((r,a)=>{if(r.type.name!=="paragraph")return;let o=r.attrs.paraId;if(!o||t.has(o)){let s=a$4();for(;t.has(s);)s=a$4();t.add(s),e.push({pos:a,attrs:{...r.attrs,paraId:s}});}else t.add(o);return false}),e}function lr(n){let t=pt(n.doc);if(t.length===0)return n;let e=n.tr;for(let r of t)e.setNodeMarkup(r.pos,void 0,r.attrs);return e.setMeta(B,"allocated"),e.setMeta("addToHistory",false),n.apply(e)}function Ge(){return new Plugin({key:B,appendTransaction(n,t,e){if(!n.some(o=>o.docChanged))return null;let r=pt(e.doc);if(r.length===0)return null;let a=e.tr;for(let o of r)a.setNodeMarkup(o.pos,void 0,o.attrs);return a.setMeta(B,"allocated"),a.setMeta("addToHistory",false),a}})}var mt=b({name:"paraIdAllocator",onSchemaReady(){return {plugins:[Ge()]}}});var ft=c({name:"doc",schemaNodeName:"doc",nodeSpec:{content:"(paragraph | horizontalRule | pageBreak | table | textBox | blockSdt)+",attrs:{defaultTabStopTwips:{default:null},watermark:{default:null}}}});var gt=c({name:"text",schemaNodeName:"text",nodeSpec:{group:"inline"}});var xt=b({name:"history",defaultOptions:{depth:100,newGroupDelay:500},onSchemaReady(n,t){return {plugins:[history({depth:t.depth,newGroupDelay:t.newGroupDelay})],commands:{undo:()=>undo,redo:()=>redo},keyboardShortcuts:{"Mod-z":undo,"Mod-y":redo,"Mod-Shift-z":redo}}}});var kt=d({name:"bold",schemaMarkName:"bold",markSpec:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs(n){let t=n.style?.fontWeight;return t==="normal"||t==="400"?false:null}},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2})$/.test(n)?null:false}],toDOM(){return ["strong",0]}},onSchemaReady(n){return {commands:{toggleBold:()=>toggleMark(n.schema.marks.bold)},keyboardShortcuts:{"Mod-b":toggleMark(n.schema.marks.bold)}}}});var bt=d({name:"italic",schemaMarkName:"italic",markSpec:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:n=>n==="italic"?null:false}],toDOM(){return ["em",0]}},onSchemaReady(n){return {commands:{toggleItalic:()=>toggleMark(n.schema.marks.italic)},keyboardShortcuts:{"Mod-i":toggleMark(n.schema.marks.italic)}}}});var Tt=d({name:"underline",schemaMarkName:"underline",markSpec:{attrs:{style:{default:"single"},color:{default:null}},parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:n=>n.includes("underline")?{}:false}],toDOM(n){let t=n.attrs,e=["text-decoration: underline"];if(t.style&&t.style!=="single"){let a={double:"double",dotted:"dotted",dash:"dashed",wave:"wavy"}[t.style];a&&e.push(`text-decoration-style: ${a}`);}return t.color?.rgb&&e.push(`text-decoration-color: #${t.color.rgb}`),["span",{style:e.join("; ")},0]}},onSchemaReady(n){return {commands:{toggleUnderline:()=>toggleMark(n.schema.marks.underline),setUnderlineStyle:(t,e)=>c$2(n.schema.marks.underline,{style:t,color:e})},keyboardShortcuts:{"Mod-u":toggleMark(n.schema.marks.underline)}}}});var Mt=d({name:"strike",schemaMarkName:"strike",markSpec:{attrs:{double:{default:false}},parseDOM:[{tag:"s"},{tag:"strike"},{tag:"del"},{style:"text-decoration",getAttrs:n=>n.includes("line-through")?{}:false}],toDOM(){return ["s",0]}},onSchemaReady(n){return {commands:{toggleStrike:()=>toggleMark(n.schema.marks.strike)}}}});var wt=d({name:"textColor",schemaMarkName:"textColor",markSpec:{attrs:{rgb:{default:null},themeColor:{default:null},themeTint:{default:null},themeShade:{default:null}},parseDOM:[{style:"color",getAttrs:n=>{let e=n.match(/#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})/);return e?{rgb:e[1].toUpperCase()}:false}}],toDOM(n){let t=n.attrs,e=a$2({color:t});return ["span",{style:e.color?`color: ${e.color}`:""},0]}},onSchemaReady(n){return {commands:{setTextColor:t=>!t.rgb&&!t.themeColor?d$2(n.schema.marks.textColor):c$2(n.schema.marks.textColor,t),clearTextColor:()=>d$2(n.schema.marks.textColor)}}}});var Ct=d({name:"highlight",schemaMarkName:"highlight",markSpec:{attrs:{color:{default:"yellow"}},parseDOM:[{tag:"mark"},{style:"background-color",getAttrs:n=>n&&n!=="transparent"&&n!=="inherit"?{color:n}:false}],toDOM(n){let t=n.attrs.color;return ["mark",{style:`background-color: ${o(t)}`},0]}},onSchemaReady(n){return {commands:{setHighlight:t=>!t||t==="none"?d$2(n.schema.marks.highlight):c$2(n.schema.marks.highlight,{color:t}),clearHighlight:()=>d$2(n.schema.marks.highlight)}}}});var Pt=d({name:"fontSize",schemaMarkName:"fontSize",markSpec:{attrs:{size:{default:24}},parseDOM:[{style:"font-size",getAttrs:n=>{let t=n,e=t.match(/^([\d.]+)px$/);if(e){let o=parseFloat(e[1])*.75;return {size:Math.round(o*2)}}let r=t.match(/^([\d.]+)pt$/);return r?{size:Math.round(parseFloat(r[1])*2)}:false}}],toDOM(n){let e=n.attrs.size/2,r=(e*1.15).toFixed(2);return ["span",{style:`font-size: ${e}pt; line-height: ${r}pt`},0]}},onSchemaReady(n){return {commands:{setFontSize:t=>c$2(n.schema.marks.fontSize,{size:t}),clearFontSize:()=>d$2(n.schema.marks.fontSize)}}}});var It=d({name:"fontFamily",schemaMarkName:"fontFamily",markSpec:{attrs:{ascii:{default:null},hAnsi:{default:null},eastAsia:{default:null},cs:{default:null},asciiTheme:{default:null},hAnsiTheme:{default:null},eastAsiaTheme:{default:null},csTheme:{default:null}},parseDOM:[{style:"font-family",getAttrs:n=>{let e=n.split(",")[0].trim().replace(/['"]/g,"");return e?{ascii:e}:false}}],toDOM(n){let t=n.attrs,e=t.ascii||t.hAnsi;return e?["span",{style:`font-family: ${e.includes(" ")?`"${e}"`:e}, sans-serif`},0]:["span",0]}},onSchemaReady(n){return {commands:{setFontFamily:t=>c$2(n.schema.marks.fontFamily,{ascii:t,hAnsi:t}),clearFontFamily:()=>d$2(n.schema.marks.fontFamily)}}}});var At=d({name:"superscript",schemaMarkName:"superscript",markSpec:{excludes:"subscript",parseDOM:[{tag:"sup"}],toDOM(){return ["sup",0]}},onSchemaReady(n){return {commands:{toggleSuperscript:()=>toggleMark(n.schema.marks.superscript)}}}});var Rt=d({name:"subscript",schemaMarkName:"subscript",markSpec:{excludes:"superscript",parseDOM:[{tag:"sub"}],toDOM(){return ["sub",0]}},onSchemaReady(n){return {commands:{toggleSubscript:()=>toggleMark(n.schema.marks.subscript)}}}});var Nt=d({name:"allCaps",schemaMarkName:"allCaps",markSpec:{parseDOM:[{style:"text-transform",getAttrs:n=>n==="uppercase"?{}:false}],toDOM(){return ["span",{style:"text-transform: uppercase"},0]}}});var Ft=d({name:"smallCaps",schemaMarkName:"smallCaps",markSpec:{parseDOM:[{style:"font-variant",getAttrs:n=>n==="small-caps"?{}:false}],toDOM(){return ["span",{style:"font-variant: small-caps"},0]}}});var vt=d({name:"footnoteRef",schemaMarkName:"footnoteRef",markSpec:{attrs:{id:{},noteType:{default:"footnote"}},parseDOM:[{tag:"sup.docx-footnote-ref",getAttrs:n=>{let t=n;return {id:t.dataset.id||"",noteType:t.dataset.noteType||"footnote"}}}],toDOM(n){let t=n.attrs;return ["sup",{class:`docx-${t.noteType}-ref`,"data-id":t.id,"data-note-type":t.noteType},0]}},onSchemaReady(n){let{schema:t}=n;function e(a){return o=>(s,i)=>{if(!i)return true;let l=t.marks.footnoteRef.create({id:String(o),noteType:a}),d=t.text(String(o),[l]),c=s.tr.replaceSelectionWith(d,false);return i(c.scrollIntoView()),true}}let r=(a,o)=>{let{$from:s,$to:i}=a.selection;if(!o)return true;let l=a.tr,d=t.marks.footnoteRef;return l=l.removeMark(s.pos,i.pos,d),o(l.scrollIntoView()),true};return {commands:{insertFootnote:e("footnote"),insertEndnote:e("endnote"),deleteNoteRef:()=>r}}}});function Ze(n){return n/2*(96/72)}var $t=d({name:"characterSpacing",schemaMarkName:"characterSpacing",markSpec:{attrs:{spacing:{default:null},position:{default:null},scale:{default:null},kerning:{default:null}},parseDOM:[{tag:"span.docx-char-spacing",getAttrs:n=>{let t=n;return {spacing:t.dataset.spacing?Number(t.dataset.spacing):null,position:t.dataset.position?Number(t.dataset.position):null,scale:t.dataset.scale?Number(t.dataset.scale):null,kerning:t.dataset.kerning?Number(t.dataset.kerning):null}}}],toDOM(n){let t=n.attrs,e=[],r={class:"docx-char-spacing"};if(t.spacing!=null&&t.spacing!==0&&(e.push(`letter-spacing: ${q(d$3(t.spacing))}`),r["data-spacing"]=String(t.spacing)),t.position!=null&&t.position!==0){let a=Ze(t.position);e.push(`vertical-align: ${q(a)}`),r["data-position"]=String(t.position);}return t.scale!=null&&t.scale!==100&&(e.push(`transform: scaleX(${t.scale/100})`),e.push("display: inline-block"),r["data-scale"]=String(t.scale)),t.kerning!=null&&(r["data-kerning"]=String(t.kerning)),e.length>0&&(r.style=e.join("; ")),["span",r,0]}}});var Lt=d({name:"comment",schemaMarkName:"comment",markSpec:{attrs:{commentId:{default:0}},inclusive:false,parseDOM:[{tag:"span.docx-comment",getAttrs(n){return {commentId:parseInt(n.dataset.commentId||"0",10)}}}],toDOM(n){return ["span",{class:"docx-comment","data-comment-id":String(n.attrs.commentId),style:"background-color: rgba(255, 212, 0, 0.25); border-bottom: 2px solid rgba(255, 212, 0, 0.6);"},0]}}});var Bt=d({name:"insertion",schemaMarkName:"insertion",markSpec:{attrs:{revisionId:{default:0},author:{default:""},date:{default:null},isMovePair:{default:false}},inclusive:false,parseDOM:[{tag:"span.docx-insertion",getAttrs(n){let t=n;return {revisionId:parseInt(t.dataset.revisionId||"0",10),author:t.dataset.author||"",date:t.dataset.date||null,isMovePair:t.dataset.movePair==="true"}}}],toDOM(n){return ["span",{class:"docx-insertion","data-revision-id":String(n.attrs.revisionId),"data-author":n.attrs.author,...n.attrs.date?{"data-date":n.attrs.date}:{},...n.attrs.isMovePair?{"data-move-pair":"true"}:{},style:"color: #2e7d32;"},0]}}}),Ot=d({name:"deletion",schemaMarkName:"deletion",markSpec:{attrs:{revisionId:{default:0},author:{default:""},date:{default:null},isMovePair:{default:false}},inclusive:false,parseDOM:[{tag:"span.docx-deletion",getAttrs(n){let t=n;return {revisionId:parseInt(t.dataset.revisionId||"0",10),author:t.dataset.author||"",date:t.dataset.date||null,isMovePair:t.dataset.movePair==="true"}}}],toDOM(n){return ["span",{class:"docx-deletion","data-revision-id":String(n.attrs.revisionId),"data-author":n.attrs.author,...n.attrs.date?{"data-date":n.attrs.date}:{},...n.attrs.isMovePair?{"data-move-pair":"true"}:{},style:"color: #c62828;"},0]}}});var Dt=d({name:"emboss",schemaMarkName:"emboss",markSpec:{parseDOM:[{tag:"span.docx-emboss"}],toDOM(){return ["span",{class:"docx-emboss",style:"text-shadow: 1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"},0]}}}),Ht=d({name:"imprint",schemaMarkName:"imprint",markSpec:{parseDOM:[{tag:"span.docx-imprint"}],toDOM(){return ["span",{class:"docx-imprint",style:"-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"},0]}}}),Wt=d({name:"textShadow",schemaMarkName:"textShadow",markSpec:{parseDOM:[{tag:"span.docx-text-shadow"}],toDOM(){return ["span",{class:"docx-text-shadow",style:"text-shadow: 1px 1px 2px rgba(0,0,0,0.3)"},0]}}}),zt=d({name:"emphasisMark",schemaMarkName:"emphasisMark",markSpec:{attrs:{type:{default:"dot"}},parseDOM:[{tag:"span.docx-emphasis-mark",getAttrs:n=>({type:n.dataset.emType||"dot"})}],toDOM(n){let t=n.attrs.type,e="filled dot";switch(t){case "dot":e="filled dot";break;case "comma":e="filled sesame";break;case "circle":e="filled circle";break;case "underDot":e="filled dot";break}let r=t==="underDot"?"under right":"over right";return ["span",{class:"docx-emphasis-mark","data-em-type":t,style:`text-emphasis: ${e}; text-emphasis-position: ${r}; -webkit-text-emphasis: ${e}; -webkit-text-emphasis-position: ${r}`},0]}}}),Ut=d({name:"textOutline",schemaMarkName:"textOutline",markSpec:{parseDOM:[{tag:"span.docx-text-outline"}],toDOM(){return ["span",{class:"docx-text-outline",style:"-webkit-text-stroke: 1px currentColor; -webkit-text-fill-color: transparent"},0]}}});var Xt=d({name:"hidden",schemaMarkName:"hidden",markSpec:{parseDOM:[{tag:"span.docx-hidden"}],toDOM(){return ["span",{class:"docx-hidden",style:"opacity: 0.4; text-decoration: underline dotted"},0]}}}),Vt=d({name:"rtl",schemaMarkName:"rtl",markSpec:{parseDOM:[{tag:"span[dir=rtl].docx-rtl"}],toDOM(){return ["span",{class:"docx-rtl",dir:"rtl"},0]}}}),Kt=d({name:"textEffect",schemaMarkName:"textEffect",markSpec:{attrs:{effect:{default:"blinkBackground"}},parseDOM:[{tag:"span.docx-text-effect",getAttrs:n=>{let e=n.dataset.effect;return e==="blinkBackground"||e==="lights"||e==="antsBlack"||e==="antsRed"||e==="shimmer"||e==="sparkle"?{effect:e}:false}}],toDOM(n){let t=n.attrs.effect;return ["span",{class:`docx-text-effect docx-text-effect-${t}`,"data-effect":t},0]}}});var _t=d({name:"runStyle",schemaMarkName:"runStyle",markSpec:{attrs:{styleId:{default:null}},parseDOM:[{tag:"span[data-run-style]",getAttrs:n=>{let t=n.dataset.runStyle;return t?{styleId:t}:false}}],toDOM(n){return ["span",{class:"docx-run-style","data-run-style":n.attrs.styleId},0]}}});var Gt=c({name:"hardBreak",schemaNodeName:"hardBreak",nodeSpec:{inline:true,group:"inline",selectable:false,parseDOM:[{tag:"br"}],toDOM(){return ["br"]}},onSchemaReady(n){let t=n.schema.nodes.hardBreak;return {keyboardShortcuts:{"Shift-Enter":(e,r)=>(r&&r(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),true)}}}});var jt=c({name:"tab",schemaNodeName:"tab",nodeSpec:{inline:true,group:"inline",selectable:false,parseDOM:[{tag:"span.docx-tab"}],toDOM(){return ["span",{class:"docx-tab",style:"display: inline-block; min-width: 16px; white-space: pre;"}," "]}}});function Qe(n,t,e){let r=()=>t.position?.horizontal&&t.position?.vertical?t.position:e?.initialPositionEmu?{horizontal:{relativeTo:"column",posOffset:e.initialPositionEmu.horizontalEmu},vertical:{relativeTo:"paragraph",posOffset:e.initialPositionEmu.verticalEmu}}:{horizontal:{relativeTo:"column",posOffset:0},vertical:{relativeTo:"paragraph",posOffset:0}};switch(n){case "inline":return {wrapType:"inline",displayMode:"inline",cssFloat:"none",wrapText:void 0,position:void 0,distTop:void 0,distBottom:void 0,distLeft:void 0,distRight:void 0};case "squareLeft":case "squareRight":{let a=n==="squareLeft"?"left":"right",o=n==="squareLeft"?"right":"left";return {wrapType:t.wrapType==="tight"||t.wrapType==="through"?t.wrapType:"square",displayMode:"float",cssFloat:a,wrapText:o,position:r()}}case "square":case "tight":case "through":{let a=t.cssFloat==="left"||t.cssFloat==="right"?t.cssFloat:"left";return {wrapType:n,displayMode:"float",cssFloat:a,wrapText:a==="left"?"right":"left",position:r()}}case "topAndBottom":return {wrapType:"topAndBottom",displayMode:"block",cssFloat:"none",wrapText:"bothSides",position:r()};case "behind":case "inFront":return {wrapType:n,displayMode:"float",cssFloat:"none",wrapText:"bothSides",position:r()}}}var qt=c({name:"image",schemaNodeName:"image",nodeSpec:{inline:true,group:"inline",marks:"_",draggable:true,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null},height:{default:null},rId:{default:null},wrapType:{default:"inline"},displayMode:{default:"inline"},cssFloat:{default:null},transform:{default:null},distTop:{default:null},distBottom:{default:null},distLeft:{default:null},distRight:{default:null},position:{default:null},borderWidth:{default:null},borderColor:{default:null},borderStyle:{default:null},wrapText:{default:null},hlinkHref:{default:null},cropTop:{default:null},cropRight:{default:null},cropBottom:{default:null},cropLeft:{default:null},opacity:{default:null},effectExtentTop:{default:null},effectExtentBottom:{default:null},effectExtentLeft:{default:null},effectExtentRight:{default:null},layoutInCell:{default:null},allowOverlap:{default:null}},parseDOM:[{tag:"img[src]",getAttrs(n){let t=n;return {src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||void 0,title:t.getAttribute("title")||void 0,width:t.width||void 0,height:t.height||void 0,rId:t.dataset.rid||void 0,wrapType:t.dataset.wrapType||"inline",displayMode:t.dataset.displayMode||"inline",cssFloat:t.dataset.cssFloat||void 0,transform:t.dataset.transform||void 0,borderWidth:t.dataset.borderWidth?Number(t.dataset.borderWidth):void 0,borderColor:t.dataset.borderColor||void 0,borderStyle:t.dataset.borderStyle||void 0}}}],toDOM(n){let t=n.attrs,e={src:t.src,class:"docx-image"};t.alt&&(e.alt=t.alt),t.title&&(e.title=t.title),t.rId&&(e["data-rid"]=t.rId),t.wrapType&&(e["data-wrap-type"]=t.wrapType),t.displayMode&&(e["data-display-mode"]=t.displayMode),t.cssFloat&&(e["data-css-float"]=t.cssFloat),t.transform&&(e["data-transform"]=t.transform),t.borderWidth&&(e["data-border-width"]=String(t.borderWidth)),t.borderColor&&(e["data-border-color"]=t.borderColor),t.borderStyle&&(e["data-border-style"]=t.borderStyle);let r=[];if(t.width&&(e.width=String(t.width),r.push(`width: ${t.width}px`)),t.height&&(e.height=String(t.height),r.push(`height: ${t.height}px`)),r.push("max-width: 100%"),t.width&&t.height?r.push("object-fit: contain"):r.push("height: auto"),t.displayMode==="float"&&t.cssFloat&&t.cssFloat!=="none"){r.push(`float: ${t.cssFloat}`),e.class+=` docx-image-float docx-image-float-${t.cssFloat}`;let a=t.distTop??0,o=t.distBottom??0,s=t.distLeft??0,i=t.distRight??0;t.cssFloat==="left"?r.push(`margin: ${a}px ${i||12}px ${o}px ${s}px`):r.push(`margin: ${a}px ${i}px ${o}px ${s||12}px`);}else if(t.displayMode==="block"){r.push("display: block"),r.push("margin-left: auto"),r.push("margin-right: auto"),e.class+=" docx-image-block";let a=t.distTop??0,o=t.distBottom??0;a>0&&r.push(`margin-top: ${a}px`),o>0&&r.push(`margin-bottom: ${o}px`);}if(t.transform&&r.push(`transform: ${t.transform}`),t.borderWidth&&t.borderWidth>0){let a=t.borderStyle||"solid",o=t.borderColor||"#000000";r.push(`border: ${t.borderWidth}px ${a} ${o}`);}return e.style=r.join("; "),["img",e]}},onSchemaReady(n){let t=n.schema.nodes.image,e=(r,a,o)=>(s,i)=>{let l=s.doc.nodeAt(r);if(!l||l.type!==t)return false;let d=l.attrs,c=Qe(a,{wrapType:d.wrapType,cssFloat:d.cssFloat,position:d.position},o);return d.wrapType===c.wrapType&&d.displayMode===c.displayMode&&d.cssFloat===c.cssFloat&&d.wrapText===c.wrapText&&d.position===c.position||i&&i(s.tr.setNodeMarkup(r,void 0,{...d,...c})),true};return {commands:{setImageWrapType:(r,a,o)=>e(r,a,o)}}}});var Yt=c({name:"textBox",schemaNodeName:"textBox",nodeSpec:{group:"block",content:"(paragraph | table)+",isolating:true,draggable:true,attrs:{width:{default:200},height:{default:null},textBoxId:{default:null},fillColor:{default:null},outlineWidth:{default:null},outlineColor:{default:null},outlineStyle:{default:null},marginTop:{default:4},marginBottom:{default:4},marginLeft:{default:7},marginRight:{default:7},verticalAlign:{default:null},displayMode:{default:"inline"},cssFloat:{default:null},wrapType:{default:"inline"},wrapText:{default:null},anchorTarget:{default:null},position:{default:null},distTop:{default:null},distBottom:{default:null},distLeft:{default:null},distRight:{default:null}},parseDOM:[{tag:"div.docx-textbox",getAttrs(n){let t=n;return {width:t.dataset.width?Number(t.dataset.width):void 0,height:t.dataset.height?Number(t.dataset.height):void 0,textBoxId:t.dataset.textboxId||void 0,fillColor:t.dataset.fillColor||void 0,outlineWidth:t.dataset.outlineWidth?Number(t.dataset.outlineWidth):void 0,outlineColor:t.dataset.outlineColor||void 0,outlineStyle:t.dataset.outlineStyle||void 0,marginTop:t.dataset.marginTop?Number(t.dataset.marginTop):void 0,marginBottom:t.dataset.marginBottom?Number(t.dataset.marginBottom):void 0,marginLeft:t.dataset.marginLeft?Number(t.dataset.marginLeft):void 0,marginRight:t.dataset.marginRight?Number(t.dataset.marginRight):void 0,verticalAlign:t.dataset.verticalAlign||void 0,displayMode:t.dataset.displayMode||void 0,cssFloat:t.dataset.cssFloat||void 0,wrapType:t.dataset.wrapType||void 0,wrapText:t.dataset.wrapText||void 0,anchorTarget:t.dataset.anchorTarget||void 0,position:t.dataset.position?JSON.parse(t.dataset.position):void 0,distTop:t.dataset.distTop?Number(t.dataset.distTop):void 0,distBottom:t.dataset.distBottom?Number(t.dataset.distBottom):void 0,distLeft:t.dataset.distLeft?Number(t.dataset.distLeft):void 0,distRight:t.dataset.distRight?Number(t.dataset.distRight):void 0}}}],toDOM(n){let t=n.attrs,e={class:"docx-textbox"};t.width&&(e["data-width"]=String(t.width)),t.height&&(e["data-height"]=String(t.height)),t.textBoxId&&(e["data-textbox-id"]=t.textBoxId),t.fillColor&&(e["data-fill-color"]=t.fillColor),t.outlineWidth&&(e["data-outline-width"]=String(t.outlineWidth)),t.outlineColor&&(e["data-outline-color"]=t.outlineColor),t.outlineStyle&&(e["data-outline-style"]=t.outlineStyle),t.marginTop!=null&&(e["data-margin-top"]=String(t.marginTop)),t.marginBottom!=null&&(e["data-margin-bottom"]=String(t.marginBottom)),t.marginLeft!=null&&(e["data-margin-left"]=String(t.marginLeft)),t.marginRight!=null&&(e["data-margin-right"]=String(t.marginRight)),t.verticalAlign&&(e["data-vertical-align"]=t.verticalAlign),t.displayMode&&(e["data-display-mode"]=t.displayMode),t.cssFloat&&(e["data-css-float"]=t.cssFloat),t.wrapType&&(e["data-wrap-type"]=t.wrapType),t.wrapText&&(e["data-wrap-text"]=t.wrapText),t.anchorTarget&&(e["data-anchor-target"]=t.anchorTarget),t.position&&(e["data-position"]=JSON.stringify(t.position)),t.distTop!=null&&(e["data-dist-top"]=String(t.distTop)),t.distBottom!=null&&(e["data-dist-bottom"]=String(t.distBottom)),t.distLeft!=null&&(e["data-dist-left"]=String(t.distLeft)),t.distRight!=null&&(e["data-dist-right"]=String(t.distRight));let r=[];if(t.width&&r.push(`width: ${t.width}px`),t.height&&r.push(`min-height: ${t.height}px`),t.fillColor&&r.push(`background-color: ${t.fillColor}`),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",d=t.outlineColor||"#000000";r.push(`border: ${t.outlineWidth}px ${l} ${d}`);}else r.push("border: 1px solid var(--doc-border, #d1d5db)");let a=t.marginTop??4,o=t.marginBottom??4,s=t.marginLeft??7,i=t.marginRight??7;return r.push(`padding: ${a}px ${i}px ${o}px ${s}px`),t.verticalAlign==="middle"||t.verticalAlign==="center"?(r.push("display: flex"),r.push("flex-direction: column"),r.push("justify-content: center")):t.verticalAlign==="bottom"&&(r.push("display: flex"),r.push("flex-direction: column"),r.push("justify-content: flex-end")),t.displayMode==="float"&&t.cssFloat&&t.cssFloat!=="none"?(r.push(`float: ${t.cssFloat}`),r.push("margin: 4px 8px")):t.displayMode==="block"&&(r.push("margin-left: auto"),r.push("margin-right: auto")),r.push("box-sizing: border-box"),r.push("overflow: hidden"),r.push("position: relative"),e.style=r.join("; "),["div",e,0]}}});function tn(n,t,e){switch(n){case "ellipse":case "oval":return `<ellipse cx="${t/2}" cy="${e/2}" rx="${t/2}" ry="${e/2}" />`;case "roundRect":return `<rect x="0" y="0" width="${t}" height="${e}" rx="${Math.min(t,e)*.1}" />`;case "triangle":case "isosTriangle":return `<polygon points="${t/2},0 ${t},${e} 0,${e}" />`;case "diamond":return `<polygon points="${t/2},0 ${t},${e/2} ${t/2},${e} 0,${e/2}" />`;case "line":case "straightConnector1":return `<line x1="0" y1="${e/2}" x2="${t}" y2="${e/2}" />`;default:return `<rect x="0" y="0" width="${t}" height="${e}" />`}}function en(n,t){let e="";try{e=JSON.parse(t.gradientStops||"[]").map(u=>`<stop offset="${Math.round(u.position/1e3)}%" stop-color="${u.color}" />`).join("");}catch{return ""}let r=t.gradientType||"linear";if(r==="radial"||r==="rectangular"||r==="path")return `<radialGradient id="${n}" cx="50%" cy="50%" r="50%">${e}</radialGradient>`;let o=((t.gradientAngle||0)-90)*Math.PI/180,s=Math.round(50+50*Math.cos(o+Math.PI)),i=Math.round(50+50*Math.sin(o+Math.PI)),l=Math.round(50+50*Math.cos(o)),d=Math.round(50+50*Math.sin(o));return `<linearGradient id="${n}" x1="${s}%" y1="${i}%" x2="${l}%" y2="${d}%">${e}</linearGradient>`}var Jt=c({name:"shape",schemaNodeName:"shape",nodeSpec:{inline:true,group:"inline",marks:"_",draggable:true,atom:true,attrs:{shapeType:{default:"rect"},shapeId:{default:null},width:{default:100},height:{default:80},fillColor:{default:null},fillType:{default:"solid"},gradientType:{default:null},gradientAngle:{default:null},gradientStops:{default:null},outlineWidth:{default:1},outlineColor:{default:"#000000"},outlineStyle:{default:"solid"},transform:{default:null},displayMode:{default:"inline"},cssFloat:{default:null},wrapType:{default:"inline"},shadowColor:{default:null},shadowBlur:{default:null},shadowOffsetX:{default:null},shadowOffsetY:{default:null},glowColor:{default:null},glowRadius:{default:null}},parseDOM:[{tag:"span.docx-shape",getAttrs(n){let t=n;return {shapeType:t.dataset.shapeType||"rect",shapeId:t.dataset.shapeId||void 0,width:t.dataset.width?Number(t.dataset.width):void 0,height:t.dataset.height?Number(t.dataset.height):void 0,fillColor:t.dataset.fillColor||void 0,fillType:t.dataset.fillType||"solid",gradientType:t.dataset.gradientType||void 0,gradientAngle:t.dataset.gradientAngle?Number(t.dataset.gradientAngle):void 0,gradientStops:t.dataset.gradientStops||void 0,outlineWidth:t.dataset.outlineWidth?Number(t.dataset.outlineWidth):void 0,outlineColor:t.dataset.outlineColor||void 0,outlineStyle:t.dataset.outlineStyle||void 0,transform:t.dataset.transform||void 0,displayMode:t.dataset.displayMode||void 0,cssFloat:t.dataset.cssFloat||void 0,wrapType:t.dataset.wrapType||void 0,shadowColor:t.dataset.shadowColor||void 0,shadowBlur:t.dataset.shadowBlur?Number(t.dataset.shadowBlur):void 0,shadowOffsetX:t.dataset.shadowOffsetX?Number(t.dataset.shadowOffsetX):void 0,shadowOffsetY:t.dataset.shadowOffsetY?Number(t.dataset.shadowOffsetY):void 0,glowColor:t.dataset.glowColor||void 0,glowRadius:t.dataset.glowRadius?Number(t.dataset.glowRadius):void 0}}}],toDOM(n){let t=n.attrs,e=t.width||100,r=t.height||80,a={class:"docx-shape","data-shape-type":t.shapeType||"rect"};t.shapeId&&(a["data-shape-id"]=t.shapeId),a["data-width"]=String(e),a["data-height"]=String(r),t.fillColor&&(a["data-fill-color"]=t.fillColor),t.fillType&&(a["data-fill-type"]=t.fillType),t.gradientType&&(a["data-gradient-type"]=t.gradientType),t.gradientAngle!=null&&(a["data-gradient-angle"]=String(t.gradientAngle)),t.gradientStops&&(a["data-gradient-stops"]=t.gradientStops),t.outlineWidth&&(a["data-outline-width"]=String(t.outlineWidth)),t.outlineColor&&(a["data-outline-color"]=t.outlineColor),t.outlineStyle&&(a["data-outline-style"]=t.outlineStyle),t.transform&&(a["data-transform"]=t.transform),t.displayMode&&(a["data-display-mode"]=t.displayMode),t.cssFloat&&(a["data-css-float"]=t.cssFloat),t.wrapType&&(a["data-wrap-type"]=t.wrapType),t.shadowColor&&(a["data-shadow-color"]=t.shadowColor),t.shadowBlur!=null&&(a["data-shadow-blur"]=String(t.shadowBlur)),t.shadowOffsetX!=null&&(a["data-shadow-offset-x"]=String(t.shadowOffsetX)),t.shadowOffsetY!=null&&(a["data-shadow-offset-y"]=String(t.shadowOffsetY)),t.glowColor&&(a["data-glow-color"]=t.glowColor),t.glowRadius!=null&&(a["data-glow-radius"]=String(t.glowRadius));let o=["display: inline-block",`width: ${e}px`,`height: ${r}px`,"vertical-align: middle","line-height: 0"];if(t.transform&&o.push(`transform: ${t.transform}`),t.displayMode==="float"&&t.cssFloat&&t.cssFloat!=="none"?(o.push(`float: ${t.cssFloat}`),o.push("margin: 4px 8px")):t.displayMode==="block"&&(o.push("display: block"),o.push("margin: 4px auto")),t.shadowColor){let m=t.shadowOffsetX||2,k=t.shadowOffsetY||2,y=t.shadowBlur||4;o.push(`filter: drop-shadow(${m}px ${k}px ${y}px ${t.shadowColor})`);}if(t.glowColor&&t.glowRadius){let m=o.find(y=>y.startsWith("filter:")),k=`drop-shadow(0 0 ${t.glowRadius}px ${t.glowColor})`;if(m){let y=o.indexOf(m);o[y]=m+" "+k;}else o.push(`filter: ${k}`);}a.style=o.join("; ");let s="",i;if(t.fillType==="gradient"&&t.gradientStops){let m=`grad-${t.shapeId||Math.random().toString(36).slice(2,8)}`;i=`url(#${m})`,s=en(m,t);}else i=t.fillType==="none"?"none":t.fillColor||"#ffffff";let l=t.outlineWidth||1,d=t.outlineColor||"#000000",c=t.outlineStyle==="dashed"?' stroke-dasharray="8 4"':t.outlineStyle==="dotted"?' stroke-dasharray="2 2"':"",u=tn(t.shapeType||"rect",e,r),f=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${r}" viewBox="0 0 ${e} ${r}" style="fill:${i};stroke:${d};stroke-width:${l}${c}">`+(s?`<defs>${s}</defs>`:"")+u+"</svg>",g=document.createElement("span");return Object.entries(a).forEach(([m,k])=>{g.setAttribute(m,k);}),g.innerHTML=f,{dom:g}}}});var Zt=c({name:"horizontalRule",schemaNodeName:"horizontalRule",nodeSpec:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return ["hr"]}}});var Qt=c({name:"pageBreak",schemaNodeName:"pageBreak",nodeSpec:{group:"block",atom:true,selectable:true,parseDOM:[{tag:"div.docx-page-break"}],toDOM(){return ["div",{class:"docx-page-break"}]}}});var te=c({name:"field",schemaNodeName:"field",nodeSpec:{inline:true,group:"inline",atom:true,selectable:true,attrs:{fieldType:{default:"UNKNOWN"},instruction:{default:""},displayText:{default:""},fieldKind:{default:"simple"},fldLock:{default:false},dirty:{default:false}},parseDOM:[{tag:"span.docx-field",getAttrs(n){let t=n;return {fieldType:t.dataset.fieldType||"UNKNOWN",instruction:t.dataset.instruction||"",displayText:t.textContent||"",fieldKind:t.dataset.fieldKind||"simple",fldLock:t.dataset.fldLock==="true",dirty:t.dataset.dirty==="true"}}}],toDOM(n){let{fieldType:t,instruction:e,displayText:r,fieldKind:a,fldLock:o,dirty:s}=n.attrs,i=r||"";if(!i)switch(t){case "PAGE":i="{page}";break;case "NUMPAGES":i="{pages}";break;case "DATE":case "TIME":case "CREATEDATE":case "SAVEDATE":i=new Date().toLocaleDateString();break;case "MERGEFIELD":i=`\xAB${e.replace(/^MERGEFIELD\s+/i,"").replace(/\s*\\.*$/,"")}\xBB`;break;default:i=`{${t}}`;}return ["span",{class:`docx-field docx-field-${t.toLowerCase()}`,"data-field-type":t,"data-instruction":e,"data-field-kind":a,...o?{"data-fld-lock":"true"}:{},...s?{"data-dirty":"true"}:{},style:"outline: 1px solid rgba(200,200,200,0.4); padding: 0 1px; border-radius: 2px;"},i]}}});var ee=c({name:"sdt",schemaNodeName:"sdt",nodeSpec:{inline:true,group:"inline",content:"inline*",attrs:{sdtType:{default:"richText"},id:{default:null},alias:{default:null},tag:{default:null},lock:{default:null},placeholder:{default:null},showingPlaceholder:{default:false},dateFormat:{default:null},listItems:{default:null},checked:{default:null},dataBinding:{default:null},rawPropertiesXml:{default:null},rawEndPropertiesXml:{default:null}},parseDOM:[{tag:"span.docx-sdt",getAttrs(n){let t=n,e=t.dataset.id,r=e!=null&&e!==""?parseInt(e,10):NaN;return {sdtType:t.dataset.sdtType||"richText",id:Number.isNaN(r)?null:r,alias:t.dataset.alias||null,tag:t.dataset.tag||null,lock:t.dataset.lock||null,placeholder:t.dataset.placeholder||null,showingPlaceholder:t.dataset.showingPlaceholder==="true",dateFormat:t.dataset.dateFormat||null,listItems:t.dataset.listItems||null,checked:t.dataset.checked==="true"?true:t.dataset.checked==="false"?false:null,dataBinding:t.dataset.dataBinding||null,rawPropertiesXml:t.dataset.rawPropertiesXml||null,rawEndPropertiesXml:t.dataset.rawEndPropertiesXml||null}}}],toDOM(n){let t=n.attrs,e={class:`docx-sdt docx-sdt-${t.sdtType}`,"data-sdt-type":String(t.sdtType)};return t.id!=null&&(e["data-id"]=String(t.id)),t.alias&&(e["data-alias"]=String(t.alias)),t.tag&&(e["data-tag"]=String(t.tag)),t.lock&&(e["data-lock"]=String(t.lock)),t.placeholder&&(e["data-placeholder"]=String(t.placeholder)),t.showingPlaceholder&&(e["data-showing-placeholder"]="true"),t.dateFormat&&(e["data-date-format"]=String(t.dateFormat)),t.listItems&&(e["data-list-items"]=String(t.listItems)),t.checked!=null&&(e["data-checked"]=String(t.checked)),t.dataBinding&&(e["data-data-binding"]=String(t.dataBinding)),t.rawPropertiesXml&&(e["data-raw-properties-xml"]=String(t.rawPropertiesXml)),t.rawEndPropertiesXml&&(e["data-raw-end-properties-xml"]=String(t.rawEndPropertiesXml)),t.sdtType==="checkbox"?e.style="border: 1px solid #ccc; border-radius: 3px; padding: 0 2px; display: inline;":e.style="border-bottom: 1px dashed #999; padding: 0 1px; display: inline;",["span",e,0]}}});var ne=c({name:"blockSdt",schemaNodeName:"blockSdt",nodeSpec:{group:"block",content:"(paragraph | horizontalRule | pageBreak | table | textBox | blockSdt)+",isolating:true,defining:true,attrs:{sdtType:{default:"richText"},id:{default:null},alias:{default:null},tag:{default:null},lock:{default:null},placeholder:{default:null},showingPlaceholder:{default:false},dateFormat:{default:null},listItems:{default:null},checked:{default:null},dataBinding:{default:null},rawPropertiesXml:{default:null},rawEndPropertiesXml:{default:null}},parseDOM:[{tag:"div.docx-block-sdt",getAttrs(n){let t=n,e=t.dataset.id,r=e!=null&&e!==""?parseInt(e,10):NaN;return {sdtType:t.dataset.sdtType||"richText",id:Number.isNaN(r)?null:r,alias:t.dataset.alias||null,tag:t.dataset.tag||null,lock:t.dataset.lock||null,placeholder:t.dataset.placeholder||null,showingPlaceholder:t.dataset.showingPlaceholder==="true",dateFormat:t.dataset.dateFormat||null,listItems:t.dataset.listItems||null,checked:t.dataset.checked==="true"?true:t.dataset.checked==="false"?false:null,rawPropertiesXml:t.dataset.rawPropertiesXml||null,rawEndPropertiesXml:t.dataset.rawEndPropertiesXml||null}}}],toDOM(n){let t=n.attrs,e={class:`docx-block-sdt docx-block-sdt-${t.sdtType}`,"data-sdt-type":String(t.sdtType)};return t.id!=null&&(e["data-id"]=String(t.id)),t.alias&&(e["data-alias"]=String(t.alias)),t.tag&&(e["data-tag"]=String(t.tag)),t.lock&&(e["data-lock"]=String(t.lock)),t.placeholder&&(e["data-placeholder"]=String(t.placeholder)),t.showingPlaceholder&&(e["data-showing-placeholder"]="true"),t.dateFormat&&(e["data-date-format"]=String(t.dateFormat)),t.listItems&&(e["data-list-items"]=String(t.listItems)),t.checked!=null&&(e["data-checked"]=String(t.checked)),t.rawPropertiesXml&&(e["data-raw-properties-xml"]=String(t.rawPropertiesXml)),t.rawEndPropertiesXml&&(e["data-raw-end-properties-xml"]=String(t.rawEndPropertiesXml)),["div",e,0]}}});var re=c({name:"math",schemaNodeName:"math",nodeSpec:{inline:true,group:"inline",atom:true,selectable:true,attrs:{display:{default:"inline"},ommlXml:{default:""},plainText:{default:""}},parseDOM:[{tag:"span.docx-math",getAttrs(n){let t=n;return {display:t.dataset.display||"inline",ommlXml:t.dataset.ommlXml||"",plainText:t.textContent||""}}}],toDOM(n){let{display:t,ommlXml:e,plainText:r}=n.attrs,a=r||"[equation]";return ["span",{class:`docx-math docx-math-${t}`,"data-display":t,"data-omml-xml":e,style:'font-style: italic; font-family: "Cambria Math", "Latin Modern Math", serif; background: rgba(200,200,255,0.1); padding: 0 2px; border-radius: 2px;'},a]}}});var an=new PluginKey("emptyParagraphFormat");function on(n){return !!(n.bold||n.italic||n.underline||n.strike||n.doubleStrike||n.color||n.highlight||n.vertAlign)}function sn(n){return new Plugin({key:an,appendTransaction(t,e,r){if(!t.some(d=>d.selectionSet||d.docChanged))return null;let{selection:a}=r;if(!a.empty||r.storedMarks!==null)return null;let o=a.$from.parent;if(o.type.name!=="paragraph"||o.content.size!==0)return null;let s=o.attrs.defaultTextFormatting;if(!s||!on(s))return null;let i=g(s,n);if(i.length===0)return null;let l=r.tr.setStoredMarks(i);return l.setMeta("addToHistory",false),l}})}var ae=b({name:"emptyParagraphFormat",onSchemaReady(n){return {plugins:[sn(n.schema)]}}});var oe=b({name:"selectionTracker",defaultOptions:{},onSchemaReady(n,t){return {plugins:[c$3(t.onSelectionChange)],commands:{extractSelectionContext:()=>(e,r)=>(b$1(e),true)}}}});var un=new PluginKey("imageDrag"),ie=b({name:"imageDrag",onSchemaReady(n){return {plugins:[new Plugin({key:un,props:{handleDOMEvents:{dragstart(e,r){let{selection:a}=e.state;if(a instanceof NodeSelection&&a.node.type.name==="image"){e.dom.classList.add("pm-image-dragging");let o=r;if(o.dataTransfer){o.dataTransfer.effectAllowed="move";let s=document.createElement("div");s.style.cssText="position: fixed; left: -9999px; top: -9999px; opacity: 0.6; pointer-events: none; border: 2px dashed var(--doc-primary, #2563eb); border-radius: 4px; background: rgba(37, 99, 235, 0.08);",s.style.width=`${a.node.attrs.width||100}px`,s.style.height=`${a.node.attrs.height||100}px`,document.body.appendChild(s),o.dataTransfer.setDragImage(s,0,0),requestAnimationFrame(()=>{document.body.removeChild(s);});}}return false},dragend(e){return e.dom.classList.remove("pm-image-dragging"),e.dom.querySelectorAll(".pm-drop-indicator").forEach(a=>a.remove()),false},dragover(e,r){let{selection:a}=e.state;if(a instanceof NodeSelection&&a.node.type.name==="image"){let o=r;o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="move");}return false},drop(e){return e.dom.classList.remove("pm-image-dragging"),e.dom.querySelectorAll(".pm-drop-indicator").forEach(a=>a.remove()),false}}}})]}}});var D=612;async function mn(n){return await new Promise((t,e)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>e(r.error??new Error("Failed to read image file")),r.readAsDataURL(n);})}async function fn(n){return await new Promise((t,e)=>{let r=new Image;r.onload=()=>t({width:r.naturalWidth||1,height:r.naturalHeight||1}),r.onerror=()=>e(new Error("Failed to load pasted image")),r.src=n;})}async function gn(n,t){let e=n.state.schema.nodes.image;if(!e)return;let r=n.state.selection.from;for(let a of t){let o;try{o=await mn(a);}catch{continue}let s=1,i=1;try{({width:s,height:i}=await fn(o));}catch{s=1,i=1;}let l=s,d=i;if(l>D){let f=D/l;l=D,d=Math.max(1,Math.round(d*f));}let c=e.create({src:o,alt:a.name,width:l,height:d,rId:`rId_img_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,wrapType:"inline",displayMode:"inline"}),u=n.state.tr.insert(r,c);r+=c.nodeSize,u.setSelection(TextSelection.create(u.doc,r)),n.dispatch(u.scrollIntoView());}n.focus();}var le=b({name:"imagePaste",onSchemaReady(n){return {plugins:[new Plugin({props:{handleDOMEvents:{paste(e,r){let a=r,o=j(a.clipboardData);return o.length===0||!e.state.schema.nodes.image?false:(a.preventDefault(),gn(e,o).catch(()=>{}),true)}}}})]}}});var de=b({name:"dropCursor",onSchemaReady(){return {plugins:[dropCursor({color:"var(--doc-primary, #4285f4)",width:2})]}}});var ue=b({name:"bidiShortcut",priority:a$1.High,onSchemaReady(n){let{manager:t}=n;return {plugins:[new Plugin({props:{handleKeyDown(e,r){if(r.key!=="Shift"||!(r.metaKey||r.ctrlKey))return false;let o=t.getCommands();return r.code==="ShiftLeft"?(r.preventDefault(),o.setLtr()(e.state,e.dispatch),true):r.code==="ShiftRight"?(r.preventDefault(),o.setRtl()(e.state,e.dispatch),true):false}}})]}}});function ce(n){let t={},e=n.split(";");for(let r of e){let a=r.trim();if(!a)continue;let o=a.indexOf(":");if(o<0)continue;let s=a.slice(0,o).trim(),i=a.slice(o+1).trim();s&&i&&(t[s]=i);}return t}function kn(n,t){let e=n.getAttribute("style")||"",r=ce(e);for(let[a,o]of Object.entries(t))a in r||n.style.setProperty(a,o);}function Sn(n){let t=n.querySelectorAll("style");if(t.length===0)return;let e=[];for(let r of t){let a=r.textContent||"";if(a.trim())try{let o=n.createElement("style");o.textContent=a,n.head.appendChild(o);let s=o.sheet;if(s)for(let i=0;i<s.cssRules.length;i++){let l=s.cssRules[i];if(l instanceof CSSStyleRule){let d={},c=l.style;for(let u=0;u<c.length;u++){let f=c[u];d[f]=c.getPropertyValue(f);}Object.keys(d).length>0&&e.push({selector:l.selectorText,declarations:d});}}n.head.removeChild(o);}catch{let o=/([^{]+)\{([^}]+)\}/g,s;for(;(s=o.exec(a))!==null;){let i=s[1].trim(),l=ce(s[2]);Object.keys(l).length>0&&e.push({selector:i,declarations:l});}}}if(e.length!==0)for(let{selector:r,declarations:a}of e)try{let o=n.body.querySelectorAll(r);for(let s of o)kn(s,a);}catch{}}function bn(n){let t=n.body.querySelectorAll('b[id^="docs-internal-guid-"]');for(let e of t){let r=e.parentNode;if(r){for(;e.firstChild;)r.insertBefore(e.firstChild,e);r.removeChild(e);}}}function En(n){let t=n.includes("<style"),e=n.includes("docs-internal-guid-");if(!t&&!e)return n;try{let a=new DOMParser().parseFromString(n,"text/html");if(t){Sn(a);let o=a.querySelectorAll("style");for(let s of o)s.remove();}return e&&bn(a),a.body.innerHTML}catch{return n}}var pe=b({name:"pasteStyleInliner",priority:a$1.High,onSchemaReady(){return {plugins:[new Plugin({props:{transformPastedHTML(t){return En(t)}}})]}}});function rs(n={}){let t=new Set(n.disable||[]),e=[];function r(a,o){t.has(a)||e.push(o);}return r("doc",ft()),r("text",gt()),r("paragraph",st()),r("history",xt({depth:n.historyDepth,newGroupDelay:n.historyNewGroupDelay})),r("bold",kt()),r("italic",bt()),r("underline",Tt()),r("strike",Mt()),r("textColor",wt()),r("highlight",Ct()),r("fontSize",Pt()),r("fontFamily",It()),r("superscript",At()),r("subscript",Rt()),r("hyperlink",it()),r("allCaps",Nt()),r("smallCaps",Ft()),r("footnoteRef",vt()),r("characterSpacing",$t()),r("emboss",Dt()),r("imprint",Ht()),r("textShadow",Wt()),r("emphasisMark",zt()),r("textOutline",Ut()),r("hidden",Xt()),r("rtl",Vt()),r("runStyle",_t()),r("textEffect",Kt()),r("comment",Lt()),r("insertion",Bt()),r("deletion",Ot()),r("hardBreak",Gt()),r("tab",jt()),r("image",qt()),r("textBox",Yt()),r("shape",Jt()),r("imageDrag",ie()),r("imagePaste",le()),r("dropCursor",de()),r("horizontalRule",Zt()),r("pageBreak",Qt()),r("field",te()),r("sdt",ee()),r("blockSdt",ne()),r("math",re()),t.has("table")||e.push(...j$1()),r("pasteStyleInliner",pe()),r("list",dt()),r("baseKeymap",p()),r("emptyParagraphFormat",ae()),r("selectionTracker",oe({onSelectionChange:n.onSelectionChange})),r("paragraphChangeTracker",ct()),r("paraIdAllocator",mt()),r("bidiShortcut",ue()),e}var me=class{constructor(t){a$5(this,"extensions");a$5(this,"schema",null);a$5(this,"plugins",[]);a$5(this,"commands",{});this.extensions=[...t].sort((e,r)=>e.config.priority-r.config.priority);}buildSchema(){let t={},e={};for(let r of this.extensions)r.type==="node"?t[r.config.schemaNodeName]=r.config.nodeSpec:r.type==="mark"&&(e[r.config.schemaMarkName]=r.config.markSpec);this.schema=new Schema({nodes:t,marks:e});}initializeRuntime(){if(!this.schema)throw new Error("ExtensionManager: buildSchema() must be called before initializeRuntime()");let t={schema:this.schema,manager:this},e=[],r=[],a={};for(let o of this.extensions){let s=o.onSchemaReady(t);s.commands&&Object.assign(a,s.commands),s.keyboardShortcuts&&e.push(s.keyboardShortcuts),s.plugins&&r.push(...s.plugins);}this.plugins=[...r,...e.map(o=>keymap(o))],this.commands=a;}getSchema(){if(!this.schema)throw new Error("ExtensionManager: buildSchema() must be called first");return this.schema}getPlugins(){return this.plugins}getCommands(){return this.commands}getCommand(t){return this.commands[t]}destroy(){this.plugins=[],this.commands={};}};
|
|
2
|
+
export{Nn as a,Fn as b,vn as c,$n as d,Dn as e,Hn as f,Wn as g,zn as h,Gn as i,jn as j,tr as k,er as l,nr as m,rr as n,ct as o,lr as p,rs as q,me as r};
|