@docx-editor.dev/core 2.29.0 → 2.31.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/automation.cjs +1 -1
- package/dist/automation.d.ts +22 -26
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +47 -40
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BWvaVEhD.d.ts} +577 -243
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-G4HOFIKJ.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-7WQ7AAHW.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-UHHYFIDT.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-W35WTWAO.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-MM5QBMTE.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-OMCG63ZF.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-LSZ6KPKK.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-BY2ACZZ6.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-RCLZXP3B.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +12 -5
- package/dist/{document-protection-CUb55pl_.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-CZQZmTIU.d.ts → editor-B2ShlO23.d.ts} +368 -52
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +606 -34
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +17 -15
- package/dist/export.js +2 -2
- package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-CWS3j0Xr.d.ts} +3 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +112 -44
- package/dist/layout.js +1 -1
- package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-BsLAa2lX.d.ts} +38 -8
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-DYzzz2ej.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-B-akgRch.d.ts} +207 -139
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +49 -136
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-B8l8DX3Z.d.ts} +612 -428
- package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-DeLRqohz.d.ts} +28 -13
- package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-236O4YQW.js +0 -2
- package/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/dist/chunk-6ZQP4HQ7.js +0 -3
- package/dist/chunk-BCXH4BXB.js +0 -5
- package/dist/chunk-CAJEXXVG.cjs +0 -4
- package/dist/chunk-CPWLFPWC.js +0 -30
- package/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/dist/chunk-DOHF6FA7.cjs +0 -30
- package/dist/chunk-DVX32P2P.js +0 -27
- package/dist/chunk-E4LOMDNL.js +0 -1
- package/dist/chunk-EKLM7NWB.cjs +0 -7
- package/dist/chunk-G3K63G7P.cjs +0 -27
- package/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/dist/chunk-LQX36Z5P.js +0 -7
- package/dist/chunk-OSFOJTHU.cjs +0 -18
- package/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/dist/chunk-TRGAVV2Y.js +0 -4
- package/dist/chunk-U4JZVSOE.js +0 -2
- package/dist/chunk-YQ5G6LC7.js +0 -18
- package/dist/image-resources-tXLQShoC.d.ts +0 -211
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import {R,ra,S,N}from'./chunk-FNNOJNGY.js';import {Da,ya,Ha as Ha$1,Ya,jb,Re as Re$1,ba,vd,Ca as Ca$1,if as _if,wb,Na,Fd,Fa,ha,fd,ga,nf,wa,hd,Hb,gb,hb,Za,Fb,Gb,Le as Le$1,Ne as Ne$1}from'./chunk-4S24UOPG.js';import {mb}from'./chunk-T2QQHG5C.js';function te(t,e,n,o,i,r){let a=Za(e,n);if(a.background==="byAuthor"&&!r?(t.style.setProperty("--doc-revision-background",`color-mix(in srgb, ${o} 15%, var(--doc-revision-color-white))`),t.style.backgroundColor="var(--doc-revision-background)"):a.background!=="none"&&(t.style.backgroundColor=a.background==="byAuthor"?r:Ya(a.background,o)),a.mark==="none")return;let s=Ya(a.color,i??o);a.color!=="auto"&&(t.style.color=s),a.mark==="bold"&&(t.style.fontWeight="bold"),a.mark==="italic"&&(t.style.fontStyle="italic");let l=a.mark==="underline"||a.mark==="doubleUnderline"?"underline":a.mark==="strikethrough"||a.mark==="doubleStrikethrough"?"line-through":void 0;l&&(t.style.textDecorationLine=l,t.style.textDecorationStyle=a.mark.startsWith("double")?"double":"solid",t.style.textDecorationColor=s,l==="underline"&&(t.style.textDecorationThickness="var(--doc-revision-insertion-decoration-thickness)",t.style.textUnderlineOffset="var(--doc-revision-insertion-underline-offset)"));}var Et=new WeakMap;function po(t){let e=null;for(let n of t)if(!(n.localName!=="rPrChange"&&n.localName!=="pPrChange")){e=n.attributes?.author??"";break}return e}function ne(t){let e=_if(t),n=Et.get(e);if(n)return n;let o=[],i=new Set,r=true,a=p=>{p===""||i.has(p)||(i.add(p),o.push(p));},s=p=>{for(let y of p.props)y.localName==="pPrChange"&&a(y.attributes?.author??"");for(let y of p.lines){if(y.changeSites)for(let f of y.changeSites)a(f.author);for(let f of y.spans){let g=f.revisions;if(g!==void 0)for(let k=0;k<g.length;k+=1)a(g[k].author);let x=po(f.props);x!==null&&a(x);}}for(let y of p.lines){let f=y.drawings;if(f!==void 0)for(let g=0;g<f.length;g+=1){let x=f[g].revisions;if(x!==void 0)for(let v=0;v<x.length;v+=1)a(x[v].author);let k=f[g].accessibility.hidden?void 0:f[g].textboxStory;if(k)for(let v of ne(k.fragments).authors)a(v);}}let h=p.markRevisions;if(h)for(let y=0;y<h.length;y+=1)a(h[y].author);},l=p=>{p.marker?.picture&&(r=false);for(let h of p.lines)(h.drawings?.length??0)>0&&(r=false);},d=[],c=(p,h)=>{for(let y of p){if(y.kind==="paragraph"){h&&s(y),r&&l(y);continue}for(let f of y.rows){let g=h&&!f.isHeaderRepeat;for(let x of f.cells)x.revisionShadingAuthor&&d.push(x.revisionShadingAuthor),c(x.blocks,g);}}};c(t,true);for(let p of d)a(p);let u={authors:o,drawingFree:r};return Et.set(e,u),u}var A=8,Lt={color:"painted",background:"painted",activeBackground:"painted",spanClassName:"painted",avatarUrl:"card-only"},Pt=Object.keys(Lt),ho=Pt.filter(t=>Lt[t]==="painted"),fo=new Set(["http","https","data","blob"]),go=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function mo(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let n=go.exec(e);if(n)return !fo.has(n[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let o=i=>e[i]==="/"||e[i]==="\\";return o(0)&&o(1)?void 0:e}function bo(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},n=Object.prototype.hasOwnProperty;for(let o of Pt){if(!n.call(t,o))continue;let i=t[o];if(!(typeof i!="string"||i.length===0)){if(o==="avatarUrl"){let r=mo(i);r!==void 0&&(e.avatarUrl=r);continue}e[o]=i;}}return Object.keys(e).length>0?e:null}function B(t){return `var(--doc-review-author-${t%A})`}function Tt(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[n,o]of Object.entries(t.authors)){let i=bo(o);i&&e.set(n,i);}return e}function yi(t,e){let n=Tt(e);return [...t].map(([o,i])=>{let r=n.get(o);return {author:o,slot:i,color:r?.color??B(i),...r?{style:r}:{}}})}var xo=128;function ye(t,e,n=xo){let o=e.length<n?e.length:n,i=t;for(let r=0;r<o;r+=1)i=Math.imul(i^e.charCodeAt(r),16777619);return Math.imul(i^e.length,16777619)}function vo(t,e,n){let o=ye(2166136261,n);for(let i of t.keys())o=ye(o,i);for(let[i,r]of e){o=ye(o,i);for(let a of ho)o=ye(o,r[a]??"",1/0);}return `${t.size}.${e.size}.${(o>>>0).toString(36)}`}function Le(t){return t===null?"kind":t.key}var Me=new WeakMap;function Pe(t,e,n){if(t==="kind")return null;let o=Me.get(e);if(o&&o.option===t&&o.authorSlots===n)return o.context;let i=Tt(t),r=t===void 0||t==="author"?"author":t.others??"author";if(i.size===0&&r==="kind")return Me.set(e,{option:t,authorSlots:n,context:null}),null;let a=n??Ro(e),s=new Map;for(let[d,c]of i){if(!c.spanClassName)continue;let u=c.spanClassName.split(/\s+/).filter(p=>p.length>0);u.length>0&&s.set(d,u);}let l={authorSlots:a,styles:i,classTokens:s,others:r,key:vo(a,i,r)};return Me.set(e,{option:t,authorSlots:n,context:l}),l}function ko(t){return ne(t).authors}var Mt=new WeakMap;function Ro(t){let e=Mt.get(t);if(e)return e;let n=new Map,o=i=>{for(let r of ko(i))n.has(r)||n.set(r,n.size);};for(let i of t.pages){o(i.fragments),i.header&&o(i.header.fragments),i.footer&&o(i.footer.fragments);for(let r of [i.footnotes,i.endnotes])if(r){r.separator&&o(r.separator.fragments),r.continuationNotice&&o(r.continuationNotice.fragments);for(let a of r.notes)o(a.fragments);}for(let r of [i.anchoredDrawings,i.header?.anchoredDrawings,i.footer?.anchoredDrawings])if(r)for(let a of r){if(a.accessibility.hidden)continue;let s=a.revisions;if(s!==void 0)for(let l=0;l<s.length;l+=1){let d=s[l].author;d!==""&&!n.has(d)&&n.set(d,n.size);}a.textboxStory&&o(a.textboxStory.fragments);}}return Mt.set(t,n),n}function So(t,e){let n=null;for(let o of e)o===""||t.has(o)||(n===null&&(n=new Map(t)),n.has(o)||n.set(o,n.size));return n??t}function pi(){let t=new Map,e=0;return {resolve(n,o){let i=So(n,o);for(let r of i.keys())t.has(r)||(t.set(r,e),e+=1);return new Map([...i.keys()].map(r=>[r,t.get(r)]).sort((r,a)=>r[1]-a[1]))}}}function G(t,e,n){if(t===void 0||t.length===0)return null;let o=t[t.length-1],i=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),r=o.kind,a=r==="delete"||r==="moveFrom"?"line-through":r==="insert"||r==="moveTo"?"underline":null;return {attribution:o,line:i&&a==="underline"?"line-through":a,decorationStyle:r==="moveFrom"||r==="moveTo"?"double":"solid",color:i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:n?.get(o.author)?.color??B(e?.get(o.author)??0),deleted:i}}function oe(t,e=false){let n=t.spans.find(r=>r.style.shaping)?.style.shaping?.baseLevel,o=n===void 0?e:n===1,i=Gb(t.spans,t.drawings??[]);return i?{x:o?i.left:i.right,rtl:o}:{x:t.contentX,rtl:o}}function Te(t,e,n,o,i,r,a){let s=a??oe(n,o),l=e.ownerDocument.createElement("span");l.className="docx-terminator-seat",l.dataset.docxMarker="",l.setAttribute("aria-hidden","true"),l.setAttribute("contenteditable","false"),l.style.position="absolute",l.style.left=`${(s.x-n.contentX)*r}px`,l.style.bottom=`${Math.max(0,n.box.height-n.baseline)*r}px`,l.style.width="0",l.style.fontSize="0",l.style.lineHeight="0",l.style.whiteSpace="pre",l.style.pointerEvents="none",l.style.userSelect="none",s.rtl&&(l.style.direction="rtl"),t.style.display="inline-block",t.style.verticalAlign="baseline",t.style.fontSize=`${i*r}px`,l.append(t),e.append(l);}function Ae(t,e,n){let o=G(e,n?.authorSlots,n?.styles);if(!o)return;let{attribution:i}=o,r=n?.styles.get(i.author),a=n&&(r?.color!==void 0||n.others==="author");if(t.style.color=a?o.authorColor:o.color,t.dataset.revisionKind=i.kind,t.dataset.revisionId=i.id,t.dataset.reviewAuthor=i.author,n){t.dataset.reviewAuthorSlot=String((n.authorSlots.get(i.author)??0)%A);for(let s of n.classTokens.get(i.author)??[])t.classList.add(s);}o.line&&(t.style.textDecorationLine=o.line,t.style.textDecorationStyle=o.decorationStyle,t.style.textDecorationColor=t.style.color);}function At(t,e,n,o,i,r=false){let a=t.createElement("span"),s=e.spans[e.spans.length-1];a.className="docx-line-break-mark",a.dataset.docxMarker="",a.setAttribute("aria-hidden","true"),a.contentEditable="false",a.textContent="\u21B5",a.style.pointerEvents="none",a.style.userSelect="none",a.style.color="var(--doc-revision-format)",Ae(a,s?.revisions,i);let l=s?.style.fontSizePt??ba.fontSizePt;Te(a,n,e,r,l,o);}function Bt(t,e,n,o,i=false){let r=gb(e);if(!r){let c=t.createElement("span");return c.className="docx-paragraph-mark",c.setAttribute("aria-hidden","true"),c.contentEditable="false",c.textContent="\xB6",c.style.pointerEvents="none",c.style.color="var(--doc-revision-format)",c}let a=t.createElement("span");a.className=`docx-paragraph-mark docx-revision-pmark docx-revision-pmark-${r.kind}`,a.setAttribute("aria-hidden","true"),a.contentEditable="false",a.dataset.revisionKind=r.kind,a.dataset.revisionId=r.id,r.author!==""&&(a.dataset.reviewAuthor=r.author),a.dataset.revisionIds=e.map(c=>c.id).join(" "),a.dataset.revisionKinds=e.map(c=>c.kind).join(" "),a.textContent="\xB6",a.style.pointerEvents="none";let s=hb(r),l=n?.styles.get(r.author),d=n?(n.authorSlots.get(r.author)??0)%A:0;if(n){a.dataset.reviewAuthorSlot=String(d);let c=n.classTokens.get(r.author);if(c)for(let u=0;u<c.length;u+=1)a.classList.add(c[u]);}if(a.style.color=l?.color??(n?.others==="author"?B(d):s?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),o){let c=a.style.color;a.style.color="";let u=Za(o,r.kind).mark;u==="hidden"&&(a.style.visibility="hidden"),u==="caret"&&(a.textContent="^"),u==="pound"&&(a.textContent="#"),te(a,o,r.kind,l?.color??B(d),i||n?.others==="kind"||l?.color?c:void 0,l?.background);}else s&&(a.style.textDecorationLine="line-through");return a}function pe(t){let e=Object.getPrototypeOf(t);return e===Object.prototype||e===Array.prototype||e===null}function Be(t,e,n,o){if(t===e)return true;if(typeof t!="object"||typeof e!="object"||t===null||e===null||n>32||!pe(t)||!pe(e)||o&&--o.remaining<0)return false;let i=Array.isArray(t);if(i!==Array.isArray(e))return false;if(i){let r=t,a=e;if(r.length!==a.length)return false;for(let s=0;s<r.length;s+=1)if(!Be(r[s],a[s],n+1,o))return false;return true}return $t(t,e,void 0,n,o)}function $t(t,e,n,o,i){let r=t,a=e,s=0;for(let l in r)if(!(!Object.hasOwn(r,l)||n?.has(l))){if(!Object.hasOwn(a,l)||!Be(r[l],a[l],o+1,i))return false;s+=1;}for(let l in a)Object.hasOwn(a,l)&&!n?.has(l)&&(s-=1);return s===0}function C(t,e,n){return t===e?true:!pe(t)||!pe(e)?false:$t(t,e,n,0)}function Ct(t,e,n){return Be(t,e,0,{remaining:n})}var wo=/^[0-9A-Fa-f]{6}$/,Eo=new Set(["box","lines","shadingBox","marker"]),Mo=new Set(["box","contentX","spans"]),Ft=new Set(["box"]);function W(t,e,n,o,i,r){let a=(o.x-i.x)*r;a!==(e.x-n.x)*r&&(t.left=`${a}px`);let s=(o.y-i.y)*r;s!==(e.y-n.y)*r&&(t.top=`${s}px`),o.width!==e.width&&(t.width=`${o.width*r}px`),o.height!==e.height&&(t.height=`${o.height*r}px`);}function Ht(t,e){return oe(t,e).x-t.contentX}function Lo(t,e,n,o,i){if((e.drawings?.length??0)>0||t.box.height!==e.box.height||t.spans.length!==e.spans.length||!C(t,e,Mo))return false;for(let r=0;r<e.spans.length;r+=1){let a=t.spans[r],s=e.spans[r];if(s.tabLeader||s.noteSeparator||s.style.shaping||s.style.border||a.box.width!==s.box.width||a.box.height!==s.box.height||!C(a,s,Ft)||r>0&&n(t,r)!==n(e,r))return false}return !o||Ht(t,i)===Ht(e,i)}function Po(t,e,n){if(e.borders||e.bottomBorder||e.marker?.picture||t.box.height!==e.box.height||t.lines.length!==e.lines.length||!C(t,e,Eo)||t.shadingBox===void 0!=(e.shadingBox===void 0)||t.shadingBox&&t.shadingBox.height!==e.shadingBox.height||t.marker===void 0!=(e.marker===void 0))return false;if(t.marker){let a=e.marker;if(t.marker.box.height!==a.box.height||!C(t.marker,a,Ft))return false}let o=vd(e.props),i=e.lines.length-1,r=n.showParagraphMarks&&!!e.paragraphEnd||(e.markRevisions?.length??0)>0;for(let a=0;a<=i;a+=1){let s=e.lines[a],l=n.showParagraphMarks&&!!s.manualBreakAfter||a===i&&r;if(!Lo(t.lines[a],s,n.gapOf,l,o))return false}return true}function Dt(t,e,n,o){if(!Po(e,n,o))return false;let i=o.scale,r=!!(n.shading&&wo.test(n.shading)&&n.shadingBox),a=n.marker!==void 0,s=(r?1:0)+(a?1:0),l=t.children;if(l.length!==s+n.lines.length)return false;for(let d=0;d<n.lines.length;d+=1)if(l[s+d].dataset.lineId!==n.lines[d].id)return false;if(r&&!l[0].classList.contains("docx-paragraph-shading")||a&&!l[s-1].classList.contains("docx-list-marker"))return false;if(r){let d=l[0];W(d.style,e.shadingBox,e.box,n.shadingBox,n.box,i);}if(a){let d=l[s-1];W(d.style,e.marker.box,e.box,n.marker.box,n.box,i);}for(let d=0;d<n.lines.length;d+=1){let c=e.lines[d],u=n.lines[d],p=l[s+d],h=(u.box.y-n.box.y)*i;h!==(c.box.y-e.box.y)*i&&(p.style.top=`${h}px`);let y=(u.contentX-n.box.x)*i;y!==(c.contentX-e.box.x)*i&&(p.style.left=`${y}px`);}return true}var $e=new WeakMap,he=new WeakMap;function Ot(t,e,n){$e.set(t,{fragment:e,rows:n});}function Ce(t,e,n,o,i){he.set(t,{cell:e,host:n,strokes:o,blocks:i});}function Nt(t,e){for(let[n,o]of t)if(n.kind==="table"&&n.tableId===e.tableId&&n.fragmentIndex===e.fragmentIndex)return o}var To=new Set(["rows","box","columnEdges"]),Ao=new Set(["box","cells"]),Bo=new Set(["box","blocks","borders"]),$o=new Set(["strokes","edgeSegments"]),fe=[];function He(t,e,n){let o=t.children[n]??null,i=0;for(;i<e.length&&o===e[i];)o=o.nextElementSibling,i+=1;if(i===e.length&&o===null)return;let r=new Set(e);for(;o;){let a=o.nextElementSibling;r.has(o)||o.remove(),o=a;}o=t.children[n+i]??null;for(let a=i;a<e.length;a+=1){let s=e[a];s===o?o=o.nextElementSibling:t.insertBefore(s,o);}}function Co(t,e,n){if(t===e)return true;if(!t||!e||!C(t,e,$o))return false;let o=t.strokes??fe,i=e.strokes??fe;if(o.length!==i.length||i.length>0&&n?.length!==i.length)return false;for(let r=0;r<i.length;r+=1){let a=o[r],s=i[r];if(a.side!==s.side||a.role!==s.role||a.color!==s.color||a.cssStyle!==s.cssStyle)return false;let l=s.side==="top"||s.side==="bottom";if(s.cssStyle!=="solid"&&(l?a.height!==s.height:a.width!==s.width))return false}return true}function Ho(t,e,n,o){let i=e?.strokes??fe,r=n?.strokes??fe;if(!(i===r||!t))for(let a=0;a<r.length;a+=1){let s=i[a],l=r[a],d=t[a].style;s.x!==l.x&&(d.left=`${l.x*o}px`),s.y!==l.y&&(d.top=`${l.y*o}px`),s.width!==l.width&&(d.width=`${l.width*o}px`),s.height!==l.height&&(d.height=`${l.height*o}px`);}}function Fo(t,e,n){return t[n]?.id===e?n:t.findIndex(o=>o.id===e)}function Do(t,e,n){let o=t.cell,i=n.scale,r=new Set,a=[];for(let s=0;s<e.blocks.length;s+=1){let l=e.blocks[s],d=Fo(o.blocks,l.id,s),c=d<0||r.has(d)?void 0:o.blocks[d],u=c?t.blocks[d]:void 0;if(c&&r.add(d),c&&u&&(c===l||c.kind==="paragraph"&&l.kind==="paragraph"&&Dt(u,c,l,n))){W(u.style,c.box,o.box,l.box,e.box,i),a.push(u);continue}let p=l.kind==="table"&&c?.kind==="table"?n.block(l,u):n.block(l);p.style.left=`${(l.box.x-e.box.x)*i}px`,p.style.top=`${(l.box.y-e.box.y)*i}px`,a.push(p);}return a}function Io(t,e,n,o,i,r){let a=he.get(t);if(!a||a.cell!==e)return null;if(e!==o){if(!C(e,o,Bo))return null;if(o.paintInert||o.vMergeContinue)he.set(t,{...a,cell:o});else {if(o.textDirection==="btLr"&&(e.box.width!==o.box.width||e.box.height!==o.box.height)||!Co(e.borders,o.borders,a.strokes))return null;let l=a.host,d=l.children.length-a.blocks.length;if(d<0)return null;for(let u of a.blocks)if(u.parentElement!==l)return null;Ho(a.strokes,e.borders,o.borders,r.scale);let c=Do(a,o,r);He(l,c,d),he.set(t,{cell:o,host:l,strokes:a.strokes,blocks:c});}}return W(t.style,e.box,n,o.box,i,r.scale),t}function Oo(t,e,n,o,i,r){if(e!==o){if(!C(e,o,Ao))return null;let a=t.children;if(a.length!==e.cells.length)return null;let s=new Set,l=[];for(let d=0;d<o.cells.length;d+=1){let c=o.cells[d],u=e.cells[d]?.id===c.id?d:e.cells.findIndex(h=>h.id===c.id),p=u>=0&&!s.has(u)?Io(a[u],e.cells[u],e.box,c,o.box,r):null;p&&s.add(u),l.push(p??r.cell(c,o.box));}He(t,l,0);}return W(t.style,e.box,n,o.box,i,r.scale),t}function It(t){return `${t.id}\0${t.isHeaderRepeat?1:0}${t.isContinuation?1:0}`}function _t(t,e,n){let o=$e.get(t);if(!o)return null;let i=o.fragment;if(!C(i,e,To))return null;let r=new Map;for(let[d,c]of o.rows){let u=It(d);r.set(u,r.has(u)?null:[d,c]);}let a=new Map;for(let d of e.rows){let c=It(d),u=r.get(c);r.delete(c);let p=u?Oo(u[1],u[0],i.box,d,e.box,n):null;a.set(d,p??n.row(d));}let s=n.scale,l=t.style;return i.box.x!==e.box.x&&(l.left=`${e.box.x*s}px`),i.box.y!==e.box.y&&(l.top=`${e.box.y*s}px`),i.box.width!==e.box.width&&(l.width=`${e.box.width*s}px`),i.box.height!==e.box.height&&(l.height=`${e.box.height*s}px`),He(t,[...a.values()],0),$e.set(t,{fragment:e,rows:a}),t}function Fe(t,e,n){let o=jb(e.props)??n.paragraphFormatRevision,i=n.revisionStyles,r=G(e.revisions,i?.authorSlots,i?.styles);if(!(!r&&!o)){if(r){let{attribution:a}=r;t.classList.add("docx-revision",`docx-revision-${a.kind}`),t.dataset.revisionKind=a.kind,t.dataset.revisionId=a.id,a.author!==""&&(t.dataset.reviewAuthor=a.author),a.date!==void 0&&(t.dataset.revisionDate=a.date);let s=i?.styles.get(a.author);if(i){t.dataset.reviewAuthorSlot=String((i.authorSlots.get(a.author)??0)%A);let c=i.classTokens.get(a.author);if(c)for(let u=0;u<c.length;u+=1)t.classList.add(c[u]);}let d=i!==void 0&&(s?.color!==void 0||i.others==="author")?r.authorColor:r.color;if(n.revisionMarkup){s?.background&&(t.style.backgroundColor=s.background),te(t,n.revisionMarkup,r.deleted?e.revisions?.find(c=>c.kind==="delete"||c.kind==="moveFrom")?.kind??a.kind:a.kind,r.authorColor,n.revisionKindColors||i?.others==="kind"||s?.color?d:void 0,s?.background);return}t.style.color=d,t.style.backgroundColor=s?.background??(r.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),r.line&&(t.style.textDecorationLine=r.line,a.kind==="insert"&&r.line==="underline"?(t.style.textDecorationStyle="var(--doc-revision-insertion-decoration-style)",t.style.textDecorationThickness="var(--doc-revision-insertion-decoration-thickness)",t.style.textUnderlineOffset="var(--doc-revision-insertion-underline-offset)"):t.style.textDecorationStyle=r.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision",...n.revisionMarkup?[]:["docx-revision-format"]),t.dataset.revisionKind="format",t.dataset.formattingKind=jb(e.props)?"rPrChange":"pPrChange",t.dataset.revisionId=o.id,o.author!==""&&(t.dataset.reviewAuthor=o.author),o.date!==void 0&&(t.dataset.revisionDate=o.date),i){let a=i.styles.get(o.author);t.dataset.reviewAuthorSlot=String((i.authorSlots.get(o.author)??0)%A);let s=i.classTokens.get(o.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);!n.revisionMarkup&&a?.color!==void 0&&(t.style.color=a.color),a?.background!==void 0&&(t.style.backgroundColor=a.background);}n.revisionMarkup&&te(t,n.revisionMarkup,"format",i?.styles.get(o.author)?.color??B(i?.authorSlots.get(o.author)??0),void 0,i?.styles.get(o.author)?.background);}}function zt(t,e,n,o,i){if(e.spans.length!==0)return;i({...ba,fontFamily:o.fontFamily,fontSizePt:o.fontSizePt,bold:o.bold,italic:o.italic});let r=t.ownerDocument.createElement("br");r.style.lineHeight=`${e.box.height*n}px`,t.append(r);}function Kt(t,e,n){let o=e.marker?.picture,i=n.urlRegistry;if(!o||o.resource.kind!=="ready"||!i)return null;let r=n.scale,a=i.urlForReady(o.resource.validatedHandle,o.resource.mime);if(a===null)return null;let s=o.box,l=t.createElement("span");l.className="docx-list-marker",l.dataset.docxMarker="",l.setAttribute("contenteditable","false"),l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.left=`${(s.x-e.box.x)*r}px`,l.style.top=`${(s.y-e.box.y)*r}px`,l.style.width=`${s.width*r}px`,l.style.height=`${s.height*r}px`,l.style.display="block",l.style.overflow="hidden";let d=t.createElement("img");return d.className="docx-list-marker-image",d.setAttribute("src",a),d.setAttribute("alt",""),d.setAttribute("draggable","false"),d.style.display="block",d.style.width=`${s.width*r}px`,d.style.height=`${s.height*r}px`,d.style.maxWidth="none",d.style.maxHeight="none",l.append(d),l}function jt(t,e,n,o){let i=t.createElement("span");i.dataset.docxNoteRule="single",i.setAttribute("contenteditable","false"),i.setAttribute("aria-hidden","true"),i.style.display="inline-block",i.style.position="relative",i.style.verticalAlign="top",i.style.width=`${e.box.width*o}px`,i.style.height=`${Math.min(e.box.height+(n.leading??0),n.box.height)*o}px`;let r=nf(e,n),a=t.createElement("span");return a.style.position="absolute",a.style.left="0",a.style.top=`${(r.y-n.box.y)*o}px`,a.style.width=`${r.width*o}px`,a.style.height=`${r.height*o}px`,a.style.backgroundColor=e.style.color?`#${e.style.color}`:"#000000",i.append(a),i}function ge(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function X(t,e,n,o,i,r){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let a=Math.max(4,4*r);t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 60%, transparent 60%)`,t.style.backgroundSize=o?`100% ${a}px`:`${a}px 100%`;return}case "dotted":{let a=Math.max(3,3*r);t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 35%, transparent 35%)`,t.style.backgroundSize=o?`100% ${a}px`:`${a}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let a=i/3;t.style.backgroundColor="transparent",t.style.backgroundImage=`linear-gradient(to ${o?"right":"bottom"}, #${n} 0px, #${n} ${a}px, transparent ${a}px, transparent ${a*2}px, #${n} ${a*2}px)`;return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px ridge #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px groove #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px inset #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let a=o?"borderLeft":"borderTop";t.style[a]=`${Math.max(1,i)}px outset #${n}`,o?t.style.width="0px":t.style.height="0px";return}default:return}}var No=/^[0-9A-Fa-f]{6}$/;function Ut(t,e,n,o){for(let{box:i,edge:r,side:a}of Hb(n)){let s=r.color&&No.test(r.color)?r.color:"000000",l=t.createElement("span");l.className=`docx-run-border docx-run-border-${a}`,l.dataset.docxMarker="",l.setAttribute("aria-hidden","true"),l.setAttribute("contenteditable","false"),Object.assign(l.style,{position:"absolute",pointerEvents:"none",left:`${(i.x-n.contentX)*o}px`,top:`${(i.y-n.box.y)*o}px`,width:`${i.width*o}px`,height:`${i.height*o}px`,backgroundColor:`#${s}`});let d=a==="left"||a==="right";X(l,r.val,s,d,(d?i.width:i.height)*o,o),e.append(l);}}function Gt(t,e){let n=e.fieldAtom?.formControl;if(n?.kind!=="dropdown"||n.entries.length===0)return;let o=t.ownerDocument.createElement("select");o.dataset.docxFormDropdown="",o.dataset.docxMarker="",o.setAttribute("aria-label",n.accessibleName??e.text);for(let[i,r]of n.entries.entries()){let a=t.ownerDocument.createElement("option");a.value=String(i),a.textContent=r,o.append(a);}o.selectedIndex=n.selectedIndex,Object.assign(o.style,{position:"absolute",inset:"0",width:"100%",height:"100%",opacity:"0",cursor:"pointer",font:"inherit",padding:"0",border:"0"}),t.style.position="relative",t.append(o);}function Wt(t,e,n){let o=e.fieldAtom?.formControl;if(o?.kind!=="checkbox")return;t.dataset.docxFormCheckbox="",t.dataset.checked=String(o.checked),t.setAttribute("role","checkbox"),t.tabIndex=0,t.setAttribute("aria-checked",String(o.checked)),o.accessibleName&&t.setAttribute("aria-label",o.accessibleName),t.style.width=`${e.box.width*n}px`;let i=t.ownerDocument.createElement("span");i.className="docx-form-checkbox-hit",i.dataset.docxMarker="",i.setAttribute("aria-hidden","true"),t.append(i);}var re=Object.freeze({pageBreak:"Page break",columnBreak:"Column break",sectionBreakContinuous:"Section break (continuous)",sectionBreakNextPage:"Section break (next page)",sectionBreakEvenPage:"Section break (even page)",sectionBreakOddPage:"Section break (odd page)",sectionBreakNextColumn:"Section break (new column)"}),Vt=Object.keys(re);function Yi(t){if(!t)return re;let e={};for(let n of Vt){let o=`formattingMarks.${n}`,i=t(o);e[n]=i&&i!==o?i:re[n];}return Object.freeze(e)}function Yt(t){return Vt.map(e=>t[e]).join("\0")}function _o(t,e){return t==="page"?e.pageBreak:e.columnBreak}function zo(t,e){switch(t){case "continuous":return e.sectionBreakContinuous;case "evenPage":return e.sectionBreakEvenPage;case "oddPage":return e.sectionBreakOddPage;case "nextColumn":return e.sectionBreakNextColumn;default:return e.sectionBreakNextPage}}var Ko=8;function jo(t,e){let n=oe(t,e),o=t.box.x,i=t.box.x+t.box.width;return Uo(t)?n.rtl?{left:Math.min(o,n.x),right:n.x,rtl:true}:{left:n.x,right:Math.max(i,n.x),rtl:false}:{left:o,right:i,rtl:n.rtl}}function Uo(t){return Gb(t.spans,t.drawings??[])?(t.drawings?.length??0)>0?true:t.spans.some(e=>e.box.width>0||e.text!==mb&&e.text!==`
|
|
2
|
+
`&&e.text!==""):false}function Xt(t){let e=t.createElement("span");return e.className="docx-break-mark-rule",e.style.flex="1 1 0",e.style.minWidth="0",e.style.height="0",e.style.borderTop="1px dotted currentColor",e}function Go(t,e,n,o,i){if(o.length===0)return null;let{scale:r}=i,a=jo(e,i.paragraphRtl),s=Ko*r,l=t.createElement("span");l.className="docx-break-mark",l.dataset.docxMarker="",l.setAttribute("aria-hidden","true"),l.setAttribute("contenteditable","false"),l.style.position="absolute",l.style.left=`${(a.left-e.contentX)*r}px`,l.style.width=`${Math.max(0,a.right-a.left)*r}px`,l.style.height=`${s}px`,i.boundary?l.style.top=`${-s/2}px`:l.style.bottom=`${Math.max(0,e.box.height-e.baseline)*r}px`,l.style.display="flex",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.userSelect="none",l.style.whiteSpace="pre",l.style.fontFamily="Arial, Helvetica, sans-serif",l.style.fontSize=`${s}px`,l.style.fontWeight="normal",l.style.fontStyle="normal",l.style.lineHeight=`${s}px`,l.style.color="var(--doc-revision-format)",a.rtl&&(l.style.direction="rtl");for(let{text:d,revisions:c}of o){let u=t.createElement("span");u.className="docx-break-mark-segment",u.style.flex="1 1 0",u.style.minWidth="0",u.style.display="flex",u.style.alignItems="center",Ae(u,c,i.colors);let p=t.createElement("span");p.className="docx-break-mark-label",p.textContent=d,p.dir="auto",p.style.unicodeBidi="isolate",p.style.flex="0 1 auto",p.style.minWidth="0",p.style.overflow="hidden",p.style.padding=`0 ${s/2}px`,u.append(Xt(t),p,Xt(t)),l.append(u);}return n.append(l),a}function Wo(t){let e=t.breakAfter==="page"?mb:`
|
|
3
|
+
`;for(let n=t.spans.length-1;n>=0;n-=1)if(t.spans[n].text===e)return t.spans[n].revisions}function qt(t,e){let n=t.sectionBreaks??[];return {strings:e,sectionBreaks:new Map(n.map(o=>[o.paragraphId,o.kind])),token:n.map(o=>`${o.paragraphId}:${o.kind}`).join(",")}}function Xo(t,e,n,o,i){let r=e.lines.length-1,a=e.paragraphEnd?o.sectionBreaks.get(e.paragraphId):void 0,s=e.outOfFlow===true&&!e.positionedFrame,l;for(let d=0;d<=r;d+=1){let c=e.lines[d],u=n[d];if(!u)continue;let p=[];if(c.breakAfter&&!s){let y=Wo(c);p.push({text:_o(c.breakAfter,o.strings),...y?{revisions:y}:{}});}d===r&&a&&p.push({text:zo(a,o.strings)});let h=Go(t,c,u,p,{...i,boundary:s});h&&d===r&&!s&&(l={x:h.rtl?h.left:h.right,rtl:h.rtl});}return {replacesPilcrow:a!==void 0,...l?{pilcrowAt:l}:{}}}function Zt(t,e,n,o,i){let r=vd(e.props),a=o.breakMarks&&!o.inertLinks?Xo(t,e,n,o.breakMarks,{paragraphRtl:r,scale:i,...o.revisionStyles?{colors:o.revisionStyles}:{}}):null,s=(e.markRevisions?.length??0)>0;if(!(o.showParagraphMarks&&e.paragraphEnd&&!a?.replacesPilcrow)&&!s)return;let d=Bt(t,e.markRevisions??[],o.revisionStyles,o.revisionMarkup,o.revisionKindColors),c=e.lines[e.lines.length-1],u=n[n.length-1];if(!c||!u)return;let p=e.paragraphMarkSizePt??e.emptyParagraphStyle?.fontSizePt??c.spans.at(-1)?.style.fontSizePt??ba.fontSizePt;Te(d,u,c,r,p,i,a?.pilcrowAt);}function Jt(t){t.style.fontFamily=R,t.style.direction="ltr";}function De(t,e,n=false){let o=n?null:jb(e.props.filter(r=>r.localName==="pPrChange")),i=o??e.markFormatRevision;i&&(Vo(t,i,o?"pPrChange":"rPrChange"),t.dataset.paragraphId=e.paragraphId,t.dataset.reviewStart=String(e.range.start),t.dataset.reviewEnd=String(e.range.end));}function Vo(t,e,n){t.dataset.revisionKind="format",t.dataset.revisionId=e.id,t.dataset.formattingKind=n,e.author&&(t.dataset.reviewAuthor=e.author),e.date!==void 0&&(t.dataset.revisionDate=e.date);}function Qt(t,e,n,o,i,r){for(let a of [n.footnotes,n.endnotes])a&&e.append(Yo(t,n,a,o,i,r));}function Yo(t,e,n,o,i,r){let a=t.createElement("div");a.className="docx-notes",a.dataset.docxNotes=n.kind,a.dataset.docxNotesPlacement=n.placement,a.style.position="absolute",a.style.left=`${(n.box.x-e.box.x)*o.scale}px`,a.style.top=`${(n.box.y-e.box.y)*o.scale}px`,a.style.width=`${n.box.width*o.scale}px`,a.style.height=`${n.box.height*o.scale}px`;for(let s of [n.separator,n.continuationNotice]){if(!s)continue;let l=t.createElement("div");l.className="docx-note-separator",l.dataset.docxNoteSeparator=s.kind,l.setAttribute("contenteditable","false"),l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.left=`${(s.box.x-n.box.x)*o.scale}px`,l.style.top=`${(s.box.y-n.box.y)*o.scale}px`,l.style.width=`${s.box.width*o.scale}px`,l.style.height=`${s.box.height*o.scale}px`;let d=s.ruleStyle;if(d||s.synthetic)qo(l,t,d??"single",o.scale,s.box.height,s.ruleColor);else {let c={...o,tabLeaderOriginXPt:s.box.x-e.box.x};for(let u of s.fragments)l.append(u.kind==="table"?r(t,u,c):i(t,u,c));}a.append(l);}for(let s of n.notes){let l={...o,tabLeaderOriginXPt:s.box.x-e.box.x},d=t.createElement("div");d.className="docx-note",d.dataset.docxNote=s.noteKind,d.dataset.docxNoteId=String(s.noteId),d.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(d.dataset.docxNoteMark=s.mark),s.continuation&&(d.dataset.docxNoteContinuation=""),d.setAttribute("role","doc-footnote"),d.style.position="absolute",d.style.left=`${(s.box.x-n.box.x)*o.scale}px`,d.style.top=`${(s.box.y-n.box.y)*o.scale}px`,d.style.width=`${s.box.width*o.scale}px`,d.style.height=`${s.box.height*o.scale}px`;for(let c of s.fragments)d.append(c.kind==="table"?r(t,c,l):i(t,c,l));a.append(d);}return a}function qo(t,e,n,o,i,r){t.dataset.docxNoteRule=n;let a=r&&/^[a-f\d]{6}$/i.test(r)?`#${r}`:"#000000";t.style.color=a;let s=Math.max(1,o*.75);if(n==="single"){t.style.backgroundColor=a,t.style.height=`${i*o}px`;return}t.style.opacity="0.85";let l=Math.max(1,o*1.25);for(let d of [0,s+l]){let c=e.createElement("div");c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.left="0",c.style.right="0",c.style.top=`${d}px`,c.style.height="0",c.style.borderTop=`${s}px solid currentColor`,t.append(c);}}var Zo=new Set(["dropdown","comboBox","date","checkbox","picture","buildingBlockGallery"]);function en(t,e,n,o){let i=o.contentControlChrome,r=i?.suppressedIds,a=(n.contentControls??[]).filter(p=>r?.has(p.id)!==true),s=[...a,...(i?.additionalBoundaries??[]).filter(p=>r?.has(p.id)!==true&&!a.some(h=>h.id===p.id))];if(s.length===0)return;let l=i?.showAll===true,d=i?.activeIds,c=i?.hoverIds,u=i?.tocControlIds;for(let p of s){let h=u?.has(p.id)===true,y=!h&&d?.has(p.id)===true,f=c?.has(p.id)===true;e.append(Qo(t,n,p,o.scale,y,f,l||y||h&&f,i?.checkedIds?.has(p.id),h,i?.readOnly===true));}}function Jo(t,e,n,o){let i=t.contentBox.x-t.box.x,r=t.contentBox.y-t.box.y;if(n==="checkbox"){let p=Math.max(1,Math.min(e.height,16))*o,h=e.width>0?(i+e.x+e.width/2)*o-p/2:(i+e.x)*o,y=(r+e.y)*o+Math.max(0,(e.height*o-p)/2);return {left:h,top:y,size:p}}let a=16*o,s=(i+e.x+e.width)*o,l=t.box.width*o,d=s+2*o,c=d+a<=l?d:Math.max(0,s-a),u=(r+e.y)*o+Math.max(0,(e.height*o-a)/2);return {left:c,top:u,size:a}}function Qo(t,e,n,o,i,r,a,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=n.id,c.dataset.docxMarker="",c.dataset.controlType=n.controlType,c.dataset.lock=n.effectiveLock,n.bound&&(c.dataset.bound=""),n.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),i&&(c.dataset.active=""),r&&(c.dataset.hover=""),a&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),n.alias&&(c.dataset.alias=n.alias),n.tag&&(c.dataset.tag=n.tag),n.alias&&c.setAttribute("aria-label",n.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let u=e.contentBox.x-e.box.x,p=e.contentBox.y-e.box.y;for(let y of n.fragments){if(y.pageIndex!==e.index)continue;let f=t.createElement("div");f.className="docx-content-control-boundary",f.dataset.docxMarker="",f.setAttribute("contenteditable","false"),f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.left=`${(u+y.box.x)*o}px`,f.style.top=`${(p+y.box.y)*o}px`,f.style.width=`${Math.max(y.box.width,1)*o}px`,f.style.height=`${Math.max(y.box.height,1)*o}px`,f.style.pointerEvents="none",c.append(f);}let h=n.fragments.find(y=>y.pageIndex===e.index);if(h&&n.alias){let y=t.createElement("div");y.className="docx-content-control-label",y.dataset.docxMarker="",y.setAttribute("contenteditable","false"),y.setAttribute("aria-hidden","true"),y.textContent=n.alias,y.style.position="absolute",y.style.left=`${(u+h.box.x)*o}px`,y.style.top=`${Math.max(0,(p+h.box.y)*o-16)}px`,y.style.pointerEvents="none",c.append(y);}if(h&&Zo.has(n.controlType)){let y=t.createElement("button");y.type="button",y.className="docx-content-control-widget",y.dataset.docxMarker="",y.dataset.docxCcWidget=n.controlType,y.dataset.docxCcId=n.id,y.setAttribute("contenteditable","false"),y.setAttribute("tabindex","-1"),n.controlType==="checkbox"?y.setAttribute("role","checkbox"):n.controlType==="dropdown"||n.controlType==="comboBox"||n.controlType==="buildingBlockGallery"?y.setAttribute("role","listbox"):(n.controlType==="date"||n.controlType==="picture")&&y.setAttribute("role","button"),n.alias&&(y.dataset.name=n.alias),n.alias&&y.setAttribute("aria-label",n.alias),n.controlType==="checkbox"&&(y.setAttribute("data-checked",s?"true":"false"),y.setAttribute("aria-checked",s?"true":"false"));let f=n.effectiveLock==="contentLocked"||n.effectiveLock==="sdtContentLocked";(d||f||n.bound)&&(y.disabled=true,y.dataset.disabledReason=d?"readOnly":n.bound?"bound":"locked",y.setAttribute("aria-disabled","true"));let g=Jo(e,h.box,n.controlType,o);y.style.position="absolute",y.style.left=`${g.left}px`,y.style.top=`${g.top}px`,y.style.width=`${g.size}px`,y.style.height=`${g.size}px`,y.style.fontSize=`${g.size}px`,y.style.pointerEvents="auto",y.style.padding="0",y.style.margin="0",y.style.cursor=y.disabled?"not-allowed":"pointer",c.append(y);}return c}var nn="docx-change-bars",me="docx-change-bar",er=.5;function on(t,e){for(let n of e)switch(t.author??=n.author,n.kind){case "insert":case "moveTo":t.insertion=true;break;case "delete":case "moveFrom":t.deletion=true;break;case "format":t.format=true;break}}function rn(t,e,n){let o=t.lines,i=o.length-1,r=[];for(let a=0;a<=i;a+=1){let s=o[a];if(r.length=0,e.mode==="simple-markup"){s.changeSites&&r.push(...s.changeSites),a===i&&t.markChangeSites&&r.push(...t.markChangeSites),r.length>0&&tn(t,o,a,e,r,n);continue}s.changeSites&&r.push(...s.changeSites);for(let l of s.spans){l.revisions&&r.push(...l.revisions);let d=jb(l.props);d&&r.push(d);}for(let l of s.drawings??[])l.revisions&&r.push(...l.revisions);if(s.anchorRevisions&&r.push(...s.anchorRevisions),a===i){t.markRevisions&&r.push(...t.markRevisions),t.markFormatRevision&&r.push(t.markFormatRevision);let l=jb(t.props);l&&r.push(l);}r.length!==0&&tn(t,o,a,e,r,n);}}function tn(t,e,n,o,i,r){let a=e[n],s=e.length-1,l=(n===0?t.box.y:a.box.y)+o.dy,d=Math.min((n===s?t.box.y+t.box.height:e[n+1].box.y)+o.dy,o.limit);if(d<=l)return;let c={top:l,bottom:d,story:o.story,insertion:false,deletion:false,format:false};on(c,i),r.push(c);}function tr(t,e,n){for(let o of t.rows){let i=e.mode==="simple-markup"?o.changeSites:void 0;if(e.mode==="all-markup"&&o.revisionKind||i&&i.length>0){let r=Re$1(o)?Math.max(o.box.y,...o.cells.map(s=>s.box.y+s.box.height)):o.box.y+o.box.height,a={top:o.box.y+e.dy,bottom:Math.min(r+e.dy,e.limit),story:e.story,author:o.revisionAuthor,insertion:o.revisionKind==="insert",deletion:o.revisionKind==="delete",format:false};i&&on(a,i),n.push(a);}for(let r of o.cells){if(r.textDirection==="btLr"){let a=[];if(Ie(r.blocks,e,a),a.length===0)continue;let s={top:r.box.y+e.dy,bottom:Math.min(r.box.y+r.box.height+e.dy,e.limit),story:e.story,insertion:false,deletion:false,format:false};for(let l of a)s.insertion||=l.insertion,s.deletion||=l.deletion,s.format||=l.format;s.bottom>s.top&&n.push(s);continue}Ie(r.blocks,e,n);}}}function Ie(t,e,n){for(let o of t)o.kind==="table"?tr(o,e,n):rn(o,e,n);}function nr(t){t.sort((n,o)=>n.top-o.top||n.bottom-o.bottom);let e=[];for(let n of t){let o=e[e.length-1];if(o&&o.story===n.story&&o.author===n.author&&n.top<=o.bottom+er){o.bottom=Math.max(o.bottom,n.bottom),o.insertion||=n.insertion,o.deletion||=n.deletion,o.format||=n.format;continue}e.push({...n});}return e}function Oe(t,e,n,o=false,i,r=false,a){let s=[];if(n==="none"||i?.changedLines.mark==="none")return {mode:n,toggle:o,left:0,runs:s,signature:"none"};let l=t.box.height,d=t.contentBox.y-t.box.y+t.contentBox.height,c={x:t.box.x,y:t.box.y};Da(t,g=>{if(g.story==="note-separator")return;let x={mode:n,story:g.story,dy:g.origin.y-t.box.y,limit:g.story==="body"?d:l};Ie(g.host.fragments,x,s);let k=g.story==="header"||g.story==="footer"?v=>ya(v,g.origin,c):void 0;Ha$1(g.host,(v,R)=>{R.textboxDepth!==0&&rn(v,{mode:n,story:g.story,dy:R.storyOrigin.y-t.box.y,limit:l},s);},g.origin,k);});let u=i?.changedLines.mark==="rightBorder"||i?.changedLines.mark==="outsideBorder"&&r&&t.index%2===0,p=Math.round((u?t.box.width-Math.max(0,(t.box.width-t.contentBox.width-(t.contentBox.x-t.box.x))/2):Math.max(0,(t.contentBox.x-t.box.x)/2))*e),h=i?Ya(i.changedLines.color,"var(--doc-review-author-0)",n==="simple-markup"?"var(--doc-review-change-bar-simple)":"var(--doc-review-change-bar)"):void 0,y=nr(s);if(i?.changedLines.color==="byAuthor")for(let g of y)g.color=a?.styles.get(g.author??"")?.color??B(a?.authorSlots.get(g.author??"")??0);let f=`${n}|${o?"t":""}|${p}|${h??""}`;for(let g of y)f+=`|${g.story}:${g.top.toFixed(3)}-${g.bottom.toFixed(3)}${g.insertion?"i":""}${g.deletion?"d":""}${g.format?"f":""}:${g.color??""}`;return {mode:n,toggle:o,left:p,runs:y,signature:f,...h?{color:h}:{}}}function an(t,e,n){if(e.runs.length===0)return null;let o=e.mode==="simple-markup",i=t.createElement("div");i.className=nn,i.dataset.docxChangeBars=e.signature,i.dataset.docxChangeBarsMode=e.mode,i.setAttribute("aria-hidden","true"),i.setAttribute("contenteditable","false"),i.style.position="absolute",i.style.inset="0",i.style.pointerEvents="none";for(let r of e.runs){let a=t.createElement("div");a.className=me,r.insertion&&a.classList.add(`${me}-insertion`),r.deletion&&a.classList.add(`${me}-deletion`),r.format&&a.classList.add(`${me}-format`),a.dataset.docxStory=r.story,a.style.position="absolute",a.style.left=`${e.left}px`,a.style.top=`${r.top*n}px`,a.style.height=`${(r.bottom-r.top)*n}px`,a.style.width=o?"var(--doc-review-change-bar-simple-width)":"var(--doc-review-change-bar-width)",a.style.backgroundColor=r.color??e.color??(o?"var(--doc-review-change-bar-simple)":"var(--doc-review-change-bar)"),e.toggle?(a.dataset.docxChangeBarToggle="",a.style.pointerEvents="auto",a.style.cursor="pointer"):a.style.pointerEvents="none",i.append(a);}return i}function sn(t,e,n,o,i=false,r,a=false,s){return an(t,Oe(e,n,o,i,r,a,s),n)}function ln(t,e,n,o,i,r=false,a,s=false,l){let d=e.querySelector(`:scope > .${nn}`),c=Oe(n,o,i,r,a,s,l);if(d&&d.dataset.docxChangeBars===c.signature)return;d?.remove();let u=an(t,c,o);u&&e.append(u);}function be(t,e,n){return !!n.activeHeaderFooterRId&&!!t.rId&&n.activeHeaderFooterRId===t.rId&&(n.activeHeaderFooterPageIndex===void 0||n.activeHeaderFooterPageIndex===e)}function Ne(t,e,n){return n?t.kind==="footer"?Math.max(t.box.height,e.box.y+e.box.height-t.box.y):Math.max(t.box.height,e.contentBox.y-t.box.y):t.box.height}function or(t,e){let{box:n}=e,o=t.contentBox,i=e.kind==="header"?n.y:Math.max(n.y,o.y+o.height),r=e.kind==="header"?Math.min(n.y+n.height,o.y):n.y+n.height;return r>i?{x:n.x,y:i,width:n.width,height:r-i}:null}function rr(t,e){let n=e.box,o=t.contentBox;return n.x<o.x+o.width&&o.x<n.x+n.width&&n.y<o.y+o.height&&o.y<n.y+n.height}function dn(t,e,n,o,i){let r=o.box;if(rr(n,o)){e.dataset.docxHfOverBody="";let s=or(n,o);if(!s)return null;let l=t.createElement("div");l.className="docx-hf-hover",l.dataset.docxHfHover=o.kind,l.setAttribute("contenteditable","false"),l.style.position="absolute",l.style.left=`${(s.x-n.box.x)*i}px`,l.style.top=`${(s.y-n.box.y)*i}px`,l.style.width=`${s.width*i}px`,l.style.height=`${s.height*i}px`,e.before(l),r=s;}let a=t.createElement("div");return a.className="docx-hf-edit-hint",a.dataset.docxHfHint=o.kind,a.setAttribute("contenteditable","false"),a.style.position="absolute",a.style.left=`${(r.x-n.box.x)*i}px`,a.style.width=`${r.width*i}px`,a.style.top=o.kind==="header"?`${(r.y+r.height-n.box.y)*i}px`:`${(r.y-n.box.y)*i}px`,o.kind==="footer"&&(a.style.transform="translateY(-100%)"),a}function cn(t,e){for(let{record:n,element:o,materialized:i}of t){if(!i)continue;let r=o.querySelector(":scope > .docx-page-content");r&&xe(r,"contenteditable",e.activeHeaderFooterRId?"false":null);let a=null;for(let s of o.querySelectorAll(":scope > .docx-hf:not(.docx-hf--placeholder)")){let l=ir(n,s);if(!l)continue;let d=be(l,n.index,e);d&&(a=l.kind),ar(s,n,l,d,e.scale);}xe(o,"data-docx-hf-active-kind",a);for(let s of o.querySelectorAll(":scope > [data-docx-hf-front]")){let l=un(n,s.dataset.docxHfFront);yn(s,!!l&&be(l,n.index,e));}}}function ir(t,e){return un(t,e.dataset.docxHf)}function un(t,e){if(e==="header")return t.header;if(e==="footer")return t.footer}function ar(t,e,n,o,i){xe(t,"data-docx-hf-active",o?"":null),xe(t,"contenteditable",o?"true":"false");let r=`${Ne(n,e,o)*i}px`;t.style.height!==r&&(t.style.height=r),yn(t,o);}function xe(t,e,n){t.getAttribute(e)!==n&&(n===null?t.removeAttribute(e):t.setAttribute(e,n));}function yn(t,e){let n=t.querySelectorAll(t.nodeType===1&&t.classList.contains("docx-drawing-layer")?":scope > *":":scope > .docx-drawing-layer > *"),o=e?"auto":"none";for(let i of n){i.style.pointerEvents!==o&&(i.style.pointerEvents=o);for(let r of i.querySelectorAll(".docx-drawing"))r.style.pointerEvents!==o&&(r.style.pointerEvents=o);}}function pn(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function hn(t,e,n){let o=e.paintBounds,i=ya(e,t.box,n),r=i.x-e.x,a=i.y-e.y,s=l=>Object.freeze({x:l.x+r,y:l.y+a,width:l.width,height:l.height});return Object.freeze({...e,x:e.x+r,y:e.y+a,paintBounds:s(o),hitBounds:s(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:s(e.geometry.contentBounds),paintBounds:s(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(l=>Object.freeze({x:l.x+r,y:l.y+a})))}:{}})})}function sr(t,e,n,o,i){let r=n.anchoredDrawings??[];if(r.length===0)return;let a=r.map(l=>hn(n,l,i)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=n.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",o.appendDrawings(s,a,i,"behind",false),s.childElementCount>0&&e.append(s);}function lr(t,e,n,o,i,r){let{scale:a}=i.chrome,s=t.createElement("div");s.className="docx-hf",s.dataset.docxHf=o.kind,o.rId&&(s.dataset.docxRId=o.rId),r?(s.dataset.docxHfActive="",s.setAttribute("contenteditable","true")):s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.left=`${(o.box.x-n.box.x)*a}px`,s.style.top=`${(o.box.y-n.box.y)*a}px`,s.style.width=`${o.box.width*a}px`,s.style.height=`${Ne(o,n,r)*a}px`,s.style.overflow="visible";let l=(n.box.x-o.box.x)*a,d=(n.box.y-o.box.y)*a,c=l+n.box.width*a,u=d+n.box.height*a;s.style.clipPath=`polygon(${l}px ${d}px, ${c}px ${d}px, ${c}px ${u}px, ${l}px ${u}px)`;for(let y of o.fragments)s.append(i.paintFragment(y,o.box.x-n.box.x));let p=(o.anchoredDrawings??[]).filter(y=>!pn(y)),h=Object.freeze({x:0,y:0,width:o.box.width,height:o.box.height});return i.appendDrawings(s,p,h,"inFront",r),e.append(s),s}function fn(t,e,n,o){let i=Object.freeze({x:n.box.x,y:n.box.y,width:n.box.width,height:n.box.height}),r=[n.header,n.footer].filter(s=>!!s);for(let s of r)sr(t,e,s,o,i);let a=[];for(let s of r){let l=be(s,n.index,o.chrome),d=lr(t,e,n,s,o,l),c=dn(t,d,n,s,o.chrome.scale);c&&a.push(c);let u=(s.anchoredDrawings??[]).filter(pn).map(p=>hn(s,p,i));o.appendDrawings(e,u,i,"inFront",l,s.kind);}return a}var dr=0;function gn(t,e,n,o){if(o===void 0||!Number.isFinite(o)||o<0||o>1)return;let i="http://www.w3.org/2000/svg",r=(u,p)=>{let h=t.createElementNS(i,u);for(let[y,f]of Object.entries(p))h.setAttribute(y,f);return h},a=`docx-bilevel-${++dr}`,s=r("svg",{width:"0",height:"0","aria-hidden":"true"});s.style.position="absolute",s.style.pointerEvents="none";let l=r("filter",{id:a,"color-interpolation-filters":"sRGB"});l.append(r("feColorMatrix",{type:"saturate",values:"0"}));let d=r("feComponentTransfer",{}),c=Array.from({length:256},(u,p)=>p/255>=o?1:0).join(" ");for(let u of ["R","G","B"])d.append(r(`feFunc${u}`,{type:"discrete",tableValues:c}));l.append(d),s.append(l),e.append(s),n.style.filter=`${n.style.filter} url(#${a})`.trim();}function mn(t){return Math.max(-1,Math.min(1,t))}function bn(t,e){if(!Number.isFinite(t)||!Number.isFinite(e))return null;let n=mn(t/100),o=mn(e/100);if(n===0&&o===0)return null;let i=o>=0?Math.min(1e3,1/(1-o)):Math.max(0,1+o),r=.5-n/2,a=r+n-i*r;return Object.freeze({slope:i,intercept:a})}function ve(t){if(!Number.isFinite(t))return "0";let e=Math.round(t*1e6)/1e6;return String(Object.is(e,-0)?0:e)}function cr(t){let{slope:e,intercept:n}=t;if(n>=0){let i=e+2*n;return i<=0?"brightness(0)":`contrast(${ve(e/i)}) brightness(${ve(i)})`}let o=1-2*n;return `brightness(${ve(e/o)}) contrast(${ve(o)})`}function _e(t){let e=[];t.grayscale&&e.push("grayscale(1)");let n=bn(t.brightness,t.contrast);n&&e.push(cr(n));let{opacity:o}=t;return o!==void 0&&Number.isFinite(o)&&o>=0&&o<1&&e.push(`opacity(${Math.round(o*1e3)/1e3})`),e.length>0?e.join(" "):void 0}var xn="http://www.w3.org/2000/svg",ur=0;function vn(t,e){let{cx:n,cy:o}=t.extentEmu;if(n>0&&o>0)return {viewBox:[0,0,n,o],frame:e};let i=1;for(let a of t.components)i=Math.max(i,a.strokeWidthEmu);if(n<=0){let a=o>0?e.height/o:0;return {viewBox:[-i,0,2*i,Math.max(1,o)],frame:{...e,x:e.x-i*a,width:2*i*a}}}let r=e.width/n;return {viewBox:[0,-i,n,2*i],frame:{...e,y:e.y-i*r,height:2*i*r}}}function kn(t,e,n,o,i){let r=`docx-inset-${++ur}`,a=t.createElementNS(xn,"clipPath");a.setAttribute("id",r);let s=t.createElementNS(xn,"path");s.setAttribute("d",o),s.setAttribute("clip-rule","evenodd"),a.append(s),e.append(a),n.setAttribute("stroke-width",String(2*Math.max(1,i))),n.setAttribute("clip-path",`url(#${r})`);}var ze="http://www.w3.org/2000/svg";function H(t){return Number.isFinite(t)?String(t):"0"}function Ke(t,e,n,o,i){if(o===n)return;let r=a=>`${H(-a*i)}px`;t.style.overflow="visible",t.style.clipPath=`inset(${r(n.y-o.y)} ${r(o.x+o.width-(n.x+n.width))} ${r(o.y+o.height-(n.y+n.height))} ${r(n.x-o.x)})`,e.style.pointerEvents="none";}function je(t,e,n){let o=e.vectorShape,i=e.geometry.contentBounds,r=e.paintBounds,a=t.createElement("div");a.className="docx-drawing-image-frame",a.style.position="absolute";let s=vn(o,i);a.style.left=`${(s.frame.x-r.x)*n}px`,a.style.top=`${(s.frame.y-r.y)*n}px`,a.style.width=`${s.frame.width*n}px`,a.style.height=`${s.frame.height*n}px`;let l=t.createElementNS(ze,"svg");l.setAttribute("viewBox",s.viewBox.map(H).join(" ")),l.setAttribute("preserveAspectRatio","none"),l.setAttribute("width","100%"),l.setAttribute("height","100%"),l.style.display="block",l.style.overflow="visible";for(let d of o.components){let c=t.createElementNS(ze,"path"),u=d.subpathsEmu.map((p,h)=>`M${p.map(y=>`${H(y.x)} ${H(y.y)}`).join("L")}${d.subpathsClosed?.[h]===false?"":"Z"}`).join("");if(c.setAttribute("d",u),c.setAttribute("fill",d.fillHex!==null?`#${d.fillHex}`:"none"),c.setAttribute("fill-rule","evenodd"),d.fillAlpha<1&&c.setAttribute("fill-opacity",H(Math.max(0,d.fillAlpha))),d.strokeHex!==null&&(c.setAttribute("stroke",`#${d.strokeHex}`),c.setAttribute("stroke-width",H(Math.max(1,d.strokeWidthEmu))),d.strokeCap&&c.setAttribute("stroke-linecap",d.strokeCap),d.strokeJoin&&c.setAttribute("stroke-linejoin",d.strokeJoin),d.strokeInset&&kn(t,l,c,u,Le$1(d.strokeWidthEmu)),d.strokeAlpha<1&&c.setAttribute("stroke-opacity",H(Math.max(0,d.strokeAlpha)))),l.append(c),d.strokeHex!==null)for(let p of d.arrowheadsEmu??[]){let h=t.createElementNS(ze,"path");h.setAttribute("d",`M${p.map(y=>`${H(y.x)} ${H(y.y)}`).join("L")}Z`),h.setAttribute("fill",`#${d.strokeHex}`),h.setAttribute("fill-opacity",H(Math.max(0,Math.min(1,d.strokeAlpha)))),h.setAttribute("data-docx-line-end","triangle"),l.append(h);}}return a.append(l),a}function Ue(t,e,n,o){let i=e.groupTextboxStories;if(!i||e.accessibility.hidden||!n.paintStoryFragment)return null;let r=e.paintBounds;if(r.width<=0||r.height<=0)return null;let a=n.scale,s=t.createElement("div");s.className="docx-drawing-group-text",s.dataset.groupTextFor=e.drawingNodeId,s.setAttribute("contenteditable","false");let l=o?.x??0,d=o?.y??0;s.style.position="absolute",s.style.left=`${(r.x-l)*a}px`,s.style.top=`${(r.y-d)*a}px`,s.style.width=`${r.width*a}px`,s.style.height=`${r.height*a}px`,s.style.overflow="hidden",s.style.pointerEvents="none";let c=e.x-r.x,u=e.y-r.y;for(let p of i){let h=p.story,y=t.createElement("div");y.className="docx-drawing-textbox-content",y.style.position="absolute",y.style.left=`${(c+p.box.x+h.contentOffset.x)*a}px`,y.style.top=`${(u+p.box.y+h.contentOffset.y)*a}px`,y.style.width=`${h.contentWidth*a}px`,y.style.height=`${Math.max(0,h.contentHeight)*a}px`,y.style.overflow="hidden";let f=p.rotationDegrees;if(f!==0&&Number.isFinite(f)){let g=p.box.width/2-h.contentOffset.x,x=p.box.height/2-h.contentOffset.y;y.style.transformOrigin=`${g*a}px ${x*a}px`,y.style.transform=`rotate(${f}deg)`;}for(let g of h.fragments)y.append(n.paintStoryFragment(t,g,{readOnly:true}));for(let g of y.querySelectorAll('[style*="pointer-events"]'))g.style.pointerEvents="none";s.append(y);}return s}var Ge="http://www.w3.org/2000/svg",$=t=>Number.isFinite(t)?String(t):"0";function Rn(t,e){t.setAttribute("fill",e.fillHex!==null?`#${e.fillHex}`:"none"),e.fillHex!==null&&e.fillAlpha<1&&t.setAttribute("fill-opacity",$(Math.max(0,e.fillAlpha))),e.strokeHex!==null&&(t.setAttribute("stroke",`#${e.strokeHex}`),t.setAttribute("stroke-width",$(e.strokeWidthPt)),t.setAttribute("stroke-linejoin","round"),e.strokeAlpha<1&&t.setAttribute("stroke-opacity",$(Math.max(0,e.strokeAlpha))));}function Sn(t,e,n,o,i){let r=e.textArt,a=e.paintBounds,s=t.createElement("div");s.className="docx-drawing docx-drawing-text-art",o||(s.dataset.drawingNodeId=e.drawingNodeId),s.style.position="absolute",s.style.left=`${(a.x-(i?.x??0))*n}px`,s.style.top=`${(a.y-(i?.y??0))*n}px`,s.style.width=`${a.width*n}px`,s.style.height=`${a.height*n}px`,s.style.overflow="hidden",s.style.pointerEvents="none",s.setAttribute("role","img"),s.setAttribute("aria-label",e.accessibility.label||r.text);let l=t.createElementNS(Ge,"svg");if(l.setAttribute("viewBox",`0 0 ${$(e.width)} ${$(e.height)}`),l.setAttribute("preserveAspectRatio","none"),l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.left=`${(e.x-a.x)*n}px`,l.style.top=`${(e.y-a.y)*n}px`,l.style.width=`${e.width*n}px`,l.style.height=`${e.height*n}px`,l.style.overflow="visible",r.rotationDegrees&&(l.style.transformOrigin="50% 50%",l.style.transform=`rotate(${$(r.rotationDegrees)}deg)`),r.path!==null){let d=t.createElementNS(Ge,"path");d.setAttribute("d",r.path),Rn(d,r),l.append(d);}else if(r.fit!==null){let d=t.createElementNS(Ge,"text"),{scaleX:c,scaleY:u,offsetX:p,offsetY:h}=r.fit;d.setAttribute("transform",`matrix(${$(c)} 0 0 ${$(u)} ${$(p)} ${$(h)})`),d.setAttribute("font-family",r.fontFamily),d.setAttribute("font-size",$(r.fontSizePt)),d.setAttribute("font-weight",r.bold?"bold":"normal"),d.setAttribute("font-style",r.italic?"italic":"normal"),d.setAttribute("xml:space","preserve"),Rn(d,r),d.textContent=r.text,l.append(d);}return s.append(l),s}var yr=new Map([["image/svg+xml","SVG"],["image/tiff","TIFF"],["image/x-emf","EMF"],["image/x-wmf","WMF"]]),pr="Unknown",Re=new WeakMap,ke=new WeakMap,hr=256;function Mn(t,e){let n=Re.get(t);if(n)return n;let o=new Map,i=new Map;return n=Object.freeze({urlForReady(r,a){let s=o.get(r.resourceKey);if(s)return s;let l;try{l=e.create(r,a);}catch(d){if(d instanceof Error&&d.message.startsWith("PaintImageUrlSource:"))return null;throw d}return o.set(r.resourceKey,l),l},imageFor(r,a,s){let l=i.get(r);if(l&&l.resourceKey===a)return l.element;let d=s.createElement("img");return i.size<hr&&i.set(r,{element:d,resourceKey:a,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(r){return i.get(r)?.element??null},readyElementFor(r){return i.get(r)?.readyElement??null},rememberReadyElement(r,a){let s=i.get(r);s&&i.set(r,{...s,readyElement:a});},reconcile(r,a){for(let[s,l]of o)r.has(s)||(e.revoke(l),o.delete(s));for(let[s,l]of i)a.has(s)||(l.element.removeAttribute("src"),i.delete(s));},revokeAll(){for(let r of o.values())e.revoke(r);o.clear();for(let r of i.values())r.element.removeAttribute("src");i.clear();}}),Re.set(t,n),n}function We(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function Ca(t){Re.get(t)?.revokeAll(),Re.delete(t);}function V(t){return Number.isFinite(t)?String(t):"0"}function Ln(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let n=[];for(let o of t){if(!Number.isFinite(o.x)||!Number.isFinite(o.y))return null;let i=(o.x-e.x)/e.width*100,r=(o.y-e.y)/e.height*100;n.push(`${V(i)}% ${V(r)}%`);}return `polygon(${n.join(", ")})`}function Pn(t){let e=t.geometry.contentBounds;return Ne$1({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function Tn(t,e){let{crop:n}=t,o=Math.max(0,Math.min(1,n.left)),i=Math.max(0,Math.min(1,n.top)),r=Math.max(0,Math.min(1,n.right)),a=Math.max(0,Math.min(1,n.bottom)),s=Math.max(1e-4,1-o-r),l=Math.max(1e-4,1-i-a);return Object.freeze({width:`${V(1/s*100)}%`,height:`${V(1/l*100)}%`,left:`${V(-o/s*100)}%`,top:`${V(-i/l*100)}%`})}function fr(t,e){let{resource:n}=t;switch(n.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(n.reason){case "unsupported-format":return e.unsupportedFormat(yr.get(n.mime)??pr);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function D(t,e,n){let{accessibility:o}=e;o.hidden||(t.setAttribute("role",n?"link":"img"),o.label?t.setAttribute("aria-label",o.label):n||t.setAttribute("aria-hidden","true"));}function Y(t,e,n,o){let i=o?.x??0,r=o?.y??0;t.style.position="absolute",t.style.left=`${(e.x-i)*n}px`,t.style.top=`${(e.y-r)*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function An(t){let e=t.groupPicture?t.geometry.imageTransformCorners:void 0;if(!e||e.length===0)return t.geometry.contentBounds;let n=1/0,o=1/0,i=-1/0,r=-1/0;for(let a of e)n=Math.min(n,a.x),o=Math.min(o,a.y),i=Math.max(i,a.x),r=Math.max(r,a.y);return {x:n,y:o,width:i-n,height:r-o}}function gr(t,e,n,o,i){let r=t.paintBounds,a=An(t),s=Tn(t);return [o,n.scale,i?.x??0,i?.y??0,r.x,r.y,r.width,r.height,a.x,a.y,a.width,a.height,Ln(t.geometry.clipPolygon??[],r)??"",_e(t.effects)??"",t.effects.bilevel??"",Pn(t)??"",s.width,s.height,s.left,s.top,n.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function ie(t,e,n,o){let i=t.createElement("div");i.className="docx-drawing docx-drawing-placeholder",n.unbound||(i.dataset.drawingNodeId=e.drawingNodeId),Y(i,e.paintBounds,n.scale,o);let r=t.createElement("div");r.className="docx-drawing-placeholder-card";let a=t.createElement("span");return a.className="docx-drawing-placeholder-label",a.textContent=fr(e,n.strings),r.append(a),i.append(r),e.hyperlinkHref&&!n.inertLinks?(i.dataset.docxDrawingLink=e.drawingNodeId,i.dataset.docxDrawingLinkKind="external",i.dataset.docxDrawingLinkHref=e.hyperlinkHref,i.setAttribute("tabindex","-1"),D(i,e,true)):D(i,e,false),i}function mr(t,e,n,o,i,r){let a=e.resource;if(a.kind!=="ready")return ie(t,e,n,r);let s=We(e,n),l=i?.readyElementFor?.(s)??t.createElement("div"),d=gr(e,a,n,o,r),c=!e.vectorShape;if(c&&ke.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",n.unbound||(l.dataset.drawingNodeId=e.drawingNodeId),delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),Y(l,e.paintBounds,n.scale,r);let u=t.createElement("div");u.className="docx-drawing-image-frame",u.style.position="absolute";let p=An(e),h=e.paintBounds,y=Ln(e.geometry.clipPolygon??[],e.groupPicture?p:h);y&&((e.groupPicture?u:l).style.clipPath=y),u.style.left=`${(p.x-h.x)*n.scale}px`,u.style.top=`${(p.y-h.y)*n.scale}px`,u.style.width=`${p.width*n.scale}px`,u.style.height=`${p.height*n.scale}px`;let f=_e(e.effects);f&&(u.style.filter=f);let g=t.createElement("div");g.className="docx-drawing-transform-stage",g.style.position="relative",g.style.width="100%",g.style.height="100%";let x=Pn(e);x&&(g.style.transform=x,g.style.transformOrigin="0 0");let k=t.createElement("div");k.className="docx-drawing-crop-viewport",k.style.position="relative",k.style.width="100%",k.style.height="100%",k.style.overflow="hidden";let v=i?.imageFor?.(s,a.resourceKey,t)??t.createElement("img");v.className="docx-drawing-image",v.setAttribute("draggable","false"),v.getAttribute("src")!==o&&v.setAttribute("src",o),v.setAttribute("alt","");let R=Tn(e);if(v.style.position="absolute",v.style.width=R.width,v.style.height=R.height,v.style.left=R.left,v.style.top=R.top,v.style.maxWidth="none",v.style.maxHeight="none",k.append(v),g.append(k),u.append(g),l.replaceChildren(u),e.vectorShape){let j=je(t,e,n.scale),L=e.paintBounds;Ke(l,j,L,N(e,L),n.scale),l.append(j);}return gn(t,l,u,e.effects.bilevel),e.hyperlinkHref&&!n.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),D(l,e,true)):D(l,e,false),i?.rememberReadyElement?.(s,l),c?ke.set(l,d):ke.delete(l),l}function br(t,e,n,o,i){let r=t.createElement("div");r.className="docx-drawing docx-drawing-shape",n.unbound||(r.dataset.drawingNodeId=e.drawingNodeId);let a=e.paintBounds;Y(r,a,n.scale,i);let s=je(t,e,n.scale);return Ke(r,s,a,o,n.scale),r.append(s),e.hyperlinkHref&&!n.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),D(r,e,true)):D(r,e,false),r}function xr(t,e,n,o,i){let r=o.scale,a=t.createElement("div");a.className="docx-drawing docx-drawing-textbox",o.unbound||(a.dataset.drawingNodeId=e.drawingNodeId),a.setAttribute("contenteditable","false"),Y(a,e.paintBounds,o.scale,i),a.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*r,l=(e.y-e.paintBounds.y)*r;if(n.fillHex!==null||n.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*r}px`,c.style.height=`${e.height*r}px`,c.style.boxSizing="border-box",n.fillHex!==null&&(c.style.backgroundColor=`#${n.fillHex}`),n.strokeHex!==null&&(c.style.border=`${Math.max(n.strokeWidthPt*r,.5)}px solid #${n.strokeHex}`),a.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+n.contentOffset.x*r}px`,d.style.top=`${l+n.contentOffset.y*r}px`,d.style.width=`${n.contentWidth*r}px`,d.style.height=`${Math.max(0,n.contentHeight)*r}px`,d.style.overflow="hidden";for(let c of n.fragments)d.append(o.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))c.dataset.textboxParagraphId=c.dataset.paragraphId,delete c.dataset.paragraphId;return a.append(d),D(a,e,false),a}function vr(t,e,n){let o=n.revisionStyles,i=G(e.revisions,o?.authorSlots,o?.styles);if(!i){if(t.dataset.revisionKind===void 0)return;t.classList.remove("docx-drawing--revision","docx-drawing--revision-insertion","docx-drawing--revision-deletion"),delete t.dataset.revisionKind,delete t.dataset.revisionId,delete t.dataset.reviewAuthor,delete t.dataset.revisionDate,delete t.dataset.reviewAuthorSlot;return}let{attribution:r}=i;t.classList.add("docx-drawing--revision",i.deleted?"docx-drawing--revision-deletion":"docx-drawing--revision-insertion"),t.classList.remove(i.deleted?"docx-drawing--revision-insertion":"docx-drawing--revision-deletion"),t.dataset.revisionKind=r.kind,t.dataset.revisionId=r.id,r.author!==""?t.dataset.reviewAuthor=r.author:delete t.dataset.reviewAuthor,r.date!==void 0?t.dataset.revisionDate=r.date:delete t.dataset.revisionDate,o?t.dataset.reviewAuthorSlot=String((o.authorSlots.get(r.author)??0)%A):delete t.dataset.reviewAuthorSlot;}function Bn(t,e,n,o,i){let r=kr(t,e,n,o,i);return r&&vr(r,e,n),r}function kr(t,e,n,o,i){if(e.accessibility.hidden)return null;let r=e.vectorShape?N(e,e.paintBounds):e.paintBounds;if(r.width<=0||r.height<=0)return null;if(e.textboxStory!==void 0&&n.paintStoryFragment!==void 0)return xr(t,e,e.textboxStory,n,i);if(e.kind==="anchoredDrawing"&&e.textArt)return Sn(t,{...e,textArt:e.textArt},n.scale,!!n.unbound,i);if(e.groupTextboxStories&&!e.groupPicture&&!e.vectorShape){let d=t.createElement("div");return d.className="docx-drawing docx-drawing-group-frame",n.unbound||(d.dataset.drawingNodeId=e.drawingNodeId),Y(d,e.paintBounds,n.scale,i),D(d,e,false),d}let{resource:a}=e,s=a.kind==="ready"&&n.imageUrlPort&&o?o.urlForReady(a.validatedHandle,a.mime):null;if(e.groupPicture&&a.kind!=="pending"&&!s)return ie(t,e,n,i);let l=e.groupPicture!==void 0&&s!==null;if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0&&!l)return br(t,e,n,r,i);if(a.kind==="ready")return !s||!o?ie(t,e,n,i):mr(t,e,n,s,o,i);if(a.kind==="pending"){let d=o?.readyElementFor?.(We(e,n))??o?.imageForPending?.(We(e,n))?.closest(".docx-drawing-ready");return d?(ke.delete(d),n.unbound||(d.dataset.drawingNodeId=e.drawingNodeId),Y(d,e.paintBounds,n.scale,i),d):ie(t,e,n,i)}return ie(t,e,n,i)}function $n(t,e,n,o,i){let r=[];for(let a of e.drawings??[]){let s=Bn(t,a,n,o,i);s&&r.push(s);let l=Ue(t,a,n,i);l&&r.push(l);}return Object.freeze(r)}function Cn(t,e,n,o,i,r){let a=[];for(let s of e){if(Fb(s)!==n)continue;let l=Bn(t,s,o,i,r);l&&(l.dataset.drawingLayer=n,a.push(l));let d=Ue(t,s,o,r);d&&(d.dataset.drawingLayer=n,a.push(d));}return Object.freeze(a)}var wn=new WeakMap;function Rr(t){let e=wn.get(t);if(e)return e;let n=[],o=[];Da(t,({host:r})=>{(!("anchoredDrawings"in r)||(r.anchoredDrawings?.length??0)===0)&&ne(r.fragments).drawingFree||(Fa(r,a=>{a.resource.kind==="ready"&&n.push(a.resource.resourceKey),o.push(`p${t.index}|${a.drawingNodeId}`);}),Ha$1(r,a=>{let s=a.marker?.picture;s?.resource.kind==="ready"&&n.push(s.resource.resourceKey);}));});let i=Object.freeze({resourceKeys:Object.freeze(n),elementKeys:Object.freeze(o)});return wn.set(t,i),i}var En=new WeakMap;function Hn(t){let e=En.get(t);if(e)return e;let n=new Set,o=new Set;for(let r of t.pages){let a=Rr(r);for(let s of a.resourceKeys)n.add(s);for(let s of a.elementKeys)o.add(s);}let i=Object.freeze({resourceKeys:n,elementKeys:o});return En.set(t,i),i}function Fn(t){return Hn(t).resourceKeys}function Dn(t){return Hn(t).elementKeys}function In(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var Xe=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function Ha(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}function Sr(t,e,n){t.style.position="absolute",t.style.left=`${e.x*n}px`,t.style.top=`${e.y*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`;}function Ve(t,e,n,o){let i=t.createElement("span");return i.className=e,i.setAttribute("aria-hidden","true"),i.style.position="absolute",i.style.display="block",i.style.left=`${n.x*o}px`,i.style.top=`${n.y*o}px`,i.style.width=`${n.width*o}px`,i.style.height=`${n.height*o}px`,i.style.backgroundColor="currentColor",i.style.pointerEvents="none",i}function E(t,e,n,o,i=0,r=0,a=[],s){let l=i+n.box.x,d=r+n.box.y,c=[...a,n.kind];switch(n.kind){case "text":case "fallback":{let u=t.createElement("span");u.className=["docx-equation-node",...c.map(p=>`docx-equation-${p}`)].join(" "),Sr(u,{x:l,y:d,width:n.box.width,height:n.box.height},o),u.textContent=n.text,u.style.display="block",n.runStyle&&s&&(u.style.fontWeight=n.runStyle.bold?"bold":"normal",u.style.fontStyle=n.runStyle.italic?"italic":"normal",s(u,n.runStyle)),u.style.fontSize=`${n.fontSizePt*o}px`,u.style.lineHeight=`${n.box.height*o}px`,u.style.whiteSpace="pre",e.append(u);break}case "row":for(let u of n.items)E(t,e,u,o,l,d,c,s);break;case "fraction":E(t,e,n.numerator,o,l,d,c,s),e.append(Ve(t,"docx-equation-fraction-bar",{...n.bar,x:l+n.bar.x,y:d+n.bar.y},o)),E(t,e,n.denominator,o,l,d,c,s);break;case "radical":E(t,e,n.sign,o,l,d,c,s),n.degree&&E(t,e,n.degree,o,l,d,c,s),e.append(Ve(t,"docx-equation-radical-bar",{...n.bar,x:l+n.bar.x,y:d+n.bar.y},o)),E(t,e,n.radicand,o,l,d,c,s);break;case "bar":E(t,e,n.body,o,l,d,c,s),e.append(Ve(t,"docx-equation-bar",{...n.bar,x:l+n.bar.x,y:d+n.bar.y},o));break;case "script":E(t,e,n.base,o,l,d,c,s),n.subscript&&E(t,e,n.subscript,o,l,d,c,s),n.superscript&&E(t,e,n.superscript,o,l,d,c,s);break;case "nary":E(t,e,n.operator,o,l,d,c,s),n.lowerLimit&&E(t,e,n.lowerLimit,o,l,d,c,s),n.upperLimit&&E(t,e,n.upperLimit,o,l,d,c,s),E(t,e,n.body,o,l,d,c,s);break}}function On(t,e,n,o,i){let r=n.geometry;e.className="layout-run docx-equation",e.dataset.docxEquation=n.sourceNodeId,e.setAttribute("contenteditable","false"),e.setAttribute("role","math"),n.fallbackText&&e.setAttribute("aria-label",n.fallbackText),e.style.position="relative",e.style.display="inline-block",e.style.width=`${r.box.width*o}px`,e.style.height=`${r.box.height*o}px`,e.style.lineHeight="0",e.style.pointerEvents="auto",e.style.userSelect="none",e.style.verticalAlign=`${-(r.box.height-r.baseline)*o}px`;let a=t.createDocumentFragment();E(t,a,r,o,0,0,[],i),e.append(a);}function Nn(t,e,n,o){if(n.glyphOffsetPt!==void 0){let s=n.style.horizontalScalePercent/100,l=n.box.width*o;e.style.width=`${l/s}px`,s!==1&&(e.style.marginRight=`${l-l/s}px`);let d=t.createElement("span");if(d.dataset.docxGlyphOffset="",s!==1&&(d.style.letterSpacing=`${n.style.characterSpacingPt*o/s}px`),n.glyphOffsetPt){d.dataset.docxShiftedInk="",d.style.setProperty("forced-color-adjust","preserve-parent-color"),d.style.setProperty("-webkit-text-fill-color","transparent");let c=`${n.glyphOffsetPt*o/s}px`;d.style.setProperty("--docx-glyph-ink-offset",c),e.style.color&&e.style.color!=="inherit"&&d.style.setProperty("--docx-glyph-ink-color",e.style.color),d.style.textShadow=`${c} 0 currentColor`;}return e.append(d),d}let i=n.lineEndWhitespace===true;(n.style.horizontalScalePercent!==100||n.text===" "||i)&&(e.style.width=`${n.box.width*o}px`);let r=n.style.shaping!==void 0&&n.style.horizontalScalePercent!==100;if(!i&&!r||(i&&(e.style.clipPath="inset(-1em 0)"),n.style.horizontalScalePercent===100))return e;let a=t.createElement("span");if(a.dataset.docxClippedFill="",a.style.display="inline-block",a.style.transform=e.style.transform,a.style.transformOrigin=e.style.transformOrigin,r){let s=n.style.horizontalScalePercent/100;a.style.width=`${n.box.width*o/s}px`,a.style.letterSpacing=`${n.style.characterSpacingPt*o/s}px`,n.style.shaping?.wordSpacingPt&&(a.style.wordSpacing=`${n.style.shaping.wordSpacingPt*o/s}px`),a.style.direction=n.style.shaping?.direction??"ltr",a.style.transformOrigin=a.style.direction==="rtl"?"right":"left";}return a.style.textDecorationLine=e.style.textDecorationLine,a.style.textDecorationStyle=e.style.textDecorationStyle,a.style.textDecorationColor=e.style.textDecorationColor,a.style.textDecorationThickness=e.style.textDecorationThickness,a.style.textUnderlineOffset=e.style.textUnderlineOffset,e.style.removeProperty("transform"),e.style.removeProperty("transform-origin"),e.style.removeProperty("text-decoration-line"),e.style.removeProperty("text-decoration-style"),e.style.removeProperty("text-decoration-color"),e.style.removeProperty("text-decoration-thickness"),e.style.removeProperty("text-underline-offset"),e.append(a),a}function _n(t,e,n){let o=e.textOutline;if(!o||!Number.isFinite(n)||n<=0||!Number.isFinite(o.widthPt)||o.widthPt<=0||o.widthPt>1584||!/^[0-9a-f]{6}$/i.test(o.color))return;let i=o.widthPt*n;Number.isFinite(i)&&(t.setProperty("-webkit-text-stroke-width",`${i}px`),t.setProperty("-webkit-text-stroke-color",`#${o.color}`));}var wr=/^[0-9A-Fa-f]{6}$/;function Er(t,e,n){let o=t.createElement("div");o.className=`docx-page-border docx-page-border-${e.side}`,o.setAttribute("aria-hidden","true"),o.style.position="absolute";let i=e.side==="left"||e.side==="right",r=(i?e.box.width:e.box.height)*n,a=ge(e.edge.val)?r:Math.max(1,r),s=a-r;o.style.left=`${e.box.x*n-(e.side==="right"?s:0)}px`,o.style.top=`${e.box.y*n-(e.side==="bottom"?s:0)}px`,o.style.width=i?`${a}px`:`${e.box.width*n}px`,o.style.height=i?`${e.box.height*n}px`:`${a}px`;let l=e.edge.color&&wr.test(e.edge.color)?e.edge.color:"000000";return o.style.backgroundColor=`#${l}`,X(o,e.edge.val,l,i,a,n),o}function zn(t,e,n){let o=t.createElement("div");o.className="docx-page-borders",o.setAttribute("aria-hidden","true"),o.setAttribute("contenteditable","false"),o.style.position="absolute",o.style.inset="0",o.style.pointerEvents="none";for(let i of e.strokes)o.append(Er(t,i,n));return o}var Mr=/^[0-9A-Fa-f]{6}$/;function Lr(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function Ze(t){return t&&Mr.test(t)?t:"000000"}function Ye(t,e){let n=t.createElement("div");return n.className=e,n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.right="0",n.style.bottom="0",n.style.overflow="visible",n.style.pointerEvents="none",n.style.boxSizing="border-box",n}function Pr(t,e,n,o){if(!n)return;let i=`#${Ze(n.color)}`,r=`${Math.max(0,n.widthPt*o)}px`;if(t.style[`border${e}Width`]=r,t.style[`border${e}Color`]=i,n.style==="double"||n.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=Lr(n.style);}function qe(t,e,n,o,i){let r=t.createElement("div");if(r.className=i,r.dataset.edge=n.side,r.dataset.stroke=n.role,r.style.position="absolute",r.style.left=`${n.x*o}px`,r.style.top=`${n.y*o}px`,r.style.width=`${n.width*o}px`,r.style.height=`${n.height*o}px`,r.style.pointerEvents="none",n.cssStyle==="solid")r.style.backgroundColor=`#${Ze(n.color)}`;else {let a=n.side==="top"||n.side==="bottom";r.style.boxSizing="border-box",r.style[a?"borderTop":"borderLeft"]=`${(a?n.height:n.width)*o}px ${n.cssStyle} #${Ze(n.color)}`;}return e.append(r),r}function Tr(t){let e=new Set;for(let n of t)e.add(`${n.side}\0${n.role}`);return e}function Ar(t,e,n,o){let i=Tr(n),r=h=>i.has(`${h}\0middle`),a=Ye(t,"docx-table-border-double"),s=Ye(t,"docx-table-border-triple"),l=Ye(t,"docx-table-border-edge");for(let h of [a,s,l])h.style.zIndex="1";let d=false,c=false,u=false,p=[];for(let h of n){if(h.role==="edge"){u=true,p.push(qe(t,l,h,o,"docx-table-border-edge-stroke"));continue}if(r(h.side)){c=true,p.push(qe(t,s,h,o,"docx-table-border-triple-stroke"));continue}(h.role==="outer"||h.role==="inner")&&(d=true,p.push(qe(t,a,h,o,"docx-table-border-double-stroke")));}return d&&e.append(a),c&&e.append(s),u&&e.append(l),p}function Kn(t,e,n,o){let i=new Set((n?.strokes??[]).map(r=>r.side));for(let r of ["top","right","bottom","left"]){let a=`${r[0].toUpperCase()}${r.slice(1)}`;Pr(e,a,n?.[r],o),i.has(r)&&(e.style[`border${a}Style`]="none");}if(n?.strokes&&n.strokes.length>0)return Ar(t,e,n.strokes,o)}function jn(t,e,n){e.revisionKind&&(n&&(t.style.backgroundColor="transparent"),t.classList.add("docx-table-row--revision",e.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),t.dataset.revisionKind=e.revisionKind,e.revisionId!==void 0&&(t.dataset.revisionId=e.revisionId),e.revisionAuthor!==void 0&&(t.dataset.reviewAuthor=e.revisionAuthor),e.revisionDate!==void 0&&(t.dataset.revisionDate=e.revisionDate));}function Un(t,e,n,o){if(e.textDirection!=="btLr")return o;let i=t.createElement("div");return i.className="docx-table-cell-content-btlr",i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${e.box.height*n}px`,i.style.height=`${e.box.width*n}px`,i.style.transformOrigin="0 0",i.style.transform=`translateY(${e.box.height*n}px) rotate(-90deg)`,o.append(i),i}function Gn(t){let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Je(t,e,n){if(t===e)return true;if(--n.left<0||typeof t!="object"||typeof e!="object"||t===null||e===null)return false;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return false;for(let i=0;i<t.length;i+=1)if(!Je(t[i],e[i],n))return false;return true}if(Array.isArray(e)||!Gn(t)||!Gn(e))return false;let o=Object.keys(t);if(o.length!==Object.keys(e).length)return false;for(let i of o){if(!Object.prototype.hasOwnProperty.call(e,i))return false;let r=t[i],a=e[i];if(!Je(r,a,n))return false}return true}function Wn(t,e,n){for(let[o,i]of t)if(!(o.id!==e.id||n.includes(i)))return Je(o,e,{left:2e4})?i:void 0}var Qe="when-selected",Xn=new WeakMap,Vn=0;function Br(t){let e=Xn.get(t);return e||(Vn+=1,e=`alias${Vn}`,Xn.set(t,e)),e}function oo(t){return {...t,drawingStrings:t.drawingStrings??Xe,urlRegistry:t.urlRegistry??null,changeBars:t.changeBars??"none",changeBarsToggle:t.changeBarsToggle??false}}function $r(t){let e={...t,inertLinks:true,tabLeaderOriginXPt:0};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},...t.revisionStyles?{revisionStyles:t.revisionStyles}:{},...t.unbound?{unbound:true}:{},paintStoryFragment:(n,o,i)=>{let r=i?.readOnly?{...e,unbound:true}:e;return o.kind==="table"?K(n,o,r):z(n,o,r)}})}function ro(t){return Object.freeze({ctx:$r(t),urlRegistry:t.urlRegistry})}function Yn(t,e,n,o,i,r){io(t,e,Ca$1(n),o,i,r);}function io(t,e,n,o,i,r,a=true,s){if(n.length===0)return;let l=ro(o),d=t.createElement("div");d.className=r==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",d.style.position="absolute",d.style.inset="0",d.style.pointerEvents="none",s&&(d.dataset.docxHfFront=s);for(let c of Cn(t,n,r,l.ctx,l.urlRegistry,i)){if(c.style.pointerEvents=a?"auto":"none",!a)for(let u of c.querySelectorAll(".docx-drawing"))u.style.pointerEvents="none";d.append(c);}d.childElementCount>0&&e.append(d);}var Z=/^[0-9A-Fa-f]{6}$/,qn=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,Cr=new Map(Object.entries({single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"})),Hr=new Map(Object.entries({black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"}));function Fr(t){return t.doubleStrike?"double":t.strike?"single":"none"}function Dr(t){return t==="thick"||t.endsWith("Heavy")}function ao(t){if(!t.underline)return null;let e=t.underline.color&&Z.test(t.underline.color)?t.underline.color:null;return {cssStyle:Cr.get(t.underline.variant)??"solid",color:e,heavy:Dr(t.underline.variant)}}function so(t,e,n,o){t.textDecorationLine=e,t.textDecorationStyle=n,o.color&&(t.textDecorationColor=`#${o.color}`),o.heavy&&(t.textDecorationThickness=`max(${2*o.scale}px, 0.12em)`);}function Zn(t,e,n){e!=="none"&&so(t,"line-through",e==="double"?"double":"solid",{scale:n});}function Jn(t,e,n){so(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:n});}function Ir(t,e,n){let o=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*n}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=o;}function q(t,e,n){let o=t.style,i=n.scale;_n(o,e,i);let r=ha(e);o.fontSize=`${e.fontSizePt*r*i}px`,e.bold&&(o.fontWeight="bold"),e.italic&&(o.fontStyle="italic");let a=e.fontFamily&&qn.test(e.fontFamily)?e.fontFamily:n.defaultFontFamily&&qn.test(n.defaultFontFamily)?n.defaultFontFamily:null;if(a){let d=n.fontAlias?.(a),c=S(a);o.fontFamily=d?`"${d}", "${a}", ${c}`:`"${a}", ${c}`;}e.color&&Z.test(e.color)&&(o.color=`#${e.color}`);let s=e.highlight?Hr.get(e.highlight):void 0;s?(o.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&Z.test(e.shading)&&(o.backgroundColor=`#${e.shading}`),e.caps&&(o.textTransform="uppercase"),o.fontKerning=fd(e)?"normal":"none",e.smallCaps&&(o.fontVariant="small-caps");let l=ga(e);l!==0&&(o.position="relative",o.top=`${-l*i}px`),e.characterSpacingPt!==0&&(o.letterSpacing=`${e.characterSpacingPt*i}px`),e.horizontalScalePercent!==100&&(o.transformOrigin="left",o.transform=`scaleX(${e.horizontalScalePercent/100})`);}function lo(t,e,n,o,i){let r=n===" "?null:ao(o),a=Fr(o),s=e;if(r&&a!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",Jn(l.style,r,i);let d=t.createElement("span");d.dataset.docxDeco="strike",Zn(d.style,a,i),l.append(d),e.append(l),s=d;}else r?Jn(e.style,r,i):a!=="none"&&Zn(e.style,a,i);s.textContent=n;}function I(t,e,n,o){let i=t.createElement(e);return i.style.position="absolute",i.style.left=`${n.x*o}px`,i.style.top=`${n.y*o}px`,i.style.width=`${n.width*o}px`,i.style.height=`${n.height*o}px`,i}function Or(t,e,n){let o=e.fieldAtom;!o||(t.dataset.fieldAtom=o.formField?"form":"field",o.resultStart!==void 0&&o.resultEnd!==void 0&&(t.dataset.fieldResultStart=String(o.resultStart),t.dataset.fieldResultEnd=String(o.resultEnd)),!(o.formField?n.shadeFormFields!==false:(n.fieldShading??Qe)!=="never"))||(t.classList.add("docx-field-atom"),(o.formField||(n.fieldShading??Qe)==="always")&&t.classList.add("docx-field-atom--shaded"));}function Nr(t,e,n,o,i){let r=t.createElement("span"),a=wa(e.style,e.fontSlot);if(e.equation)return n.unbound||(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)),q(r,a,n),On(t,r,e.equation,n.scale,(l,d)=>q(l,d,n)),Fe(r,e,n),r;r.className="layout-run layout-run-text",r.style.display="inline-block",r.style.verticalAlign="baseline",r.style.boxSizing="border-box",r.style.height=`${o*n.scale}px`,r.style.paddingTop=`${i*n.scale}px`,r.style.lineHeight=`${(o-i)*n.scale}px`,e.range.end>e.range.start?n.unbound||(r.dataset.paragraphId=e.range.paragraphId,r.dataset.start=String(e.range.start),r.dataset.end=String(e.range.end)):(r.setAttribute("aria-hidden","true"),r.contentEditable="false"),q(r,a,n),Or(r,e,n),Fe(r,e,n);let s=Nn(t,r,e,n.scale);if(e.text===" "){r.style.overflow="hidden",r.style.verticalAlign="top";let l=ao(e.style);l&&e.tabLeader!=="underscore"&&(r.dataset.docxTabUnderline="",Ir(r.style,l,n.scale));}return lo(t,s,hd(e),e.style,n.scale),Wt(r,e,n.scale),Gt(r,e),e.projected&&(r.dataset.docxField="",r.setAttribute("contenteditable","false"),e.noteNav?(r.style.userSelect="none",e.noteNav.direction==="to-note"?(r.dataset.docxNoteRef="",r.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&r.setAttribute("aria-description",e.text)):(r.dataset.docxNoteMarkBack="",r.dataset.docxNoteScope=e.noteNav.scopeId)):e.fieldAtom?.formControl?(r.style.userSelect="none",r.style.cursor="pointer"):(r.style.pointerEvents="none",r.style.userSelect="none")),r}function Qn(t,e,n){let o=t.createElement("a");return o.className="docx-hyperlink",o.style.cursor=!n.inertLinks&&e.href?"pointer":"default",o.dataset.docxLink=e.id,o.dataset.docxLinkKind=e.kind,o.setAttribute("tabindex","-1"),!n.inertLinks&&e.href&&(o.setAttribute("href",e.href),e.kind==="external"&&o.setAttribute("rel","noopener noreferrer")),e.tooltip&&o.setAttribute("title",e.tooltip),o.style.display="inline-block",o.style.verticalAlign="baseline",o.style.textDecoration="none",o.style.color="inherit",o}function _r(t,e,n,o=false,i=ba){let r=n.scale,a=t.createElement("div");a.className="docx-line layout-line",a.dataset.lineId=e.id,n.unbound||(a.dataset.paragraphId=e.range.paragraphId),a.style.position="absolute",a.style.top=`${e.box.y*r}px`,a.style.left=`${e.contentX*r}px`,a.style.height=`${e.box.height*r}px`,a.style.fontSize="0",a.style.whiteSpace="pre",a.style.setProperty("text-decoration-skip-ink","none"),a.style.setProperty("text-decoration-skip-spaces","none"),a.style.overflow="visible";let s=e.leading??0,l=Math.min(Math.max(s,...e.spans.map(m=>m.box.height+s),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),d=Math.max(0,e.box.height-l);a.style.boxSizing="border-box",a.style.paddingBottom=`${d*r}px`,a.style.lineHeight=`${(e.box.height-d)*r}px`;let c=null,u=null,p=null,h=new Map;for(let[m,b]of Na(e).entries())h.set(b.paragraphId,m);let y=m=>h.get(m)??0,f=[...e.drawings??[]].sort((m,b)=>y(m.paragraphId)-y(b.paragraphId)||m.start-b.start),g=0,x=e.spans.some(m=>m.style.shaping!==void 0)||(e.drawings??[]).some(Fd),k=0,v=e.contentX,R=(m,b)=>{for(;g<f.length&&(y(f[g].paragraphId)<y(m)||y(f[g].paragraphId)===y(m)&&f[g].start<b);){let S=f[g],P=x?Math.max(0,S.advanceEnd-S.advanceStart):Math.max(0,S.advanceEnd-v);v=Math.max(v,S.advanceEnd);let w=t.createElement("span");w.className="docx-inline-drawing-advance",w.dataset.docxMarker="",n.unbound||(w.dataset.drawingParagraphId=S.paragraphId,w.dataset.drawingStart=String(S.start)),w.setAttribute("contenteditable","false"),w.setAttribute("aria-hidden","true"),w.style.display="inline-block",w.style.width=`${P*r}px`,w.style.height=`${S.baselineOffset*r}px`,w.style.lineHeight="0",w.style.pointerEvents="none",w.style.verticalAlign="baseline",a.append(w),k+=P,g+=1,c=null,u=null;}},j=m=>{let b=m.wrapAdvanceBefore??0;if(b<=.001)return;let S=t.createElement("span");S.className="docx-wrap-advance",S.dataset.docxMarker="",S.setAttribute("contenteditable","false"),S.setAttribute("aria-hidden","true"),S.style.display="inline-block",S.style.width=`${b*r}px`,S.style.height="0",S.style.lineHeight="0",S.style.pointerEvents="none",S.style.verticalAlign="baseline",a.append(S),c=null,u=null;},L=0,J=false;for(let[m,b]of e.spans.entries()){let S=g;R(b.range.paragraphId,b.range.start),x||j(b);let P=!x&&g>S?b.box.x-v-(b.wrapAdvanceBefore??0):0;v=Math.max(v,b.box.x+b.box.width);let w=Math.min(b.box.height+s,e.box.height),M=b.noteSeparator?jt(t,b,e,r):Nr(t,b,n,w,s);x&&(M.style.position="relative",M.style.left=`${(b.box.x-e.contentX-k)*r}px`,M.style.width||(M.style.width=`${b.box.width*r}px`),M.style.direction=b.style.shaping?.direction??"ltr",M.style.unicodeBidi="isolate",b.style.shaping?.wordSpacingPt&&(M.style.wordSpacing=`${b.style.shaping.wordSpacingPt*r}px`),k+=b.box.width);let Q=L>0&&!J?L:P;Q>.001&&(M.style.marginLeft=`${Q*r}px`);let nt=e.spans[m+1],Se=x?0:co(e,m+1,y);J=Se>0&&nt!==void 0&&Kr(b,nt),J&&(M.style.wordSpacing=`${Se*r}px`),L=Se;let _=b.link;if(!_){c=null,u=null,p=null,a.append(M);continue}if(b.fieldAtom){let ot=et(b);c!==null&&u===_.id&&p===ot||(c=Qn(t,_,n),u=_.id,p=ot,a.append(c)),c.append(M);continue}(!c||u!==_.id||p!==null)&&(c=Qn(t,_,n),u=_.id,p=null,a.append(c)),c.append(M);}R(Na(e)[Na(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),zt(a,e,r,i,m=>q(a,m,n));let O=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height});Ut(t,a,e,r),n.showParagraphMarks&&e.manualBreakAfter&&At(t,e,a,r,n.revisionStyles,o);let N=ro(oo(n));if(e.drawings&&e.drawings.length>0)for(let m of $n(t,e,N.ctx,N.urlRegistry,O))a.append(m);return a}function co(t,e,n){if(e<=0||e>=t.spans.length)return 0;let o=t.spans[e-1],i=t.spans[e],r=n(o.range.paragraphId),a=n(i.range.paragraphId);if(t.drawings?.some(d=>{let c=n(d.paragraphId),u=c>r||c===r&&d.start>=o.range.start,p=c<a||c===a&&d.start<i.range.start;return u&&p}))return 0;let l=i.box.x-(o.box.x+o.box.width)-(i.wrapAdvanceBefore??0);return l>.001?l:0}var zr=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function Kr(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!jr(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!zr.test(t.text.slice(0,-1))}function jr(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||et(t)===et(e)}function et(t){return t.fieldAtom?.resultStart??t.range.start}function z(t,e,n){let o=n.scale,i=I(t,"div",e.box,o);i.className="docx-paragraph-fragment layout-paragraph",e.clipToBox&&(i.style.overflow="hidden"),n.unbound||(i.dataset.paragraphId=e.paragraphId),i.dataset.fragmentIndex=String(e.fragmentIndex),n.unbound||De(i,e),n.readOnlyParagraphIds?.has(e.paragraphId)&&(i.classList.add("docx-generated-region"),i.dataset.docxReadOnly="",i.setAttribute("contenteditable","false")),n.emptyTocPlaceholderIds?.has(e.paragraphId)&&(i.classList.add("docx-toc-empty-placeholder"),i.dataset.docxTocEmpty=""),e.shading&&Z.test(e.shading)&&e.shadingBox&&i.append(Wr(t,e,o)),e.marker&&i.append(Ur(t,e,n));for(let a of e.lines)for(let s of a.spans){if(!s.tabLeader)continue;let l=Gr(t,e,a,s,n);l&&i.append(l);}let r=[];for(let a of e.lines){let s=_r(t,a,n.revisionMarkup&&jb(e.props)?{...n,paragraphFormatRevision:jb(e.props)}:n,vd(e.props),e.emptyParagraphStyle);e.markFormatRevision&&a===e.lines[e.lines.length-1]&&De(s,e,true),s.style.top=`${(a.box.y-e.box.y)*o}px`,s.style.left=`${(a.contentX-e.box.x)*o}px`,i.append(s),r.push(s);}if(Zt(t,e,r,n,o),e.borders)for(let a of e.borders)i.append(eo(t,e,a,o));else e.bottomBorder&&i.append(eo(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},o));return i}function Ur(t,e,n){let o=e.marker,i=n.scale,r=Kt(t,e,oo(n));if(r)return r;let a=e.lines[0]?.leading??0,s=I(t,"span",o.box,i);s.className="docx-list-marker",s.dataset.docxMarker="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.left=`${(o.box.x-e.box.x)*i}px`,s.style.top=`${(o.box.y-e.box.y)*i}px`,s.style.display="block",s.style.overflow="visible",s.style.whiteSpace="pre";let l=e.lines[0],d=l?Math.max(a,...l.spans.map(h=>h.box.height+a),l.spans.length===0?l.box.height-(l.trailingSpacing??0):0):o.box.height,c=Math.min(d,o.box.height),u=Math.max(0,o.box.height-c);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${u*i}px`,s.style.lineHeight=`${c*i}px`;let p=t.createElement("span");return p.style.display="inline-block",p.style.verticalAlign="baseline",p.style.boxSizing="border-box",p.style.height=`${c*i}px`,p.style.paddingTop=`${a*i}px`,p.style.lineHeight=`${(c-a)*i}px`,q(p,o.style,n),o.pieces&&(p.dir="rtl"),lo(t,p,o.text,o.style,i),s.append(p),s}function Gr(t,e,n,o,i){let r=o.tabLeader?wb.get(o.tabLeader):void 0;if(!r||o.box.width<=0)return null;let a=i.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",o.tabLeader==="underscore"&&(s.style.zIndex="1"),s.style.left=`${(o.box.x-e.box.x)*a}px`,s.style.top=`${(n.box.y-e.box.y)*a}px`,s.style.width=`${o.box.width*a}px`,s.style.height=`${n.box.height*a}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=n.leading??0,d=Math.min(o.box.height+l,n.box.height),c=Math.max(0,n.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*a}px`,s.style.lineHeight=`${(n.box.height-c)*a}px`;let u=t.createElement("span");u.style.display="inline-block",u.style.verticalAlign="baseline",q(u,o.style,i),u.style.boxSizing="border-box",u.style.height=`${d*a}px`,u.style.paddingTop=`${l*a}px`,u.style.lineHeight=`${(d-l)*a}px`,o.tabLeader==="heavy"&&(u.style.fontWeight="bold");let p=o.tabLeaderAdvancePt&&o.tabLeaderAdvancePt>0?o.tabLeaderAdvancePt:Math.max(.5,o.style.fontSizePt*.2),h=ra((i.tabLeaderOriginXPt??0)+o.box.x,o.box.width,p);return u.style.marginLeft=`${h.offsetPt*a}px`,u.textContent=r.repeat(h.count),u.style.letterSpacing="0",s.append(u),s}function Wr(t,e,n){let o=e.shadingBox,i=I(t,"div",o,n);return i.className="docx-paragraph-shading",i.setAttribute("aria-hidden","true"),i.style.left=`${(o.x-e.box.x)*n}px`,i.style.top=`${(o.y-e.box.y)*n}px`,i.style.backgroundColor=`#${e.shading}`,i}function eo(t,e,n,o){let i=I(t,"div",n.box,o);i.className=`docx-paragraph-border docx-paragraph-border-${n.side}`,i.setAttribute("aria-hidden","true");let r=(n.box.x-e.box.x)*o,a=(n.box.y-e.box.y)*o,s=n.side==="left"||n.side==="right"||n.side==="bar",l=(s?n.box.width:n.box.height)*o,c=ge(n.edge.val)?l:Math.max(1,l);i.style.left=`${n.side==="right"?r-(c-l):r}px`,i.style.top=`${n.side==="bottom"?a-(c-l):a}px`,s?i.style.width=`${c}px`:i.style.height=`${c}px`;let u=n.edge.color&&Z.test(n.edge.color)?n.edge.color:"000000";return i.style.backgroundColor=`#${u}`,X(i,n.edge.val,u,s,c,o),i}function uo(t,e,n,o){let i=o.scale,r=I(t,"div",e.box,i);if(r.className="docx-table-cell",r.style.left=`${(e.box.x-n.x)*i}px`,r.style.top=`${(e.box.y-n.y)*i}px`,r.style.boxSizing="border-box",r.style.overflow="visible",r.dataset.cellId=e.id,r.dataset.gridColumn=String(e.gridColumn),r.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(r.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return r.dataset.vMergeContinue="true",r.style.border="none",r.style.backgroundColor="transparent",Ce(r,e,r,void 0,[]),r;r.style.border="none";let a=Kn(t,r,e.borders,i);if(e.shading&&Z.test(e.shading)&&(r.style.backgroundColor=`#${e.shading}`),e.revisionShading&&o.revisionMarkup){let d=o.revisionMarkup.cells[e.revisionShading];if(r.dataset.revisionCell=e.revisionShading,d!=="none"){let c=e.revisionShadingAuthor??"";r.style.backgroundColor=d==="byAuthor"?o.revisionStyles?.styles.get(c)?.color??B(o.revisionCellStyles?.authorSlots.get(c)??0):`var(--doc-revision-color-${d})`;}}let s=Un(t,e,i,r),l=[];for(let d of e.blocks){let c=d.kind==="table"?K(t,d,o):z(t,d,o);c.style.left=`${(d.box.x-e.box.x)*i}px`,c.style.top=`${(d.box.y-e.box.y)*i}px`,s.append(c),l.push(c);}return Ce(r,e,s,a,l),r}function to(t,e,n,o){let i=o.scale,r=I(t,"div",e.box,i);r.className="docx-table-row",jn(r,e,!!o.revisionMarkup),r.dataset.rowId=e.id,e.isHeaderRepeat&&(r.dataset.headerRepeat="true"),r.style.left=`${(e.box.x-n.box.x)*i}px`,r.style.top=`${(e.box.y-n.box.y)*i}px`,r.style.overflow="visible";for(let a of e.cells)r.append(uo(t,a,e.box,o));return r}function K(t,e,n,o){let i=o&&_t(o,e,{scale:n.scale,showParagraphMarks:n.showParagraphMarks===true,row:l=>to(t,l,e,n),cell:(l,d)=>uo(t,l,d,n),block:(l,d)=>l.kind==="table"?K(t,l,n,d):z(t,l,n),gapOf:(l,d)=>co(l,d,()=>0)});if(i)return i;let r=n.scale,a=I(t,"div",e.box,r);a.className="docx-table-fragment layout-table",a.dataset.tableId=e.tableId,a.dataset.fragmentIndex=String(e.fragmentIndex),a.style.overflow="visible";let s=new Map;for(let l of e.rows){let d=to(t,l,e,n);s.set(l,d),a.append(d);}return Ot(a,e,s),a}function Xr(t,e,n,o,i){let r={...n,paintInstance:`p${e.index}`,tabLeaderOriginXPt:e.contentBox.x-e.box.x},a=I(t,"div",e.box,r.scale);if(a.className="docx-page",Jt(a),a.dataset.pageIndex=String(e.index),r.ariaHidden&&(a.setAttribute("aria-hidden","true"),a.setAttribute("role","presentation")),a.dataset.materialized=String(o),!o)return a;let s=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height}),l=e.pageBorders?zn(t,e.pageBorders,r.scale):null;l&&e.pageBorders&&(l.dataset.docxZOrder=e.pageBorders.zOrder),l&&e.pageBorders?.zOrder==="back"&&a.append(l);let d=new Map,c=fn(t,a,e,{chrome:r,paintFragment:(y,f)=>{let g=d.get(f);return g||(g={...r,inertLinks:true,tabLeaderOriginXPt:f},d.set(f,g)),y.kind==="table"?K(t,y,g):z(t,y,g)},appendDrawings:(y,f,g,x,k,v)=>io(t,y,f,r,g,x,k,v)});Yn(t,a,e,r,s,"behind");let u=t.createElement("div");u.className="docx-page-content",u.style.position="absolute",u.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,u.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,u.style.width=`${e.contentBox.width*r.scale}px`,u.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&u.setAttribute("contenteditable","false");for(let y of e.columnSeparators??[]){let f=t.createElement("div");f.className="docx-column-separator",f.setAttribute("contenteditable","false"),f.style.position="absolute",f.style.left=`${y.x*r.scale}px`,f.style.top=`${y.y*r.scale}px`,f.style.width=`${y.width*r.scale}px`,f.style.height=`${y.height*r.scale}px`,f.style.backgroundColor="currentColor",f.style.pointerEvents="none",u.append(f);}let p=i?new Map:null;for(let y of e.fragments){let f=y.kind==="table"?K(t,y,r):z(t,y,r);p?.set(y,f),u.append(f);}i&&p&&(i.content=u,i.blocks=p),a.append(u),Yn(t,a,e,r,s,"inFront"),l&&e.pageBorders?.zOrder==="front"&&a.append(l),Qt(t,a,e,r,z,K);for(let y of ["header","footer"]){if(e[y]||e.parityBlank)continue;let f=t.createElement("div");f.className="docx-hf docx-hf--placeholder",f.dataset.docxHf=y,f.setAttribute("contenteditable","false");let g=y==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),x=Math.min(g,Vr);if(x<=0)continue;let k=Math.max(0,Math.min(Yr,g-x)),v=y==="header"?k:e.box.height-k-x;f.style.position="absolute",f.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,f.style.top=`${v*r.scale}px`,f.style.width=`${e.contentBox.width*r.scale}px`,f.style.height=`${x*r.scale}px`,a.append(f);}for(let y of c)a.append(y);en(t,a,e,r);let h=sn(t,e,r.scale,r.changeBars,r.changeBarsToggle,r.revisionMarkup,r.facingPages,r.revisionStyles);return h&&a.append(h),a}var Vr=30,Yr=36,tt=new WeakMap;function As(t){tt.delete(t);}function qr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Zr(t,e){let n=Object.keys(t);if(n.length!==Object.keys(e).length)return false;for(let o of n){let i=t[o],r=e[o];if(i!==r)return false}return true}function Jr(t,e){if(t.length!==e.length)return false;for(let n=0;n<t.length;n+=1)if(t[n]!==e[n])return false;return true}function Qr(t,e){if(t===e)return false;let n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n){if(o==="fragments"||o==="pageFieldSource")continue;let i=t[o],r=e[o];if(i!==r&&!(Array.isArray(i)&&Array.isArray(r)&&Jr(i,r))&&!(typeof i=="object"&&typeof r=="object"&&i!==null&&r!==null&&!Array.isArray(i)&&!Array.isArray(r)&&Zr(i,r))&&!Ct(i,r,ei))return false}return true}var no="docx-column-separator",ei=2e4;function ti(t,e,n,o){let i=e.content,r=e.blocks;if(!i||!r||i.parentElement!==e.element)return null;let a={...o,paintInstance:`p${n.index}`,tabLeaderOriginXPt:n.contentBox.x-n.box.x},s=new Map,l=[];for(let p of n.fragments){let h=r.get(p)??Wn(r,p,l)??(p.kind==="table"?K(t,p,a,Nt(r,p)):z(t,p,a));s.set(p,h),l.push(h);}let d=new Set(l),c=i.firstChild;for(;c;){let p=c.nextSibling,h=c;!d.has(h)&&h.classList?.contains(no)!==true&&c.remove(),c=p;}let u=i.firstChild;for(;u&&u.classList?.contains(no);)u=u.nextSibling;for(let p of l){if(p===u){u=u.nextSibling;continue}i.insertBefore(p,u);}return ln(t,e.element,n,o.scale,o.changeBars,o.changeBarsToggle,o.revisionMarkup,o.facingPages,o.revisionStyles),{record:n,materialized:true,element:e.element,content:i,blocks:s}}function ni(t,e,n,o){let i=t.element;return !t.materialized&&qr(t.record.box,e.box)&&i.style.left===`${e.box.x*n}px`&&i.style.top===`${e.box.y*n}px`&&i.style.width===`${e.box.width*n}px`&&i.style.height===`${e.box.height*n}px`&&i.getAttribute("aria-hidden")===(o?"true":null)}function oi(t,e,n={}){ri(t,e,n);}function ri(t,e,n,o){t.classList.toggle("docx-show-paragraph-marks",n.showParagraphMarks??false);let i=n.contentControlChrome,r=i?`${i.showAll===true?"1":"0"}:${i.activeIds?[...i.activeIds].sort().join(","):""}:${i.checkedIds?[...i.checkedIds].sort().join(","):""}:${i.tocControlIds?[...i.tocControlIds].sort().join(","):""}:${i.suppressedIds?[...i.suppressedIds].sort().join(","):""}:${i.readOnly===true?"ro":""}`:"",a=n.drawingStrings??Xe,s=n.breakMarkStrings??re,l=n.imageUrlPort!==void 0?Mn(t,n.imageUrlPort):null,d=i?.additionalBoundaries?i.additionalBoundaries.flatMap(m=>m.fragments.map(b=>`${m.id}:${b.pageIndex}:${b.box.x}:${b.box.y}:${b.box.width}:${b.box.height}`)).sort().join(","):"",c=n.readOnlyParagraphIds?[...n.readOnlyParagraphIds].sort().join(","):"",u=n.emptyTocPlaceholderIds?[...n.emptyTocPlaceholderIds].sort().join(","):"",p=i?.tocControlIds?[...i.tocControlIds].sort().join(","):"",h=Pe(n.revisionStyles??(n.revisionMarkup?"author":void 0),e,o),y=n.revisionMarkup&&Object.values(n.revisionMarkup.cells).includes("byAuthor")?h??Pe("author",e,o):null,f={scale:n.scale??96/72,ariaHidden:n.ariaHidden??true,drawingStrings:a,urlRegistry:l,...n.fontAlias?{fontAlias:n.fontAlias}:{},...n.readOnlyParagraphIds?{readOnlyParagraphIds:n.readOnlyParagraphIds}:{},...n.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:n.emptyTocPlaceholderIds}:{},...n.defaultFontFamily?{defaultFontFamily:n.defaultFontFamily}:{},...n.fieldShading?{fieldShading:n.fieldShading}:{},showParagraphMarks:n.showParagraphMarks??false,...n.showParagraphMarks?{breakMarks:qt(e,s)}:{},changeBars:n.changeBars??"all-markup",changeBarsToggle:n.changeBarsToggle??false,...n.shadeFormFields!==void 0?{shadeFormFields:n.shadeFormFields}:{},...h?{revisionStyles:h}:{},...y?{revisionCellStyles:y}:{},...n.revisionMarkup?{revisionMarkup:n.revisionMarkup}:{},facingPages:n.facingPages,revisionKindColors:n.revisionStyles==="kind",...n.imageUrlPort?{imageUrlPort:n.imageUrlPort}:{},...n.activeHeaderFooterRId?{activeHeaderFooterRId:n.activeHeaderFooterRId}:{},...n.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:n.activeHeaderFooterPageIndex}:{},...i?{contentControlChrome:i}:{}},g=t.ownerDocument,x=`${f.scale}|${f.ariaHidden}|${f.fontAlias?Br(f.fontAlias):""}|${f.defaultFontFamily??""}|cc:${r}:${d}|toc:${p}|ro:${c}|tocEmpty:${u}|${n.imageUrlPort?"url":""}|${In(a)}|markup:${JSON.stringify(n.revisionMarkup)}|facing:${n.facingPages}|rev:${Le(h)}|cells:${Le(y)}|marks:${n.showParagraphMarks??false}|${f.breakMarks?`breaks:${Yt(s)}:${f.breakMarks.token}|`:""}bars:${f.changeBars}:${f.changeBarsToggle}`,k=tt.get(t),v=k?.parameters===x,R=v?new Map(k.pages.map(m=>[m.record,m])):null,j=k?new Map(k.pages.map(m=>[m.record.index,m])):null,L=e.pages.map(m=>{let b=n.materialize?.has(m.index)??true,S=R?.get(m);if(S&&S.materialized===b)return S;let P=j?.get(m.index);if(!b&&P&&ni(P,m,f.scale,f.ariaHidden))return {record:m,materialized:false,element:P.element};if(v&&b&&P?.materialized&&Qr(P.record,m)){let Q=ti(g,P,m,f);if(Q)return Q}let w={},M=Xr(g,m,f,b,w);return {record:m,materialized:b,element:M,...w.content?{content:w.content}:{},...w.blocks?{blocks:w.blocks}:{}}});if(tt.set(t,{parameters:x,pages:L}),t.dataset.revision=String(e.revision),l){let m={...e,pages:L.filter(b=>b.materialized).map(b=>b.record)};l.reconcile(Fn(m),Dn(m));}let J=new Set(L.map(m=>m.element)),O=t.firstChild;for(;O;){let m=O.nextSibling;J.has(O)||O.remove(),O=m;}let N=t.firstChild;for(let m of L){if(m.element===N){N=N.nextSibling;continue}t.insertBefore(m.element,N);}cn(L,f);}var yo=new WeakMap;function ii(t,e,n,o){let i=t.ownerDocument,r=o.scale,a=new Map;for(let d of t.children){let c=yo.get(d);if(c===void 0)continue;let u=a.get(c);u?u.push(d):a.set(c,[d]);}let s=[];for(let d of n){let c=e.pages[d.pageIndex];if(!c)continue;let u=d.className??o.className??"docx-cell-selection-rect",p=o.pageOffsetX?.get(d.pageIndex)??0,h=`${(c.contentBox.x+d.x+p)*r}px`,y=`${(c.contentBox.y+d.y)*r}px`,f=`${d.width*r}px`,g=`${d.height*r}px`,x=d.reviewAuthor,k=[u,h,y,f,g,x?`${x.author}\0${x.slot}\0${x.color}`:"",d.activeBackground??""].join(""),v=a.get(k)?.pop();if(v){s.push(v);continue}let R=i.createElement("div");R.className=u,R.style.position="absolute",R.style.left=h,R.style.top=y,R.style.width=f,R.style.height=g,x&&(R.dataset.reviewAuthor=x.author,R.dataset.reviewAuthorSlot=String(x.slot%A),R.style.setProperty("--doc-review-author-current",x.color)),d.activeBackground!==void 0&&(R.style.backgroundColor=d.activeBackground,R.style.boxShadow="none"),yo.set(R,k),s.push(R);}let l=t.children;l.length===s.length&&s.every((d,c)=>l[c]===d)||t.replaceChildren(...s);}
|
|
4
|
+
export{B as a,Tt as b,yi as c,Ro as d,pi as e,Yi as f,Yt as g,Oe as h,bn as i,Ca as j,In as k,Xe as l,Ha as m,Qe as n,Hr as o,As as p,oi as q,ri as r,ii as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunk5JPIEN54_cjs=require('./chunk-5JPIEN54.cjs'),chunkDBOOTED4_cjs=require('./chunk-DBOOTED4.cjs'),chunkXSTGE3NI_cjs=require('./chunk-XSTGE3NI.cjs'),chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.cjs');var tt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function V(e){let t=new Map;for(let n of e)if(Array.isArray(n)){for(let o of n.slice(0,2048)){if(typeof o!="string"||!tt.test(o))continue;let r=o.toLowerCase();if(t.has(r)||t.set(r,o),t.size===2048)break}if(t.size===2048)break}return Object.freeze([...t.values()])}function _t(e){let t=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(t===void 0||Array.isArray(t)&&t.length===0)?void 0:e}var Ue=64,ie=Object.freeze({family:"Calibri",sizeHalfPoints:22}),Lt=ie;function G(e,...t){let n=[e,...t],o=[],r=new Set;for(let l of n)for(let c of l.sources??[]){let u=chunkDBOOTED4_cjs.h(c.request);r.has(u)||(r.add(u),o.push(c));}let s=[],i=new Set;for(let l of n)for(let c of l.substitutions??[]){let u=chunkDBOOTED4_cjs.h(c.from);r.has(u)||i.has(u)||(i.add(u),s.push(c));}let a=V(n.map(l=>l.supportedFamilies));return Object.freeze({...a.length?{supportedFamilies:a}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??chunkDBOOTED4_cjs.a,sources:Object.freeze(o),...s.length>0?{substitutions:Object.freeze(s)}:{},defaultFont:e.defaultFont??ie,...e.language!==void 0?{language:e.language}:{}})}var nt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function W(e){let t=e?.defaultFont?.family;return t!==void 0&&nt.test(t)?t:ie.family}var ot="docx-editor.dev/font-resolver",Ve=Symbol.for("docx-editor.dev/font-resolver");function zt(e){let t={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ve,t),Object.defineProperty(e,ot,t);}catch(n){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:n})}return e}function jt(e){return typeof e=="function"&&e[Ve]===true}var le=class extends RangeError{constructor(n,o,r){super(`Font source ${n.family} (${o} bytes) exceeds the shaping byte ceiling (${r} bytes)`);this.request=n;}request},ce=class extends AggregateError{causes;constructor(t){let n=Object.freeze(t.slice(0,chunkDBOOTED4_cjs.b*2));super(n,`Font origin rejected all ${n.length} face and substitution candidates`),this.causes=n;}},Q=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function rt(e,t,n){let o=new Map(e.map(r=>[Q(r),r]));for(let[r,s]of t)o.set(r,s);for(let r of n)o.has(Q(r.to))&&o.set(Q(r.from),r.from);return [...o.values()]}async function Ut(e,t,n={}){return Xe(e,t,n)}async function $t(e,t,n={}){return Xe(e,t,n)}async function Xe(e,t,n){let o=n.maxExecutionFontBytes??chunkDBOOTED4_cjs.a;if(!Number.isSafeInteger(o)||o<=0||o>chunkDBOOTED4_cjs.a)throw new RangeError("Font execution byte ceiling is outside the supported range");let r=e.map(st),s,i=[],a=[],l=new Map,c=new Set,u=0,d=[],g=new Set,p=[],A=t.resolvedFaces??[],S=t.defaultFamily;for(let m=0;m<e.length;m+=1){Ke(t.signal);let F=e[m],h=rt(A,l,d),R;try{let w=r[m],O;if(w){let f=await $e(w,t.signal);if(!f.ok)throw f.cause;O=f.value;}else if(typeof F=="function"){let f=await $e(Promise.resolve(F(lt(t,S,h,u))).then(b=>({ok:!0,value:b}),b=>({ok:!1,cause:b})),t.signal);if(!f.ok)throw f.cause;O=f.value;}else O=F;if(O==null)continue;if(typeof O=="function"){J(n,F,m,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let k="failures"in O?O.failures:void 0,P=[];if(Array.isArray(k)){let f=Math.min(k.length,chunkDBOOTED4_cjs.b);for(let b=0;b<f;b++)P.push(k[b]);k.length>f&&P.push(new Error("Additional font-origin failures were omitted"));}else k!==void 0&&P.push(k);let v;try{v=it(O,c,u,g,s?"maxFontBytes"in s&&s.maxFontBytes!==void 0?s.maxFontBytes:chunkDBOOTED4_cjs.a:void 0,n.reserveOwnedBytes,n.instrumentation,o);}catch(f){for(let b of new Set(P))J(n,F,m,b);throw f}R=v;for(let f of new Set([...v.dropped,...P]))J(n,F,m,f);let T=v.fragment;T.supportedFamilies&&i.push(T.supportedFamilies),p.push(...P);let j=(T.sources??[]).map(f=>(chunkDBOOTED4_cjs.h(f.request),[Q(f.request),f.request])),x=[...T.substitutions??[]];!s&&"defaultFont"in T&&(S=W(T)),s||(s=T);let E=new Set(v.sourceKeys);if(E.size>0){d=d.filter(f=>!E.has(chunkDBOOTED4_cjs.h(f.from)));for(let f of E)g.delete(f);}a.push(...T.sources??[]);for(let f of v.sourceKeys)c.add(f);u+=v.ownedBytes;for(let[f,b]of j)l.set(f,b);for(let f of x)d.push(f),g.add(chunkDBOOTED4_cjs.h(f.from));}catch(w){if(R?.releaseOwnedBytes?.(),t.signal?.aborted)throw t.signal.reason??w;if(w instanceof Z)throw w.cause;J(n,F,m,w);continue}}if(!s)return;let{epoch:C,...L}=G({...s,supportedFamilies:V(i),sources:a,substitutions:d});return p.length===0?L:{...L,failures:Object.freeze(p)}}var Z=class extends Error{constructor(n){super("Unable to reserve owned font bytes");this.cause=n;this.name="FontOwnershipReservationError";}cause},ee=class extends RangeError{};async function $e(e,t){if(!t)return e;Ke(t);let n,o=new Promise((s,i)=>{n=i;}),r=()=>n?.(t.reason);t.addEventListener("abort",r,{once:true});try{return await Promise.race([e,o])}finally{t.removeEventListener("abort",r);}}function st(e){if(e===null||typeof e!="object")return;let t;try{t=e.then;}catch(n){return Promise.resolve({ok:false,cause:n})}if(typeof t=="function")return Promise.resolve(e).then(n=>({ok:true,value:n}),n=>({ok:false,cause:n}))}function it(e,t,n,o,r,s,i,a=chunkDBOOTED4_cjs.a){let l=e.sources??[],c=e.substitutions??[],u="maxFontBytes"in e?e.maxFontBytes:void 0,d="defaultFont"in e?e.defaultFont:void 0,g="epoch"in e?e.epoch:void 0,p="language"in e?e.language:void 0;if(!Array.isArray(l)||!Array.isArray(c))throw new TypeError("Font origin sources and substitutions must be arrays");let A=l.length,S=c.length;if(A>chunkDBOOTED4_cjs.b)throw new RangeError(`Font source count must not exceed ${chunkDBOOTED4_cjs.b}`);if(S>chunkDBOOTED4_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkDBOOTED4_cjs.b}`);let C=u??chunkDBOOTED4_cjs.a;if(!Number.isSafeInteger(C)||C<=0||C>chunkDBOOTED4_cjs.a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${chunkDBOOTED4_cjs.a}`);let L=Math.min(r??C,a),m=0,F=[],h=new Set,R=[],w=[];for(let x=0;x<A;x+=1){let E=l[x];try{let f=ae(E.request),b=chunkDBOOTED4_cjs.h(f);if(t.has(b)||h.has(b))continue;let D=E.availability,M=E.faceIndex,q=E.hash,re=E.id;if(D!==void 0&&D!=="available"&&D!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(M)||M<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof q!="string"||q.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(D!=="forbidden"){if(typeof re!="string"||re.length===0)throw new TypeError("Font source id must be a non-empty string");K=E.bytes;let U=chunkDBOOTED4_cjs.e(K);if(U>L)throw U<=(r??C)?new le(f,U,a):new RangeError(`Font source ${f.family} (${U} bytes) exceeds the effective base byte ceiling (${L} bytes)`);if(t.has(b)||h.has(b))continue;if(n+m+U>chunkDBOOTED4_cjs.c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${chunkDBOOTED4_cjs.c}`);m+=U;}else K=new Uint8Array(0);if(t.has(b)||h.has(b))continue;if(t.size+h.size>=chunkDBOOTED4_cjs.b)throw new ee(`Font source count must not exceed ${chunkDBOOTED4_cjs.b}`);h.add(b),F.push(b),R.push(Object.freeze({request:f,id:re,bytes:K,hash:q,faceIndex:M,...D?{availability:D}:{}}));}catch(f){if(f instanceof ee)throw f;w.push(f);}}let O=new Set,k=[];for(let x=0;x<S;x+=1){let E=c[x];try{let f=ae(E.from),b=ae(E.to);chunkDBOOTED4_cjs.h(f),chunkDBOOTED4_cjs.h(b);let D=E.lineMetrics,M=D?Object.freeze({heightEm:D.heightEm,baselineEm:D.baselineEm}):void 0;if(M&&(!Number.isFinite(M.heightEm)||!Number.isFinite(M.baselineEm)||M.heightEm<=0||M.heightEm>4||M.baselineEm<0||M.baselineEm>M.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let q=chunkDBOOTED4_cjs.h(f);if(t.has(q)||h.has(q)||o.has(q)||O.has(q))continue;O.add(q),k.push(Object.freeze({from:f,to:b,...M?{lineMetrics:M}:{}}));}catch(f){w.push(f);}}if((A>0||S>0)&&R.length===0&&k.length===0&&w.length>0)throw w.length===1?w[0]:new ce(w);let P=o.size;for(let x of h)o.has(x)&&(P-=1);if(P+O.size>chunkDBOOTED4_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkDBOOTED4_cjs.b}`);let v;if(d!==void 0){let x=d.family,E=d.sizeHalfPoints;if(chunkDBOOTED4_cjs.h({family:x,weight:400,style:"normal"}),!Number.isSafeInteger(E)||E<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");v=Object.freeze({family:x,sizeHalfPoints:E});}if(g!==void 0&&(!Number.isSafeInteger(g)||g<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(p!==void 0&&typeof p!="string")throw new TypeError("Font shaping language must be a string");let T;if(m>0&&s)try{T=s(m);}catch(x){throw new Z(x)}let j;try{j=R.map(x=>chunkDBOOTED4_cjs.f(x,i));}catch(x){throw T?.(),x}return {fragment:Object.freeze({supportedFamilies:V([e.supportedFamilies]),sources:Object.freeze(j),substitutions:Object.freeze(k),...g!==void 0?{epoch:g}:{},...u!==void 0?{maxFontBytes:u}:{},...v?{defaultFont:v}:{},...p!==void 0?{language:p}:{}}),sourceKeys:Object.freeze(F),ownedBytes:m,dropped:Object.freeze(w),releaseOwnedBytes:T}}function at(e){return !Number.isSafeInteger(e)||e<=0?0:e>chunkDBOOTED4_cjs.c?chunkDBOOTED4_cjs.c:e}function lt(e,t,n,o){let{committedSourceBytes:r,...s}=e,i=at(o);return {...s,defaultFamily:t,...n.length>0?{resolvedFaces:n}:{},...i>0?{committedSourceBytes:i}:{}}}function ae(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Ke(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function J(e,t,n,o){let r;try{typeof t=="function"&&t.name.length>0&&(r=t.name);}catch{}try{o instanceof Error&&o.stack;}catch{}let s=Object.freeze({originIndex:n,...r!==void 0?{originName:r}:{},cause:o});if(e.onOriginFailure)try{let a=e.onOriginFailure(s);Promise.resolve(a).catch(l=>{console.warn("[fonts] font-origin diagnostic callback failed",l);});return}catch(a){console.warn("[fonts] font-origin diagnostic callback failed",a);}let i="";try{o instanceof Error&&o.message.length>0&&(i=`: ${o.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${i}`,o);}var ct=256,ut=Object.freeze([]);function te(e){let t=new WeakMap;return (n,o)=>{let r=new Set;for(let s of n){let i=[{node:s,context:o,next:0}],a=l=>{i.pop();let c=i.at(-1)?.found??r;for(let u of l)c.add(u);};for(;i.length;){let l=i[i.length-1],c=t.get(l.node);if(c?.key===l.context.key){a(c.families);continue}if(!l.children){let g=e(l.node,l.context);l.children=g.children,l.found=new Set(g.families);}let u=l.children[l.next++];if(u){i.push({...u,next:0});continue}let d=l.found.size===0?ut:[...l.found];d.length<=ct&&chunkWO4V6PNS_cjs.rb(l.node)?t.set(l.node,{key:l.context.key,families:d}):t.delete(l.node),a(d);}}return [...r]}}function ne(e,t){return e.children.flatMap(n=>n.kind==="textValue"?[]:[{node:n,context:t}])}var He=new WeakMap,ft=4096;function Ye(e,t){let n=`${e.baseKey}|${e.depth+1}|${JSON.stringify(t)}`,o=He.get(e);o||He.set(e,o=new Map);let r=o.get(n);if(r)return r;let s={...e,depth:e.depth+1,cellStyle:t,key:n};return o.size<ft&&o.set(n,s),s}function dt(e,t){let{styles:n,theme:o,supplementalFamilies:r,depth:s}=t;if(e.kind==="table"){let l=chunkDBOOTED4_cjs.Xd(e,468,s,n),c=[];for(let u of l?.rows??[])for(let d of u.cells){let g=Ye(t,d.styleFormatting);for(let p of d.blocks)c.push({node:p,context:g});}return {children:c.reverse()}}let i=new Set;if(e.kind==="paragraph"){let l=e.children.find(u=>u.kind==="paragraphProperties"),c=chunkDBOOTED4_cjs.ld(n,l,t.cellStyle).runProperties;for(let u of chunkDBOOTED4_cjs.kc(e,c,void 0,(d,g)=>chunkDBOOTED4_cjs.od(d,g,n),void 0,void 0,"all-markup",void 0,void 0,o)){if(!u.text||u.fontSlot!=="eastAsia"&&!r.has(u.style.fontFamily??""))continue;let d=chunkXSTGE3NI_cjs.b((u.fontSlot==="eastAsia"?u.style.fontFamilyEastAsia:u.style.fontFamily)??void 0);d&&i.add(d);}}let a=e.localName==="txbxContent"?{...t,cellStyle:void 0,key:`${t.baseKey}|${s}|undefined`}:t;return {families:[...i],children:ne(e,a).reverse()}}function mt(){let e=te(dt),t,n,o=(s,i)=>{if(!t||n!==s||t.theme!==i){let a=chunkDBOOTED4_cjs.kd(s,i);n=s,t={key:`${a.cacheToken}|0|undefined`,baseKey:a.cacheToken,styles:a,theme:i,depth:0,supplementalFamilies:new Set([...Object.values(i.majorSupplemental??{}),...Object.values(i.minorSupplemental??{})])};}return t};return Object.assign((s,i,a)=>e([...s].reverse(),o(i,a)),{warmTableRows(s,i,a,l,c){let u=o(l,c),d=chunkDBOOTED4_cjs.Xd(s,468,u.depth,u.styles)?.rows??[];for(let g of d.slice(i,a))for(let p of g.cells)e(p.blocks,Ye(u,p.styleFormatting));return d.length}})}function Qt(e,t,n){return mt()(e,t,n)}function ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}var gt=te((e,t)=>{let n=[];if(e.namespaceUri===chunkWO4V6PNS_cjs.la){if(e.localName==="fldSimple"){let o=chunkDBOOTED4_cjs.Yc(ue(e,"instr")??"")?.font;o&&n.push(o);}if(e.localName==="p")for(let o of yt(e))n.push(o);}return {families:n,children:ne(e,t)}});function fn(e){let t=new Map;for(let n of gt(e,{key:""})){let o=chunkXSTGE3NI_cjs.b(n);o!==null&&!t.has(o.toLowerCase())&&t.set(o.toLowerCase(),o);}return [...t.values()]}function yt(e){let t=[],n=chunkDBOOTED4_cjs.Xb(),o=[];for(let r=e.children.length-1;r>=0;r-=1){let s=e.children[r];s.kind!=="textValue"&&o.push({node:s,containerDepth:0});}for(;o.length>0;){let{node:r,containerDepth:s}=o.pop();if(s>=chunkWO4V6PNS_cjs.wa||r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="p")continue;if(r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="fldChar"){let a=ue(r,"fldCharType");a==="begin"?chunkDBOOTED4_cjs._b(n):a==="separate"?(n.nesting===1&&Ge(n,t),chunkDBOOTED4_cjs.ac(n)):a==="end"&&(n.nesting===1&&Ge(n,t),chunkDBOOTED4_cjs.bc(n));continue}if(r.namespaceUri===chunkWO4V6PNS_cjs.la&&(r.localName==="instrText"||r.localName==="delInstrText")){chunkDBOOTED4_cjs.$b(n,pt(r),r.localName==="delInstrText");continue}if(r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="fldSimple"){let a=chunkDBOOTED4_cjs.Yc(ue(r,"instr")??"");a?.font&&t.push(a.font);}let i=chunkWO4V6PNS_cjs.xa(r,s);for(let a=r.children.length-1;a>=0;a-=1){let l=r.children[a];l.kind!=="textValue"&&o.push({node:l,containerDepth:i});}}return chunkDBOOTED4_cjs.Yb(n),t}function Ge(e,t){let n=chunkDBOOTED4_cjs.Zb(e);if(n.overflow)return;let o=chunkDBOOTED4_cjs.Yc(n.instruction);o?.font&&t.push(o.font);}function pt(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let o=n.pop();if(o.kind==="textValue")t+=o.value;else for(let r=o.children.length-1;r>=0;r-=1)n.push(o.children[r]);}return t}var Ft=()=>true,ht=/[ᄀ-ᇿ⺀-鿿ꥠ-가-豈-︰-﹏-]/u;function dn(e,t,n,o){if(!t)return [];let r=chunkDBOOTED4_cjs.nc(t),s=chunkDBOOTED4_cjs.kd(n,o),i=new Map;for(let a of e)for(let l of bt(a)){let c=chunkWO4V6PNS_cjs.Yc(l.children),u=d=>{if(d)for(let g of d.values()){let p=g.markerText===void 0||ht.test(g.markerText);for(let A of [g.markerStyle.fontFamily,p?g.markerStyle.fontFamilyEastAsia:null]){let S=chunkXSTGE3NI_cjs.b(A??void 0);if(S===null)continue;let C=S.toLowerCase();i.has(C)||i.set(C,S);}}};u(chunkDBOOTED4_cjs.Ac(c,r,s,Ft));for(let d of c){let g=chunkDBOOTED4_cjs._e(d);for(let p of g.contents)u(chunkDBOOTED4_cjs.Ze(p,r,s));}}return [...i.values()].sort((a,l)=>a.localeCompare(l))}function bt(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}var xt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",Je=256,wt=31;function X(e,t){return e.kind!=="textValue"&&e.localName===t&&e.namespaceUri===chunkWO4V6PNS_cjs.la}function oe(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===chunkWO4V6PNS_cjs.la)?.value}function Qe(e){let t=(e.relationships.get(e.mainDocumentPart)??[]).find(s=>s.type===xt),n=t?chunkWO4V6PNS_cjs.J(t):void 0,r=((n?.mode==="Internal"&&n.target.ok?e.parts.get(n.target.partName):void 0)??e.parts.get("/word/fontTable.xml"))?.root;return r&&X(r,"fonts")?r:void 0}function We(e,t){let n=e.children.find(o=>X(o,t));return n&&n.kind!=="textValue"?oe(n,"val"):void 0}function Ze(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=chunkXSTGE3NI_cjs.a(oe(r,"name"));if(!s)continue;let i=chunk5JPIEN54_cjs.P(We(r,"family"),We(r,"pitch")),a=s.trim().toLowerCase();i&&!n.has(a)&&n.set(a,i);}return n}function et(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=chunkXSTGE3NI_cjs.a(oe(r,"name"));if(!s)continue;let i=r.children.find(u=>X(u,"altName")),a=i&&i.kind!=="textValue"?oe(i,"val"):void 0,l=a!==void 0&&a.length<=wt?chunkXSTGE3NI_cjs.a(a):null,c=s.trim().toLowerCase();l&&!n.has(c)&&n.set(c,l);}return n}function vn(e,t,n){let o=new Set,r=new Map;for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase();r.has(i)||r.set(i,s.to.family.trim().toLowerCase());}for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase(),l=[t.alternates.get(i),t.fallbacks.get(i)].some(c=>{let u=c?.trim().toLowerCase();return u!==void 0&&u!==i&&(u===a||r.get(u)===a)});a!==i&&l&&!(n.resolve(s.from)instanceof chunkDBOOTED4_cjs.d)&&o.add(s.from.family.toLowerCase());}return o}function St(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===chunkWO4V6PNS_cjs.la)?.value}var Et=new Set(["document","hdr","ftr","footnotes","endnotes","comments","styles","numbering","glossaryDocument"]),Ot=new Set(["t","delText","instrText","delInstrText"]),Ct=2e6;function Rt(e,t){let n=e.stylesRoot(),o=e.documentThemeFonts(),r=[...chunkDBOOTED4_cjs.y(n),...n?chunkDBOOTED4_cjs.Jb(n).run:[]],s=chunkDBOOTED4_cjs.ca(r,o),i=chunkXSTGE3NI_cjs.a(s.fontFamily??void 0)??t,a=chunkXSTGE3NI_cjs.a(chunkDBOOTED4_cjs.Lb([{text:"\xE9",props:r,style:s,start:0,end:1}],o)[0]?.style.fontFamily??void 0)??i,l=chunkXSTGE3NI_cjs.a(s.fontFamilyEastAsia??void 0),c=chunkXSTGE3NI_cjs.a(s.complexLane?.fontFamily??void 0)??o.minorBidi??t,u=Ze(e.currentPackage()),d=m=>u.get(m.trim().toLowerCase())??chunk5JPIEN54_cjs.Q(m),g=(m,F)=>{let h=d(m);if(!h)return F;let R=d(F);return R===void 0||R===h?F:chunk5JPIEN54_cjs.R[h]},p=new Map,A=new Map,S=0;for(let m of e.currentPackage().parts.values()){if(m.root.namespaceUri!==chunkWO4V6PNS_cjs.la||!Et.has(m.root.localName))continue;let F=[m.root];for(;F.length>0&&S<Ct;){S++;let h=F.pop();if(h.kind!=="textValue"){if(h.namespaceUri===chunkWO4V6PNS_cjs.la){if(Ot.has(h.localName))continue;if(h.localName==="rFonts"){for(let[R,w]of [["ascii",i],["hAnsi",a],["eastAsia",l],["cs",c]]){let O=chunkXSTGE3NI_cjs.a(St(h,R));if(!O||!w)continue;let k=O.trim().toLowerCase(),P=p.get(k)??new Set,v=R==="ascii"||R==="hAnsi",T=v?g(O,w):w;if(P.add(T),p.set(k,P),v&&d(O)){let j=A.get(k)??new Set;j.add(T),A.set(k,j);}}continue}}for(let R of h.children)F.push(R);}}}for(let m of chunkWO4V6PNS_cjs.a)p.delete(m);let C=new Map,L=[];for(let[m,F]of p){let h=A.get(m);F.size===1?C.set(m,[...F][0]):h?.size===1?C.set(m,[...h][0]):L.push(m);}return {fallbacks:C,ambiguousFamilies:L,defaults:new Map([...p].map(([m,F])=>[m,[...F]]))}}function kt(e,t,n=[],o="Calibri"){let r=et(e.currentPackage()),s=Rt(e,o),i=t.flatMap(c=>{let u=r.get(c.trim().toLowerCase());return u?[u]:[]}),a=new Map,l=t.flatMap(c=>s.defaults.get(c.trim().toLowerCase())??[]).filter(c=>c.trim().toLowerCase()!==o.trim().toLowerCase());for(let c of [...t,...i,...n,...l]){let u=chunkXSTGE3NI_cjs.a(c);if(u&&!a.has(u.trim().toLowerCase())&&a.set(u.trim().toLowerCase(),u),a.size===Ue)break}return {families:[...a.values()],alternates:r,fallbacks:s.fallbacks,ambiguousFamilies:s.ambiguousFamilies}}function Mn(e,t,n){let o=W(n),r=kt(e,t,[],o);return {plan:r,request:{families:r.families,defaultFamily:o}}}function Nn(e,t,n=t.fallbacks){let o=new Map(e.sources.map(c=>[chunkDBOOTED4_cjs.h(c.request),c.request])),r=[],s=new Set((e.substitutions??[]).map(c=>chunkDBOOTED4_cjs.h(c.from))),i=new Map((e.substitutions??[]).map(c=>[chunkDBOOTED4_cjs.h(c.from),c])),a=c=>{let u=o.get(chunkDBOOTED4_cjs.h(c));if(u)return {to:u};let d=i.get(chunkDBOOTED4_cjs.h(c)),g=d&&o.get(chunkDBOOTED4_cjs.h(d.to));if(!(!d||!g))return d.lineMetrics?{to:g,lineMetrics:d.lineMetrics}:{to:g}},l=Math.max(0,chunkDBOOTED4_cjs.b-s.size);for(let c of t.families){let u=c.trim().toLowerCase(),d=t.alternates.get(u),g=n.get(u);for(let p of [400,700])for(let A of ["normal","italic"]){let S={family:c,weight:p,style:A};if(o.has(chunkDBOOTED4_cjs.h(S)))continue;let C=i.has(chunkDBOOTED4_cjs.h(S));for(let L of [d,g]){if(!L||L.trim().toLowerCase()===u)continue;let m={family:L,weight:p,style:A},F=o.get(chunkDBOOTED4_cjs.h(m)),h=C?F?{to:F}:void 0:a(m);if(h){if(!s.has(chunkDBOOTED4_cjs.h(S))){if(l===0)break;l--;}r.push({from:S,...h});break}}}}return G({...e,substitutions:[...r,...e.substitutions??[]]})}function _n(e,t,n){let o=new Set((e.substitutions??[]).map(s=>chunkDBOOTED4_cjs.h(s.from))),r=new Set;for(let s of t.substitutions??[]){if(o.has(chunkDBOOTED4_cjs.h(s.from)))continue;let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase();[n.alternates.get(i),n.fallbacks.get(i)].some(c=>c?.trim().toLowerCase()===a)||r.add(i);}return r}function Ln(e,t){let n=new Map;for(let[o,r]of e)t(o)||n.set(o,r);return n}var Tt={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Bn(e,t){let n=[],o=[],r=0;for(let s of e){let i=s.bytes.byteLength;if(!Number.isSafeInteger(i)||i>t||i>chunkDBOOTED4_cjs.a||i>chunkDBOOTED4_cjs.c-r){o.push(s);continue}r+=i,n.push(s);}return {sources:n,dropped:o}}function Dn(e,t,n){let o=t.reduce((s,i)=>s+i.bytes.byteLength,0),r=new Set(t.filter(s=>s.request.family.trim().length>0).map(s=>chunkDBOOTED4_cjs.h(s.request)));return At(e,{maxFontBytes:n,aggregateBudget:Math.max(0,chunkDBOOTED4_cjs.c-o),shadowedRequests:r})}function At(e,t){let n=[],o=[],r=t.aggregateBudget,s=new Set;for(let i of e){let a=Tt[i.style],l=Object.freeze({family:i.family,weight:a.weight,style:a.style});if(i.family.trim().length===0){o.push({request:l,partName:i.partName,reason:"malformed"});continue}let c=chunkDBOOTED4_cjs.h(l);if(!(t.shadowedRequests?.has(c)||s.has(c))){if(s.add(c),i.bytes.byteLength>t.maxFontBytes||i.bytes.byteLength>r){o.push({request:l,partName:i.partName,reason:"overLimit"});continue}r-=i.bytes.byteLength,n.push({request:l,id:`embedded:${i.partName}#${i.style}`,bytes:i.bytes,hash:chunkWO4V6PNS_cjs.f(i.bytes),faceIndex:0});}}return {sources:n,dropped:o}}
|
|
2
|
+
exports.A=_n;exports.B=Ln;exports.C=Bn;exports.D=Dn;exports.E=At;exports.a=V;exports.b=_t;exports.c=Ue;exports.d=ie;exports.e=Lt;exports.f=G;exports.g=W;exports.h=ot;exports.i=Ve;exports.j=zt;exports.k=jt;exports.l=le;exports.m=ce;exports.n=Ut;exports.o=$t;exports.p=te;exports.q=ne;exports.r=mt;exports.s=Qt;exports.t=fn;exports.u=yt;exports.v=dn;exports.w=vn;exports.x=kt;exports.y=Mn;exports.z=Nn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {ub,Ta,Za,
|
|
1
|
+
import {ub,Ta,Za,Ie,Ge,La,Ka,hj,la,Ma,Eb,wb,vb,ma}from'./chunk-T2QQHG5C.js';var W=new Set(["document","hdr","ftr","footnotes","endnotes"]),$=24,J=512,U=ub($);function V(r){let n=r.root;return n.namespaceUri===la&&W.has(n.localName)}function Y(r){let n=[],e=t=>{if(t.kind!=="textValue"){t.namespaceUri===la&&t.localName==="p"&&n.push(t);for(let a of t.children)e(a);}};return e(r.root),n}function H(r){let n=Eb(r);let e=[],t=new Set;for(let a of Y(n)){let i=wb(a);if(!i||!vb(i))continue;let o=i.toUpperCase();if(t.has(o))continue;t.add(o);let s=hj(n,a.id);s!==null&&e.push(Object.freeze({paragraphId:o,nodeId:a.id,text:s}));}return Object.freeze(e)}function q(r){let n=U.get(r.root);if(n)return n;let e=Eb(r);let t=new Map,a=new Set,i=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===la&&o.localName==="p"){let s=wb(o);if(s&&vb(s)){let p=s.toUpperCase();a.has(p)||(a.add(p),o.kind==="paragraph"&&t.set(p,o.id));}}for(let s of o.children)i(s);}};return i(e.root),U.set(r.root,t),t}function _(r,n){if(r.length!==n.length)return false;for(let e=0;e<r.length;e+=1)if(r[e].root!==n[e])return false;return true}function B(r){let n=new Map,e=null,t=(i,o,s)=>{for(n.delete(i),n.set(i,{partName:o.name,root:o.root,nodeId:s});n.size>J;){let p=n.keys().next();if(p.done)break;n.delete(p.value);}},a=(i,o)=>{let s=n.get(i);if(!s)return null;let p=o.find(d=>d.name===s.partName);if(!p)return null;if(p.root===s.root)return {part:p,nodeId:s.nodeId};let l=Ta(p,s.nodeId);if(!l||l.kind!=="paragraph")return null;let c=wb(l);return !c||c.toUpperCase()!==i?null:(t(i,p,s.nodeId),{part:p,nodeId:s.nodeId})};return i=>{let o=r(),s=a(i,o);if(s)return s;if(e&&e.ids.has(i)&&_(o,e.roots))return null;for(let p of o){let l=q(p).get(i);if(l!==void 0)return t(i,p,l),{part:p,nodeId:l}}return (!e||!_(o,e.roots))&&(e={roots:o.map(p=>p.root),ids:new Set}),e.ids.size<J&&e.ids.add(i),null}}function L(r,n){return Ma(r,n)}var F=Object.freeze({kind:"body"}),Q=1e6;function O(r,n){if(n<=0||n>=r.length)return false;let e=r.charCodeAt(n-1),t=r.charCodeAt(n);return e>=55296&&e<=56319&&t>=56320&&t<=57343}function K(r,n,e){if(n===e)return [];let t=0,a=Math.min(n.length,e.length);for(;t<a&&n.charCodeAt(t)===e.charCodeAt(t);)t+=1;for(;t>0&&(O(n,t)||O(e,t));)t-=1;let i=0;for(;i<n.length-t&&i<e.length-t&&n.charCodeAt(n.length-i-1)===e.charCodeAt(e.length-i-1);)i+=1;for(;i>0&&(O(n,n.length-i)||O(e,e.length-i));)i-=1;let o=n.length-t-i,s=e.slice(t,e.length-i),p=[];return o>0&&p.push({op:"deleteText",paragraphId:r,start:t,end:t+o}),s.length>0&&p.push({op:"insertText",paragraphId:r,offset:t,text:s}),Object.freeze(p)}function tt(r){let n=t=>!!t&&t.kind!=="textValue"&&t.namespaceUri===la&&t.localName==="t"&&t.attributes.every(a=>a.namespaceUri===ma&&a.localName==="space")&&t.children.every(a=>a.kind==="textValue"),e=[];for(let t of r){let a=e.at(-1);if(!n(a)||!n(t)){e.push(t);continue}let i=a.children.map(o=>o.kind==="textValue"?o.value:"").join("")+t.children.map(o=>o.kind==="textValue"?o.value:"").join("");e[e.length-1]={...a,attributes:/^\s|\s$/.test(i)?[{kind:"xmlSpace",namespaceUri:ma,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:a.children[0]?.id??`${a.id}/text`,kind:"textValue",value:i}]};}return e}function G(r){if(r.kind==="textValue")return r;let n=false,e=r.children.map(t=>{let a=G(t);return a!==t&&(n=true),a});if(r.namespaceUri===la&&r.localName==="r"){let t=tt(e);(t.length!==e.length||t.some((a,i)=>a!==e[i]))&&(e=[...t],n=true);}return n?{...r,children:e}:r}function et(r,n,e){let t=r.parts.get(n);if(!t)return r;let a=false,i=new Set;for(let o of e)(o.op==="insertText"||o.op==="deleteText")&&!o.revision&&i.add(o.paragraphId);for(let o of i){let s=Ta(t,o);if(!s||s.kind==="textValue")continue;let p=G(s);if(p===s)continue;let l=Za(t,o,p,{deferValidation:true});l.ok&&(t=l.part,a=true);}return a?Ie(r,t):r}function rt(r,n){let e=n.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let t=()=>H(r.bodyStore().part),a,i=()=>{let l=r.bodyStore().part,c=r.currentPackage();if(a?.pkg===c&&a.body===l)return a.parts;let d=[l];for(let g of c.parts.values())g===l||!V(g)||d.push(g);return a={pkg:c,body:l,parts:Object.freeze(d)},a.parts},o=B(i),s=(l,c)=>{if(l.length===0)return {ok:true,changed:false};let d=t(),g=new Set,P=[];for(let u of l){if(typeof u.text!="string"||u.text.length>Q)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=d.filter(X=>X.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let M=N[0];P.push(...K(M.nodeId,M.text,u.text));}if(P.length===0)return {ok:true,changed:false};let x=r.transact(F,u=>{for(let m of P)u.apply(m);u.applyPackage(m=>et(m,m.mainDocumentPart,P));},{origin:c.origin,actorId:c.actorId,operationId:c.operationId,recordsHistory:false});return x.ok?{ok:true,changed:x.change!==null}:{ok:false,reason:x.detail??x.reason}};return Object.freeze({documentId:e,paragraphs:t,paragraphByNodeId(l){return t().find(c=>c.nodeId===l)??null},paragraphTextOf(l){for(let c of i()){let d=hj(c,l);if(d!==null)return d}return null},paragraphByStableId(l){let c=l.toUpperCase(),d=o(c);if(!d)return null;let g=hj(d.part,d.nodeId);return g===null?null:Object.freeze({paragraphId:c,nodeId:d.nodeId,text:g})},applyParagraphText(l,c,d){return s([{paragraphId:l,text:c}],d)},applyParagraphTexts:s,applyRemotePackage(l,c){let d=r.publishRemotePackage(l,c);return d.ok?{ok:true,changed:d.change!==null}:{ok:false,reason:d.detail??d.reason}},revision:()=>r.packageRevision,subscribe:l=>r.subscribe(l),observePrimitiveJournal:l=>L(r,l),hasPendingJournals:()=>Ka(r),flushPendingJournals:()=>{La(r);},save:()=>Ge(r.currentPackage()),binaryPart(l){let c=r.currentPackage();return c.partBytes.get(l)??c.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}})}function nt(r,n,e){if(n===e||r>n.length)return Math.min(r,e.length);let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t+=1;let a=0;for(;a<n.length-t&&a<e.length-t&&n[n.length-1-a]===e[e.length-1-a];)a+=1;if(r<=t)return Math.min(r,e.length);if(r>n.length-a)return Math.min(e.length,r+e.length-n.length);let i=at(n,e,t,a),o=i.offsets.get(r);return o===void 0&&(o=(i.table?st(i.table,r,n,e,t):null)??ct(r,n,e,t,a)??t,i.offsets.set(r,o)),o}var f=[],ot=16;function at(r,n,e,t){let a=f.findIndex(o=>o.before===r&&o.after===n);if(a>=0){let[o]=f.splice(a,1);return f.push(o),o}let i={before:r,after:n,table:lt(r,n,e,t),offsets:new Map};return f.length>=ot&&f.shift(),f.push(i),i}var it=1<<18;function lt(r,n,e,t){let a=r.length-t-e,i=n.length-t-e;if(a*i>it)return null;let o=i+1,s=new Uint32Array((a+1)*o);for(let p=a-1;p>=0;p-=1)for(let l=i-1;l>=0;l-=1)s[p*o+l]=r[e+p]===n[e+l]?s[(p+1)*o+l+1]+1:Math.max(s[(p+1)*o+l],s[p*o+l+1]);return {lengths:s,width:o,columns:i}}function st(r,n,e,t,a){let{lengths:i,width:o,columns:s}=r,p=n-a,l=0,c=0;for(;l<p;)c<s&&e[a+l]===t[a+c]?(l+=1,c+=1):c>=s||i[(l+1)*o+c]>=i[l*o+c+1]?l+=1:c+=1;return a+c}var pt=[32,16,8,4];function ct(r,n,e,t,a){let i=e.slice(t,e.length-a),o=s=>{let p=i.indexOf(s);return p>=0&&i.indexOf(s,p+1)<0?p:null};for(let s of pt){let p=n.slice(Math.max(t,r-s),r);if(p.length===s){let c=o(p);if(c!==null)return t+c+p.length}let l=n.slice(r,Math.min(n.length-a,r+s));if(l.length===s){let c=o(l);if(c!==null)return t+c}}return null}export{et as a,rt as b,nt as c};
|