@eigenpal/docx-editor-core 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +5 -4
- package/dist/agent/index.d.ts +5 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/anchoredObjectPosition-CS-8BfhO.d.ts +48 -0
- package/dist/anchoredObjectPosition-KJEyF-wr.d.mts +48 -0
- package/dist/{chunk-U4WUDHDK.js → chunk-2SGJZYQF.js} +1 -1
- package/dist/chunk-3ANZ3252.mjs +2 -0
- package/dist/chunk-3G44SFHX.mjs +4 -0
- package/dist/{chunk-4QEETB7U.js → chunk-3QPKTG2Y.js} +2 -2
- package/dist/chunk-3R7QHNI5.js +2 -0
- package/dist/chunk-4GFTMGSV.mjs +1 -0
- package/dist/chunk-4RTVLMRZ.js +2 -0
- package/dist/{chunk-THLJYXFB.js → chunk-6V3SFHEM.js} +1 -1
- package/dist/chunk-72KLR6TJ.mjs +1 -0
- package/dist/{chunk-6ZXL3EIP.mjs → chunk-7CZEZ3UL.mjs} +1 -1
- package/dist/chunk-7JQVKJRN.mjs +1 -0
- package/dist/{chunk-Z5MJYQSD.mjs → chunk-7UZJ5YDF.mjs} +1 -1
- package/dist/chunk-7WGN2OBZ.js +1 -0
- package/dist/{chunk-BXWOLARZ.js → chunk-APNMO5JT.js} +1 -1
- package/dist/{chunk-KZXZWGFX.mjs → chunk-B46V5G46.mjs} +1 -1
- package/dist/chunk-BH3ACQ3M.js +59 -0
- package/dist/chunk-BUCOTKYY.js +1 -0
- package/dist/{chunk-5BLQHXWK.mjs → chunk-CDXCFHOY.mjs} +1 -1
- package/dist/chunk-CHN26LLL.mjs +59 -0
- package/dist/chunk-CZSAC65M.js +2 -0
- package/dist/chunk-D3PRIF3Y.mjs +1 -0
- package/dist/{chunk-7BVHKWEW.mjs → chunk-DFUWJHKF.mjs} +1 -1
- package/dist/chunk-DKKTY56Q.js +1 -0
- package/dist/chunk-FIGLFSNR.js +1 -0
- package/dist/{chunk-AMB6Y77B.js → chunk-FQS436KN.js} +1 -1
- package/dist/chunk-FYRJTDC4.mjs +2 -0
- package/dist/chunk-GYWTUUXX.mjs +2 -0
- package/dist/chunk-INDYZOOS.js +1 -0
- package/dist/chunk-IUVQJ6PX.mjs +1 -0
- package/dist/chunk-JUMHC5Z6.mjs +1 -0
- package/dist/chunk-L6YTCHOQ.mjs +1 -0
- package/dist/{chunk-D62KS7QG.mjs → chunk-LAJPGQEE.mjs} +1 -1
- package/dist/chunk-LERLET2D.js +4 -0
- package/dist/chunk-MEVZCB56.mjs +1 -0
- package/dist/{chunk-BOOHU5EW.mjs → chunk-MOCGHQ4A.mjs} +1 -1
- package/dist/chunk-NAFMAKLK.js +2 -0
- package/dist/chunk-OTHV7YV2.js +2 -0
- package/dist/chunk-Q5B5GKXD.mjs +1 -0
- package/dist/{chunk-U4XMGWF7.js → chunk-RAWVGULQ.js} +1 -1
- package/dist/chunk-RQVHKDXK.js +2 -0
- package/dist/{chunk-E4JMCA5X.js → chunk-SCK6ZM5V.js} +2 -2
- package/dist/chunk-SWBLJF6R.mjs +2 -0
- package/dist/chunk-T4RYVPAB.js +1 -0
- package/dist/{chunk-UGV4KRQB.js → chunk-TJRROR6U.js} +1 -1
- package/dist/chunk-TURYWKNS.js +1 -0
- package/dist/chunk-UE2ZKRYB.mjs +2 -0
- package/dist/chunk-VOCHZNOF.mjs +1 -0
- package/dist/{chunk-OEXVWIHW.mjs → chunk-W77JXDEV.mjs} +1 -1
- package/dist/chunk-WDBZ3QVB.js +1 -0
- package/dist/chunk-WWBNJ7KF.js +1 -0
- package/dist/chunk-WWNOXNEX.mjs +2 -0
- package/dist/chunk-XWC67YLW.js +1 -0
- package/dist/{chunk-QKLY4F2J.mjs → chunk-YNUPP7UG.mjs} +1 -1
- package/dist/{chunk-HQPWFUP5.js → chunk-Z3LGMBJC.js} +1 -1
- package/dist/{colorResolver-BZ_yScf4.d.ts → colorResolver-8A-qj-LP.d.ts} +1 -1
- package/dist/{colorResolver-C6DtsoFI.d.mts → colorResolver-BCvxTlLF.d.mts} +1 -1
- package/dist/{content-CE-ZdMwG.d.mts → content-3xF4WDE8.d.mts} +51 -7
- package/dist/{content-CYXJ2tfQ.d.ts → content-C8fc_tL6.d.ts} +51 -7
- package/dist/{contentControlValues-gyVPsi6m.d.ts → contentControlValues-DGDKD589.d.ts} +1 -1
- package/dist/{contentControlValues-DAwTWfgR.d.mts → contentControlValues-DjWvoJQ-.d.mts} +1 -1
- package/dist/core-plugins.d.mts +6 -5
- package/dist/core-plugins.d.ts +6 -5
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +12 -11
- package/dist/core.d.ts +12 -11
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentStyles-DToJv9co.d.ts → documentStyles-C7k_8Sye.d.ts} +1 -1
- package/dist/{documentStyles-D87dxl18.d.mts → documentStyles-qR0VR2s0.d.mts} +1 -1
- package/dist/docx/index.d.mts +3 -2
- package/dist/docx/index.d.ts +3 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -2
- package/dist/docx/parser.d.ts +3 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -2
- package/dist/docx/rezip.d.ts +3 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +42 -4
- package/dist/docx/serializer/index.d.ts +42 -4
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/{fontLoader-Z7pqeNvZ.d.mts → fontLoader-CUS1BPv7.d.mts} +1 -1
- package/dist/{fontLoader-Cm02v7PO.d.ts → fontLoader-Dl9SEKex.d.ts} +1 -1
- package/dist/{footnotes-lCH_P3N3.d.mts → footnotes-BtVc6VFl.d.mts} +14 -1
- package/dist/{footnotes-skVvEHvZ.d.ts → footnotes-DcUMWXul.d.ts} +14 -1
- package/dist/{headerFooterLayout-Bd58Tum3.d.ts → headerFooterLayout-4E-S4Aay.d.ts} +5 -5
- package/dist/{headerFooterLayout-CuIJiIzi.d.mts → headerFooterLayout-DlJLWmpR.d.mts} +5 -5
- package/dist/headless.d.mts +47 -11
- package/dist/headless.d.ts +47 -11
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.d.mts +26 -1
- package/dist/layout-bridge/clickToPositionDom.d.ts +26 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +29 -7
- package/dist/layout-bridge/index.d.ts +29 -7
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +25 -3
- package/dist/layout-bridge/measuring/index.d.ts +25 -3
- 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 +3 -2
- package/dist/layout-bridge/toFlowBlocks.d.ts +3 -2
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +16 -3
- package/dist/layout-engine/index.d.ts +16 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -1
- package/dist/layout-engine/types.d.ts +22 -1
- package/dist/layout-painter/index.d.mts +6 -4
- package/dist/layout-painter/index.d.ts +6 -4
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +9 -5
- package/dist/layout-painter/renderPage.d.ts +9 -5
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +3 -2
- package/dist/managers/AutoSaveManager.d.ts +3 -2
- package/dist/managers/TableSelectionManager.d.mts +3 -2
- package/dist/managers/TableSelectionManager.d.ts +3 -2
- package/dist/managers/types.d.mts +3 -2
- package/dist/managers/types.d.ts +3 -2
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +4 -3
- package/dist/mcp.d.ts +4 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +2 -2
- package/dist/{nodes-BNkRKBBX.d.ts → nodes-75Q9GBxV.d.ts} +1 -1
- package/dist/{nodes-Bz-UHhLE.d.mts → nodes-cEI7hVY2.d.mts} +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +20 -1
- package/dist/prosemirror/commands/index.d.ts +20 -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/conversion/fromProseDoc.d.mts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -2
- package/dist/prosemirror/conversion/index.d.ts +3 -2
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +12 -2
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +6 -5
- package/dist/prosemirror/index.d.ts +6 -5
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/plugins/index.d.mts +4 -3
- package/dist/prosemirror/plugins/index.d.ts +4 -3
- package/dist/prosemirror/schema/index.d.mts +3 -2
- package/dist/prosemirror/schema/index.d.ts +3 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +1 -1
- package/dist/prosemirror/styles/index.d.ts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -1
- package/dist/{registry-Cpyybgij.d.mts → registry-NLnxX7pq.d.mts} +1 -1
- package/dist/{registry-E5pahPKL.d.ts → registry-egK81C_z.d.ts} +1 -1
- package/dist/sectionPropertiesSerializer-D86QlzlT.d.mts +59 -0
- package/dist/sectionPropertiesSerializer-uXyGONxu.d.ts +59 -0
- package/dist/{styles-EI2lxeEN.d.mts → styles-BOJ93SAm.d.mts} +1 -1
- package/dist/{styles-BBv7doYK.d.ts → styles-BWqX2AS-.d.ts} +1 -1
- package/dist/types/content.d.mts +2 -1
- package/dist/types/content.d.ts +2 -1
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -0
- package/dist/types/document.d.mts +17 -6
- package/dist/types/document.d.ts +17 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -0
- package/dist/{types-DXG7vqe9.d.ts → types-DDQWU7-j.d.ts} +1 -1
- package/dist/{types-dYdjUZMo.d.mts → types-DTF0N7UE.d.mts} +1 -1
- package/dist/utils/comments.d.mts +2 -1
- package/dist/utils/comments.d.ts +2 -1
- package/dist/utils/index.d.mts +5 -4
- package/dist/utils/index.d.ts +5 -4
- package/dist/{variableDetector-HPZbJ_gw.d.ts → variableDetector-1mxzPfs2.d.ts} +1 -1
- package/dist/{variableDetector-C7BLz9sJ.d.mts → variableDetector-CaY-sDau.d.mts} +1 -1
- package/dist/watermark-DAcnAs_J.d.mts +77 -0
- package/dist/watermark-DAcnAs_J.d.ts +77 -0
- package/package.json +1 -1
- package/dist/chunk-2EQGBVPV.js +0 -2
- package/dist/chunk-44FHVKSI.js +0 -1
- package/dist/chunk-44JKHPGF.mjs +0 -2
- package/dist/chunk-5M7TI6TV.js +0 -1
- package/dist/chunk-6Y6LON6Y.mjs +0 -1
- package/dist/chunk-7RDCZLTU.js +0 -1
- package/dist/chunk-7ZN4WI5N.mjs +0 -4
- package/dist/chunk-CCPBNE2F.mjs +0 -2
- package/dist/chunk-DV6GWBUJ.js +0 -2
- package/dist/chunk-EQAORQC3.mjs +0 -1
- package/dist/chunk-FYKRDDKG.js +0 -1
- package/dist/chunk-GUQFNJHE.mjs +0 -1
- package/dist/chunk-ICE6NC3S.mjs +0 -1
- package/dist/chunk-IFUED5ZS.mjs +0 -1
- package/dist/chunk-KGTEBLB6.js +0 -1
- package/dist/chunk-KRN6YSR2.mjs +0 -1
- package/dist/chunk-L72YAV5N.js +0 -3
- package/dist/chunk-LTHT4A4S.js +0 -1
- package/dist/chunk-MERJFGEP.mjs +0 -59
- package/dist/chunk-MP4QSEO2.mjs +0 -1
- package/dist/chunk-PVAVS3IU.js +0 -1
- package/dist/chunk-QYF7BRG3.js +0 -2
- package/dist/chunk-RKDVY7I3.mjs +0 -1
- package/dist/chunk-ROG4MNOR.js +0 -4
- package/dist/chunk-SORYYVJ7.js +0 -1
- package/dist/chunk-SZIOF5SG.js +0 -59
- package/dist/chunk-VMRUBLPI.js +0 -1
- package/dist/chunk-WKUHYMDO.mjs +0 -1
- package/dist/chunk-WLDI6N3B.mjs +0 -3
- package/dist/chunk-WLHNIXWC.mjs +0 -2
- package/dist/chunk-YMZ3F2FZ.mjs +0 -1
- package/dist/chunk-ZBFNOJGY.js +0 -1
- package/dist/documentSerializer-Bghq9rFI.d.mts +0 -36
- package/dist/documentSerializer-C4lFC60P.d.ts +0 -36
package/dist/chunk-GUQFNJHE.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-KZXZWGFX.mjs';import {P,g,h}from'./chunk-6Y6LON6Y.mjs';import {b}from'./chunk-EQAORQC3.mjs';import {e}from'./chunk-VW22RZ6C.mjs';function j(e,t){if(e.pages.length===0)return null;let a=e.pageGap??0,o=0,n=null,r=1/0;for(let s=0;s<e.pages.length;s++){let i=e.pages[s],l=i.size?.h??e.pageSize.h,u=o,f=u+l;if(t.y>=u&&t.y<f)return {pageIndex:s,page:i,pageY:t.y-u};let c=u+l/2,h=Math.abs(t.y-c);h<r&&(r=h,n=s),o=f+a;}if(n!==null){let s=e.pages[n],i=A(e,n);return {pageIndex:n,page:s,pageY:Math.max(0,Math.min(t.y-i,s.size?.h??e.pageSize.h))}}return null}function A(e,t){let a=e.pageGap??0,o=0;for(let n=0;n<t&&n<e.pages.length;n++){let s=e.pages[n].size?.h??e.pageSize.h;o+=s+a;}return o}function Me(e,t){return j(e,{y:t})?.pageIndex??null}function $(e,t){return e.findIndex(a=>a.id===t)}function ye(e,t){let a=0;for(let o=e.fromLine;o<e.toLine&&o<t.lines.length;o++)a+=t.lines[o].lineHeight;return a}function ae(e,t,a,o){let n=[...e.page.fragments].sort((r,s)=>{let i=r.y-s.y;return Math.abs(i)>.5?i:r.x-s.x});for(let r of n){let s=$(t,r.blockId);if(s===-1)continue;let i=t[s],l=a[s];if(!i||!l)continue;let u;if(r.kind==="paragraph"){if(i.kind!=="paragraph"||l.kind!=="paragraph")continue;u=ye(r,l);}else if(r.kind==="table")u=r.height;else if(r.kind==="image")u=r.height;else continue;let f=o.x>=r.x&&o.x<=r.x+r.width,c=o.y>=r.y&&o.y<=r.y+u;if(f&&c)return {fragment:r,block:i,measure:l,pageIndex:e.pageIndex,localX:o.x-r.x,localY:o.y-r.y}}return null}function He(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="image")continue;let r=$(t,n.blockId);if(r===-1)continue;let s=t[r],i=a[r];if(!s||!i)continue;let l=o.x>=n.x&&o.x<=n.x+n.width,u=o.y>=n.y&&o.y<=n.y+n.height;if(l&&u)return {fragment:n,block:s,measure:i,pageIndex:e.pageIndex,localX:o.x-n.x,localY:o.y-n.y}}return null}function se(e,t,a,o){for(let n of e.page.fragments){if(n.kind!=="table")continue;let r=n,s=o.x>=r.x&&o.x<=r.x+r.width,i=o.y>=r.y&&o.y<=r.y+r.height;if(!s||!i)continue;let l=$(t,r.blockId);if(l===-1)continue;let u=t[l],f=a[l];if(!u||u.kind!=="table"||!f||f.kind!=="table")continue;let c=u,h=f,p=o.x-r.x,m=o.y-r.y,g=r.headerRowCount??0,d=g>0&&r.continuesFromPrev?P(h,g):0,b=0,x=-1;if(h.rows.length===0||c.rows.length===0)continue;if(d>0&&m<d){let T=0;for(let M=0;M<g&&M<h.rows.length;M++){let L=h.rows[M];if(m>=T&&m<T+L.height){x=M;break}T+=L.height;}x===-1&&(x=0);}else {let T=m-d;for(let M=r.fromRow;M<r.toRow&&M<h.rows.length;M++){let L=h.rows[M];if(T>=b&&T<b+L.height){x=M;break}b+=L.height;}}if(x===-1&&(x=Math.min(r.toRow-1,h.rows.length-1),x<r.fromRow))continue;let k=h.rows[x],F=c.rows[x];if(!k||!F)continue;let P$1=0,y=-1;if(k.cells.length===0||F.cells.length===0)continue;for(let T=0;T<k.cells.length;T++){let M=k.cells[T];if(p>=P$1&&p<P$1+M.width){y=T;break}P$1+=M.width;}if(y===-1&&(y=k.cells.length-1,y<0))continue;let H=k.cells[y],w=F.cells[y];if(!H||!w)continue;let R=0;if(d>0&&x<g)for(let T=0;T<x;T++)R+=h.rows[T]?.height??0;else {R=d;for(let T=r.fromRow;T<x;T++)R+=h.rows[T]?.height??0;}let B=0;for(let T=0;T<y;T++)B+=k.cells[T]?.width??0;let C,S;if(w.blocks&&w.blocks.length>0){let T=w.blocks[0],M=H.blocks[0];T.kind==="paragraph"&&M?.kind==="paragraph"&&(C=T,S=M);}let D=p-B,E=m-R;return {fragment:r,block:c,measure:h,pageIndex:e.pageIndex,rowIndex:x,colIndex:y,cellBlock:C,cellMeasure:S,cellLocalX:Math.max(0,D),cellLocalY:Math.max(0,E)}}return null}function we(e,t,a,o){let n={pageHit:null,fragmentHit:null,tableCellHit:null};if(n.pageHit=j(e,o),!n.pageHit)return n;let r=A(e,n.pageHit.pageIndex),s={x:o.x,y:o.y-r};return n.fragmentHit=ae(n.pageHit,t,a,s),n.fragmentHit?.fragment.kind==="table"&&(n.tableCellHit=se(n.pageHit,t,a,s)),n}function Re(e){if(e.pages.length===0)return 0;let t=e.pageGap??0,a=0;for(let o=0;o<e.pages.length;o++){let n=e.pages[o];a+=n.size?.h??e.pageSize.h,o<e.pages.length-1&&(a+=t);}return a}function Be(e,t){return A(e,t)}function Ie(e,t){if(t<0||t>=e.pages.length)return null;let a=A(e,t),n=e.pages[t].size?.h??e.pageSize.h;return {top:a,bottom:a+n}}function J(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function le(e,t){let a=[];for(let o=t.fromRun;o<=t.toRun&&o<e.runs.length;o++){let n=e.runs[o];if(n){if(n.kind==="tab"||n.kind==="image"||n.kind==="lineBreak"){a.push(n);continue}if(n.kind==="text"){let r=n.text??"",s=o===t.fromRun,i=o===t.toRun;if(s||i){let l=s?t.fromChar:0,u=i?t.toChar:r.length,f=r.slice(l,u);f.length>0&&a.push({...n,text:f});}else a.push(n);}}}return a}function ce(e,t){let a,o,n=e.pmStart??0,r=0;for(let s=0;s<e.runs.length&&s<=t.toRun;s++){let i=e.runs[s];i&&(s<t.fromRun?i.kind==="text"?r+=(i.text??"").length:(i.kind==="tab"||i.kind==="lineBreak"||i.kind==="image")&&(r+=1):s===t.fromRun&&(r+=t.fromChar,a=n+r,i.kind==="text"&&(r=t.fromChar)));}if(a!==void 0){let s=0;for(let i=t.fromRun;i<=t.toRun&&i<e.runs.length;i++){let l=e.runs[i];if(l)if(l.kind==="text"){let u=l.text??"",f=i===t.fromRun?t.fromChar:0,c=i===t.toRun?t.toChar:u.length;s+=c-f;}else (l.kind==="tab"||l.kind==="lineBreak"||l.kind==="image")&&(s+=1);}o=a+s;}return {pmStart:a,pmEnd:o}}function Se(e,t,a,o){let n=0;for(let r=a;r<o&&r<e.lines.length;r++){let i=e.lines[r].lineHeight;if(t>=n&&t<n+i)return r;n+=i;}return o>a?Math.min(o-1,e.lines.length-1):null}function Ee(e,t,a,o){let{pmStart:n,pmEnd:r}=ce(e,t);if(n===void 0||r===void 0)return {charOffset:0,pmPosition:e.pmStart??0};let s=e.attrs?.alignment??"left",i=0;s==="center"?i=Math.max(0,(o-t.width)/2):s==="right"&&(i=Math.max(0,o-t.width));let l=Math.max(0,a-i);if(l<=0)return {charOffset:0,pmPosition:n};let u=le(e,t);if(u.length===0)return {charOffset:0,pmPosition:n};let f=0,c=0;for(let p of u){if(p.kind==="tab"){let m=p.width??48,g=f+m;if(l<=g){let d=f+m/2;return l<d?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}f=g,c+=1;continue}if(p.kind==="image"){let m=p.width,g=f+m;if(l<=g){let d=f+m/2;return l<d?{charOffset:c,pmPosition:n+c}:{charOffset:c+1,pmPosition:n+c+1}}f=g,c+=1;continue}if(p.kind==="lineBreak"){if(l>=f)return {charOffset:c,pmPosition:n+c};c+=1;continue}if(p.kind==="text"){let m=p.text??"";if(m.length===0)continue;let g$1=J(p),d=g(m,g$1),b=f+d.width;if(l<=b){let x=l-f,k=h(x,d.charWidths),F=c+k;return {charOffset:F,pmPosition:n+F}}f=b,c+=m.length;}}return {charOffset:r-n,pmPosition:r}}function K(e){let{fragment:t,block:a,measure:o,localX:n,localY:r}=e;if(t.kind!=="paragraph"||a.kind!=="paragraph"||o.kind!=="paragraph")return null;let s=t,i=a,l=o,u=Se(l,r,s.fromLine,s.toLine);if(u===null)return null;let f=l.lines[u];if(!f)return null;let c=0;for(let k=s.fromLine;k<u;k++)c+=l.lines[k]?.lineHeight??0;let h=i.attrs?.indent,p=h?.left??0,m=h?.right??0,g=Math.max(0,t.width-p-m),d=n-p,{charOffset:b,pmPosition:x}=Ee(i,f,d,g);return {pmPosition:x,charOffset:b,lineIndex:u}}function ue(e){let{cellBlock:t,cellMeasure:a,cellLocalX:o,cellLocalY:n}=e;if(!t||!a)return null;let r={fragment:{kind:"paragraph",blockId:t.id,x:0,y:0,width:a.lines.reduce((i,l)=>Math.max(i,l.width),100),fromLine:0,toLine:a.lines.length,height:a.totalHeight},block:t,measure:a,pageIndex:e.pageIndex,localX:o,localY:n};return K(r)?.pmPosition??null}function Le(e,t){if(t)return ue(t);if(!e)return null;let{fragment:a}=e;return a.kind==="paragraph"?K(e)?.pmPosition??null:a.kind==="image"?a.pmStart??null:null}function fe(e,t,a,o){let n=e.pmStart??0,r=e.pmEnd??n;if(a<n||a>r)return null;let s=a-n;for(let i=0;i<t.lines.length;i++){let l=t.lines[i],{pmStart:u,pmEnd:f}=ce(e,l);if(u===void 0||f===void 0)continue;let c=u-n,h=f-n;if(s>=c&&s<=h){let p=s-c,m=le(e,l),g$1=0,d=0;for(let b of m)if(b.kind==="tab"){if(p<=d+1)return p<=d?{x:g$1,lineIndex:i}:{x:g$1+(b.width??48),lineIndex:i};g$1+=b.width??48,d+=1;}else if(b.kind==="image"){if(p<=d+1)return p<=d?{x:g$1,lineIndex:i}:{x:g$1+b.width,lineIndex:i};g$1+=b.width,d+=1;}else if(b.kind==="lineBreak"){if(p<=d)return {x:g$1,lineIndex:i};d+=1;}else if(b.kind==="text"){let x=b.text??"";if(p<=d+x.length){let P=p-d,y=J(b),H=g(x.slice(0,P),y);return {x:g$1+H.width,lineIndex:i}}let k=J(b),F=g(x,k);g$1+=F.width,d+=x.length;}return {x:g$1,lineIndex:i}}}return null}function Ce(e,t,a,o,n,r,s){let i=fe(e,t,a);if(!i)return null;let l=e.attrs?.alignment??"left",u=e.attrs?.indent,f=u?.left??0,c=u?.right??0,h=Math.max(0,r-f-c),p=t.lines[i.lineIndex];if(!p)return null;let m=0;l==="center"?m=Math.max(0,(h-p.width)/2):l==="right"&&(m=Math.max(0,h-p.width));let g=0;for(let d=s;d<i.lineIndex;d++)g+=t.lines[d]?.lineHeight??0;return {x:o+f+m+i.x,y:n+g,height:p.lineHeight}}function ge(e){return {fontFamily:e.fontFamily??"Arial",fontSize:e.fontSize??12,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function Q(e,t){return e.findIndex(a=>a.id===t)}function W(e,t){let o=(e.pmStart??0)+1,n=0,r;for(let l=0;l<e.runs.length&&l<=t.toRun;l++){let u=e.runs[l];if(u){if(l<t.fromRun)u.kind==="text"?n+=(u.text??"").length:n+=1;else if(l===t.fromRun){n+=t.fromChar,r=o+n;break}}}r===void 0&&(r=o);let s=0;for(let l=t.fromRun;l<=t.toRun&&l<e.runs.length;l++){let u=e.runs[l];if(u)if(u.kind==="text"){let f=u.text??"",c=l===t.fromRun?t.fromChar:0,h=l===t.toRun?t.toChar:f.length;s+=h-c;}else s+=1;}let i=r+s;return {pmStart:r,pmEnd:i}}function me(e,t,a,o){let n=[];for(let r=0;r<t.lines.length;r++){let s=t.lines[r],i=W(e,s);i.pmStart===void 0||i.pmEnd===void 0||i.pmEnd>a&&i.pmStart<o&&n.push({line:s,index:r});}return n}function N(e,t,a){let o=W(e,t);return o.pmStart===void 0?0:Math.max(0,a-o.pmStart)}function z(e,t,a,o){let n=0,r=0;for(let s=t.fromRun;s<=t.toRun&&s<e.runs.length;s++){let i=e.runs[s];if(i){if(i.kind==="tab"){let l=i.width??48;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="image"){let l=i.width;if(r+1>=a)return a<=r?n:n+l;n+=l,r+=1;continue}if(i.kind==="lineBreak"){if(a<=r)return n;r+=1;continue}if(i.kind==="text"){let l=i.text??"",u=s===t.fromRun,f=s===t.toRun,c=u?t.fromChar:0,h=f?t.toChar:l.length,p=l.slice(c,h);if(r+p.length>=a){let d=a-r,b=ge(i),x=g(p.slice(0,d),b);return n+x.width}let m=ge(i),g$1=g(p,m);n+=g$1.width,r+=p.length;}}}return n}function G(e,t){let a=0;for(let o=0;o<t&&o<e.lines.length;o++)a+=e.lines[o].lineHeight;return a}function De(e,t,a,o,n){if(o===n)return [];let r=Math.min(o,n),s=Math.max(o,n),i=[];for(let l=0;l<e.pages.length;l++){let u=e.pages[l],f=A(e,l);for(let c of u.fragments){if(c.kind==="paragraph"){let h=Q(t,c.blockId);if(h===-1)continue;let p=t[h],m=a[h];if(!p||p.kind!=="paragraph"||!m||m.kind!=="paragraph")continue;let g=p,d=m,b=c,x=me(g,d,r,s);for(let{line:k,index:F}of x){if(F<b.fromLine||F>=b.toLine)continue;let P=W(g,k);if(P.pmStart===void 0||P.pmEnd===void 0)continue;let y=Math.max(P.pmStart,r),H=Math.min(P.pmEnd,s);if(y>=H)continue;let w=N(g,k,y),R=N(g,k,H),I=g.attrs?.indent,B=I?.left??0,C=I?.right??0,S=Math.max(0,c.width-B-C),D=z(g,k,w),E=z(g,k,R),T=g.attrs?.alignment??"left",M=0;T==="center"?M=Math.max(0,(S-k.width)/2):T==="right"&&(M=Math.max(0,S-k.width));let L=G(d,F)-G(d,b.fromLine),_=c.x+B+M+Math.min(D,E),V=Math.max(1,Math.abs(E-D)),v=c.y+L;i.push({x:_,y:v+f,width:V,height:k.lineHeight,pageIndex:l});}}if(c.kind==="table"){let h=Q(t,c.blockId);if(h===-1)continue;let p=t[h],m=a[h];if(!p||p.kind!=="table"||!m||m.kind!=="table")continue;let g=p,d=m,b=c,x=b.headerRowCount??0,F=x>0&&b.continuesFromPrev?P(d,x):0;for(let P=b.fromRow;P<b.toRow&&P<g.rows.length;P++){let y=g.rows[P],H=d.rows[P];if(!y||!H)continue;let w=0;for(let R=0;R<y.cells.length;R++){let I=y.cells[R],B=H.cells[R];if(!(!I||!B)){for(let C=0;C<I.blocks.length;C++){let S=I.blocks[C],D=B.blocks[C];if(!S||S.kind!=="paragraph"||!D||D.kind!=="paragraph")continue;let E=S,T=D,M=me(E,T,r,s),L=0;for(let{line:_,index:V}of M){let v=W(E,_);if(v.pmStart===void 0||v.pmEnd===void 0)continue;let Z=Math.max(v.pmStart,r),ee=Math.min(v.pmEnd,s);if(Z>=ee)continue;let ke=N(E,_,Z),Fe=N(E,_,ee),te=z(E,_,ke,B.width),ne=z(E,_,Fe,B.width),Pe=G(T,V);i.push({x:b.x+w+Math.min(te,ne),y:b.y+F+L+Pe+f,width:Math.max(1,Math.abs(ne-te)),height:_.lineHeight,pageIndex:l});}L+=T.totalHeight;}w+=B.width;}}F+=H.height;}}if(c.kind==="image"){let h=c.pmStart??0;(c.pmEnd??h+1)>r&&h<s&&i.push({x:c.x,y:c.y+f,width:c.width,height:c.height,pageIndex:l});}}}return i}function _e(e,t,a,o){for(let n=0;n<e.pages.length;n++){let r=e.pages[n],s=A(e,n);for(let i of r.fragments){if(i.kind==="paragraph"){let l=Q(t,i.blockId);if(l===-1)continue;let u=t[l],f=a[l];if(!u||u.kind!=="paragraph"||!f||f.kind!=="paragraph")continue;let c=u,h=f,p=i,m=c.pmStart??0,g=c.pmEnd??m;if(o<m||o>g)continue;for(let d=p.fromLine;d<p.toLine;d++){let b=h.lines[d];if(!b)continue;let x=W(c,b);if(!(x.pmStart===void 0||x.pmEnd===void 0)&&o>=x.pmStart&&o<=x.pmEnd){let k=N(c,b,o),F=c.attrs?.indent,P=F?.left??0,y=F?.right??0,H=Math.max(0,i.width-P-y),w=z(c,b,k),R=c.attrs?.alignment??"left",I=0;R==="center"?I=Math.max(0,(H-b.width)/2):R==="right"&&(I=Math.max(0,H-b.width));let B=G(h,d)-G(h,p.fromLine);return {x:i.x+P+I+w,y:i.y+B+s,height:b.lineHeight,pageIndex:n}}}}if(i.kind==="image"){let l=i.pmStart??0,u=i.pmEnd??l+1;if(o>=l&&o<=u){let f=o===l?0:i.width;return {x:i.x+f,y:i.y+s,height:i.height,pageIndex:n}}}}}return null}function Ae(e){return e.length<=1?false:new Set(e.map(a=>a.pageIndex)).size>1}function Oe(e){let t=new Map;for(let a of e){let o=t.get(a.pageIndex)??[];o.push(a),t.set(a.pageIndex,o);}return t}function Xe(e){if(e.kind!=="paragraph")return false;let t=e.attrs;return t?!!(t.borders?.top||t.borders?.bottom||t.spacingExplicit?.before||t.spacingExplicit?.after):false}function de(e){return he(e)}function he(e){let t=new Set;for(let a=1;a<e.length;a++){let o=e[a-1],n=e[a];o.kind==="table"&&n.kind==="paragraph"&&(n.runs.length>0||Xe(n)||t.add(a));}return e.map((a,o)=>{if(a.kind==="table")return ve(a);if(a.kind!=="paragraph")return a;let n=t.has(o),r=a.attrs?.spacingExplicit,s=a.attrs?.spacing?.before!=null,i=a.attrs?.spacing?.after!=null,l=s&&!r?.before,u=i&&!r?.after,f=l||u;if(!f&&!n)return a;let c=a.attrs;return f&&c?.spacing&&(c={...c,spacing:{...c.spacing,before:r?.before?c.spacing.before:void 0,after:r?.after?c.spacing.after:void 0}}),n&&(c={...c??{},suppressEmptyParagraphHeight:true}),{...a,attrs:c}})}function ve(e){let t=false,a=e.rows.map(o=>{let n=false,r=o.cells.map(s=>{let i=he(s.blocks);return i.some((u,f)=>u!==s.blocks[f])?(n=true,{...s,blocks:i}):s});return n?(t=true,{...o,cells:r}):o});return t?{...e,rows:a}:e}function Ye(e){return e?.align??e?.alignment}function pe(e$1,t,a,o){let n=o.section==="header"?o.margins.header??48:o.pageSize.h-(o.margins.footer??48)-a,r=e$1.position?.vertical;if(!r)return t;let s=Ye(r),i=r.posOffset!==void 0?e(r.posOffset):void 0;if(r.relativeTo==="page"){if(i!==void 0)return i-n;if(s==="top")return -n;if(s==="bottom")return o.pageSize.h-e$1.height-n;if(s==="center")return (o.pageSize.h-e$1.height)/2-n}if(r.relativeTo==="margin"){let l=o.margins.top,u=o.pageSize.h-o.margins.top-o.margins.bottom;if(i!==void 0)return l+i-n;if(s==="top")return l-n;if(s==="bottom")return l+u-e$1.height-n;if(s==="center")return l+(u-e$1.height)/2-n}return i!==void 0?t+i:t}function be(e,t,a,o){let n=0,r=a,s=0;for(let i=0;i<e.length;i++){let l=e[i],u=t[i];if(!(!l||!u)){if(l.kind==="paragraph"&&u.kind==="paragraph"){let f=s,c=f+u.totalHeight;n=Math.min(n,f),r=Math.max(r,c);for(let h of l.runs){if(h.kind!=="image"||!h.position)continue;let p=pe(h,f,a,o);n=Math.min(n,p),r=Math.max(r,p+h.height);}s=c;}else if(l.kind==="table"&&u.kind==="table"){let f=s+u.totalHeight;n=Math.min(n,s),r=Math.max(r,f),s=f;}else if(l.kind==="image"&&u.kind==="image"){let f=s+u.height;n=Math.min(n,s),r=Math.max(r,f),s=f;}else if(l.kind==="textBox"&&u.kind==="textBox"){let f=s+u.height;n=Math.min(n,s),r=Math.max(r,f),s=f;}}}return {visualTop:n,visualBottom:r}}function Ne(e,t,a,o){if(!e||!e.content||e.content.length===0)return;let n=b(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null});return xe(n,t,a,o)}function xe(e,t,a,o){let n=c(e,{theme:o.theme??void 0});if(n.length===0)return;let r=de(n),s=o.measureBlocks(r,t),i=s.reduce((f,c)=>c.kind==="paragraph"||c.kind==="table"?f+c.totalHeight:c.kind==="image"||c.kind==="textBox"?f+c.height:f,0),{visualTop:l,visualBottom:u}=be(n,s,i,a);return {blocks:r,measures:s,height:i,visualTop:l,visualBottom:u}}var Y=null;function ze(){Y=null;}function Te(e){if(Y&&Y.host.isConnected)return Y;let t=e.querySelector(".layout-page-header, .layout-page-footer");if(!t)return null;let a=Array.from(t.querySelectorAll("span[data-pm-start][data-pm-end]")),o=Array.from(t.querySelectorAll("[data-pm-start][data-pm-end]"));return Y={host:t,spans:a,ranged:o},Y}function Ge(e,t=globalThis.document){let a=e.state.selection;if(!a.empty)return null;let o=a.head,n=Te(t);if(!n)return null;let{host:r,spans:s}=n;for(let m of s){let g=Number(m.dataset.pmStart),d=Number(m.dataset.pmEnd);if(!(!Number.isFinite(g)||!Number.isFinite(d))&&o>=g&&o<=d){let b=r.ownerDocument.createRange(),x=r.ownerDocument.createTreeWalker(m,NodeFilter.SHOW_TEXT),k=o-g,F=x.nextNode();for(;F;){let H=F.data.length;if(k<=H){try{b.setStart(F,k),b.setEnd(F,k);let w=b.getClientRects()[0]??b.getBoundingClientRect();if(w&&w.height>0)return {top:w.top,left:w.left,height:w.height}}catch{}break}k-=H,F=x.nextNode();}let P=m.getBoundingClientRect(),y=(o-g)/Math.max(1,d-g);return {top:P.top,left:P.left+P.width*y,height:P.height}}}let i=r.querySelector(`[data-pm-start="${o}"]`);if(i){let m=i.getBoundingClientRect();return {top:m.top,left:m.left+1,height:m.height||16}}let l=n.ranged,u=null,f=1/0;for(let m of l){let g=Number(m.dataset.pmStart),d=Number(m.dataset.pmEnd);if(!Number.isFinite(g)||!Number.isFinite(d)||o<g||o>d)continue;let b=d-g;b<f&&(f=b,u=m);}if(u){let m=u.getBoundingClientRect(),g=Number(u.dataset.pmEnd),d=o>=g;return {top:m.top,left:d?m.right:m.left+1,height:m.height||16}}let c=null,h=-1/0;for(let m of l){let g=Number(m.dataset.pmStart);Number.isFinite(g)&&(g>o||g>h&&(h=g,c=m));}if(c){let m=c.getBoundingClientRect();return {top:m.top,left:m.right,height:m.height||16}}let p=r.getBoundingClientRect();return {top:p.top+2,left:p.left+2,height:16}}function We(e,t=globalThis.document){let a=e.state.selection;if(a.empty)return [];let o=a.from,n=a.to,r=[],s=Te(t);if(!s)return r;let{host:i,spans:l}=s;for(let u of l){let f=Number(u.dataset.pmStart),c=Number(u.dataset.pmEnd);if(!Number.isFinite(f)||!Number.isFinite(c)||c<=o||f>=n)continue;if(u.classList.contains("layout-run-tab")){let d=u.getBoundingClientRect();r.push({top:d.top,left:d.left,width:d.width,height:d.height});continue}let h=null;if(u.firstChild?.nodeType===Node.TEXT_NODE?h=u.firstChild:u.firstChild?.nodeType===Node.ELEMENT_NODE&&u.firstChild.tagName==="A"&&u.firstChild.firstChild?.nodeType===Node.TEXT_NODE&&(h=u.firstChild.firstChild),!h)continue;let p=Math.max(0,o-f),m=Math.min(h.length,n-f);if(p>=m)continue;let g=i.ownerDocument.createRange();g.setStart(h,p),g.setEnd(h,m);for(let d of Array.from(g.getClientRects()))r.push({top:d.top,left:d.left,width:d.width,height:d.height});}return r}var Ue=816,Ve=1056,qe=96,je=48;function O(e){return Math.round(e/1440*96)}function $e(e){return {w:e?.pageWidth?O(e.pageWidth):816,h:e?.pageHeight?O(e.pageHeight):1056}}function Je(e){return {top:e?.marginTop?O(e.marginTop):96,right:e?.marginRight?O(e.marginRight):96,bottom:e?.marginBottom?O(e.marginBottom):96,left:e?.marginLeft?O(e.marginLeft):96,header:e?.headerDistance?O(e.headerDistance):48,footer:e?.footerDistance?O(e.footerDistance):48}}function Ke(e,t){let a={header:null,footer:null,firstHeader:null,firstFooter:null};if(!e?.package)return a;let o=e.package.headers,n=e.package.footers,r=null,s=null,i=null,l=null;if(o&&t?.headerReferences){let u=t.headerReferences.find(c=>c.type==="default");u?.rId&&(r=o.get(u.rId)??null);let f=t.headerReferences.find(c=>c.type==="first");f?.rId&&(i=o.get(f.rId)??null);}if(n&&t?.footerReferences){let u=t.footerReferences.find(c=>c.type==="default");u?.rId&&(s=n.get(u.rId)??null);let f=t.footerReferences.find(c=>c.type==="first");f?.rId&&(l=n.get(f.rId)??null);}return t?.titlePg||(!r&&i&&(r=i),!s&&l&&(s=l)),{header:r,footer:s,firstHeader:i,firstFooter:l}}export{We as A,Ue as B,Ve as C,qe as D,je as E,$e as F,Je as G,Ke as H,j as a,A as b,Me as c,ae as d,He as e,se as f,we as g,Re as h,Be as i,Ie as j,K as k,ue as l,Le as m,fe as n,Ce as o,De as p,_e as q,Ae as r,Oe as s,de as t,pe as u,be as v,Ne as w,xe as x,ze as y,Ge as z};
|
package/dist/chunk-ICE6NC3S.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {q,p}from'./chunk-CCPBNE2F.mjs';var t=new q(p());t.buildSchema();t.initializeRuntime();var s=t,n=t.getSchema();export{s as a,n as b};
|
package/dist/chunk-IFUED5ZS.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {e,b,f as f$1,g}from'./chunk-7OW3VCZE.mjs';import {f}from'./chunk-VW22RZ6C.mjs';function L(t){return t.attrs.href||""}function D(t){let e=t.filter(n=>n.type.name!=="hyperlink");return e.length===0?"":e.map(n=>`${n.type.name}:${JSON.stringify(n.attrs)}`).sort().join("|")}function x(t){let e={};for(let n of t)switch(n.type.name){case "bold":e.bold=true,e.boldCs=true;break;case "italic":e.italic=true,e.italicCs=true;break;case "underline":{let i=n.attrs;e.underline={style:i.style||"single",color:i.color};break}case "strike":n.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":{let i=n.attrs;e.color={rgb:i.rgb,themeColor:i.themeColor,themeTint:i.themeTint,themeShade:i.themeShade};break}case "highlight":e.highlight=n.attrs.color;break;case "fontSize":e.fontSize=n.attrs.size,e.fontSizeCs=n.attrs.size;break;case "fontFamily":{let i=n.attrs;e.fontFamily={ascii:i.ascii,hAnsi:i.hAnsi,eastAsia:i.eastAsia||void 0,cs:i.cs||i.ascii||void 0,asciiTheme:i.asciiTheme,hAnsiTheme:i.hAnsiTheme||void 0,eastAsiaTheme:i.eastAsiaTheme||void 0,csTheme:i.csTheme||void 0};break}case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break;case "allCaps":e.allCaps=true;break;case "smallCaps":e.smallCaps=true;break;case "characterSpacing":{n.attrs.spacing!=null&&(e.spacing=n.attrs.spacing),n.attrs.position!=null&&(e.position=n.attrs.position),n.attrs.scale!=null&&(e.scale=n.attrs.scale),n.attrs.kerning!=null&&(e.kerning=n.attrs.kerning);break}case "emboss":e.emboss=true;break;case "imprint":e.imprint=true;break;case "textShadow":e.shadow=true;break;case "emphasisMark":e.emphasisMark=n.attrs.type||"dot";break;case "textOutline":e.outline=true;break;case "hidden":e.hidden=true;break;case "rtl":e.rtl=true;break;case "textEffect":e.effect=n.attrs.effect||"blinkBackground";break}return e}function H(t){let e=t.attrs.href;return e?.startsWith("#")?{type:"hyperlink",anchor:e.substring(1),tooltip:t.attrs.tooltip||void 0,children:[]}:{type:"hyperlink",href:e,tooltip:t.attrs.tooltip||void 0,rId:t.attrs.rId||void 0,children:[]}}function P(t,e){let n=e.marks.filter(i=>i.type.name!=="hyperlink");e.isText&&e.text?t.children.push(w(e.text,n)):e.type.name==="tab"?t.children.push(v()):e.type.name==="hardBreak"&&t.children.push(M());}function w(t,e){let n=x(e),i={type:"text",text:t};return {type:"run",formatting:Object.keys(n).length>0?n:void 0,content:[i]}}function O(t,e){let n=t.content[t.content.length-1];n&&n.type==="text"?n.text+=e:t.content.push({type:"text",text:e});}function M(){return {type:"run",content:[{type:"break",breakType:"textWrapping"}]}}function v(){return {type:"run",content:[{type:"tab"}]}}function W(t,e){let n=t.attrs,i=e&&e.length>0?x(e):void 0,o=n.displayText||"";if(!o)switch(n.fieldType){case "PAGE":o="1";break;case "NUMPAGES":o="1";break;default:o=" ";break}let r={type:"run",content:[{type:"text",text:o}],...i&&Object.keys(i).length>0?{formatting:i}:{}};return n.fieldKind==="complex"?{type:"complexField",instruction:n.instruction,fieldType:n.fieldType,fieldCode:[],fieldResult:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}:{type:"simpleField",instruction:n.instruction,fieldType:n.fieldType,content:[r],fldLock:n.fldLock||void 0,dirty:n.dirty||void 0}}function j(t){let e=t.attrs;return {type:"mathEquation",display:e.display||"inline",ommlXml:e.ommlXml,plainText:e.plainText||void 0}}function R(t){let e=t.attrs,i={type:e.wrapType||"inline"};e.distTop!==void 0&&(i.distT=f(e.distTop)),e.distBottom!==void 0&&(i.distB=f(e.distBottom)),e.distLeft!==void 0&&(i.distL=f(e.distLeft)),e.distRight!==void 0&&(i.distR=f(e.distRight)),e.wrapText&&(i.wrapText=e.wrapText);let o={type:"image",rId:e.rId||"",src:e.src,alt:e.alt||void 0,title:e.title||void 0,size:{width:f(e.width||0),height:f(e.height||0)},wrap:i};if(e.transform){let a=e.transform,l={},f=a.match(/rotate\(([-\d.]+)deg\)/);f&&(l.rotation=parseFloat(f[1])),a.includes("scaleX(-1)")&&(l.flipH=true),a.includes("scaleY(-1)")&&(l.flipV=true),(l.rotation||l.flipH||l.flipV)&&(o.transform=l);}if(e.position?.horizontal&&e.position?.vertical){let a=e.position;o.position={horizontal:{relativeTo:a.horizontal.relativeTo||"column",alignment:a.horizontal.align,posOffset:a.horizontal.posOffset},vertical:{relativeTo:a.vertical.relativeTo||"paragraph",alignment:a.vertical.align,posOffset:a.vertical.posOffset}};}if(e.borderWidth&&e.borderWidth>0){let a={solid:"solid",dotted:"dot",dashed:"dash",double:"solid",groove:"solid",ridge:"solid",inset:"solid",outset:"solid"};o.outline={width:f(e.borderWidth),color:e.borderColor?{rgb:e.borderColor.replace("#","")}:void 0,style:e.borderStyle&&a[e.borderStyle]||"solid"};}if(e.hlinkHref&&(o.hlinkHref=e.hlinkHref),e.cropTop!==void 0||e.cropRight!==void 0||e.cropBottom!==void 0||e.cropLeft!==void 0){let a={};e.cropTop!==void 0&&e.cropTop!==null&&(a.top=e.cropTop),e.cropRight!==void 0&&e.cropRight!==null&&(a.right=e.cropRight),e.cropBottom!==void 0&&e.cropBottom!==null&&(a.bottom=e.cropBottom),e.cropLeft!==void 0&&e.cropLeft!==null&&(a.left=e.cropLeft),Object.keys(a).length>0&&(o.crop=a);}if(e.opacity!==void 0&&e.opacity!==null&&e.opacity<1&&(o.opacity=e.opacity),e.layoutInCell!==void 0&&e.layoutInCell!==null&&(o.layoutInCell=e.layoutInCell),e.allowOverlap!==void 0&&e.allowOverlap!==null&&(o.allowOverlap=e.allowOverlap),e.effectExtentTop||e.effectExtentBottom||e.effectExtentLeft||e.effectExtentRight){let a={};e.effectExtentTop&&(a.top=f(e.effectExtentTop)),e.effectExtentBottom&&(a.bottom=f(e.effectExtentBottom)),e.effectExtentLeft&&(a.left=f(e.effectExtentLeft)),e.effectExtentRight&&(a.right=f(e.effectExtentRight)),Object.keys(a).length>0&&(o.padding=a);}return {type:"run",content:[{type:"drawing",image:o}]}}function S(t){let e=t.attrs,n={type:"shape",shapeType:e.shapeType||"rect",id:e.shapeId||void 0,size:{width:e.width?f(e.width):0,height:e.height?f(e.height):0}};if(e.fillType==="gradient"&&e.gradientStops)try{let o=JSON.parse(e.gradientStops);n.fill={type:"gradient",gradient:{type:e.gradientType||"linear",angle:e.gradientAngle||void 0,stops:o.map(r=>({position:r.position,color:{rgb:r.color.replace("#","")}}))}};}catch{n.fill={type:"solid",color:{rgb:(e.fillColor||"000000").replace("#","")}};}else e.fillColor?n.fill={type:e.fillType||"solid",color:{rgb:e.fillColor.replace("#","")}}:e.fillType==="none"&&(n.fill={type:"none"});if(e.outlineWidth&&e.outlineWidth>0){let o={solid:"solid",dotted:"dot",dashed:"dash"};n.outline={width:f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&o[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:n}]}}function T(t){let e=t.attrs,n=$(z(t),t),i=e.bookmarks;if(i&&i.length>0){let r=i.map(l=>({type:"bookmarkStart",id:l.id,name:l.name})),a=i.map(l=>({type:"bookmarkEnd",id:l.id}));n=[...r,...n,...a];}let o={type:"paragraph",paraId:e.paraId||void 0,textId:e.textId||void 0,formatting:K(e),content:n};return e.renderedPageBreakBefore&&(o.renderedPageBreakBefore=true),e.pPrIns&&(o.pPrIns={id:e.pPrIns.revisionId,author:e.pPrIns.author,...e.pPrIns.date?{date:e.pPrIns.date}:{}}),e.pPrDel&&(o.pPrDel={id:e.pPrDel.revisionId,author:e.pPrDel.author,...e.pPrDel.date?{date:e.pPrDel.date}:{}}),e.pPrChange&&e.pPrChange.length>0&&(o.propertyChanges=e.pPrChange),e._sectionProperties?o.sectionProperties=e._sectionProperties:e.sectionBreakType&&(o.sectionProperties={sectionStart:e.sectionBreakType}),o}function $(t,e){let n=new Set;if(e.forEach(a=>{for(let l of a.marks)l.type.name==="comment"&&n.add(l.attrs.commentId);}),n.size===0)return t;let i=[],o=new Set,r=0;e.forEach(a=>{let l=new Set;for(let f of a.marks)f.type.name==="comment"&&l.add(f.attrs.commentId);for(let f of [...o])l.has(f)||(i.push({type:"commentRangeEnd",id:f}),o.delete(f));for(let f of l)o.has(f)||(i.push({type:"commentRangeStart",id:f}),o.add(f));r<t.length&&i.push(t[r]),r++;});for(let a of o)i.push({type:"commentRangeEnd",id:a});return i}function K(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.alignment!==(n.alignment||void 0)&&(i.alignment=t.alignment||void 0),t.numPr!==n.numPr&&JSON.stringify(t.numPr)!==JSON.stringify(n.numPr)&&(i.numPr=t.numPr||void 0),t.styleId!==(n.styleId||void 0)&&(i.styleId=t.styleId||void 0),t.pageBreakBefore!==(n.pageBreakBefore||void 0)&&(i.pageBreakBefore=t.pageBreakBefore||void 0),t.bidi!==(n.bidi||void 0)&&(i.bidi=t.bidi||void 0),i}if(t.alignment||t.spaceBefore||t.spaceAfter||t.lineSpacing||t.indentLeft||t.indentRight||t.indentFirstLine||t.numPr||t.styleId||t.borders||t.shading||t.tabs||t.outlineLevel!=null||t.contextualSpacing||t.bidi)return {alignment:t.alignment||void 0,spaceBefore:t.spaceBefore||void 0,spaceAfter:t.spaceAfter||void 0,lineSpacing:t.lineSpacing||void 0,lineSpacingRule:t.lineSpacingRule||void 0,indentLeft:t.indentLeft||void 0,indentRight:t.indentRight||void 0,indentFirstLine:t.indentFirstLine||void 0,hangingIndent:t.hangingIndent||void 0,numPr:t.numPr||void 0,styleId:t.styleId||void 0,borders:t.borders||void 0,shading:t.shading||void 0,tabs:t.tabs||void 0,outlineLevel:t.outlineLevel??void 0,contextualSpacing:t.contextualSpacing||void 0,bidi:t.bidi||void 0}}function z(t){let e=[],n=null,i=null,o=null;return t.forEach(r=>{let a=r.marks.find(s=>s.type.name==="footnoteRef");if(a){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let u={type:a.attrs.noteType==="endnote"?"endnoteRef":"footnoteRef",id:parseInt(a.attrs.id,10)||0};e.push({type:"run",content:[u]});return}let l=r.marks.find(s=>s.type.name==="insertion"),f=r.marks.find(s=>s.type.name==="deletion");if(l||f){n&&(e.push(n),n=null,i=null),o&&(e.push(o),o=null);let s=l||f,u;if(r.type.name==="image")u=R(r);else if(r.type.name==="shape")u=S(r);else {let m=r.marks.filter(h=>h.type.name!=="insertion"&&h.type.name!=="deletion"),g=x(m);u={type:"run",content:r.isText&&r.text?[{type:"text",text:r.text}]:[],...Object.keys(g).length>0?{formatting:g}:{}};}let p={id:s.attrs.revisionId,author:s.attrs.author||"Unknown",date:s.attrs.date||void 0},y=s.attrs.isMovePair===true;l?y?e.push({type:"moveTo",info:p,content:[u]}):e.push({type:"insertion",info:p,content:[u]}):y?e.push({type:"moveFrom",info:p,content:[u]}):e.push({type:"deletion",info:p,content:[u]});return}let d=r.marks.find(s=>s.type.name==="hyperlink");if(d){let s=L(d),u=o?.href||(o?.anchor?`#${o.anchor}`:"");o&&u===s?P(o,r):(n&&(e.push(n),n=null,i=null),o&&e.push(o),o=H(d),P(o,r));return}if(o&&(e.push(o),o=null),r.isText){let s=D(r.marks);n&&i===s?O(n,r.text||""):(n&&e.push(n),n=w(r.text||"",r.marks),i=s);}else r.type.name==="hardBreak"?(n&&(e.push(n),n=null,i=null),e.push(M())):r.type.name==="image"?(n&&(e.push(n),n=null,i=null),e.push(R(r))):r.type.name==="shape"?(n&&(e.push(n),n=null,i=null),e.push(S(r))):r.type.name==="tab"?(n&&(e.push(n),n=null,i=null),e.push(v())):r.type.name==="field"?(n&&(e.push(n),n=null,i=null),e.push(W(r,r.marks))):r.type.name==="sdt"?(n&&(e.push(n),n=null,i=null),e.push(V(r))):r.type.name==="math"&&(n&&(e.push(n),n=null,i=null),e.push(j(r)));}),n&&e.push(n),o&&e.push(o),e}function V(t){let e=b(t.attrs),i=z(t).filter(o=>o.type==="run"||o.type==="hyperlink"||o.type==="simpleField"||o.type==="complexField"||o.type==="inlineSdt"||o.type==="mathEquation");return {type:"inlineSdt",properties:e,content:i}}function q(t){for(let e of t)for(let n of e.cells){let i=n.formatting?.borders;if(i){let o=i.top||i.left||i.right||i.bottom||i.insideH||i.insideV;return o?{top:i.top??o,bottom:i.bottom??o,left:i.left??o,right:i.right??o,insideH:i.insideH??i.bottom??o,insideV:i.insideV??i.right??o}:void 0}}}function J(t){let e=[],n=[],i=0;for(let o=0;o<t.childCount;o++){let r=t.child(o),a=0;r.forEach(l=>{if(l.type.name!=="tableCell"&&l.type.name!=="tableHeader")return;for(;e[o]?.[a];)a++;let f=l.attrs.rowspan||1,d=l.attrs.colspan||1;n.push({row:o,col:a,rowspan:f,colspan:d,cell:G(l)});for(let s=o;s<o+f;s++){let u=e[s]??[];e[s]=u;for(let p=a;p<a+d;p++)u[p]=true;}a+=d,i=Math.max(i,a);});}return {anchors:n,totalCols:i}}function I(t){let e=t.attrs,{anchors:n,totalCols:i}=J(t),o=new Map,r=new Map;for(let d of n){o.set(`${d.row}-${d.col}`,d);for(let s=d.row;s<d.row+d.rowspan;s++)for(let u=d.col;u<d.col+d.colspan;u++)r.set(`${s}-${u}`,d);}let a=[];for(let d=0;d<t.childCount;d++){let s=t.child(d),u=[];for(let m=0;m<i;){let g=o.get(`${d}-${m}`);if(g){let b={...g.cell.formatting??{}};g.colspan>1?b.gridSpan=g.colspan:delete b.gridSpan,g.rowspan>1?b.vMerge="restart":delete b.vMerge,u.push({...g.cell,formatting:Object.keys(b).length?b:void 0}),m+=g.colspan;continue}let h=r.get(`${d}-${m}`);if(!h){m++;continue}let k={...h.cell.formatting??{}};h.colspan>1?k.gridSpan=h.colspan:delete k.gridSpan,k.vMerge="continue",u.push({...h.cell,content:[],formatting:k}),m+=h.colspan;}let p=s.attrs,y={type:"tableRow",formatting:X(p),cells:u};p.trIns?y.structuralChange={type:"tableRowInsertion",info:{id:p.trIns.revisionId,author:p.trIns.author,...p.trIns.date?{date:p.trIns.date}:{}}}:p.trDel&&(y.structuralChange={type:"tableRowDeletion",info:{id:p.trDel.revisionId,author:p.trDel.author,...p.trDel.date?{date:p.trDel.date}:{}}}),p.trPrChange&&p.trPrChange.length>0&&(y.propertyChanges=p.trPrChange),a.push(y);}let l=U(e)||void 0;if(!l?.borders){let d=q(a);if(d)if(l)l.borders=d;else return {type:"table",columnWidths:e.columnWidths||void 0,formatting:{borders:d},rows:a}}let f={type:"table",columnWidths:e.columnWidths||void 0,formatting:l,rows:a};return e.tblPrChange&&e.tblPrChange.length>0&&(f.propertyChanges=e.tblPrChange),f}function U(t){if(t._originalFormatting){let o=t._originalFormatting,r={...o};t.styleId!==(o.styleId||void 0)&&(r.styleId=t.styleId||void 0),t.justification!==(o.justification||void 0)&&(r.justification=t.justification||void 0),t.floating!==(o.floating||void 0)&&(r.floating=t.floating||void 0),t.look!==(o.look||void 0)&&(r.look=t.look||void 0);let a=o.width?.value,l=o.width?.type;return (t.width!==a||t.widthType!==l)&&(t.width!=null||t.widthType?r.width={value:t.width??0,type:t.widthType||"dxa"}:r.width=void 0),t.cellMargins&&(r.cellMargins={top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}),r}if(!(t.styleId||t.width!=null||t.widthType||t.justification||t.floating||t.cellMargins||t.look))return;let n=t.cellMargins?{top:t.cellMargins.top!=null?{value:t.cellMargins.top,type:"dxa"}:void 0,bottom:t.cellMargins.bottom!=null?{value:t.cellMargins.bottom,type:"dxa"}:void 0,left:t.cellMargins.left!=null?{value:t.cellMargins.left,type:"dxa"}:void 0,right:t.cellMargins.right!=null?{value:t.cellMargins.right,type:"dxa"}:void 0}:void 0,i;return (t.width!=null||t.widthType)&&(i={value:t.width??0,type:t.widthType||"dxa"}),{styleId:t.styleId||void 0,width:i,justification:t.justification||void 0,floating:t.floating||void 0,cellMargins:n,look:t.look||void 0}}function X(t){if(t._originalFormatting){let n=t._originalFormatting,i={...n};return t.height!==(n.height?.value||void 0)&&(i.height=t.height?{value:t.height,type:"dxa"}:void 0),t.heightRule!==(n.heightRule||void 0)&&(i.heightRule=t.heightRule||void 0),t.isHeader!==(n.header||void 0)&&(i.header=t.isHeader||void 0),i}if(t.height||t.isHeader)return {height:t.height?{value:t.height,type:"dxa"}:void 0,heightRule:t.heightRule||void 0,header:t.isHeader||void 0}}function G(t){let e=t.attrs,n=[];t.forEach(o=>{o.type.name==="paragraph"?n.push(T(o)):o.type.name==="table"&&n.push(I(o));});let i={type:"tableCell",formatting:Y(e),content:n};if(e.cellMarker){let o=e.cellMarker,r={id:o.info.revisionId,author:o.info.author,...o.info.date?{date:o.info.date}:{}};o.kind==="ins"?i.structuralChange={type:"tableCellInsertion",info:r}:o.kind==="del"?i.structuralChange={type:"tableCellDeletion",info:r}:i.structuralChange={type:"tableCellMerge",info:r,...o.vMerge?{vMerge:o.vMerge}:{},...o.vMergeOrig?{vMergeOrig:o.vMergeOrig}:{}};}return e.tcPrChange&&e.tcPrChange.length>0&&(i.propertyChanges=e.tcPrChange),i}function Y(t){if(t._originalFormatting){let i=t._originalFormatting,o={...i};if(t.colspan>1&&(o.gridSpan=t.colspan),t.width!=null&&(o.width={value:t.width,type:t.widthType||"dxa"}),t.verticalAlign!==(i.verticalAlign||void 0)&&(o.verticalAlign=t.verticalAlign||void 0),t.backgroundColor?t._originalResolvedFill===t.backgroundColor&&i.shading?o.shading=i.shading:o.shading={fill:{rgb:t.backgroundColor}}:i.shading&&(o.shading=void 0),t.borders&&(o.borders=t.borders),t.margins){let r=t.margins,a={};r.top!=null&&(a.top={value:r.top,type:"dxa"}),r.bottom!=null&&(a.bottom={value:r.bottom,type:"dxa"}),r.left!=null&&(a.left={value:r.left,type:"dxa"}),r.right!=null&&(a.right={value:r.right,type:"dxa"}),o.margins=a;}return t.textDirection!==(i.textDirection||void 0)&&(o.textDirection=t.textDirection||void 0),o}if(!(t.colspan>1||t.rowspan>1||t.width!=null||t.verticalAlign||t.backgroundColor||t.borders||t.margins||t.textDirection))return;let n;if(t.margins){let i=t.margins;n={},i.top!=null&&(n.top={value:i.top,type:"dxa"}),i.bottom!=null&&(n.bottom={value:i.bottom,type:"dxa"}),i.left!=null&&(n.left={value:i.left,type:"dxa"}),i.right!=null&&(n.right={value:i.right,type:"dxa"});}return {gridSpan:t.colspan>1?t.colspan:void 0,width:t.width!=null?{value:t.width,type:t.widthType||"dxa"}:void 0,verticalAlign:t.verticalAlign||void 0,textDirection:t.textDirection||void 0,shading:t.backgroundColor?{fill:{rgb:t.backgroundColor}}:void 0,borders:t.borders,margins:n}}function A(t){let e=t.attrs,n=[];t.forEach(l=>{l.type.name==="paragraph"&&n.push(T(l));});let i={type:"shape",shapeType:"rect",id:e.textBoxId||void 0,size:{width:e.width?f(e.width):0,height:e.height?f(e.height):0},textBody:{content:n.length>0?n:[{type:"paragraph",content:[]}],margins:{top:e.marginTop!=null?f(e.marginTop):void 0,bottom:e.marginBottom!=null?f(e.marginBottom):void 0,left:e.marginLeft!=null?f(e.marginLeft):void 0,right:e.marginRight!=null?f(e.marginRight):void 0}}},o=f$1(e);o&&(i.position=o);let r=g(e);if(r&&(i.wrap=r),e.fillColor&&(i.fill={type:"solid",color:{rgb:e.fillColor.replace("#","")}}),e.outlineWidth&&e.outlineWidth>0){let l={solid:"solid",dotted:"dot",dashed:"dash"};i.outline={width:f(e.outlineWidth),color:e.outlineColor?{rgb:e.outlineColor.replace("#","")}:void 0,style:e.outlineStyle&&l[e.outlineStyle]||"solid"};}return {type:"run",content:[{type:"shape",shape:i}]}}function _(t){return {type:"paragraph",content:[A(t)]}}function Q(t,e){let i={content:B(t),finalSectionProperties:e?.package.document.finalSectionProperties,sections:e?.package.document.sections,comments:e?.package.document.comments};return e?{...e,package:{...e.package,document:i}}:{package:{document:i}}}function B(t){let e$1=[],n=[],i=()=>{for(let o of n)e$1.push({type:"paragraph",content:[o]});n=[];};return t.forEach(o=>{if(o.type.name==="paragraph"){let r=T(o);n.length>0&&(r.content=[...n,...r.content],n=[]),e$1.push(r);}else if(o.type.name==="table")i(),e$1.push(I(o));else if(o.type.name==="blockSdt")i(),e$1.push(Z(o));else if(o.type.name==="textBox"){let r=o.attrs;e(r)?n.push(A(o)):(i(),e$1.push(_(o)));}else o.type.name==="pageBreak"&&(i(),e$1.push(ee()));}),i(),e$1}function Z(t){return {type:"blockSdt",properties:b(t.attrs),content:B(t)}}function ee(){return {type:"paragraph",content:[{type:"run",content:[{type:"break",breakType:"page"}]}]}}function xe(t,e){return Q(e,t)}function ke(t){return B(t)}export{Q as a,xe as b,ke as c};
|
package/dist/chunk-KGTEBLB6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkAMB6Y77B_js=require('./chunk-AMB6Y77B.js'),chunkSORYYVJ7_js=require('./chunk-SORYYVJ7.js'),chunkLTHT4A4S_js=require('./chunk-LTHT4A4S.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunkROG4MNOR_js=require('./chunk-ROG4MNOR.js'),chunkZBFNOJGY_js=require('./chunk-ZBFNOJGY.js'),chunkBHBOAP6Z_js=require('./chunk-BHBOAP6Z.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js'),chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');function Ve(e,t,n,o,r){let a=new Map,i=[];for(let m of e.fragments){let l=o(m);if(l.length===0||!("height"in m))continue;let h=m.y-e.margins.top,u=h+m.height;l.forEach((y,b)=>{let g=`${b}:${y.id}`,f=a.get(g);f?(f.top=Math.min(f.top,h),f.bottom=Math.max(f.bottom,u)):(a.set(g,{group:y,depth:b,top:h,bottom:u}),i.push(g));});}let p=2,d=[];for(let m of i){let{group:l,depth:h,top:u,bottom:y}=a.get(m),b=h*(p+1),g=r.createElement("div");g.className="layout-block-sdt-box",g.dataset.sdtGroupId=l.id,g.dataset.sdtType=l.sdtType,g.dataset.sdtDepth=String(h+1),l.tag!=null&&(g.dataset.sdtTag=l.tag),l.alias!=null&&(g.dataset.sdtAlias=l.alias),l.lock!=null&&(g.dataset.sdtLock=l.lock),g.style.position="absolute",g.style.left=`${b}px`,g.style.top=`${u-p}px`,g.style.width=`${n-b*2}px`,g.style.height=`${y-u+p*2}px`;let f=l.alias||l.tag||l.sdtType;if(f){let w=r.createElement("span");w.className="layout-block-sdt-label",w.textContent=f,g.appendChild(w);}let x=gt(l.sdtType);if(x&&l.tag!=null&&!l.bound&&l.lock!=="contentLocked"&&l.lock!=="sdtContentLocked"){let w=r.createElement("button");w.type="button",w.className="layout-sdt-widget",w.dataset.sdtWidget=x,w.dataset.sdtTag=l.tag,w.dataset.sdtGroupId=l.id,w.setAttribute("aria-label",`${x} control ${l.alias||l.tag}`),x==="dropdown"?w.setAttribute("aria-haspopup","listbox"):x==="date"&&w.setAttribute("aria-haspopup","dialog"),w.textContent=x==="dropdown"?"\u25BE":x==="date"?"\u{1F4C5}":l.checked?"\u2612":"\u2610",g.appendChild(w);}if(l.repeatingItem&&!l.bound){let w=r.createElement("div");w.className="layout-sdt-repeat-controls";for(let s of ["add","remove"]){let c=r.createElement("button");c.type="button",c.className="layout-sdt-repeat-btn",c.dataset.sdtRepeat=s,c.dataset.sdtGroupId=l.id,c.setAttribute("aria-label",s==="add"?"Add item":"Remove item"),c.textContent=s==="add"?"\uFF0B":"\u2715",w.appendChild(c);}g.appendChild(w);}t.appendChild(g),d.push(g);}mt(t,d);}function gt(e){return e==="checkbox"?"checkbox":e==="dropDownList"||e==="comboBox"?"dropdown":e==="date"?"date":null}function mt(e,t){if(t.length===0||typeof e.addEventListener!="function")return;let n=(p,d)=>{for(let m of t){let l=m.getBoundingClientRect(),h=p>=l.left&&p<=l.right&&d>=l.top&&d<=l.bottom;h!==m.classList.contains("is-active")&&m.classList.toggle("is-active",h);}},o=typeof requestAnimationFrame=="function"?requestAnimationFrame:p=>p(),r=false,a=0,i=0;e.addEventListener("mousemove",p=>{a=p.clientX,i=p.clientY,!r&&(r=true,o(()=>{r=false,n(a,i);}));}),e.addEventListener("mouseleave",()=>{for(let p of t)p.classList.remove("is-active");});}function dn(e,t,n){let o=new Set,r=e.content.size,a=i=>{let p=e.resolve(Math.max(0,Math.min(i,r)));for(let d=1;d<=p.depth;d++)p.node(d).type.name==="blockSdt"&&o.add(`sdt@${p.before(d)}`);};return a(t),n!==t&&a(n),o}function cn(e,t){let n=e.querySelectorAll(".layout-block-sdt-box");for(let o of n){let r=o.dataset.sdtGroupId,a=r!=null&&t.has(r);a!==o.classList.contains("is-focused")&&o.classList.toggle("is-focused",a);}}var Y={fragment:"layout-fragment",paragraph:"layout-fragment-paragraph",table:"layout-fragment-table",image:"layout-fragment-image",line:"layout-line",run:"layout-run"};function ut(e){return e.kind==="paragraph"}function ht(e){return e.kind==="table"}function yt(e){return e.kind==="image"}function de(e){e.style.position="absolute",e.style.overflow="hidden";}function bt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.paragraph}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromLine=String(e.fromLine),o.dataset.toLine=String(e.toLine),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.continuesFromPrev&&(o.dataset.continuesFromPrev="true"),e.continuesOnNext&&(o.dataset.continuesOnNext="true"),o}function xt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.table}`,de(o),o.dataset.blockId=String(e.blockId),o.dataset.fromRow=String(e.fromRow),o.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),o}function kt(e,t,n){let o=n.createElement("div");return o.className=`${Y.fragment} ${Y.image}`,de(o),o.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(o.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(o.dataset.pmEnd=String(e.pmEnd)),e.isAnchored&&(o.dataset.anchored="true"),e.zIndex!==void 0&&(o.style.zIndex=String(e.zIndex)),o}function Te(e,t,n={}){let o=n.document??document;if(ut(e))return bt(e,t,o);if(ht(e))return xt(e,t,o);if(yt(e))return kt(e,t,o);let r=o.createElement("div");r.className=Y.fragment,de(r);let a=e;return a.blockId!==void 0&&(r.dataset.blockId=String(a.blockId)),a.kind&&(r.dataset.kind=a.kind),r}var v={fragment:"layout-paragraph",line:"layout-line",run:"layout-run",text:"layout-run-text",tab:"layout-run-tab",image:"layout-run-image",lineBreak:"layout-run-linebreak"};function z(e){return e.kind==="text"}function O(e){return e.kind==="tab"}function G(e){return e.kind==="image"}function j(e){return e.kind==="lineBreak"}function U(e){return e.kind==="field"}var Ye={image:"layout-image",imageAnchored:"layout-image-anchored"};function te(e){return !!(e.cropTop||e.cropRight||e.cropBottom||e.cropLeft||e.opacity!=null&&e.opacity<1)}function ne(e,t){let n=t.cropTop??0,o=t.cropRight??0,r=t.cropBottom??0,a=t.cropLeft??0;(n||o||r||a)&&(e.style.clipPath=`inset(${n*100}% ${o*100}% ${r*100}% ${a*100}%)`),t.opacity!=null&&t.opacity<1&&(e.style.opacity=String(Math.max(0,t.opacity)));}function q(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=Ye.image,e.isAnchored&&i.classList.add(Ye.imageAnchored),i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",e.zIndex!==void 0&&(i.style.zIndex=String(e.zIndex)),t.anchor?.behindDoc&&(i.style.zIndex="-1"),i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=a.createElement("img");if(p.src=t.src,p.alt=t.alt??"",p.style.width="100%",p.style.height="100%",p.style.objectFit="contain",p.style.display="block",t.transform&&(p.style.transform=t.transform),p.draggable=false,t.hlinkHref){let d=a.createElement("a");d.href=t.hlinkHref,d.target="_blank",d.rel="noopener noreferrer",d.style.display="block",d.style.width="100%",d.style.height="100%",d.appendChild(p),i.appendChild(d);}else i.appendChild(p);return i}function St(e,t,n){if(t.fontFamily&&(e.style.fontFamily=chunkN3Y5BUKV_js.a(t.fontFamily).cssFallback),t.fontSize){let r=t.fontSize*96/72;e.style.fontSize=`${r}px`;}if(t.bold&&(e.style.fontWeight="bold"),t.italic&&(e.style.fontStyle="italic"),t.color&&(e.style.color=t.color),t.letterSpacing&&(e.style.letterSpacing=`${t.letterSpacing}px`),t.allCaps&&(e.style.textTransform="uppercase"),t.smallCaps&&(e.style.fontVariant="small-caps"),t.positionPx&&(e.style.verticalAlign=`${t.positionPx}px`),t.horizontalScale&&t.horizontalScale!==100&&(e.style.display="inline-block",e.style.transform=`scaleX(${t.horizontalScale/100})`,e.style.transformOrigin="left center"),t.kerningMinPt&&t.kerningMinPt>0&&(t.fontSize??11)>=t.kerningMinPt&&(e.style.fontKerning="normal"),t.emboss&&(e.style.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),t.imprint&&(e.style.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),t.textShadow&&!t.emboss&&!t.imprint&&(e.style.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),t.textOutline&&(e.style.webkitTextStroke="1px currentColor",e.style.webkitTextFillColor="transparent"),t.emphasisMark){let r=t.emphasisMark==="comma"?"filled sesame":t.emphasisMark==="circle"?"filled circle":"filled dot",a=t.emphasisMark==="underDot"?"under right":"over right";e.style.textEmphasis=`${r}`,e.style.textEmphasisPosition=a,e.style.webkitTextEmphasis=r,e.style.webkitTextEmphasisPosition=a;}t.highlight&&(e.style.backgroundColor=t.highlight);let o=[];if(t.underline&&(o.push("underline"),typeof t.underline=="object"&&(t.underline.style&&(e.style.textDecorationStyle=t.underline.style),t.underline.color&&(e.style.textDecorationColor=t.underline.color))),t.strike&&o.push("line-through"),t.commentIds&&t.commentIds.length>0){let r=t.commentIds.find(a=>!n||!n.has(a));r!=null&&(e.style.backgroundColor="rgba(255, 212, 0, 0.15)",e.style.borderBottom="1px solid rgba(255, 212, 0, 0.4)",e.dataset.commentId=String(r));}t.isInsertion&&(e.style.backgroundColor="rgba(52, 168, 83, 0.08)",e.style.borderBottom="2px dashed #2e7d32",e.style.paddingBottom="1px",e.classList.add("docx-insertion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),t.isDeletion&&(e.style.backgroundColor="rgba(211, 47, 47, 0.08)",e.style.color="#c62828",o.includes("line-through")||o.push("line-through"),e.style.textDecorationColor="#c62828",e.classList.add("docx-deletion"),t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId))),o.length>0&&(e.style.textDecorationLine=o.join(" ")),t.superscript&&(e.style.verticalAlign="super",e.style.fontSize="0.75em"),t.subscript&&(e.style.verticalAlign="sub",e.style.fontSize="0.75em"),t.hidden&&(e.classList.add("docx-hidden"),e.style.opacity="0.4",e.style.textDecoration="underline dotted"),t.rtl&&e.setAttribute("dir","rtl"),t.textEffect&&(e.classList.add("docx-text-effect",`docx-text-effect-${t.textEffect}`),e.dataset.effect=t.textEffect);}function K(e,t,n){t!==void 0&&(e.dataset.pmStart=String(t)),n!==void 0&&(e.dataset.pmEnd=String(n));}function oe(e,t,n){let o=t.createElement("span");if(o.className=`${v.run} ${v.text}`,St(o,e,n),K(o,e.pmStart,e.pmEnd),e.hyperlink){let r=t.createElement("a");r.href=e.hyperlink.href,e.hyperlink.href.startsWith("#")||(r.target="_blank",r.rel="noopener noreferrer"),e.hyperlink.tooltip&&(r.title=e.hyperlink.tooltip),r.textContent=e.text,r.style.color="inherit",r.style.textDecoration="inherit",e.hyperlink.noDefaultStyle||(e.color||(r.style.color="#0563c1",o.style.color="#0563c1"),e.underline||(r.style.textDecoration="underline")),o.appendChild(r);}else o.textContent=e.text;return o}var Tt=1e3;function ce(e,t,n,o){let r=t.createElement("span");r.className=`${v.run} ${v.tab}`,r.style.display="inline-block",r.style.width=`${n}px`,K(r,e.pmStart,e.pmEnd);let a=o&&o!=="none"?wt(o):null;if(a){r.style.position="relative",r.textContent="\u200B";let i=t.createElement("span");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i.textContent=a.repeat(Tt),r.appendChild(i);}else r.textContent="\xA0";return r}function wt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "middleDot":return "\xB7";case "heavy":return "_";default:return null}}function qe(e){if(!e)return 0;let t=e.match(/rotate\(([-\d.]+)deg\)/);return t?(parseFloat(t[1])%360+360)%360:0}function Ze(e,t,n){if(n===0||n===180)return {w:e,h:t};if(n===90||n===270)return {w:t,h:e};let o=n*Math.PI/180,r=Math.abs(Math.sin(o)),a=Math.abs(Math.cos(o));return {w:e*a+t*r,h:e*r+t*a}}function Ue(e,t){t.distTop&&(e.style.marginTop=`${t.distTop}px`),t.distBottom&&(e.style.marginBottom=`${t.distBottom}px`);}function Ft(e,t){let n=t.createElement("img");n.className=`${v.run} ${v.image}`,n.src=e.src,n.width=e.width,n.height=e.height,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,e.alt&&(n.alt=e.alt),e.transform&&(n.style.transform=e.transform,n.style.transformOrigin="center center"),te(e)&&ne(n,e);let o=qe(e.transform);if(o!==0){let r=Ze(e.width,e.height,o),a=t.createElement("span");return a.style.display="inline-block",a.style.position="relative",a.style.width=`${r.w}px`,a.style.height=`${r.h}px`,a.style.verticalAlign="middle",n.style.position="absolute",n.style.left=`${(r.w-e.width)/2}px`,n.style.top=`${(r.h-e.height)/2}px`,Ue(a,e),K(a,e.pmStart,e.pmEnd),a.appendChild(n),a}return n.style.display="inline-block",n.style.verticalAlign="middle",Ue(n,e),K(n,e.pmStart,e.pmEnd),n}function Xe(e,t){let n=t.createElement("div");n.className="layout-block-image",n.style.display="block",n.style.textAlign="center",n.style.marginTop=`${e.distTop??6}px`,n.style.marginBottom=`${e.distBottom??6}px`;let o=t.createElement("img");o.src=e.src,o.width=e.width,o.height=e.height,o.style.marginLeft="auto",o.style.marginRight="auto",e.alt&&(o.alt=e.alt),e.transform&&(o.style.transform=e.transform,o.style.transformOrigin="center center"),te(e)&&ne(o,e);let r=qe(e.transform);if(r!==0){let a=Ze(e.width,e.height,r);n.style.height=`${a.h}px`,n.style.position="relative",o.style.position="absolute",o.style.left="50%",o.style.top="50%",o.style.marginLeft=`${-e.width/2}px`,o.style.marginRight="0",o.style.marginTop=`${-e.height/2}px`;}return K(n,e.pmStart,e.pmEnd),n.appendChild(o),n}function pe(e,t){let n;return chunkSORYYVJ7_js.f(e)||e.displayMode==="block"||e.wrapType==="topAndBottom"?n=Xe(e,t):n=Ft(e,t),It(n,e),n}function It(e,t){if(t.isInsertion)e.style.outline="2px solid #2e7d32",e.style.outlineOffset="1px",e.classList.add("docx-insertion");else if(t.isDeletion)e.style.outline="2px solid #c62828",e.style.outlineOffset="1px",e.style.opacity="0.6",e.classList.add("docx-deletion");else return;t.changeAuthor&&(e.dataset.changeAuthor=t.changeAuthor),t.changeDate&&(e.dataset.changeDate=t.changeDate),t.changeRevisionId!=null&&(e.dataset.revisionId=String(t.changeRevisionId));}function we(e,t){let n=t.createElement("br");return n.className=`${v.run} ${v.lineBreak}`,K(n,e.pmStart,e.pmEnd),n}function fe(e,t,n){let o=e.fallback??"";switch(e.fieldType){case "PAGE":o=String(n.pageNumber);break;case "NUMPAGES":o=String(n.totalPages);break;case "DATE":o=new Date().toLocaleDateString();break;case "TIME":o=new Date().toLocaleTimeString();break}let r={...e,text:o};return oe(r,t,n?.resolvedCommentIds)}function Fe(e,t,n){if(z(e))return oe(e,t,n?.resolvedCommentIds);if(O(e))return ce(e,t,48,void 0);if(G(e))return pe(e,t);if(j(e))return we(e,t);if(U(e)&&n)return fe(e,t,n);let o=t.createElement("span");return o.className=v.run,o}function et(e,t){let n=[],o=e.runs;for(let r=t.fromRun;r<=t.toRun;r++){let a=o[r];if(a)if(z(a)){let i=r===t.fromRun?t.fromChar:0,p=r===t.toRun?t.toChar:a.text.length;if(i>0||p<a.text.length){let d=a.text.slice(i,p);n.push({...a,text:d,pmStart:a.pmStart!==void 0?a.pmStart+i:void 0,pmEnd:a.pmStart!==void 0?a.pmStart+p:void 0});}else n.push(a);}else n.push(a);}return n}function Je(e){return e==="center"?"center":e==="right"?"flex-end":"flex-start"}function Qe(e){return [e.pmStart??"no-start",e.pmEnd??"no-end",e.src,e.width,e.height,e.displayMode??"inline",e.wrapType??"none"].join("|")}function Ct(e){return {val:e.val,pos:e.pos,leader:e.leader}}function Rt(e,t,n){let o="";for(let r=t+1;r<e.length;r++){let a=e[r];if(z(a))o+=a.text;else if(U(a))a.fieldType==="PAGE"&&n?o+=String(n.pageNumber):a.fieldType==="NUMPAGES"&&n?o+=String(n.totalPages):o+=a.fallback??"";else if(O(a)||j(a))break}return o}var Et=.5;function Lt(e,t,n,o){let r=0;for(let a=t+1;a<e.length;a++){let i=e[a];if(O(i)||j(i))break;if(z(i))r+=n(i.text||"",i.fontSize,i.fontFamily,i.bold,i.italic);else if(U(i)){let p;i.fieldType==="PAGE"&&o?p=String(o.pageNumber):i.fieldType==="NUMPAGES"&&o?p=String(o.totalPages):p=i.fallback??"",r+=n(p,i.fontSize,i.fontFamily,i.bold,i.italic);}else G(i)&&!chunkSORYYVJ7_js.f(i)&&(r+=i.width||0);}return r}function Pt(e){let n=e.createElement("canvas").getContext("2d");return (o,r=11,a="Calibri",i=false,p=false)=>{if(!n)return o.length*7;let d=chunkN3Y5BUKV_js.a(a).cssFallback,m=r*96/72,l=[];return p&&l.push("italic"),i&&l.push("bold"),l.push(`${m}px`,d),n.font=l.join(" "),n.measureText(o).width}}function ge(e,t,n,o,r){let a=o.createElement("div");a.className=v.line,a.style.height=`${t.lineHeight}px`,a.style.lineHeight=`${t.lineHeight}px`;let i=et(e,t);if(i.length===1&&G(i[0])){let x=i[0].position?.horizontal?.align??n;a.style.display="flex",a.style.alignItems="center",a.style.justifyContent=Je(x),a.dataset.flexLine="true";}else i.some(G)&&(a.style.display="flex",a.style.alignItems="baseline",a.style.justifyContent=Je(n),a.style.lineHeight="normal",a.dataset.flexLine="true");if(i.length===0){let g=o.createElement("span");return g.className=`${v.run} layout-empty-run`,g.innerHTML=" ",a.appendChild(g),a}let p=n==="justify",d=false;p&&r&&(d=!r.isLastLine||r.paragraphEndsWithLineBreak,d&&(a.style.textAlign="justify",a.style.textAlignLast="justify",a.style.width=`${r.availableWidth}px`)),a.style.whiteSpace="pre";let m=i.some(g=>z(g)&&g.highlight);a.style.overflow=m?"hidden":"visible";let l=i.some(O),h,u=Pt(o);if(l){let g=r?.tabStops?.map(Ct),f=r?.leftIndentPx?Math.round(r.leftIndentPx*15):0;h={explicitStops:g,leftIndent:f};}let y=0,b=r?.leftIndentPx??0;if(r?.isFirstLine){let g=r?.firstLineIndentPx??0;y=b+g;}else y=b;for(let g=0;g<i.length;g++){let f=i[g];if(O(f)&&h){let x=Lt(i,g,u,r?.context),w=Rt(i,g,r?.context),s=w.indexOf("."),c=s>=0?u(w.slice(0,s)):0,T=chunkLTHT4A4S_js.r(y,h,{followingWidth:x,decimalPrefixWidth:c}),k=r?.lineRightEdgePx,S=x,R=false;for(let E=g+1;E<i.length&&!j(i[E]);E++)if(O(i[E])){R=true;break}if(k!==void 0&&T.alignment==="end"&&!R&&y+T.width+S>=k-Et){a.style.display="flex",a.style.alignItems="baseline",a.style.whiteSpace="nowrap",a.style.textIndent="0",a.dataset.flexLine="true",r?.isFirstLine&&r.firstLineIndentPx&&r.firstLineIndentPx<0&&a.firstElementChild instanceof HTMLElement&&(a.firstElementChild.style.marginLeft=`${r.firstLineIndentPx}px`);let E=ce(f,o,0,T.leader);E.style.flex="1 1 0",E.style.minWidth="0",E.style.width="auto",a.appendChild(E);for(let P=g+1;P<i.length;P++){let C=i[P];if(O(C)||j(C))break;if(z(C))a.appendChild(oe(C,o,r?.context?.resolvedCommentIds));else if(U(C)&&r?.context)a.appendChild(fe(C,o,r.context));else if(G(C)){if(chunkSORYYVJ7_js.f(C))continue;let Q=Qe(C);r?.renderedInlineImageKeys?.has(Q)||(r?.renderedInlineImageKeys?.add(Q),a.appendChild(pe(C,o)));}else a.appendChild(Fe(C,o,r?.context));}break}let L=T.width;k!==void 0&&y+L+S>k&&(L=Math.max(1,k-y-S));let F=ce(f,o,L,T.leader);a.appendChild(F),y+=L;}else if(z(f)){let x=oe(f,o,r?.context?.resolvedCommentIds);if(f.highlight){let T=(f.fontSize?f.fontSize*96/72:14.67)*1.2,k=Math.max(0,t.lineHeight-T);if(k>0){let S=k/2;x.style.paddingTop=`${S}px`,x.style.paddingBottom=`${S}px`;}}a.appendChild(x);let w=f.fontSize||11,s=f.fontFamily||"Calibri";y+=u(f.text,w,s,f.bold,f.italic);}else if(G(f)){if(chunkSORYYVJ7_js.f(f))continue;let x=Qe(f);if(r?.renderedInlineImageKeys?.has(x))continue;r?.renderedInlineImageKeys?.add(x);let w=pe(f,o);a.appendChild(w),f.displayMode!=="block"&&f.wrapType!=="topAndBottom"&&(y+=f.width);}else if(j(f)){let x=we(f,o);a.appendChild(x);}else if(U(f)&&r?.context){let x=fe(f,o,r.context);a.appendChild(x);let w=f.fallback??"";f.fieldType==="PAGE"?w=String(r.context.pageNumber):f.fieldType==="NUMPAGES"&&(w=String(r.context.totalPages));let s=f.fontSize||11,c=f.fontFamily||"Calibri";y+=u(w,s,c,f.bold,f.italic);}else {let x=Fe(f,o,r?.context);a.appendChild(x);}}return a}function re(e,t){return !e&&!t?true:!e||!t?false:e.style===t.style&&e.width===t.width&&e.color===t.color}function tt(e,t){return !e&&!t||!e||!t?false:re(e.top,t.top)&&re(e.bottom,t.bottom)&&re(e.left,t.left)&&re(e.right,t.right)&&re(e.between,t.between)}function A(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=v.fragment,i.style.position=o.positioning==="absolute"?"absolute":"relative",i.dataset.blockId=String(e.blockId),i.dataset.fromLine=String(e.fromLine),i.dataset.toLine=String(e.toLine),K(i,e.pmStart,e.pmEnd),e.continuesFromPrev&&(i.dataset.continuesFromPrev="true"),e.continuesOnNext&&(i.dataset.continuesOnNext="true");let p=t.attrs?.pPrIns,d=t.attrs?.pPrDel;if(p||d){let k=p??d;i.classList.add("layout-revision-pmark"),i.classList.add(p?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionId=String(k.revisionId),i.dataset.revisionAuthor=k.author,k.date&&(i.dataset.revisionDate=k.date);}let m=n.lines.slice(e.fromLine,e.toLine),l=t.attrs?.alignment;t.attrs?.styleId&&(i.dataset.styleId=t.attrs.styleId);let h=t.attrs?.bidi;h&&(i.dir="rtl"),l?l==="center"?i.style.textAlign="center":l==="right"?i.style.textAlign="right":l==="left"?i.style.textAlign="left":i.style.textAlign=h?"right":"left":h&&(i.style.textAlign="right");let u=t.attrs?.indent,y=0,b=0;u&&(h?(u.left&&u.left>0&&(b=u.left),u.right&&u.right>0&&(y=u.right)):(u.left&&u.left>0&&(y=u.left),u.right&&u.right>0&&(b=u.right)));let g=t.attrs?.borders;if(g){let k=C=>{switch(C){case "single":return "solid";case "double":return "double";case "dotted":return "dotted";case "dashed":return "dashed";case "thick":return "solid";case "wave":return "wavy";case "dashSmallGap":return "dashed";case "nil":case "none":return "none";default:return "solid"}};i.style.boxSizing="border-box";let S=C=>`${C.width}px ${k(C.style)} ${C.color}`,R=tt(r.prevBorders,g),I=tt(g,r.nextBorders),L=R?g.between:g.top,F=I?void 0:g.bottom,E=a.createElement("div");if(E.className="layout-paragraph-border",E.style.position="absolute",E.style.pointerEvents="none",E.style.boxSizing="border-box",E.style.left=`${y-(g.left?.space??0)}px`,E.style.right=`${b-(g.right?.space??0)}px`,E.style.top=`${-(L?.space??0)}px`,E.style.bottom=`${-(F?.space??0)}px`,L&&(E.style.borderTop=S(L)),F&&(E.style.borderBottom=S(F)),g.left&&(E.style.borderLeft=S(g.left)),g.right&&(E.style.borderRight=S(g.right)),(L||F||g.left||g.right)&&i.appendChild(E),g.bar){let C=a.createElement("div");C.style.position="absolute",C.style.left="-8px",C.style.top="0",C.style.bottom="0",C.style.borderLeft=S(g.bar),i.style.position="relative",i.appendChild(C);}}t.attrs?.shading&&(i.style.backgroundColor=t.attrs.shading);let f=e.width-y-b,w=t.runs[t.runs.length-1]?.kind==="lineBreak",s=n.lines.length,c=0;u?.hanging&&u.hanging>0?c=-u.hanging:u?.firstLine&&u.firstLine>0&&(c=u.firstLine);let T=r.renderedInlineImageKeys??new Set;for(let k=0;k<m.length;k++){let S=m[k],R=e.fromLine+k,I=R===s-1,L=R===0&&!e.continuesFromPrev,F=S.leftOffset??0,E=S.rightOffset??0,P=f;if(L){let B=u?.hanging&&u.hanging>0,M=u?.firstLine&&u.firstLine>0;B&&u?.hanging?P=f+u.hanging:M&&u?.firstLine&&(P=f-u.firstLine);}if(vt(S,t)){let B=a.createElement("div");B.className=`${v.line} layout-line-split`,B.style.position="relative",B.style.height=`${S.lineHeight}px`,B.style.lineHeight=`${S.lineHeight}px`;for(let M of S.segments){let ke={fromRun:M.fromRun,fromChar:M.fromChar,toRun:M.toRun,toChar:M.toChar,width:M.width,ascent:S.ascent,descent:S.descent,lineHeight:S.lineHeight},_=ge(t,ke,l,a,{availableWidth:M.availableWidth,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T});_.className+=" layout-line-segment",_.style.position="absolute",_.style.left=`${M.leftOffset}px`,_.style.top="0",_.style.width=`${M.availableWidth}px`,B.appendChild(_);}i.appendChild(B);continue}let C=ge(t,S,l,a,{availableWidth:P-F-E,isLastLine:I,isFirstLine:L,paragraphEndsWithLineBreak:w,tabStops:t.attrs?.tabs,leftIndentPx:y,firstLineIndentPx:L?c:0,context:o,renderedInlineImageKeys:T,lineRightEdgePx:e.width-b-E});if(F>0||E>0){F>0&&(C.style.marginLeft=`${F}px`),E>0&&(C.style.marginRight=`${E}px`);let B=P-F-E;B>0&&(C.style.width=`${B}px`);}S.floatSkipBefore&&S.floatSkipBefore>0&&(C.style.marginTop=`${S.floatSkipBefore}px`);let Q=u?.hanging&&u.hanging>0,Be=u?.firstLine&&u.firstLine>0,ct=C.dataset.flexLine==="true";if(L?y>0&&Q?(C.style.paddingLeft=`${y}px`,ct||(C.style.textIndent=`-${u.hanging}px`)):y>0&&Be?(C.style.paddingLeft=`${y}px`,C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Be&&(C.style.textIndent=`${u.firstLine}px`):y>0?C.style.paddingLeft=`${y}px`:Q&&(C.style.paddingLeft=`${u.hanging}px`),b>0&&(C.style.paddingRight=`${b}px`),L&&t.attrs?.listMarker&&!t.attrs?.listMarkerHidden){let B=u?.hanging??0,M=u?.firstLine??0,ke=B>0?Math.max(0,y-B):y+M;C.style.paddingLeft=`${ke}px`,C.style.textIndent="0";let{fontFamily:_,fontSize:pt}=chunkLTHT4A4S_js.s(t),ft=Bt(t.attrs.listMarker,chunkLTHT4A4S_js.t(t),a,_,pt,t.attrs.listMarkerRevision);C.insertBefore(ft,C.firstChild);}i.appendChild(C);}if((p||d)&&!e.continuesOnNext){let k=i.lastElementChild;if(k){let S=a.createElement("span");S.className="layout-revision-pmark-glyph",p?S.classList.add("layout-revision-ins"):S.classList.add("layout-revision-del"),S.textContent="\xB6",S.setAttribute("aria-hidden","true"),k.appendChild(S);}}return i}function vt(e,t){return (e.segments?.length??0)>1&&!t.attrs?.listMarker}function Bt(e,t,n,o,r,a){let i=n.createElement("span");return i.className="layout-list-marker",i.style.fontFamily=chunkN3Y5BUKV_js.a(o).cssFallback,i.style.fontSize=`${r*96/72}px`,i.style.textAlign="left",i.style.boxSizing="border-box",i.style.display="inline-block",i.style.minWidth=`${t}px`,i.textContent=e,a==="ins"?i.style.color="#2e7d32":a==="del"&&(i.style.color="#c62828",i.style.textDecoration="line-through"),i}function X(e,t,n){let o=t.createElement("div");o.className=n.layerClass,o.style.position="absolute",o.style.top="0",o.style.left="0",n.sizing==="inset0"?(o.style.right="0",o.style.bottom="0"):(o.style.width="100%",o.style.height="100%",o.style.overflow="hidden"),o.style.pointerEvents="none",n.layerMode==="front"&&(o.style.zIndex="10");for(let r of e){let a=t.createElement("div");a.className=n.itemClass,a.style.position="absolute",a.style.pointerEvents="auto",a.style.top=`${r.y}px`,a.style.left=`${r.x}px`,r.pmStart!==void 0&&(a.dataset.pmStart=String(r.pmStart)),r.pmEnd!==void 0&&(a.dataset.pmEnd=String(r.pmEnd));let i=t.createElement("img");i.src=r.src,i.style.width=`${r.width}px`,i.style.height=`${r.height}px`,i.style.display="block",r.alt&&(i.alt=r.alt),r.transform&&(i.style.transform=r.transform,i.style.transformOrigin="center center"),te(r)&&ne(i,r),a.appendChild(i),o.appendChild(a);}return o}function Ie(e,t,n,o){e.classList.add(`ep-revision-${t}`,`ep-revision-${n}`),e.dataset.revisionId=String(o.revisionId),e.dataset.revisionAuthor=o.author,o.date&&(e.dataset.revisionDate=o.date);}var D={table:"layout-table",row:"layout-table-row",cell:"layout-table-cell",cellContent:"layout-table-cell-content",resizeHandle:"layout-table-resize-handle",rowResizeHandle:"layout-table-row-resize-handle",tableEdgeHandleBottom:"layout-table-edge-handle-bottom",tableEdgeHandleRight:"layout-table-edge-handle-right"};function Mt(e,t,n){let o=[],r=0;for(let a=0;a<e.blocks.length;a++){let i=e.blocks[a];if(i?.kind!=="paragraph"){let m=t.blocks[a];m&&m.kind==="table"&&(r+=m.totalHeight??0);continue}let p=i;for(let m of p.runs){if(m.kind!=="image")continue;let l=m;if(!chunkSORYYVJ7_js.f(l))continue;let h=l.position,u=l.distTop??0,y=l.distBottom??0,b=l.distLeft??12,g=l.distRight??12,f="left",x=0;if(h?.horizontal){let s=h.horizontal;s.align==="right"?(f="right",x=n-l.width):s.align==="left"?x=0:s.align==="center"?x=(n-l.width)/2:s.posOffset!==void 0&&(x=chunk4Q2IP5FW_js.e(s.posOffset),f=x>n/2?"right":"left");}else l.cssFloat==="right"&&(f="right",x=n-l.width);let w=r;if(h?.vertical){let s=h.vertical;s.posOffset!==void 0?w=r+chunk4Q2IP5FW_js.e(s.posOffset):s.align==="top"&&(w=0);}x=Math.max(0,Math.min(x,n-l.width)),o.push({src:l.src,width:l.width,height:l.height,alt:l.alt,transform:l.transform,x,y:w,side:f,distTop:u,distBottom:y,distLeft:b,distRight:g,wrapText:chunkSORYYVJ7_js.h(l.cssFloat),wrapType:l.wrapType,pmStart:l.pmStart,pmEnd:l.pmEnd});}let d=t.blocks[a];d&&d.kind==="paragraph"&&(r+=d.totalHeight);}return o}function $t(e,t,n,o){let r=o.createElement("div");r.className=D.cellContent,r.style.position="relative";let a=e.padding?.left??7,i=e.padding?.right??7,p=Math.max(0,t.width-a-i);r.style.width=`${p}px`;let d=Mt(e,t,p),m;if(d.length>0){m=d.filter(chunkSORYYVJ7_js.d).map(b=>{let g=b.x+b.width+b.distRight,f=b.y-b.distTop,x=b.y+b.height+b.distBottom,w=0,s=0,c=b.wrapText??"bothSides";return c==="right"?w=g:c==="left"?s=p-(b.x-b.distLeft):b.side==="left"?w=g:s=p-(b.x-b.distLeft),{leftMargin:w,rightMargin:s,topY:f,bottomY:x}});let y=d.filter(chunkSORYYVJ7_js.e);y.length>0&&r.appendChild(X(y,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"behind"}));}let l=0,h=0;for(let y=0;y<e.blocks.length;y++){let b=e.blocks[y],g=t.blocks[y];if(b?.kind==="paragraph"&&g?.kind==="paragraph"){let f=b,x=g,w=f.attrs?.spacing,s=Math.max(h,w?.before??0);l+=s,m&&m.length>0&&(x=chunkLTHT4A4S_js.v(f,p,{floatingZones:m,paragraphYOffset:l}));let c={blockId:f.id,width:p,height:x.totalHeight,fromLine:0,toLine:x.lines.length,pmStart:f.pmStart,pmEnd:f.pmEnd},T={...n,insideTableCell:true},k=A(c,f,x,T,{document:o});k.style.position="relative",s>0&&(k.style.marginTop=`${s}px`),r.appendChild(k),l+=x.totalHeight,h=w?.after??0;}else if(b?.kind==="table"&&g?.kind==="table"){let f=b,x=g,w=h,s=Ht(f,x,n,o);s.style.position="relative",w>0&&(s.style.marginTop=`${w}px`),r.appendChild(s),l+=w+(g.totalHeight??0),h=0;}}h>0&&(r.style.paddingBottom=`${h}px`);let u=d.filter(y=>!chunkSORYYVJ7_js.e(y));return u.length>0&&r.appendChild(X(u,o,{layerClass:"layout-cell-floating-images-layer",itemClass:"layout-cell-floating-image",sizing:"fullSize",layerMode:"front"})),r}function Ht(e,t,n,o){let r=o.createElement("div");r.className=`${D.table} layout-nested-table`,r.style.position="relative",r.style.width=`${t.totalWidth}px`,r.style.display="block",e.justification==="center"?(r.style.marginLeft="auto",r.style.marginRight="auto"):e.justification==="right"?r.style.marginLeft="auto":e.indent&&(r.style.marginLeft=`${e.indent}px`),r.dataset.blockId=String(e.id),e.pmStart!==void 0&&(r.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(r.dataset.pmEnd=String(e.pmEnd));let a=e.rows[0],i=a?.trackedIns,p=a?.trackedDel,d=(b,g)=>!!b&&!!g&&(b.author??"")===(g.author??"")&&(b.date??null)===(g.date??null),m=e.rows.length>0&&e.rows.every(b=>i?d(b.trackedIns,i):p?d(b.trackedDel,p):false);if(m){let b=i??p,g=i?"ins":"del";r.classList.add("ep-revision-table",`ep-revision-${g}`),r.dataset.revisionId=String(b.revisionId),r.dataset.revisionAuthor=b.author,b.date&&(r.dataset.revisionDate=b.date);}let l=[],h=0;for(let b=0;b<t.rows.length;b++)l.push(h),h+=t.rows[b]?.height??0;l.push(h);let u=new Map,y=0;for(let b=0;b<e.rows.length;b++){let g=e.rows[b],f=t.rows[b];if(!g||!f)continue;let x=Ce(g,f,b,y,t.columnWidths,e.rows.length,n,o,u,l,void 0,m);r.appendChild(x),y+=f.height;}return r.style.height=`${y}px`,r}function me(e,t,n){let o=`border${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!n||n.style==="none"||n.style==="nil"||n.width===0)e.style[o]="none";else {let r=n.width??1,a=n.color??"#000000",i=n.style??"solid";e.style[o]=`${r}px ${i} ${a}`;}}function At(e,t,n,o,r,a,i,p){let d=i.createElement("div");d.className=D.cell,e.trackedMarker&&e.trackedMarker.info.revisionId!==p&&Ie(d,"cell",e.trackedMarker.kind,e.trackedMarker.info),d.style.position="absolute",d.style.left=`${n}px`,d.style.top="0",d.style.width=`${t.width}px`,d.style.height=`${o}px`,d.style.overflow="hidden",d.style.boxSizing="border-box";let m=e.padding?.top??1,l=e.padding?.right??7,h=e.padding?.bottom??1,u=e.padding?.left??7;if(d.style.padding=`${m}px ${l}px ${h}px ${u}px`,e.borders&&(r.isFirstRow&&me(d,"top",e.borders.top),me(d,"right",e.borders.right),me(d,"bottom",e.borders.bottom),r.isFirstCol&&me(d,"left",e.borders.left)),e.background&&(d.style.backgroundColor=e.background),e.noWrap&&(d.style.whiteSpace="nowrap"),e.verticalAlign)switch(d.style.display="flex",d.style.flexDirection="column",e.verticalAlign){case "top":d.style.justifyContent="flex-start";break;case "center":d.style.justifyContent="center";break;case "bottom":d.style.justifyContent="flex-end";break}let y=$t(e,t,a,i);if(d.appendChild(y),e.blocks.length>0){let b=e.blocks[0],g=e.blocks[e.blocks.length-1];b&&"pmStart"in b&&b.pmStart!==void 0&&(d.dataset.pmStart=String(b.pmStart)),g&&"pmEnd"in g&&g.pmEnd!==void 0&&(d.dataset.pmEnd=String(g.pmEnd));}return d}function Ce(e,t,n,o,r,a,i,p,d,m,l,h){let u=p.createElement("div");u.className=D.row,h||(e.trackedDel?Ie(u,"row","del",e.trackedDel):e.trackedIns&&Ie(u,"row","ins",e.trackedIns)),u.style.position="absolute",u.style.left="0",u.style.top=`${o}px`,u.style.width="100%",u.style.height=`${t.height}px`,u.dataset.rowIndex=String(n);let y=new Set;if(d){for(let[,f]of d)if(f.startRow<n&&f.startRow+f.rowSpan>n)for(let x=0;x<f.colSpan;x++)y.add(f.columnIndex+x);}let b=0,g=0;for(;y.has(g);)b+=r[g]??0,g++;for(let f=0;f<e.cells.length;f++){let x=e.cells[f],w=t.cells[f];if(!x||!w)continue;let s=x.colSpan??1,c=x.rowSpan??1,T=t.height;if(c>1&&m){T=0;for(let F=n;F<n+c&&F<m.length-1;F++)T+=(m[F+1]??0)-(m[F]??0);T===0&&(T=t.height*c);}let k=n===0||l===true,R=g===0;g+s>=r.length;let L=At(x,w,b,T,{isFirstRow:k,isFirstCol:R},i,p,e.trackedIns?.revisionId??e.trackedDel?.revisionId);if(L.dataset.cellIndex=String(f),L.dataset.columnIndex=String(g),c>1&&(L.dataset.rowSpan=String(c)),u.appendChild(L),c>1&&d){let F=`${n}-${g}`;d.set(F,{cell:x,cellMeasure:w,columnIndex:g,startRow:n,rowSpan:c,colSpan:s,x:b,totalHeight:T});}for(let F=0;F<s&&g+F<r.length;F++)b+=r[g+F]??0;for(g+=s;y.has(g);)b+=r[g]??0,g++;}return u}function Z(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");i.className=D.table,i.style.position=o.positioning==="flow"?"relative":"absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.dataset.blockId=String(e.blockId),i.dataset.fromRow=String(e.fromRow),i.dataset.toRow=String(e.toRow),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let p=t.rows[0],d=p?.trackedIns,m=p?.trackedDel,l=(s,c)=>!!s&&!!c&&(s.author??"")===(c.author??"")&&(s.date??null)===(c.date??null),h=t.rows.length>0&&t.rows.every(s=>d?l(s.trackedIns,d):m?l(s.trackedDel,m):false);if(h){let s=d??m,c=d?"ins":"del";i.classList.add("ep-revision-table",`ep-revision-${c}`),i.dataset.revisionId=String(s.revisionId),i.dataset.revisionAuthor=s.author,s.date&&(i.dataset.revisionDate=s.date),i.style.overflow="visible";}let u=0;for(let s=0;s<n.columnWidths.length-1;s++){u+=n.columnWidths[s]??0;let c=a.createElement("div");c.className=D.resizeHandle,c.style.position="absolute",c.style.left=`${u-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}let y=[],b=0;for(let s=0;s<n.rows.length;s++)y.push(b),b+=n.rows[s]?.height??0;y.push(b);let g=new Map,f=e.headerRowCount??0,x=0;if(f>0&&e.continuesFromPrev)for(let s=0;s<f;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,s===0,h);k.dataset.repeatedHeader="true",i.appendChild(k),x+=T.height;}for(let s=e.fromRow;s<e.toRow;s++){let c=t.rows[s],T=n.rows[s];if(!c||!T)continue;let k=f>0&&e.continuesFromPrev?false:e.continuesFromPrev&&s===e.fromRow,S=Ce(c,T,s,x,n.columnWidths,t.rows.length,o,a,g,y,k,h);i.appendChild(S),x+=T.height;}let w=0;for(let s=e.fromRow;s<e.toRow;s++)if(w+=n.rows[s]?.height??0,s<e.toRow-1){let c=a.createElement("div");c.className=D.rowResizeHandle,c.style.position="absolute",c.style.left="0",c.style.top=`${w-3}px`,c.style.width="100%",c.style.height="6px",c.style.cursor="row-resize",c.style.zIndex="10",c.dataset.rowIndex=String(s),c.dataset.tableBlockId=String(e.blockId),e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}if(e.toRow===t.rows.length){let s=a.createElement("div");s.className=D.tableEdgeHandleBottom,s.style.position="absolute",s.style.left="0",s.style.top=`${w-3}px`,s.style.width="100%",s.style.height="6px",s.style.cursor="row-resize",s.style.zIndex="10",s.dataset.rowIndex=String(t.rows.length-1),s.dataset.tableBlockId=String(e.blockId),s.dataset.isEdge="bottom",e.pmStart!==void 0&&(s.dataset.tablePmStart=String(e.pmStart)),i.appendChild(s);}if(e.toRow===t.rows.length){let s=n.columnWidths.reduce((T,k)=>T+k,0),c=a.createElement("div");c.className=D.tableEdgeHandleRight,c.style.position="absolute",c.style.left=`${s-3}px`,c.style.top="0",c.style.width="6px",c.style.height="100%",c.style.cursor="col-resize",c.style.zIndex="10",c.dataset.columnIndex=String(n.columnWidths.length-1),c.dataset.tableBlockId=String(e.blockId),c.dataset.isEdge="right",e.pmStart!==void 0&&(c.dataset.tablePmStart=String(e.pmStart)),i.appendChild(c);}return i}var zt={textBox:"layout-textbox"};function J(e,t,n,o,r={}){let a=r.document??document,i=a.createElement("div");if(i.className=zt.textBox,i.style.position="absolute",i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.overflow="hidden",i.style.boxSizing="border-box",Ot(i,e),t.fillColor&&(i.style.backgroundColor=t.fillColor),t.outlineWidth&&t.outlineWidth>0){let l=t.outlineStyle||"solid",h=t.outlineColor||"#000000";i.style.border=`${t.outlineWidth}px ${l} ${h}`;}let p=t.margins??chunkDROCYKAR_js.a;i.style.padding=`${p.top}px ${p.right}px ${p.bottom}px ${p.left}px`,i.dataset.blockId=String(e.blockId),e.pmStart!==void 0&&(i.dataset.pmStart=String(e.pmStart)),e.pmEnd!==void 0&&(i.dataset.pmEnd=String(e.pmEnd));let d=e.width-p.left-p.right,m=0;for(let l=0;l<t.content.length;l++){let h=t.content[l],u=n.innerMeasures[l];if(!u)continue;let y={blockId:h.id,width:d,height:u.totalHeight,pmStart:h.pmStart,pmEnd:h.pmEnd,fromLine:0,toLine:u.lines.length},b=A(y,h,u,{...o,positioning:"flow"},{document:a});i.appendChild(b),m+=u.totalHeight;}return i}function Ot(e,t){!t.isFloating&&t.zIndex===void 0||(e.style.zIndex=String(t.zIndex??10));}function nt(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function Re(e,t,n,o){let{x:r,side:a}=Dt(e,n,o),i=_t(e,t,o);return {x:r,y:i,side:a}}function Dt(e,t,n){let o=e.position?.horizontal;if(!o)return e.cssFloat==="right"?{x:t-e.width,side:"right"}:{x:0,side:"left"};let r=Nt(o.relativeTo,t,n);if(o.align==="right")return {x:r.size?r.base+r.size-e.width:0,side:"right"};if(o.align==="left")return {x:r.base,side:"left"};if(o.align==="center")return {x:r.size?r.base+(r.size-e.width)/2:0,side:"left"};if(o.posOffset!==void 0){let a=r.base+chunk4Q2IP5FW_js.e(o.posOffset);return {x:a,side:a>t/2?"right":"left"}}return {x:r.base,side:"left"}}function Nt(e,t,n){let o=n?.pageWidth??0,r=n?.marginLeft??0;switch(e){case "page":return {base:-r,size:o};case "leftMargin":return {base:-r,size:r};case "rightMargin":return {base:t,size:r};case "character":return {base:0,size:0};default:return {base:0,size:t}}}function _t(e,t,n){let o=e.position?.vertical;if(!o)return t;let r=Wt(o.relativeTo,t,n);return o.align==="top"?r.base:o.align==="center"?r.size?r.base+(r.size-e.height)/2:t:o.align==="bottom"?r.size?r.base+r.size-e.height:t:o.posOffset!==void 0?r.base+chunk4Q2IP5FW_js.e(o.posOffset):o.relativeTo==="paragraph"||o.relativeTo==="line"?t:r.base}function Wt(e,t,n){let o=n?.pageHeight??0,r=n?.marginTop??0,a=n?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:t,size:0};case "page":return {base:-r,size:o};case "topMargin":return {base:-r,size:r};case "bottomMargin":return {base:a,size:r};default:return {base:0,size:a}}}function ot(e){return e?.align??e?.alignment}function Gt(e,t){let n=e.position.vertical;if(!n)return e.paragraphY;let o=ot(n),r=n.posOffset!==void 0?chunk4Q2IP5FW_js.e(n.posOffset):void 0;if(n.relativeTo==="page"){if(r!==void 0)return r-t.flowTop;if(o==="top")return -t.flowTop;if(o==="bottom")return t.pageHeight-e.height-t.flowTop;if(o==="center")return (t.pageHeight-e.height)/2-t.flowTop}if(n.relativeTo==="margin"){let a=t.margins.top,i=t.pageHeight-t.margins.top-t.margins.bottom;if(r!==void 0)return a+r-t.flowTop;if(o==="top")return a-t.flowTop;if(o==="bottom")return a+i-e.height-t.flowTop;if(o==="center")return a+(i-e.height)/2-t.flowTop}return r!==void 0?e.paragraphY+r:e.paragraphY}function jt(e,t,n){let o=t.position.horizontal;if(!o){e.style.left="0";return}let r=ot(o);if(o.relativeTo==="page"){if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)-n.flowLeft}px`;return}if(r==="right"){e.style.left=`${n.pageWidth-t.width-n.flowLeft}px`;return}if(r==="center"){e.style.left=`${(n.pageWidth-t.width)/2-n.flowLeft}px`;return}if(r==="left"){e.style.left=`${-n.flowLeft}px`;return}}if(o.posOffset!==void 0){e.style.left=`${chunk4Q2IP5FW_js.e(o.posOffset)}px`;return}if(r==="right"){e.style.left=`${n.contentWidth-t.width}px`;return}if(r==="center"){e.style.left=`${(n.contentWidth-t.width)/2}px`;return}e.style.left="0";}function rt(e,t){let n=e.tblpY??0;e.vertAnchor==="page"?n-=t.flowTop:e.vertAnchor==="margin"&&(n+=t.margins.top-t.flowTop);let o=e.tblpX??0;return e.horzAnchor==="page"?o-=t.flowLeft:e.horzAnchor==="margin"&&(o+=t.margins.left-t.flowLeft),{left:o,top:n}}function Ee(e,t,n,o){let r=n.document??document,a=r.createElement("div");a.style.position="relative";let i=t.contentWidth??600,p=[],d=0;for(let m=0;m<e.blocks.length;m++){let l=e.blocks[m],h=e.measures[m];if(!(!l||!h))if(l.kind==="paragraph"){if(h.kind!=="paragraph")continue;let u=l,y=h,b=u.attrs?.spacing?.before??0,g=d,f=[];for(let c of u.runs)if(c.kind==="image"&&"position"in c&&c.position){let T=c;p.push({src:T.src,width:T.width,height:T.height,alt:T.alt,paragraphY:g,position:T.position});}else f.push(c);let x={...u,runs:f},w={blockId:u.id,width:i,height:y.totalHeight,fromLine:0,toLine:y.lines.length,pmStart:u.pmStart,pmEnd:u.pmEnd},s=A(w,x,y,{...t,positioning:"absolute"},{document:r});s.style.top=`${d+b}px`,s.style.left="0",s.style.width=`${i}px`,a.appendChild(s),d+=y.totalHeight;}else if(l.kind==="table"){if(h.kind!=="table")continue;let u={blockId:l.id,width:h.totalWidth,height:h.totalHeight,fromRow:0,toRow:h.rows.length,pmStart:l.pmStart,pmEnd:l.pmEnd},y=Z(u,l,h,{...t,positioning:"absolute"},{document:r});if(l.floating){let{left:b,top:g}=rt(l.floating,o);y.style.top=`${g}px`,y.style.left=`${b}px`,a.appendChild(y);}else y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.totalHeight;}else if(l.kind==="image"){if(h.kind!=="image")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=q(u,l,h,{...t},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else if(l.kind==="textBox"){if(h.kind!=="textBox")continue;let u={blockId:l.id,width:h.width,height:h.height,pmStart:l.pmStart,pmEnd:l.pmEnd},y=J(u,l,h,{...t,positioning:"absolute"},{document:r});y.style.top=`${d}px`,y.style.left="0",a.appendChild(y),d+=h.height;}else l.kind==="sectionBreak"||l.kind==="pageBreak"||l.kind==="columnBreak"||chunkDROCYKAR_js.c(l,"renderHeaderFooterContent");}for(let m of p){let l=r.createElement("img");l.src=m.src,l.width=m.width,l.height=m.height,m.alt&&(l.alt=m.alt),l.style.position="absolute",l.style.display="block",l.style.width=`${m.width}px`,l.style.height=`${m.height}px`,l.style.maxWidth="none",l.style.maxHeight="none",jt(l,m,o),l.style.top=`${Gt(m,o)}px`,a.appendChild(l);}return a}var ue=12,it=6;function Kt(e,t){if(e.size!==t.size)return false;for(let[n,o]of e)if(t.get(n)!==o)return false;return true}var Le=8;function oo(e){let t=[],n=o=>{for(let r of o)if(r.kind==="paragraph")for(let a of r.runs)a.kind==="text"&&a.footnoteRefId!=null&&t.push({footnoteId:a.footnoteRefId,pmPos:a.pmStart??0});else if(r.kind==="table")for(let a of r.rows)for(let i of a.cells)n(i.blocks);else r.kind==="textBox"&&n(r.content);};return n(e),t}function Pe(e,t){let n=new Map;if(t.length===0)return n;for(let o of t)for(let r of e){let a=false;for(let i of r.fragments){let p=i.pmStart??-1,d=i.pmEnd??-1;if(p>=0&&d>=0&&o.pmPos>=p&&o.pmPos<d){let m=n.get(r.number)??[];m.includes(o.footnoteId)||m.push(o.footnoteId),n.set(r.number,m),a=true;break}}if(a)break}return n}function Vt(e,t){if(e.length===0)return [{kind:"paragraph",id:`fn-empty-${t}`,runs:[{kind:"text",text:`${t} `,fontSize:Le,superscript:true}]}];let n=e.map(r=>{if(r.kind!=="paragraph")return r;let a=r;return {...a,runs:a.runs.map(i=>(i.kind==="text"||i.kind==="tab")&&i.fontSize==null?{...i,fontSize:Le}:i)}}),o=n[0];if(o.kind==="paragraph"){let r={kind:"text",text:`${t} `,fontSize:Le,superscript:true};n[0]={...o,runs:[r,...o.runs]};}return n}function Yt(e,t,n,o){let r=chunkZBFNOJGY_js.c(e.content,{styles:o.styles??void 0,theme:o.theme??null,defaultTabStopTwips:o.defaultTabStopTwips??null}),a=chunkAMB6Y77B_js.c(r,{theme:o.theme??void 0}),i=Vt(a,t),p=o.measureBlocks(i,n),d=p.reduce((m,l)=>l.kind==="paragraph"||l.kind==="table"?m+l.totalHeight:l.kind==="image"||l.kind==="textBox"?m+l.height:m,0);return {id:e.id,displayNumber:t,blocks:i,measures:p,height:d}}function ro(e,t,n,o){let r=new Map,a=new Map;for(let d of e)(d.noteType==="normal"||d.noteType==null)&&a.set(d.id,d);let i=1,p=new Set;for(let d of t){if(p.has(d.footnoteId))continue;p.add(d.footnoteId);let m=a.get(d.footnoteId);m&&(r.set(d.footnoteId,Yt(m,i,n,o)),i++);}return r}function at(e,t){let n=new Map;for(let[o,r]of e){let a=0;for(let i of r){let p=t.get(i);p&&(a+=p.height);}a>0&&(a+=ue,n.set(o,a));}return n}function io(e){let{blocks:t,measures:n,layoutOpts:o,footnoteRefs:r,footnoteContentMap:a,initialLayout:i}=e,p=Pe(i.pages,r),d=at(p,a);if(d.size===0)return {layout:i,pageFootnoteMap:p,converged:true};let m=i,l=false;for(let h=0;h<it;h++){m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d});let u=Pe(m.pages,r),y=at(u,a);if(p=u,Kt(d,y)){d=y,l=true;break}d=y;}l||(m=chunkLTHT4A4S_js.O(t,n,{...o,footnoteReservedHeights:d}),p=Pe(m.pages,r),console.warn(`[docx-editor] footnote layout did not stabilize within ${it} passes; settling with best-effort reservation. If footnotes appear misplaced, please file a bug with the document.`));for(let[h,u]of p){let y=m.pages.find(b=>b.number===h);y&&(y.footnoteIds=u);}return {layout:m,pageFootnoteMap:p,converged:l}}function ao(e,t,n){let o=new Map;if(!n?.package?.footnotes)return o;let r=new Map;for(let a of n.package.footnotes)a.noteType&&a.noteType!=="normal"||r.set(a.id,a);for(let[a,i]of e){let p=[];for(let d of i){let m=r.get(d);if(!m)continue;let l=t.get(d),h=l?.displayNumber??0;p.push({displayNumber:String(h),text:chunkROG4MNOR_js.x(m),content:l});}p.length>0&&o.set(a,p);}return o}function Ut(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-content",r.style.position="relative",r.style.width=`${t}px`,r.style.height=`${e.height}px`;let a=0;for(let i=0;i<e.blocks.length;i++){let p=e.blocks[i],d=e.measures[i];if(!(!p||!d)){if(p.kind==="paragraph"&&d.kind==="paragraph"){let m=p.attrs?.spacing?.before??0,l={blockId:p.id,width:t,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromLine:0,toLine:d.lines.length},h=A(l,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});h.style.top=`${a+m}px`,h.style.left="0",h.style.width=`${t}px`,h.style.height=`${d.totalHeight}px`,r.appendChild(h),a+=d.totalHeight;}else if(p.kind==="table"&&d.kind==="table"){let m={blockId:p.id,width:d.totalWidth,height:d.totalHeight,pmStart:p.pmStart,pmEnd:p.pmEnd,fromRow:0,toRow:d.rows.length},l=Z(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.totalHeight;}else if(p.kind==="image"&&d.kind==="image"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=q(m,p,d,{...n},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}else if(p.kind==="textBox"&&d.kind==="textBox"){let m={blockId:p.id,width:d.width,height:d.height,pmStart:p.pmStart,pmEnd:p.pmEnd},l=J(m,p,d,{...n,section:"body",contentWidth:t,positioning:"absolute"},{document:o});l.style.top=`${a}px`,l.style.left="0",r.appendChild(l),a+=d.height;}}}return r}function Xt(e,t){let n=t.createElement("div");n.style.fontSize="10px",n.style.lineHeight="1.3",n.style.marginBottom="4px",n.style.color="#000";let o=t.createElement("sup");o.textContent=e.displayNumber,o.style.fontSize="7px",o.style.marginRight="2px",n.appendChild(o);let r=t.createTextNode(" "+e.text);return n.appendChild(r),n}function st(e){let t=ue;for(let n of e)n.content&&(t+=n.content.height);return t}function lt(e,t,n,o){let r=o.createElement("div");r.className="layout-footnote-area",r.style.width=`${t}px`;let a=o.createElement("div"),i=.5,p=(ue-i)/2;a.style.width="33%",a.style.height=`${i}px`,a.style.backgroundColor="#000",a.style.marginBottom=`${p}px`,a.style.marginTop=`${p}px`,r.appendChild(a);for(let d of e)r.appendChild(d.content?Ut(d.content,t,n,o):Xt(d,o));return r}function ve(e,t,n){let o={pageNumber:e.number,totalPages:t,section:"body",resolvedCommentIds:n.resolvedCommentIds},r={...n};if(n.titlePg&&e.number===1&&(r.headerContent=n.firstPageHeaderContent,r.footerContent=n.firstPageFooterContent),n.footnotesByPage){let a=n.footnotesByPage.get(e.number);a&&a.length>0&&(r.footnoteArea=a);}return {context:o,pageOptions:r}}function dt(e){let t=[];t.push(`s:${e.size.w},${e.size.h}`),t.push(`m:${e.margins.top},${e.margins.right},${e.margins.bottom},${e.margins.left}`),t.push(`n:${e.number}`),e.footnoteReservedHeight&&t.push(`fn:${e.footnoteReservedHeight}`);for(let n of e.fragments){let o=`${n.kind}:${n.blockId},${n.x},${n.y},${n.width},${n.height}`;n.pmStart!==void 0&&(o+=`,ps:${n.pmStart}`),n.pmEnd!==void 0&&(o+=`,pe:${n.pmEnd}`),n.kind==="paragraph"?o+=`,fl:${n.fromLine},tl:${n.toLine}`:n.kind==="table"&&(o+=`,fr:${n.fromRow},tr:${n.toRow}`),t.push(o);}return t.join("|")}function qt(e){let t=[];return e.headerContent&&t.push(`hdr:${e.headerContent.blocks.length},${e.headerContent.height},${e.headerContent.visualTop??0},${e.headerContent.visualBottom??e.headerContent.height}`),e.footerContent&&t.push(`ftr:${e.footerContent.blocks.length},${e.footerContent.height},${e.footerContent.visualTop??0},${e.footerContent.visualBottom??e.footerContent.height}`),e.firstPageHeaderContent&&t.push(`fp-hdr:${e.firstPageHeaderContent.blocks.length},${e.firstPageHeaderContent.height}`),e.firstPageFooterContent&&t.push(`fp-ftr:${e.firstPageFooterContent.blocks.length},${e.firstPageFooterContent.height}`),e.titlePg&&t.push("titlePg"),e.theme&&t.push(`thm:${e.theme.name??"default"}`),e.pageBorders&&t.push(`pb:${JSON.stringify(e.pageBorders)}`),e.headerDistance!==void 0&&t.push(`hd:${e.headerDistance}`),e.footerDistance!==void 0&&t.push(`fd:${e.footerDistance}`),t.join("|")}function Zt(e,t){e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.gap=`${t}px`,e.style.padding=`${t}px`,e.style.backgroundColor="var(--doc-bg, #f8f9fa)";}var he=2,Jt=8;function Qt(e,t,n={}){let o=e.length,r=n.pageGap??24,a=t,i=a.__pageRenderState,p=qt(n),d=o>=Jt;if(i&&i.optionsHash===p&&d){let f=i.pageStates,x=i.pageDataMap,w=a.__pageObserver,s=[];for(let k of e)s.push(dt(k));let c=i.totalPages!==o,T=Math.min(f.length,e.length);for(let k=0;k<T;k++){let S=f[k],R=s[k];if(S.fingerprint===R&&!c){let F=x.get(S.element);F&&(F.page=e[k]);continue}let I=S.element,L=x.get(I);L&&(L.page=e[k],L.rendered&&en(I,x,o,n)),S.fingerprint=R,ae(I,e[k].size.w,e[k].size.h,n),I.dataset.pageNumber=String(e[k].number);}if(e.length>f.length){let k=n.document??document;for(let S=f.length;S<e.length;S++){let R=e[S],I=k.createElement("div");I.className=n.pageClassName??N.page,I.dataset.pageNumber=String(R.number),I.dataset.pageIndex=String(S),ae(I,R.size.w,R.size.h,n),t.appendChild(I),f.push({element:I,fingerprint:s[S]}),x.set(I,{page:R,index:S,rendered:false}),w&&w.observe(I);}}if(e.length<f.length){for(let k=f.length-1;k>=e.length;k--){let S=f[k].element;w&&w.unobserve(S),x.delete(S),t.removeChild(S);}f.length=e.length;}for(let k=0;k<f.length;k++){let S=x.get(f[k].element);S&&(S.index=k);}return i.totalPages=o,i.currentOptions=n,"incremental"}let l=a.__pageObserver;l&&(l.disconnect(),a.__pageObserver=void 0),t.innerHTML="",a.__pageRenderState=void 0,Zt(t,r);let h=[],u=[];for(let f=0;f<e.length;f++){let x=e[f];if(u.push(dt(x)),d){let s=(n.document??document).createElement("div");s.className=n.pageClassName??N.page,s.dataset.pageNumber=String(x.number),s.dataset.pageIndex=String(f),ae(s,x.size.w,x.size.h,n),t.appendChild(s),h.push(s);}else {let{context:w,pageOptions:s}=ve(x,o,n),c=ye(x,w,s);t.appendChild(c),h.push(c);}}if(!d)return "full";let y=new Map;for(let f=0;f<e.length;f++)y.set(h[f],{page:e[f],index:f,rendered:false});let b=new IntersectionObserver(f=>{let x=a.__pageRenderState;if(!x)return;let{currentOptions:w,totalPages:s,pageDataMap:c}=x;for(let R of f){let I=R.target,L=c.get(I);if(L&&R.isIntersecting){ie(I,c,s,w);for(let F=-he;F<=he;F++){let E=L.index+F;E>=0&&E<x.pageStates.length&&E!==L.index&&ie(x.pageStates[E].element,c,s,w);}}}let T=window.innerHeight,k=T*3,S=new Set;for(let[R,I]of c){if(!I.rendered)continue;let L=R.getBoundingClientRect();L.bottom>-k&&L.top<T+k&&S.add(I.index);}for(let[R,I]of c){if(!I.rendered)continue;let L=false;for(let F of S)if(Math.abs(I.index-F)<=he+1){L=true;break}!L&&S.size>0&&tn(R,c);}},{root:null,rootMargin:"1500px 0px 1500px 0px"});for(let f of h)b.observe(f);a.__pageObserver=b,a.__pageRenderState={pageStates:h.map((f,x)=>({element:f,fingerprint:u[x]})),totalPages:o,optionsHash:p,pageDataMap:y,currentOptions:n};let g=Math.min(e.length,he+3);for(let f=0;f<g;f++)ie(h[f],y,o,n);return "full"}function ie(e,t,n,o){let r=t.get(e);if(!r||r.rendered)return;let{context:a,pageOptions:i}=ve(r.page,n,o),p=ye(r.page,a,i);for(;p.firstChild;)e.appendChild(p.firstChild);r.rendered=true;}function en(e,t,n,o){let r=t.get(e);if(!r)return;let{context:a,pageOptions:i}=ve(r.page,n,o),d=ye(r.page,a,i).querySelector(`.${N.content}`),m=e.querySelector(`.${N.content}`);d&&m?e.replaceChild(d,m):(e.innerHTML="",r.rendered=false,ie(e,t,n,o));}function tn(e,t){let n=t.get(e);!n||!n.rendered||(e.innerHTML="",n.rendered=false);}function nn(e){let n=e.__pageRenderState;if(!n)return 0;let{pageStates:o,totalPages:r,currentOptions:a,pageDataMap:i}=n,p=0;for(let{element:d}of o){let m=i.get(d);!m||m.rendered||(ie(d,i,r,a),p++);}return p}var N={page:"layout-page",content:"layout-page-content",header:"layout-page-header",footer:"layout-page-footer"};function ae(e,t,n,o){e.style.position="relative",e.style.width=`${t}px`,e.style.height=`${n}px`,e.style.backgroundColor=o.backgroundColor??"#ffffff",e.style.overflow="hidden",e.style.fontFamily=chunkN3Y5BUKV_js.a("Calibri").cssFallback,e.style.fontSize=`${1056/72}px`,e.style.color="#000000",o.showBorders&&(e.style.border="1px solid #ccc"),o.showShadow&&(e.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");}function on(e,t){switch(t??"allPages"){case "firstPage":return e===1;case "notFirstPage":return e!==1;default:return true}}function be(e){return e?.space!==void 0?chunk4Q2IP5FW_js.i(e.space):0}function xe(e,t,n,o){if(!t||t.style==="none"||t.style==="nil")return;let r=chunkBHBOAP6Z_js.c(t,n,o);for(let[d,m]of Object.entries(r))e.style[d]=String(m);let a=`border${n}Style`,i=`border${n}Width`;if(e.style[a]==="double"){let d=parseFloat(e.style[i]);(!Number.isFinite(d)||d<3)&&(e.style[i]="3px");}}function rn(e,t,n){let o=t.pageBorders;if(!o||!on(e.number,o.display)||![o.top,o.bottom,o.left,o.right].some(h=>h&&h.style!=="none"&&h.style!=="nil"))return null;let a=o.offsetFrom??"text",i=be(o.top),p=be(o.right),d=be(o.bottom),m=be(o.left),l=n.createElement("div");return l.className="layout-page-border",l.style.position="absolute",l.style.pointerEvents="none",l.style.boxSizing="border-box",l.style.zIndex=o.zOrder==="back"?"0":"20",a==="page"?(l.style.top=`${i}px`,l.style.right=`${p}px`,l.style.bottom=`${d}px`,l.style.left=`${m}px`):(l.style.top=`${Math.max(0,e.margins.top-i)}px`,l.style.right=`${Math.max(0,e.margins.right-p)}px`,l.style.bottom=`${Math.max(0,e.margins.bottom-d)}px`,l.style.left=`${Math.max(0,e.margins.left-m)}px`),xe(l,o.top,"Top",t.theme),xe(l,o.bottom,"Bottom",t.theme),xe(l,o.left,"Left",t.theme),xe(l,o.right,"Right",t.theme),l}function an(e,t){let n=t.margins;e.style.position="absolute",e.style.top=`${n.top}px`,e.style.left=`${n.left}px`,e.style.right=`${n.right}px`,e.style.bottom=`${n.bottom}px`,e.style.overflow="visible";}function sn(e,t,n){e.style.position="absolute",e.style.left=`${t.x-n.left}px`,e.style.top=`${t.y-n.top}px`,e.style.width=`${t.width}px`,"height"in t&&(e.style.height=`${t.height}px`);}function ln(e,t,n,o){let r=[];for(let a of e.runs){if(a.kind!=="image")continue;let i=a;if(!chunkSORYYVJ7_js.f(i))continue;let p=i.distTop??0,d=i.distBottom??0,m=i.distLeft??12,l=i.distRight??12,{x:h,y:u,side:y}=Re(i,t,n,o);r.push({src:i.src,width:i.width,height:i.height,alt:i.alt,transform:i.transform,side:y,x:h,y:u,distTop:p,distBottom:d,distLeft:m,distRight:l,pmStart:i.pmStart,pmEnd:i.pmEnd,wrapText:chunkSORYYVJ7_js.h(i.cssFloat),wrapType:i.wrapType,cropTop:i.cropTop,cropRight:i.cropRight,cropBottom:i.cropBottom,cropLeft:i.cropLeft,opacity:i.opacity});}return r}function ye(e,t,n={}){let o=n.document??document,r=o.createElement("div");r.className=n.pageClassName??N.page,r.dataset.pageNumber=String(e.number),ae(r,e.size.w,e.size.h,n);let a=rn(e,n,o);a&&n.pageBorders?.zOrder==="back"&&r.appendChild(a);let i=o.createElement("div");i.className=N.content,an(i,e);let p=nt(e),d=p.contentWidth,m=[],l=[];for(let s of e.fragments)if(s.kind==="paragraph"&&n.blockLookup){let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph"){let T=c.block,k=s.y-e.margins.top,S=ln(T,k,d,p);m.push(...S);}}for(let s of m)chunkSORYYVJ7_js.d(s)&&l.push({side:s.side,x:s.x,y:s.y,width:s.width,height:s.height,distTop:s.distTop,distBottom:s.distBottom,distLeft:s.distLeft,distRight:s.distRight,wrapText:s.wrapText,wrapType:s.wrapType});if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="table")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="table")continue;let k=c.block.floating;if(!k)continue;let S=s.x-e.margins.left,R=s.y-e.margins.top,I=k.topFromText??0,L=k.bottomFromText??0,F=k.leftFromText??12,E=k.rightFromText??12,P=S<d/2?"left":"right";l.push({side:P,x:S,y:R,width:s.width,height:s.height,distTop:I,distBottom:L,distLeft:F,distRight:E});}if(n.blockLookup)for(let s of e.fragments){if(s.kind!=="textBox")continue;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind!=="textBox")continue;let T=c.block;if(!chunkLTHT4A4S_js.E(T))continue;let k=s.y-e.margins.top,S=Re({width:s.width,height:s.height,position:T.position,cssFloat:T.cssFloat},k,d,p);s.x=e.margins.left+S.x,s.y=e.margins.top+S.y,chunkLTHT4A4S_js.F(T)&&l.push({side:S.side,x:S.x,y:S.y,width:s.width,height:s.height,distTop:T.distTop??0,distBottom:T.distBottom??0,distLeft:T.distLeft??12,distRight:T.distRight??12,wrapText:T.wrapText,wrapType:T.wrapType});}let h=l.length>0?chunkLTHT4A4S_js.p(l,d):[],u=m.filter(chunkSORYYVJ7_js.e),y=m.filter(s=>!chunkSORYYVJ7_js.e(s));if(u.length>0){let s=X(u,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"behind"});i.appendChild(s);}let b=s=>{if(s.kind!=="paragraph"||!n.blockLookup||!s.blockId)return;let c=n.blockLookup.get(String(s.blockId));if(c?.block.kind==="paragraph")return c.block.attrs?.borders},g,f=new Map,x=s=>!n.blockLookup||!s.blockId?[]:n.blockLookup.get(String(s.blockId))?.block.sdtGroups??[],w=(s,c)=>{if(c.length===0)return;let T=c[c.length-1];s.classList.add("layout-block-sdt"),s.dataset.sdtGroupId=T.id,s.dataset.sdtType=T.sdtType,s.dataset.sdtDepth=String(c.length),T.tag!=null&&(s.dataset.sdtTag=T.tag),T.alias!=null&&(s.dataset.sdtAlias=T.alias),T.lock!=null&&(s.dataset.sdtLock=T.lock);};for(let s=0;s<e.fragments.length;s++){let c=e.fragments[s],T,k={...t,section:"body",contentWidth:d},S=c.y-e.margins.top;if(n.blockLookup&&c.blockId){let R=n.blockLookup.get(String(c.blockId));if(c.kind==="paragraph"&&R?.block.kind==="paragraph"&&R?.measure.kind==="paragraph"){let I=R.block,L=s+1<e.fragments.length?b(e.fragments[s+1]):void 0,F=String(c.blockId),E=f.get(F);E||(E=new Set,f.set(F,E));let P=R.measure;h.length>0&&(P=chunkLTHT4A4S_js.v(I,d,{floatingZones:h,paragraphYOffset:S})),T=A(c,I,P,k,{document:o,prevBorders:g,nextBorders:L,renderedInlineImageKeys:E}),g=I.attrs?.borders;}else c.kind==="table"&&R?.block.kind==="table"&&R?.measure.kind==="table"?(T=Z(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="image"&&R?.block.kind==="image"&&R?.measure.kind==="image"?(T=q(c,R.block,R.measure,k,{document:o}),g=void 0):c.kind==="textBox"&&R?.block.kind==="textBox"&&R?.measure.kind==="textBox"?(T=J(c,R.block,R.measure,k,{document:o}),g=void 0):(T=Te(c,k,{document:o}),g=void 0);}else T=Te(c,k,{document:o}),g=void 0;sn(T,c,{left:e.margins.left,top:e.margins.top}),w(T,x(c)),i.appendChild(T);}if(Ve(e,i,d,x,o),y.length>0){let s=X(y,o,{layerClass:"layout-floating-images-layer",itemClass:"layout-page-floating-image",sizing:"inset0",layerMode:"front"});i.appendChild(s);}if(e.columns&&e.columns.separator&&e.columns.count>1){let s=e.columns.count,c=e.columns.gap,T=(d-(s-1)*c)/s,k=e.size.h-e.margins.top-e.margins.bottom;for(let S=0;S<s-1;S++){let R=(S+1)*T+S*c+c/2,I=o.createElement("div");I.style.position="absolute",I.style.left=`${R}px`,I.style.top="0",I.style.height=`${k}px`,I.style.width="0.5px",I.style.backgroundColor="#000",I.style.pointerEvents="none",i.appendChild(I);}}if(n.footnoteArea&&n.footnoteArea.length>0){let s=lt(n.footnoteArea,d,t,o);s.style.position="absolute";let c=Math.max(e.footnoteReservedHeight??0,st(n.footnoteArea)),T=e.size.h-e.margins.bottom-e.margins.top;s.style.top=`${Math.max(-e.margins.top,T-c)}px`,s.style.left="0",s.style.right="0",i.appendChild(s);}r.appendChild(i);{let c=n.headerDistance??e.margins.header??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.top-c,48),S=n.headerContent?.visualTop??0,R=n.headerContent?.visualBottom??n.headerContent?.height??0,I=Math.max(R-S,24),L=R>k,F=o.createElement("div");F.className=N.header,F.style.position="absolute",F.style.top=`${c+S}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.headerContent&&n.headerContent.blocks.length>0){let P={flowTop:c,flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.headerContent,{...t,section:"header",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}{let c=n.footerDistance??e.margins.footer??48,T=e.size.w-e.margins.left-e.margins.right,k=Math.max(e.margins.bottom-c,48),S=n.footerContent?.visualTop??0,R=n.footerContent?.visualBottom??n.footerContent?.height??0,I=Math.max(R-S,24),L=I>k,F=o.createElement("div");F.className=N.footer,F.style.position="absolute",F.style.top=`${e.size.h-c-I}px`,F.style.left=`${e.margins.left}px`,F.style.right=`${e.margins.right}px`,F.style.width=`${T}px`,F.style.height=`${I}px`,F.style.minHeight=`${I}px`;let E=!L;if(n.footerContent&&n.footerContent.blocks.length>0){let P={flowTop:e.size.h-c-(n.footerContent?.height??0),flowLeft:e.margins.left,contentWidth:T,pageWidth:e.size.w,pageHeight:e.size.h,margins:e.margins},C=Ee(n.footerContent,{...t,section:"footer",contentWidth:T},n,P);C.style.top=`${-S}px`,C.querySelector("img")&&(E=false),F.appendChild(C);}E&&(F.style.maxHeight=`${k}px`,F.style.overflow="hidden"),r.appendChild(F);}return a&&n.pageBorders?.zOrder!=="back"&&r.appendChild(a),r}exports.A=Qt;exports.B=nn;exports.C=N;exports.D=ae;exports.E=ye;exports.a=ue;exports.b=it;exports.c=Kt;exports.d=oo;exports.e=Pe;exports.f=Vt;exports.g=Yt;exports.h=ro;exports.i=at;exports.j=io;exports.k=ao;exports.l=dn;exports.m=cn;exports.n=Y;exports.o=Te;exports.p=Ye;exports.q=q;exports.r=et;exports.s=ge;exports.t=A;exports.u=X;exports.v=D;exports.w=Z;exports.x=zt;exports.y=J;exports.z=rt;
|
package/dist/chunk-KRN6YSR2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f,b,c,d,e,a as a$1,p,m as m$1}from'./chunk-MERJFGEP.mjs';import {g,i,k,l,m}from'./chunk-WLDI6N3B.mjs';import {a}from'./chunk-OEXVWIHW.mjs';function H(t,s){let r=j(s),e=new RegExp(`<w:p[\\s][^>]*w14:paraId="${r}"`,"g"),o=[],i;for(;(i=e.exec(t))!==null;)o.push(i.index);if(o.length===0||o.length>1)return null;let l=o[0],n=l,a=0;for(;n<t.length;){let f=t.indexOf("<",n);if(f===-1)break;if(t.startsWith("<w:p",f)){let w=t[f+4];if(w===">"||w===" "||w==="/"){let u=t.indexOf(">",f);if(u===-1)break;if(t[u-1]==="/"){if(a===0)return {start:l,end:u+1};n=u+1;}else a++,n=u+1;}else n=f+1;}else if(t.startsWith("</w:p>",f)){if(a--,a===0)return {start:l,end:f+6};n=f+6;}else n=f+1;}return null}function L(t,s){let r=H(t,s);return r?t.substring(r.start,r.end):null}function Y(t){let s=0,r=/<w:p[\s>]/g,e;for(;(e=r.exec(t))!==null;){let o=e.index,i=t[o+4];(i===">"||i===" ")&&s++;}return s}function B(t){let s=new Map,r=/w14:paraId="([^"]+)"/g,e;for(;(e=r.exec(t))!==null;){let o=e[1];s.set(o,(s.get(o)||0)+1);}return s}function V(t,s,r){if(r.size===0)return {safe:true};let e=B(t),o=B(s);for(let n of r){let a=e.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-original: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-original: ${n}`}}for(let n of r){let a=o.get(n)||0;if(a===0)return {safe:false,reason:`paraId-not-found-in-serialized: ${n}`};if(a>1)return {safe:false,reason:`duplicate-paraId-in-serialized: ${n}`}}let i=Y(t),l=Y(s);return i!==l?{safe:false,reason:`paragraph-count-mismatch: original=${i}, serialized=${l}`}:{safe:true}}function W(t,s,r){if(r.size===0)return t;if(!V(t,s,r).safe)return null;let o=[];for(let l of r){let n=H(t,l);if(!n)return null;let a=L(s,l);if(!a)return null;o.push({start:n.start,end:n.end,newXml:a});}o.sort((l,n)=>n.start-l.start);let i=t;for(let{start:l,end:n,newXml:a}of o)i=i.substring(0,l)+a+i.substring(n);return i}function j(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){let s=r=>r.content.some(e=>e.type==="drawing"&&e.image?.src?.startsWith("data:")&&!e.image?.rId);for(let r of t)if(r.type==="paragraph")for(let e of r.content)if(e.type==="run"){if(s(e))return true}else {if(e.type==="hyperlink"&&e.href&&!e.rId&&!e.anchor)return true;if(e.type==="insertion"||e.type==="deletion"||e.type==="moveFrom"||e.type==="moveTo"){for(let o of e.content)if(o.type==="run"&&s(o))return true}}else if(r.type==="table"){for(let e of r.rows)for(let o of e.cells)if(Z(o.content))return true}return false}async function nt(t,s,r){let{changedParaIds:e$1,structuralChange:o,hasUntrackedChanges:i$1}=r;if(o||i$1||!s)return null;let l$1=t.package.document.content;if(Z(l$1))return null;let n=t.package.document.comments,a$2=n&&n.length>0,f$1=f(t);try{let u=await(await import('jszip')).default.loadAsync(s),c$1=new Map;if(e$1.size>0){let d=u.file("word/document.xml");if(!d)return null;let p=await d.async("text"),y=g(t),g$1=W(p,y,e$1);if(!g$1)return null;c$1.set("word/document.xml",g$1);}if(a$2){let{xml:d$1,paraInfos:p}=i(n);c$1.set("word/comments.xml",d$1);let y=k(p);y&&c$1.set("word/commentsExtended.xml",y);let g=l(p);g&&c$1.set("word/commentsIds.xml",g);let P=m(p,n);P&&c$1.set("word/commentsExtensible.xml",P);let S=u.file("[Content_Types].xml");if(S){let m=c$1.get("[Content_Types].xml")??await S.async("text"),x=!1,C=[["/word/comments.xml",b],["/word/commentsExtended.xml",c],["/word/commentsIds.xml",d],["/word/commentsExtensible.xml",e]];for(let[h,b]of C)m.includes(h)||(m=m.replace("</Types>",`<Override PartName="${h}" ContentType="${b}"/></Types>`),x=!0);x&&c$1.set("[Content_Types].xml",m);}let T="word/_rels/document.xml.rels",N=u.file(T);if(N){let m=c$1.get(T)??await N.async("text"),x=!1,C=[["comments.xml",a.comments],["commentsExtended.xml",a.commentsExtended],["commentsIds.xml",a.commentsIds],["commentsExtensible.xml",a.commentsExtensible]];for(let[h,b]of C)if(!m.includes(h)){let J=a$1(m);m=m.replace("</Relationships>",`<Relationship Id="rId${J+1}" Type="${b}" Target="${h}"/></Relationships>`),x=!0;}x&&c$1.set(T,m);}}for(let[d,p]of f$1)c$1.set(d,p);let I=u.file("docProps/core.xml");if(I){let d=await I.async("text");c$1.set("docProps/core.xml",p(d,{updateModifiedDate:!0}));}return await m$1(u,c$1)}catch{return null}}export{V as a,W as b,nt as c};
|
package/dist/chunk-L72YAV5N.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkC2BAPYGJ_js=require('./chunk-C2BAPYGJ.js');function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e){return e==null||!Number.isFinite(e)?"0":String(Math.round(e))}function be(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}var Ce=["top","left","bottom","right","between","bar"];function O(e){if(!e)return "";let t=[];for(let n of Ce){let r=be(e[n],n);r&&t.push(r);}return t.length===0?"":`<w:pBdr>${t.join("")}</w:pBdr>`}function N(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function W(e){return !e||e.length===0?"":`<w:tabs>${e.map(n=>{let r=[`w:val="${n.alignment}"`,`w:pos="${s(n.position)}"`];return n.leader&&n.leader!=="none"&&r.push(`w:leader="${n.leader}"`),`<w:tab ${r.join(" ")}/>`}).join("")}</w:tabs>`}function G(e){let t=[];return e.spaceBefore!==void 0&&t.push(`w:before="${s(e.spaceBefore)}"`),e.spaceAfter!==void 0&&t.push(`w:after="${s(e.spaceAfter)}"`),e.lineSpacing!==void 0&&t.push(`w:line="${s(e.lineSpacing)}"`),e.lineSpacingRule&&t.push(`w:lineRule="${e.lineSpacingRule}"`),e.beforeAutospacing&&t.push('w:beforeAutospacing="1"'),e.afterAutospacing&&t.push('w:afterAutospacing="1"'),t.length===0?"":`<w:spacing ${t.join(" ")}/>`}function V(e){let t=[];return e.indentLeft!==void 0&&t.push(`w:left="${s(e.indentLeft)}"`),e.indentRight!==void 0&&t.push(`w:right="${s(e.indentRight)}"`),e.indentFirstLine!==void 0&&(e.hangingIndent?t.push(`w:hanging="${s(Math.abs(e.indentFirstLine))}"`):e.indentFirstLine!==0&&t.push(`w:firstLine="${s(e.indentFirstLine)}"`)),t.length===0?"":`<w:ind ${t.join(" ")}/>`}function U(e){if(!e)return "";let t=[];return e.ilvl!==void 0&&t.push(`<w:ilvl w:val="${s(e.ilvl)}"/>`),e.numId!==void 0&&t.push(`<w:numId w:val="${s(e.numId)}"/>`),t.length===0?"":`<w:numPr>${t.join("")}</w:numPr>`}function _(e){if(!e)return "";let t=[];return e.width!==void 0&&t.push(`w:w="${s(e.width)}"`),e.height!==void 0&&t.push(`w:h="${s(e.height)}"`),e.hAnchor&&t.push(`w:hAnchor="${e.hAnchor}"`),e.vAnchor&&t.push(`w:vAnchor="${e.vAnchor}"`),e.x!==void 0&&t.push(`w:x="${s(e.x)}"`),e.y!==void 0&&t.push(`w:y="${s(e.y)}"`),e.xAlign&&t.push(`w:xAlign="${e.xAlign}"`),e.yAlign&&t.push(`w:yAlign="${e.yAlign}"`),e.wrap&&t.push(`w:wrap="${e.wrap}"`),t.length===0?"":`<w:framePr ${t.join(" ")}/>`}function Y(e){let t=[`w:id="${e.id}"`,`w:name="${a(e.name)}"`];return e.colFirst!==void 0&&t.push(`w:colFirst="${e.colFirst}"`),e.colLast!==void 0&&t.push(`w:colLast="${e.colLast}"`),`<w:bookmarkStart ${t.join(" ")}/>`}function Z(e){return `<w:bookmarkEnd w:id="${e.id}"/>`}function M(e){let t=[];e.rId&&t.push(`r:id="${e.rId}"`),e.anchor&&t.push(`w:anchor="${a(e.anchor)}"`),e.tooltip&&t.push(`w:tooltip="${a(e.tooltip)}"`),e.target&&t.push(`w:tgtFrame="${a(e.target)}"`),e.history===false&&t.push('w:history="0"'),e.docLocation&&t.push(`w:docLocation="${a(e.docLocation)}"`);let n=e.children.map(i=>i.type==="run"?x(i):i.type==="bookmarkStart"?Y(i):i.type==="bookmarkEnd"?Z(i):"").join("");return `<w:hyperlink${t.length>0?" "+t.join(" "):""}>${n}</w:hyperlink>`}function J(e){let t=[],n=e.content.find(c=>c.type==="run"),r=n?.formatting?C(n.formatting):"",i=['w:fldCharType="begin"'];e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`);let l=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`),t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);for(let c of e.content)c.type==="run"&&t.push(x(c));return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function K(e){let t=[],n=e.fieldResult?.[0]?.formatting,r=n?C(n):"",i=['w:fldCharType="begin"'];if(e.fldLock&&i.push('w:fldLock="true"'),t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`),e.fieldCode.length>0)t.push(...e.fieldCode.map(o=>x(o)));else {let l=e.instruction.startsWith(" ")||e.instruction.endsWith(" ")||e.instruction.includes(" ")?' xml:space="preserve"':"";t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`);}return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`),t.push(...e.fieldResult.map(o=>x(o))),t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`),t.join("")}function Q(e){let t=e.properties,n=[];switch(t.alias&&n.push(`<w:alias w:val="${a(t.alias)}"/>`),t.tag&&n.push(`<w:tag w:val="${a(t.tag)}"/>`),t.lock&&t.lock!=="unlocked"&&n.push(`<w:lock w:val="${t.lock}"/>`),t.showingPlaceholder&&n.push("<w:showingPlcHdr/>"),t.sdtType){case "plainText":n.push("<w:text/>");break;case "date":t.dateFormat?n.push(`<w:date w:fullDate="${a(t.dateFormat)}"/>`):n.push("<w:date/>");break;case "dropDownList":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:dropDownList>${i}</w:dropDownList>`);break}case "comboBox":{let i=(t.listItems??[]).map(o=>`<w:listItem w:displayText="${a(o.displayText)}" w:value="${a(o.value)}"/>`).join("");n.push(`<w:comboBox>${i}</w:comboBox>`);break}case "checkbox":n.push(`<w14:checkbox><w14:checked w14:val="${t.checked?"1":"0"}"/></w14:checkbox>`);break;case "picture":n.push("<w:picture/>");break}let r=e.content.map(i=>{switch(i.type){case "run":return x(i);case "hyperlink":return M(i);case "simpleField":return J(i);case "complexField":return K(i);case "inlineSdt":return Q(i);case "mathEquation":return i.ommlXml||"";default:return i}}).join("");return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`}function q(e,t){let n=[`w:id="${t.id}"`,`w:name="${a(t.name)}"`];return `<w:${e} ${n.join(" ")}/>`}function z(e,t){let n=t.info,r=Number.isInteger(n.id)&&n.id>=0?n.id:0,i=typeof n.author=="string"?n.author.trim():"",o=i.length>0?i:"Unknown",l=typeof n.date=="string"?n.date.trim():void 0,c=[`w:id="${r}"`,`w:author="${a(o)}"`];l&&c.push(`w:date="${a(l)}"`);let u=t.content.map(f=>{if(f.type==="run"){let p=x(f),d=f.content.some(m=>m.type==="drawing");return (e==="del"||e==="moveFrom")&&!d?p.replace(/<w:t\b/g,"<w:delText").replace(/<\/w:t>/g,"</w:delText>").replace(/<w:instrText\b/g,"<w:delInstrText").replace(/<\/w:instrText>/g,"</w:delInstrText>"):p}return f.type==="hyperlink"?M(f):""}).join("");return `<w:${e} ${c.join(" ")}>${u}</w:${e}>`}function ee(e){switch(e.type){case "run":return x(e);case "hyperlink":return M(e);case "bookmarkStart":return Y(e);case "bookmarkEnd":return Z(e);case "simpleField":return J(e);case "complexField":return K(e);case "inlineSdt":return Q(e);case "commentRangeStart":return `<w:commentRangeStart w:id="${e.id}"/>`;case "commentRangeEnd":return `<w:commentRangeEnd w:id="${e.id}"/><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${e.id}"/></w:r>`;case "insertion":return z("ins",e);case "deletion":return z("del",e);case "moveFrom":return z("moveFrom",e);case "moveTo":return z("moveTo",e);case "moveFromRangeStart":return q("moveFromRangeStart",e);case "moveFromRangeEnd":return `<w:moveFromRangeEnd w:id="${e.id}"/>`;case "moveToRangeStart":return q("moveToRangeStart",e);case "moveToRangeEnd":return `<w:moveToRangeEnd w:id="${e.id}"/>`;case "mathEquation":return e.ommlXml||"";default:return ""}}function te(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"&&e.author.length>0?e.author:"Unknown",r=[`w:id="${t}"`,`w:author="${a(n)}"`],i=typeof e.date=="string"&&e.date.length>0?e.date:void 0;return i&&r.push(`w:date="${a(i)}"`),r.join(" ")}function Te(e,t,n){let r=[];if(t&&r.push(`<w:ins ${te(t)}/>`),n&&r.push(`<w:del ${te(n)}/>`),e?.runProperties){let i=C(e.runProperties);if(i)if(i.startsWith("<w:rPr>")&&i.endsWith("</w:rPr>")){let o=i.slice(7,-8);o.length>0&&r.push(o);}else i.startsWith("<w:rPr/>")||r.push(i);}return r.length===0?"":`<w:rPr>${r.join("")}</w:rPr>`}function ne(e,t,n,r,i){let o=[];if(e){e.styleId&&o.push(`<w:pStyle w:val="${a(e.styleId)}"/>`),e.keepNext&&o.push("<w:keepNext/>"),e.keepLines&&o.push("<w:keepLines/>"),e.contextualSpacing&&o.push("<w:contextualSpacing/>"),e.pageBreakBefore&&o.push("<w:pageBreakBefore/>");let l=_(e.frame);l&&o.push(l),e.widowControl===false?o.push('<w:widowControl w:val="0"/>'):e.widowControl===true&&o.push("<w:widowControl/>");let c=U(e.numPr);c&&o.push(c);let u=O(e.borders);u&&o.push(u);let f=N(e.shading);f&&o.push(f);let p=W(e.tabs);p&&o.push(p),e.suppressLineNumbers&&o.push("<w:suppressLineNumbers/>"),e.suppressAutoHyphens&&o.push("<w:suppressAutoHyphens/>");let d=G(e);d&&o.push(d);let m=V(e);m&&o.push(m),e.bidi&&o.push("<w:bidi/>"),e.alignment&&o.push(`<w:jc w:val="${e.alignment}"/>`),e.outlineLevel!==void 0&&o.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`);}if(!i?.baseOnly){let l=Te(e,n??void 0,r??void 0);l&&o.push(l),t&&t.length>0&&o.push(Se(t[0]));}return o.length===0?"":`<w:pPr>${o.join("")}</w:pPr>`}function ve(e){return !e.startsWith("<w:pPr>")||!e.endsWith("</w:pPr>")?"":e.slice(7,-8)}function Se(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&o.push(`w:date="${a(i)}"`);let l=ne(e.previousFormatting,void 0,void 0,void 0,{baseOnly:true})||"<w:pPr/>",c=ve(l),u=c.length>0?`<w:pPr>${c}</w:pPr>`:"<w:pPr/>";return `<w:pPrChange ${o.join(" ")}>${u}</w:pPrChange>`}function y(e){let t=[],n=[];e.paraId&&n.push(`w14:paraId="${e.paraId}"`),e.textId&&n.push(`w14:textId="${e.textId}"`);let r=n.length>0?" "+n.join(" "):"",i=ne(e.formatting,e.propertyChanges,e.pPrIns,e.pPrDel);i&&t.push(i);let o=!!e.renderedPageBreakBefore;for(let l of e.content){let c=ee(l);if(c){if(o){let u=Fe(c);u&&(c=u,o=false);}t.push(c);}}return `<w:p${r}>${t.join("")}</w:p>`}function Fe(e){let t=/<w:r(?=[\s>/])[^>]*>/;return t.test(e)?e.replace(t,n=>`${n}<w:lastRenderedPageBreak/>`):null}var re=1e5;function H(){re=1e5;}function ie(e){return e!=null&&e!==""&&e!==0?String(e):String(re++)}function L(e){if(!e)return "";if(e.rgb)return `<a:srgbClr val="${e.rgb.replace("#","")}"/>`;if(e.themeColor){let t=`<a:schemeClr val="${e.themeColor}"`;return e.themeTint?t+=`><a:tint val="${e.themeTint}"/></a:schemeClr>`:e.themeShade?t+=`><a:shade val="${e.themeShade}"/></a:schemeClr>`:t+="/>",t}return ""}function ze(e){if(!e||e.type==="none")return "<a:noFill/>";if(e.type==="solid"&&e.color)return `<a:solidFill>${L(e.color)}</a:solidFill>`;if(e.type==="gradient"&&e.gradient){let t=e.gradient,n=t.stops.map(i=>`<a:gs pos="${i.position}">${L(i.color)}</a:gs>`).join(""),r=t.type==="linear"?`<a:lin ang="${(t.angle||0)*6e4}" scaled="1"/>`:"";return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`}return ""}function oe(e){if(!e)return "";let t=[];e.width!=null&&t.push(`w="${e.width}"`),e.cap&&t.push(`cap="${e.cap}"`);let n=[];return e.color&&n.push(`<a:solidFill>${L(e.color)}</a:solidFill>`),e.style&&e.style!=="solid"&&n.push(`<a:prstDash val="${e.style}"/>`),e.headEnd&&n.push(`<a:headEnd type="${e.headEnd.type}"${e.headEnd.width?` w="${e.headEnd.width}"`:""}${e.headEnd.length?` len="${e.headEnd.length}"`:""}/>`),e.tailEnd&&n.push(`<a:tailEnd type="${e.tailEnd.type}"${e.tailEnd.width?` w="${e.tailEnd.width}"`:""}${e.tailEnd.length?` len="${e.tailEnd.length}"`:""}/>`),n.length===0&&t.length===0?"":`<a:ln${t.length?" "+t.join(" "):""}>${n.join("")}</a:ln>`}function se(e){let t=[],n=e.horizontal;t.push(`<wp:positionH relativeFrom="${n.relativeTo}">`),n.alignment?t.push(`<wp:align>${n.alignment}</wp:align>`):t.push(`<wp:posOffset>${s(n.posOffset)}</wp:posOffset>`),t.push("</wp:positionH>");let r=e.vertical;return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`),r.alignment?t.push(`<wp:align>${r.alignment}</wp:align>`):t.push(`<wp:posOffset>${s(r.posOffset)}</wp:posOffset>`),t.push("</wp:positionV>"),t.join("")}function ae(e){let t=e.wrapText?` wrapText="${e.wrapText}"`:' wrapText="bothSides"';switch(e.type){case "square":return `<wp:wrapSquare${t}/>`;case "tight":return `<wp:wrapTight${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;case "through":return `<wp:wrapThrough${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`;case "topAndBottom":return "<wp:wrapTopAndBottom/>";case "behind":case "inFront":return "<wp:wrapNone/>";default:return "<wp:wrapNone/>"}}function Re(e,t){let n=e.size.width,r=e.size.height,i=e.rId||"rId1",o=t,l=e.filename||`image${o}`,c="";e.transform?.rotation&&(c+=` rot="${Math.round(e.transform.rotation*6e4)}"`),e.transform?.flipH&&(c+=' flipH="1"'),e.transform?.flipV&&(c+=' flipV="1"');let u=e.opacity!==void 0&&e.opacity<1?`<a:alphaModFix amt="${Math.round(Math.max(0,Math.min(1,e.opacity))*1e5)}"/>`:"",f=u?`<a:blip r:embed="${i}">${u}</a:blip>`:`<a:blip r:embed="${i}"/>`,p=[];e.crop?.left&&p.push(`l="${Math.round(e.crop.left*1e5)}"`),e.crop?.top&&p.push(`t="${Math.round(e.crop.top*1e5)}"`),e.crop?.right&&p.push(`r="${Math.round(e.crop.right*1e5)}"`),e.crop?.bottom&&p.push(`b="${Math.round(e.crop.bottom*1e5)}"`);let d=p.length>0?`<a:srcRect ${p.join(" ")}/>`:"";return ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">','<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">',"<pic:nvPicPr>",`<pic:cNvPr id="${o}" name="${a(l)}"${e.alt?` descr="${a(e.alt)}"`:""}/>`,"<pic:cNvPicPr/>","</pic:nvPicPr>","<pic:blipFill>",f,d,"<a:stretch><a:fillRect/></a:stretch>","</pic:blipFill>","<pic:spPr>",`<a:xfrm${c}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${s(n)}" cy="${s(r)}"/>`,"</a:xfrm>",'<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>',e.outline?oe(e.outline):"","</pic:spPr>","</pic:pic>","</a:graphicData>","</a:graphic>"].join("")}function ce(e){let t=e.image,n=t.wrap.type!=="inline",r=t.size.width,i=t.size.height,o=t.wrap.distT??0,l=t.wrap.distB??0,c=t.wrap.distL??0,u=t.wrap.distR??0,f=t.padding?.left??0,p=t.padding?.top??0,d=t.padding?.right??0,m=t.padding?.bottom??0,F=`<wp:effectExtent l="${s(f)}" t="${s(p)}" r="${s(d)}" b="${s(m)}"/>`,g=ie(t.id),B=t.title||t.filename||`Picture ${g}`,v=Re(t,g);if(!n)return ["<w:drawing>",`<wp:inline distT="${s(o)}" distB="${s(l)}" distL="${s(c)}" distR="${s(u)}">`,`<wp:extent cx="${s(r)}" cy="${s(i)}"/>`,F,`<wp:docPr id="${g}" name="${a(B)}"${t.alt?` descr="${a(t.alt)}"`:""}${t.decorative?' hidden="1"':""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',v,"</wp:inline>","</w:drawing>"].join("");let A=t.wrap.type==="behind"?"1":"0",D=t.position?se(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',X=ae(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(o)}" distB="${s(l)}" distL="${s(c)}" distR="${s(u)}" simplePos="0" relativeHeight="251658240" behindDoc="${A}" locked="0" layoutInCell="${t.layoutInCell===false?"0":"1"}" allowOverlap="${t.allowOverlap===false?"0":"1"}">`,'<wp:simplePos x="0" y="0"/>',D,`<wp:extent cx="${s(r)}" cy="${s(i)}"/>`,F,X,`<wp:docPr id="${g}" name="${a(B)}"${t.alt?` descr="${a(t.alt)}"`:""}/>`,'<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>',v,"</wp:anchor>","</w:drawing>"].join("")}function Ie(e){return e.map(t=>y(t)).join("")}function le(e){let t=e.shape,n=t.size.width,r=t.size.height,i=t.shapeType==="textBox",o=t.wrap&&t.wrap.type!=="inline",l=t.wrap?.distT??0,c=t.wrap?.distB??0,u=t.wrap?.distL??0,f=t.wrap?.distR??0,p=ie(t.id),d=t.name||(i?`TextBox ${p}`:`Shape ${p}`),m="";t.transform?.rotation&&(m+=` rot="${Math.round(t.transform.rotation*6e4)}"`),t.transform?.flipH&&(m+=' flipH="1"'),t.transform?.flipV&&(m+=' flipV="1"');let F=["<wps:spPr>",`<a:xfrm${m}>`,'<a:off x="0" y="0"/>',`<a:ext cx="${s(n)}" cy="${s(r)}"/>`,"</a:xfrm>",`<a:prstGeom prst="${t.shapeType==="textBox"?"rect":t.shapeType}"><a:avLst/></a:prstGeom>`,ze(t.fill),oe(t.outline),"</wps:spPr>"].join(""),g="";if(t.textBody){let w=t.textBody,$=['rot="0"','vert="horz"'];w.anchor&&$.push(`anchor="${w.anchor==="middle"?"ctr":w.anchor}"`),w.anchorCenter&&$.push('anchorCtr="1"'),w.margins&&(w.margins.left!=null&&$.push(`lIns="${s(w.margins.left)}"`),w.margins.top!=null&&$.push(`tIns="${s(w.margins.top)}"`),w.margins.right!=null&&$.push(`rIns="${s(w.margins.right)}"`),w.margins.bottom!=null&&$.push(`bIns="${s(w.margins.bottom)}"`)),i?g=["<wps:txbx><w:txbxContent>",Ie(w.content),"</w:txbxContent></wps:txbx>",`<wps:bodyPr ${$.join(" ")}/>`].join(""):g=[`<wps:bodyPr ${$.join(" ")}/>`].join("");}let v=['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">','<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">',["<wps:wsp>",`<wps:cNvSpPr${i?' txBox="1"':""}/>`,F,g,"</wps:wsp>"].join(""),"</a:graphicData>","</a:graphic>"].join("");if(!o)return ["<w:drawing>",`<wp:inline distT="${s(l)}" distB="${s(c)}" distL="${s(u)}" distR="${s(f)}">`,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',`<wp:docPr id="${p}" name="${a(d)}"/>`,"<wp:cNvGraphicFramePr/>",v,"</wp:inline>","</w:drawing>"].join("");let A=t.wrap?.type==="behind"?"1":"0",D=t.position?se(t.position):'<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',X=ae(t.wrap);return ["<w:drawing>",`<wp:anchor distT="${s(l)}" distB="${s(c)}" distL="${s(u)}" distR="${s(f)}" simplePos="0" relativeHeight="251658240" behindDoc="${A}" locked="0" layoutInCell="1" allowOverlap="1">`,'<wp:simplePos x="0" y="0"/>',D,`<wp:extent cx="${s(n)}" cy="${s(r)}"/>`,'<wp:effectExtent l="0" t="0" r="0" b="0"/>',X,`<wp:docPr id="${p}" name="${a(d)}"/>`,"<wp:cNvGraphicFramePr/>",v,"</wp:anchor>","</w:drawing>"].join("")}var ke=new Set(["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","red","white","yellow"]);function je(e){if(!e)return "";let t=[];return e.auto?t.push('w:val="auto"'):e.rgb&&t.push(`w:val="${e.rgb}"`),e.themeColor&&t.push(`w:themeColor="${e.themeColor}"`),e.themeTint&&t.push(`w:themeTint="${e.themeTint}"`),e.themeShade&&t.push(`w:themeShade="${e.themeShade}"`),t.length===0?"":`<w:color ${t.join(" ")}/>`}function Be(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function C(e){if(!e)return "";let t=[];if(e.styleId&&t.push(`<w:rStyle w:val="${a(e.styleId)}"/>`),e.fontFamily){let i=[];e.fontFamily.ascii&&i.push(`w:ascii="${a(e.fontFamily.ascii)}"`),e.fontFamily.hAnsi&&i.push(`w:hAnsi="${a(e.fontFamily.hAnsi)}"`),e.fontFamily.eastAsia&&i.push(`w:eastAsia="${a(e.fontFamily.eastAsia)}"`),e.fontFamily.cs&&i.push(`w:cs="${a(e.fontFamily.cs)}"`),e.fontFamily.asciiTheme&&i.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`),e.fontFamily.hAnsiTheme&&i.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`),e.fontFamily.eastAsiaTheme&&i.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`),e.fontFamily.csTheme&&i.push(`w:csTheme="${e.fontFamily.csTheme}"`),i.length>0&&t.push(`<w:rFonts ${i.join(" ")}/>`);}e.bold===true?t.push("<w:b/>"):e.bold===false&&t.push('<w:b w:val="0"/>'),e.boldCs===true?t.push("<w:bCs/>"):e.boldCs===false&&t.push('<w:bCs w:val="0"/>'),e.italic===true?t.push("<w:i/>"):e.italic===false&&t.push('<w:i w:val="0"/>'),e.italicCs===true?t.push("<w:iCs/>"):e.italicCs===false&&t.push('<w:iCs w:val="0"/>'),e.allCaps&&t.push("<w:caps/>"),e.smallCaps&&t.push("<w:smallCaps/>"),e.strike&&t.push("<w:strike/>"),e.doubleStrike&&t.push("<w:dstrike/>"),e.outline&&t.push("<w:outline/>"),e.shadow&&t.push("<w:shadow/>"),e.emboss&&t.push("<w:emboss/>"),e.imprint&&t.push("<w:imprint/>"),e.hidden&&t.push("<w:vanish/>");let n=je(e.color);if(n&&t.push(n),e.spacing!==void 0&&t.push(`<w:spacing w:val="${s(e.spacing)}"/>`),e.scale!==void 0&&t.push(`<w:w w:val="${s(e.scale)}"/>`),e.kerning!==void 0&&t.push(`<w:kern w:val="${s(e.kerning)}"/>`),e.position!==void 0&&t.push(`<w:position w:val="${s(e.position)}"/>`),e.fontSize!==void 0&&t.push(`<w:sz w:val="${s(e.fontSize)}"/>`),e.fontSizeCs!==void 0&&t.push(`<w:szCs w:val="${s(e.fontSizeCs)}"/>`),e.highlight&&e.highlight!=="none"){if(ke.has(e.highlight))t.push(`<w:highlight w:val="${e.highlight}"/>`);else if(!e.shading){let i=e.highlight.replace(/^#/,"");/^[0-9a-fA-F]{6}$/.test(i)&&t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${i}"/>`);}}if(e.underline){let i=[`w:val="${e.underline.style}"`];e.underline.color&&(e.underline.color.rgb&&i.push(`w:color="${e.underline.color.rgb}"`),e.underline.color.themeColor&&i.push(`w:themeColor="${e.underline.color.themeColor}"`),e.underline.color.themeTint&&i.push(`w:themeTint="${e.underline.color.themeTint}"`),e.underline.color.themeShade&&i.push(`w:themeShade="${e.underline.color.themeShade}"`)),t.push(`<w:u ${i.join(" ")}/>`);}e.effect&&e.effect!=="none"&&t.push(`<w:effect w:val="${e.effect}"/>`),e.emphasisMark&&e.emphasisMark!=="none"&&t.push(`<w:em w:val="${e.emphasisMark}"/>`);let r=Be(e.shading);return r&&t.push(r),e.vertAlign&&e.vertAlign!=="baseline"&&t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`),e.rtl&&t.push("<w:rtl/>"),e.cs&&t.push("<w:cs/>"),t.length===0?"":`<w:rPr>${t.join("")}</w:rPr>`}function Ae(e){return !e.startsWith("<w:rPr>")||!e.endsWith("</w:rPr>")?"":e.slice(7,-8)}function De(e){let t=Number.isInteger(e.info.id)&&e.info.id>=0?e.info.id:0,n=typeof e.info.author=="string"?e.info.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.info.date=="string"?e.info.date.trim():void 0,o=[`w:id="${t}"`,`w:author="${a(r)}"`];i&&o.push(`w:date="${a(i)}"`);let l=C(e.previousFormatting)||"<w:rPr/>";return `<w:rPrChange ${o.join(" ")}>${l}</w:rPrChange>`}function Xe(e,t){let n=C(e),r=n?Ae(n):"",i=(t??[]).map(De).join(""),o=`${r}${i}`;return o?`<w:rPr>${o}</w:rPr>`:""}function Ee(e){return `<w:t${e.preserveSpace||e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:t>`}function Me(e){return "<w:tab/>"}function Le(e){let t=[];return e.breakType==="page"?t.push('w:type="page"'):e.breakType==="column"?t.push('w:type="column"'):e.breakType==="textWrapping"&&(t.push('w:type="textWrapping"'),e.clear&&e.clear!=="none"&&t.push(`w:clear="${e.clear}"`)),t.length===0?"<w:br/>":`<w:br ${t.join(" ")}/>`}function He(e){return `<w:sym w:font="${a(e.font)}" w:char="${a(e.char)}"/>`}function Oe(e){return e.type==="footnoteRef"?`<w:footnoteReference w:id="${e.id}"/>`:`<w:endnoteReference w:id="${e.id}"/>`}function Ne(e){let t=[`w:fldCharType="${e.charType}"`];return e.fldLock&&t.push('w:fldLock="true"'),e.dirty&&t.push('w:dirty="true"'),`<w:fldChar ${t.join(" ")}/>`}function We(e){return `<w:instrText${e.text.startsWith(" ")||e.text.endsWith(" ")||e.text.includes(" ")?' xml:space="preserve"':""}>${a(e.text)}</w:instrText>`}function Ge(e){return "<w:softHyphen/>"}function Ve(e){return "<w:noBreakHyphen/>"}function Ue(e){switch(e.type){case "text":return Ee(e);case "tab":return Me();case "break":return Le(e);case "symbol":return He(e);case "footnoteRef":case "endnoteRef":return Oe(e);case "fieldChar":return Ne(e);case "instrText":return We(e);case "softHyphen":return Ge();case "noBreakHyphen":return Ve();case "drawing":return ce(e);case "shape":return le(e);default:return ""}}function x(e){let t=[],n=Xe(e.formatting,e.propertyChanges);n&&t.push(n);for(let r of e.content){let i=Ue(r);i&&t.push(i);}return `<w:r>${t.join("")}</w:r>`}function _e(e){let t=Number.isInteger(e.id)&&e.id>=0?e.id:0,n=typeof e.author=="string"?e.author.trim():"",r=n.length>0?n:"Unknown",i=typeof e.date=="string"?e.date.trim():void 0;return {id:t,author:r,date:i}}function b(e){let t=_e(e),n=[`w:id="${t.id}"`,`w:author="${a(t.author)}"`];return t.date&&n.push(`w:date="${a(t.date)}"`),n.join(" ")}function P(e,t){if(!e)return "";let n=[`w:w="${s(e.value)}"`,`w:type="${e.type}"`];return `<w:${t} ${n.join(" ")}/>`}function T(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function pe(e,t){if(!e)return "";let n=[];if(e.top){let r=T(e.top,"top");r&&n.push(r);}if(e.left){let r=T(e.left,"left");r&&n.push(r);}if(e.bottom){let r=T(e.bottom,"bottom");r&&n.push(r);}if(e.right){let r=T(e.right,"right");r&&n.push(r);}if(e.insideH){let r=T(e.insideH,"insideH");r&&n.push(r);}if(e.insideV){let r=T(e.insideV,"insideV");r&&n.push(r);}return n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function ue(e,t){if(!e)return "";let n=[];return e.top&&n.push(P(e.top,"top")),e.left&&n.push(P(e.left,"left")),e.bottom&&n.push(P(e.bottom,"bottom")),e.right&&n.push(P(e.right,"right")),n.length===0?"":`<w:${t}>${n.join("")}</w:${t}>`}function fe(e){if(!e)return "";let t=[];return e.pattern?t.push(`w:val="${e.pattern}"`):t.push('w:val="clear"'),e.color?.rgb?t.push(`w:color="${e.color.rgb}"`):e.color?.auto&&t.push('w:color="auto"'),e.fill?.rgb?t.push(`w:fill="${e.fill.rgb}"`):e.fill?.auto&&t.push('w:fill="auto"'),e.fill?.themeColor&&t.push(`w:themeFill="${e.fill.themeColor}"`),e.fill?.themeTint&&t.push(`w:themeFillTint="${e.fill.themeTint}"`),e.fill?.themeShade&&t.push(`w:themeFillShade="${e.fill.themeShade}"`),t.length===0?"":`<w:shd ${t.join(" ")}/>`}function qe(e){if(!e)return "";let t=[];return e.firstRow&&t.push('w:firstRow="1"'),e.lastRow&&t.push('w:lastRow="1"'),e.firstColumn&&t.push('w:firstColumn="1"'),e.lastColumn&&t.push('w:lastColumn="1"'),e.noHBand&&t.push('w:noHBand="1"'),e.noVBand&&t.push('w:noVBand="1"'),t.length===0?"":`<w:tblLook ${t.join(" ")}/>`}function Ye(e){if(!e)return "";let t=[];return e.horzAnchor&&t.push(`w:horzAnchor="${e.horzAnchor}"`),e.vertAnchor&&t.push(`w:vertAnchor="${e.vertAnchor}"`),e.tblpX!==void 0&&t.push(`w:tblpX="${s(e.tblpX)}"`),e.tblpXSpec&&t.push(`w:tblpXSpec="${e.tblpXSpec}"`),e.tblpY!==void 0&&t.push(`w:tblpY="${s(e.tblpY)}"`),e.tblpYSpec&&t.push(`w:tblpYSpec="${e.tblpYSpec}"`),e.topFromText!==void 0&&t.push(`w:topFromText="${s(e.topFromText)}"`),e.bottomFromText!==void 0&&t.push(`w:bottomFromText="${s(e.bottomFromText)}"`),e.leftFromText!==void 0&&t.push(`w:leftFromText="${s(e.leftFromText)}"`),e.rightFromText!==void 0&&t.push(`w:rightFromText="${s(e.rightFromText)}"`),t.length===0?"":`<w:tblpPr ${t.join(" ")}/>`}function he(e,t){let n=[];if(e){e.styleId&&n.push(`<w:tblStyle w:val="${a(e.styleId)}"/>`);let r=Ye(e.floating);r&&n.push(r),e.bidi&&n.push("<w:bidiVisual/>");let i=P(e.width,"tblW");i&&n.push(i),e.justification&&n.push(`<w:jc w:val="${e.justification}"/>`);let o=P(e.cellSpacing,"tblCellSpacing");o&&n.push(o);let l=P(e.indent,"tblInd");l&&n.push(l);let c=pe(e.borders,"tblBorders");c&&n.push(c);let u=ue(e.cellMargins,"tblCellMar");u&&n.push(u),e.layout&&n.push(`<w:tblLayout w:type="${e.layout}"/>`);let f=fe(e.shading);f&&n.push(f);let p=qe(e.look);p&&n.push(p),e.overlap&&n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);}return t&&t.length>0&&n.push(Je(t[0])),n.length===0?"":`<w:tblPr>${n.join("")}</w:tblPr>`}function Ze(e){return !e.startsWith("<w:tblPr>")||!e.endsWith("</w:tblPr>")?"":e.slice(9,-10)}function Je(e){let t=b(e.info),n=he(e.previousFormatting)||"<w:tblPr/>",r=Ze(n),i=r.length>0?`<w:tblPr>${r}</w:tblPr>`:"<w:tblPr/>";return `<w:tblPrChange ${t}>${i}</w:tblPrChange>`}function we(e,t,n){let r=[];if(e){if(e.cantSplit&&r.push("<w:cantSplit/>"),e.header&&r.push("<w:tblHeader/>"),e.height){let i=[`w:val="${s(e.height.value)}"`];e.heightRule&&i.push(`w:hRule="${e.heightRule}"`),r.push(`<w:trHeight ${i.join(" ")}/>`);}e.justification&&r.push(`<w:jc w:val="${e.justification}"/>`),e.hidden&&r.push("<w:hidden/>");}return n&&(n.type==="tableRowInsertion"?r.push(`<w:ins ${b(n.info)}/>`):n.type==="tableRowDeletion"&&r.push(`<w:del ${b(n.info)}/>`)),t&&t.length>0&&r.push(Qe(t[0])),r.length===0?"":`<w:trPr>${r.join("")}</w:trPr>`}function Ke(e){return !e.startsWith("<w:trPr>")||!e.endsWith("</w:trPr>")?"":e.slice(8,-9)}function Qe(e){let t=b(e.info),n=we(e.previousFormatting)||"<w:trPr/>",r=Ke(n),i=r.length>0?`<w:trPr>${r}</w:trPr>`:"<w:trPr/>";return `<w:trPrChange ${t}>${i}</w:trPrChange>`}function et(e){if(!e)return "";let n=[e.firstRow?"1":"0",e.lastRow?"1":"0",e.firstColumn?"1":"0",e.lastColumn?"1":"0",e.oddVBand?"1":"0",e.evenVBand?"1":"0",e.oddHBand?"1":"0",e.evenHBand?"1":"0",e.nwCell?"1":"0",e.neCell?"1":"0",e.swCell?"1":"0",e.seCell?"1":"0"].join("");return n==="000000000000"?"":`<w:cnfStyle w:val="${n}"/>`}function de(e,t,n){let r=[];if(e){let i=et(e.conditionalFormat);i&&r.push(i);let o=P(e.width,"tcW");o&&r.push(o),e.gridSpan&&e.gridSpan>1&&r.push(`<w:gridSpan w:val="${s(e.gridSpan)}"/>`),e.vMerge&&(e.vMerge==="restart"?r.push('<w:vMerge w:val="restart"/>'):r.push("<w:vMerge/>"));let l=pe(e.borders,"tcBorders");l&&r.push(l);let c=fe(e.shading);c&&r.push(c),e.noWrap&&r.push("<w:noWrap/>");let u=ue(e.margins,"tcMar");u&&r.push(u),e.textDirection&&r.push(`<w:textDirection w:val="${e.textDirection}"/>`),e.fitText&&r.push("<w:tcFitText/>"),e.verticalAlign&&r.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.hideMark&&r.push("<w:hideMark/>");}if(n){if(n.type==="tableCellInsertion")r.push(`<w:cellIns ${b(n.info)}/>`);else if(n.type==="tableCellDeletion")r.push(`<w:cellDel ${b(n.info)}/>`);else if(n.type==="tableCellMerge"){let i=n.vMerge?` w:vMerge="${n.vMerge}"`:"",o=n.vMergeOrig?` w:vMergeOrig="${n.vMergeOrig}"`:"";r.push(`<w:cellMerge ${b(n.info)}${i}${o}/>`);}}return t&&t.length>0&&r.push(nt(t[0])),r.length===0?"":`<w:tcPr>${r.join("")}</w:tcPr>`}function tt(e){return !e.startsWith("<w:tcPr>")||!e.endsWith("</w:tcPr>")?"":e.slice(8,-9)}function nt(e){let t=b(e.info),n=de(e.previousFormatting)||"<w:tcPr/>",r=tt(n),i=r.length>0?`<w:tcPr>${r}</w:tcPr>`:"<w:tcPr/>";return `<w:tcPrChange ${t}>${i}</w:tcPrChange>`}function rt(e){return !e||e.length===0?"":`<w:tblGrid>${e.map(n=>`<w:gridCol w:w="${s(n)}"/>`).join("")}</w:tblGrid>`}function it(e){let t=[];for(let n of e)n.type==="paragraph"?t.push(y(n)):n.type==="table"&&t.push(S(n));return t.length===0&&t.push("<w:p/>"),t.join("")}function ot(e){let t=[],n=de(e.formatting,e.propertyChanges,e.structuralChange);return n&&t.push(n),t.push(it(e.content)),`<w:tc>${t.join("")}</w:tc>`}function st(e){let t=[],n=we(e.formatting,e.propertyChanges,e.structuralChange);n&&t.push(n);for(let r of e.cells)t.push(ot(r));return `<w:tr>${t.join("")}</w:tr>`}function S(e){let t=[],n=he(e.formatting,e.propertyChanges);n&&t.push(n);let r=rt(e.columnWidths);r&&t.push(r);for(let i of e.rows)t.push(st(i));return `<w:tbl>${t.join("")}</w:tbl>`}function R(e,t){let n=e.content.map(t).join(""),r=e.properties.rawPropertiesXml??"",i=e.properties.rawEndPropertiesXml??"";return `<w:sdt>${r}${i}<w:sdtContent>${n}</w:sdtContent></w:sdt>`}var h={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function at(){let e={wpc:h.wpc,mc:h.mc,o:h.o,r:h.r,m:h.m,v:h.v,wp14:h.wp14,wp:h.wp,w10:h.w10,w:h.w,w14:h.w14,w15:h.w15,w16se:h.w16se,w16cid:h.w16cid,w16:h.w16,w16cex:h.w16cex,w16sdtdh:h.w16sdtdh,wne:h.wne,wpg:h.wpg,wps:h.wps};return Object.entries(e).map(([t,n])=>`xmlns:${t}="${n}"`).join(" ")}function I(e,t){if(!e||e.style==="none"||e.style==="nil")return "";let n=[`w:val="${e.style}"`];return e.size!==void 0&&n.push(`w:sz="${s(e.size)}"`),e.space!==void 0&&n.push(`w:space="${s(e.space)}"`),e.color&&(e.color.auto?n.push('w:color="auto"'):e.color.rgb&&n.push(`w:color="${e.color.rgb}"`),e.color.themeColor&&n.push(`w:themeColor="${e.color.themeColor}"`),e.color.themeTint&&n.push(`w:themeTint="${e.color.themeTint}"`),e.color.themeShade&&n.push(`w:themeShade="${e.color.themeShade}"`)),e.shadow&&n.push('w:shadow="true"'),e.frame&&n.push('w:frame="true"'),`<w:${t} ${n.join(" ")}/>`}function ct(e){return `<w:headerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function lt(e){return `<w:footerReference ${[`w:type="${e.type}"`,`r:id="${e.rId}"`].join(" ")}/>`}function pt(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:footnotePr>${t.join("")}</w:footnotePr>`}function ut(e){if(!e)return "";let t=[];return e.position&&t.push(`<w:pos w:val="${e.position}"/>`),e.numFmt&&t.push(`<w:numFmt w:val="${e.numFmt}"/>`),e.numStart!==void 0&&t.push(`<w:numStart w:val="${e.numStart}"/>`),e.numRestart&&t.push(`<w:numRestart w:val="${e.numRestart}"/>`),t.length===0?"":`<w:endnotePr>${t.join("")}</w:endnotePr>`}function ft(e){let t=[];return e.pageWidth!==void 0&&t.push(`w:w="${s(e.pageWidth)}"`),e.pageHeight!==void 0&&t.push(`w:h="${s(e.pageHeight)}"`),e.orientation==="landscape"&&t.push('w:orient="landscape"'),t.length===0?"":`<w:pgSz ${t.join(" ")}/>`}function ht(e){let t=[];return e.marginTop!==void 0&&t.push(`w:top="${s(e.marginTop)}"`),e.marginRight!==void 0&&t.push(`w:right="${s(e.marginRight)}"`),e.marginBottom!==void 0&&t.push(`w:bottom="${s(e.marginBottom)}"`),e.marginLeft!==void 0&&t.push(`w:left="${s(e.marginLeft)}"`),e.headerDistance!==void 0&&t.push(`w:header="${s(e.headerDistance)}"`),e.footerDistance!==void 0&&t.push(`w:footer="${s(e.footerDistance)}"`),e.gutter!==void 0&&t.push(`w:gutter="${s(e.gutter)}"`),t.length===0?"":`<w:pgMar ${t.join(" ")}/>`}function wt(e){if(!e.columnCount&&!e.columns?.length)return "";let t=[];e.columnCount!==void 0&&e.columnCount>1&&t.push(`w:num="${s(e.columnCount)}"`),e.columnSpace!==void 0&&t.push(`w:space="${s(e.columnSpace)}"`),e.equalWidth!==void 0&&t.push(`w:equalWidth="${e.equalWidth?"1":"0"}"`),e.separator&&t.push('w:sep="1"');let n="";return e.columns&&e.columns.length>0&&(n=e.columns.map(i=>{let o=[];return i.width!==void 0&&o.push(`w:w="${s(i.width)}"`),i.space!==void 0&&o.push(`w:space="${s(i.space)}"`),`<w:col ${o.join(" ")}/>`}).join("")),t.length===0&&!n?"":`<w:cols${t.length>0?" "+t.join(" "):""}>${n}</w:cols>`}function dt(e){if(!e.lineNumbers)return "";let t=e.lineNumbers,n=[];return t.countBy!==void 0&&n.push(`w:countBy="${s(t.countBy)}"`),t.start!==void 0&&n.push(`w:start="${s(t.start)}"`),t.distance!==void 0&&n.push(`w:distance="${s(t.distance)}"`),t.restart&&n.push(`w:restart="${t.restart}"`),n.length===0?"":`<w:lnNumType ${n.join(" ")}/>`}function mt(e){if(!e.pageBorders)return "";let t=e.pageBorders,n=[],r=[];if(t.display&&n.push(`w:display="${t.display}"`),t.offsetFrom&&n.push(`w:offsetFrom="${t.offsetFrom}"`),t.zOrder&&n.push(`w:zOrder="${t.zOrder}"`),t.top){let o=I(t.top,"top");o&&r.push(o);}if(t.left){let o=I(t.left,"left");o&&r.push(o);}if(t.bottom){let o=I(t.bottom,"bottom");o&&r.push(o);}if(t.right){let o=I(t.right,"right");o&&r.push(o);}return r.length===0?"":`<w:pgBorders${n.length>0?" "+n.join(" "):""}>${r.join("")}</w:pgBorders>`}function gt(e){if(!e.docGrid)return "";let t=e.docGrid,n=[];return t.type&&n.push(`w:type="${t.type}"`),t.linePitch!==void 0&&n.push(`w:linePitch="${t.linePitch}"`),t.charSpace!==void 0&&n.push(`w:charSpace="${t.charSpace}"`),n.length===0?"":`<w:docGrid ${n.join(" ")}/>`}function $t(e){if(!e)return "";let t=[];if(e.headerReferences)for(let p of e.headerReferences)t.push(ct(p));if(e.footerReferences)for(let p of e.footerReferences)t.push(lt(p));let n=pt(e.footnotePr);n&&t.push(n);let r=ut(e.endnotePr);r&&t.push(r),e.sectionStart&&t.push(`<w:type w:val="${e.sectionStart}"/>`);let i=ft(e);i&&t.push(i);let o=ht(e);if(o&&t.push(o),e.paperSrcFirst!==void 0||e.paperSrcOther!==void 0){let p=[];e.paperSrcFirst!==void 0&&p.push(`w:first="${e.paperSrcFirst}"`),e.paperSrcOther!==void 0&&p.push(`w:other="${e.paperSrcOther}"`),t.push(`<w:paperSrc ${p.join(" ")}/>`);}let l=mt(e);l&&t.push(l);let c=dt(e);c&&t.push(c);let u=wt(e);u&&t.push(u);let f=gt(e);return f&&t.push(f),e.verticalAlign&&t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`),e.bidi&&t.push("<w:bidi/>"),e.titlePg&&t.push("<w:titlePg/>"),e.evenAndOddHeaders&&t.push("<w:evenAndOddHeaders/>"),t.length===0?"":`<w:sectPr>${t.join("")}</w:sectPr>`}function me(e){return e.type==="paragraph"?y(e):e.type==="table"?S(e):e.type==="blockSdt"?R(e,me):""}function xt(e){return e.map(t=>me(t)).join("")}function yt(e){let t=[];return t.push(xt(e.content)),e.finalSectionProperties&&t.push($t(e.finalSectionProperties)),t.join("")}function Jt(e){H();let t=[];t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');let n=at();return t.push(`<w:document ${n} mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14">`),t.push("<w:body>"),t.push(yt(e.package.document)),t.push("</w:body>"),t.push("</w:document>"),t.join("")}var Pt={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"};function bt(){return Object.entries(Pt).map(([e,t])=>`xmlns:${e}="${t}"`).join(" ")}function ge(e){return e.type==="paragraph"?y(e):e.type==="table"?S(e):e.type==="blockSdt"?R(e,ge):""}function nn(e){let t=e.type==="header"?"w:hdr":"w:ftr",n=bt(),r=e.content.map(i=>ge(i)).join("");return r||(r="<w:p><w:pPr/></w:p>"),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
-
<${t} ${n}>${r}</${t}>`}var k='xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',j='mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';function Pe(e){let t="<w:r>",n=[];e.formatting?.bold&&n.push("<w:b/>"),e.formatting?.italic&&n.push("<w:i/>"),n.length>0&&(t+=`<w:rPr>${n.join("")}</w:rPr>`);for(let r of e.content)if(r.type==="text"){let i=r.text!==r.text.trim()||r.text.includes(" ");t+=i?`<w:t xml:space="preserve">${a(r.text)}</w:t>`:`<w:t>${a(r.text)}</w:t>`;}else r.type==="break"&&(t+="<w:br/>");return t+="</w:r>",t}function $e(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";for(let r of e.content)r.type==="run"&&(n+=Pe(r));return n+="</w:p>",n}function xe(e,t){let n=t?`<w:p w14:paraId="${t}">`:"<w:p>";n+='<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';for(let r of e.content)r.type==="run"&&(n+=Pe(r));return n+="</w:p>",n}function ye(e,t){let n=chunkC2BAPYGJ_js.a(),r=[`w:id="${e.id}"`];if(e.author&&r.push(`w:author="${a(e.author)}"`),e.initials?r.push(`w:initials="${a(e.initials)}"`):r.push('w:initials=""'),e.date){let o=e.date.replace(/\.\d{3}Z$/,"Z");r.push(`w:date="${a(o)}"`);}let i=`<w:comment ${r.join(" ")}>`;if(e.content&&e.content.length>0)if(e.content.length===1)i+=xe(e.content[0],n);else {i+=xe(e.content[0]);for(let o=1;o<e.content.length-1;o++)i+=$e(e.content[o]);i+=$e(e.content[e.content.length-1],n);}else i+=`<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;return i+="</w:comment>",t.push({commentId:e.id,lastParaId:n,durableId:chunkC2BAPYGJ_js.a(),parentId:e.parentId,done:e.done}),i}function Ct(e){if(!e||e.length===0)return {xml:"",paraInfos:[]};let t=[],n=[];for(let o of e)(o.parentId==null?t:n).push(o);let r=[],i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${k} ${j}>`;for(let o of t)i+=ye(o,r);for(let o of n)i+=ye(o,r);return i+="</w:comments>",{xml:i,paraInfos:r}}function an(e){return Ct(e).xml}function cn(e){if(e.length===0)return "";let t=new Map;for(let r of e)t.set(r.commentId,r.lastParaId);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${k} ${j}>`;for(let r of e){let i=`w15:paraId="${r.lastParaId}" w15:done="${r.done?"1":"0"}"`;if(r.parentId!=null){let o=t.get(r.parentId);o&&(i+=` w15:paraIdParent="${o}"`);}n+=`<w15:commentEx ${i} />`;}return n+="</w15:commentsEx>",n}function ln(e){if(e.length===0)return "";let t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${k} ${j}>`;for(let n of e)t+=`<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;return t+="</w16cid:commentsIds>",t}function pn(e,t){if(e.length===0)return "";let n=new Map;for(let i of t)n.set(i.id,i);let r=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${k} ${j}>`;for(let i of e){let o=n.get(i.commentId);if(!o?.date)continue;let l=i.durableId,c=(o.date.endsWith("Z")?o.date:o.date+"Z").replace(/\.\d{3}Z$/,"Z");r+=`<w16cex:commentExtensible w16cex:durableId="${l}" w16cex:dateUtc="${c}"/>`;}return r+="</w16cex:commentsExtensible>",r}
|
|
3
|
-
exports.a=a;exports.b=x;exports.c=y;exports.d=S;exports.e=$t;exports.f=yt;exports.g=Jt;exports.h=nn;exports.i=Ct;exports.j=an;exports.k=cn;exports.l=ln;exports.m=pn;
|
package/dist/chunk-LTHT4A4S.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkIMKU4O3P_js=require('./chunk-IMKU4O3P.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunk44FHVKSI_js=require('./chunk-44FHVKSI.js'),chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkN3Y5BUKV_js=require('./chunk-N3Y5BUKV.js');function $(e,t,n,i){let a=e-t-n,r=(i.count-1)*i.gap;return (a-r)/i.count}function ce(e){let t={...e.pageSize},n={...e.margins},i=e.columns??{count:1,gap:0},a=false,r,o,s=[],l=[];function c(){return t.h-n.bottom}function m(){return c()-n.top}function f(){return t.w-n.left-n.right}if(m()<=0)throw new Error("Paginator: page size and margins yield no content area");let S=$(t.w,n.left,n.right,i),T=n.top;function M(h){return n.left+h*(S+i.gap)}function x(){(r||o)&&(r&&(t=r),o&&(n=o),r=void 0,o=void 0,S=$(t.w,n.left,n.right,i));let h=s.length+1,P=n.top,E=c(),g=e.footnoteReservedHeights?.get(h)??0,p=E-g,b={number:h,fragments:[],margins:{...n},size:{...t},footnoteReservedHeight:g>0?g:void 0,columns:i.count>1?{...i}:void 0},d={page:b,cursorY:P,columnIndex:0,topMargin:P,contentBottom:p,trailingSpacing:0};return s.push(b),l.push(d),T=P,e.onNewPage&&e.onNewPage(d),d}function B(){return l.length===0?x():l[l.length-1]}function F(h){return h.contentBottom-h.cursorY}function w(h,P){let E=P||B();return F(E)>=h}function R(h){return h.columnIndex<i.count-1?(h.columnIndex+=1,h.cursorY=T,h.trailingSpacing=0,h):x()}function C(h){let P=B(),E=Number.isFinite(h)&&h>0?h:0;for(;!w(E,P);){let g=P.contentBottom-P.topMargin;if(E>g)return a||(a=true,console.warn(`Paginator: fragment height ${E.toFixed(0)}px exceeds page content height ${g.toFixed(0)}px; placing with overflow.`)),P.cursorY!==P.topMargin&&(P=R(P)),P;P=R(P);}return P}function L(h,P,E=0,g=0){let p=Math.max(E,B().trailingSpacing),b=p+P,d=C(b),y=p,z=M(d.columnIndex),I=d.cursorY+y;return h.x=z,h.y=I,d.page.fragments.push(h),d.cursorY=I+P,d.trailingSpacing=g,{state:d,x:z,y:I}}function u(){if(l.length>0){let h=l[l.length-1];if(h.page.fragments.length===0&&h.cursorY===h.topMargin)return h}return x()}function v(){let h=B();return R(h)}function Z(h){i=h,S=$(t.w,n.left,n.right,i);let P=B();P.page.columns=i.count>1?{...i}:void 0,T=P.cursorY,P.columnIndex=0;}function W(h,P,E=true){if(!E){r=h?{...h}:r,o=P?{...P}:o;return}if(h&&(t={...h}),P&&(n={...P}),m()<=0)throw new Error("Paginator: section page size and margins yield no content area");S=$(t.w,n.left,n.right,i),r=void 0,o=void 0;}return {pages:s,states:l,get columnWidth(){return S},get columns(){return {...i}},getCurrentState:B,getAvailableHeight:()=>F(B()),getContentWidth:f,fits:h=>w(h),ensureFits:C,addFragment:L,forcePageBreak:u,forceColumnBreak:v,getColumnX:M,updateColumns:Z,updatePageLayout:W}}function ge(e){let t=new Map,n=new Set;for(let i=0;i<e.length;i++){if(n.has(i))continue;let a=e[i];if(a.kind!=="paragraph"||!a.attrs?.keepNext)continue;let o=[i],s=i;for(let m=i+1;m<e.length;m++){let f=e[m];if(f.kind==="sectionBreak"||f.kind==="pageBreak"||f.kind==="columnBreak"||f.kind!=="paragraph")break;if(f.attrs?.keepNext)o.push(m),s=m,n.add(m);else break}let l=s+1,c=-1;if(l<e.length){let m=e[l];m.kind!=="sectionBreak"&&m.kind!=="pageBreak"&&m.kind!=="columnBreak"&&(c=l);}t.set(i,{startIndex:i,endIndex:s,memberIndices:o,anchorIndex:c});}return t}function fe(e,t,n){let i=0;for(let a of e.memberIndices){let r=t[a],o=n[a];if(r.kind!=="paragraph"||o.kind!=="paragraph")continue;let s=r,l=o,c=s.attrs?.spacing?.before??0;i+=c,i+=l.totalHeight;let m=s.attrs?.spacing?.after??0;i+=m;}if(e.anchorIndex!==-1){let a=n[e.anchorIndex];if(a?.kind==="paragraph"){let r=a;r.lines.length>0&&(i+=r.lines[0].lineHeight);}}return i}function me(e){let t=new Set;for(let n of e.values())for(let i=1;i<n.memberIndices.length;i++)t.add(n.memberIndices[i]);return t}function $e(e){return e.kind!=="paragraph"?false:e.attrs?.keepLines===true}function pe(e){return e.kind!=="paragraph"?false:e.attrs?.pageBreakBefore===true}function q(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)}function qe(e){return q(e)&&!chunkJFZIXFRC_js.b(e.wrapType)&&e.wrapType!=="topAndBottom"}var Je=1440,de=96,Ce=Je/de,we=11,Le="Calibri",Qe=1,et=.8,tt=.2,j=null;function he(){if(!j){let e=typeof document<"u"?document.createElement("canvas"):null;if(!e)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(j=e.getContext("2d"),!j)throw new Error("Failed to get 2D context from canvas")}return j}function Yt(){j=null;}var Be=new Map;function Re(e){let t=Be.get(e);if(t===void 0){let n=chunkN3Y5BUKV_js.a(e);t={cssFallback:n.cssFallback,singleLineRatio:n.singleLineRatio},Be.set(e,t);}return t}function nt(e){return Re(e).cssFallback}function be(e){let t=[];e.italic&&t.push("italic"),e.bold&&t.push("bold");let n=e.fontSize??we,i=N(n);t.push(`${i}px`);let a=e.fontFamily??Le;return t.push(nt(a)),t.join(" ")}function K(e){let t=e.fontSize??we,n=e.fontFamily??Le,i=N(t),a=i*et,r=i*tt,o=i*Qe;try{let l=he();l.font=be(e);let c=l.measureText("Hg");typeof c.actualBoundingBoxAscent=="number"&&typeof c.actualBoundingBoxDescent=="number"&&(a=c.actualBoundingBoxAscent,r=c.actualBoundingBoxDescent);}catch{}o=Math.max(o,a+r);let s=Re(n).singleLineRatio;return {fontSize:t,ascent:a,descent:r,lineHeight:o,fontFamily:n,singleLineRatio:s}}function _(e,t){if(!e)return 0;let n=he();n.font=be(t);let a=n.measureText(e).width;return t.letterSpacing&&e.length>1&&(a+=t.letterSpacing*(e.length-1)),a}function Zt(e,t){let n=_(e,t),i=K(t);return {width:n,height:i.ascent+i.descent,ascent:i.ascent,descent:i.descent}}function ve(e,t){let n=K(t);if(!e)return {width:0,charWidths:[],metrics:n};let i=he();i.font=be(t);let a=t.letterSpacing??0,r=[],o=0;for(let s=0;s<e.length;s++){let l=e[s],m=i.measureText(l).width;a&&s<e.length-1&&(m+=a),r.push(m),o+=m;}return {width:o,charWidths:r,metrics:n}}function Ut(e,t){if(t.length===0||e<=0)return 0;let n=0;for(let i=0;i<t.length;i++){let a=t[i],r=n+a/2;if(e<=r)return i;n+=a;}return t.length}function Xt(e,t){if(e<=0||t.length===0)return 0;let n=Math.min(e,t.length),i=0;for(let a=0;a<n;a++)i+=t[a];return i}function Gt(e){return e/Ce}function jt(e){return Math.round(e*Ce)}function N(e){return e*de/72}function it(e){return e*72/de}function Kt(e){return N(e/2)}function Vt(e){return it(e)*2}function xe(e){return e/1440*96}function Se(e){return e/96*1440}function at(e){let{explicitStops:t=[],defaultTabInterval:n=720,leftIndent:i=0}=e,a=t.filter(f=>f.val!=="clear").filter(f=>f.pos>=i),r=t.filter(f=>f.val==="clear").map(f=>f.pos),o=a.reduce((f,S)=>Math.max(f,S.pos),0),s=[...a];i>0&&!a.some(f=>f.pos<=i)&&(r.some(S=>Math.abs(S-i)<20)||s.push({val:"start",pos:i,leader:"none"}));let c=o>0?Math.max(o,i):i,m=i+14400;for(;c<m;){c+=n;let f=a.some(M=>Math.abs(M.pos-c)<20),S=r.some(M=>Math.abs(M-c)<20),T=i>0&&Math.abs(c-i)<20;!f&&!S&&!T&&s.push({val:"start",pos:c,leader:"none"});}return s.sort((f,S)=>f.pos-S.pos)}function Ie(e,t,n={}){let{defaultTabInterval:i=720}=t,a=Se(e),o=at(t).find(c=>c.pos>a);if(!o){let c=xe(i),m=c-e%c;return m<=0&&(m=c),{width:m,alignment:"default"}}let l=xe(o.pos)-e;if(o.val==="center")l-=(n.followingWidth??0)/2;else if(o.val==="end")l-=n.followingWidth??0;else if(o.val==="decimal")l-=n.decimalPrefixWidth??0;else if(o.val==="bar")return {width:0,leader:o.leader,alignment:"bar"};if(l<1){let c=xe(i),m=c-e%c;return m<=0&&(m=c),{width:m,alignment:"default"}}return {width:l,leader:o.leader,alignment:o.val}}var rt="Calibri",ot=11;function st(e){let t=e.attrs,n=e.runs?.find(r=>r.kind==="text"),i=t?.listMarkerFontFamily??n?.fontFamily??t?.defaultFontFamily??rt,a=t?.listMarkerFontSize??n?.fontSize??t?.defaultFontSize??ot;return {fontFamily:i,fontSize:a}}function ke(e){let t=e.attrs;if(!t?.listMarker||t.listMarkerHidden)return 0;let n=t.indent,i=n?.hanging??0;if(i>0)return i;let{fontFamily:a,fontSize:r}=st(e),o={fontFamily:a,fontSize:r},s=_(t.listMarker,o),l=t.listMarkerSuffix??"tab";if(l==="nothing")return s;if(l==="space")return s+_(" ",o);let c=n?.left??0,m=n?.firstLine??0,f=c+m,S=f+s,T=(t.tabs??[]).filter(F=>F.val!=="clear"&&F.val!=="bar").map(F=>chunkIMKU4O3P_js.a(F.pos)).filter(F=>F>=S).sort((F,w)=>F-w)[0],M=chunkIMKU4O3P_js.a(t.defaultTabStopTwips??chunk44FHVKSI_js.a),x=M>0?(Math.floor(S/M)+1)*M:void 0,B;return T!==void 0&&x!==void 0?B=Math.min(T,x):B=T??x,B===void 0?s+N(r)*.5:B-f}var D=11,X="Calibri",ut=1.15,te=1,Y=.5;function Ee(e,t,n,i=false){let a=1,r=e.length,o=0;for(;a<=r;){let s=a+r>>>1;_(e.slice(0,s),t)<=n?(o=s,a=s+1):r=s-1;}return i&&o===0?1:o}function V(e){return {fontFamily:e.fontFamily??X,fontSize:e.fontSize??D,bold:e.bold,italic:e.italic,letterSpacing:e.letterSpacing}}function Ae(e,t,n){let i=N(e),a=n?.ascent??i*.8,r=n?.descent??i*.2,o=n?.singleLineRatio??1.15,s=i*o,l;if(t?.lineRule==="exact"&&t.line!==void 0)l=t.line;else if(t?.lineRule==="atLeast"&&t.line!==void 0){let c=s*te;l=Math.max(t.line,c);}else t?.line!==void 0&&t?.lineUnit==="multiplier"?l=s*t.line:t?.line!==void 0&&t?.lineUnit==="px"?l=t.line:l=s*te;return {ascent:a,descent:r,lineHeight:l}}function We(e,t,n){let i=K({fontSize:e,fontFamily:n??X}),a=Ae(e,t,i),r=t?.lineRule??"auto";if(r==="auto"||r==="atLeast"){let o=N(e),s=Math.max(a.lineHeight,o*ut);if(s!==a.lineHeight)return {...a,lineHeight:s}}return a}function J(e){return e.kind==="text"}function _e(e){return e.kind==="tab"}function Oe(e){return e.kind==="image"}function ze(e){return e.kind==="lineBreak"}function Ne(e){return e.kind==="field"}function lt(e){return !e.text||e.text.replace(/\u00a0/g," ").trim().length===0}function ct(e,t){let n=0;for(let i=t+1;i<e.length;i++){let a=e[i];if(_e(a)||ze(a))break;if(J(a))n+=_(a.text||"",V(a));else if(Ne(a)){let r={fontFamily:a.fontFamily??X,fontSize:a.fontSize??D,bold:a.bold,italic:a.italic};n+=_(a.fallback||"1",r);}else Oe(a)&&(n+=a.width||0);}return n}function gt(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];(i===" "||i==="-"||i===" ")&&t.push(n+1);}return t}function De(e,t,n){let i=Math.max(1,n),a=Math.max(0,e),r=Math.max(0,t);return a>=i||r>=i||a+r>=i?{leftMargin:0,rightMargin:0}:{leftMargin:a,rightMargin:r}}function ft(e,t,n){let i=e.runs,a=e.attrs,r=a?.spacing,o=n?.floatingZones,s=n?.paragraphYOffset??0,l=a?.indent,c=l?.left??0,m=l?.right??0,f=(l?.firstLine??0)-(l?.hanging??0),S=Math.max(1,t-c-m),T=(l?.hanging??0)===0?ke(e):0,M=Math.max(1,S-f-T),x=0,B=0,F=N(D)*te,w=(g,p)=>{if(!o||o.length===0)return;let b=s+x,d=He(b,g,o,p,U)-b;d>0&&(x+=d,B+=d);};w(F,M);let R=ee(x,F,o,s),C=Math.max(1,Q(R,M)),L=[];if(i.length===0){if(a?.suppressEmptyParagraphHeight)return L.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:L,totalHeight:0};let g=a?.defaultFontSize??D,p=a?.defaultFontFamily??X,b=We(g,r,p);L.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...b});let d=b.lineHeight;return r?.before&&(d+=r.before),r?.after&&(d+=r.after),{kind:"paragraph",lines:L,totalHeight:d}}if(i.length===1&&J(i[0])&<(i[0])){let g=i[0],p=g.fontSize??a?.defaultFontSize??D,b=g.fontFamily??a?.defaultFontFamily??X,d=We(p,r,b);L.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...d});let y=d.lineHeight;return r?.before&&(y+=r.before),r?.after&&(y+=r.after),{kind:"paragraph",lines:L,totalHeight:y}}let u={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:C,leftOffset:R.leftMargin,rightOffset:R.rightMargin,segmentZones:R.segments},v=()=>{let g=Ae(u.maxFontSize,r,u.maxFontMetrics),p={...g};if(u.maxImageHeightPx>p.lineHeight){let d=u.maxImageHeightPx,y=p.descent;u.fromRun===u.toRun?(p.lineHeight=d+y*2,p.ascent=d+y):(p.lineHeight=d+y,p.ascent=d);}let b={fromRun:u.fromRun,fromChar:u.fromChar,toRun:u.toRun,toChar:u.toChar,width:u.width,...p};u.leftOffset>0&&(b.leftOffset=u.leftOffset),u.rightOffset>0&&(b.rightOffset=u.rightOffset),u.segmentZones?.length&&(b.segments=Z(b,u.segmentZones)),B>0&&(b.floatSkipBefore=B,B=0),L.push(b),x+=g.lineHeight;},Z=(g,p)=>{let b=p[0],d=p[1];if(!b)return;if(!d||g.width<=b.availableWidth+Y)return [{fromRun:g.fromRun,fromChar:g.fromChar,toRun:g.toRun,toChar:g.toChar,width:g.width,leftOffset:b.leftOffset,availableWidth:b.availableWidth}];if(g.fromRun!==g.toRun)return;let y=i[g.fromRun];if(!y||!J(y))return;let z=y,I=z.text.slice(g.fromChar,g.toChar),H=V(z),k=Ee(I,H,b.availableWidth);if(k<=0||k>=I.length)return;let O=g.fromChar+k,A=I.slice(0,k),ie=I.slice(k);return [{fromRun:g.fromRun,fromChar:g.fromChar,toRun:g.toRun,toChar:O,width:_(A,H),leftOffset:b.leftOffset,availableWidth:b.availableWidth},{fromRun:g.fromRun,fromChar:O,toRun:g.toRun,toChar:g.toChar,width:_(ie,H),leftOffset:d.leftOffset,availableWidth:d.availableWidth}]},W=(g,p)=>{v();let b=N(D)*te;w(b,S);let d=ee(x,b,o,s),y=Math.max(1,Q(d,S));u={fromRun:g,fromChar:p,toRun:g,toChar:p,width:0,maxFontSize:D,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:y,leftOffset:d.leftMargin,rightOffset:d.rightMargin,segmentZones:d.segments};},h=g=>{let p=g.fontSize??D;(!u.maxFontMetrics||p>u.maxFontSize)&&(u.maxFontSize=p,u.maxFontMetrics=K(g));};for(let g=0;g<i.length;g++){let p=i[g];if(ze(p)){u.toRun=g,u.toChar=0,W(g+1,0);continue}if(_e(p)){let b=V(p);h(b);let d=ct(i,g),y=u.width+(u.leftOffset??0),z=L.length===0,I=c+(z?f:0)+y,H={explicitStops:a?.tabs,leftIndent:Se(c)},k=Ie(I,H,{followingWidth:d}).width;if(y+k>u.availableWidth+Y){let O=u.availableWidth-y-d;O>1&&(k=O);}u.width+k>u.availableWidth+Y&&(W(g,0),h(b)),u.width+=k,u.toRun=g,u.toChar=1;continue}if(Oe(p)){let b=p.wrapType,d=p.displayMode==="float"||chunkJFZIXFRC_js.c(b);if(p.position&&d){u.toRun=g,u.toChar=1;continue}if(b==="topAndBottom"||p.displayMode==="block"){u.width>0&&W(g,0);let H=p.height,k=p.distTop??6,O=p.distBottom??6;u.toRun=g,u.toChar=1,u.maxImageHeightPx=H+k+O,W(g+1,0);continue}let y=p.width,I=p.height+(p.distTop??0)+(p.distBottom??0);I>u.maxImageHeightPx&&(u.maxImageHeightPx=I),u.width+y>u.availableWidth+Y&&W(g,0),u.width+=y,u.toRun=g,u.toChar=1;continue}if(Ne(p)){let b=p.fallback||"1",d={fontFamily:p.fontFamily??X,fontSize:p.fontSize??D,bold:p.bold,italic:p.italic};h(d);let y=_(b,d);u.width>0&&u.width+y>u.availableWidth+Y&&(W(g,0),h(d)),u.width+=y,u.toRun=g,u.toChar=1;continue}if(J(p)){let b=p,d=b.text,y=V(b);if(h(y),!d||d.length===0){u.toRun=g,u.toChar=0;continue}let z=gt(d),I=0;for(;I<d.length;){let H=d.length;for(let A of z)if(A>I){H=A;break}let k=d.slice(I,H),O=_(k,y);if(O>u.availableWidth+Y){let A=0;for(;A<k.length;){let ie=u.availableWidth-u.width+Y,je=k.slice(A),ae=Ee(je,y,ie);if(ae===0){if(u.width>0){W(g,I+A),h(y);continue}ae=1;}let re=A+ae,Ke=k.slice(A,re),Ve=_(Ke,y);u.width+=Ve,u.toRun=g,u.toChar=I+re,A=re,A<k.length&&(W(g,I+A),h(y));}I=H;continue}u.width>0&&u.width+O>u.availableWidth+Y&&(W(g,I),h(y)),u.width+=O,u.toRun=g,u.toChar=H,I=H;}}}v();let E=L.reduce((g,p)=>g+p.lineHeight+(p.floatSkipBefore??0),0);return r?.before&&(E+=r.before),r?.after&&(E+=r.after),{kind:"paragraph",lines:L,totalHeight:E}}function ln(e,t){return e.map(n=>ft(n,t))}function cn(e){let t=V(e);return ve(e.text,t).charWidths}function mn(e,t){return e.map(n=>{let i=n.x-n.distLeft,a=n.x+n.width+n.distRight,r=n.y-n.distTop,o=n.y+n.height+n.distBottom,s=0,l=0,c,m=n.wrapText??"bothSides";m==="right"?s=Me(a):m==="left"?l=Te(i,t):m==="largest"?{leftMargin:s,rightMargin:l}=ht(i,a,t):pt(i,a,t)?c=dt(i,a,t):n.side==="left"?s=Me(a):l=Te(i,t);let f=De(s,l,t);return {leftMargin:f.leftMargin,rightMargin:f.rightMargin,topY:r,bottomY:o,segments:c}})}function Q(e,t){return e.segments?.reduce((i,a)=>i+a.availableWidth,0)??t-e.leftMargin-e.rightMargin}function ee(e,t,n,i){if(!n||n.length===0)return {leftMargin:0,rightMargin:0};let a=0,r=0,o,s=i+e,l=s+t;for(let c of n)if(!(l<=c.topY||s>=c.bottomY)){if(c.segments?.length){o=o?mt(o,c.segments):c.segments;continue}a=Math.max(a,c.leftMargin),r=Math.max(r,c.rightMargin);}return {leftMargin:a,rightMargin:r,segments:o}}function He(e,t,n,i,a){if(!n||n.length===0)return e;let r=e;for(let o=0;o<n.length+2;o++){let s=ee(r,t,n,0);if(Q(s,i)>=a)return r;let c=r+t,m=1/0;for(let f of n)c<=f.topY||r>=f.bottomY||f.bottomY>r&&f.bottomY<m&&(m=f.bottomY);if(!Number.isFinite(m)||m<=r)return r;r=m;}return r}function mt(e,t){let n=[];for(let i of e)for(let a of t){let r=Math.max(i.leftOffset,a.leftOffset),o=Math.min(i.leftOffset+i.availableWidth,a.leftOffset+a.availableWidth);o>r&&n.push({leftOffset:r,availableWidth:o-r});}return n}var U=24;function pt(e,t,n){return e>U&&t+U<n}function dt(e,t,n){return [{leftOffset:0,availableWidth:Math.max(0,e)},{leftOffset:Math.max(0,t),availableWidth:Math.max(0,n-t)}].filter(i=>i.availableWidth>1)}function ht(e,t,n){let i=Math.max(0,e);return Math.max(0,n-t)>=i?{leftMargin:Me(t),rightMargin:0}:{leftMargin:0,rightMargin:Te(e,n)}}function Me(e){return Math.max(0,e)}function Te(e,t){return Math.max(0,t-e)}var Ye={count:1,gap:0};function bt(e,t,n){return {activeTopMargin:e.top,activeBottomMargin:e.bottom,activeLeftMargin:e.left,activeRightMargin:e.right,pendingTopMargin:null,pendingBottomMargin:null,pendingLeftMargin:null,pendingRightMargin:null,activePageSize:{...t},pendingPageSize:null,activeColumns:n?{...n}:{...Ye},pendingColumns:null,activeOrientation:null,pendingOrientation:null,hasAnyPages:false}}function xt(e,t){return t.count>1}function ne(e){return e?{count:e.count,gap:e.gap}:{...Ye}}function St(e,t,n){let i={...t},a=e.type??"continuous",r=e.margins,o=e.pageSize,s=e.orientation;r&&(typeof r.top=="number"&&(i.pendingTopMargin=Math.max(0,r.top)),typeof r.bottom=="number"&&(i.pendingBottomMargin=Math.max(0,r.bottom)),typeof r.left=="number"&&(i.pendingLeftMargin=Math.max(0,r.left)),typeof r.right=="number"&&(i.pendingRightMargin=Math.max(0,r.right))),o&&(i.pendingPageSize={w:o.w,h:o.h}),s&&(i.pendingOrientation=s);let l=xt((e.margins,void 0),i.activeColumns);switch(a){case "nextPage":return i.pendingColumns=ne(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false},state:i};case "evenPage":return i.pendingColumns=ne(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"even"},state:i};case "oddPage":return i.pendingColumns=ne(void 0),{decision:{forcePageBreak:true,forceMidPageRegion:false,requiredParity:"odd"},state:i};default:return l?(i.pendingColumns=ne(void 0),{decision:{forcePageBreak:false,forceMidPageRegion:true},state:i}):{decision:{forcePageBreak:false,forceMidPageRegion:false},state:i}}}function Mt(e){let t={...e};return t.pendingTopMargin!==null&&(t.activeTopMargin=t.pendingTopMargin,t.pendingTopMargin=null),t.pendingBottomMargin!==null&&(t.activeBottomMargin=t.pendingBottomMargin,t.pendingBottomMargin=null),t.pendingLeftMargin!==null&&(t.activeLeftMargin=t.pendingLeftMargin,t.pendingLeftMargin=null),t.pendingRightMargin!==null&&(t.activeRightMargin=t.pendingRightMargin,t.pendingRightMargin=null),t.pendingPageSize!==null&&(t.activePageSize=t.pendingPageSize,t.pendingPageSize=null),t.pendingColumns!==null&&(t.activeColumns=t.pendingColumns,t.pendingColumns=null),t.pendingOrientation!==null&&(t.activeOrientation=t.pendingOrientation,t.pendingOrientation=null),t}function Tt(e){return {top:e.pendingTopMargin??e.activeTopMargin,bottom:e.pendingBottomMargin??e.activeBottomMargin,left:e.pendingLeftMargin??e.activeLeftMargin,right:e.pendingRightMargin??e.activeRightMargin}}function yt(e){return e.pendingPageSize??e.activePageSize}function Pt(e){return e.pendingColumns??e.activeColumns}function Ft(e,t){for(let n=0;n<e.pages.length;n++)for(let i of e.pages[n].fragments){if(i.pmStart==null)continue;let a=i.pmStart,r=i.pmEnd??a+1;if(t>=a&&t<r)return n}return null}var Bt={w:816,h:1056},G={top:96,right:96,bottom:96,left:96},Xe={count:1,gap:0};function Ct(e,t,n){let i=[],a=[],r=t;for(let o=0;o<e.length;o++){if(e[o].kind!=="sectionBreak")continue;let s=e[o],l={pageSize:s.pageSize??r.pageSize,margins:s.margins??r.margins,columns:s.columns};i.push(l),a.push(o),r=l;}return i.push(n),{configs:i,breakIndices:a}}function Ge(e){if(e.runs.length===0)return true;if(e.runs.length!==1)return false;let t=e.runs[0];return t.kind==="text"&&(t.text??"")===""}function Ze(e){let t=e.attrs?.spacing?.before??0;return Ge(e)&&!e.attrs?.spacingExplicit?.before?0:t}function Ue(e){let t=e.attrs?.spacing?.after??0;return Ge(e)&&!e.attrs?.spacingExplicit?.after?0:t}function wt(e){for(let t=0;t<e.length-1;t++){let n=e[t],i=e[t+1];if(n.kind!=="paragraph"||i.kind!=="paragraph")continue;let a=n.attrs,r=i.attrs;a?.contextualSpacing&&r?.contextualSpacing&&a.styleId&&a.styleId===r.styleId&&(a.spacing&&(a.spacing={...a.spacing,after:0}),r.spacing&&(r.spacing={...r.spacing,before:0}));}}function yn(e,t,n={}){if(e.length!==t.length)throw new Error(`layoutDocument: expected one measure per block (blocks=${e.length}, measures=${t.length})`);let i=n.pageSize??Bt,a={top:n.margins?.top??G.top,right:n.margins?.right??G.right,bottom:n.margins?.bottom??G.bottom,left:n.margins?.left??G.left,header:n.margins?.header??n.margins?.top??G.top,footer:n.margins?.footer??n.margins?.bottom??G.bottom};n.headerContentHeights,n.footerContentHeights,n.titlePage,n.evenAndOddHeaders;let r={...a},o=n.finalPageSize??i,s=n.finalMargins??r;if(i.w-r.left-r.right<=0)throw new Error("layoutDocument: page size and margins yield no content area");let c={pageSize:i,margins:r,columns:n.columns},m={pageSize:o,margins:s,columns:n.columns},{configs:f,breakIndices:S}=Ct(e,c,m),T=[...S.map(R=>e[R].type),n.bodyBreakType],M=f[0]??c,x=ce({pageSize:M.pageSize,margins:M.margins,columns:M.columns??Xe,footnoteReservedHeights:n.footnoteReservedHeights});wt(e);let B=ge(e),F=me(B),w=0;for(let R=0;R<e.length;R++){let C=e[R],L=t[R];pe(C)&&x.forcePageBreak();let u=B.get(R);if(u&&!F.has(R)){let v=fe(u,e,t),Z=x.getCurrentState(),W=x.getAvailableHeight(),h=Z.contentBottom-Z.topMargin;v<=h&&v>W&&Z.page.fragments.length>0&&x.forcePageBreak();}switch(C.kind){case "paragraph":Lt(C,L,x,x.getContentWidth());break;case "table":C.floating?kt(C,L,x,x.getContentWidth()):It(C,L,x);break;case "image":Et(C,L,x);break;case "textBox":Ht(C,L,x);break;case "pageBreak":x.forcePageBreak();break;case "columnBreak":x.forceColumnBreak();break;case "sectionBreak":{let v=T[w+1]??T[w];At(C,x,f[w+1]??M,v),w++;break}default:chunkDROCYKAR_js.c(C,"runLayoutPipeline");}}return x.pages.length===0&&x.getCurrentState(),{pageSize:i,pages:x.pages,columns:n.columns,pageGap:n.pageGap}}function Lt(e,t,n,i){if(t.kind!=="paragraph")throw new Error("layoutParagraph: expected paragraph measure");let a=t.lines;if(a.length===0){let l=Ze(e),c=Ue(e),m=n.getCurrentState(),f={kind:"paragraph",blockId:e.id,x:n.getColumnX(m.columnIndex),y:m.cursorY+l,width:i,height:0,fromLine:0,toLine:0,pmStart:e.pmStart,pmEnd:e.pmEnd};n.addFragment(f,0,l,c);return}let r=Ze(e),o=Ue(e),s=0;for(;s<a.length;){let l=n.getCurrentState(),c=n.getAvailableHeight(),m=0,f=0;for(let w=s;w<a.length;w++){let R=a[w].lineHeight+(a[w].floatSkipBefore??0),C=m+R;if((s===0&&w===s?C+r:C)<=c||f===0)m=C,f++;else break}let S=s===0,T=s+f>=a.length,M=S?r:0,x=T?o:0,B={kind:"paragraph",blockId:e.id,x:n.getColumnX(l.columnIndex),y:0,width:i,height:m,fromLine:s,toLine:s+f,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!S,continuesOnNext:!T},F=n.addFragment(B,m,M,x);B.y=F.y,s+=f,s<a.length&&n.ensureFits(a[s].lineHeight);}}function Rt(e){let t=0;for(let n of e.rows)if(n.isHeader)t++;else break;return t}function vt(e,t){let n=0;for(let i=0;i<t&&i<e.rows.length;i++)n+=e.rows[i].height;return n}function It(e,t,n){if(t.kind!=="table")throw new Error("layoutTable: expected table measure");let i=t.rows;if(i.length===0)return;let a=Rt(e),r=vt(t,a),o=0;for(;o<i.length;){let s=n.getCurrentState(),l=n.getAvailableHeight(),c=o===0,m=c?s.trailingSpacing:0,f=l-m,S=!c&&a>0?r:0,T=0,M=0;for(let C=o;C<i.length;C++){let L=i[C].height;if(T+L+S<=f||M===0)T+=L,M++;else break}let x=T+S,B=o+M>=i.length,F=n.getColumnX(s.columnIndex);e.justification==="center"?F=F+(n.columnWidth-t.totalWidth)/2:e.justification==="right"?F=F+n.columnWidth-t.totalWidth:e.indent&&(F+=e.indent);let w={kind:"table",blockId:e.id,x:F,y:0,width:t.totalWidth,height:x,fromRow:o,toRow:o+M,pmStart:e.pmStart,pmEnd:e.pmEnd,continuesFromPrev:!c,continuesOnNext:!B,headerRowCount:!c&&a>0?a:void 0},R=n.addFragment(w,x,0,0);if(w.y=R.y,w.x=F,o+=M,o<i.length){let C=i[o].height+(a>0?r:0);n.ensureFits(C);}}}function kt(e,t,n,i){if(t.kind!=="table")throw new Error("layoutFloatingTable: expected table measure");let a=n.getCurrentState(),r=e.floating,o=a.page,s=o.margins,l=t.totalWidth,c=t.totalHeight,m=o.size.h-s.top-s.bottom,f=s.left,S=s.top;r?.horzAnchor==="page"&&(f=0),r?.vertAnchor==="page"&&(S=0),r?.vertAnchor==="text"&&(S=a.cursorY);let T=n.getColumnX(a.columnIndex);if(r?.tblpX!==void 0)T=f+r.tblpX;else if(r?.tblpXSpec){let v=r.tblpXSpec;v==="left"||v==="inside"?T=f:v==="right"||v==="outside"?T=f+i-l:v==="center"&&(T=f+(i-l)/2);}else e.justification==="center"?T=f+(i-l)/2:e.justification==="right"&&(T=f+i-l);let M=a.cursorY,x=false;if(r?.tblpY!==void 0)M=S+r.tblpY,x=true;else if(r?.tblpYSpec){x=true;let v=r.tblpYSpec;v==="top"?M=S:v==="bottom"?M=S+m-c:v==="center"&&(M=S+(m-c)/2);}x||(M=n.ensureFits(c).cursorY);let B=s.left,F=s.left+i-l;Number.isFinite(F)&&(T=Math.max(B,Math.min(T,F)));let w={kind:"table",blockId:e.id,x:T,y:M,width:l,height:c,fromRow:0,toRow:e.rows.length,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true};a.page.fragments.push(w);let R=r?.leftFromText??0,C=r?.rightFromText??0,L=T-s.left-R,u=s.left+i-(T+l)-C;if(L<U&&u<U){let v=M+c+(r?.bottomFromText??0);v>a.cursorY&&(a.cursorY=v);}}function Et(e,t,n){if(t.kind!=="image")throw new Error("layoutImage: expected image measure");if(e.anchor?.isAnchored){Wt(e,t,n);return}let i=n.ensureFits(t.height),a={kind:"image",blockId:e.id,x:n.getColumnX(i.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(a,t.height,0,0);a.y=r.y;}function Wt(e,t,n){let i=n.getCurrentState(),a=e.anchor,r=a.offsetH??n.getColumnX(i.columnIndex),o=a.offsetV??i.cursorY,s={kind:"image",blockId:e.id,x:r,y:o,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isAnchored:true,zIndex:a.behindDoc?-1:1};i.page.fragments.push(s);}function Ht(e,t,n){if(t.kind!=="textBox")throw new Error("layoutTextBox: expected textBox measure");if(q(e)){let o=n.getCurrentState(),s={kind:"textBox",blockId:e.id,x:n.getColumnX(o.columnIndex),y:o.cursorY,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd,isFloating:true,zIndex:e.wrapType==="behind"?-1:1};o.page.fragments.push(s);return}let i=n.ensureFits(t.height),a={kind:"textBox",blockId:e.id,x:n.getColumnX(i.columnIndex),y:0,width:t.width,height:t.height,pmStart:e.pmStart,pmEnd:e.pmEnd},r=n.addFragment(a,t.height,0,0);a.y=r.y;}function At(e,t,n,i){switch(i??"nextPage"){case "nextPage":t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak();break;case "evenPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2!==0&&t.forcePageBreak();break}case "oddPage":{t.updatePageLayout(n.pageSize,n.margins),t.forcePageBreak().page.number%2===0&&t.forcePageBreak();break}case "continuous":t.updatePageLayout(n.pageSize,n.margins,false);break}t.updateColumns(n.columns??Xe);}exports.A=fe;exports.B=me;exports.C=$e;exports.D=pe;exports.E=q;exports.F=qe;exports.G=bt;exports.H=St;exports.I=Mt;exports.J=Tt;exports.K=yt;exports.L=Pt;exports.M=Ft;exports.N=Ct;exports.O=yn;exports.P=vt;exports.a=he;exports.b=Yt;exports.c=be;exports.d=K;exports.e=_;exports.f=Zt;exports.g=ve;exports.h=Ut;exports.i=Xt;exports.j=Gt;exports.k=jt;exports.l=N;exports.m=it;exports.n=Kt;exports.o=Vt;exports.p=mn;exports.q=ee;exports.r=Ie;exports.s=st;exports.t=ke;exports.u=De;exports.v=ft;exports.w=ln;exports.x=cn;exports.y=ce;exports.z=ge;
|