@docx-editor.dev/core 2.14.0 → 2.15.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/README.md +42 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +6 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +16 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-24APKZAN.cjs +11 -0
- package/dist/chunk-2YH4MSHX.cjs +2 -0
- package/dist/chunk-5Y7AADI6.js +1 -0
- package/dist/chunk-AREFLNUP.js +11 -0
- package/dist/chunk-AS7YZNQE.cjs +2 -0
- package/dist/chunk-AVGCKH6A.cjs +20 -0
- package/dist/chunk-CDYVDQRI.cjs +5 -0
- package/dist/chunk-FGBADUSK.cjs +1 -0
- package/dist/chunk-HOEWFH5U.cjs +1 -0
- package/dist/chunk-KFELX7CN.js +2 -0
- package/dist/{chunk-OKEDGR65.js → chunk-KXPVOPR5.js} +1 -1
- package/dist/chunk-LGFKIF4M.cjs +1 -0
- package/dist/chunk-M52QXFKI.js +1 -0
- package/dist/chunk-MNUKSXRO.js +1 -0
- package/dist/chunk-PBOIGBDO.js +2 -0
- package/dist/chunk-PMHGONET.cjs +1 -0
- package/dist/chunk-PXKZUTHX.cjs +2 -0
- package/dist/chunk-Q4AB7E4O.cjs +1 -0
- package/dist/chunk-QJYH6AYD.js +1 -0
- package/dist/chunk-QRC37MWG.cjs +20 -0
- package/dist/chunk-RJSB6RJ7.js +20 -0
- package/dist/chunk-SB54HLFJ.js +20 -0
- package/dist/chunk-VP7SDFCM.js +1 -0
- package/dist/chunk-XCESLTJL.js +2 -0
- package/dist/{chunk-KIAP7PFQ.cjs → chunk-YL4Q5LZP.cjs} +1 -1
- package/dist/chunk-Z4527AXR.js +5 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -3
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.ts +8 -7
- package/dist/{custom-node-writes-DntmaAVW.d.ts → custom-node-writes-C9ArIlJh.d.ts} +2 -2
- package/dist/{editor-a6VvsfYU.d.ts → editor-sRxrFJd8.d.ts} +29 -21
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.ts +27 -58
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -0
- package/dist/export.d.ts +337 -0
- package/dist/export.js +2 -0
- package/dist/font-resolver-BYEHQGTw.d.ts +251 -0
- package/dist/headless-document-view-DELC4E5v.d.ts +134 -0
- package/dist/hf-references-DTrHkktY.d.ts +70 -0
- package/dist/{index-C5ZnSRkF.d.ts → index-C3Gvq4jN.d.ts} +55 -246
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.js +1 -1
- package/dist/{shaped-measurer-CFPnXFs9.d.cts → layout-shaping-DoGR5cf8.d.ts} +86 -12
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +1106 -729
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CDFiNXcD.d.ts → note-properties-DSe8igrz.d.ts} +2 -2
- package/dist/{omml-equation-BY49UOIF.d.ts → omml-equation-BpRmfDAf.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-gOY5GA8K.d.cts → protocol-DZzKxH5r.d.ts} +18 -12
- package/dist/{review-items-CCS1h93f.d.ts → review-items-DYRx187i.d.ts} +2 -2
- package/dist/{review-reads-BjZYeMd4.d.ts → review-reads-LbGUdNzn.d.ts} +22 -25
- package/dist/{revision-projection-BeXVrSSV.d.ts → revision-projection-DHRJH48u.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BK91NCCG.d.ts → semantic-cell-selection-BXVWCBYm.d.ts} +4 -4
- package/dist/{semantic-interaction-BmQ7h2cq.d.ts → semantic-interaction-DZsDmPg5.d.ts} +1 -1
- package/dist/{semantic-paint-WJD2KeG1.d.ts → semantic-paint-f7SqN4oW.d.ts} +2 -2
- package/dist/{semantic-records-BpozY7-j.d.cts → semantic-records-EIdwId-a.d.ts} +301 -205
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +15 -65
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-D6HzlPR4.d.ts → tree-op-types-egdarvH_.d.ts} +7 -3
- package/dist/{tree-package-fragment-CWFjgH6a.d.ts → tree-package-fragment-DjkH4ESI.d.ts} +4 -70
- package/dist/{tree-session-contract-B2HfGt79.d.ts → tree-session-contract-CGOOgPjW.d.ts} +29 -23
- package/dist/{tree-store-APgWx6qn.d.ts → tree-store-DKJB0IcA.d.ts} +2 -2
- package/package.json +7 -2
- package/dist/automation.d.cts +0 -82
- package/dist/binding.d.cts +0 -153
- package/dist/chunk-2PIHW2QM.cjs +0 -1
- package/dist/chunk-2QTY5S6T.js +0 -1
- package/dist/chunk-4Z5MODAE.cjs +0 -2
- package/dist/chunk-5TKAPFZT.cjs +0 -2
- package/dist/chunk-DRQHIQ4R.cjs +0 -1
- package/dist/chunk-F2K6SDHA.cjs +0 -20
- package/dist/chunk-FBA57EUJ.js +0 -2
- package/dist/chunk-KTAQ7BRQ.js +0 -20
- package/dist/chunk-LBAHXZCU.cjs +0 -5
- package/dist/chunk-MCDUQYWP.js +0 -5
- package/dist/chunk-MQP26KCF.js +0 -1
- package/dist/chunk-NDJGSR6M.cjs +0 -19
- package/dist/chunk-NJNFJPGB.cjs +0 -11
- package/dist/chunk-O5M4CR4P.cjs +0 -2
- package/dist/chunk-UKUOZXUD.js +0 -19
- package/dist/chunk-VQ4R5LTU.js +0 -2
- package/dist/chunk-ZBEJHJN2.js +0 -11
- package/dist/chunk-ZVTW7RGD.js +0 -2
- package/dist/collaboration/replication.d.cts +0 -216
- package/dist/collaboration.d.cts +0 -176
- package/dist/contracts/document.d.cts +0 -273
- package/dist/contracts/editor.d.cts +0 -10
- package/dist/contracts/interaction.d.cts +0 -10
- package/dist/contracts/modules.d.cts +0 -130
- package/dist/contracts/types.d.cts +0 -562
- package/dist/custom-node-writes-C46r3_5O.d.cts +0 -310
- package/dist/document-properties-D6Ahr8D6.d.cts +0 -28
- package/dist/document-properties-D6Ahr8D6.d.ts +0 -28
- package/dist/editor-AJ06hyyg.d.cts +0 -1994
- package/dist/editor.d.cts +0 -393
- package/dist/failure-BnGjoXf0.d.cts +0 -64
- package/dist/index-Cbw4lkOt.d.cts +0 -3391
- package/dist/index.d.cts +0 -23
- package/dist/layout.d.cts +0 -2486
- package/dist/note-properties-Y6qYh2Hv.d.cts +0 -67
- package/dist/omml-equation-DB8d-jCq.d.cts +0 -84
- package/dist/output.d.cts +0 -74
- package/dist/protocol-BsmQgblT.d.ts +0 -1358
- package/dist/review-items-CaAkgi5s.d.cts +0 -360
- package/dist/review-reads-DEsV0OOW.d.cts +0 -163
- package/dist/revision-projection-DXbrfNGD.d.cts +0 -156
- package/dist/semantic-cell-selection-BMhku3B1.d.cts +0 -451
- package/dist/semantic-interaction-DUAnxbgf.d.cts +0 -160
- package/dist/semantic-paint-DufNL1Zr.d.cts +0 -247
- package/dist/semantic-records-92UnKeU_.d.ts +0 -2821
- package/dist/shaped-measurer-BWbindlI.d.ts +0 -168
- package/dist/store.d.cts +0 -2500
- package/dist/tree-op-types-BUulYD5y.d.cts +0 -3099
- package/dist/tree-package-fragment-Dhyw7oPm.d.cts +0 -732
- package/dist/tree-session-contract-BY9xd7s_.d.cts +0 -613
- package/dist/tree-store-DEEQ9wz_.d.cts +0 -416
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {a as a$1}from'./chunk-VP7SDFCM.js';import {b,A}from'./chunk-PBOIGBDO.js';import {Ba as Ba$1}from'./chunk-KFELX7CN.js';import {sf as sf$1,m,le,a,ad as ad$1,$c,ca as ca$1,I,qd as qd$1,Qf as Qf$1,g,la as la$1,od as od$1,Ud as Ud$1,je,$d as $d$1,ae,Zd as Zd$1,fe,ge,ce,he,tb as tb$1,ib as ib$1,gb as gb$1,Ec as Ec$1,Xe,Ye,ve,we,xe,ye,ze,te,ue,Kd as Kd$1,kd as kd$1,rc as rc$1,ne,ee,de,be,pe,_d as _d$1,kh as kh$1,Xf as Xf$1,Vf as Vf$1,_f as _f$1,Wf as Wf$1,sc as sc$1,zc,oc as oc$1,nc as nc$1,na as na$1,q,L,x,Ca as Ca$1,eb as eb$1,nh as nh$1,mh as mh$1,lh as lh$1,ab as ab$1,Xa as Xa$1,fb as fb$1,Ta as Ta$1,qc,Rc as Rc$1,Tc as Tc$1,fg,$a as $a$1,Za as Za$1,Ze as Ze$1,Jf as Jf$1,Tf as Tf$1,ja as ja$1,Pe,bb as bb$1,bd as bd$1,Va as Va$1,Pc as Pc$1,Mc as Mc$1,Kc,E,jc,Ua as Ua$1,Ne,Oc as Oc$1,Qc,cb as cb$1,Xc,Yc,Fc as Fc$1,Hc as Hc$1,Wc,hb as hb$1,s,wc as wc$1}from'./chunk-AREFLNUP.js';var fI=Symbol("validated-resolved-font"),pI=4,ta=64*1024*1024,Xn=256,vr=128*1024*1024,wr=class extends Error{name="FontResolutionError";request;code;limit;actual;diagnostic;expectedHash;actualHash;constructor(t,n,r={}){super(`Font resolution failed (${t}) for ${Ir(n)}`),this.code=t,this.request=Fr(n),this.limit=r.limit,this.actual=r.actual,this.diagnostic=r.diagnostic,this.expectedHash=r.expectedHash,this.actualHash=r.actualHash;}},py=e=>{if(e.family.trim().length===0)throw new TypeError("Font family must not be empty");if(!Number.isInteger(e.weight)||e.weight<1||e.weight>1e3)throw new RangeError("Font weight must be an integer from 1 through 1000");if(e.style!=="normal"&&e.style!=="italic")throw new TypeError("Font style must be normal or italic")},Fr=e=>(py(e),Object.freeze({family:e.family,weight:e.weight,style:e.style})),mu=e=>{let t={family:e.family,weight:e.weight,style:e.style};return Fr(t)},uy=Symbol("prepared-font-resource"),gu=new WeakMap,mI=new Uint8Array(0),my=Object.getPrototypeOf(Uint8Array.prototype),gI=Object.getOwnPropertyDescriptor(my,"length").get,yI=Object.getOwnPropertyDescriptor(my,"byteLength").get;function na(e){if(!ArrayBuffer.isView(e))throw new TypeError("Font bytes must be a genuine byte array");let t,n;try{t=gI.call(e),n=yI.call(e);}catch{throw new TypeError("Font bytes must be a genuine byte array")}if(t!==n)throw new TypeError("Font bytes must use one-byte elements");return n}function gy(e){let t=new Uint8Array(na(e));return Uint8Array.prototype.set.call(t,e),t}function yy(e,t){let n=Fr(e.request);if(e.availability==="forbidden"){let i=Object.freeze({...e,request:n,actualHash:null,[uy]:true});return gu.set(i,null),i}let r=gy(e.bytes);t?.onOwnedByteCopy?.(),t?.onHash?.();let o=a(r),a$1=Object.freeze({...e,request:n,bytes:r,actualHash:o,[uy]:true});return gu.set(a$1,o),a$1}function ra(e){return gu.get(e)}var hy=e=>{if(!Number.isFinite(e.heightEm)||!Number.isFinite(e.baselineEm)||e.heightEm<=0||e.heightEm>pI||e.baselineEm<0||e.baselineEm>e.heightEm)throw new RangeError("Font substitution line metrics must fit within a bounded em box");return Object.freeze({heightEm:e.heightEm,baselineEm:e.baselineEm})},Ir=e=>(py(e),JSON.stringify([e.family.trim().toLowerCase(),e.weight,e.style])),yu=class{[fI]=true;id;identity;request;family;byteLength;hash;faceIndex;substitution;constructor(t,n){if(t.id.length===0)throw new TypeError("Resolved font id must not be empty");if(!Number.isInteger(t.faceIndex)||t.faceIndex<0)throw new RangeError("Font face index must be a non-negative integer");this.id=t.id,this.request=Fr(t.request),this.family=this.request.family,this.hash=t.hash,this.faceIndex=t.faceIndex,this.identity=`${this.hash}#${this.faceIndex}`,this.byteLength=t.byteLength,this.substitution=null,n&&(this.substitution=Object.freeze({requested:Fr(n.requested),resolved:Fr(n.resolved),...n.lineMetrics?{lineMetrics:hy(n.lineMetrics)}:{}})),Object.freeze(this);}get bytes(){return ml(this).slice()}},by=new WeakSet,xy=new WeakMap,Sy=new WeakMap,Ry=(e,t,n,r)=>{let o=new yu(e,r);return xy.set(o,t),Sy.set(o,n),by.add(o),o},ml=e=>{oa(e);let t=xy.get(e);if(!t)throw new TypeError("Resolved font has no owned byte capability");return t},gl=e=>{oa(e);let t=Sy.get(e);if(!t)throw new TypeError("Resolved font has no admitted table metadata");return t},oa=e=>{if(typeof e!="object"||e===null||!by.has(e))throw new TypeError("Shaping requires a validated resolved font")},Py=(e,t)=>e[t]<<8|e[t+1],ea=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,fy=(e,t)=>{if(t>e.byteLength-12)return {valid:false,diagnostic:"truncated sfnt header"};let n=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]);if(!(e[t]===0&&e[t+1]===1&&e[t+2]===0&&e[t+3]===0)&&n!=="OTTO"&&n!=="true"&&n!=="typ1")return {valid:false,diagnostic:"unsupported sfnt signature"};let o=Py(e,t+4),a=t+12+o*16;if(!Number.isSafeInteger(a)||a>e.byteLength)return {valid:false,diagnostic:"truncated sfnt table directory"};for(let i=0;i<o;i+=1){let s=t+12+i*16,l=ea(e,s+8),d=ea(e,s+12);if(l>e.byteLength||d>e.byteLength-l)return {valid:false,diagnostic:"sfnt table range exceeds font bytes"}}return {valid:true}},hI=(e,t)=>{let r=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?ea(e,12+t*4):0,o=Py(e,r+4),a=new Set;for(let i=0;i<o;i+=1){let s=r+12+i*16;a.add(String.fromCharCode(e[s],e[s+1],e[s+2],e[s+3]));}return Object.freeze(a)},yl=(e,t)=>{if(!Number.isSafeInteger(t)||t<0)return {valid:false,diagnostic:"invalid font face index"};if(e.byteLength<12)return {valid:false,diagnostic:"truncated sfnt header"};if(String.fromCharCode(e[0],e[1],e[2],e[3])!=="ttcf")return t!==0?{valid:false,diagnostic:"standalone sfnt has only face index zero"}:fy(e,0);let r=ea(e,4);if(r!==65536&&r!==131072)return {valid:false,diagnostic:"unsupported TTC version"};let o=ea(e,8),a=12+o*4;if(o===0||!Number.isSafeInteger(a)||a>e.byteLength||t>=o)return {valid:false,diagnostic:"invalid TTC face directory"};let i=ea(e,12+t*4);return i<a?{valid:false,diagnostic:"invalid TTC face offset"}:fy(e,i)},bI=(e,t,n,r)=>{if(e.availability==="forbidden")return {kind:"forbidden"};let o=na(e.bytes);if(o>t)return {kind:"overLimit",actual:o};let a$1=ra(e),i=a$1===void 0?gy(e.bytes):e.bytes;a$1===void 0&&r?.onOwnedByteCopy?.(),a$1===void 0&&r?.onHash?.();let s=a$1??a(i);if(e.hash!==s)return {kind:"hashMismatch",expectedHash:e.hash,actualHash:s};let l=yl(i,e.faceIndex);if(!l.valid)return {kind:"malformed",diagnostic:l.diagnostic};r?.onTableScan?.();let d=hI(i,e.faceIndex);try{let u=n(i,e.faceIndex);if(!u.valid)return {kind:"malformed",diagnostic:u.diagnostic}}catch(u){return {kind:"malformed",diagnostic:u instanceof Error?u.message:"font validator threw"}}let c={kind:"resolved",font:Ry({...e,byteLength:i.byteLength},i,d)};return r?.onAdmission?.(),c},hu=e=>{let t=e.epoch,n=e.maxFontBytes,r=e.validateFont,o=e.instrumentation,a=e.resources,i=e.substitutions;if(!Number.isSafeInteger(t)||t<0)throw new RangeError("Font resource epoch must be a non-negative safe integer");if(!Number.isSafeInteger(n)||n<=0||n>ta)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${ta}`);if(typeof r!="function")throw new TypeError("Font snapshot requires a validator");let s=a.length,l=i?.length??0;if(s>Xn)throw new RangeError(`Font source count must not exceed ${Xn}`);if(l>Xn)throw new RangeError(`Font substitution count must not exceed ${Xn}`);let d=0,c=[];for(let g=0;g<s;g+=1){let y=a[g];if(ra(y)!==void 0){let P=y.availability==="forbidden"?0:na(y.bytes);if(P>vr-d)throw new RangeError(`Aggregate font bytes must not exceed ${vr}`);d+=P,c.push(y);continue}let h=mu(y.request),b=y.id,R=y.hash,I=y.faceIndex,T=y.availability,k=T==="forbidden"?mI:y.bytes,L=T==="forbidden"?0:na(k);if(L>vr-d)throw new RangeError(`Aggregate font bytes must not exceed ${vr}`);d+=L,c.push(Object.freeze({request:h,id:b,bytes:k,hash:R,faceIndex:I,...T?{availability:T}:{}}));}let u=[];if(i)for(let g=0;g<l;g+=1){let y=i[g],h=mu(y.from),b=mu(y.to),R=y.lineMetrics;u.push(Object.freeze({from:h,to:b,...R?{lineMetrics:Object.freeze({heightEm:R.heightEm,baselineEm:R.baselineEm})}:{}}));}let f=new Map;for(let g of c){let y=Ir(g.request);f.has(y)||f.set(y,bI(g,n,r,o));}let p=new Map;for(let g of u){let y=Ir(g.from);p.has(y)||p.set(y,Object.freeze({to:Fr(g.to),...g.lineMetrics?{lineMetrics:hy(g.lineMetrics)}:{}}));}return Object.freeze({epoch:t,resolve:g=>{let y=Fr(g),h=Ir(y),b=p.get(h),R=b?.to??y,I=f.get(Ir(R));return I?I.kind==="forbidden"?new wr("forbidden",y):I.kind==="overLimit"?new wr("overLimit",y,{limit:n,actual:I.actual}):I.kind==="malformed"?new wr("malformed",y,{diagnostic:I.diagnostic}):I.kind==="hashMismatch"?new wr("hashMismatch",y,{expectedHash:I.expectedHash,actualHash:I.actualHash}):b?Ry({request:I.font.request,id:I.font.id,hash:I.font.hash,faceIndex:I.font.faceIndex,byteLength:I.font.byteLength},ml(I.font),gl(I.font),{requested:y,resolved:b.to,...b.lineMetrics?{lineMetrics:b.lineMetrics}:{}}):I.font:new wr("missing",y)}})};var On=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},hl=(e,t)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${t} must be non-blank and contain no control characters`)},xI=(e,t)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${t} must be a four-byte ASCII tag`)},wy=(e,t,n)=>{let r=Object.entries(e).sort(([a],[i])=>a<i?-1:a>i?1:0),o=Object.create(null);for(let[a,i]of r){if(xI(a,`${t} key`),!Number.isFinite(i)||n&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${t} value must be ${n?"a non-negative safe integer":"finite"}`);if(n&&i>4294967295)throw new RangeError(`${t} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},bu=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),SI=e=>e?Object.freeze({requested:bu(e.requested),resolved:bu(e.resolved),...e.lineMetrics?{lineMetrics:Object.freeze({...e.lineMetrics})}:{}}):void 0,vy=new WeakSet,Su=e=>{if(oa(e),!vy.has(e)){if(e.identity!==`${e.hash}#${e.faceIndex}`)throw new TypeError("Resolved font identity does not match hash and face index");if(!Number.isSafeInteger(e.byteLength)||e.byteLength<0)throw new TypeError("Resolved font byte length is invalid");vy.add(e);}},xu=e=>(Su(e),e),xl=e=>(Su(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:bu(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:SI(e.substitution)??null})),ao=e=>{if(hl(e.shapingLibrary.name,"shaping library name"),hl(e.shapingLibrary.version,"shaping library version"),hl(e.unicodeDataVersion,"Unicode data version"),!/^\d+(?:\.\d+){0,3}(?:[-+][0-9A-Za-z.-]+)?$/.test(e.shapingLibrary.version))throw new TypeError("shaping library version must be a numeric version");if(!/^\d+(?:\.\d+){1,2}$/.test(e.unicodeDataVersion))throw new TypeError("Unicode data version must be a dotted numeric version");if(!/^[A-Z][a-z]{3}$/.test(e.script))throw new TypeError("script must be a four-letter ISO 15924 code");if(hl(e.language,"language"),!/^(?:und|[A-Za-z]{2,8})(?:-[A-Za-z0-9]{1,8})*$/.test(e.language))throw new TypeError("language must be a BCP 47 language tag");if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("direction must be ltr or rtl");if(!["none","NFC","NFD","NFKC","NFKD"].includes(e.normalization))throw new TypeError("invalid normalization policy");if(!["halfAwayFromZero","halfToEven","towardZero"].includes(e.roundingMode))throw new TypeError("invalid fixed-point rounding mode");if(!Number.isSafeInteger(e.fixedPointScale)||e.fixedPointScale<=0)throw new RangeError("fixed-point scale must be a positive safe integer");let t=xu(e.font),n=e.fallbackOrder.map(xu),r=new Set;for(let o of n){let a=JSON.stringify(xl(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:t,variationAxes:wy(e.variationAxes,"variation axis",false),shapingLibrary:Object.freeze({name:e.shapingLibrary.name,version:e.shapingLibrary.version}),unicodeDataVersion:e.unicodeDataVersion,normalization:e.normalization,script:e.script,language:e.language,direction:e.direction,features:wy(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...n]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},Fy=e=>{let t=ao(e);return Object.freeze({font:xl(t.font),variationAxes:Object.freeze(Object.entries(t.variationAxes).map(n=>Object.freeze(n))),shapingLibrary:Object.freeze({name:t.shapingLibrary.name,version:t.shapingLibrary.version}),unicodeDataVersion:t.unicodeDataVersion,normalization:t.normalization,script:t.script,language:t.language,direction:t.direction,features:Object.freeze(Object.entries(t.features).map(n=>Object.freeze(n))),fallbackOrder:Object.freeze(t.fallbackOrder.map(xl)),fixedPointScale:t.fixedPointScale,roundingMode:t.roundingMode})},Ru=e=>JSON.stringify(Fy(e)),oo=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},cn=e=>{try{return On(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Iy=new WeakMap,bl=e=>{let t=Iy.get(e);if(t)return t;Su(e);let n=JSON.stringify({identity:e.identity,id:e.id,family:e.family,request:e.request,hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:e.substitution??null});return Iy.set(e,n),n},Sl=(e,t)=>{let n=ao(t);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==n.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(oo(e.bidiLevel,"bidi level"),(e.bidiLevel&1)===1!=(e.direction==="rtl"))throw new TypeError("Shaped run direction does not match bidi level parity");let r=new Map,o=e.glyphs.map(l=>{oo(l.id,"glyph id"),oo(l.cluster,"glyph cluster");let d=r.get(l.outline);if(!d){if(!Number.isSafeInteger(l.outline.unitsPerEm)||l.outline.unitsPerEm<=0)throw new RangeError("Glyph outline units per em must be a positive safe integer");d=Object.isFrozen(l.outline)?l.outline:Object.freeze({path:l.outline.path,unitsPerEm:l.outline.unitsPerEm}),r.set(l.outline,d);}return Object.freeze({id:l.id,cluster:l.cluster,originX:cn(l.originX),originY:cn(l.originY),advanceX:cn(l.advanceX),advanceY:cn(l.advanceY),offsetX:cn(l.offsetX),offsetY:cn(l.offsetY),outline:d})}),a=e.fontSpans.map(l=>{if(oo(l.glyphStart,"font span start"),oo(l.glyphEnd,"font span end"),l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Font span glyph range is invalid");l.fallbackIndex!==null&&oo(l.fallbackIndex,"fallback index");let d=xu(l.font);if(l.fallbackIndex===null){if(bl(d)!==bl(n.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=n.fallbackOrder[l.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(bl(d)!==bl(c))throw new TypeError("Shaped fallback font does not match shaping environment provenance")}return Object.freeze({...l,font:d})});for(let l=0;l<a.length;l+=1){let d=l===0?0:a[l-1].glyphEnd;if(a[l].glyphStart!==d)throw new RangeError("Font spans must cover glyphs contiguously")}if(o.length===0&&a.length!==0||o.length>0&&a.at(-1)?.glyphEnd!==o.length)throw new RangeError("Font spans must cover every glyph exactly once");let i=e.clusters.map(l=>{for(let[c,u]of [["cluster text start",l.textStart],["cluster text end",l.textEnd],["cluster glyph start",l.glyphStart],["cluster glyph end",l.glyphEnd],["cluster font span",l.fontSpan]])oo(u,c);if(l.textEnd<=l.textStart||l.textEnd>e.text.length||l.glyphEnd<=l.glyphStart||l.glyphEnd>o.length)throw new RangeError("Shaped cluster range is invalid");let d=a[l.fontSpan];if(!d||l.glyphStart<d.glyphStart||l.glyphEnd>d.glyphEnd)throw new RangeError("Shaped cluster does not belong to its declared font span");return Object.freeze({...l,advance:cn(l.advance),caretEdges:Object.freeze(l.caretEdges.map(cn))})}),s=Object.freeze({ascent:cn(e.metrics.ascent),descent:cn(e.metrics.descent),lineGap:cn(e.metrics.lineGap)});return Object.freeze({text:e.text,direction:e.direction,bidiLevel:e.bidiLevel,glyphs:Object.freeze(o),clusters:Object.freeze(i),fontSpans:Object.freeze(a),metrics:s})},RI=(e,t)=>{let n=Sl(e,t);return Object.freeze({text:n.text,direction:n.direction,script:t.script,language:t.language,bidiLevel:n.bidiLevel,glyphs:n.glyphs,clusters:n.clusters,fontSpans:Object.freeze(n.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:xl(r.font)}))),metrics:n.metrics})};var io=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),Ri=null,xi=null;function wu(){return Ri?Promise.resolve():xi||(xi=import('./dist-OSUJGKTK.js').then(e=>{let t=e.versionString();if(t!==io.version)throw new $e("shapingLibraryMismatch",{diagnostic:f(io.version,t)});Ri=e;}).catch(e$1=>{throw xi=null,e$1 instanceof $e?e$1:c(e$1)?new $e("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new $e("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),xi)}function PI(){return Ri!==null}function wI(){if(!Ri)throw new $e("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return Ri}var $e=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},vI=16*1024*1024,II=1e6,FI=1e6,TI=1e6,kI=4,OI=512,CI=1024*1024,LI=16*1024*1024,EI=32*1024*1024,MI=64*1024*1024,BI=64*1024*1024,NI=1e6,AI=1e6,DI=1e6,_I=64,HI=4096,jI=4*1024*1024,zI=64*1024*1024,GI=64*1024*1024,WI=256*1024*1024,VI=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Ty=["cmap","head","hhea","hmtx","maxp"],KI=(e,t)=>e[t]<<8|e[t+1],$I=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,XI=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?$I(e,12+t*4):0,YI=(e,t)=>{let n=XI(e,t),r=KI(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},UI=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),qI=(e,t)=>{let n=yl(e,t);if(!n.valid)return n;let r=YI(e,t);for(let o of Ty)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},vu=qI,Cn=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},ZI=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let d=i*2n;(d>t||d===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let s=r?-a:a,l=Number(s);if(!Number.isSafeInteger(l))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return l},ky=(e,t,n,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n)||n<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return On(ZI(BigInt(e)*BigInt(n),BigInt(t),r))},JI=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>ky(i,a,o,r)},QI=(e,t)=>{if(t.length===0)return [];let n=[...new Set(t.map(i=>i.cluster))].sort((i,s)=>i-s),r=new Map;for(let i=0;i<n.length;i+=1)r.set(n[i],n[i+1]??e.length);let o=[],a=0;for(;a<t.length;){let i=t[a].cluster,s=a+1;for(;s<t.length&&t[s].cluster===i;)s+=1;let l=t.slice(a,s).reduce((c,u)=>c+u.advanceX,0),d=On(l);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:s,advance:d,caretEdges:Object.freeze([On(0),d]),fontSpan:0}),a=s;}return o},Ln=64,Yn=8,so=8,e0=32,Oy=Ln+2*Yn,t0=Ln+Yn+so,n0=Ln+Yn+so,r0=Ln+Yn+so,Cy=Ln+8*Yn,Ly=Ln+8*so+Yn,o0=Ln+6*so+Yn,a0=Ln+3*so+2*Yn,i0=Ln+3*so,Pi=e=>Ln+e.length*Uint16Array.BYTES_PER_ELEMENT,Iu=e=>r0+Pi(e),Si=e=>e0+e*Yn,s0=(e,t)=>Oy+Pi(e)+t0+Iu(t),l0=e=>Cy+Pi(e)+Si(e.length)+e.length*Ly,d0=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return Cy+Pi(e.text)+Si(e.glyphs.length)+e.glyphs.length*Ly+Si(e.clusters.length)+e.clusters.length*o0+e.clusters.reduce((n,r)=>n+Si(r.caretEdges.length),0)+Si(e.fontSpans.length)+e.fontSpans.length*a0+i0+[...t].reduce((n,r)=>n+Iu(r.path),0)},c0=(e,t)=>Oy+Pi(e)+n0+t,Pu=class{#e;#s;#u;#f;#p;#h;#b;#m;#g;#l;#y;#d;#t;#o=new Map;#a=new Map;#n=new Map;#i=0;#r=0;#c;constructor(t,n){this.#e=t,this.#s=Cn(n.maxFontBytes??vI,"maximum font bytes",BI),this.#u=Cn(n.maxInputUtf16??II,"maximum input UTF-16 code units",NI),this.#f=Cn(n.maxCodepoints??FI,"maximum input code points",AI),this.#p=Cn(n.maxGlyphs??TI,"maximum shaped glyphs",DI),this.#h=Cn(n.maxCachedFaces??kI,"maximum cached faces",_I),this.#b=Cn(n.maxCachedShapes??OI,"maximum cached shape results",HI),this.#m=Cn(n.maxOutlineBytes??CI,"maximum outline bytes",jI),this.#g=Cn(n.maxCachedOutlineBytes??LI,"maximum cached outline bytes",zI),this.#l=Cn(n.maxShapedRunBytes??EI,"maximum shaped run bytes",GI),this.#y=Cn(n.maxCachedShapeBytes??MI,"maximum cached shape bytes",WI),this.#d=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#c=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#n.clear(),this.#i=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=gl(t);for(let c of Ty)if(!o.has(c))throw new $e("malformedFont",{diagnostic:`missing required ${c} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(UI(n)),i=new this.#e.Face(a,t.faceIndex),s=new this.#e.Font(i),l=s.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(l.ascender)||!Number.isSafeInteger(l.descender)||!Number.isSafeInteger(l.lineGap))throw new $e("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(s.setScale(i.upem,i.upem),this.#o.size>=this.#h){let c=this.#o.keys().next().value;c!==void 0&&(this.#o.delete(c),this.#d?.(Object.freeze({kind:"evicted",identity:c})));}let d={identity:t.identity,blob:a,face:i,font:s,unitsPerEm:i.upem};return this.#o.set(t.identity,d),this.#d?.(Object.freeze({kind:"created",identity:t.identity})),d}#R(t,n,r){let o=JSON.stringify([t.identity,t.unitsPerEm,r,n]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#t?.onOutlinePathCall?.();let i=t.font.glyphToPath(n),s=Iu(i);if(s>this.#m)throw new $e("outlineOverLimit",{limit:this.#m,actual:s});let l=Object.freeze({path:i,unitsPerEm:t.unitsPerEm}),d=s0(o,i);if(d>this.#g)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#i})),l;for(;this.#i+d>this.#g;){let c=this.#a.keys().next().value;if(c===void 0)break;let u=this.#a.get(c);this.#a.delete(c),this.#i-=u.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:l,bytes:d}),this.#i+=d,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),l}#x(t){if(t.length>this.#u)throw new $e("textOverLimit",{limit:this.#u,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#f)throw new $e("codepointsOverLimit",{limit:this.#f,actual:n})}}shape(t){if(!this.#c)throw new $e("disposed");if(oa(t.environment.font),t.environment.font.byteLength>this.#s)throw new $e("fontOverLimit",{limit:this.#s,actual:t.environment.font.byteLength});this.#x(t.text);let n=l0(t.text);if(n>this.#l)throw new $e("shapedRunOverLimit",{limit:this.#l,actual:n});let r=ao(t.environment),o=JSON.stringify([t.text,t.fontSizeHalfPoints,t.bidiLevel,Ru(r)]),a=this.#n.get(o);if(a)return this.#n.delete(o),this.#n.set(o,a),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==io.name||r.shapingLibrary.version!==io.version)throw new $e("shapingLibraryMismatch");if(r.normalization!=="none")throw new $e("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new $e("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new $e("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new $e("unsupportedFallback");let i=ml(r.font),s=gl(r.font);if([...VI].some(d=>s.has(d)))throw new $e("unsupportedColorFont");let l=t.text;this.#x(l);try{let d=this.#S(r.font,i),{face:c,font:u}=d,f=this.#c;f.reset(),f.addText(l),f.setDirection(r.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([x,v])=>new this.#e.Feature(x,v));this.#t?.onShapeCall?.(),this.#e.shape(u,f,p);let m=f.getGlyphInfosAndPositions();if(m.length>this.#p)throw new $e("glyphOverLimit",{limit:this.#p,actual:m.length});let g=JI(c.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),y=On(0),h=On(0),b=new Map,R=JSON.stringify(Object.entries(r.variationAxes).sort(([x],[v])=>x.localeCompare(v))),I=m.map(x=>{let v=g(x.xAdvance??0),w=g(x.yAdvance??0),F={id:x.codepoint,cluster:x.cluster,originX:y,originY:h,advanceX:v,advanceY:w,offsetX:g(x.xOffset??0),offsetY:g(x.yOffset??0),outline:b.get(x.codepoint)??(()=>{let M=this.#R(d,x.codepoint,R);return b.set(x.codepoint,M),M})()};return y=On(y+v),h=On(h+w),F}),T=u.hExtents(),k=Sl({text:l,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:I,clusters:QI(l,I),fontSpans:I.length===0?[]:[{glyphStart:0,glyphEnd:I.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(T.ascender),descent:g(-T.descender),lineGap:g(T.lineGap)}},r),L=d0(k);if(L>this.#l)throw new $e("shapedRunOverLimit",{limit:this.#l,actual:L});let P=c0(o,L);if(P>this.#y)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),k;for(;this.#n.size>=this.#b||this.#r+P>this.#y;){let x=this.#n.keys().next().value;if(x===void 0)break;let v=this.#n.get(x);this.#n.delete(x),this.#r-=v.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o,{run:k,bytes:P}),this.#r+=P,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),k}catch(d){throw d instanceof $e?d:new $e("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},Fu=(e={})=>new Pu(wI(),e);var Ey=6,My=14,By=`fixed:char-width=${Ey}:line-height=${My}`;function Rl(e=Ey,t=My){let n=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*n(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=t*n(r)*o;return {height:a,baseline:a*.8}}}}var Ny=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:4,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024});function Ay(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${a(new TextEncoder().encode(JSON.stringify(n)))}`}var u0=Object.freeze({}),Dy=Xn,f0="16.0.0",p0="none",m0=1e3,g0="halfToEven",jy="cluster-edges-only",y0="Latn",h0=new Uint8Array(0);var Un=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function b0(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a=e.substitutions,i=e.defaultFont,s=e.language;if(!Number.isSafeInteger(r)||r<=0||r>ta)throw new Un(`Font byte ceiling must not exceed the engine hard maximum of ${ta}`);let l=o.length,d=a?.length??0;if(l===0||l>Xn)throw new Un(`Font source count must be between 1 and ${Xn}`);if(d>Dy)throw new Un(`Font substitution count must not exceed ${Dy}`);let c=0,u=[];for(let m=0;m<l;m+=1){let g=o[m],y=g.request,h=g.availability,b=g.id,R=g.hash,I=g.faceIndex,T=h==="forbidden",k=T?h0:g.bytes;if(!T){if(typeof b!="string"||b.length===0)throw new TypeError("Resolved font id must not be empty");let L;try{L=na(k);}catch{throw new Un(`Font source ${b} must provide genuine bytes`)}if(L>r)throw new Un(`Font source ${b} exceeds the per-font byte ceiling`);if(c+=L,c>vr)throw new Un(`Font sources exceed the aggregate byte ceiling of ${vr}`)}u.push(t&&ra(g)!==void 0?g:Object.freeze({request:Object.freeze({family:y.family,weight:y.weight,style:y.style}),id:b,bytes:k,hash:R,faceIndex:I,...h?{availability:h}:{}}));}let f;if(a){f=[];for(let m=0;m<d;m+=1){let g=a[m],y=g.from,h=g.to,b=g.lineMetrics;f.push(Object.freeze({from:Object.freeze({family:y.family,weight:y.weight,style:y.style}),to:Object.freeze({family:h.family,weight:h.weight,style:h.style}),...b?{lineMetrics:Object.freeze({heightEm:b.heightEm,baselineEm:b.baselineEm})}:{}}));}}let p={epoch:n,maxFontBytes:r,sources:Object.freeze(u),substitutions:f?Object.freeze(f):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:s};return Object.freeze(p)}function _y(e,t){let n=e.map((o,a)=>({value:o,index:a,key:Ir(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function x0(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function Hy(e,t){let n=l=>({family:l.family,weight:l.weight,style:l.style}),r=t?e.sources:_y(e.sources,l=>l.request),o=e.substitutions??[],a=t?o:_y(o,l=>l.from),i={sources:r.map(l=>{let d=l.availability??"available",c={request:n(l.request),availability:d};if(d==="forbidden")return {...c,...t?{id:l.id,faceIndex:l.faceIndex,declaredHash:l.hash}:{}};let u=ra(l);if(u==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...c,...t?{id:l.id}:{},faceIndex:l.faceIndex,declaredHash:l.hash,actualHash:u,byteLength:l.bytes.byteLength}}),substitutions:a.map(l=>({from:n(l.from),to:n(l.to),lineMetrics:l.lineMetrics?{heightEm:l.lineMetrics.heightEm,baselineEm:l.lineMetrics.baselineEm}:null})),defaultFont:x0(e.defaultFont,t),language:e.language||"en"},s={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?s:{},...i}}var S0=Symbol("prepared-layout-font-configuration"),Pl=new WeakMap;function R0(e){return Pl.has(e)}function P0(e){let t=Pl.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function SN(e){let t=Pl.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function Tu(e,t){return zy(e,t,false)}function RN(e,t){return zy(e,t,true)}function zy(e,t,n){let r=b0(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(u=>n&&ra(u)!==void 0?u:yy(u,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a$1=new TextEncoder,i=Hy(o,true),s=a$1.encode(JSON.stringify(i)),l=Hy(o,false),d=a$1.encode(JSON.stringify(l)),c=Object.freeze({[S0]:true,fingerprint:`font-config:${a(s)}`});return Pl.set(c,{configuration:o,sharedShapingFingerprint:`shared-font-config:${a(d)}`}),c}function w0(e){return Tu(e).fingerprint}function v0(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:Ay(t),ligatureCaretPolicy:jy,fallback:By}));return `shaping:${a(n)}`}async function Gy(e,t,n,r){let a=R0(e)?e:Tu(e,t),i=P0(a),{epoch:s,maxFontBytes:l,sources:d,substitutions:c,defaultFont:u}=i,f=i.language||"en",p=a.fingerprint,m=hu({epoch:s,maxFontBytes:l,resources:d,substitutions:c,validateFont:vu,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await wu();let g=Object.freeze({script:y0,variationAxes:Object.freeze({}),shapingLibrary:io,unicodeDataVersion:f0,normalization:p0,language:f,features:u0,fixedPointScale:m0,roundingMode:g0});return Object.freeze({fonts:m,shaper:n??Fu(r),defaultFont:u,environment:g,ligatureCaretPolicy:jy,operation:Object.freeze({resourceEpoch:m.epoch,configEpoch:s,extensionFingerprint:p,shapingHash:v0(g,r),producerVersion:1})})}async function I0(e,t){return Gy(e,t,void 0,Ny)}async function PN(e,t,n,r){return Gy(e,r,t,n)}function F0(e){e.shaper.dispose?.();}var T0=/^[0-9A-Fa-f]{6}$/;function wl(e){if(!(e===void 0||e==="auto"||e==="nil")&&T0.test(e))return e.toUpperCase()}function wi(e){if(e&&e.val!=="nil")return wl(e.fill)}function ku(e){if(!e||e.localName!=="shd")return;let t={};for(let n of e.attributes)t[n.localName]=n.value;return wi(t)}function Ou(e){let t;for(let n of e)n.localName==="shd"&&(t=wi(n.attributes));return t}function vi(e,t,n){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:t,y:r,width:n,height:Math.max(o.y+o.height-r,0)}}var k0=new Set(["b","bCs","caps","emboss","i","iCs","imprint","outline","shadow","smallCaps","strike","vanish"]);function En(e){let t=e.attributes?.val;return t===void 0||!(t==="0"||t==="false"||t==="off")}var Wy=new WeakMap;function vl(e){let t=[],n;for(let r of e){let o=r.role==="carried"?Wy.get(r.properties):void 0,a;for(let i of r.properties){if(!k0.has(i.localName)){r.emit&&t.push(i);continue}o||(a||(a=new Map),a.set(i.localName,En(i)));}if(o){if(o.size>0){n||(n=new Map);for(let[i,s]of o)n.set(i,s);}continue}if(a){n||(n=new Map);for(let[i,s]of a){let l=n.get(i);r.role==="direct"?n.set(i,{value:s,forced:false}):s?r.role==="defaults"?n.set(i,{value:true,forced:true}):n.set(i,{value:l?.forced===true?true:!(l?.value??false),forced:l?.forced===true}):n.set(i,{value:false,forced:false});}}}if(!n)return t;for(let[r,o]of n)t.push(o.value?{localName:r}:{localName:r,attributes:{val:"0"}});return Wy.set(t,n),t}var Mn=Object.freeze({fontFamily:null,fontFamilyEastAsia:null,fontSizePt:10,color:null,bold:false,italic:false,underline:null,strike:false,doubleStrike:false,highlight:null,shading:null,verticalAlign:"baseline",baselineShiftPt:0,caps:false,smallCaps:false,characterSpacingPt:0,horizontalScalePercent:100,kerningMinPt:0,hidden:false}),O0=/^[0-9A-Fa-f]{6}$/;function Ii(e,t=false){return e===void 0||!(t?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Vy(e){return e===void 0||e==="auto"?null:O0.test(e)?e.toUpperCase():null}var $y={major:null,minor:null,majorEastAsia:null,minorEastAsia:null};function He(e,t){let n={...Mn};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(t?b(o?.asciiTheme,t)??b(o?.hAnsiTheme,t):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(n.fontFamily=i);let l=(t?b(o?.eastAsiaTheme,t):null)??o?.eastAsia;l&&l.length<=128&&(n.fontFamilyEastAsia=l);break}case "sz":{let o=Ii(r.attributes?.val);o!==null&&o>0&&(n.fontSizePt=o/2);break}case "color":{n.color=Vy(r.attributes?.val);break}case "b":n.bold=En(r);break;case "i":n.italic=En(r);break;case "u":{let o=r.attributes?.val??"single";n.underline=o==="none"||!En(r)?null:{variant:o,color:Vy(r.attributes?.color)};break}case "strike":n.strike=En(r);break;case "dstrike":n.doubleStrike=En(r);break;case "highlight":{let o=r.attributes?.val;n.highlight=o&&o!=="none"?o:null;break}case "shd":{n.shading=wi(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?n.verticalAlign=o:o==="baseline"&&(n.verticalAlign="baseline");break}case "position":{let o=Ii(r.attributes?.val,true);o!==null&&(n.baselineShiftPt=o/2);break}case "caps":n.caps=En(r);break;case "smallCaps":n.smallCaps=En(r);break;case "spacing":{let o=Ii(r.attributes?.val,true);o!==null&&(n.characterSpacingPt=o/20);break}case "w":{let o=Ii(r.attributes?.val);o!==null&&o>0&&(n.horizontalScalePercent=o);break}case "kern":{let o=Ii(r.attributes?.val);o!==null&&(n.kerningMinPt=o/2);break}case "vanish":n.hidden=En(r);break;}return n}var Ky=new WeakMap;function Il(e,t){if(e.fontFamily===t)return e;let n=Ky.get(e);n||(n=new Map,Ky.set(e,n));let r=n.get(t);return r||(r=Object.freeze({...e,fontFamily:t}),n.set(t,r)),r}function aa(e,t){return t.caps?e.toUpperCase():e}function qn(e,t,n){return n.measure(aa(e,t),t)}function C0(e,t){return e.fontFamily===t.fontFamily&&e.fontFamilyEastAsia===t.fontFamilyEastAsia&&e.fontSizePt===t.fontSizePt&&e.color===t.color&&e.bold===t.bold&&e.italic===t.italic&&e.strike===t.strike&&e.doubleStrike===t.doubleStrike&&e.highlight===t.highlight&&e.shading===t.shading&&e.verticalAlign===t.verticalAlign&&e.baselineShiftPt===t.baselineShiftPt&&e.caps===t.caps&&e.smallCaps===t.smallCaps&&e.characterSpacingPt===t.characterSpacingPt&&e.horizontalScalePercent===t.horizontalScalePercent&&e.kerningMinPt===t.kerningMinPt&&e.hidden===t.hidden&&e.underline?.variant===t.underline?.variant&&e.underline?.color===t.underline?.color}function Cu(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var re=(e,t,n)=>e>=t&&e<=n,Fi=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(t){super(`Unsupported Unicode script at U+${t.toString(16).toUpperCase()}`),this.codePoint=t;}},Xy=e=>{if(re(e,65313,65338)||re(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(re(e,1424,1535)||re(e,64285,64335))return {slot:"cs",script:"Hebr"};if(re(e,1536,1791)||re(e,1872,1919)||re(e,2160,2207)||re(e,2208,2303)||re(e,64336,65023)||re(e,65136,65279)||re(e,126464,126719))return {slot:"cs",script:"Arab"};if(re(e,4352,4607)||re(e,11904,12351)||re(e,12352,12543)||re(e,12544,12687)||re(e,12784,12799)||re(e,13312,19903)||re(e,19968,40959)||re(e,44032,55215)||re(e,63744,64255)||re(e,65382,65437)||re(e,65440,65500)||re(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(re(e,2304,2431)||re(e,43232,43263))return {slot:"cs",script:"Deva"};if(re(e,2432,2559))return {slot:"cs",script:"Beng"};if(re(e,880,1023)||re(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(re(e,1024,1327)||re(e,7296,7311)||re(e,11744,11775)||re(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(re(e,3584,3711))return {slot:"cs",script:"Thai"};if(re(e,6016,6143)||re(e,6624,6655))return {slot:"cs",script:"Khmr"};if(re(e,768,879)||re(e,6832,6911)||re(e,7616,7679)||re(e,8400,8447)||re(e,8192,8303)||re(e,65056,65071)||e<=47||re(e,58,64)||re(e,91,96)||re(e,123,191)||e===5760||re(e,8192,11263)||re(e,65024,65039)||re(e,65280,65381)||re(e,65438,65439)||re(e,65501,65535)||re(e,126976,129791)||re(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(re(e,192,687)||re(e,7424,7551)||re(e,7552,7615)||re(e,7680,7935)||re(e,11360,11391)||re(e,42784,43007)||re(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Fi(e)};function L0(e){let t=[];for(let r=0;r<e.length;){let o=e.codePointAt(r),a=r+(o>65535?2:1);t.push({from:r,to:a,classified:Xy(o)}),r=a;}let n=null;for(let r of t)r.classified?n=r.classified:n&&(r.classified=n);n=null;for(let r=t.length-1;r>=0;r-=1){let o=t[r];o.classified?n=o.classified:n&&(o.classified=n);}return t}function E0(e,t,n){let r=L0(e),o=[],a=r.every(({from:i})=>e.codePointAt(i)<=127)?"ascii":"hAnsi";for(let i of r){let s=n.levels[t+i.from]??0,l=(s&1)===1?"rtl":"ltr",d=i.classified??{slot:a,script:"Zyyy"},c=o.at(-1);c&&c.to===i.from&&c.bidiLevel===s&&c.slot===d.slot&&c.script===d.script?o[o.length-1]={...c,to:i.to}:o.push({from:i.from,to:i.to,direction:l,bidiLevel:s,script:d.script,slot:d.slot});}return o}function Nt(e,t){if(t!=="eastAsia")return e;let n=e.fontFamilyEastAsia;return n===null?e:Il(e,n)}var M0=e=>{let t;try{t=Xy(e);}catch(n){if(n instanceof Fi)return "base";throw n}return t===null?"common":t.slot==="eastAsia"?"eastAsia":"base"},B0=e=>{for(let t=0;t<e.length;t+=1)if(e.charCodeAt(t)>=128)return false;return true};function Yy(e){let t=[],n=(i,s,l)=>{let d=t.at(-1);d&&d.segment===i&&d.to===s?t[t.length-1]={segment:i,from:d.from,to:l}:t.push({segment:i,from:s,to:l});},r=null,o=[],a=i=>{for(let s of o)i==="eastAsia"&&!s.ascii&&n(s.segment,s.from,s.to);o.length=0;};for(let i=0;i<e.length;i+=1){let s=e[i];if(B0(s)){/[0-9A-Za-z]/.test(s)&&(a("base"),r="base");continue}for(let l=0;l<s.length;){let d=s.codePointAt(l),c=l+(d>65535?2:1),u=M0(d);u==="common"?r===null?o.push({segment:i,from:l,to:c,ascii:d<=127}):r==="eastAsia"&&d>127&&n(i,l,c):(a(u),r=u,u==="eastAsia"&&n(i,l,c)),l=c;}}return t}var N0="und";function A0(){return typeof Intl.Segmenter=="function"}function D0(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function _0(){let e=new(D0())("und",{granularity:"grapheme"});return {segment(t){let n=[],r=0;for(let o of e.segment(t)){let a=o.index,i=a+o.segment.length;n.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return n}}}var Mu=_0(),Bu=Mu,Uy=0;function Nu(){return Uy}var ia=null,lo=null,Fl=null,Ti=null;function Xt(e){if(ia===e&&lo)return lo;if(Fl===e&&Ti){let n=Ti;return Fl=ia,Ti=lo,ia=e,lo=n,n}let t=Bu.segment(e);return Fl=ia,Ti=lo,ia=e,lo=t,t}function H0(e){Bu=e,qy();}function j0(){Bu=Mu,qy();}function qy(){Uy+=1,ia=null,lo=null,Fl=null,Ti=null,Lu=null,Tl=null,Eu=0;}function z0(e){return Xt(e).length}var Lu=null,Tl=null,Eu=0;function G0(e){if(Lu===e&&Tl)return {offsets:Tl,count:Eu};let t=Xt(e),n=new Int32Array(e.length+1);for(let r of t)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)n[o]=r.index;return n[e.length]=t.length,Lu=e,Tl=n,Eu=t.length,{offsets:n,count:t.length}}function kl(e,t){let n=Math.max(0,Math.min(t,e.length)),{offsets:r}=G0(e);return r[n]}function W0(e,t){let n=Xt(e);if(n.length===0)return 0;let r=Math.max(0,Math.min(t,n.length));return r>=n.length?e.length:n[r].utf16From}function Au(e){let t=new Set([0,e.text.length]);for(let r of Xt(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Ol(e,t){return Au(e).includes(t)}function V0(e,t){return Ol(e,t)}function K0(e,t,n){return n>=t&&Ol(e,t)&&Ol(e,n)}function $0(e){let t=Xt(e.text);return Au(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var _u="und";function eh(){return typeof Intl.Segmenter=="function"}function X0(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${_u})`);return e}function th(){let e=new(X0())(_u,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var Y0=/^[\p{L}\p{N}']$/u,U0=/^\s$/u;function Zy(e){return Y0.test(e)}function Jy(e){return U0.test(e)}function Du(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function nh(e){let t=Xt(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(Jy(o.text)){let a=r+1;for(;a<t.length&&Jy(t[a].text);)a+=1;n.push(Du(t,r,a,false)),r=a;continue}if(Zy(o.text)){let a=r+1;for(;a<t.length&&Zy(t[a].text);)a+=1;n.push(Du(t,r,a,true)),r=a;continue}n.push(Du(t,r,r+1,false)),r+=1;}return n}function rh(){return {segment:nh}}function oh(e={}){let t=e.isIntlAvailable??eh,n=e.createIntlBoundary??th,r=e.createFallbackBoundary??rh;if(!t())return r();try{return n()}catch{return r()}}var Qy;function ah(){return Qy??=oh(),Qy}function q0(e,t=ah()){return t.segment(e)}function Z0(e,t){return t.map(n=>({graphemeFrom:kl(e,n.utf16From),graphemeTo:kl(e,n.utf16To),wordLike:n.wordLike}))}var ih={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},zu=Object.keys(ih),sh=zu.filter(e=>ih[e]==="coarse-gate"),Cl=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},sa=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},J0={resourceEpoch:Cl,configEpoch:Cl,extensionFingerprint:sa,shapingHash:sa,producerVersion:Cl},Q0=(e,t)=>{J0[t](e[t],t);},la=e=>{for(let t of zu)Q0(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},eF=(e,t)=>{let n=la(e),r=la(t),o=zu.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},Hu=e=>{let t=e.map(({key:n,fingerprint:r})=>(sa(n,"resource dependency key"),sa(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},tF=e=>(Cl(e.revision,"revision"),sa(e.dependencyFingerprint,"dependencyFingerprint"),sa(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:Hu(e.resourceDependencies),...la(e)})),nF=(e,t)=>{let n=Hu(e),r=Hu(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],s=r[a];if(i?.key!==s?.key||i?.fingerprint!==s?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??s.key}}return null};function rF(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=nF(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of sh)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var ju=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=rF(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:tF(r)});}evictEpoch(t){let n=la(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;sh.some(s=>i[s]!==n[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=la(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(l=>n.get(l.key)!==l.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Ll(e,t,n){return Object.freeze({x:e.horizontalFrame==="page"?n.x+e.x-e.horizontalFrameOrigin:t.x+e.x,y:e.verticalFrame==="page"?n.y+e.y-e.verticalFrameOrigin:t.y+e.y})}function Ze(e,t=false){return xt(e.fragments,t)}var lh=new WeakMap;function xt(e,t=false){let n=lh.get(e),r=t?"withRepeats":"withoutRepeats",o=n?.[r];if(o)return o;let a=[],i=s=>{for(let l of s){if(l.kind==="paragraph"){a.push(l);continue}for(let d of l.rows)if(!(d.isHeaderRepeat&&!t))for(let c of d.cells)i(c.blocks);}};return i(e),n||(n={},lh.set(e,n)),n[r]=a,a}function Gu(e){let t=[];for(let n of e.pages)for(let r of Ze(n))t.push(...r.lines);return t}function oF(e){return e.anchoredDrawings??[]}var aF=Object.freeze({x:0,y:0,width:0,height:0});function da(e){let t=e??aF;return {box:t,origin:Object.freeze({x:t.x,y:t.y})}}var iF={fragments:true,anchoredDrawings:true,header:true,footer:true,footnotes:true,endnotes:true},sF=Object.freeze(Object.keys(iF));var lF={separator:true,notes:true},dF=Object.freeze(Object.keys(lF));function dh(e,t,n,r){let o=t.kind??(n==="footnote"?"footnotes":"endnotes");for(let a of dF)switch(a){case "separator":t.separator&&r({page:e,story:"note-separator",host:t.separator,...da(t.separator.box),noteScopeId:null,noteAreaKind:o});break;case "notes":for(let i of t.notes)switch(n){case "footnote":r({page:e,story:"footnote",host:i,...da(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;case "endnote":r({page:e,story:"endnote",host:i,...da(i.box),noteScopeId:i.scopeId,noteAreaKind:o});break;}break;}}function cF(e,t){for(let n of sF)switch(n){case "fragments":t({page:e,story:"body",host:e,...da(e.contentBox),noteScopeId:null,noteAreaKind:null});break;case "anchoredDrawings":break;case "header":e.header&&t({page:e,story:"header",host:e.header,...da(e.header.box),noteScopeId:null,noteAreaKind:null});break;case "footer":e.footer&&t({page:e,story:"footer",host:e.footer,...da(e.footer.box),noteScopeId:null,noteAreaKind:null});break;case "footnotes":e.footnotes&&dh(e,e.footnotes,"footnote",t);break;case "endnotes":e.endnotes&&dh(e,e.endnotes,"endnote",t);break;}}function ki(e,t){for(let n of e.pages)cF(n,t);}var ch=16,Wu=Object.freeze({x:0,y:0});function uh(e,t,n){let r=t.textboxStory?.contentOffset??Wu,o=n??{x:e.x+t.x,y:e.y+t.y};return Object.freeze({x:o.x+r.x,y:o.y+r.y})}function ca(e,t,n=Wu,r){let o=(i,s)=>{if(i.kind==="table"){for(let l of i.rows)for(let d of l.cells)for(let c of d.blocks)o(c,s);return}for(let l of i.lines)for(let d of l.drawings??[])t(d,{...s,paragraph:i,line:l});},a=(i,s,l,d)=>{if(s>ch)return;let c={storyOrigin:d,textboxDepth:s,textboxOwner:l[l.length-1]??null,textboxPath:l};for(let u of i.anchoredDrawings??[])t(u,{...c,paragraph:null,line:null}),u.textboxStory&&a(u.textboxStory,s+1,Object.freeze([...l,u]),uh(d,u,s===0?r?.(u):void 0));for(let u of i.fragments)o(u,c);};a(e,0,Object.freeze([]),n);}function fh(e,t){ki(e,n=>{let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:s}=n,l=o==="header"||o==="footer"?d=>Ll(d,n.origin,{x:r.box.x,y:r.box.y}):void 0;ca(a,(d,c)=>{let u=d.kind==="anchoredDrawing"&&c.textboxDepth===0&&l?l(d):Object.freeze({x:c.storyOrigin.x+d.x,y:c.storyOrigin.y+d.y}),f=p=>Object.freeze({x:u.x+p.x-d.x,y:u.y+p.y-d.y,width:p.width,height:p.height});t({page:r,story:c.textboxDepth===0?o:"textbox",rootStory:o,noteScopeId:i,noteAreaKind:s,root:n,drawingOrigin:u,absolutePaintBounds:f(d.paintBounds),absoluteHitBounds:f(d.hitBounds),paintLayer:d.kind==="inlineDrawing"?"inline":d.behindDocument?"behind-text":"in-front-of-text",drawing:d,...c});},n.origin,l);});}function co(e,t,n=Wu,r){let o=(a,i,s,l)=>{if(!(i>ch)){for(let d of xt(a.fragments,true))t(d,{storyOrigin:l,textboxDepth:i,textboxOwner:s[s.length-1]??null,textboxPath:s});for(let d of a.anchoredDrawings??[])d.textboxStory&&o(d.textboxStory,i+1,Object.freeze([...s,d]),uh(l,d,i===0?r?.(d):void 0));}};o(e,0,Object.freeze([]),n);}function ph(e,t){let n=[];for(let r of e.pages)for(let o of Ze(r))o.paragraphId===t&&n.push(o);return n.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function Oi(e,t,n,r){for(let o of r??Gu(e)){let a=o.range.paragraphId===t?o.range.start:Number.NaN,i=o.range.paragraphId===t?o.range.end:Number.NaN;for(let s of o.spans)s.range.paragraphId===t&&(a=Number.isNaN(a)?s.range.start:Math.min(a,s.range.start),i=Number.isNaN(i)?s.range.end:Math.max(i,s.range.end));for(let s of o.drawings??[])s.paragraphId===t&&(a=Number.isNaN(a)?s.start:Math.min(a,s.start),i=Number.isNaN(i)?s.start+1:Math.max(i,s.start+1));if(!Number.isNaN(a)&&n>=a&&n<=i)return o}return null}function El(e){return e.contentControls??[]}function Ci(e){if(e.length===0)return null;let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:t,y:n,width:r-t,height:o-n}}function Ml(e){let t=false,n=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(t=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(n=true);return t&&n?"sdtContentLocked":t?"contentLocked":n?"sdtLocked":"unlocked"}var Li=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var mh=new WeakMap;function Vu(e){let t=mh.get(e);if(t)return t;let n=[...Ze(e)];for(let r of [e.header,e.footer])r&&n.push(...xt(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)n.push(...xt(o.fragments));return mh.set(e,n),n}function hh(e,t,n){return e.paragraphId===t&&n>=e.start&&n<e.end}var gh=new WeakMap;function Ue(e){let t=gh.get(e);if(t)return t;let n={paragraphId:e.range.paragraphId,start:e.range.start,end:e.range.end,spans:e.spans,drawings:e.drawings??[]},o=e.spans.some(a=>a.range.paragraphId!==e.range.paragraphId)||(e.drawings??[]).some(a=>a.paragraphId!==e.range.paragraphId)?uF(e):[n];return gh.set(e,o),o}function uF(e){let t=[...e.spans.map((r,o)=>({paragraphId:r.range.paragraphId,x:r.box?.x??o,order:o*2+1})),...(e.drawings??[]).map((r,o)=>({paragraphId:r.paragraphId,x:r.advanceStart??r.x??e.spans.length+o,order:o*2}))].sort((r,o)=>r.x-o.x||r.order-o.order),n=[];for(let r of t)n.includes(r.paragraphId)||n.push(r.paragraphId);return n.map(r=>{let o=e.spans.filter(c=>c.range.paragraphId===r),a=(e.drawings??[]).filter(c=>c.paragraphId===r),i=[...o.map(c=>c.range.start),...a.map(c=>c.start)],s=[...o.map(c=>c.range.end),...a.map(c=>c.start+1)],l=i[0],d=s[0];for(let c=1;c<i.length;c+=1)i[c]<l&&(l=i[c]),s[c]>d&&(d=s[c]);return {paragraphId:r,start:l,end:d,spans:o,drawings:a}})}function Bn(e,t){return Ue(e).find(n=>n.paragraphId===t)??null}function uo(e,t,n,r){let o=fo(e),a=o.get(t.paragraphId)??-1,i=o.get(n.paragraphId)??-1,s=o.get(r.paragraphId)??-1;if(a<i||a>s)return null;let l=a===i?Math.max(t.start,n.offset):t.start,d=a===s?Math.min(t.end,r.offset):t.end;return d>l?{start:l,end:d}:null}function YN(e,t){for(let n of e.pages)for(let r of Ze(n)){let o=Tr(r).indexOf(t);if(o>0)return Tr(r).slice(0,o).reverse()}return []}var yh=new WeakMap;function Tr(e){let t=yh.get(e);if(t)return t;let n=[];for(let r of e.lines??[])for(let o of Ue(r))n.includes(o.paragraphId)||n.push(o.paragraphId);return n.includes(e.paragraphId)||n.push(e.paragraphId),yh.set(e,n),n}function fF(e,t){let n=Tr(e);if(n.length===1)return n[0]===t?{start:e.range.start,end:e.range.end}:null;let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let a of e.lines??[]){let i=Bn(a,t);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function Zn(e,t,n){let r=fF(e,t);return r!==null&&n>=r.start&&n<r.end}function UN(e,t){for(let n of e.pages)for(let r of Vu(n))if(r.paragraphId===t)return r;for(let n of e.pages)for(let r of Vu(n))if(Tr(r).includes(t))return r;return null}var bh=new WeakMap,xh=new WeakMap,Sh=new WeakMap,Rh=new WeakMap;function Ph(e){let t=Rh.get(e);if(t)return t;let n=new Set,r=[];for(let o of Ze(e)){for(let a of o.lines)for(let i of Ue(a))n.has(i.paragraphId)||(n.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!n.has(o.paragraphId)&&(n.add(o.paragraphId),r.push(o.paragraphId));}return Rh.set(e,r),r}function po(e){let t=bh.get(e);if(t)return t;let n=new Set,r=[];for(let o of e.pages)for(let a of Ph(o))n.has(a)||(n.add(a),r.push(a));return bh.set(e,r),r}function fo(e){let t=xh.get(e);if(t)return t;let n=new Map;for(let[r,o]of po(e).entries())n.set(o,r);return xh.set(e,n),n}function Bl(e){let t=Sh.get(e);if(t)return t;let n=new Set,r=[],o=a=>{for(let i of xt(a)){for(let s of i.lines)for(let l of Ue(s))n.has(l.paragraphId)||(n.add(l.paragraphId),r.push(l.paragraphId));i.lines.length===0&&!n.has(i.paragraphId)&&(n.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of Ph(a))n.has(i)||(n.add(i),r.push(i));for(let i of [a.header,a.footer])i&&o(i.fragments);for(let i of [a.footnotes,a.endnotes])if(i){i.separator&&o(i.separator.fragments);for(let s of i.notes)o(s.fragments);}}return Sh.set(e,r),r}function wh(e){return e.projected===true?null:e.range}function pF(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:s}=e,l=o==="header"||o==="footer"?d=>Ll(d,e.origin,{x:r.box.x,y:r.box.y}):void 0;co(a,(d,c)=>{let{textboxDepth:u,textboxOwner:f,textboxPath:p,storyOrigin:m}=c,g=u===0?o:"textbox";for(let y of d.lines){let h=[...Ue(y)].sort((b,R)=>(t.get(b.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(R.paragraphId)??Number.MAX_SAFE_INTEGER));for(let b of h)for(let R of b.spans)n({page:r,story:g,rootStory:o,root:e,storyOrigin:m,absoluteBox:Object.freeze({x:m.x+R.box.x,y:m.y+R.box.y,width:R.box.width,height:R.box.height}),noteScopeId:i,noteAreaKind:s,textboxDepth:u,textboxOwner:f,textboxPath:p,paragraph:d,paragraphId:b.paragraphId,line:y,span:R,sourceRange:wh(R)});}},e.origin,l);}function mF(e,t){let n=new Map(Bl(e).map((r,o)=>[r,o]));ki(e,r=>pF(r,n,t));}var vh=4096,Ot=64,Yu=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),Ih=/\s*\\\*\s*MERGEFORMAT\s*$/i;function mo(e){if(e.length>$c)return null;let t=e.replace(/\s+/g," ").trim().toUpperCase();return t.length>$c?null:t.replace(Ih,"").trim()}var gF=/\s*\\#\s*(?:"([^"]*)"|([^\\"]+))$/;function yF(e){if(e.length>$c)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>$c)return null;let n=t.replace(Ih,"").trim(),r=gF.exec(n);if(!r)return {keyword:n.toUpperCase(),picture:void 0};let o=r[1]??r[2]??"";return {keyword:n.slice(0,r.index).trim().toUpperCase(),picture:o.length>0?o:void 0}}function ua(e){let t=yF(e);if(t===null)return null;let{keyword:n,picture:r}=t;return n!=="PAGE"&&n!=="NUMPAGES"&&n!=="SECTIONPAGES"?null:r===void 0?{kind:n}:{kind:n,picture:r}}function Mi(e){return ua(e)?.kind??null}function ft(e,t){return Oc$1(e,t)}function Jn(e){return Pc$1(e)}function Qn(){return {nodes:0,exhausted:false}}function et(e){return e.exhausted?false:(e.nodes+=1,e.nodes>vh?(e.exhausted=true,false):true)}function go(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function Ei(e){e.nesting=0,e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="idle",e.inner.length=0;}function fa(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function hF(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function yo(e){e.nesting===0&&(e.instruction="",e.instructionOverflow=false,e.deletedInstruction="",e.deletedInstructionOverflow=false,e.sawLiveInstruction=false,e.nestingOverflow=false,e.phase="instruction",e.inner.length=0),e.nesting+=1,e.nesting>ad$1?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function pa(e){return e.nesting<2||e.nesting>ad$1?null:e.inner[e.nesting-2]??null}function Fh(e){if(e.nesting===1)return e.phase==="instruction";let t=pa(e);return t!==null&&!t.separated}function $u(e,t){if(!Fh(e))return false;if(e.nesting===1)return t?!e.deletedInstructionOverflow:!e.instructionOverflow;let n=pa(e);return t?!n.deletedOverflow:!n.overflow}function Th(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let t=pa(e);t&&(t.sawLive=true);}function Xu(e,t){if(e.nesting===1){t?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let n=pa(e);n&&(t?(n.deletedOverflow=true,n.deletedInstruction=""):(n.overflow=true,n.instruction=""));}function Ku(e){Xu(e,false),Xu(e,true);}function bF(e,t,n=false){if(!$u(e,n))return;let r=pa(e);n||Th(e);let o=r?n?r.deletedInstruction:r.instruction:n?e.deletedInstruction:e.instruction;if(o.length+t.length>$c){Xu(e,n);return}r?n?r.deletedInstruction=o+t:r.instruction=o+t:n?e.deletedInstruction=o+t:e.instruction=o+t;}function ho(e,t,n,r){if(!Fh(e))return;let o=Qc(t);if(o||Th(e),!$u(e,o))return;if(r>Ot){Ku(e);return}let a=[],i=t.kind==="textValue"?[]:t.children??[];for(let s=i.length-1;s>=0;s-=1)a.push({node:i[s],depth:r+1});for(;a.length>0;){let s=a.pop();if(!et(n)){Ku(e);return}if(s.depth>Ot){Ku(e);return}if(s.node.kind==="textValue"){if(bF(e,s.node.value,o),!$u(e,o))return;continue}let l=s.node.children??[];for(let d=l.length-1;d>=0;d-=1)a.push({node:l[d],depth:s.depth+1});}}function bo(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=fa(e);return r.overflow?null:ua(r.instruction)}let t=pa(e);if(!t||t.separated)return null;t.separated=true;let n=hF(t);return n.overflow?null:ua(n.instruction)}function xo(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&Ei(e);}function kh(e){return e.phase==="instruction"&&e.nesting>=1}function Oh(e){return e.phase==="result"&&e.nesting>=1}function Uu(e){let t=false,n=false,r=false,o=Qn(),a=go(),i=()=>t&&n&&r,s=p=>{p==="PAGE"?t=true:p==="NUMPAGES"?n=true:r=true;},l=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(ft(p,"begin")){yo(a),a.nestingOverflow&&(l=true);return}if(Jn(p)){ho(a,p,o,m);return}if(ft(p,"separate")){let g=a.nesting,y=a.phase,h=bo(a);if(l)return;h&&(g<=1||y==="result")&&d.push(h.kind);return}if(ft(p,"end")&&(xo(a),a.nesting===0)){if(!l)for(let g of d)s(g);d.length=0;}}},u=(p,m)=>{if(p.kind==="run")for(let g of p.children){if(!et(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!Jn(g)&&"children"in g&&g.children.length>0){let y={...a,inner:a.inner.map(R=>({...R}))},h=l,b=d;d=[],f(g,m+1),Object.assign(a,y),l=h,d=b;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&&et(o)&&!(m>Ot)&&p.kind!=="textValue"){if(p.kind==="paragraph"){Ei(a),l=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;Ei(a),l=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(Rc$1(p)){let g=Mi(Tc$1(p)??"");if(g){s(g);return}}for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return}};return f(e,0),!t&&!n&&!r?Yu:{hasPage:t,hasNumPages:n,hasSectionPages:r}}function Nl(e,t){if(!Number.isFinite(e)||e<0||t.length===0||t.length>64||t.includes(".")||t.includes(";")||t.includes("'"))return null;let n=String(Math.floor(e)),r=[],o=false;for(let m=0;m<t.length;m+=1)r.push(o),t[m]==="0"&&(o=true);let a=n.length,i=false,s=0,l=0,d=[],c=-1;for(let m=t.length-1;m>=0;m-=1){let g=t[m];if(g==="0"||g==="#"){i=true,s+=1,c=d.length,a>0?(a-=1,d.push(n[a])):d.push(g==="0"?"0":" ");continue}if(g===","){l===0&&(l=s),s=0,(a>0||r[m])&&(c=d.length,d.push(","));continue}d.push(g);}if(!i)return null;let u=[];for(;a>0;)l>0&&s>=l&&(u.push(","),s=0),a-=1,s+=1,u.push(n[a]);let f=d.slice(c+1).reverse().join(""),p=d.slice(0,c+1).reverse().join("");return f+u.reverse().join("")+p}var xF=64,SF=64,RF=[{value:1e3,glyph:"M"},{value:900,glyph:"CM"},{value:500,glyph:"D"},{value:400,glyph:"CD"},{value:100,glyph:"C"},{value:90,glyph:"XC"},{value:50,glyph:"L"},{value:40,glyph:"XL"},{value:10,glyph:"X"},{value:9,glyph:"IX"},{value:5,glyph:"V"},{value:4,glyph:"IV"},{value:1,glyph:"I"}];function er(e){if(!Number.isFinite(e))return 1;let t=Math.trunc(e);return t<0?1:t>9999?9999:t}function kr(e){return String(er(e))}function Ch(e){let t=er(e);return t<10?`0${t}`:String(t)}function qu(e){let t=er(e);t>3999&&(t=3999);let n="";for(let{value:r,glyph:o}of RF)for(;t>=r;)if(n+=o,t-=r,n.length>=64)return n.slice(0,64);return n||"I"}function Lh(e){return qu(e).toLowerCase()}function Zu(e){let t=er(e),n="";for(;t>0&&n.length<8;)t-=1,n=String.fromCharCode(65+t%26)+n,t=Math.floor(t/26);return n||"A"}function Eh(e){return Zu(e).toLowerCase()}function PF(e){let t=er(e),n=t%100,r=t%10,o=n>=11&&n<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${t}${o}`}function wF(e){return er(e).toString(16).toUpperCase()}function vF(e){let t=["*","\u2020","\u2021","\xA7"],n=er(e);if(n<=0)return t[0];let r=(n-1)%t.length,o=Math.min(Math.floor((n-1)/t.length)+1,IF);return t[r].repeat(o)}var IF=8,Al=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],FF=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Dl(e){let t=er(e);if(t<20)return Al[t];if(t<100){let r=t%10;return FF[Math.floor(t/10)]+(r===0?"":`-${Al[r]}`)}if(t<1e3){let r=t%100;return `${Al[Math.floor(t/100)]} hundred${r===0?"":` ${Dl(r)}`}`}let n=t%1e3;return `${Al[Math.floor(t/1e3)]} thousand${n===0?"":` ${Dl(n)}`}`}function Mh(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function TF(e){return Mh(Dl(e))}var kF=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function OF(e){let t=kF.get(e);return t!==void 0?t:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function CF(e){let t=Dl(e),n=Math.max(t.lastIndexOf(" "),t.lastIndexOf("-")),r=n<0?"":t.slice(0,n+1);return Mh(r+OF(t.slice(n+1)))}function un(e,t){switch(e){case "decimal":return kr(t);case "decimalZero":return Ch(t);case "upperRoman":return qu(t);case "lowerRoman":return Lh(t);case "upperLetter":return Zu(t);case "lowerLetter":return Eh(t);case "ordinal":return PF(t);case "cardinalText":return TF(t);case "ordinalText":return CF(t);case "hex":return wF(t);case "chicago":return vF(t);case "numberInDash":return `- ${kr(t)} -`;case "none":case "bullet":return "";default:return kr(t)}}function _l(e,t,n){let r=e.length>64?e.slice(0,64):e,o="";for(let a=0;a<r.length&&!(o.length>=64);a+=1){let i=r[a];if(i==="%"&&a+1<r.length){let s=r[a+1];if(s>="1"&&s<="9"){let l=Number(s)-1,d=n[l]??"decimal",c=t[l]??1,u=d==="bullet"?"":un(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var Te="all-markup",jl=class{#e;constructor(t){this.#e=new Set(t),Object.freeze(this);}get size(){return this.#e.size}has(t){return this.#e.has(t)}forEach(t,n){this.#e.forEach(r=>t.call(n,r,r,this));}entries(){return this.#e.entries()}keys(){return this.#e.keys()}values(){return this.#e.values()}union(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;)n.add(o.value),o=r.next();return n}intersection(t){let n=new Set;for(let r of this.#e)t.has(r)&&n.add(r);return n}difference(t){let n=new Set;for(let r of this.#e)t.has(r)||n.add(r);return n}symmetricDifference(t){let n=new Set(this.#e),r=t.keys(),o=r.next();for(;!o.done;){let a=o.value;this.#e.has(a)?n.delete(a):n.add(a),o=r.next();}return n}isSubsetOf(t){if(this.size>t.size)return false;for(let n of this.#e)if(!t.has(n))return false;return true}isSupersetOf(t){if(this.size<t.size)return false;let n=t.keys(),r=n.next();for(;!r.done;){if(!this.#e.has(r.value))return false;r=n.next();}return true}isDisjointFrom(t){for(let n of this.#e)if(t.has(n))return false;return true}[Symbol.iterator](){return this.#e[Symbol.iterator]()}},fA=new jl([]);function LF(e){let t=new Set;for(let o of e)t.add(o);if(t.size===0)return;let n=[...t].sort(),r=new jl(n);return Object.freeze({hiddenAuthors:r,includes:o=>!r.has(o.author),includesNode:(o,a)=>!r.has(a),cacheKey:JSON.stringify(n)})}function ma(e,t){return e.includes?.(t)??Nh(e,t.nodeId,t.author)}function Nh(e,t,n){return e.includesNode?.(t,n)??!e.hiddenAuthors.has(n)}function Ju(e,t,n){return ma(e,t)?n:e.excludedNodeMode?.(t.nodeId,t.author)??"proposed"}function Ah(e,t,n,r){return Nh(e,t,n)?r:e.excludedNodeMode?.(t,n)??"proposed"}var nr=Object.freeze([]),EF=32,MF={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function tr(e,t){for(let n of e.attributes)if(n.localName===t&&n.namespaceUri===e.namespaceUri&&(n.kind==="wmlVal"||n.kind==="genericExtension"||n.kind==="xmlSpace"))return n.value}function Yt(e){if(e.kind==="textValue")return null;let t=MF[e.kind];if(t===void 0)return null;let n=tr(e,"date");return {kind:t,id:tr(e,"id")??"",author:tr(e,"author")??"",...n===void 0?{}:{date:n},nodeId:e.id}}function Qt(e,t){return e.length===0?[t]:[...e,t]}function At(e){return e.kind!=="textValue"&&ja$1(e.kind)}var Or=EF;function Oe(e,t,n){if(e.length===0||t==="all-markup"&&!n)return true;for(let r of e){let o=n?Ju(n,r,t):t;if(o==="all-markup")continue;if(o==="proposed"?r.kind==="delete"||r.kind==="moveFrom":r.kind==="insert"||r.kind==="moveTo")return false}return true}function zl(e,t,n){if(!n&&t==="all-markup")return e;if(!Oe(e,t,n))return null;if(!n)return e;let r=e.filter(o=>ma(n,o));return r.length===0?nr:r}function Bh(e,t,n){return t==="all-markup"&&(!n||ma(n,e))}function Dh(e,t){return t?e.filter(n=>{if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")return true;let r="revisionNodeId"in n&&typeof n.revisionNodeId=="string"?n.revisionNodeId:"";return ma(t,{kind:"format",id:n.attributes?.id??"",author:n.attributes?.author??"",...n.attributes?.date===void 0?{}:{date:n.attributes.date},nodeId:r})}):e}function Gl(e,t,n){if(t!=="all-markup")return {revisions:nr,formatRevision:null};if(!n)return {revisions:So(e),formatRevision:Bi(e)};let r=So(e).filter(a=>Bh(a,t,n)),o=Bi(e);return {revisions:r,formatRevision:o&&Bh(o,t,n)?o:null}}function _h(e,t,n){let r=So(e);if(!n)return r.length>0||Bi(e)!==null;if(r.some(a=>ma(n,a)))return true;let o=Bi(e);return o!==null&&ma(n,o)}function So(e){if(e.kind==="textValue")return Hl;let t=e.children.find(o=>o.kind==="paragraphProperties");if(!t||t.kind==="textValue")return Hl;let n=t.children.find(o=>o.kind==="runProperties");if(!n||n.kind==="textValue")return Hl;let r=[];for(let o of n.children){if(o.kind==="textValue"||o.namespaceUri!==ca$1)continue;let a=BF[o.localName];if(a===void 0)continue;let i=tr(o,"date");r.push({kind:a,id:tr(o,"id")??"",author:tr(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:Hl}var BF={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function Bi(e){if(e.kind==="textValue")return null;let t=e.children.find(r=>r.kind==="paragraphProperties");if(!t||t.kind==="textValue")return null;let n=t.children.find(r=>r.kind==="runProperties");if(!n||n.kind==="textValue")return null;for(let r of n.children){if(r.kind==="textValue"||r.namespaceUri!==ca$1||r.localName!=="rPrChange")continue;let o=tr(r,"date");return {kind:"format",id:tr(r,"id")??"",author:tr(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var Hl=Object.freeze([]);function Qu(e){return e.find(t=>Hh(t))??e[0]}function Hh(e){return e.kind==="delete"||e.kind==="moveFrom"}function Wl(e,t){let n=Qu(e);return {...n?{markRevisions:e,markRevision:n}:{},...t?{markFormatRevision:t}:{}}}function NF(e){return Qu(So(e))??null}function AF(e){for(let t of e){if(t.localName!=="rPrChange"&&t.localName!=="pPrChange")continue;let n=t.attributes??{},r=n.date;return {kind:"format",id:n.id??"",author:n.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function fn(e){return e.some(t=>{switch(t.kind){case "delete":case "moveFrom":return true;case "insert":case "moveTo":case "format":return false;default:return t.kind}})}function Ni(e,t,n){if(!e.has(t)&&e.size>=8){let r=e.keys().next();r.done||e.delete(r.value);}e.set(t,n);}var DF=Or;function ga(e,t){if(e.kind!=="textValue"){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===ca$1&&n.localName===t)return n}}function _F(e){if(e.kind==="textValue")return false;let t=ga(e,"paragraphProperties")??ga(e,"pPr");if(!t)return false;let n=ga(t,"runProperties")??ga(t,"rPr");return n===void 0?false:ga(n,"del")!==void 0||ga(n,"moveFrom")!==void 0}function ef(e,t,n,r,o=[]){if(e.kind==="textValue"||t>DF)return true;let a=(i,s)=>{for(let l of i){if(l.kind==="textValue")continue;if(l.kind==="run"){for(let u of l.children){if(u.kind==="text"){for(let f of u.children)if(f.kind==="textValue"&&f.value.length>0)return false;continue}if(u.kind!=="runProperties")return false}continue}if(oc$1(l)){if(s>=nc$1)continue;let u=qc(l);if(u&&!a(u,s+1))return false;continue}if(l.kind==="hyperlink"){if(!ef(l,s+1,n,r,o))return false;continue}if(!At(l))continue;let d=Yt(l);if(!d)continue;let c=Qt(o,d);if(Oe(c,n,r)&&!ef(l,s+1,n,r,c))return false}return true};return a(e.children,t)}function tf(e,t,n){if(t==="all-markup"&&!n)return false;for(let r of So(e)){let o=n?Ju(n,r,t):t;if(o==="all-markup")continue;let a=r.kind==="delete"||r.kind==="moveFrom";if(o==="proposed"&&a||o==="original"&&!a)return true}return false}function nf(e,t="proposed",n){return e.kind!=="paragraph"||!tf(e,t,n)?false:ef(e,0,t,n)}function HF(e){let t=e.root;if(t.localName==="hdr"||t.localName==="ftr")return t;let n=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=n(o);if(a)return a}}};return n(t)}function jF(e,t,n){return !(e.kind==="paragraph"&&nf(e,t,n))}var Vh=new WeakMap;function ya(e){return Vh.get(e)??null}function Kh(e,t){let n=t.children.filter(a=>jh(a)),r=e.flatMap(a=>a.children.filter(i=>!jh(i))),o={...t,children:[...n,...r]};return Vh.set(o,{merged:o,members:e}),o}function jh(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function zF(e,t,n){if(t==="all-markup"&&!n)return e.map(s=>s.block);let r=[],o=[],a=null,i=()=>{r.push(...zh(o)),o=[],a=null;};for(let{block:s,parentKey:l}of e){if(o.length>0&&l!==a&&i(),s.kind!=="paragraph"){i(),r.push(s);continue}let d=tf(s,t,n);if((d||o.length>0)&&!VF(s,t,n)){i(),r.push(s);continue}if(d){o.push(s),a=l;continue}if(o.length===0){r.push(s);continue}let c=[...o,s];o=[],a=null,r.push(Kh(c,s));}return r.push(...zh(o)),r}function zh(e){if(e.length<2)return e;let t=e[e.length-1];return [Kh(e,t)]}function Ai(e,t,n){return zF(WF(e),t,n).filter(o=>jF(o,t,n))}var GF=new Set(["pPr","bookmarkStart","bookmarkEnd","proofErr","permStart","permEnd"]);function $h(e){for(let t of e.children){if(t.kind==="textValue"){if(t.value.length>0)return false;continue}if(t.namespaceUri!==ca$1||!GF.has(t.localName))return false}return true}function WF(e){let t=[],n=(r,o,a)=>{for(let i of r)if(i.kind!=="textValue"){if(i.kind==="paragraph"||i.kind==="table"){t.push({block:i,parentKey:a});continue}oc$1(i)&&o<nc$1&&n(rc$1(i),o+1,i.id);}};return n(e,0,""),t}var Gh=new WeakMap;function VF(e,t,n){let r=`${t}|${n?.cacheKey??""}`,o=Gh.get(e),a=o?.get(r);if(a!==void 0)return a;let i=KF(e,t,n);return o?Ni(o,r,i):Gh.set(e,new Map([[r,i]])),i}function KF(e,t,n){if(!$F(e))return false;let r=ba(e,[],void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,n),o=0;for(let a of r)o=Math.max(o,a.end);return o<=Pe(e).length}function $F(e){let t=0,n=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===ca$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?t+=1:a==="end"&&(t-=1,t<0&&(n=true));}for(let a of o.children)r(a);}};return r(e),t===0&&!n}var Wh=sf$1(16);function Ct(e,t="all-markup",n){let r=`${t}|${n?.cacheKey??""}`,o=Wh.get(e),a=o?.get(r);if(a)return a;let i=HF(e),s=i?Ai(i.children,t,n):[];return o?Ni(o,r,s):Wh.set(e,new Map([[r,s]])),s}function ha(e,t="all-markup",n){return e.kind!=="note"?[]:Ai(e.children,t,n)}function rf(e,t="all-markup",n){return e.kind==="textValue"?[]:Ai(e.children,t,n)}var XF=64,YF=31680,UF=720,qF=36,of=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),xa=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),ZF=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),JF=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Di(e){return e.kind!=="textValue"}function Vl(e,t){return e.attributes.find(n=>n.localName===t)?.value}function af(e,t){for(let n of e.children)if(Di(n)&&n.localName===t)return n}function Xh(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function QF(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function Yh(e,t){if(!t)return;let n=0;for(let r of t.children){if(n>=128)break;if(n+=1,!Di(r)||r.localName!=="tab")continue;let o=QF(Xh(Vl(r,"pos"))??NaN);if(o===null)continue;let a=Vl(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=ZF.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let s=Vl(r,"leader");e.set(o,{alignment:i,...s!==void 0&&JF.has(s)?{leader:s}:{}});}}function Uh(e,t=36){let n=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<n.length&&o<64;o+=1){let[a,i]=n[o];r.push({positionPt:a/20,alignment:i.alignment,...eT(i)});}return {stops:Object.freeze(r),defaultIntervalPt:t}}function eT(e){return e.leader?{leader:e.leader}:{}}function sf(e){let t=new Map;for(let n of e)!n||!Di(n)||Yh(t,af(n,"tabs"));return Uh(t)}function lf(e){if(!e||!Di(e))return xa;let t=new Map;return Yh(t,af(e,"tabs")),Uh(t)}function _i(e,t){return t===void 0||!Number.isFinite(t)||t<=0||t===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:t}}function df(e){if(!e||!Di(e))return 36;let t=af(e,"defaultTabStop");if(!t)return 36;let n=Xh(Vl(t,"val"));return n===null||n<=0||n>31680?36:n/20}function Sa(e,t,n){let r=Math.max(t,n);for(let i of e.stops)if(i.positionPt>t)return {positionPt:Math.min(i.positionPt,r),alignment:i.alignment,...i.leader?{leader:i.leader}:{}};let o=e.defaultIntervalPt>0?e.defaultIntervalPt:36,a=Math.ceil((t+1e-9)/o)*o;return a<=t&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function cf(e,t,n,r,o){let a=n;switch(e){case "center":a=n-r/2;break;case "right":a=n-r;break;case "decimal":a=n-o;break;default:a=n;}let i=a-t;return i>0?i:0}function Ro(e){return `tabs(${e.stops.map(n=>`${n.alignment}@${Math.round(n.positionPt*1e3)}${n.leader?`/${n.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var qh=1,Kl=1;function Ra(e){let t=Math.max(e,1),n=3;if(t>=n){let i=t/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:t,insetPt:0}}let r=1,o=1,a=Math.max(t,n);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(t-a)/2}}var tT=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function nT(e){return tT.has(e)}function Zh(e,t){return nT(e)?Ra(t).extentPt:t}function ff(e){let t=false;for(let n of e){if(n.localName!=="pageBreakBefore")continue;let r=n.attributes?.val;t=r===void 0||Xl(r);}return t}var Qh=31680/20,ji=12,eb=3168,tb=14,wa=Object.freeze({rule:"auto",value:240}),rT=132,oT=1584,nb=["top","left","bottom","right","between","bar"],aT=Object.freeze({}),iT=/^[0-9A-Fa-f]{6}$/,sT=new Set(["nil","none"]);function $l(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function uf(e,t){return !Number.isFinite(e)||e<=0?0:e>t?t:e}function Jh(e){let t=$l(e,true);return t===null?0:uf(qd$1(od$1(t)),Qh)}function Xl(e){return e!=="0"&&e!=="false"&&e!=="off"}function lT(e){return e===void 0||e==="auto"?null:iT.test(e)?e.toUpperCase():null}function Hi(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Nn(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function MA(e,t){let n=null;for(let r of e)r.localName===t&&(n={...n??{},...r.attributes??{}});return n}function pf(e,t){let n=0,r=0,o=false,a=false;for(let i of e){if(i.localName!=="spacing")continue;let s=i.attributes?.before,l=i.attributes?.after;s!==void 0&&(n=Jh(s)),l!==void 0&&(r=Jh(l));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Xl(d)),c!==void 0&&(a=Xl(c));}if(o||a){let i=t?.inList||t?.inTableCell?0:tb;o&&(n=i),a&&(r=i);}return {before:n,after:r}}function mf(e){let t,n;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(t=i);let s=a.attributes?.line;if(s!==void 0){let l=$l(s,true);l!==null&&(n=l);}}if(n===void 0)return wa;let r=t??"auto";if(r==="auto"){let a=n/240;return a>0?{rule:"auto",value:Math.min(a,rT)*240}:wa}let o=n/20;return o>0?{rule:r,value:Math.min(o,oT)}:wa}function gf(e,t,n){let r=e.rule==="auto"?t*(e.value/240):e.rule==="exact"?e.value:Math.max(t,e.value),o=r-t;return o<0?{height:r,baseline:Math.max(0,Math.min(n,r))}:e.rule==="exact"?{height:r,baseline:n+o/2}:{height:r,baseline:n}}function yf(e){let t=false;for(let n of e){if(n.localName!=="contextualSpacing")continue;let r=n.attributes?.val;t=r===void 0||Xl(r);}return t}function Pa(e){if(!e)return;let t=Hi(e,"val");if(!t||sT.has(t))return;let n=$l(Hi(e,"sz")),r=n===null?.5:uf(n/8,ji)||.5,o=$l(Hi(e,"space")),a=o===null?0:uf(o,eb),i=Hi(e,"shadow"),s=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:t,color:lT(Hi(e,"color")),widthPt:r,spacePt:a,...s?{shadow:true}:{}}}function rb(e){let t=Pa(Nn(e,"top")),n=Pa(Nn(e,"left")??Nn(e,"start")),r=Pa(Nn(e,"bottom")),o=Pa(Nn(e,"right")??Nn(e,"end")),a=Pa(Nn(e,"between")),i=Pa(Nn(e,"bar"));return {...t?{top:t}:{},...n?{left:n}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function rr(e){if(!e||e.kind==="textValue")return {};let t=Nn(e,"pBdr");return t?rb(t):{}}function zi(e){let t=aT;for(let n of e){if(!n||n.kind==="textValue")continue;let r=Nn(n,"pBdr");r&&(t=rb(r));}return t}function Dt(e){return Zh(e.val,e.widthPt)}function Cr(e){return e?e.spacePt+Dt(e):0}function dT(e){return Cr(e)}function hf(e){let t=[];for(let n of nb){let r=e[n];r&&t.push(`${n}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return t.join("|")}function va(e,t){return Math.max(e,t)-t}function bf(e,t,n,r){return n&&!r?0:va(e,t)}var ob=21600;function Je(e){return Number.isFinite(e)?e:0}function Gi(e){if(e.length===0)return Object.freeze([]);let t=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),n=[],r=t[0];for(let o=1;o<t.length;o+=1){let a=t[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(n.push(r),r=a);}return n.push(r),Object.freeze(n)}function cT(e,t){let n=[];for(let r of e)for(let o of t){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&n.push(Object.freeze({start:a,end:i}));}return Gi(n)}function xf(e,t,n){let r=[];for(let o of e){let a=Math.max(o.start,t),i=Math.min(o.end,n);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Gi(r)}function uT(e,t,n){let r=[],o=t;for(let a of e)a.start>o&&r.push(Object.freeze({start:o,end:a.start})),o=Math.max(o,a.end);return o<n&&r.push(Object.freeze({start:o,end:n})),Object.freeze(r)}function ib(e,t){return Ia(e,t)}function Sf(e,t,n){return ib(Ia(e,t),n)}function fT(e,t){let n=[],r=Math.min(e.length,St);if(r<2)return Object.freeze([]);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r],s=a.y,l=i.y;if(s===l)continue;let d=Math.min(s,l),c=Math.max(s,l);if(t<d||t>c||t===c&&l>s||t===d&&l<s)continue;let u=(t-s)/(l-s),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&n.push({x:f,delta:l>s?1:-1});}return n.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(n)}function pT(e,t){let n=[],r=Math.min(e.length,St);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(t-a.y)>1e-6)continue;let s=Math.min(a.x,i.x),l=Math.max(a.x,i.x);l>s&&n.push(Object.freeze({start:s,end:l}));}return Gi(n)}function ab(e,t,n){let r=mT(fT(e,t),n),o=pT(e,t);return Gi([...r,...o])}function mT(e,t){if(e.length===0)return Object.freeze([]);let n=[];if(t==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,s=e[a+1].x;s>i&&n.push(Object.freeze({start:i,end:s}));}return Object.freeze(n)}let r=0,o=null;for(let a of e){let i=r;r+=a.delta,i===0&&r!==0?o=a.x:i!==0&&r===0&&o!==null&&(a.x>o&&n.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(n)}function gT(e,t){return Object.freeze({top:Je(e.top)+Je(t.top),right:Je(e.right)+Je(t.right),bottom:Je(e.bottom)+Je(t.bottom),left:Je(e.left)+Je(t.left)})}function yT(e,t,n,r,o,a){let i=t.x-e.x,s=t.y-e.y,l=r.x-n.x,d=r.y-n.y,c=i*d-s*l;if(Math.abs(c)<1e-12)return null;let f=((n.x-e.x)*s-(n.y-e.y)*i)/c,p=((n.x-e.x)*d-(n.y-e.y)*l)/c;if(f<-1e-9||f>1+1e-9||p<-1e-9||p>1+1e-9)return null;let m=e.y+f*s;return !Number.isFinite(m)||m<o-1e-6||m>a+1e-6?null:m}function hT(e,t,n,r){let o=[],a=Math.min(e.length,St),i=Math.min(t.length,St);if(a<2||i<2)return Object.freeze([]);let s=St*St,l=0;for(let d=0;d<a;d+=1){let c=e[d],u=e[(d+1)%a];for(let f=0;f<i;f+=1){if(l>=s)return Object.freeze(o);l+=1;let p=t[f],m=t[(f+1)%i],g=yT(c,u,p,m,n,r);g!==null&&o.push(g);}}return Object.freeze(o)}function bT(e,t,n){let r=new Set;r.add(t),r.add(n);for(let o of e){let a=Math.min(o.length,St);for(let i=0;i<a;i+=1){let s=o[i].y;Number.isFinite(s)&&s>=t-1e-6&&s<=n+1e-6&&r.add(s);}for(let i=0;i<a;i+=1){let s=o[i],l=o[(i+1)%a],d=s.y,c=l.y;if(d!==c)for(let u of [t,n]){let f=Math.min(d,c),p=Math.max(d,c);u>=f&&u<=p&&r.add(u);}}}if(e.length>=2)for(let o of hT(e[0],e[1],t,n))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function xT(e,t,n,r){let o=ab(e,n,r);return t&&t.length>=3&&(o=cT(o,ab(t,n,"nonzero"))),o}function sb(e,t,n,r,o=null){let a=Je(n.top),i=Je(n.bottom),s=Je(n.left),l=Je(n.right),d=t-i,c=t+a,u=bT(o&&o.length>=3?[e,o]:[e],d,c),f=[],p=u.length>=2?u.flatMap((m,g)=>{if(g+1>=u.length)return [];let y=u[g+1];return y<=m+1e-6?[m]:[m,y,(m+y)/2]}):[d];for(let m of p){let g=xT(e,o,m,r);for(let y of g)f.push(Object.freeze({start:y.start-s,end:y.end+l}));}return Gi(f)}function lb(e){let{x:t,y:n,width:r,height:o}=e;return Object.freeze([Object.freeze({x:t,y:n}),Object.freeze({x:t+r,y:n}),Object.freeze({x:t+r,y:n+o}),Object.freeze({x:t,y:n+o})])}function ST(e){let t=Math.max(0,Je(e.extentWidthPt)),n=Math.max(0,Je(e.extentHeightPt)),r=Ul(e.transform,t,n),o=Math.min(e.polygonEmu.length,St);if(o<3)return lb({x:e.anchorX,y:e.anchorY,width:t,height:n});let a=r.width/ob,i=r.height/ob,s=[];for(let l=0;l<o;l+=1){let d=e.polygonEmu[l];s.push(Object.freeze({x:Je(d.x)*a,y:Je(d.y)*i}));}return ql({points:Object.freeze(s),sourceWidth:r.width,sourceHeight:r.height,offsetX:r.offsetX,offsetY:r.offsetY,crop:{left:0,top:0,right:0,bottom:0},transform:e.transform,layoutWidth:t,layoutHeight:n,anchorX:e.anchorX,anchorY:e.anchorY})}function RT(e,t){let n=t.effectInsets??Yl,r=t.wrapDistances??Yl,o=Je(t.contentLeft),a=Je(t.contentRight);if(t.mode==="topAndBottom"){let c=ib(Ia(t.contentBounds,n),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):xf([{start:o,end:a}],o,a)}if(t.mode==="square"){let c=Sf(t.contentBounds,n,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):xf([{start:c.x,end:c.x+c.width}],o,a)}let i=t.polygon&&t.polygon.length>=3?t.polygon:lb(t.contentBounds),s=t.mode==="through"?"evenodd":"nonzero",l=gT(r,n),d=sb(i,e,l,s,t.clipPolygon);return xf(d,o,a)}function PT(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(t=>t.start)),end:Math.max(...e.map(t=>t.end))})}function wT(e,t,n,r,o){if(n==="bothSides"||t.length===0)return e;let a=PT(t);if(!a)return e;if(n==="left")return Object.freeze(e.filter(l=>l.end<=a.start+1e-4));if(n==="right")return Object.freeze(e.filter(l=>l.start>=a.end-1e-4));let i=Math.max(0,a.start-r),s=Math.max(0,o-a.end);return i===s?Object.freeze(e.filter(l=>l.start>=a.end-1e-4)):i>s?Object.freeze(e.filter(l=>l.end<=a.start+1e-4)):Object.freeze(e.filter(l=>l.start>=a.end-1e-4))}function db(e,t){let n=RT(e,t),r=uT(n,t.contentLeft,t.contentRight);return wT(r,n,t.textSide,t.contentLeft,t.contentRight)}function vT(e,t,n,r){return n.length<3?false:sb(n,t,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function Rf(e,t,n){let r=n.effectInsets??Yl,o=n.hitBounds;if(e<o.x||e>o.x+o.width||t<o.y||t>o.y+o.height)return false;if(n.clipPolygon&&n.clipPolygon.length>=3)return vT(e,t,n.clipPolygon,r);let a=Ia(n.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height}function cb(e){let t=Object.freeze({top:Je(e.wrapDistancesEmu.top/An),right:Je(e.wrapDistancesEmu.right/An),bottom:Je(e.wrapDistancesEmu.bottom/An),left:Je(e.wrapDistancesEmu.left/An)}),n=e.mode==="tight"||e.mode==="through"?ST({polygonEmu:e.polygonEmu,extentWidthPt:e.extentWidthPt,extentHeightPt:e.extentHeightPt,anchorX:e.contentBounds.x,anchorY:e.contentBounds.y,transform:e.transform}):null;return Object.freeze({mode:e.mode,contentBounds:e.contentBounds,polygon:n,clipPolygon:e.geometry.clipPolygon,wrapDistances:t,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var _t=1e5,St=m.maxPolygonPoints,Yl=Object.freeze({top:0,right:0,bottom:0,left:0}),IT=32,FT=.1,TT=new Set(["rect","ellipse","roundRect"]);function Se(e){return Number.isFinite(e)?e:0}function en(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function ub(e,t){let n=e+t;return Number.isFinite(n)?n:0}function fb(e,t,n){let r=en(e,0,n),o=en(t,0,n);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=n){let i=(n-1)/a;r*=i,o*=i;}return {left:r,right:o}}function kT(e){let t=fb(en(e.left,0,_t),en(e.right,0,_t),_t),n=fb(en(e.top,0,_t),en(e.bottom,0,_t),_t);return Object.freeze({left:t.left,top:n.left,right:t.right,bottom:n.right})}function OT(e){let t=kT({left:e.left*_t,top:e.top*_t,right:e.right*_t,bottom:e.bottom*_t});return Object.freeze({left:t.left/_t,top:t.top/_t,right:t.right/_t,bottom:t.bottom/_t})}function CT(e){let t=n=>{if(!Number.isFinite(n))return 0;let r=n/An;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:t(e.top),right:t(e.right),bottom:t(e.bottom),left:t(e.left)})}function Ia(e,t){let n=Se(t.left),r=Se(t.right),o=Se(t.top),a=Se(t.bottom);return Object.freeze({x:e.x-n,y:e.y-o,width:Math.max(0,ub(e.width,n+r)),height:Math.max(0,ub(e.height,o+a))})}function LT(e,t,n){let r=e*en(n.left,0,1),o=t*en(n.top,0,1),a=e*(1-en(n.right,0,1)),i=t*(1-en(n.bottom,0,1));if(a<=r||i<=o){let s=e/2,l=t/2;return Object.freeze({left:s,top:l,right:s,bottom:l})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function Ul(e,t,n){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?Se(Lr(r)??t):Math.max(0,Se(t)),s=o>0?Se(Lr(o)??n):Math.max(0,Se(n));return Object.freeze({offsetX:Se(Lr(a.x)??0),offsetY:Se(Lr(a.y)??0),width:i,height:s})}function ET(e,t,n,r){let o=LT(t,n,r),a=o.right-o.left,i=o.bottom-o.top,s=t>0?t:1,l=n>0?n:1,d=[],c=Math.min(e.length,St);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+en(f.x/s,0,1)*a,m=i<=0?o.top:o.top+en(f.y/l,0,1)*i;d.push(Object.freeze({x:Se(p),y:Se(m)}));}return Object.freeze(d)}function pb(e,t,n){let r=e.x-t.x,o=e.y-t.y;n.flipHorizontal&&(r=-r),n.flipVertical&&(o=-o);let a=Se(n.rotationDegrees)*Math.PI/180,i=Math.cos(a),s=Math.sin(a),l=r*i-o*s,d=r*s+o*i;return Object.freeze({x:Se(l+t.x),y:Se(d+t.y)})}function mb(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let t=e[0].x,n=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,St);for(let i=1;i<a;i+=1){let s=e[i];!Number.isFinite(s.x)||!Number.isFinite(s.y)||(t=Math.min(t,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y));}return Object.freeze({x:t,y:r,width:Math.max(0,n-t),height:Math.max(0,o-r)})}function Pf(e){let t=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),n=Wi(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let s of n)r.push(pb(Object.freeze({x:s.x+e.offsetX,y:s.y+e.offsetY}),t,e.transform));let o=mb(r),a=Math.max(o.width,1e-6),i=Math.max(o.height,1e-6);return Object.freeze({bboxX:o.x,bboxY:o.y,scaleX:Math.max(0,Se(e.layoutWidth))/a,scaleY:Math.max(0,Se(e.layoutHeight))/i,anchorX:Se(e.anchorX),anchorY:Se(e.anchorY)})}function MT(e,t){return Object.freeze({x:Se(t.anchorX+(e.x-t.bboxX)*t.scaleX),y:Se(t.anchorY+(e.y-t.bboxY)*t.scaleY)})}function ql(e){let t=e.mapping??Pf({sourceWidth:e.sourceWidth,sourceHeight:e.sourceHeight,offsetX:e.offsetX,offsetY:e.offsetY,transform:e.transform,layoutWidth:e.layoutWidth,layoutHeight:e.layoutHeight,anchorX:e.anchorX,anchorY:e.anchorY}),n=ET(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(n.length>0?n.length:e.points.length,St),o=n.length>0?n:e.points.slice(0,r),a=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),i=[];for(let s=0;s<r;s+=1){let l=o[s],d=Object.freeze({x:Se(l.x+e.offsetX),y:Se(l.y+e.offsetY)});i.push(MT(pb(d,a,e.transform),t));}return Object.freeze(i)}function Wi(e,t,n,r){if(n<=0||r<=0){let o=Object.freeze({x:e,y:t});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:t}),Object.freeze({x:e+n,y:t}),Object.freeze({x:e+n,y:t+r}),Object.freeze({x:e,y:t+r})])}function BT(e,t,n){if(!e||!TT.has(e))return null;if(t<=0||n<=0)return Wi(0,0,Math.max(0,t),Math.max(0,n));if(e==="rect")return Wi(0,0,t,n);if(e==="ellipse"){let s=[],l=t/2,d=n/2,c=t/2,u=n/2,f=Math.min(IT,St);for(let p=0;p<f;p+=1){let m=p/f*Math.PI*2;s.push(Object.freeze({x:l+c*Math.cos(m),y:d+u*Math.sin(m)}));}return Object.freeze(s)}let r=Math.min(t,n)*FT,o=Math.max(0,r),a=t,i=n;return Object.freeze([Object.freeze({x:o,y:0}),Object.freeze({x:a-o,y:0}),Object.freeze({x:a,y:o}),Object.freeze({x:a,y:i-o}),Object.freeze({x:a-o,y:i}),Object.freeze({x:o,y:i}),Object.freeze({x:0,y:i-o}),Object.freeze({x:0,y:o})])}function Ta(e){return Object.freeze({x:Se(e.x),y:Se(e.y)})}function NT(e,t){if(e.length===0)return Object.freeze([]);let n=t.x+t.width,r=t.y+t.height,o=(i,s,l)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,St);for(let u=0;u<c;u+=1){let f=Ta(i[u]),p=Ta(i[(u+1)%c]),m=s(f),g=s(p);if(m&&g?d.push(p):m&&!g?d.push(Ta(l(f,p))):!m&&g&&(d.push(Ta(l(f,p))),d.push(p)),d.length>=St)break}return Object.freeze(d.slice(0,St))},a=e.slice(0,St).map(Ta);return a=[...o(a,i=>i.x>=t.x,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(t.x-i.x)/l:0;return Object.freeze({x:t.x,y:Se(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.x<=n,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(n-i.x)/l:0;return Object.freeze({x:n,y:Se(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.y>=t.y,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(t.y-i.y)/l:0;return Object.freeze({x:Se(i.x+d*(s.x-i.x)),y:t.y})})],a=[...o(a,i=>i.y<=r,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(r-i.y)/l:0;return Object.freeze({x:Se(i.x+d*(s.x-i.x)),y:r})})],Object.freeze(a)}function AT(e){let t=mb(e);return Object.freeze({x:t.x,y:t.y,width:t.width,height:t.height})}function Zl(e,t){let n=DT(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=a=>{if(!a||a.length===0)return a;let i=NT(a,t);return i.length>=3?Object.freeze(i.map(Ta)):Object.freeze([])};return Object.freeze({...e,paintBounds:n,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function DT(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function _T(e){let t=Math.max(0,Se(e.extentWidth)),n=Math.max(0,Se(e.extentHeight)),r=Se(e.anchorX),o=Se(e.anchorY),a=OT(e.crop),i=CT(e.effectExtentEmu),s=Ul(e.transform,t,n),l=Object.freeze({x:r,y:o,width:t,height:n}),d={sourceWidth:s.width,sourceHeight:s.height,offsetX:s.offsetX,offsetY:s.offsetY,crop:a,transform:e.transform,layoutWidth:t,layoutHeight:n,anchorX:r,anchorY:o},c=Pf(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=ql({points:Wi(0,0,s.width,s.height),...d,crop:u,mapping:c}),p=BT(e.presetGeometry,s.width,s.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=Wi(0,0,s.width,s.height));let y=ql({points:g,...d,crop:u,mapping:c}),h=AT(y.length>=3?y:f),b=Ia(h,i);return Object.freeze({contentBounds:l,paintBounds:b,hitBounds:b,transformedCorners:f,clipPolygon:y.length>=3?y:f,clipFallback:m,effectInsets:i})}function ka(e){let t=e.projection.picture,n=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return _T({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:t?.crop??{left:0,top:0,right:0,bottom:0},transform:t?.transform??n,presetGeometry:t?.presetGeometry??null})}function HT(e){let{transform:t,contentWidth:n,contentHeight:r}=e;if(n<=0||r<=0)return null;let o=Ul(t,n,r),a=o.width,i=o.height,s=Pf({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:t,layoutWidth:n,layoutHeight:r,anchorX:0,anchorY:0}),l=Se(t.rotationDegrees),d=Math.abs(l%360)>1e-4,c=t.flipHorizontal?-1:1,u=t.flipVertical?-1:1,f=s.scaleX,p=s.scaleY,m=a>0?a/n:1,g=i>0?i/r:1;if(!d&&c===1&&u===1&&Math.abs(f-1)<1e-4&&Math.abs(p-1)<1e-4&&Math.abs(o.offsetX)<1e-4&&Math.abs(o.offsetY)<1e-4&&Math.abs(m-1)<1e-4&&Math.abs(g-1)<1e-4)return null;let h=l*Math.PI/180,b=Math.cos(h),R=Math.sin(h),I=o.offsetX+a/2,T=o.offsetY+i/2,k=f*b*c,L=-f*R*u,P=p*R*c,x=p*b*u,v=f*(I-b*c*(a/2)+R*u*(i/2)-s.bboxX),w=p*(T-R*c*(a/2)-b*u*(i/2)-s.bboxY);return Object.freeze({a:Se(k*m),b:Se(P*m),c:Se(L*g),d:Se(x*g),e:Se(v),f:Se(w)})}function jA(e){let t=HT(e);if(t)return `matrix(${Fa(t.a)}, ${Fa(t.b)}, ${Fa(t.c)}, ${Fa(t.d)}, ${Fa(t.e)}, ${Fa(t.f)})`}function Fa(e){return Number.isFinite(e)?String(e):"0"}var jT=new Map([["http://schemas.openxmlformats.org/drawingml/2006/chart","chart"],["http://schemas.openxmlformats.org/drawingml/2006/diagram","diagram"],["http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","group"],["http://schemas.microsoft.com/office/word/2010/wordprocessingShape","textbox"],["http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","canvas"]]),zT=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),GT=Object.freeze({left:0,top:0,right:0,bottom:0});function hb(e){let t=e.picture,n=null;if(!t){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";n=jT.get(o)??"graphic";break}n===null&&(n="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:t?.crop??GT,transform:t?.transform??zT,placeholderGraphicKind:t?null:n,vectorShape:e.vectorShape})}var An=12700;function pt(e){return e/An}function Lr(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*An*72)return null;let t=e/An;return Number.isFinite(t)?t:null}function or(e){let t=pt(e.inlineDistancesEmu.left),n=pt(e.inlineDistancesEmu.right),r=pt(e.inlineDistancesEmu.top),o=pt(e.inlineDistancesEmu.bottom),a=pt(e.effectExtentEmu.left),i=pt(e.effectExtentEmu.right),s=pt(e.effectExtentEmu.top),l=pt(e.effectExtentEmu.bottom),d=pt(e.extentEmu.cx),c=pt(e.extentEmu.cy);return Object.freeze({distL:t,distR:n,distT:r,distB:o,effectL:a,effectR:i,effectT:s,effectB:l,width:d,height:c,totalWidth:t+a+d+i+n,lineContribution:r+s+c+l+o})}function bb(e,t,n){let r=Math.max(n.distT+n.effectT,e-n.height),o=Math.max(t,r-n.effectT+n.height+n.effectB+n.distB),a=r+n.height+n.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function Jl(e,t,n){if(Math.abs(t)<1e-4&&Math.abs(n)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+t,y:a.y+n}),o=a=>Object.freeze({x:a.x+t,y:a.y+n});return Object.freeze({...e,contentBounds:r(e.contentBounds),paintBounds:r(e.paintBounds),hitBounds:r(e.hitBounds),transformedCorners:Object.freeze(e.transformedCorners.map(o)),clipPolygon:e.clipPolygon?Object.freeze(e.clipPolygon.map(o)):null})}function Er(e,t,n){return Math.abs(t)<1e-4&&Math.abs(n)<1e-4?e:Object.freeze({...e,x:e.x+t,y:e.y+n,advanceStart:e.advanceStart+t,advanceEnd:e.advanceEnd+t,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+t,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+t,y:e.hitBounds.y+n}),geometry:Jl(e.geometry,t,n)})}function wf(e,t){return e.length===0?e:e.map(n=>{let r=n.geometry.effectInsets.bottom,o=t-n.height-r,a=o-n.y;return Math.abs(a)<1e-4&&n.baselineOffset===t?n:Object.freeze({...n,y:o,baselineOffset:t,geometry:Jl(n.geometry,0,a),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+a}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+a})})})}function vf(e,t){let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y),o=Math.min(e.x+e.width,t.x+t.width),a=Math.min(e.y+e.height,t.y+t.height);return o<=n||a<=r?Object.freeze({x:n,y:r,width:0,height:0}):Object.freeze({x:n,y:r,width:o-n,height:a-r})}function Ql(e,t){let n=vf(e.paintBounds,t),r=n.width>0&&n.height>0?n:Object.freeze({...n}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=Jl(e.geometry,o,a);return Object.freeze({...e,paintBounds:n,hitBounds:r,geometry:Zl(i,t)})}var gb=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),yb=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function Dn(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function xb(e,t){return !(!t.layoutInCell||t.cellBox===null||!Number.isFinite(t.cellBox.height)||t.cellBox.height<=0||!Number.isFinite(t.cellBox.width)||t.cellBox.width<=0)}function Sb(e,t){if(xb(e,t)){let l=t.cellBox;if(!l)return null;let{x:d,width:c}=l;switch(e){case "page":case "column":case "margin":case "leftMargin":return {left:d,right:d+c,center:d+c/2};case "rightMargin":return {left:d,right:d+c,center:d+c/2};case "character":return {left:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "insideMargin":return Dn(t)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return Dn(t)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let n=-t.marginLeft,r=t.contentWidth+t.marginRight,o=0,a=t.contentWidth,i=t.columnBox.x,s=t.columnBox.x+t.columnBox.width;switch(e){case "page":return {left:n,right:r,center:(n+r)/2};case "margin":return {left:o,right:a,center:o+t.contentWidth/2};case "column":return {left:i,right:s,center:i+t.columnBox.width/2};case "character":return {left:t.anchorCharacterX,right:t.anchorCharacterX,center:t.anchorCharacterX};case "leftMargin":return {left:n,right:n,center:n};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return Dn(t)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return Dn(t)?{left:r,right:r,center:r}:{left:n,right:n,center:n};default:return null}}function Rb(e,t){if(xb(e,t)){let c=t.cellBox;if(!c)return null;let{y:u,height:f}=c;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:u,bottom:u+f,center:u+f/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "insideMargin":return Dn(t)?{top:u,bottom:u+f,center:u+f/2}:{top:u+f,bottom:u+f,center:u+f};case "outsideMargin":return Dn(t)?{top:u+f,bottom:u+f,center:u+f}:{top:u,bottom:u+f,center:u+f/2};default:return null}}let n=-t.contentInsetTop,r=t.contentBandHeight,o=n+t.pageHeight-t.marginBottom,a=r+t.contentInsetBottom,i=0,s=t.contentHeight,l=t.verticalMarginFrame?.top??i,d=l+(t.verticalMarginFrame?.height??t.contentHeight);switch(e){case "page":return {top:n,bottom:a,center:(n+a)/2};case "margin":return {top:l,bottom:d,center:(l+d)/2};case "paragraph":return {top:t.paragraphBox.y,bottom:t.paragraphBox.y+t.paragraphBox.height,center:t.paragraphBox.y+t.paragraphBox.height/2};case "line":return {top:t.anchorLineBox.y,bottom:t.anchorLineBox.y+t.anchorLineBox.height,center:t.anchorLineBox.y+t.anchorLineBox.height/2};case "topMargin":return {top:n,bottom:n,center:n};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return Dn(t)?{top:i,bottom:i,center:i}:{top:s,bottom:s,center:s};case "outsideMargin":return Dn(t)?{top:a,bottom:a,center:a}:{top:n,bottom:n,center:n};default:return null}}function Pb(e){return e===null?0:Lr(e)}function WT(e,t,n){let r=Dn(n);if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.width)&&n.cellBox.width>0){let{x:o,width:a}=n.cellBox;return e==="inside"?r?o:o+a-t:e==="outside"?r?o+a-t:o:null}return e==="inside"?r?0:n.contentWidth-t:e==="outside"?r?n.contentWidth-t:0:null}function VT(e,t,n){let r=Dn(n),o=n.contentBandHeight;if(n.layoutInCell&&n.cellBox&&Number.isFinite(n.cellBox.height)&&n.cellBox.height>0){let{y:a,height:i}=n.cellBox;return e==="inside"?r?a:a+i-t:e==="outside"?r?a+i-t:a:null}return e==="inside"?r?0:o-t:e==="outside"?r?o-t:0:null}function KT(e,t,n,r,o){let a=Sb(e,o);if(!a)return null;let i=Pb(n);if(i===null)return null;if(t==="left")return a.left+i;if(t==="center")return a.center-r/2+i;if(t==="right")return a.right-r+i;if(t==="inside"||t==="outside"){let s=WT(t,r,o);if(s!==null)return s+i}return a.left+i}function $T(e,t,n,r,o){let a=Rb(e,o);if(!a)return null;let i=Pb(n);if(i===null)return null;if(t==="top")return a.top+i;if(t==="center")return a.center-r/2+i;if(t==="bottom")return a.bottom-r+i;if(t==="inside"||t==="outside"){let s=VT(t,r,o);if(s!==null)return s+i}return a.top+i}function Vi(e){let t=e.contentBandHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:t+e.contentInsetTop+e.contentInsetBottom})}function If(e,t){let n=or(e),r=e.position,o=e.anchor,a="page",i="page";if(!r||!o)return Object.freeze({x:0,y:0,horizontalFrame:a,verticalFrame:i,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"});if(o.simplePos){let g=Lr(r.simplePosition.xEmu),y=Lr(r.simplePosition.yEmu);return Object.freeze(g===null||y===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:g-t.marginLeft,y:y-t.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let s=r.horizontal.relativeFrom,l=r.vertical.relativeFrom,d=Sb(s,t),c=Rb(l,t),u=d?.left??0,f=c?.top??0;if(!gb.has(s)||!yb.has(l))return Object.freeze({x:0,y:0,horizontalFrame:gb.has(s)?s:a,verticalFrame:yb.has(l)?l:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=KT(s,r.horizontal.align,r.horizontal.offsetEmu,n.width,t),m=$T(l,r.vertical.align,r.vertical.offsetEmu,n.height,t);return Object.freeze(p===null||m===null?{x:0,y:0,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"}:{x:p,y:m,horizontalFrame:s,verticalFrame:l,horizontalFrameOrigin:u,verticalFrameOrigin:f})}function XT(e){let t=e.input.projection,n=t.anchor,r=or(t),o=ka({projection:t,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?vf(o.paintBounds,e.clipRegion):o.paintBounds,i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"anchoredDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.anchorParagraphId,anchorParagraphId:e.anchorParagraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:e.resolved.x,y:e.resolved.y,width:r.width,height:r.height,horizontalFrame:e.resolved.horizontalFrame,verticalFrame:e.resolved.verticalFrame,horizontalFrameOrigin:e.resolved.horizontalFrameOrigin,verticalFrameOrigin:e.resolved.verticalFrameOrigin,behindDocument:n?.behindDocument??false,allowOverlap:n?.allowOverlap??true,layoutInCell:n?.layoutInCell??true,relativeHeight:n?.relativeHeight??0,wrap:t.wrap==="inline"?"inFront":t.wrap,...e.sourceOrder!==void 0?{sourceOrder:e.sourceOrder}:{},...e.resolved.layoutFallback?{layoutFallback:e.resolved.layoutFallback}:{},...e.textboxStory?{textboxStory:e.textboxStory}:{},...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{},paintBounds:a,hitBounds:i,geometry:e.clipRegion?Zl(o,e.clipRegion):o,resource:e.input.resource,accessibility:cb$1(t),...hb(t)})}function Ht(e,t){if(e.kind!=="paragraph")return [];let n=[],r=(o,a)=>{if(o.kind==="drawing"){let i=t.projectionForAtom?.(o.id)??t.project(o);i?.kind==="anchored"&&n.push({atomId:o.id,projection:i,revisions:a});return}if(bb$1(o)){let i=t.projectionForAtom?.(o.id)??null;i?.kind==="anchored"&&n.push({atomId:o.id,projection:i,revisions:a});return}if("children"in o){let i=At(o)?Yt(o):null,s=i?Qt(a,i):a;for(let l of o.children)r(l,s);}};for(let o of e.children)r(o,nr);return Object.freeze(n)}function pn(e){let t=new Map;if(e.kind!=="paragraph")return t;let n=0,r=a=>{if(a.kind==="drawing"||bb$1(a)){t.set(a.id,n),n+=1;return}if(a.kind==="textValue"){n+=a.value.length;return}if("children"in a)for(let i of a.children)r(i);},o=a=>{if(a.kind==="run"){for(let i of a.children)r(i);return}if(a.kind==="hyperlink"||At(a))for(let i of a.children)o(i);};for(let a of e.children)o(a);return t}function YT(e,t,n){let r=(a,i,s)=>qn(a,Nt(i,s),n);for(let a of e.spans){if(t<a.range.start)break;if(t<a.range.end){if(n&&a.text!==void 0&&a.style!==void 0){let l=t-a.range.start;return a.box.x+r(a.text.slice(0,l),a.style,a.fontSlot)}let i=a.range.end-a.range.start;if(i<=0)return a.box.x;let s=t-a.range.start;return a.box.x+a.box.width*s/i}if(t===a.range.end)return n&&a.text!==void 0&&a.style!==void 0?a.box.x+r(a.text,a.style,a.fontSlot):a.box.x+a.box.width}let o;for(let a of e.spans)a.range.end<=t&&(o=a);return o?n&&o.text!==void 0&&o.style!==void 0?o.box.x+r(o.text,o.style,o.fontSlot):o.box.x+o.box.width:e.box.x}function UT(e,t){let n=e.range.start;for(let r of e.spans)r.range.end<=t&&(n=r.range.end);return n}function Ff(e,t,n){if(!(Math.abs(n)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===t&&(!o.layoutInCell&&!["paragraph","line"].includes(o.verticalFrame)||(e[r]=Object.freeze({...o,y:o.y+n,geometry:Jl(o.geometry,0,n),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+n}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+n})})));}}function Mr(e){let t=Ht(e.paragraph,e.drawingLayout);if(t.length===0)return [];let n=pn(e.paragraph),r=e.displayMode??Te,o=[];for(let a of t){let i=a.projection;if(i.hidden)continue;let s=zl(a.revisions,r,e.revisionAuthorFilter);if(s===null)continue;let l=n.get(a.atomId);if(l===void 0||e.fragmentRange&&(l<e.fragmentRange.start||l>=e.fragmentRange.end))continue;let d=e.lines.find(R=>l>=R.range.start&&l<R.range.end);if(!d)continue;let c=i.anchor?.layoutInCell??true,f=i.position?.horizontal.relativeFrom==="character"?UT(d,l):l,p=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:d.box,anchorCharacterX:YT(d,f,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:c}),m=If(i,p),g=c&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0,y=i.position?.vertical.relativeFrom==="margin"?e.pageClip:Vi(e.frameBase),h=g?e.cellBox:y,b=XT({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:f,resolved:m,clipRegion:h,revisions:s,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(i.drawingNodeId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(b);}return Object.freeze(o)}function wb(e){let t=or(e.input.projection),n=e.slotX+t.distL+t.effectL,r=ka({projection:e.input.projection,anchorX:n,anchorY:e.y,extentWidth:t.width,extentHeight:t.height}),o=e.contentTop!==void 0&&e.contentBottom!==void 0?Object.freeze({x:e.contentLeft,y:e.contentTop,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,e.contentBottom-e.contentTop)}):Object.freeze({x:e.contentLeft,y:r.paintBounds.y,width:Math.max(0,e.contentRight-e.contentLeft),height:r.paintBounds.height}),a=vf(r.paintBounds,o),i=a.width>0&&a.height>0?a:Object.freeze({...a});return Object.freeze({kind:"inlineDrawing",drawingNodeId:e.input.drawingNodeId,paragraphId:e.paragraphId,ownerPartName:e.input.ownerPartName,start:e.start,x:n,y:e.y,width:t.width,height:t.height,distL:t.distL,distR:t.distR,distT:t.distT,distB:t.distB,advanceStart:e.slotX,advanceEnd:e.slotX+t.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:Zl(r,o),resource:e.input.resource,accessibility:cb$1(e.input.projection),...hb(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var qT=256,Of=8,Po=8,Oa=class extends Error{name="DrawingExclusionConvergenceError";constructor(t="drawing exclusion reflow did not converge"){super(t);}};function ZT(e,t){let n=Math.max(1,t.columnCount);if(n<=1)return 0;let r=e.x+e.width/2;if(t.columnLefts&&t.columnWidths&&t.columnLefts.length===n){for(let i=0;i<n;i+=1){let s=t.columnLefts[i],l=s+t.columnWidths[i];if(r>=s-.001&&r<l+.001)return i}return n-1}let o=t.columnGapPt,a=(t.contentWidth-o*(n-1))/n;for(let i=0;i<n;i+=1){let s=i*(a+o),l=s+a;if(r>=s-.001&&r<l+.001)return i}return n-1}function kf(e){return e.behindDocument?"behind":"inFront"}function Ib(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function JT(e){switch(e){case "inline":case "behind":case "inFront":return null;case "square":case "squareLeft":case "squareRight":return "square";case "tight":return "tight";case "through":return "through";case "topAndBottom":return "topAndBottom";default:return null}}function QT(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Cf(e){let t=JT(e.projection.wrap);if(!t||!e.projection.wrapGeometry)return null;let n=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return cb({mode:t,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:n.distancesEmu,polygonEmu:n.polygon,crop:e.projection.picture?.crop??{},transform:e.projection.picture?.transform??{rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:{x:0,y:0},extentEmu:{cx:0,cy:0}},extentWidthPt:e.geometry.contentBounds.width,extentHeightPt:e.geometry.contentBounds.height,textSide:t==="square"?QT(e.projection.wrap):n.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Lf(e){if(e.mode==="topAndBottom"||e.mode==="square")return Sf(e.contentBounds,e.effectInsets,e.wrapDistances);let t=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)t.push(o.y);let n=Math.min(...t)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...t)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:n,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-n)})}function ek(e){if(e.drawing.behindDocument||!Ib(e.drawing.wrap))return null;let t=e.yOverride??e.drawing.y,n=Cf({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:t});return n?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:kf(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:t,verticalBand:Lf(n),input:n}):null}function Fb(e,t){let n=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=t.sourceOrder??Number.MAX_SAFE_INTEGER;return n!==r?n-r:e.drawingNodeId.localeCompare(t.drawingNodeId)}function tk(e,t){let n=kf(e),r=kf(t);return n!==r?n==="behind"?-1:1:e.relativeHeight!==t.relativeHeight?e.relativeHeight-t.relativeHeight:Fb(e,t)}function Tb(e){return Object.freeze([...e].sort(tk))}function Tf(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Ef(e,t){if(Math.abs(t)<=1e-4)return e;let n=e.geometry;return Object.freeze({...e,y:e.y+t,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+t}),geometry:Object.freeze({...n,contentBounds:Object.freeze({...n.contentBounds,y:n.contentBounds.y+t}),paintBounds:Object.freeze({...n.paintBounds,y:n.paintBounds.y+t}),hitBounds:Object.freeze({...n.hitBounds,y:n.hitBounds.y+t}),transformedCorners:n.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+t})),clipPolygon:n.clipPolygon?n.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+t})):null})})}function kb(e,t){let n=t.maxAttempts??qT,r=[...e].sort(Fb),o=[],a=[],i=[];for(let s of r){if(s.allowOverlap){o.push(s);continue}let l=s,d=0;for(;d<n&&o.some(g=>Tf(g.paintBounds,l.paintBounds));){let p=o.find(g=>Tf(g.paintBounds,l.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-l.paintBounds.y+.001;l=Ef(l,m),d+=1;}let c=o.some(f=>Tf(f.paintBounds,l.paintBounds)),u=l.paintBounds.y+l.paintBounds.height>t.pageBottom+.001;if(c||u){a.push(l),i.push(l.drawingNodeId);continue}o.push(l);}return Object.freeze({drawings:Object.freeze(o),deferred:Object.freeze(a),deferredNodeIds:Object.freeze(i)})}function Ca(e,t,n,r){let o=[{start:n,end:r}];for(let a of t){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let s=db(e,a.input),l=[];for(let d of o)for(let c of s){let u=Math.max(d.start,c.start),f=Math.min(d.end,c.end);f>u+1e-6&&l.push(Object.freeze({start:u,end:f}));}if(o=l,o.length===0)break}return Object.freeze(o)}function Ob(e,t){for(let n of t)if(e>=n.start-1e-6&&e<n.end-1e-6)return Math.max(0,n.end-e);return 0}function nk(e,t){for(let n of t)if(n.end>e+1e-6)return n;return null}function Mf(e,t){let n=nk(e,t);if(!n)return null;let r=Math.max(e,n.start),o=n.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function rk(e,t,n){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+t,y:r.y+n}),contentLeft:e.contentLeft+t,contentRight:e.contentRight+t,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+t,y:o.y+n}))}:{}})}function Bf(e,t){return Object.freeze({...e,layoutFallback:t})}function Cb(e,t,n,r){return e.length===0?e:Object.freeze(e.map(o=>{let a=o.verticalBand,i=o.input;return Object.freeze({...o,y:o.y-n,verticalBand:Object.freeze({...a,x:a.x-t,y:a.y-n}),input:Object.freeze({...rk(i,-t,-n),contentLeft:r?.left,contentRight:r?.right??i.contentRight-t})})}))}function Lb(e,t,n){return Object.freeze(e.filter(r=>{let o=n(r.anchorParagraphId);return o===void 0?r.sourceOrder<=t:o<=t}))}function Eb(e){let t=Ht(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=pn(e.paragraph),r=e.displayMode??Te,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of t){if(!Oe(i.revisions,r,e.revisionAuthorFilter)||i.projection.anchor?.behindDocument||!Ib(i.projection.wrap)||i.projection.wrap==="topAndBottom")continue;let s=n.get(i.atomId);if(s===void 0)continue;let l=e.anchorLineTopByModelStart.get(s);if(l===void 0)continue;let d=Object.freeze({x:e.contentLeft,y:l,width:o,height:14}),c=e.anchorCellBox!=null,u=If(i.projection,{pageNumber:1,pageWidth:e.contentRight+e.contentLeft+o,pageHeight:792,marginLeft:e.contentLeft,marginRight:0,marginBottom:0,contentInsetTop:0,contentInsetBottom:0,contentWidth:o,contentHeight:648,contentBandHeight:648,paragraphBox:d,anchorLineBox:d,anchorCharacterX:e.contentLeft,columnBox:d,cellBox:c?e.anchorCellBox:null,layoutInCell:c,ownerPartName:e.drawingLayout.ownerPartName,storyKind:"body"}),f=e.paragraphStartY+l,p=or(i.projection),m=ka({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:p.width,extentHeight:p.height}),g=Cf({projection:i.projection,geometry:m,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:u.x,anchorY:f});g&&a.push(Object.freeze({drawingNodeId:i.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:s,sourceOrder:e.sourceOrderOf?.(i.projection.drawingNodeId)??Number.MAX_SAFE_INTEGER,paintLayer:i.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:i.projection.anchor?.relativeHeight??0,allowOverlap:i.projection.anchor?.allowOverlap??true,columnIndex:0,y:f,verticalBand:Lf(g),input:g}));}return a.sort((i,s)=>i.sourceOrder-s.sourceOrder),Object.freeze(a)}function ed(e){let t=Ht(e.paragraph,e.drawingLayout);if(t.length===0)return Object.freeze([]);let n=pn(e.paragraph),r=e.displayMode??Te,o=[];for(let a of t){if(!Oe(a.revisions,r,e.revisionAuthorFilter)||a.projection.anchor?.behindDocument||a.projection.wrap!=="topAndBottom")continue;let i=n.get(a.atomId);if(i===void 0)continue;let s=e.anchorLineTopByModelStart.get(i);if(s===void 0)continue;let l=e.paragraphStartY+s,d=or(a.projection),c=ka({projection:a.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:d.width,extentHeight:d.height}),u=Cf({projection:a.projection,geometry:c,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.contentLeft,anchorY:l});u&&o.push(Object.freeze({drawingNodeId:a.atomId,anchorParagraphId:e.paragraphId,anchorModelStart:i,sourceOrder:e.sourceOrderOf?.(a.projection.drawingNodeId)??Number.MAX_SAFE_INTEGER,paintLayer:a.projection.anchor?.behindDocument?"behind":"inFront",relativeHeight:a.projection.anchor?.relativeHeight??0,allowOverlap:a.projection.anchor?.allowOverlap??true,columnIndex:e.columnIndex??0,y:l,verticalBand:Lf(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var ok=8;function ak(e,t,n,r){return e<r&&t>n}function Hn(e,t,n){if(t<=0||n.length===0)return 0;let r=0;for(let o=0;o<ok;o+=1){let a=e+r,i=a+t,s=a,l=false;for(let c of n){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;ak(a,i,u,f)&&(l=true,s=Math.max(s,f));}if(!l)break;let d=s-e;if(d<=r+.001)break;r=d;}return r}function ik(e){return e.map(t=>`${t.start.toFixed(3)}-${t.end.toFixed(3)}`).join(",")}function sk(e){let t=e.contentBounds,n=e.wrapDistances,r=e.effectInsets,o=e.polygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"",a=e.clipPolygon?.map(i=>`${i.x.toFixed(3)},${i.y.toFixed(3)}`).join(";")??"";return [e.mode,e.textSide,t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),n.top.toFixed(3),n.right.toFixed(3),n.bottom.toFixed(3),n.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function _n(e){return e.length===0?"":e.map(t=>{let n=t.verticalBand,r=t.y+t.input.contentBounds.height/2,o=Ca(r,[t],t.input.contentLeft,t.input.contentRight);return [t.drawingNodeId,String(t.sourceOrder),String(t.columnIndex),t.y.toFixed(3),n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),sk(t.input),ik(o)].join("|")}).join(`
|
|
2
|
+
`)}function Nf(e,t,n,r,o,a){let i=[];for(let s of e){let l=t.projectionForAtom?.(s.drawingNodeId);if(!l)continue;let d=s.sourceOrder??o?.(s.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?ZT(s,a):0,u=ek({drawing:s,projection:l,sourceOrder:d,contentLeft:n,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((s,l)=>s.sourceOrder-l.sourceOrder),Object.freeze(i)}function td(e,t,n,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:n}),i=new Map;for(let s of e){let l=s.anchoredDrawings??[],d=Nf(l,t,0,n,r,a);d.length>0&&i.set(s.index,d);}return i}var vb=new WeakMap;function dk(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function Af(e,t,n,r,o,a){let i=dk(a),s=vb.get(e);if(s&&s.drawingLayout===t&&s.drawingLayoutEpoch===n&&s.contentWidth===r&&s.drawingSourceOrder===o&&s.columnToken===i)return s.zones;let l=td(e,t,r,o?d=>{let c=t.projectionForAtom?.(d)?.drawingNodeId??d;return o.get(c)}:void 0,a);return vb.set(e,{drawingLayout:t,drawingLayoutEpoch:n,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:l}),l}function nd(e,t){if(e.size!==t.size)return false;for(let[n,r]of e){let o=t.get(n);if(!o||_n(r)!==_n(o))return false}return true}function rd(e){return e.size===0?"":[...e.entries()].sort(([t],[n])=>t-n).map(([t,n])=>`${t}:${_n(n)}`).join(`
|
|
3
|
+
`)}var La=.7,ck=1.25,uk="Cambria Math";function ad(e){return Il(e,uk)}function jn(e,t,n,r){return Object.freeze({x:e,y:t,width:n,height:r})}function Ut(e,t,n){return Object.freeze({...e,box:jn(t,n,e.box.width,e.box.height)})}var fk=4,pk=8,Mb=new WeakMap;function mk(e){let t=ad(e);return [t.fontFamily??"",t.fontSizePt,t.bold?1:0,t.italic?1:0,t.verticalAlign,t.baselineShiftPt,t.caps?1:0,t.smallCaps?1:0,t.characterSpacingPt,t.horizontalScalePercent,t.kerningMinPt].join("|")}function gk(e,t){if(t===void 0)return {projections:new WeakMap};let n=Mb.get(e);n||(n=new Map,Mb.set(e,n));let r=n.get(t);if(r)return n.delete(t),n.set(t,r),r;if(n.size>=fk){let a=n.keys().next().value;a!==void 0&&n.delete(a);}let o={projections:new WeakMap};return n.set(t,o),o}function Ea(e,t,n){let r=n.styles.get(t);if(r)return r;let o=t===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*t,characterSpacingPt:e.characterSpacingPt*t});return n.styles.set(t,o),o}function Bb(e,t,n,r){let o=r.metrics.get(n);if(o)return o;let a=e.lineMetrics(Ea(t,n,r));return r.metrics.set(n,a),a}function od(e,t,n,r,o,a){let i=Ea(r,o,a),s=Bb(n,r,o,a);return Object.freeze({kind:e,text:t,fontSizePt:i.fontSizePt,box:jn(0,0,qn(t,i,n),s.height),baseline:s.baseline})}function yk(e,t){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:jn(0,0,0,t.height),baseline:t.baseline});let n=Math.max(...e.map(i=>i.baseline)),r=Math.max(...e.map(i=>i.box.height-i.baseline)),o=0,a=e.map(i=>{let s=Ut(i,o,n-i.baseline);return o+=i.box.width,s});return Object.freeze({kind:"row",items:Object.freeze(a),box:jn(0,0,o,n+r),baseline:n})}function tn(e,t,n,r,o){switch(e.kind){case "text":return od("text",e.value,t,n,r,o);case "fallback":return od("fallback",e.text||"\u2026",t,n,r,o);case "row":return yk(e.items.map(a=>tn(a,t,n,r,o)),Bb(t,n,r,o));case "fraction":{let a=Ea(n,r,o),i=tn(e.numerator,t,n,r*La,o),s=tn(e.denominator,t,n,r*La,o),l=Math.max(.75,a.fontSizePt*.08),d=Math.max(.75,a.fontSizePt*.08),c=Math.max(.6,a.fontSizePt*.055),u=Math.max(i.box.width,s.box.width)+l*2,f=i.box.height+d,p=f+c+d,m=p+s.box.height,g=Math.min(m,f+c/2+a.fontSizePt*.22);return Object.freeze({kind:"fraction",numerator:Ut(i,(u-i.box.width)/2,0),denominator:Ut(s,(u-s.box.width)/2,p),bar:jn(l/2,f,u-l,c),box:jn(0,0,u,m),baseline:g})}case "radical":{let a=Ea(n,r,o),i=tn(e.radicand,t,n,r,o),s=od("text","\u221A",t,n,r,o),l=e.degree?tn(e.degree,t,n,r*.55,o):void 0,d=Math.max(.55,a.fontSizePt*.05),c=Math.max(.35,a.fontSizePt*.035),u=d+c,f=l?Math.max(0,l.box.width*.65):0,p=f+s.box.width,m=u+i.baseline,g=Math.max(u+i.box.height,m+(s.box.height-s.baseline));return Object.freeze({kind:"radical",sign:Ut(s,f,m-s.baseline),radicand:Ut(i,p,u),...l?{degree:Ut(l,0,0)}:{},bar:jn(p,0,i.box.width,d),box:jn(0,0,p+i.box.width,g),baseline:m})}case "script":{let a=Ea(n,r,o),i=tn(e.base,t,n,r,o),s=e.subscript?tn(e.subscript,t,n,r*La,o):void 0,l=e.superscript?tn(e.superscript,t,n,r*La,o):void 0,d=Math.max(.4,a.fontSizePt*.04),c=i.box.width+d,u=0,f=l?Math.max(0,l.box.height-i.baseline*.45):0,p=f+i.baseline,m=p+a.fontSizePt*.08,g=c+Math.max(s?.box.width??0,l?.box.width??0,-d),y=Math.max(f+i.box.height,l?u+l.box.height:0,s?m+s.box.height:0);return Object.freeze({kind:"script",base:Ut(i,0,f),...s?{subscript:Ut(s,c,m)}:{},...l?{superscript:Ut(l,c,u)}:{},box:jn(0,0,g,y),baseline:p})}case "nary":{let a=Ea(n,r,o),i=od("text",e.operator,t,n,r*ck,o),s=tn(e.body,t,n,r,o),l=e.lowerLimit?tn(e.lowerLimit,t,n,r*La,o):void 0,d=e.upperLimit?tn(e.upperLimit,t,n,r*La,o):void 0,c=Math.max(.5,a.fontSizePt*.05),u=Math.max(i.box.width,l?.box.width??0,d?.box.width??0),p=d?d.box.height+c:0,m=p+i.baseline,g=p+i.box.height+(l?c:0),y=u+c,h=m-s.baseline,R=-Math.min(0,p,h,l?g:0),I=m+R,T=Math.max(p+i.box.height,l?g+l.box.height:0,h+s.box.height)+R;return Object.freeze({kind:"nary",operator:Ut(i,(u-i.box.width)/2,p+R),body:Ut(s,y,h+R),...l?{lowerLimit:Ut(l,(u-l.box.width)/2,g+R)}:{},...d?{upperLimit:Ut(d,(u-d.box.width)/2,R)}:{},box:jn(0,0,y+s.box.width,T),baseline:I})}}}function Nb(e,t,n){let r=ad(n),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:tn(e.expression,t,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function Ab(e,t){let n=gk(e,t);return (r,o)=>{let a=mk(o),i=n.projections.get(r),s=i?.get(a);if(s&&i)return i.delete(a),i.set(a,s),s;let l=Nb(r,e,o);if(i||(i=new Map,n.projections.set(r,i)),i.size>=pk){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,l),l}}function Df(e){if(e.length===0)return false;for(let t of e)if(t!==" "&&t!=="\u3000")return false;return true}function Db(e,t,n,r){if(n<=r.remainingLineWidth()+r.overflowTolerancePt)return {text:e,modelStart:t,width:n,brokeLine:false};let o=Xt(e),a=0,i=0,s=n,l=false;for(;a<o.length&&s>r.remainingLineWidth()+r.overflowTolerancePt;){if(o.length-a===1){if(r.lineHasText()){r.closeLine(),l=true;continue}break}let c=r.remainingLineWidth(),u=a+1,f=o.length-1,p=a;for(;u<=f;){let y=u+f>>1,h=o[y-1].utf16To;r.measureText(e.slice(i,h))<=c+r.overflowTolerancePt?(p=y,u=y+1):f=y-1;}if(p===a&&r.lineHasText()){r.closeLine(),l=true;continue}p===a&&(p+=1);let m=o[p-1].utf16To,g=e.slice(i,m);r.appendPrefix({text:g,modelStart:t+i,width:r.measureText(g)}),r.closeLine(),l=true,a=p,i=m,s=r.measureText(e.slice(i));}return {text:e.slice(i),modelStart:t+i,width:s,brokeLine:l}}function _f(e,t,n,r=0){return (n.length>0?Hn(e,t.height,n):t.exclusionSkipBefore??0)+Math.max(0,t.height-t.trailingSpacing)+r}function _b(e){return Object.freeze({spans:e.spans.map(t=>Object.freeze({...t,box:Object.freeze({...t.box})})),drawings:e.drawings.map(t=>Object.freeze({...t,paintBounds:Object.freeze({...t.paintBounds}),hitBounds:Object.freeze({...t.hitBounds})})),start:e.start,end:e.end,width:e.width,height:e.height,baseline:e.baseline,leading:e.leading,trailingSpacing:e.trailingSpacing,...e.pageBreakAfter?{pageBreakAfter:true}:{},...e.columnBreakAfter?{columnBreakAfter:true}:{},...e.deletedRanges?{deletedRanges:Object.freeze(e.deletedRanges)}:{},...e.exclusionSkipBefore?{exclusionSkipBefore:e.exclusionSkipBefore}:{},...e.anchorRevisions?{anchorRevisions:Object.freeze(e.anchorRevisions)}:{}})}var Ki=.001;function Lt(e){return Ma(e)}var sd=new Set(["-","\u2010","\u2013","\u2014"]);function Hb(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];r===" "?(n>0&&t[t.length-1]!==n&&t.push(n),t.push(n+1)):(r===" "||sd.has(r)&&n>0&&e[n-1]!==" "&&n+1<e.length&&e[n+1]!==" "&&!sd.has(e[n+1]))&&t.push(n+1);}return t[t.length-1]!==e.length&&t.push(e.length),t}function hk(e){let t=new Array(e.length),n=false;for(let r=e.length-1;r>=0;r-=1){let o=e[r],a=new Uint8Array(o.text.length+1);if(a[o.text.length]=n?1:0,o.inlineDrawing)a.fill(1);else for(let i=o.text.length-1;i>=0;i-=1){let s=o.text[i];s===`
|
|
4
|
+
`||s===Ec$1?a[i]=0:s!==" "&&!Df(s)?a[i]=1:a[i]=a[i+1];}t[r]=a,n=a[0]===1;}return t}function bk(e,t,n,r){let o=0,a=0,i=false;for(let s=t;s<e.length;s+=1){let l=e[s],d=Nt(l.style,l.fontSlot),c=s===t?n:0;for(let u=c;u<l.text.length;){let f=l.text[u];if(f===" "||f===`
|
|
5
|
+
`||f===Ec$1)return {width:o,decimalOffset:i?a:o};let p=u+1,m=l.text.slice(u,p),g=r.measure(aa(m,d),d);!i&&f==="."?i=true:i||(a+=g),o+=g,u=p;}}return {width:o,decimalOffset:i?a:o}}function xk(e,t,n,r){let o=e.relativeTo==="indent"||!r?{left:t,right:n}:r;return {positionPt:e.alignment==="right"?o.right:e.alignment==="center"?(o.left+o.right)/2:o.left,alignment:e.alignment,...e.leader?{leader:e.leader}:{}}}var id=31680;function $i(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?t>id?od$1(id):t<-id?od$1(-id):od$1(t):null}function Xi(e){let t=0,n=0;for(let r of e){if(r.localName!=="ind")continue;let o=r.attributes?.left??r.attributes?.start,a=r.attributes?.right??r.attributes?.end,i=$i(o),s=$i(a);i!==null&&(t=qd$1(i)),s!==null&&(n=qd$1(s));}return {left:t,right:n}}function jb(e){let t="left";for(let n of e)if(n.localName==="jc")switch(n.attributes?.val){case "center":t="center";break;case "right":case "end":t="right";break;case "both":case "distribute":t="both";break;default:t="left";}return t}function Sk(e){return e.endsWith(" ")}function ld(e,t,n,r,o,a,i){if(e.length===0||o==="left")return e;let s=e.length;for(;s>0&&e[s-1].box.width===0&&(e[s-1].text===`
|
|
6
|
+
`||e[s-1].text===Ec$1);)s-=1;let l=s;for(;l>0&&e[l-1].lineEndWhitespace;)l-=1;let d=e[s-1],c=i!==void 0&&d!==void 0&&Math.abs(d.box.x+d.box.width-n-i)<=Ki;if(l<s&&c&&(o==="center"||o==="right")){let h=e[l].box.x-n,b=r-h;if(b<=0)return e;let R=o==="center"?b/2:b,I=(i??0)>=r-Ki,T=e[l].box.x+R;return e.map((k,L)=>{if(L<l)return {...k,box:{...k.box,x:k.box.x+R}};if(!I)return {...k,box:{...k.box,x:k.box.x+R}};let P=Math.min(k.box.width,Math.max(0,n+r-T)),x={...k,box:{...k.box,x:T,width:P}};return T+=P,x})}let u=e[e.length-1],f=u.text.replace(/\s+$/,""),p=f===u.text?0:u.box.width-qn(f,Nt(u.style,u.fontSlot),t),m=i??u.box.x-n+u.box.width-p,g=r-m;if(g<=0)return e;if(o==="both"){if(a)return e;let h=[];for(let T=1;T<e.length;T+=1)Sk(e[T-1].text)&&h.push(T);if(h.length===0)return e;let b=g/h.length,R=new Set(h),I=0;return e.map((T,k)=>(R.has(k)&&(I+=b),I===0?T:{...T,box:{...T.box,x:T.box.x+I}}))}let y=o==="center"?g/2:g;return e.map(h=>({...h,box:{...h.box,x:h.box.x+y}}))}function dd(e,t){return t===0||e.length===0?e:e.map(n=>Er(n,t,0))}function cd(e,t,n,r,o,a,i,s=[],l=xa,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??wa,m=u?.firstLineOffset??0,g=[],y=ba(e,s,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??Te,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false,u?.refFields,u?.revisionAuthorFilter),h=Math.max(0,u?.startOffset??0),b=y.flatMap(W=>{if(W.end<=h)return [];if(W.start>=h)return [W];let O=h-W.start;return [{...W,text:W.projected?W.text:W.text.slice(O),start:h}]}),R=hk(b),I=Ab(o,u?.equationCacheToken),T=W=>W.equation?I(W.equation,W.style):null;if(b.length===0&&u?.suppressEmptyPlaceholderLine)return [];let k=W=>({...W.revisions===void 0?{}:{revisions:W.revisions},...W.fieldAtom===void 0?{}:{fieldAtom:W.fieldAtom}}),L=u?.markRunProperties??s,P=L.length===0?Mn:He(L,u?.themeFonts),x=n+r,v=u?.contentLeft??n,w=u?.contentRight??x,F=u?.contentOriginX??0,M=[],S={spans:[],start:h,end:h,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},H=false,j=new Map,_=u?.displayMode??Te,C=(()=>{let W=new Set;if(!u?.inlineDrawingLayout)return W;let O=pn(e);for(let Z of Ht(e,u.inlineDrawingLayout)){if(!Oe(Z.revisions,_,u?.revisionAuthorFilter)||Z.projection.wrap!=="topAndBottom")continue;let ne=O.get(Z.atomId);ne!==void 0&&W.add(ne);}return W})(),D=(()=>{let W=new Set;if(!u?.inlineDrawingLayout)return W;let O=pn(e);for(let Z of Ht(e,u.inlineDrawingLayout)){if(!Oe(Z.revisions,_,u?.revisionAuthorFilter)||Z.projection.anchor?.behindDocument||Z.projection.wrap==="topAndBottom"||Z.projection.wrap==="inline"||Z.projection.wrap==="behind"||Z.projection.wrap==="inFront")continue;let ne=O.get(Z.atomId);ne!==void 0&&W.add(ne);}return W})(),z=[...(u?.pageExclusionZones??[]).filter(W=>W.anchorParagraphId===t).map(W=>W.anchorModelStart),...C,...D],N=(()=>{let W=new Map;if(z.length===0)return W;let O=0,Z=0,ne=0,Ie=()=>ne===0?m:0,Q=()=>Math.max(1,r-Ie()),xe=pe=>{O=pe,Z=0,ne+=1;};for(let pe of b){let at=T(pe);if(at){let Pe=at.geometry.box.width;Z>0&&Z+Pe>Q()&&xe(pe.start),z.includes(pe.start)&&W.set(pe.start,O),Z+=Pe;continue}if(pe.inlineDrawing){let Pe=or(pe.inlineDrawing.projection).totalWidth;Z>0&&Z+Pe>Q()&&xe(pe.start),z.includes(pe.start)&&W.set(pe.start,O),Z+=Pe;continue}if(pe.text===`
|
|
7
|
+
`||pe.text===Ec$1){xe(pe.end);continue}let Ae=0;for(let Pe of Hb(pe.text)){let Pt=pe.text.slice(Ae,Pe);if(Pt.length===0)continue;let rn=Nt(pe.style,pe.fontSlot),qe=o.measure(Pt,rn),Zt=pe.start+Ae;Z>0&&Z+qe>Q()&&xe(Zt),z.includes(Zt)&&W.set(Zt,O),z.includes(pe.start)&&W.set(pe.start,O),Z+=qe,Ae=Pe;}}for(let pe of z)W.has(pe)||W.set(pe,O);return W})();for(let W of D){let O=N.get(W);O!==void 0&&j.set(W,O);}let A=W=>{if(W.anchorParagraphId!==t)return true;let O=N.get(W.anchorModelStart);return O!==void 0&&S.start>=O||S.end>=W.anchorModelStart},B=()=>{let W=u?.pageExclusionZones?.filter(ne=>!(!A(ne)||ne.anchorParagraphId===t&&(ne.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],O=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&j.size>0?Eb({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:v,contentRight:w,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:j,anchorCellBox:u.anchorCellBox,displayMode:_,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]),Z=u?.inlineDrawingLayout&&j.size>0?ed({paragraph:e,paragraphId:t,drawingLayout:u.inlineDrawingLayout,contentLeft:v,contentRight:w,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:j,displayMode:_,...u.revisionAuthorFilter?{revisionAuthorFilter:u.revisionAuthorFilter}:{}}):Object.freeze([]);return Object.freeze([...W,...O,...Z])},G=()=>M.length===0?m:0,$=()=>F+n+G(),V=()=>Math.max(1,r-G()),q=()=>M.reduce((W,O)=>W+O.height+(O.exclusionSkipBefore??0),0),Y=()=>(u?.paragraphStartY??0)+q(),U=W=>{C.has(W)&&j.set(W,q());},K=()=>{if(H)return;let W=B();if(W.length===0||S.spans.length>0||S.drawings.length>0)return;let O=o.lineMetrics(P),Z=Hn(Y(),S.height>0?S.height:O.height,W);Z>.001&&(H=true,S.exclusionSkipBefore=Z);},Re=()=>Y()+(S.exclusionSkipBefore??0)+.001,ge=()=>{let W=B();if(W.length===0)return true;K();let O=Ca(Re(),W,v,w),Z=$()+S.width,ne=Mf(Z,O);return ne?(ne.x>Z+.001&&(S.width=ne.x-$()),true):false},se=()=>{let W=V(),O=B();if(O.length===0)return W;if(K(),!ge())return 0;let Z=Ca(Re(),O,v,w),ne=$()+S.width,Ie=Ob(ne,Z);return Ie<=.001?0:Math.min(W,S.width+Ie)},he=()=>Math.max(0,se()-S.width),Le=()=>{let W=B();if(W.length===0||!W.some(Q=>Q.anchorParagraphId!==t||S.end>Q.anchorModelStart))return false;let Z=Ca(Re(),W,v,w),ne=$()+S.width,Ie=false;for(let Q of Z){if(!Ie){ne>=Q.start-1e-6&&ne<Q.end-1e-6&&(Ie=true);continue}if(Q.end-Q.start>.001)return S.width=Q.start-$(),true}return false},fe=W=>{if(z.length===0||W<Math.min(...z))return;let O=B().filter(xe=>xe.anchorParagraphId===t&&W>=xe.anchorModelStart);if(O.length===0)return;K();let Z=Ca(Re(),O,v,w),ne=$()+S.width,Ie=-1;for(let xe=0;xe<Z.length;xe+=1){let pe=Z[xe];if(ne>=pe.start-.001&&ne<pe.end-.001){Ie=xe;break}}if(Ie>=0)return;let Q=Mf(ne,Z);Q&&Q.x>ne+.001&&(S.width=Q.x-$());},Ee=W=>{B().filter(Z=>Z.input.mode==="topAndBottom"&&Z.anchorParagraphId===t&&W>=Z.anchorModelStart).length!==0&&((S.spans.length>0||S.drawings.length>0)&&ot(),K());},te=(W,O=0)=>O>64?he()>=W:(K(),ge()?W<=he()+.001?true:S.spans.length>0||S.drawings.length>0?Le()&&W<=he()+.001?true:(ot(),te(W,O+1)):Le()?te(W,O+1):true:S.spans.length>0||S.drawings.length>0?(ot(),te(W,O+1)):true),Fe=(W,O)=>g.filter(Z=>Z.start<O&&Z.end>W).map(Z=>({start:Math.max(Z.start,W),end:Math.min(Z.end,O)})),ye=-1,ve=0,We=0,Me="",Be=(W,O)=>{let Z=o.lineMetrics(W),ne=bb(Z.baseline,S.height||Z.height,O);return S.height===0?(S.height=ne.lineHeight,S.baseline=ne.baseline):(ne.lineHeight>S.height&&(S.height=ne.lineHeight),S.baseline=Math.max(S.baseline,ne.baseline)),{extentTopY:ne.extentTopY}},ct=()=>{if(S.drawings.length===0)return;S.spans.length===0&&(S.baseline=Math.max(S.baseline,...S.drawings.map(O=>O.y+O.height)));let W=wf(S.drawings,S.baseline);S.drawings.splice(0,S.drawings.length,...W),S.baseline=Math.max(S.baseline,...S.drawings.map(O=>O.y+O.height));},Pn=()=>{if(S.drawings.length===0)return;let W=wf(S.drawings,S.baseline);S.drawings.splice(0,S.drawings.length,...W);},Et=W=>{let O=0;for(let Z of S.spans)O=Math.max(O,o.lineMetrics(Nt(Z.style,Z.fontSlot)).height);return O>0?O:W},Ge=()=>{if(S.drawings.length===0)return;let W=Math.max(0,...S.drawings.map(O=>O.y+O.height+O.distB));S.height=Math.max(S.height,W);},mr=()=>{ct(),Ge();},zt=()=>{if(!(S.spans.length<2))for(let W=1;W<S.spans.length;W+=1){let O=S.spans[W-1],Z=S.spans[W],ne=Z.box.x-(O.box.x+O.box.width);ne<=.001||S.drawings.some(Q=>Q.start>=O.range.end&&Q.start<Z.range.start)||(S.spans[W]={...Z,wrapAdvanceBefore:ne});}},ot=W=>{let O=o.lineMetrics(P),Z=S.baseline;S.height===0?(S.height=O.height,S.baseline=O.baseline,Z=O.baseline):W?.includeParagraphMark&&(S.height=Math.max(S.height,O.height)),mr();let ne=S.height,Ie=S.drawings.length>0||S.spans.some(Pe=>Pe.equation!==void 0),Q=p.rule==="auto"&&Ie,xe=Q?Et(O.height):ne,pe=gf(p,xe,S.baseline);Q||(S.baseline=pe.baseline),S.leading=Math.max(0,S.baseline-Z),S.height=Q?Math.max(pe.height,ne):pe.height,Pn(),p.rule!=="exact"&&Ge(),S.trailingSpacing=S.drawings.length===0&&p.rule!=="exact"?Math.max(0,pe.height-ne):0,(()=>{let Pe=B();if(Pe.length===0)return;let Pt=Hn(Y(),S.height,Pe);Pt>.001?S.exclusionSkipBefore=Pt:delete S.exclusionSkipBefore;})(),zt();let Ae=Fe(S.start,S.end);Ae.length>0&&(S.deletedRanges=Ae),M.push(S),ye=-1,ve=0,H=false,S={spans:[],drawings:[],start:S.end,end:S.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},K();},Rt=false;for(let W=0;W<b.length;W+=1){let O=b[W];if(O.breakKind==="column"){let Q=o.lineMetrics(O.style);S.spans.push({range:{paragraphId:t,start:O.start,end:O.end},text:O.text,props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:0,height:Q.height},...O.link?{link:O.link}:{},...k(O)}),S.height=Math.max(S.height,Q.height),S.baseline=Math.max(S.baseline,Q.baseline),S.end=O.end,ot(),M[M.length-1].columnBreakAfter=true,Rt=true;continue}if(O.equation){let Q=T(O),xe=Q.geometry.box.width;if((S.spans.length>0||S.drawings.length>0)&&S.width+xe>se()&&ot(),!te(xe))continue;let at=Math.max(0,S.height-S.baseline),Ae=Math.max(0,Q.geometry.box.height-Q.geometry.baseline);S.baseline=Math.max(S.baseline,Q.geometry.baseline),S.height=S.baseline+Math.max(at,Ae),S.spans.push({range:{paragraphId:t,start:O.start,end:O.end},text:"\uFFFC",props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:xe,height:Q.geometry.box.height},projected:true,equation:Q,...k(O)}),S.width+=xe,S.end=O.end,ye=-1,Me="";continue}if(O.projected&&!O.inlineDrawing&&O.text==="\uFFFC"){U(O.start),O.anchoredAtom&&O.revisions!==void 0&&Oe(O.revisions,_,u?.revisionAuthorFilter)&&(S.anchorRevisions=[...S.anchorRevisions??[],...O.revisions]),S.end=O.end;continue}if(O.inlineDrawing){U(O.start);let Q=or(O.inlineDrawing.projection),xe=Q.totalWidth;if((S.spans.length>0||S.drawings.length>0)&&S.width+xe>se()&&ot(),!te(xe))continue;let{extentTopY:at}=Be(O.style,Q),Ae=$()+S.width;S.drawings.push(wb({input:O.inlineDrawing,paragraphId:t,start:O.start,slotX:Ae,y:at,baseline:S.baseline,contentLeft:F,contentRight:F+x,...O.revisions?{revisions:O.revisions}:{}})),S.width+=xe,S.end=O.end,ye=-1,Me="";continue}if(O.text===Ec$1){let Q=o.lineMetrics(O.style);S.spans.push({range:{paragraphId:t,start:O.start,end:O.end},text:Ec$1,props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:0,height:Q.height},...O.link?{link:O.link}:{},...k(O)}),S.height=Math.max(S.height,Q.height),S.baseline=Math.max(S.baseline,Q.baseline),S.end=O.end,ot(),M[M.length-1].pageBreakAfter=true,Rt=false;continue}if(O.text===`
|
|
8
|
+
`){let Q=o.lineMetrics(O.style);S.spans.push({range:{paragraphId:t,start:O.start,end:O.end},text:`
|
|
9
|
+
`,props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:0,height:Q.height},...O.link?{link:O.link}:{},...k(O)}),S.height=Math.max(S.height,Q.height),S.baseline=Math.max(S.baseline,Q.baseline),S.end=O.end,ot(),Rt=true;continue}Rt=false,Ee(O.start),z.length>0&&O.start>=Math.min(...z)&&fe(O.start);let Z=Nt(O.style,O.fontSlot),ne=o.lineMetrics(Z),Ie=0;for(let Q of Hb(O.text)){let xe=O.text.slice(Ie,Q);if(xe.length===0)continue;let pe=!!O.projected||!!O.positionalTab||O.end-O.start!==O.text.length,at=pe?{paragraphId:t,start:O.start,end:O.end}:{paragraphId:t,start:O.start+Ie,end:O.start+Q};if(xe===" "){(S.spans.length>0||S.drawings.length>0)&&S.width>=se()&&R[W][Q]===1&&ot();let le=$()+S.width,ee=bk(b,W,Q,o),Ve=O.positionalTab?xk(O.positionalTab,n,x,u?.marginExtent):null,mt=Ve===null?Sa(l,le,x):Ve.positionPt>le?Ve:{...Sa(l,le,x),...Ve.leader?{leader:Ve.leader}:{}},we=cf(mt.alignment,le,mt.positionPt,ee.width,ee.decimalOffset);S.spans.push({range:at,text:" ",props:O.props,style:O.style,box:{x:le,y:0,width:we,height:ne.height},...mt.leader?{tabLeader:mt.leader,tabLeaderAdvancePt:o.measure(of.get(mt.leader)??".",O.style)}:{},...O.link?{link:O.link}:{},...mt.leader?{tabLeader:mt.leader}:{},...pe&&!O.positionalTab?{projected:true}:{},...O.noteNav?{noteNav:O.noteNav}:{},...k(O)}),S.width+=we,S.height=Math.max(S.height,ne.height),S.baseline=Math.max(S.baseline,ne.baseline),S.end=pe?O.end:O.start+Q,Me=" ",Ie=Q;continue}let Ae=O.measureText??xe,Pe=o.measure(aa(Ae,Z),Z),Pt=Ie>0||Me===""||/[\s\u00a0]$/.test(Me)||/^[\s\u00a0]/.test(xe)||sd.has(Me[Me.length-1])&&!sd.has(xe[0]);Pt&&(ye=S.spans.length,ve=S.width,We=S.end),fe(O.start+Ie);let rn=Df(xe)&&R[W][Q]!==1;if(rn&&(Pe=Math.min(Pe,Math.max(0,se()-S.width))),S.width+Pe>se()+Ki&&(S.spans.length>0||S.drawings.length>0))if(!Pt&&ye===0)Le();else if(Pt||ye<0){if(!(Le()&&S.width+Pe<=se()+.001)){if(ot(),!te(Pe))continue;ye=0,ve=0,We=S.end;}}else {let le=S.spans.splice(ye);S.width=ve,S.end=We,S.height=0,S.baseline=0;for(let ee of S.spans){let Ve=o.lineMetrics(Nt(ee.style,ee.fontSlot));S.height=Math.max(S.height,Ve.height),S.baseline=Math.max(S.baseline,Ve.baseline);}ot();for(let ee of le){let Ve=o.lineMetrics(Nt(ee.style,ee.fontSlot));S.spans.push({...ee,box:{...ee.box,x:$()+S.width}}),S.width+=ee.box.width,S.height=Math.max(S.height,Ve.height),S.baseline=Math.max(S.baseline,Ve.baseline),S.end=ee.range.end;}ye=0,ve=0;}else if(S.spans.length===0&&S.drawings.length===0&&Pe>se()+.001&&!te(Pe))continue;let qe=xe,Zt=O.start+Ie,Gt=Pe;if(!pe&&O.measureText===void 0&&(S.spans.length===0||!Pt&&ye===0)&&Pe>he()+Ki){let le=Db(xe,Zt,Pe,{remainingLineWidth:he,lineHasText:()=>S.spans.length>0,measureText:ee=>o.measure(aa(ee,Z),Z),appendPrefix:ee=>{S.spans.push({range:{paragraphId:t,start:ee.modelStart,end:ee.modelStart+ee.text.length},text:ee.text,props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:ee.width,height:ne.height},...O.link?{link:O.link}:{},...O.noteNav?{noteNav:O.noteNav}:{},...O.fontSlot?{fontSlot:O.fontSlot}:{},...k(O)}),S.width+=ee.width,S.height=Math.max(S.height,ne.height),S.baseline=Math.max(S.baseline,ne.baseline),S.end=ee.modelStart+ee.text.length;},closeLine:ot,overflowTolerancePt:Ki});qe=le.text,Zt=le.modelStart,Gt=le.width,le.brokeLine&&(ye=0,ve=0,We=S.end);}S.spans.push({range:pe?at:{paragraphId:t,start:Zt,end:O.start+Q},text:qe,props:O.props,style:O.style,box:{x:$()+S.width,y:0,width:Gt,height:ne.height},...O.link?{link:O.link}:{},...pe&&!O.positionalTab?{projected:true}:{},...O.noteNav?{noteNav:O.noteNav}:{},...O.fontSlot?{fontSlot:O.fontSlot}:{},...rn?{lineEndWhitespace:true}:{},...k(O)}),S.width+=Gt,S.height=Math.max(S.height,ne.height),S.baseline=Math.max(S.baseline,ne.baseline),S.end=pe?O.end:O.start+Q,Me=xe,Ie=Q;}}return (S.spans.length>0||S.drawings.length>0||M.length===0||Rt)&&ot({includeParagraphMark:true}),i!==null&&a&&a.set(i,a.retainAcrossPasses===false?M:M.map(_b)),M}var Rk=128,Pk=/[\u0000-\u001F\u007F-\u009F]/,wk=32;function Br(e){return e.kind!=="textValue"}function Ba(e,t){return e.attributes.find(n=>n.localName===t)?.value}function wo(e,t){for(let n of e.children)if(Br(n)&&n.localName===t)return n}function ar(e){return e===void 0||e.length===0||e.length>Rk?false:!Pk.test(e)&&!I(e)}function vk(e){return e==="1"||e==="true"||e==="on"}function Na(e){if(e){for(let t of e.children)if(Br(t)&&(t.kind==="runProperties"||t.localName==="rPr"))return t}}function Yi(e){if(e){for(let t of e.children)if(Br(t)&&(t.kind==="paragraphProperties"||t.localName==="pPr"))return t}}var zb=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function vo(e){return e.some(t=>zb.has(t.localName))?e.filter(t=>!zb.has(t.localName)):e}function Gb(e){let t=wo(e,"docDefaults");if(!t)return {run:[],paragraph:[],paragraphNode:void 0};let n=Na(wo(t,"rPrDefault")),r=Yi(wo(t,"pPrDefault"));return {run:vo(Lt(n)),paragraph:vo(Lt(r)),paragraphNode:r}}function Wb(e){let t=Ba(e,"styleId");if(!ar(t))return null;let n=Ba(e,"type")??"",r=wo(e,"basedOn"),o=r?Ba(r,"val"):void 0,a=ar(o)?o:null,i=wo(e,"next"),s=i?Ba(i,"val"):void 0,l=ar(s)?s:null,d=Yi(e),c=Na(e),u=new Map,f=0;for(let p of e.children){if(p.kind==="textValue"||p.localName!=="tblStylePr")continue;if(f>=wk)break;f+=1;let m=Ba(p,"type");m&&!u.has(m)&&u.set(m,p);}return {styleId:t,type:n,basedOn:a,next:l,outlineLevel:a$1(e),isDefault:vk(Ba(e,"default")),paragraphProperties:vo(Lt(d)),runProperties:vo(Lt(c)),paragraphPropertiesNode:d,tablePropertiesNode:wo(e,"tblPr"),tableRowPropertiesNode:wo(e,"trPr"),conditionalTableFormats:u}}var pd=32,$b=4096;function ud(e){return e.map(t=>t.attributes?{n:t.localName,a:t.attributes}:{n:t.localName})}function Hf(e){return e?A(na$1(e)):""}function Ik(e){return [...e.conditionalTableFormats].map(([t,n])=>[t,Hf(n)])}var fd=Object.freeze({tablePropertyNodes:Object.freeze([]),tableRowPropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Xb(e,t){let n=t&&ar(t)?t:null,r=n?Kb(e,n):null;if(r)return r;let o=e.defaultTableStyleId;return !o||o===n?fd:Kb(e,o)??fd}var Vb=new WeakMap;function Kb(e,t){let n=Vb.get(e);n||(n=new Map,Vb.set(e,n));let r=n.get(t);if(r)return r;let o=Fk(e,t);return o?(n.set(t,o),o):null}function Fk(e,t){let n=md(e,t,"table");if(n.length===0)return null;let r=[],o=[],a=[],i=[],s=[],l=new Map;for(let d of n){d.tablePropertiesNode&&r.push(d.tablePropertiesNode),d.tableRowPropertiesNode&&o.push(d.tableRowPropertiesNode),d.paragraphPropertiesNode&&a.push(d.paragraphPropertiesNode),i.push(...d.paragraphProperties),s.push(...d.runProperties);for(let[c,u]of d.conditionalTableFormats)l.set(c,u);}return Object.freeze({tablePropertyNodes:Object.freeze(r),tableRowPropertyNodes:Object.freeze(o),paragraphPropertyNodes:Object.freeze(a),paragraphProperties:Object.freeze(i),runProperties:Object.freeze(s),conditional:Tk(l)})}function Tk(e){let t=Object.freeze({get:n=>e.get(n),has:n=>e.has(n),forEach:(n,r)=>{for(let[o,a]of e)n.call(r,a,o,t);},keys:()=>e.keys(),values:()=>e.values(),entries:()=>e.entries(),[Symbol.iterator]:()=>e[Symbol.iterator](),[Symbol.toStringTag]:"Map",get size(){return e.size}});return t}function Yb(e){return e.paragraphPropertyNodes.length>0||e.paragraphProperties.length>0||e.runProperties.length>0||e.conditional.size>0}var jf=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function Ub(e,t){let n=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of t){let i=e.conditional.get(a);if(!i)continue;let s=Yi(i);s&&(n.push(s),r.push(...vo(Lt(s))));let l=Na(i);l&&o.push(...vo(Lt(l)));}return n.length===0&&r.length===0&&o.length===0?jf:{paragraphProperties:r,paragraphPropertyNodes:n,runProperties:o}}function zf(e,t=$y){let n=new Map;if(!e)return {cacheToken:A({empty:true,theme:t}),docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,defaultTableStyleId:null,themeFonts:t,styles:n};let r=Gb(e),o=null,a=null,i=null,s=0;for(let d of e.children){if(!Br(d)||d.localName!=="style")continue;if(s>=$b)break;s+=1;let c=Wb(d);if(!c)continue;let{isDefault:u,...f}=c;n.set(f.styleId,f),f.type==="paragraph"?u?o=f.styleId:o===f.styleId&&(o=null):f.type==="character"?u?a=f.styleId:a===f.styleId&&(a=null):f.type==="table"&&(u?i=f.styleId:i===f.styleId&&(i=null));}return {cacheToken:A({dR:ud(r.run),dP:ud(r.paragraph),defP:o,defC:a,defT:i,theme:t,styles:[...n.values()].map(d=>({id:d.styleId,type:d.type,basedOn:d.basedOn,outlineLevel:d.outlineLevel,p:ud(d.paragraphProperties),r:ud(d.runProperties),tPr:Hf(d.tablePropertiesNode),trPr:Hf(d.tableRowPropertiesNode),tblStylePr:Ik(d)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,defaultTableStyleId:i,themeFonts:t,styles:n}}function Gf(e,t){let n=null;for(let r of e){if(r.localName!==t)continue;let o=r.attributes?.val;n=ar(o)?o:null;}return n}function md(e,t,n){let r=e.styles.get(t);if(!r||r.type!==n)return [];let o=[],a=new Set,i=t,s=0;for(;i!==null&&s<pd&&!(a.has(i)||!ar(i));){a.add(i);let l=e.styles.get(i);if(!l)break;o.push(l),i=l.basedOn,s+=1;}return o.reverse()}function Aa(e,t,n){let r=Lt(t),o=Gf(r,"pStyle")??e.defaultParagraphStyleId,a=o?md(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...n?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],s=[...i,...r],l=[];e.docDefaultsParagraphNode&&l.push(e.docDefaultsParagraphNode),n&&l.push(...n.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&l.push(p.paragraphPropertiesNode);t&&l.push(t);let d=Na(t&&Br(t)?t:void 0),c=Lt(d),u=vl([{properties:e.docDefaultsRun,role:"defaults",emit:true},{properties:n?.runProperties??[],role:"xor",emit:true},{properties:a.flatMap(p=>p.runProperties),role:"xor",emit:true}]),f=c.length===0?u:vl([{properties:u,role:"carried",emit:true},{properties:c,role:"direct",emit:true}]);return {paragraphProperties:s,inheritedParagraphProperties:i,paragraphPropertyNodes:l,runProperties:u,markRunProperties:f,styleId:o??null}}function qb(e){let t;for(let n of e){if(!n||n.kind==="textValue")continue;let r=false;for(let o of n.children)if(Br(o)&&o.localName==="pBdr"){r=true;break}r&&(t=rr(n).bottom);}return t}function ir(e,t,n){let r=[];if(n){let i=Gf(t,"rStyle")??n.defaultCharacterStyleId;i&&(r=md(n,i,"character").flatMap(s=>s.runProperties));}if(e.length===0&&r.length===0)return t;if(r.length===0&&t.length===0)return e;let o=r.length===0?e:vl([...e.length>0?[{properties:n?.docDefaultsRun??[],role:"defaults",emit:false}]:[],{properties:e,role:"carried",emit:true},{properties:r,role:"xor",emit:true}]);return t.length===0?o:[...o,...t]}function Io(e,t,n,r,o,a=false){let i=Yi(e),s=n?Aa(n,i,o):null,l=s?[...s.paragraphProperties]:Lt(i),d=Lt(Na(i&&Br(i)?i:void 0)),c=s?s.runProperties:[],u=s?s.markRunProperties:d,f=Xi(l),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let I of l){if(I.localName!=="ind")continue;let T=$i(I.attributes?.hanging),k=$i(I.attributes?.firstLine);(I.attributes?.hanging!==void 0||I.attributes?.firstLine!==void 0)&&(p=T!==null?Math.max(0,qd$1(T)):0,m=k!==null?qd$1(k):0);}let g=r?{left:r.indent.left,right:r.indent.right,hanging:p,firstLine:m}:{left:f.left,right:f.right,hanging:p,firstLine:m},y=s?sf(s.paragraphPropertyNodes):lf(i),h=s?s.styleId:Gf(l,"pStyle")??null,b=null,R=false;for(let I of l){if(I.localName!=="outlineLvl")continue;R=true;let T=I.attributes?.val;b=T!==void 0&&/^[0-8]$/.test(T)?Number(T):null;}if(!R&&n&&h){let I=md(n,h,"paragraph");for(let T=I.length-1;T>=0;T-=1){let k=I[T].outlineLevel;if(k!==null){b=k;break}}}if(!R&&b===null&&h){let I=/^heading\s*([1-9])$/i.exec(h.trim());I&&(b=Number(I[1])-1);}return {props:l,indent:g,available:Math.max(1,t-g.left-g.right),alignment:jb(l),spacing:pf(l,{inList:r!==void 0,inTableCell:a}),lineSpacing:mf(l),contextualSpacing:yf(l),styleId:h,outlineLevel:b,bottomBorder:s?qb(s.paragraphPropertyNodes):rr(i).bottom,borders:s?zi(s.paragraphPropertyNodes):rr(i),shading:Ou(l),inheritedRunProperties:c,markRunProperties:u,tabStops:y,tabStopsCacheToken:Ro(y),...r?{listItem:r}:{}}}var kk={state:"none"},Zb=(e,t)=>t.state==="omitted"?e:t;function gd(e,t,n={}){return e.state==="omitted"?t:e.state==="none"?kk:e}function Wf(e,t){let n=Zb;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right),insideH:n(e.insideH,t.insideH),insideV:n(e.insideV,t.insideV)}}function Vf(e,t){let n=Zb;return {top:n(e.top,t.top),left:n(e.left,t.left),bottom:n(e.bottom,t.bottom),right:n(e.right,t.right)}}function yd(e=1048576){let t=e|0;return {intervalsRemaining:t>0?t:0}}function Jb(e,t,n,r){let o=Math.max(0,Math.min(t|0,1024)),a=new Array(e.length);for(let i=0;i<e.length;i+=1){if(r&&r.intervalsRemaining<=0){a[i]=[];continue}a[i]=Ok(e[i],o,n,r);}return a}function Ok(e,t,n,r){let o=[];for(let c=0;c<e.length;c+=1){let u=e[c],f=Math.max(0,u.gridColumn|0),p=Math.min(t,f+Math.max(0,u.gridSpan|0));f>=p||(o.push({x:f,kind:1,cellIndex:c,cell:u}),o.push({x:p,kind:0,cellIndex:c,cell:u}));}if(o.length===0)return [];o.sort((c,u)=>c.x!==u.x?c.x-u.x:c.kind!==u.kind?c.kind-u.kind:c.cellIndex-u.cellIndex);let a=new Map,i,s=o[0].x,l=[],d=()=>{i=void 0;for(let c of a.values())(!i||c.cellIndex<i.cellIndex)&&(i=c);};for(let c of o){if(c.x>s&&i&&(!r||r.intervalsRemaining>0)){let u=l[l.length-1];u&&u.end===s&&u.cellIndex===i.cellIndex&&u.cell===i.cell?l[l.length-1]={start:u.start,end:c.x,cell:u.cell,cellIndex:u.cellIndex}:(l.push({start:s,end:c.x,cell:i.cell,cellIndex:i.cellIndex}),n&&(n.ownershipSlotsWritten+=1),r&&(r.intervalsRemaining-=1));}c.kind===1?a.set(c.cellIndex,{cell:c.cell,cellIndex:c.cellIndex}):a.delete(c.cellIndex),d(),s=c.x;}return l}function Ck(e,t){let n=0,r=e.length;for(;n<r;){let o=n+r>>1;e[o].start<=t?n=o+1:r=o;}return n}function Kf(e,t,n,r){r&&(r.columnLookups+=1);let o=e[t];if(!o||n<0)return;let a=Ck(o,n)-1;if(a<0)return;let i=o[a];if(!(n>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var nx=256,tt={state:"omitted"},Pd={state:"none"},rx={top:tt,left:tt,bottom:tt,right:tt,insideH:tt,insideV:tt},ox={top:tt,left:tt,bottom:tt,right:tt},Qb={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},Ek=new Map([["single","single"],["thick","thick"],["double","double"],["dotted","dotted"],["dashed","dashed"],["dashSmallGap","dashed"],["dotDash","dashed"],["dotDotDash","dashed"],["triple","triple"],["wave","single"],["hairline","single"],["inset","single"],["outset","single"]]);function Da(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function $f(e,t){return e.attributes.find(n=>n.localName===t)?.value}function Mk(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function Bk(e){if(e===null)return .5;let t=e/8;return !Number.isFinite(t)||t<=0?.5:t>ji?ji:t}function wd(e){if(!e)return tt;let t=$f(e,"val");if(!t)return tt;if(t==="nil"||t==="none")return Pd;let n=Ek.get(t)??"single",r=$f(e,"color"),o=r===void 0||r==="auto"?null:wl(r)??null;return {state:"edge",style:n,color:o,widthPt:Bk(Mk($f(e,"sz")))}}function ax(e,t){if(!e)return ox;let n={top:tt,left:tt,bottom:tt,right:tt};for(let r of t){let o=r==="left"?"start":r==="right"?"end":void 0,a=Da(e,r)??(o?Da(e,o):void 0);n[r]=wd(a);}return n}function vd(e){let t=e&&Da(e,"tblBorders");return t?{...ax(t,["top","left","bottom","right"]),insideH:wd(Da(t,"insideH")),insideV:wd(Da(t,"insideV"))}:rx}function Id(e){return ax(e&&Da(e,"tcBorders"),["top","left","bottom","right"])}function Xf(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function ex(e){if(!e)return 0;let t=Number.parseInt(e.slice(0,2),16),n=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return t+n+r}function ix(e,t,n=true){if(e.state==="omitted")return t.state==="omitted"?tt:t;if(t.state==="omitted")return e;if(e.state==="none")return t.state==="none"?Pd:t;if(t.state==="none")return e;let r=Xf(e),o=Xf(t);if(r>o)return e;if(o>r)return t;let a=Qb[e.style],i=Qb[t.style];if(a!==i)return a>i?e:t;let s=ex(e.color),l=ex(t.color);return s<l?e:l<s?t:n?e:t}function hd(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function Nk(e,t,n){return n?t==="top"||t==="bottom"?e.insideH:e.insideV:e[t]}function Ak(e,t){return e===void 0&&t===void 0?true:!e||!t?false:e.style===t.style&&e.color===t.color&&e.widthPt===t.widthPt}function bd(e){if(e.length===0)return [];let t=[],n={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];n.gridEnd===o.gridStart&&Ak(n.edge,o.edge)?n={...n,gridEnd:o.gridEnd}:(t.push(n),n={...o});}return t.push(n),t}function xd(e,t,n){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==t||o.gridEnd!==n))return o.edge}function tx(e,t,n){let r=0,o=Math.min(n,e.length);for(let a=Math.max(0,t);a<o;a+=1)r+=e[a];return r}function Dk(e){if(!(!e||e.style!=="double"))return Ra(e.widthPt)}function Sd(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function _k(e,t){return t?e==="outer"?t.insetPt:t.insetPt+t.strokePt+t.gapPt:0}function Hk(e,t,n){return n?e==="outer"?t-n.insetPt:t-n.insetPt-n.strokePt-n.gapPt:t}function jk(e,t){return t?e==="outer"?t.insetPt+t.strokePt:t.insetPt+t.extentPt:0}function zk(e,t,n){return n?e==="outer"?t-n.insetPt-n.strokePt:t-n.insetPt-n.extentPt:t}function Nr(e,t){e.length>=nx||!(t.width>0)||!(t.height>0)||e.push(t);}function Gk(e,t,n,r,o,a,i,s,l,d,c){let u=Ra(n.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,y=Math.abs(r)<1e-6,h=Math.abs(o-a)<1e-6,b=Math.abs(r)<1e-6,R=Math.abs(o-i)<1e-6;if(t==="top"||t==="bottom"){let k=t==="top"?g:i-g-f,L=t==="top"?g+f+p:i-g-m;for(let P of ["outer","inner"]){let x=r,v=o;y&&(x=_k(P,s)),h&&(v=Hk(P,a,l)),Nr(e,{side:t,role:P,color:n.color,cssStyle:"solid",x,y:P==="outer"?k:L,width:v-x,height:f});}return}let I=t==="left"?g:a-g-f,T=t==="left"?g+f+p:a-g-m;for(let k of ["outer","inner"]){let L=r,P=o;b&&(L=jk(k,d)),R&&(P=zk(k,i,c)),Nr(e,{side:t,role:k,color:n.color,cssStyle:"solid",x:k==="outer"?I:T,y:L,width:f,height:P-L});}}function Wk(e,t,n,r,o,a,i){let s=n.widthPt,l=Math.max(1,s),d=s*3+l*2;if(t==="top"||t==="bottom"){let u=t==="top"?0:i-d;for(let f=0;f<3;f+=1)Nr(e,{side:t,role:f===0?"outer":f===1?"middle":"inner",color:n.color,cssStyle:"solid",x:r,y:u+f*(s+l),width:o-r,height:s});return}let c=t==="left"?0:a-d;for(let u=0;u<3;u+=1)Nr(e,{side:t,role:u===0?"outer":u===1?"middle":"inner",color:n.color,cssStyle:"solid",x:c+u*(s+l),y:r,width:s,height:o-r});}function Vk(e,t,n,r,o,a,i){let s=n.widthPt;t==="top"?Nr(e,{side:t,role:"edge",color:n.color,cssStyle:Sd(n.style),x:r,y:0,width:o-r,height:s}):t==="bottom"?Nr(e,{side:t,role:"edge",color:n.color,cssStyle:Sd(n.style),x:r,y:i-s,width:o-r,height:s}):t==="left"?Nr(e,{side:t,role:"edge",color:n.color,cssStyle:Sd(n.style),x:0,y:r,width:s,height:o-r}):Nr(e,{side:t,role:"edge",color:n.color,cssStyle:Sd(n.style),x:a-s,y:r,width:s,height:o-r});}function Rd(e,t){if(e.length===0)return;let n=e[0];return Dk(n.edge)}function Kk(e,t,n,r,o,a,i,s,l,d){let c=(F,M,S)=>{let H=[];for(let j of M){if(!j.edge)continue;let _,C;S?(_=tx(i,s,j.gridStart),C=tx(i,s,j.gridEnd)):(_=l[j.gridStart-d]??0,C=l[j.gridEnd-d]??a),H.push({side:F,gridStart:j.gridStart,gridEnd:j.gridEnd,startPt:_,endPt:C,edge:j.edge});}return H},u=c("top",e,true),f=c("left",t,false),p=c("bottom",n,true),m=c("right",r,false),g=[...u,...m,...p,...f],y=Rd(t),h=Rd(r),b=Rd(e),R=Rd(n),I=(F,M)=>F.length===1&&Math.abs(F[0].startPt)<1e-6&&Math.abs(F[0].endPt-M)<1e-6,T=I(u,o),k=I(f,a),L=I(p,o),P=I(m,a),x=[],v=(F,M,S)=>{for(let H of M){let{edge:j,startPt:_,endPt:C}=H;j.style==="double"?Gk(x,F,j,_,C,o,a,F==="top"||F==="bottom"?y:void 0,F==="top"||F==="bottom"?h:void 0,F==="left"||F==="right"?b:void 0,F==="left"||F==="right"?R:void 0):j.style==="triple"?Wk(x,F,j,_,C,o,a):S||Vk(x,F,j,_,C,o,a);}};v("top",u,T),v("left",f,k),v("bottom",p,L),v("right",m,P);let w={};return T&&u[0]&&(w.top=u[0].edge),k&&f[0]&&(w.left=f[0].edge),L&&p[0]&&(w.bottom=p[0].edge),P&&m[0]&&(w.right=m[0].edge),g.length>0&&(w.edgeSegments=g),x.length>0&&(w.strokes=x),w}function Yf(e,t,n,r,o,a){let i=e.length,s=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let l=Jb(e,n,o,a),d=(u,f,p)=>gd(u.borders[f],Nk(t,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?Pd:ix(p,m);for(let u=0;u<i;u+=1){let f=e[u];for(let p=0;p<f.length;p+=1){let m=f[p];if(m.vMergeContinue){s[u][p]={};continue}let g=m.mergeRowSpan??1,y=u+g-1,h=u===0,b=y===i-1,R=m.gridColumn===0,I=m.gridColumn+m.gridSpan-1,T=I>=n-1,k=[];if(h)for(let _=m.gridColumn;_<=I;_+=1)k.push({gridStart:_,gridEnd:_+1,edge:hd(d(m,"top",false))});let L=[];if(R)for(let _=u;_<=y;_+=1)L.push({gridStart:_,gridEnd:_+1,edge:hd(d(m,"left",false))});let P=[];for(let _=m.gridColumn;_<=I;_+=1){let C;if(b)C=d(m,"bottom",false);else {let D=Kf(l,y+1,_,o);D?.cell.vMergeContinue?C=tt:C=c(m.borders.bottom,D?D.cell.borders.top:tt,d(m,"bottom",true),D?d(D.cell,"top",true):t.insideH);}P.push({gridStart:_,gridEnd:_+1,edge:hd(C)});}let x=[];for(let _=u;_<=y;_+=1){let C;if(T)C=d(m,"right",false);else {let D=Kf(l,_,I+1,o);C=c(m.borders.right,D?D.cell.borders.left:tt,d(m,"right",true),D?d(D.cell,"left",true):t.insideV);}x.push({gridStart:_,gridEnd:_+1,edge:hd(C)});}let v=bd(k),w=bd(L),F=bd(P),M=bd(x);if(!r){let _={},C=xd(v,m.gridColumn,I+1),D=xd(w,u,y+1),z=xd(F,m.gridColumn,I+1),N=xd(M,u,y+1);C&&(_.top=C),D&&(_.left=D),z&&(_.bottom=z),N&&(_.right=N);let A=[],B=(G,$)=>{for(let V of $)V.edge&&A.push({side:G,gridStart:V.gridStart,gridEnd:V.gridEnd,startPt:V.gridStart,endPt:V.gridEnd,edge:V.edge});};B("top",v),B("left",w),B("bottom",F),B("right",M),A.length>0&&(_.edgeSegments=A),s[u][p]=_;continue}let S=r.cellBoxes[u][p],H=[0],j=0;for(let _=u;_<=y;_+=1){let C=r.rowBands[_];j+=C.height,H.push(j);}H.length>1&&(H[H.length-1]=S.height),s[u][p]=Kk(v,w,F,M,S.width,S.height,r.columnWidthsPt,m.gridColumn,H,u);}}return s}function Ar(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var Uf=rx,qf=ox;var lx=31680/20,mn=Object.freeze({type:"auto",value:0}),$k=100,Xk=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function Yk(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Jf(e,t){return e.attributes.find(n=>n.localName===t)?.value}function dx(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let t=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(t){let r=Number(t[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let n=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(n){let r=Number(n[1])*Xk[n[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function Fo(e){if(!e)return mn;let t=Jf(e,"type");if(t!==void 0&&t!=="pct"&&t!=="dxa")return t==="nil"?{type:"nil",value:0}:mn;let n=Jf(e,"w");if(n===void 0)return mn;let r=dx(n);if(!r)return mn;let o=/^\d{1,9}$/.test(n);if(r.kind==="percent"||o&&t==="pct"){let a=r.kind==="percent"?r.percent:Number(n)/50;return !Number.isFinite(a)||a<=0?mn:{type:"pct",value:Math.min(a,$k)}}return !Number.isFinite(r.pt)||r.pt<=0?mn:{type:"dxa",value:Math.min(r.pt,lx)}}function Ui(e,t){if(!e)return;let n=Fo(e);if(n.type==="dxa")return Math.min(n.value,t)}function cx(e){let t=Yk(e,"tblGrid");if(!t)return [];let n=[];for(let r of t.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(n.push(r),n.length>=1024))break;return n}function Uk(e){let t=[];for(let n of e){let r=Jf(n,"w"),o=r===void 0?null:dx(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){t.push(void 0);continue}t.push(o.pt>lx?void 0:o.pt);}return t}var Zf=1,sx=.001;function qk(e,t,n,r){let o=[];for(let i=0;i<n;i+=1)o.push(e[i]);let a=t.filter(i=>i.start<n&&(i.preferred.type==="dxa"||i.preferred.type==="pct"&&r>0)).sort((i,s)=>i.span-s.span);for(let i of a){let s=Math.min(i.start+i.span,n);if(s<=i.start)continue;let l=i.preferred.type==="pct"?r*i.preferred.value/100:i.preferred.value;if(!Number.isFinite(l)||l<=0)continue;if(s-i.start===1){let f=o[i.start];o[i.start]=f===void 0?l:Math.max(f,l);continue}let d=[],c=l;for(let f=i.start;f<s;f+=1){let p=o[f];p===void 0?d.push(f):c-=p;}if(d.length===0||c<=0)continue;let u=c/d.length;for(let f of d)o[f]=u;}return o}function ux(e){let{columnCount:t,tableWidth:n}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:Zf,a=n.type==="dxa"?n.value:n.type==="pct"?o*n.value/100:0,i=Uk(e.gridCols),s=qk(i,e.claims,t,a),l=0,d=0;for(let h of s)h===void 0?d+=1:l+=h;let c=[];if(d>0){let h=l>0?l/Math.max(t-d,1):o/t,b=Math.max(o-l,0)/d,R=Math.max(Math.min(b,h),Zf);for(let I of s)c.push(I??R);}else for(let h of s)c.push(h);let u=c.reduce((h,b)=>h+b,0);if(!Number.isFinite(u)||u<=0)return new Array(t).fill(o/t);let f=t*Zf,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,m=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),g=n.type==="pct"&&a>0;if(u<=m+sx&&!g||Math.abs(u-m)<=sx)return c;let y=m/u;return c.map(h=>h*y)}function _a(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function Zk(e,t){return e.attributes.find(n=>n.localName===t)?.value}var px=3,fx=108/20,qi=31680/20,Qf={top:0,right:fx,bottom:0,left:fx};function Fd(e){if(!e)return;let t=Zk(e,"w");if(t===void 0||!/^\d{1,9}$/.test(t))return;let n=Number(t);if(!Number.isFinite(n)||n<0)return;let r=n/20;return r>qi?qi:r}function Td(e){if(!e)return {};let t=Fd(_a(e,"top")),n=Fd(_a(e,"left")??_a(e,"start")),r=Fd(_a(e,"bottom")),o=Fd(_a(e,"right")??_a(e,"end"));return {...t===void 0?{}:{top:t},...n===void 0?{}:{left:n},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function kd(e,t){return {top:t.top??e.top,right:t.right??e.right,bottom:t.bottom??e.bottom,left:t.left??e.left}}function gx(e){let t=e?.children.find(r=>r.kind!=="textValue"&&r.localName==="textDirection");return !t||t.kind==="textValue"?"horizontal":t?.attributes.find(r=>r.localName==="val")?.value==="btLr"?"btLr":"horizontal"}function yx(e,t){let n=t;for(let r of e){if(r.kind==="table"){n=Math.max(n,r.box.x+r.box.width);continue}for(let o of r.lines){n=Math.max(n,o.contentX);for(let a of o.spans)n=Math.max(n,a.box.x+a.box.width);for(let a of o.drawings??[])n=Math.max(n,a.advanceEnd);}}return n}function hx(e,t){return {x:t.x+t.height-(e.y-t.y),y:t.y+(e.x-t.x)}}var mx=new WeakMap,bx=new WeakSet;function Jk(e){let t=mx.get(e);if(t)return t;let n=new Map,r=(o,a)=>{for(let i of o)if(i.kind==="table")for(let s of i.rows)for(let l of s.cells)if(l.textDirection==="btLr")for(let d of xt(l.blocks)){let c=n.get(d.paragraphId)??[];c.push({pageIndex:a,cell:l}),n.set(d.paragraphId,c);}else r(l.blocks,a);};for(let o of e.pages){r(o.fragments,o.index),o.header&&r(o.header.fragments,o.index),o.footer&&r(o.footer.fragments,o.index);for(let a of [o.footnotes,o.endnotes])if(a){a.separator&&r(a.separator.fragments,o.index);for(let i of a.notes)r(i.fragments,o.index);}}return mx.set(e,n),n}function xx(e,t,n){let r=Jk(e).get(n)??[];return r.find(o=>o.pageIndex===t)??r[0]}function Ha(e,t){let n=xx(e,t.pageIndex,t.position.paragraphId);if(!n)return t;let r=Qk(t,n.cell.box),o={...t,...r};return bx.add(o),o}function JD(e){return bx.has(e)}function ep(e,t,n){let r=xx(e,n.pageIndex,t);if(!r)return n;let o=r.cell.box;return {...n,x:o.x+(n.y-o.y),y:o.y+o.height-(n.x-o.x)-n.width,width:n.height,height:n.width}}function Qk(e,t){return {x:t.x+(e.y-t.y),y:t.y+t.height-(e.x-t.x)}}function Sx(e){let t;for(let r of e?.children??[])if(r.kind!=="textValue"&&r.localName==="vAlign"){t=r;break}let n=t?.attributes.find(r=>r.localName==="val")?.value;return n==="center"?"center":n==="bottom"?"bottom":"top"}function Rx(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===ca$1&&n.localName===t)return n}}function tp(e){let t=Rx(e,"tblHeader");if(!t)return;let n=t.attributes.find(r=>r.namespaceUri===ca$1&&r.localName==="val")?.value;return n===void 0||n!=="0"&&n!=="false"&&n!=="off"}function Px(e,t,n){let r=false;for(let o of e.tableRowPropertyNodes)r=tp(o)??r;for(let o of t)r=tp(Rx(e.conditional.get(o),"trPr"))??r;return tp(n)??r}var Cd=16,Nx=31680/20,wx=1023,eO=256,vx=31680/20;function Ix(e){let t=e&&De(e,"jc");if(!t)return;let n=dt(t,"val");if(n==="center")return "center";if(n==="right"||n==="end")return "right";if(n==="left"||n==="start")return "left"}var Fx=31680/20;function De(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}function dt(e,t){return e.attributes.find(n=>n.localName===t)?.value}function np(e,t){for(let n of e.children)if(n.kind!=="textValue"&&n.namespaceUri===ca$1&&n.localName===t)return n}function Od(e,t){return e.attributes.find(n=>n.namespaceUri===ca$1&&n.localName===t)?.value}function tO(e){let t=e&&De(e,"gridSpan"),n=t&&dt(t,"val");if(!n||!/^\d{1,7}$/.test(n))return 1;let r=Number(n);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function Tx(e,t){let n=e&&De(e,t),r=n&&dt(n,"val");if(!r||!/^\d{1,7}$/.test(r))return 0;let o=Number(r);return Number.isInteger(o)&&o>0?Math.min(o,1024):0}function nO(e){let t=e&&De(e,"vMerge");return t?dt(t,"val")!=="restart":false}function kx(e){return ku(e&&De(e,"shd"))}function rO(e,t){let n=e&&De(e,t);if(!n)return false;let r=dt(n,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var Zi=Object.freeze({rule:"auto"});function oO(e){let t=e&&De(e,"trHeight");if(!t)return Zi;let n=dt(t,"hRule"),r=n==="auto"||n==="exact"||n==="atLeast"?n:void 0;if(r==="auto")return Zi;let o=dt(t,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Zi;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Zi;let i=Math.min(a/20,Nx);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Zi}function Ji(e,t){let n=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=t-n;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function Ox(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function Cx(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let t=Number(e);if(!Number.isFinite(t))return;let n=t/20;return Math.max(-Fx,Math.min(Fx,n))}function Lx(e){let t=e&&De(e,"tblpPr");if(!t)return;let n=dt(t,"tblpXSpec"),r=n==="left"||n==="center"||n==="right"||n==="inside"||n==="outside"?n:void 0,o=dt(t,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:Ox(dt(t,"horzAnchor"))??"text",vertAnchor:Ox(dt(t,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:Cx(dt(t,"tblpX"))??0,...a?{ySpec:a}:{},yPt:Cx(dt(t,"tblpY"))??0}}function Ax(e,t,n){let r=n[e.horzAnchor],o=r.width-t,a;if(e.xSpec==="center"?a=r.left+o/2:e.xSpec==="right"||e.xSpec==="outside"?a=r.left+o:e.xSpec?a=r.left:a=r.left+e.xPt,!Number.isFinite(a))return r.left;let i=n.page.left+n.page.width;return Math.max(n.page.left,Math.min(a,i))}var aO=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function sr(e,t){let n=dt(e,t);if(n!==void 0)return n!=="0"&&n!=="false"&&n!=="off"}function iO(e){let t=e&&De(e,"tblLook");if(!t)return aO;let n=dt(t,"val"),r=n&&/^[0-9A-Fa-f]{1,4}$/.test(n)?Number.parseInt(n,16):0;return {firstRow:sr(t,"firstRow")??(r&32)!==0,lastRow:sr(t,"lastRow")??(r&64)!==0,firstColumn:sr(t,"firstColumn")??(r&128)!==0,lastColumn:sr(t,"lastColumn")??(r&256)!==0,rowBanding:sr(t,"noHBand")===void 0?(r&512)===0:!sr(t,"noHBand"),columnBanding:sr(t,"noVBand")===void 0?(r&1024)===0:!sr(t,"noVBand")}}var rp=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],Ex=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function Mx(e,t){let n=e&&De(e,"cnfStyle");if(!n)return;let r=dt(n,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<rp.length;o+=1)r[o]==="1"&&t.add(rp[o]);for(let o=0;o<Ex.length;o+=1)sr(n,Ex[o])===true&&t.add(rp[o]);}var sO=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function Bx(e){let t=new Set;Mx(e.rowProperties,t),Mx(e.cellProperties,t);let{look:n,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:s}=e,l=t.has("firstRow")||n.firstRow&&r===0,d=t.has("lastRow")||n.lastRow&&r===o-1,c=t.has("firstCol")||n.firstColumn&&a===0,u=t.has("lastCol")||n.lastColumn&&a+i>=s;if(!(t.has("band1Vert")||t.has("band2Vert"))&&n.columnBanding&&!c&&!u){let g=a-(n.firstColumn?1:0);t.add(g%2===0?"band1Vert":"band2Vert");}if(!(t.has("band1Horz")||t.has("band2Horz"))&&n.rowBanding&&!l&&!d){let g=r-(n.firstRow?1:0);t.add(g%2===0?"band1Horz":"band2Horz");}c&&t.add("firstCol"),u&&t.add("lastCol"),l&&t.add("firstRow"),d&&t.add("lastRow"),l&&c&&t.add("nwCell"),l&&u&&t.add("neCell"),d&&c&&t.add("swCell"),d&&u&&t.add("seCell");let m=[];for(let g of sO)t.has(g)&&m.push(g);return m}var lO=new WeakMap,dO=new WeakMap;function Dr(e,t,n,r,o="all-markup",a){let i=a?dO:lO,s=i.get(e);if(s&&s.contentWidthPt===t&&s.depth===n&&s.styleCascade===r&&s.displayMode===o&&s.authorFilter===a)return s.structure;let l=cO(e,t,n,r,o,a),d={contentWidthPt:t,depth:n,styleCascade:r,displayMode:o,authorFilter:a,structure:l};return i.set(e,d),l}function cO(e,t,n,r,o,a){if(n>=Cd||e.kind!=="table")return null;let i=De(e,"tblPr"),s=i&&De(i,"tblStyle")?dt(De(i,"tblStyle"),"val"):void 0,l=r?Xb(r,s):fd,d=iO(i),c=Qf,u=Uf;for(let A of l.tablePropertyNodes)c=kd(c,Td(De(A,"tblCellMar"))),u=Wf(u,vd(A));let f=kd(c,Td(i&&De(i,"tblCellMar"))),p=Wf(u,i?vd(i):Uf),m=new Map,g=Yb(l),y=A=>{if(!g)return jf;let B=A.join("|"),G=m.get(B);if(G)return G;let $=Ub(l,A);return m.size<eO&&m.set(B,$),$},h=[],b=[],R=1;for(let A of Qf$1(e.children)){if(A.kind!=="tableRow")continue;let B=np(A,"trPr"),G=B?np(B,"ins")??np(B,"del"):void 0,$=G?.localName,V=G?Od(G,"author")??"":void 0,q=G&&V!==void 0&&a?Ah(a,G.id,V,o):o;if(q==="proposed"&&$==="del"||q==="original"&&$==="ins")continue;let Y=q==="all-markup"?G:void 0,U=[],K=[],Re=[],ge=Math.min(Tx(B,"gridBefore"),wx);ge>0&&b.push({start:0,span:ge,preferred:Fo(B&&De(B,"wBefore"))});let se=ge,he=Qf$1(A.children);for(let Ee of he){if(Ee.kind!=="tableCell")continue;let te=De(Ee,"tcPr"),Fe=Math.min(se,wx),ye=Math.min(tO(te),1024-Fe),ve=Fo(te&&De(te,"tcW"));U.push(Fe),K.push(ye),Re.push(ve),b.push({start:Fe,span:ye,preferred:ve}),se=Fe+ye;}let Le=Tx(B,"gridAfter"),fe=Math.min(se+Le,1024);Le>0&&se<1024&&b.push({start:se,span:Math.min(Le,1024-se),preferred:Fo(B&&De(B,"wAfter"))}),fe>R&&(R=fe),h.push({node:A,revision:Y,cells:he,properties:B,starts:U,spans:K,preferred:Re,gridColumns:fe});}let I=cx(e),T=I.length>0?I.length:R,k=h.length,L=[];for(let A=0;A<h.length;A+=1){let B=h[A],G=B.node,$=B.properties,V=Bx({look:d,rowIndex:A,rowCount:k,gridColumn:0,gridSpan:Math.max(1,T),columnCount:Math.max(1,T),rowProperties:$,cellProperties:void 0}),q=Px(l,V,$),Y=0,U=[];for(let Le of B.cells){if(Le.kind!=="tableCell")continue;let fe=De(Le,"tcPr"),Ee=B.starts[Y],te=B.spans[Y],Fe=B.preferred[Y]??mn,ye=Bx({look:d,rowIndex:A,rowCount:k,gridColumn:Ee,gridSpan:te,columnCount:T,rowProperties:$,cellProperties:fe});Y+=1;let ve,We=qf;for(let Pn of ye){let Et=l.conditional.get(Pn);if(!Et)continue;let Ge=De(Et,"tcPr");ve=kx(Ge)??ve,We=Vf(We,Id(Ge));}let Me=kx(fe)??ve,Be=kd(f,Td(fe&&De(fe,"tcMar"))),ct=Ai(Le.children,o,a);U.push({id:Le.id,gridSpan:te,gridColumn:Ee,...I[Ee]?.id?{gridColumnId:I[Ee].id}:{},vMergeContinue:nO(fe),vAlign:Sx(fe),textDirection:gx(fe),margins:Be,borders:Vf(We,fe?Id(fe):qf),...Me===void 0?{}:{shading:Me},preferredWidth:Fe,styleFormatting:y(ye),blocks:ct});}let K=B.revision,Re=K?K.localName==="ins"?"insert":"delete":void 0,ge=K&&Od(K,"id"),se=K&&Od(K,"author"),he=K&&Od(K,"date");L.push({id:G.id,...Re?{revisionKind:Re}:{},...ge!==void 0?{revisionId:ge}:{},...se!==void 0?{revisionAuthor:se}:{},...he!==void 0?{revisionDate:he}:{},isHeader:q,cantSplit:rO($,"cantSplit"),height:oO($),cells:U});}let P=mn,x,v,w,F,M;for(let A of l.tablePropertyNodes){let B=De(A,"tblW");B&&(P=Fo(B));let G=De(A,"tblLayout");G&&(x=dt(G,"type")==="fixed"),v=Ui(De(A,"tblInd"),vx)??v,w=Ix(A)??w,F=Ui(De(A,"tblCellSpacing"),qi)??F,M=Lx(A)??M;}let S=i&&De(i,"tblW"),H=S?Fo(S):P,j=i&&De(i,"tblLayout"),_=j?dt(j,"type")==="fixed":x??false,C=Ui(i&&De(i,"tblInd"),vx)??v??0,D=Ix(i)??w??"left",z=n===0?Lx(i)??M:void 0,N=Ui(i&&De(i,"tblCellSpacing"),qi)??F??0;return {columnWidthsPt:ux({gridCols:I,claims:b,columnCount:T,contentWidthPt:t,tableWidth:H,layoutFixed:_}),rows:L,tableWidth:H,layoutFixed:_,indentPt:C,alignment:D,...z?{float:z}:{},cellSpacingPt:N,tableBorders:p,defaultMargins:f}}var Dx=new WeakMap;function uO(e){let t=Dx.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.anchorId)??[];o.push(r),n.set(r.anchorId,o);}return Dx.set(e,n),n}function _x(e,t,n,r,o){let a=[],i;for(let s=e.length-1;s>=0;s-=1){let l=e[s];if(l.kind==="paragraph"&&!l.props.some(c=>c.localName==="framePr")){i=l.paragraph.id;continue}if(l.kind!=="table")continue;let d=Dr(l.table,t,0,n,r,o)?.float;!d||d.vertAnchor==="text"||d.ySpec==="inline"||i&&a.push({table:l.table,sourceIndex:s,anchorId:i});}return a.reverse()}function fO(e,t){let n=e??[];return n.length===t.length&&n.every((r,o)=>r===t[o])}function pO(e,t){let n=e??[];return n.length===t.length&&n.every((r,o)=>r.anchorId===t[o].anchorId&&r.column===t[o].column&&r.fragmentIndex===t[o].fragmentIndex)}function Hx(e,t){let n=new Map,r=new Map,o=new Set;for(let i of e){let s=JSON.stringify([i.table.id,t[i.sourceIndex]]);n.set(i.table.id,s),r.set(s,i.table.id),o.add(i.anchorId);}let a=i=>[...i].flatMap(s=>{let l=n.get(s);return l?[l]:[]});return {note(i,s,l,d){o.has(s)&&i.push({anchorId:s,column:l,fragmentIndex:d});},checkpoint(i,s){return {pendingPositionedTableTokens:a(i),positionedTableAnchorSignals:[...s]}},restore(i,s,l){s.clear();for(let d of i.pendingPositionedTableTokens??[]){let c=r.get(d);c&&s.add(c);}l.splice(0,l.length,...i.positionedTableAnchorSignals??[]);},same(i,s,l,d){return fO(i,a(l))&&pO(s,d)}}}function jx(e,t,n,r,o){let a=uO(e),i=0;for(let s of r){let l=a.get(s.anchorId);if(!l)continue;let d=s.fragmentIndex+i,c=n.length;for(let f of l)t.has(f.table.id)&&(o(f.table,s.column),t.delete(f.table.id));let u=n.splice(c);n.splice(d,0,...u),i+=u.length;}r.length=0;}function gn(e){return e.kind==="table"&&e.outOfFlow===true}function zx(e,t,n){return {text:{top:t,height:Math.max(0,e.contentHeight-t)},margin:{top:n-e.contentInsetTop,height:Math.max(0,e.pageHeight-n-e.marginBottom)},page:{top:-e.contentInsetTop,height:e.pageHeight}}}function Gx(e,t){for(let n=t;n<e.length;n+=1){let r=e[n];if(!gn(r))return true}return false}function op(e,t,n){let r=n[e.vertAnchor],o=r.height-t,a;if(e.ySpec==="center"?a=r.top+o/2:e.ySpec==="bottom"||e.ySpec==="outside"?a=r.top+o:e.ySpec?a=r.top:a=r.top+e.yPt,!Number.isFinite(a))return r.top;let i=n.page.top+n.page.height;return Math.max(n.page.top,Math.min(a,i))}var ja="0";function _r(e,t){return e!=="PAGE"||!t||t==="decimal"}function Ld(e,t,n){return t===void 0||!_r(e,n)?ja:Nl(0,t)??ja}function Ga(e,t){if(!Number.isFinite(e)||e<0)return "";let n=Math.floor(e),r=t&&t.length>0?t:"decimal";if(r==="none"||r==="bullet")return kr(n);let o=un(r,n);return o.length>0?o:kr(n)}function lr(e,t,n){if(e==="PAGE"){if(n!==void 0&&_r(e,t.format)){let o=Nl(t.pageNumber,n);if(o!==null)return o}return Ga(t.pageNumber,t.format)}let r=e==="NUMPAGES"?t.pageCount:t.sectionPageCount??t.pageCount;if(!Number.isFinite(r)||r<0)return "";if(n!==void 0){let o=Nl(r,n);if(o!==null)return o}return kr(Math.floor(r))}function Hr(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function sp(e,t=Yu){if(!e||!Hr(t))return "";let n=[];return t.hasPage&&(n.push(`p${e.pageNumber}`),e.format&&n.push(`f${e.format}`)),t.hasNumPages&&n.push(`n${e.pageCount}`),t.hasSectionPages&&n.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${n.join("/")}`}function Wa(e,t,n,r){let o=false,a=e.map((i,s)=>{let l=t+s,d=i.pageFieldSource;return d&&d.pageNumber===l&&d.sectionPageCount===n&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:l,sectionPageCount:n,...r?{format:r}:{}}})});return o?a:e}function gO(e){for(let t of e.spans)if(t.fieldAtom?.pageField||t.fieldAtom?.pageRef)return true;return false}function Vx(e){if(e.kind==="paragraph"){for(let t of e.lines)if(gO(t))return true;return false}for(let t of e.rows)for(let n of t.cells)for(let r of n.blocks)if(Vx(r))return true;return false}function lp(e,t){let n=t,r=false;for(let o of e)gn(o)||(n=Math.max(n,o.box.y+o.box.height)),!r&&Vx(o)&&(r=true);return {usedBottom:n,hasBodyPageFields:r}}var ap=new WeakMap;function dp(e,t,n,r){let o=ap.get(e);if(o)return t.length>0&&n!==t&&o.revision===r?(ap.delete(e),false):true;let a=t.length===0||t===n;return a&&Number.isFinite(r)&&ap.set(e,{revision:r}),a}function Kx(e,t){if(e.kind==="paragraph"){for(let n of e.lines)for(let r of n.spans){let o=r.fieldAtom?.pageRef?.targetParagraphId;o!==void 0&&t.add(o);}return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)Kx(o,t);}function $x(e,t,n,r){if(e.kind==="paragraph"){t.has(e.paragraphId)&&!r.has(e.paragraphId)&&r.set(e.paragraphId,n);return}for(let o of e.rows)for(let a of o.cells)for(let i of a.blocks)$x(i,t,n,r);}var Wx=new WeakMap;function Ed(e){let t=Wx.get(e);if(t!==void 0)return t;let n=yO(e);return Wx.set(e,n),n}function yO(e){let t=null;for(let o of e)if(o.hasBodyPageFields!==false)for(let a of o.fragments)Kx(a,t??=new Set);if(!t||t.size===0)return null;let n=new Map;for(let o of e){if(n.size>=t.size)break;let a=o.pageFieldSource,i={pageNumber:a?.pageNumber??o.index+1,...a?.format?{format:a.format}:{}};for(let s of o.fragments)$x(s,t,i,n);}let r="";for(let[o,a]of n)r+=`${o}@${a.pageNumber}/${a.format??""};`;return {hosts:n,token:r}}function cp(e){return Ed(e)?.token??""}function hO(e,t,n){let r=null;for(let o=0;o<e.spans.length;o+=1){let a=e.spans[o],i=a.fieldAtom?.pageRef;if(i){let d=n?.hosts.get(i.targetParagraphId);if(!d)continue;let c=Ga(d.pageNumber,d.format);if(c.length===0)continue;let f=dp(i.calibration,i.cached,c,n.revision)?c:i.cached;if(f.length===0||f===a.text)continue;r||(r=e.spans.slice()),r[o]={...a,text:f};continue}let s=a.fieldAtom?.pageField;if(!s)continue;let l=lr(s.kind,t,s.picture);l!==a.text&&(r||(r=e.spans.slice()),r[o]={...a,text:l});}return r?{...e,spans:r}:e}function Xx(e,t,n){let r=null;for(let o=0;o<e.length;o+=1){let a=e[o],i=a;if(a.kind==="paragraph"){let s=null;for(let l=0;l<a.lines.length;l+=1){let d=a.lines[l],c=hO(d,t,n);c!==d&&(s||(s=a.lines.slice()),s[l]=c);}s&&(i={...a,lines:s});}else {let s=null;for(let l=0;l<a.rows.length;l+=1){let d=a.rows[l],c=null;for(let u=0;u<d.cells.length;u+=1){let f=d.cells[u],p=Xx(f.blocks,t,n);p!==f.blocks&&(c||(c=d.cells.slice()),c[u]={...f,blocks:p});}c&&(s||(s=a.rows.slice()),s[l]={...d,cells:c});}s&&(i={...a,rows:s});}i!==a&&(r||(r=e.slice()),r[o]=i);}return r??e}var za=new WeakMap;function P_(e){for(let t of Array.isArray(e.pages)?e.pages:[])t.header&&za.delete(t.header),t.footer&&za.delete(t.footer);}function bO(e,t){return e.pageNumber===t.pageNumber&&e.pageCount===t.pageCount&&(e.sectionPageCount??e.pageCount)===(t.sectionPageCount??t.pageCount)&&e.format===t.format}function up(e,t,n){let r=za.get(e);r&&za.set(t,{context:r.context,projector:r.projector,dy:r.dy+n});}var ip=new WeakMap;function jr(e){let t=e.pages.length;if(t===0)return e;let n=Ed(e.pages),r=n?.token??"",o=false,a=e.pages.map(i=>{let s=ip.get(i);if(s&&s.pageCount===t&&s.pageRefToken===r)return s.result!==i&&(o=true),s.result;let l=i.pageFieldSource,d={pageNumber:l?.pageNumber??i.index+1,pageCount:t,sectionPageCount:l?.sectionPageCount??t,...l?.format?{format:l.format}:{}},c=g=>{if(!g)return g;let y=g.pageFieldProjector,h=0;if(!y){let L=za.get(g);if(!L||bO(L.context,d))return g;y=L.projector,h=L.dy;}o=true;let b=y(d),{pageFieldProjector:R,box:I,...T}=b,k={...T,box:h===0?I:{...I,y:I.y+h}};return za.set(k,{context:d,projector:y,dy:h}),k},u=c(i.header),f=c(i.footer),p=i.hasBodyPageFields===false?i.fragments:Xx(i.fragments,d,n?{hosts:n.hosts,revision:e.revision}:void 0);if(u===i.header&&f===i.footer&&p===i.fragments)return ip.set(i,{pageCount:t,pageRefToken:r,result:i}),i;p!==i.fragments&&(o=true);let m={...i,...u!==void 0?{header:u}:{},...f!==void 0?{footer:f}:{},...p!==i.fragments?{fragments:p}:{}};return ip.set(i,{pageCount:t,pageRefToken:r,result:m}),m});return o?{...e,pages:a}:e}var xO=`
|
|
10
|
+
\r`,SO=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function Yx(e,t){let n=t;for(;n<e.length&&xO.includes(e[n]);)n+=1;return n}function Ux(e,t){if(e[t]==='"'){let r=t+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let n=t;for(;n<e.length&&!`
|
|
11
|
+
\r"`.includes(e[n]);)n+=1;return n}function Md(e){if(e.length===0||e.length>256)return null;let t=Yx(e,0);if(e[t]==='"')return null;let n=Ux(e,t),r=e.slice(t,n).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=Yx(e,n);if(o>=e.length)return null;let a=Ux(e,o),i=e.slice(a).trim();for(;;){let s=i.replace(SO,"").trimEnd();if(s===i)break;i=s;}if(i[0]==='"'){let s=i.indexOf('"',1);s===-1?i=i.slice(1):s===i.length-1&&(i=i.slice(1,-1));}return i.length===0?null:{display:i}}var qx=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),RO=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function PO(e){let t=e;for(;;){let n=t.replace(RO,"").trimEnd();if(n===t)return t;t=n;}}function wO(e){let t=e.trimStart();if(t.length===0)return null;if(t[0]==='"'){let o=t.indexOf('"',1),a=o===-1?t.slice(1):t.slice(1,o);return a.length>0?a:null}let n=t.search(/\s/),r=n===-1?t:t.slice(0,n);return r.length>0?r:null}function Bd(e){let t=mo(e);if(t===null||t.length===0)return null;let n=PO(t),r=qx[n];if(r)return {property:r};if(!n.startsWith("DOCPROPERTY"))return null;let o=n.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=wO(o);if(a===null)return null;let i=qx[a];return i?{property:i}:null}function Nd(e,t){if(!t)return null;let n=t[e.property];return n!==void 0&&n.length>0?n:null}var vO=$c,IO=2048,FO=256;function TO(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
|
|
12
|
+
`||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
|
|
13
|
+
\r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}var kO=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function Ad(e){if(e.length===0||e.length>vO)return null;let t=TO(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,s=null,l=false;for(let d=1;d<t.length;d+=1){let c=t[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!kO.has(u))continue;let f=t[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let p=f.value.length>0&&f.value.length<=FO;u==="\\l"?i||(i=true,p&&(a=f.value)):u==="\\o"&&(l||(l=true,p&&(s=f.value)));continue}o||(o=true,c.value.length>0&&c.value.length<=IO&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:s}}function OO(e){let t=e.toUpperCase(),n=e[0]===e[0]?.toUpperCase();switch(t){case "ARABIC":return "decimal";case "ALPHABETIC":return n?"upperLetter":"lowerLetter";case "ROMAN":return n?"upperRoman":"lowerRoman";case "ORDINAL":return "ordinal";case "CARDTEXT":return "cardinalText";case "ORDTEXT":return "ordinalText";case "HEX":return "hex";default:return null}}function zr(e){if(mo(e)===null)return null;let n=e.replace(/\s+/g," ").trim().split(" "),r=n[0]?.toUpperCase();if(r!=="AUTONUM"&&r!=="AUTONUMLGL"&&r!=="AUTONUMOUT")return null;let o=null,a=false;for(let i=1;i<n.length;i+=1){let l=n[i].toUpperCase();if(l==="\\E"){a=true;continue}if(l==="\\*"){let d=n[i+1];if(d===void 0)return null;if(i+=1,d.toUpperCase()==="MERGEFORMAT")continue;if(o=OO(d),o===null)return null;continue}return null}return {kind:r,numFmt:o,suppressPeriod:a}}function Zx(e,t){let n=un(e.numFmt??"decimal",t);return n.length===0?"":e.suppressPeriod?n:`${n}.`}var To=1024;function Qi(e,t){for(let n of e.attributes)if(n.namespaceUri===ca$1&&n.localName===t)return n.value}function fp(e){return e.kind==="drawing"||e.localName==="drawing"||e.localName==="pict"}function Qx(e,t){let n="",r=(o,a)=>{if(!(o.kind==="textValue"||n.length>=To)&&!(t.exhausted||a>Ot)&&et(t)){if(o.kind==="text"){for(let i of o.children)i.kind==="textValue"&&(n+=i.value.slice(0,To-n.length));return}for(let i of o.children)r(i,a+1);}};for(let o of e.children)r(o,1);return n}var Jx=new WeakMap;function eS(e,t){let n=Jx.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,s="",l=Qn(),d=u=>{let f=To-s.length;if(f<=0){a=true;return}s+=u.length>f?u.slice(0,f):u;},c=(u,f)=>{if(!(a||u.kind==="textValue")&&!(l.exhausted||f>Ot)){if(u.kind==="bookmarkStart"){!o&&Qi(u,"name")===t&&(o=true,i=Qi(u,"id"));return}if(u.kind==="bookmarkEnd"){o&&i!==void 0&&Qi(u,"id")===i&&(a=true);return}if(u.kind==="run"){if(!o)return;for(let p of u.children){if(a||!et(l))return;if(p.kind==="text")for(let m of p.children)m.kind==="textValue"&&d(m.value);else p.kind==="tab"&&d(" ");}return}if(!(fp(u)||Rc$1(u))&&et(l))for(let p of u.children)c(p,f+1);}};for(let u of e.children){if(a||!et(l))break;c(u,1);}return n||(n=new Map,Jx.set(e,n)),n.set(t,s),s}var pp=256,CO=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:false}),LO=Object.freeze({suppressNonDelimiterText:true,noteRef:false,pageRef:false}),EO=Object.freeze({suppressNonDelimiterText:false,noteRef:true,pageRef:false}),MO=Object.freeze({suppressNonDelimiterText:false,noteRef:false,pageRef:true}),Dd=new WeakMap;function yn(e){return Dd.get(e)??CO}function BO(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "){n+=1;continue}if(r==='"'){let a=e.indexOf('"',n+1);if(a===-1)return null;t.push(e.slice(n+1,a)),n=a+1;continue}let o=n;for(;o<e.length&&e[o]!==" ";)o+=1;t.push(e.slice(n,o)),n=o;}return t}function hn(e){if(e.length>$c)return null;let t=e.replace(/\s+/g," ").trim();if(t.length>$c)return null;let n=BO(t);if(n===null||n.length<2)return null;let r=n[0].toUpperCase();if(r!=="REF"&&r!=="NOTEREF"&&r!=="PAGEREF")return null;let o=n[1];if(o.length===0||o.length>pp||o.startsWith("\\"))return null;if(r==="NOTEREF")return NO(n,o);if(r==="PAGEREF")return AO(n,o);let a=false,i=false,s=false,l=false,d=false;for(let f=2;f<n.length;f+=1){let p=n[f].toUpperCase();if(p==="\\R")i=true;else if(p==="\\W")s=true;else if(p==="\\N")a=true;else if(p==="\\T")l=true;else if(p==="\\H")d=true;else if(p==="\\*"&&n[f+1]?.toUpperCase()==="MERGEFORMAT")f+=1;else {if(p==="\\*MERGEFORMAT")continue;return null}}let u={bookmark:o,numberSwitch:a?"n":i?"r":s?"w":null,hyperlink:d};return l&&Dd.set(u,LO),u}function NO(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Dd.set(r,EO),r}function AO(e,t){let n=false;for(let o=2;o<e.length;o+=1){let a=e[o].toUpperCase();if(a==="\\H")n=true;else if(a==="\\*"&&e[o+1]?.toUpperCase()==="MERGEFORMAT")o+=1;else {if(a==="\\*MERGEFORMAT")continue;return null}}let r={bookmark:t,numberSwitch:null,hyperlink:n};return Dd.set(r,MO),r}function DO(e){let t=Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:n>r?1:0).map(([n,r])=>`${n}=${r}`).join("\0,");return `${e.localName}(\0${t}\0)`}function _O(e){return e.map(DO).join("\0;")}var HO=1<<18,jO=new TextEncoder;function gp(e){return a(jO.encode(e))}var zO=2048,tS=2*1024*1024,ko=new Map,mp=0;function es(e){let t=ko.get(e);if(t)return ko.delete(e),ko.set(e,t),t.digest;let n=gp(e),r=e.length*2;if(r<=tS)for(ko.set(e,{digest:n,bytes:r}),mp+=r;ko.size>zO||mp>tS;){let o=ko.entries().next();if(o.done)break;ko.delete(o.value[0]),mp-=o.value[1].bytes;}return n}function ts(e,t){return `${e}|${t?"drawing":""}`}function me(e){let t="";for(let n of e)t+=`${n.length}:${n}`;return t}var nS=new WeakMap;function oS(e,t){if(!t||t.size===0)return "";let n=nS.get(e),r=n?.get(t);if(r!==void 0)return r;let o=Oo(e,a=>t.get(a.id)?.cacheToken??"");return o.length<=HO&&(n||(n=new WeakMap,nS.set(e,n)),n.set(t,o)),o}function Oo(e,t){let n=[],r=false,o=[e];for(;o.length>0;){let a=o.pop();if(a.kind==="paragraph"){let i=t(a);i&&(r=true),n.push(i);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return r?me(n):""}function yp(e){return e?{nodeDigests:new WeakMap,paragraphKeys:new WeakMap}:{nodeDigests:new Map,paragraphKeys:new Map}}var aS=yp(true);function iS(e,t){if(e.kind==="textValue")return gp(hp(e));let n=t.nodeDigests.get(e);if(n!==void 0)return n;let r=gp(hp(e,t));return t.nodeDigests.set(e,r),r}function hp(e,t=aS){if(e.kind==="textValue")return me(["text",e.value]);let n=[];for(let o of e.attributes)n.push(me([o.namespaceUri??"",o.localName,o.value]));n.sort();let r=[];for(let o of e.children)r.push(o.kind==="textValue"?hp(o):me(["child-digest",iS(o,t)]));return me(["element",e.kind,e.localName,e.id,me(n),me(r)])}var GO=8;function ns(e){return sS(e,aS)}function sS(e,t){let n=Math.round(e.width*1e3),r=e.drawingToken??"",o=e.projectionToken??"",a=e.exclusionToken??"",i=es(_O(e.properties)),s=iS(e.paragraph,t),l=es(e.producer),d=es(r),c=es(o),u=es(a),f=t.paragraphKeys.get(e.paragraph),p=f?.entries.findIndex(y=>y.producerIdentity===l&&y.width===n&&y.drawingIdentity===d&&y.projectionIdentity===c&&y.exclusionIdentity===u&&y.propertiesToken===i);if(f&&p!==void 0&&p>=0){let[y]=f.entries.splice(p,1);return f.entries.push(y),y.key}let m=`plk:${s}:${l}:${n}:${d}:${c}:${u}:${i}`;f||(f={entries:[]},t.paragraphKeys.set(e.paragraph,f));let g=f.entries.find(y=>y.propertiesToken===i)?.propertiesToken??i;return f.entries.push({producerIdentity:l,width:n,drawingIdentity:d,projectionIdentity:c,exclusionIdentity:u,propertiesToken:g,key:m}),f.entries.length>GO&&f.entries.shift(),m}var lS=new WeakMap;function bp(e,t){lS.set(e,t);}function dS(e,t,n,r){if(!e)return;let o=t??new Set;for(let a of n)o.add(a);for(let a of r){let i=lS.get(a);if(i)for(let s of i)o.add(s);}t||e.retain(o);}var WO=8,VO=8;function KO(e={}){let t=Math.max(1,e.maxEntries??4096),n=e.retainAcrossPasses??true,r=t*8,o=new Map,a=yp(n),i=0,s=0,l=0,d=0,c=0;return {retainAcrossPasses:n,keyFor(u){return sS(u,a)},get(u){let f=o.get(u);if(f===void 0){d+=1;return}return l+=1,o.delete(u),f.generation=i,o.set(u,f),f.value},set(u,f){for(o.has(u)&&o.delete(u),o.set(u,{value:f,generation:i});o.size>t;){let p=o.entries().next();if(p.done||p.value[1].generation>=i&&o.size<=r)break;o.delete(p.value[0]),c+=1;}},release(u){n||o.delete(u);},retentionPassDue(){return s+=1,s%WO===0},retain(u){i+=1;for(let f of u){let p=o.get(f);p&&(p.generation=i);}for(let[f,p]of o)i-p.generation>VO&&(o.delete(f),c+=1);},clear(){o.clear(),a=yp(n);},get stats(){return {hits:l,misses:d,evictions:c,size:o.size}}}}function $O(e,t){let n=e.nums.get(t),r=[];for(let o=0;o<=8;o+=1){let a=Co(e,t,o);if(!a){r.push(1);continue}let i=n?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function XO(e,t,n){let r=[];for(let o=0;o<=8;o+=1){let a=Co(e,t,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...n]}}function cS(e,t){return t?e.map(n=>n==="bullet"||n==="none"?n:"decimal"):e}function YO(e,t){if(t===0)return null;if(t===void 0)return e-1;let n=t-1;return n>=e?null:n}function xp(e){let t=new Map,n=new Map,r=new Map,o=a=>{let i=t.get(a);i||(i=[0,0,0,0,0,0,0,0,0],t.set(a,i));let s=n.get(a);s||(s=[false,false,false,false,false,false,false,false,false],n.set(a,s));let l=r.get(a);return l||(l=$O(e,a),r.set(a,l)),{counters:i,initialized:s,starts:l}};return {advance(a,i){if(i<0||i>8||a.length===0||a.length>64)return null;let s=Co(e,a,i);if(!s)return null;let{abstractNumId:l,level:d}=s,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=XO(e,a,f);for(let T=i+1;T<=8;T+=1){let k=Co(e,a,T);if(!k)continue;let L=YO(T,k.level.lvlRestart);L!==null&&i<=L&&(u[T]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),y=u.slice(),h=g.map((T,k)=>y[k]?T:f[k]??1),b=cS(p,d.isLgl),R=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:_l(d.lvlText,h,b),I={abstractNumId:l,numId:a,ilvl:i,level:d,counters:g,markerText:R};return uS.set(I,h),I}}}var uS=new WeakMap;function fS(e){return uS.get(e)??e.counters}var UO=/[\p{L}\s]/u;function qO(e){let t="";for(let n=0;n<e.length;n+=1){let r=e[n],o=e[n+1];if(r==="%"&&o!==void 0&&o>="1"&&o<="9"){t+=r+o,n+=1;continue}UO.test(r)||(t+=r);}return t}function pS(e,t=false,n=false){let{index:r,numId:o,ilvl:a,expandCounters:i}=e;if(a<0||a>8)return null;let s=[],l=[];for(let p=0;p<=8;p+=1){let m=Co(r,o,p);s.push(p<=a?m?.level??null:null),l.push(m?.level.numFmt??"decimal");}let d=p=>p!==null&&p.numFmt!=="bullet"&&p.numFmt!=="none"&&p.lvlText.length>0;if(!d(s[a]??null))return null;let c=[],u=[];for(let p=a;p>=0&&!(t&&p!==a);p-=1){let m=s[p];d(m)&&(p!==a&&u.some(g=>g.includes(`%${p+1}`))||(c.push(p),u.push(m.lvlText)));}c.reverse();let f="";for(let p of c){let m=s[p],g=n?qO(m.lvlText):m.lvlText;f+=_l(g,i,cS(l,m.isLgl));}return f.length>0?f:null}var ZO=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),mS=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),gS=new Map([[167,"\u25AA"],[183,"\u2022"]]),yS=new Map([["symbol",ZO],["wingdings",mS],["wingdings 2",gS],["wingdings 3",gS],["webdings",mS]]),JO=64;function rs(e){return !e||e.length>JO?false:yS.has(e.toLowerCase())}function Va(e,t,n){if(e.length===0||!rs(t))return e;let r=yS.get(t.toLowerCase());if(n?.(t)===true)return e;let o="",a=false;for(let i of e){let s=i.codePointAt(0);if(s>=61440&&s<=61695){let l=r.get(s-61440);if(l!==void 0){o+=l,a=true;continue}}o+=i;}return a?o:e}var Pp=new WeakMap;function e1(e,t){let n=t.dependencyKeys.size===0||[...t.dependencyKeys].every(r=>r===g.story);Pp.set(e,{preservesNumberedSequence:t.impact==="text-local"&&!t.structural&&t.created.size===0&&t.deleted.size===0&&n});}function eC(e){let t=Pp.get(e);return Pp.delete(e),t}function tC(e){return [e.fontFamily??"",e.fontSizePt,e.bold?1:0,e.italic?1:0,e.characterSpacingPt,e.horizontalScalePercent,e.verticalAlign,e.hidden?1:0,e.kerningMinPt,e.caps?1:0,e.smallCaps?1:0].join(",")}var IS=new WeakMap;function FS(e){return IS.get(e)}function wp(e){return e.kind!=="textValue"}function hS(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function _d(e,t){for(let n of e.children)if(wp(n)&&n.localName===t)return n}function TS(e){if(!wp(e))return null;let t=_d(e,"numPr");if(!t)return null;let n=_d(t,"numId"),r=_d(t,"ilvl"),o;if(n){let i=hS(n,"val");o=i!==void 0&&i!=="0"&&i.length<=64?i:null;}let a;if(r){let i=hS(r,"val"),s=/^\d{1,2}$/.test(i??"")?Number(i):0;a=s<=8?s:null;}return {numId:o,ilvl:a}}function kS(e){let t=null,n=0;for(let r of e){let o=TS(r);o&&(o.numId!==void 0&&(t=o.numId),o.ilvl!==void 0&&(o.ilvl===null?t=null:n=o.ilvl));}return t===null?null:{numId:t,ilvl:n}}function nC(e,t){let n=new Set,r=e.styles.get(t);for(let o=0;r!==void 0&&o<pd;o+=1){if(n.has(r.styleId))return;n.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?TS(a):null;if(i&&i.numId!==void 0)return i.numId??void 0;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var Sp=new WeakMap;function os(e,t){if(!t)return e;let n=Sp.get(e);if(n&&n.styleCascade===t)return n.linked;let r=NS(e,a=>nC(t,a)),o={styleCascade:t,linked:r};return Sp.set(e,o),Sp.set(r,o),r}function bS(e){return Number.isFinite(e)?e>bn?bn:e<-bn?-bn:e:0}function xS(e){let t=null;for(let n of e){if(n.localName!=="ind")continue;let r=n.attributes?.hanging,o=n.attributes?.firstLine;r===void 0&&o===void 0||(t={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?bS(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?bS(Number(o)/20):0});}return t}function SS(e){return e.some(t=>t.localName==="ind"&&(t.attributes?.left!==void 0||t.attributes?.start!==void 0))}function RS(e){return e.some(t=>t.localName==="ind"&&(t.attributes?.right!==void 0||t.attributes?.end!==void 0))}function OS(e,t,n=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=Xi(t),a=Xi(n),i={hanging:e.hanging,firstLine:e.firstLine},s=SS(n)?a.left:r.left?e.left:SS(t)?o.left:e.left,l=RS(n)?a.right:r.right?e.right:RS(t)?o.right:e.right,d=xS(n)??(r.firstLineOffset?i:xS(t)??i);return {left:s,right:l,...d}}function xn(e,t=8){let n=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){n.push(i);continue}if(!(i.kind!=="table"||a>=t)){for(let s of Qf$1(i.children))if(s.kind==="tableRow")for(let l of Qf$1(s.children)){if(l.kind!=="tableCell")continue;let d=sc$1(l.children);r(d,a+1);}}}};return r(e,0),n}var PS=new WeakMap;function CS(e,t){let n=PS.get(e);if(n&&n.styleCascade===t)return n;let r=e.children.find(l=>l.kind==="paragraphProperties"),o=t?Aa(t,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&wp(r)?_d(r,"rPr"):void 0,s={styleCascade:t,numPr:kS(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:Lt(r),inheritedMarkProps:o?o.markRunProperties:Lt(i),perLevel:new WeakMap};return PS.set(e,s),s}function Hd(e,t,n,r){let o=new Map;if(t.nums.size===0)return o;let a=os(t,n),i=xp(a);for(let s of xn(e)){let l=CS(s,n),d=l.numPr;if(!d)continue;let c=i.advance(d.numId,d.ilvl);if(!c)continue;let u=l.perLevel.get(c.level);if(!u){let h=OS(c.level.indent,l.inheritedParagraphProperties,l.directProps),b=ir(l.inheritedMarkProps,c.level.runProperties,n);u={indent:h,markerStyle:He(b,n?.themeFonts)},l.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=Va(c.markerText,p.fontFamily,r),g=me([c.numId,c.ilvl,c.level.numFmt,c.level.lvlText,f.left,f.right,f.hanging,f.firstLine,c.level.lvlJc,c.level.suff,c.level.vanish?1:0,m,tC(p)].map(String)),y={numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:m,...c.level.numFmt==="bullet"?{}:{ordinal:c.counters[c.ilvl]??1},markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:p,cacheToken:g};IS.set(y,{index:a,numId:c.numId,ilvl:c.ilvl,expandCounters:fS(c)}),o.set(s.id,y);}return o}var LS=new WeakMap,ES=new WeakMap;function wS(e,t,n){let r=n?ES.get(n):LS.get(t);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function rC(e,t,n){t?ES.set(t,n):LS.set(e,n);}function MS(e,t,n){if(e.listItems===void 0){let i=wS(e,t,n);if(i&&n===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?wS(e,t,n):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:os(e.numberingIndex??vp,e.styleCascade),a=e.listItems??(o.nums.size>0?sC(t,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,n):void 0);return e.listItems===void 0&&rC(t,n,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function dr(e,t){return MS(e,t,void 0)}function BS(e,t,n){return MS(e,t,n)}var vS=new WeakMap,oC=Object.freeze([]);function aC(e,t){let n=vS.get(e);if(n&&n.styleCascade===t)return n.numbered;let r=xn([e]).filter(a=>CS(a,t).numPr!==null),o=r.length>0?r:oC;return vS.set(e,{styleCascade:t,numbered:o}),o}var Ka=new WeakMap,Rp=new WeakMap;function iC(e,t){return e.length===t.length&&e.every((n,r)=>{let o=t[r];if(!o||n.id!==o.id)return false;let a=n.children.find(s=>s.kind==="paragraphProperties"),i=o.children.find(s=>s.kind==="paragraphProperties");return a===i})}function sC(e,t,n,r,o,a){let i=e[0],s=e[e.length-1],l=a?Rp.get(a):(i?Ka.get(i):void 0)??(s?Ka.get(s):void 0);if((a?eC(a):void 0)?.preservesNumberedSequence&&l&&l.rawIndex===t&&l.styleCascade===r&&l.isFontAvailable===o)return l.listItems;let c=new Array(e.length),u=l!==void 0&&l.rawIndex===t&&l.styleCascade===r&&l.isFontAvailable===o&&l.blocks.length===e.length;for(let m=0;m<e.length;m+=1){let g=e[m],y=l&&l.blocks[m]===g?l.numberedByBlock[m]:aC(g,r);c[m]=y,u&&!iC(y,l.numberedByBlock[m])&&(u=false);}if(l&&u){let m={...l,blocks:e,numberedByBlock:c};return a?Rp.set(a,m):(i&&Ka.set(i,m),s&&s!==i&&Ka.set(s,m)),l.listItems}let f=Hd(e,n,r,o),p={rawIndex:t,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?Rp.set(a,p):(i&&Ka.set(i,p),s&&s!==i&&Ka.set(s,p)),f}function jd(e,t,n,r){if((!e.markerText||e.indent.hanging<=0&&t<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=a>0?0:Math.max(0,e.indent.firstLine),s=Math.min(0,o),l=i>0?o+i:Math.max(s,o-a),d=Math.max(a,t),c=l;return e.markerAlign==="right"?c=i>0?l+d-t:o-t:e.markerAlign==="center"&&(c=l+(d-t)/2),c<s&&(c=s),{x:c,y:n,width:Math.max(t,0),height:r}}function lC(e,t,n=xa,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=t.measure(e.markerText,e.markerStyle),a=jd(e,o,0,0);if(!a)return 0;let i=e.indent.left,s=a.x+a.width;return e.suffix==="nothing"?s-i:e.suffix==="space"?s+t.measure(" ",e.markerStyle)-i:s<=i?0:Sa(n,s,r).positionPt-i}function zd(e,t,n,r,o){return e?lC(e,n,r,o===void 0?void 0:t.left+o):t.hanging>0?-t.hanging:t.firstLine}function dC(e,t,n){return Lo(e,t,()=>n)}function Lo(e,t,n){let r=[],o=null,a=-1,i=-1;for(let s of t){let l=n(s.sectionIndex);if(s.customMarkFollows){r.push({noteId:s.noteId,mark:null});continue}o===null?(o=l.numStart,a=s.sectionIndex,i=s.pageIndex??-1):l.numRestart==="eachSect"&&s.sectionIndex!==a?(o=l.numStart,a=s.sectionIndex):l.numRestart==="eachPage"&&s.pageIndex!==void 0&&s.pageIndex!==i?(o=l.numStart,i=s.pageIndex):l.numRestart==="eachSect"?a=s.sectionIndex:l.numRestart==="eachPage"&&s.pageIndex!==void 0&&(i=s.pageIndex);let d=o;o+=1,r.push({noteId:s.noteId,mark:un(l.numFmt,d),displayNumber:d});}return r}function AS(e){let t=new Map;for(let n of e)t.set(n.noteId,n.mark);return t}var Gd=4096,nn=Object.freeze({pageSize:Object.freeze({widthTwips:12240,heightTwips:15840}),margins:Object.freeze({topTwips:1440,rightTwips:1440,bottomTwips:1440,leftTwips:1440,headerTwips:720,footerTwips:720,gutterTwips:0}),columns:Object.freeze({count:1,gapTwips:720,equalWidth:true,separator:false,definitions:Object.freeze([])}),landscape:false,titlePage:false,breakType:"nextPage"});function Ip(e,t,n=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<=0||r>n?t:r}function Eo(e,t){if(e===void 0||!/^-?\d{1,7}$/.test(e))return t;let n=Number(e);return !Number.isFinite(n)||Math.abs(n)>31680?t:n}function zS(e,t,n=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return t;let r=Number(e);return !Number.isFinite(r)||r<0||r>n?t:r}var nt=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes??[])if(n.localName===t)return n.value}},Mo=(e,t)=>{if(e.kind!=="textValue"){for(let n of e.children??[])if(n.kind!=="textValue"&&"localName"in n&&n.localName===t)return n}};function DS(e,t,n){let r=nt(e,t);return r===void 0?n:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:n}function cC(e){if(!e)return 1;let t=nt(e,"num");return !t||!/^\d{1,7}$/.test(t)?1:Math.max(1,Math.min(12,Number(t)))}function uC(e,t,n){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=t||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:Ip(nt(o,"w"),1,31680),gapTwips:a===t-1?0:zS(nt(o,"space"),n)});}return r}function fC(e){let t=e?Mo(e,"type"):void 0,n=t?nt(t,"val"):void 0;return n==="continuous"||n==="evenPage"||n==="oddPage"||n==="nextColumn"?n:"nextPage"}var pC=new Set(["hyphen","period","colon","emDash","enDash"]);function GS(e){let t=Mo(e,"pgNumType");if(!t||t.kind==="textValue")return;let n={},r=nt(t,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let s=Number(r);Number.isFinite(s)&&s>=0&&s<=9999&&(n.start=s);}let o=nt(t,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(n.fmt=o);let a=nt(t,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let s=Number(a);Number.isFinite(s)&&s>=0&&s<=9&&(n.chapStyle=s);}let i=nt(t,"chapSep");return i!==void 0&&pC.has(i)&&(n.chapSep=i),n}var _S=new WeakMap;function Wd(e){if(!e)return nn;let t=_S.get(e);if(t!==void 0)return t;let n=mC(e);return _S.set(e,n),n}function mC(e){let t=Mo(e,"pgSz"),n=Mo(e,"pgMar"),r=Mo(e,"cols"),o=nn,a=t?nt(t,"orient"):void 0,i=t?Ip(nt(t,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,s=t?Ip(nt(t,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,l=GS(e),d=cC(r),c=r?zS(nt(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?DS(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:s},margins:{topTwips:n?Eo(nt(n,"top"),1440):o.margins.topTwips,rightTwips:n?Eo(nt(n,"right"),1440):o.margins.rightTwips,bottomTwips:n?Eo(nt(n,"bottom"),1440):o.margins.bottomTwips,leftTwips:n?Eo(nt(n,"left"),1440):o.margins.leftTwips,headerTwips:n?Eo(nt(n,"header"),720):o.margins.headerTwips,footerTwips:n?Eo(nt(n,"footer"),720):o.margins.footerTwips,gutterTwips:n?Eo(nt(n,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?DS(r,"sep",false):false,definitions:u?[]:uC(r,d,c)},landscape:a==="landscape"||i>s,titlePage:la$1(e,"titlePg"),breakType:fC(e),...l!==void 0?{pageNumbering:l}:{}}}function gC(e){let t=n=>{if(n.kind!=="textValue"){if(n.kind==="body")return Mo(n,"sectPr");for(let r of n.children??[]){let o=t(r);if(o)return o}}};return t(e.root)}var HS=new WeakMap;function Sn(e){let t=HS.get(e);if(t!==void 0)return t??void 0;let n=e.children.find(a=>a.kind==="paragraphProperties"),r=n?Mo(n,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return HS.set(e,o??null),o}function yC(e){let t=Vd(e);return t[t.length-1]?.properties??nn}function Vd(e,t="all-markup",n){return Kd(e,t,n).sections}function Fp(e,t="all-markup",n){let r=Ct(e,t,n),o=Bo(e,r).sections,a=Ct(e,"all-markup"),i=Bo(e,a).sections,s=Math.max(0,i.length-1),l=new Map;for(let d of i){if(d.blockStart===d.blockEndExclusive)continue;let c=a[d.blockEndExclusive-1];c?.kind==="paragraph"&&Sn(c)&&l.set(c.id,d.index);}return o.map(d=>{if(d.blockStart===d.blockEndExclusive)return s;let c=r[d.blockEndExclusive-1];return c?.kind!=="paragraph"||!Sn(c)?s:l.get(c.id)??s})}function Kd(e,t="all-markup",n){return Bo(e,Ct(e,t,n))}var jS=sf$1(16);function Bo(e,t){let n=jS.get(t);if(n&&n.part===e)return n.result;let r=hC(e,t);return jS.set(t,{part:e,result:r}),r}function hC(e,t){let n=[],r=0,o=false;for(let i=0;i<t.length;i+=1){let s=t[i];if(s.kind!=="paragraph")continue;let l=Sn(s);if(l){if(n.length>=Gd){o=true;continue}n.push({index:n.length,properties:Wd(l),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(n.length>0){let i=n[n.length-1];n[n.length-1]={...i,blockEndExclusive:t.length};}return {sections:n,truncated:true}}let a=gC(e);if(r<t.length||n.length===0){if(n.length>=Gd){let i=n[n.length-1];return n[n.length-1]={...i,blockEndExclusive:t.length},{sections:n,truncated:true}}n.push({index:n.length,properties:Wd(a),blockStart:r,blockEndExclusive:t.length});}else if(a){if(n.length>=Gd)return {sections:n,truncated:true};n.push({index:n.length,properties:Wd(a),blockStart:r,blockEndExclusive:t.length});}return {sections:n,truncated:o}}function cr(e){let t=qd$1(od$1(e.pageSize.widthTwips)),n=qd$1(od$1(e.pageSize.heightTwips)),r=qd$1(od$1(e.margins.leftTwips+e.margins.gutterTwips)),o=qd$1(od$1(e.margins.rightTwips)),a=qd$1(od$1(e.margins.topTwips)),i=qd$1(od$1(e.margins.bottomTwips));return t-r-o<=0||n-a-i<=0?Li:{width:t,height:n,margin:{top:a,right:o,bottom:i,left:r},headerDistance:qd$1(od$1(Math.max(0,e.margins.headerTwips))),footerDistance:qd$1(od$1(Math.max(0,e.margins.footerTwips)))}}var WS=4096,VS=new WeakMap;function YS(e,t){let n=VS.get(e);if(n&&n.sections===t)return n.input;let r={sections:t,footnotePropsBySection:e.footnotePropsBySection,endnotePropsBySection:e.endnotePropsBySection,documentFootnoteProps:e.documentFootnoteProps,documentEndnoteProps:e.documentEndnoteProps};return VS.set(e,{sections:t,input:r}),r}function US(e,t,n){let r=ve(e),o=we(r),a=xe(r),i=ye(void 0,o),s=ze(void 0,a),l=Bo(t,n).sections,d=c=>{if(c.blockStart===c.blockEndExclusive)return;let u=n[c.blockEndExclusive-1];return u?.kind==="paragraph"?Sn(u):void 0};return {sections:l,footnotePropsBySection:l.map(c=>ye(te(d(c)),o)),endnotePropsBySection:l.map(c=>ze(ue(d(c)),a)),documentFootnoteProps:i,documentEndnoteProps:s}}var bC=Object.freeze([]);function xC(e){for(let t of e.attributes){if(t.localName!=="customMarkFollows"||t.namespaceUri!==ca$1&&t.namespaceUri!=="")continue;let n=t.value;return !(n==="0"||n==="false"||n==="off")}return false}var KS=new WeakMap;function SC(e){let t=KS.get(e);if(t)return t;let n=null;for(let o of Ne(e)){let a=o.node;if(a.kind!=="noteReference")continue;let i=fe(a),s=ce(a);i===null||s===null||(n??=[]).push({nodeId:a.id,noteKind:i,noteId:s,customMarkFollows:xC(a)});}let r=n===null?bC:Object.freeze(n);return KS.set(e,r),r}function RC(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function PC(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}var wC=new Map,$S=new WeakMap;function qS(e,t){let n=$S.get(e);if(n&&n.input===t)return n.index;let r=[],o=[],a=[],i=[],s=0,l=0;for(let f=0;f<e.length&&s<WS;f+=1){for(;l<t.sections.length-1&&f>=t.sections[l].blockEndExclusive;)l+=1;let p=t.sections.length>0?l:0;for(let m of xn([e[f]]))for(let g of SC(m)){if(s>=WS)break;s+=1;let y={noteId:g.noteId,sectionIndex:p,customMarkFollows:g.customMarkFollows};g.noteKind==="footnote"?(r.push(y),o.push(g.nodeId)):(a.push(y),i.push(g.nodeId));}}let d=null,c=(f,p,m,g)=>{if(p.length===0||(f==="footnote"?t.footnotePropsBySection.length>0?t.footnotePropsBySection:[t.documentFootnoteProps]:t.endnotePropsBySection.length>0?t.endnotePropsBySection:[t.documentEndnoteProps]).some(b=>b.numRestart==="eachPage"))return;let h=Lo(f,p,g);for(let b=0;b<h.length;b+=1){let R=h[b].mark,I=m[b];R!==null&&R.length>0&&I!==void 0&&(d??=new Map).set(I,R);}};c("footnote",r,o,f=>RC(t,f)),c("endnote",a,i,f=>PC(t,f));let u=d??wC;return $S.set(e,{input:t,index:u}),u}function Tp(e,t){for(let n of e.attributes)if(n.namespaceUri===ca$1&&n.localName===t)return n.value}var XS=new WeakMap;function ZS(e,t){let n=XS.get(e),r=n?.get(t);if(r!==void 0)return r;let o=false,a=false,i,s=null,l=Qn(),d=(c,u)=>{if(!(a||c.kind==="textValue")&&!(l.exhausted||u>Ot)){if(c.kind==="bookmarkStart"){!o&&Tp(c,"name")===t&&(o=true,i=Tp(c,"id"));return}if(c.kind==="bookmarkEnd"){o&&i!==void 0&&Tp(c,"id")===i&&(a=true);return}if(o&&c.kind==="noteReference"){s=c.id,a=true;return}if(et(l))for(let f of c.children)d(f,u+1);}};for(let c of e.children){if(a||!et(l))break;d(c,1);}return n||(n=new Map,XS.set(e,n)),n.set(t,s),s}var vC=512,IC=2048,JS=4096,oR=Object.freeze([]),aR=Object.freeze([]),FC=Object.freeze({fields:aR,bookmarks:oR});function kp(e){return e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}var QS=new WeakMap;function TC(e){let t=QS.get(e);if(t)return t;let n=null,r=null,o=Qn(),a=go(),i=null,s=null,l=nr,d=nr,c=()=>{if(a.nesting!==1||a.phase!=="instruction"||a.nestingOverflow)return;let m=fa(a);if(m.overflow||s===null)return;let g=hn(m.instruction);if(g){i={spec:g,autonum:null,anchorId:s,cached:"",revisions:d};return}let y=zr(m.instruction);y&&(i={spec:null,autonum:y,anchorId:s,cached:"",revisions:d});},u=()=>{i&&((n??=[]).push({spec:i.spec,autonum:i.autonum,anchorId:i.anchorId,cached:kp(i.cached),revisions:i.revisions}),i=null);},f=(m,g)=>{if(m.kind!=="textValue"&&!(o.exhausted||g>Ot)){if(m.kind==="bookmarkStart"){let y=Qi(m,"name");y!==void 0&&y.length>0&&y.length<=pp&&(r??=[]).push(y);return}if(m.kind==="run"){for(let y of m.children){if(!et(o))return;if(y.kind!=="runProperties"){if(ft(y,"begin")){yo(a),a.nesting===1&&(s=y.id,d=l,i=null);continue}if(Jn(y)){ho(a,y,o,g+1);continue}if(ft(y,"separate")){c(),bo(a);continue}if(ft(y,"end")){let h=a.nesting===1;c(),xo(a),h&&u();continue}if(i&&a.nesting===1&&a.phase==="result")if(y.kind==="text")for(let h of y.children)h.kind==="textValue"&&i.cached.length<To&&(i.cached+=h.value.slice(0,To-i.cached.length));else y.kind==="tab"&&i.cached.length<To&&(i.cached+=" ");}}return}if(Rc$1(m)){let y=Tc$1(m)??"",h=hn(y),b=h===null?zr(y):null;(h||b)&&(n??=[]).push({spec:h,autonum:b,anchorId:m.id,cached:kp(Qx(m,o)),revisions:l});return}if(!fp(m)&&et(o)){if(At(m)){let y=Yt(m);if(y){let h=l;l=Qt(h,y);for(let b of m.children)f(b,g+1);l=h;return}}for(let y of m.children)f(y,g+1);}}};for(let m of e.children){if(!et(o))break;f(m,1);}let p=n===null&&r===null?FC:Object.freeze({fields:n??aR,bookmarks:r??oR});return QS.set(e,p),p}var kC=Object.freeze({fieldsByParagraph:null,bookmarkOwners:null}),eR=new WeakMap;function OC(e){let t=eR.get(e);if(t)return t;let n=null,r=null;for(let a of xn([e])){let i=TC(a);i.fields.length>0&&(n??=new Map).set(a.id,i.fields);for(let s of i.bookmarks)r??=new Map,!r.has(s)&&r.size<IC&&r.set(s,a);}let o=n===null&&r===null?kC:Object.freeze({fieldsByParagraph:n,bookmarkOwners:r});return eR.set(e,o),o}var $d=new WeakMap;function CC(e){let t=e[0],n=e[e.length-1],r=(t?$d.get(t):void 0)??(n?$d.get(n):void 0)??new Map;return t&&$d.set(t,r),n&&$d.set(n,r),r}var Xd=new WeakMap;function LC(e){let t=e[0],n=e[e.length-1],r=(t?Xd.get(t):void 0)??(n?Xd.get(n):void 0)??new Map;return t&&Xd.set(t,r),n&&Xd.set(n,r),r}function tR(e){return e.length>1&&e.endsWith(".")?e.slice(0,-1):e}var nR=new WeakMap;function Yd(e,t=Te,n){if(!e)return [];let r=`${t}|${n?.cacheKey??""}`,o=nR.get(e),a=o?.get(r);if(a)return a;let i=[];for(let s of ne(e.root)){if(i.length>=le)break;if(!ee(s))continue;let l=ha(s,t,n);l.length>0&&i.push(l);}return o?Ni(o,r,i):nR.set(e,new Map([[r,i]])),i}var rR=new WeakMap;function EC(e,t,n,r,o,a){let i=new Map,s=[],l=0,d=P=>{for(let x of P){let v=OC(x);if(s.push(v),!!v.fieldsByParagraph)for(let[w,F]of v.fieldsByParagraph){if(l>=vC)break;i.set(w,F),l+=F.length;}}};if(d(e),n){for(let P of Yd(n.footnotesPart,o,a))d(P);for(let P of Yd(n.endnotesPart,o,a))d(P);}if(i.size===0)return null;let c=new Set;for(let P of i.values())for(let x of P)x.spec&&c.add(x.spec.bookmark);let u=new Map;for(let P of s)if(P.bookmarkOwners)for(let[x,v]of P.bookmarkOwners)c.has(x)&&!u.has(x)&&u.set(x,v);let f=new Map,p=new Map,m=new Map;for(let[P,x]of i)for(let v of x){if(!v.autonum||!Oe(v.revisions,o,a))continue;let w=(m.get(v.autonum.kind)??0)+1;m.set(v.autonum.kind,w);let F=Zx(v.autonum,w);F.length!==0&&(f.set(v.anchorId,F),p.has(P)||p.set(P,F));}let g=P=>{let x=yn(P);if(x.pageRef)return null;let v=u.get(P.bookmark);if(!v)return null;if(x.noteRef){if(r===void 0)return null;let F=ZS(v,P.bookmark);return F===null?null:qS(e,r).get(F)??null}if(P.numberSwitch!==null){let F=t?.get(v.id);if(!F){if(x.suppressNonDelimiterText)return null;let _=p.get(v.id);return _!==void 0?tR(_):null}let M=FS(F),S=M!==void 0?pS(M,P.numberSwitch==="n",x.suppressNonDelimiterText):null,H=!x.suppressNonDelimiterText&&F.numFmt!=="bullet"&&F.numFmt!=="none"&&F.markerText.length>0?F.markerText:null,j=S??H;return j===null?null:tR(j)}if(x.suppressNonDelimiterText)return null;let w=eS(v,P.bookmark);return w.length>0?w:null},y=new Map,h=P=>{let x=yn(P),v=`${x.suppressNonDelimiterText?"t":""}${x.noteRef?"x":""}`,w=`${P.numberSwitch??"-"}${v}\0${P.bookmark}`;if(y.has(w))return y.get(w)??null;let F=g(P);return y.set(w,F),F},b=CC(e),R=LC(e),I=new Map,T=new Map,k=new Map,L=[];for(let[P,x]of i){let v=[];for(let F of x){if(F.spec===null){let j=F.autonum?f.get(F.anchorId)??null:null;v.push(j!==null?`a${j}`:`c${F.cached}`);continue}if(yn(F.spec).pageRef){let j=u.get(F.spec.bookmark);if(j){let _=R.get(F.anchorId);_===void 0&&R.size<JS&&(_=Object.freeze({}),R.set(F.anchorId,_)),_!==void 0&&T.set(F.anchorId,{spec:F.spec,projection:{targetParagraphId:j.id,cached:F.cached,calibration:_}});}v.push(`c${F.cached}${j?.id??""}`);continue}let M=h(F.spec),S=b.get(F.anchorId);S===void 0&&(S=F.cached.length===0||M!==null&&kp(M)===F.cached,F.cached.length>0&&b.size<JS&&b.set(F.anchorId,S));let H=S?M:null;I.set(F.anchorId,{spec:F.spec,live:H}),v.push(H!==null?`l${H}`:`c${F.cached}`);}let w=v.join("");k.set(P,w),L.push(w);}return {valuesToken:L.join(""),tokenForParagraph:P=>k.get(P)??"",liveValueOf:(P,x)=>{let v=I.get(P);return !v||v.live===null||v.spec.bookmark!==x.bookmark||v.spec.numberSwitch!==x.numberSwitch||yn(v.spec)!==yn(x)?null:v.live},autonumValueOf:P=>f.get(P)??null,pageRefProjectionOf:(P,x)=>{let v=T.get(P);return !v||v.spec.bookmark!==x.bookmark||yn(v.spec)!==yn(x)?null:v.projection}}}function MC(e,t,n){return as(e,t,n,void 0)}function as(e,t,n,r,o=Te,a){let i=n?.footnotesPart??null,s=n?.endnotesPart??null,l=rR.get(e);if(l&&l.listItems===t&&l.footnotesPart===i&&l.endnotesPart===s&&l.noteNumbering===r&&l.displayMode===o&&l.authorFilterKey===(a?.cacheKey??""))return l.context;let d=EC(e,t,n,r,o,a);return rR.set(e,{listItems:t,footnotesPart:i,endnotesPart:s,noteNumbering:r,displayMode:o,authorFilterKey:a?.cacheKey??"",context:d}),d}function iR(e,t){let n=[];for(let r of xn([e])){let o=t.tokenForParagraph(r.id);o&&n.push(o);}return n.join(";")}function is(e){if(e.kind==="text"||e.kind==="deletedText"){let t="";for(let n of e.children)n.kind==="textValue"&&(t+=n.value);return t}return e.kind==="tab"?" ":e.kind==="hardBreak"?Hc$1(e):""}function Ma(e){if(!e||e.kind==="textValue")return [];let t=[];for(let n of e.children){if(n.kind==="textValue")continue;let r={};for(let a of n.attributes)r[a.localName]=a.value;let o=Object.keys(r).length>0;if(n.localName==="rPrChange"||n.localName==="pPrChange"){let a=o?{localName:n.localName,attributes:r,revisionNodeId:n.id}:{localName:n.localName,revisionNodeId:n.id};t.push(a);continue}t.push(o?{localName:n.localName,attributes:r}:{localName:n.localName});}return t}function Ud(e,t,n){let r=Ma(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return n?[...n(t,r)]:t.length===0?r:[...t,...r]}var Gr=61440,ss=61695,Op=128;function $a(e){return e.kind==="generic"&&e.namespaceUri===ca$1&&e.localName==="sym"}function sR(e,t){if(!(e.kind==="textValue"||!("attributes"in e))){for(let n of e.attributes)if(n.localName===t&&(n.namespaceUri===ca$1||n.namespaceUri===""))return n.value}}function BC(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function qd(e){return !(!Number.isInteger(e)||e<32||e>1114111||e>=127&&e<=159||e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65534)===65534||e===65532)}function Xa(e){if(!$a(e))return null;let t=BC(sR(e,"char"));if(t===null)return null;let n=sR(e,"font"),r=n&&n.length<=Op?n:null,o=rs(r),a=o&&t<=255&&t+Gr<=ss?t+Gr:t;if(o&&a>=Gr&&a<=ss){let i=Va(String.fromCodePoint(a),r),s=i.codePointAt(0)<Gr;return {text:i,font:r,unicode:s}}return qd(t)?{text:String.fromCodePoint(t),font:r,unicode:t<57344||t>63743}:null}function Cp(e,t,n){if(!t.font)return {props:e,style:He(e,n)};let r=[...e,{localName:"rFonts",attributes:{ascii:t.font,hAnsi:t.font}}];return {props:r,style:He(r,n)}}var NC=256,AC=9;function DC(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r===" "||r===" "||r===`
|
|
14
|
+
`||r==="\r"){n+=1;continue}if(r==='"'){let a=n+1;for(;a<e.length&&e[a]!=='"';)a+=1;t.push({value:e.slice(n+1,a),quoted:true}),n=a<e.length?a+1:a;continue}let o=n;for(;o<e.length&&!`
|
|
15
|
+
\r"`.includes(e[o]);)o+=1;t.push({value:e.slice(n,o),quoted:false}),n=o;}return t}function _C(e){if(e.quoted)return null;let t=e.value;if(t.length===0||t.length>AC)return null;let n;if(t.startsWith("0x")||t.startsWith("0X")){let r=t.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;n=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(t))return null;n=Number.parseInt(t,10);}return n>1114111||n>=55296&&n<=57343?null:n}function Zd(e){if(e.length===0||e.length>NC)return null;let t=DC(e);if(t.length<2)return null;let n=t[0];if(n.quoted||n.value.toUpperCase()!=="SYMBOL")return null;let r=_C(t[1]);if(r===null)return null;let o=null,a=null,i=false;for(let s=2;s<t.length;s+=1){let l=t[s];if(l.quoted||!l.value.startsWith("\\"))continue;let d=l.value.toLowerCase();if(d==="\\f"){let c=t[s+1];c&&c.value.length>0&&c.value.length<=Op&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,s+=1);continue}if(d==="\\s"){let c=t[s+1];if(c&&(c.quoted||!c.value.startsWith("\\"))&&(s+=1,/^\d{1,3}$/.test(c.value))){let u=Number(c.value);u>=1&&u<=999&&(a=u);}continue}d==="\\u"&&(i=true);}return {code:r,font:o,sizePt:a,unicode:i}}function Jd(e,t,n){let r=[];e.font&&r.push({localName:"rFonts",attributes:{ascii:e.font,hAnsi:e.font}}),e.sizePt!==null&&r.push({localName:"sz",attributes:{val:String(e.sizePt*2)}});let o=r.length>0?[...t,...r]:t,a=He(o,n);if(e.unicode)return qd(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(rs(i)){let s=e.code<=255&&e.code+Gr<=ss?e.code+Gr:e.code;if(s>=Gr&&s<=ss)return {text:Va(String.fromCodePoint(s),i),props:o,style:a}}return qd(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function Qd(){let e=null,t=0,n=false,r=false,o=()=>{e=null,t=0,n=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,t=i,n=false,r=false);},onEnd(a,i){if(e===null||a>t)return null;let s=a===t,d=s&&i&&!(n&&!r)?lr(e.kind,i,e.picture):"";return o(),s?d:null},reset:o,noteResult(a){n=true,a&&(r=true);}}}function HC(e){let{simple:t,depth:n,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:s,cascadeRuns:l,themeFonts:d}=e,c="",u,f,p=false,m=go(),g=Qd(),y=(b,R)=>{u||(u=b,f=R);},h=(b,R,I)=>{if(!(b.kind==="textValue"||R>Ot)){for(let T of b.children)if(T.kind!=="textValue"){if(!et(o))return;if(T.kind==="run"){let k=Ud(T,s,l),L=He(k,d);for(let P of T.children){if(P.kind==="runProperties")continue;if(ft(P,"begin")){yo(m),m.nesting===1&&g.reset();continue}if(Jn(P)){ho(m,P,o,R+1);continue}if(ft(P,"separate")){let M=m.nesting,S=m.phase,H=bo(m);(M===1||S==="result"&&!m.nestingOverflow)&&g.onSeparate(r?H:null,M);continue}if(ft(P,"end")){let M=g.onEnd(m.nesting,r);M!==null&&(c+=M),xo(m);continue}if(Wc(P))continue;if($a(P)){if(Oe(I,i,e.authorFilter)&&(p=true),g.active){g.noteResult(!L.hidden&&Oe(I,i,e.authorFilter));continue}let M=Xa(P);if(!M?.unicode||L.hidden||!Oe(I,i,e.authorFilter))continue;y(k,L),c+=M.text;continue}let x=is(P);if(x.length===0)continue;let v=fn(I),w=!Oe(I,i,e.authorFilter)||P.kind==="deletedText"&&!v;w||(p=true);let F=L.hidden||w;if(g.active){g.noteResult(!F),F||y(k,L);continue}F||(y(k,L),c+=x);}continue}if(Rc$1(T)){let k=g.active?null:ua(Tc$1(T)??"");if(k&&r){if(!Oe(I,i,e.authorFilter))continue;let L=c.length;h(T,R+1,I),c=c.slice(0,L),c+=lr(k.kind,r,k.picture);continue}h(T,R+1,I);continue}if(T.kind==="hyperlink"){h(T,R+1,I);continue}if(At(T)&&I.length<Or){let k=Yt(T);h(T,R+1,k?Qt(I,k):I);continue}h(T,R+1,I);}}};return h(t,n,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function lR(e){let{simple:t,pageContext:n,inheritedRunProperties:r,themeFonts:o}=e,a=HC(e),i=Tc$1(t)??"",s=a.resultProps??r,l=ua(i);if(l&&n){let g=a.resultStyle??He(r,o);return g.hidden?null:{text:lr(l.kind,n,l.picture),props:s,style:g}}if(l&&e.bodyPageFields&&!n&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??He(r,o);if(g.hidden)return null;let h=l.picture!==void 0&&_r(l.kind,e.bodyPageFields.format)?l.picture:void 0;return {text:Ld(l.kind,h,e.bodyPageFields.format),props:s,style:g,pageField:h===void 0?{kind:l.kind}:{kind:l.kind,picture:h}}}let d=Zd(i);if(d){let g=Jd(d,s,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}if(e.refFields){let g=hn(i);if(g){let y=e.refFields.liveValueOf(t.id,g);if(y!==null){let h=a.resultStyle??He(r,o);return h.hidden?null:{text:y,props:s,style:h}}if(e.bodyPageFields&&e.refFields.pageRefProjectionOf){let h=e.refFields.pageRefProjectionOf(t.id,g);if(h){let b=a.resultStyle??He(r,o);if(b.hidden)return null;if(a.text.length>0)return {text:a.text,props:s,style:b,pageRef:h};if(!a.sawResultContent)return {text:ja,props:s,style:b,pageRef:h}}}}else if(e.refFields.autonumValueOf&&zr(i)){let y=e.refFields.autonumValueOf(t.id);if(y!==null){let h=a.resultStyle??He(r,o);return h.hidden?null:{text:y,props:s,style:h}}}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=Bd(i);if(g){let y=Nd(g,e.documentProperties);if(y!==null){let h=a.resultStyle??He(r,o);return h.hidden?null:{text:y,props:s,style:h}}}}let u=c?Md(i):null;if(u){let g=a.resultStyle??He(r,o);return g.hidden?null:{text:u.display,props:s,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??He(r,o);if(f.hidden)return null;let p=e.currentLink?null:Ad(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:s,style:f,...m?{link:m}:{}}}var jC="\u2612",zC="\u2610";function GC(e){let t=mo(e);return t==="FORMCHECKBOX"?"checkbox":t==="FORMDROPDOWN"?"dropdown":null}function ls(e,t){e.symbolSpec=Zd(t),!e.symbolSpec&&(e.linkSpec=Ad(t),!e.linkSpec&&(e.formSpec=GC(t),!e.formSpec&&(e.buttonSpec=Md(t),!e.buttonSpec&&(e.docPropertySpec=Bd(t),!e.docPropertySpec&&(e.refSpec=hn(t),!e.refSpec&&(e.autonumSpec=zr(t)))))));}function gH(e,t){if(t.allowPageFields&&t.hasSeparate&&Mi(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return ls(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!yn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null||n.formSpec!==null&&t.hasLegacyFormData}function yH(e,t){if(t.allowPageFields&&Mi(e)!==null)return true;let n={symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null};return ls(n,e),n.symbolSpec!==null||n.buttonSpec!==null||n.docPropertySpec!==null||t.allowRefFields&&n.refSpec!==null&&(t.allowPageRef||!yn(n.refSpec).pageRef)||t.allowAutonum&&n.autonumSpec!==null}function dR(e,t){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let n=e.formData.checked?jC:zC;if(e.formData.sizeHalfPoints===null)return {text:n,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:n,props:r,style:He(r,t)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let n=e.formData.entries[e.formData.selectedIndex]??"";return n.length===0?null:{text:n,props:e.props,style:e.style}}return null}function cR(e,t){if(e.symbolSpec){let r=Jd(e.symbolSpec,e.props,t.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let n=dR(e,t.themeFonts);if(n)return {text:n.text,props:n.props,style:n.style};if(e.kind&&t.pageContext)return {text:lr(e.kind,t.pageContext,e.picture??void 0),props:e.props,style:e.style};if(e.refSpec&&t.refFields){let r=t.refFields.liveValueOf(e.beginId,e.refSpec);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.refSpec&&t.refFields?.pageRefProjectionOf&&t.bodyPageFields){let r=t.refFields.pageRefProjectionOf(e.beginId,e.refSpec);if(r){if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style,pageRefField:r};if(!e.sawResultContent)return {text:ja,props:e.props,style:e.style,pageRefField:r}}}if(e.autonumSpec&&t.refFields?.autonumValueOf){let r=t.refFields.autonumValueOf(e.beginId);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.cachedText.length>0)return {text:e.cachedText,props:e.props,style:e.style};if(!e.sawResultContent){if(e.kind&&t.bodyPageFields){let o=e.picture!==null&&_r(e.kind,t.bodyPageFields.format)?e.picture:void 0;return {text:Ld(e.kind,o,t.bodyPageFields.format),props:e.props,style:e.style,pageField:{kind:e.kind,...o!==void 0?{picture:o}:{}}}}if(e.docPropertySpec){let r=Nd(e.docPropertySpec,t.documentProperties);if(r!==null)return {text:r,props:e.props,style:e.style}}if(e.buttonSpec)return {text:e.buttonSpec.display,props:e.props,style:e.style}}return null}function Wr(e,t,n){if(n<=t)return;let r=e[e.length-1];if(r&&r.end>=t){r.end=Math.max(r.end,n);return}e.push({start:t,end:n});}var WC=new Set(["left","center","right"]),VC=new Set(["margin","indent","leftMargin"]),KC=new Set(["dot","hyphen","underscore","middleDot"]);function uR(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==ca$1)return null;let t="left",n="margin",r;for(let o of e.attributes)o.namespaceUri===ca$1&&(o.localName==="alignment"?t=o.value:o.localName==="relativeTo"?n=o.value:o.localName==="leader"&&(r=o.value));return {alignment:WC.has(t)?t:"left",relativeTo:VC.has(n)?n:"margin",...r!==void 0&&KC.has(r)?{leader:r}:{}}}function Lp(e,t,n,r){return {...e,text:e.text.slice(t,n),start:e.start+t,end:e.start+n,...r?{fontSlot:r}:{}}}function Ep(e){if(!e.some(({style:s})=>s.fontFamilyEastAsia!==null&&s.fontFamilyEastAsia!==s.fontFamily))return e;let t=[],n=[];for(let s=0;s<e.length;s+=1){let l=e[s];l.positionalTab||l.breakKind||l.inlineDrawing||l.anchoredAtom||l.equation||l.text.length!==0&&(t.push(s),n.push(l.text));}let r=Yy(n);if(r.length===0)return e;let o=new Map;for(let s of r){let l=o.get(s.segment);l?l.push({from:s.from,to:s.to}):o.set(s.segment,[{from:s.from,to:s.to}]);}let a=[],i=0;for(let s=0;s<e.length;s+=1){let l=e[s];if(t[i]!==s){a.push(l);continue}let d=o.get(i);i+=1;let{style:c}=l;if(!d||c.fontFamilyEastAsia===null||c.fontFamilyEastAsia===c.fontFamily){a.push(l);continue}if(!(!l.projected&&!l.fieldAtom&&!l.noteNav&&l.measureText===void 0&&l.end-l.start===l.text.length)){let p=d.length===1&&d[0].from===0&&d[0].to===l.text.length;a.push(p?{...l,fontSlot:"eastAsia"}:l);continue}let f=0;for(let p of d)p.from>f&&a.push(Lp(l,f,p.from,void 0)),a.push(Lp(l,p.from,p.to,"eastAsia")),f=p.to;f<l.text.length&&a.push(Lp(l,f,l.text.length,void 0));}return a}function fR(e){return e.kind==="drawing"||bb$1(e)}function pR(e){let{node:t,layout:n,revisions:r,displayMode:o}=e,a=n.projectionForAtom?.(t.id)??(t.kind==="drawing"?n.project(t):null);if(!a||a.kind!=="inline")return a?.kind==="anchored"&&!a.hidden?{recordDeleted:false,emit:true,extras:{anchoredAtom:true}}:{recordDeleted:false,emit:true};let i=fn(r),s=e.hiddenRun||!Oe(r,o,e.authorFilter);return a.hidden||s?a.hidden?{recordDeleted:i,emit:true}:{recordDeleted:i,emit:false}:{recordDeleted:i,emit:true,extras:{inlineDrawing:Object.freeze({drawingNodeId:t.id,ownerPartName:n.ownerPartName,projection:a,resource:n.resourceOf(a)})}}}Object.freeze({marks:Object.freeze(new Map)});function No(e,t){return Ud$1(e,t)}function Mp(e,t){if(!je(e))return null;if($d$1(e)||ae(e))return {text:"",projected:true,kind:null,noteId:null};let n=Zd$1(e),r=fe(e)??ge(e);if(!r)return null;let o=ce(e),a=o!==null?No(r,o):n?void 0:t?.activeNoteKey,i=o!==null?o:a?$C(a,r)??null:null,s=a,l=s!==void 0?n?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...l?{nav:l}:{},...s?{scopeId:s}:{}};if(n&&o!==null&&he(e))return {text:"",...d};if(!t||!a)return {text:"",...d};let c=t.marks.get(a);return c==null?{text:"",...d}:t.reservedMarkText&&t.reservedMarkText.length>0?{text:c,measureText:t.reservedMarkText,...d}:{text:c,...d}}function $C(e,t){let n=`${t}:`;if(!e.startsWith(n))return null;let r=e.slice(n.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function gR(e){return Zd$1(e)||_d$1(e)||$d$1(e)||ae(e)}function XC(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return (t>>>0).toString(16).padStart(8,"0")}var mR=new WeakMap;function yR(e){if(!e)return "";let t=mR.get(e);if(t!==void 0)return t;let n=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${XC(n)}`;return mR.set(e,r),r}function ba(e,t=[],n,r,o,a,i=Te,s,l,d,c,u,f=false,p,m){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let g=[],y=0,h,b=bd$1(e,{maxNesting:ad$1,maxInstructionChars:$c}),R=b.filter(N=>N.addressing==="atomic"),I=new Set(R.filter(N=>N.kind==="complex").map(N=>N.node.id)),T=new Set(b.filter(N=>N.kind==="complex"&&N.addressing==="editable-result").map(N=>N.node.id)),k=new Set;for(let N of R)for(let A of N.removeNodeIds)k.add(A);let L=go(),P=Qn(),x=null,v=null,w=Qd(),F=nr,M=(N,A,B,G,$,V,q)=>{if(N.length===0&&!G&&!q?.inlineDrawing)return;let Y=q?.linkOverride??h,U=q?.revisionsOverride??F,K=m?zl(U,i,m):U;if(K===null)return;let Re=m?Dh(A,m):A,ge=Y?{link:Y}:{},se=K.length===0?{}:{revisions:K};if(G){g.push({text:N,props:Re,style:B,start:$,end:V,projected:true,...q?.measureText!==void 0?{measureText:q.measureText}:{},...q?.noteNav?{noteNav:q.noteNav}:{},...q?.inlineDrawing?{inlineDrawing:q.inlineDrawing}:{},...q?.anchoredAtom?{anchoredAtom:true}:{},...q?.equation?{equation:q.equation}:{},...q?.fieldAtom?{fieldAtom:q.fieldAtom}:{},...ge,...se});return}N.length!==0&&g.push({text:N,props:Re,style:B,start:$,end:V,...q?.positionalTab?{positionalTab:q.positionalTab}:{},...q?.breakKind?{breakKind:q.breakKind}:{},...ge,...se});},S=()=>{if(!x||!x.atomic){x=null,v=null;return}let N=x.atomStart,A=N+1;if(x.style.hidden){x=null,v=null;return}if(!Oe(x.resultRevisions,i,m)){s&&fn(x.resultRevisions)&&Wr(s,N,A),x=null,v=null;return}let{resultLink:B,linkSpec:G,resultRevisions:$,formField:V}=x,q,Y=()=>{if(q)return q;let K=!B&&G?c?.(G)??null:null,Re=B??K;return q={...$.length>0?{revisionsOverride:$}:{},...Re?{linkOverride:Re}:{},fieldAtom:{formField:V}},q},U=cR(x,{pageContext:n,themeFonts:d,documentProperties:u,bodyPageFields:f,...p?{refFields:p}:{}});if(U){let K=Y(),Re=U.pageField||U.pageRefField?{...K,fieldAtom:{formField:x.formField,...U.pageField?{pageField:U.pageField}:{},...U.pageRefField?{pageRef:U.pageRefField}:{}}}:K;M(U.text,U.props,U.style,true,N,A,Re);}x=null,v=null;},H=()=>{if(!x)return;let N=!x.resultLink&&x.linkSpec?c?.(x.linkSpec)??null:null,A=B=>N&&!B.link?{...B,link:N}:B;if(x.atomic){y=x.atomStart;for(let B of x.buffered)g.push({...A(B),start:y,end:y+(B.end-B.start)}),y+=B.end-B.start;x.cachedText.length>0&&x.buffered.length===0&&(M(x.cachedText,x.props,x.style,false,y,y+x.cachedText.length,N?{linkOverride:N}:void 0),y+=x.cachedText.length);}else {for(let B of x.buffered)g.push(A(B));y=x.bufferOffset;}x=null,v=null;},j=(N,A,B)=>{if(fR(N)){let Y=y;y+=1;let U=y;if(!l)return;let K=pR({node:N,layout:l,hiddenRun:B.hidden,revisions:F,displayMode:i,authorFilter:m});K.recordDeleted&&s&&Wr(s,Y,U),K.emit&&M("\uFFFC",A,B,true,Y,U,K.extras);return}if(gR(N)){let Y=Mp(N,a),U=y,K=U+1;if(y=K,B.hidden||!Y||Y.text.length===0&&!Y.measureText)return;let Re=Y.scopeId&&Y.nav?{scopeId:Y.scopeId,direction:Y.nav}:void 0;M(Y.text.length>0?Y.text:Y.measureText??"",A,B,true,U,K,{...Y.measureText!==void 0?{measureText:Y.measureText}:{},...Re?{noteNav:Re}:{}});return}let G=uR(N);if(G){B.hidden||M(" ",A,B,false,y,y,{positionalTab:G});return}if($a(N)){let Y=Xa(N);if(!Y||B.hidden||!Oe(F,i,m))return;let U=Cp(A,Y,d);M(Y.text,U.props,U.style,true,y,y);return}let $=is(N);if($.length===0)return;let V=fn(F);B.hidden||!Oe(F,i,m)||N.kind==="deletedText"&&!V||M($,A,B,false,y,y+$.length,{...N.kind==="hardBreak"?{breakKind:Fc$1(N)}:{}}),V&&s&&Wr(s,y,y+$.length),y+=$.length;},_=(N,A)=>{if(N.kind!=="run")return;let B=Ud(N,t,r),G=He(B,d),$=()=>{x&&(x.capturedResultStyle||(x.props=B,x.style=G,x.capturedResultStyle=true),x.capturedResultRevisions||(x.resultRevisions=F,x.capturedResultRevisions=true,!x.resultLink&&h&&(x.resultLink=h)));};for(let V of N.children){if(!et(P)){if(H(),Ei(L),w.reset(),V.kind==="runProperties"||ft(V,"begin")||ft(V,"separate")||ft(V,"end")||Jn(V)||k.has(V.id)&&v===null)continue;j(V,B,G);continue}if(V.kind!=="runProperties"){if(ft(V,"begin")){let q=I.has(V.id);yo(L),L.nesting===1&&(H(),w.reset(),v=q?V.id:null,x={kind:null,picture:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,refSpec:null,autonumSpec:null,formData:Yc(V),beginId:V.id,atomic:q,editableResult:T.has(V.id),atomStart:y,props:B,style:G,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:y,resultRevisions:F,capturedResultRevisions:F.length>0,formField:Xc(V),...h?{resultLink:h}:{}},q&&(y+=1));continue}if(Jn(V)){ho(L,V,P,A+1);continue}if(ft(V,"separate")){let q=L.nesting===1&&L.phase==="instruction",Y=L.nesting,U=bo(L);if(q&&x){x.kind=U?.kind??null,x.picture=U?.picture??null;let K=fa(L);!x.kind&&!K.overflow&&!L.nestingOverflow&&ls(x,K.instruction),x.props=B,x.style=G;}else x?.atomic&&L.phase==="result"&&!L.nestingOverflow&&w.onSeparate(n?U:null,Y);continue}if(ft(V,"end")){let q=L.nesting===1;if(q&&x?.atomic&&L.phase==="instruction"){let U=fa(L);!U.overflow&&!L.nestingOverflow&&ls(x,U.instruction);}let Y=w.onEnd(L.nesting,n);Y!==null&&x?.atomic&&(x.cachedText+=Y),xo(L),q&&(x?.atomic?S():H());continue}if(!(kh(L)&&x?.atomic)){if(x&&Oh(L)){if($a(V)){if(x.atomic){if(Oe(F,i,m)&&(x.sawResultContent=true),w.active){w.noteResult(!G.hidden&&Oe(F,i,m));continue}if(!G.hidden&&Oe(F,i,m)){let ge=Xa(V);ge?.unicode&&($(),x.cachedText+=ge.text);}continue}let K=Xa(V);if(!K||G.hidden||!Oe(F,i,m))continue;let Re=Cp(B,K,d);x.buffered.push({text:K.text,props:Re.props,style:Re.style,start:y,end:y,projected:true,...F.length>0?{revisions:F}:{},...h?{link:h}:{},fieldAtom:{formField:x.formField}});continue}let q=is(V);if(q.length===0)continue;let Y=fn(F),U=!Oe(F,i,m)||V.kind==="deletedText"&&!Y;if(x.atomic&&!U&&(x.sawResultContent=true),Y&&s&&(x.atomic?Wr(s,x.atomStart,x.atomStart+1):Wr(s,y,y+q.length)),U){x.atomic&&w.active&&w.noteResult(false),x.atomic||(y+=q.length,x.bufferOffset=y);continue}if(x.atomic){if(w.active){if(w.noteResult(!G.hidden),G.hidden)continue;$();continue}if(G.hidden)continue;$(),x.cachedText+=q;continue}if(G.hidden){y+=q.length,x.bufferOffset=y;continue}x.capturedResultStyle||(x.props=B,x.style=G,x.capturedResultStyle=true),x.buffered.push({text:q,props:B,style:G,start:y,end:y+q.length,...F.length>0?{revisions:F}:{},...h?{link:h}:{},fieldAtom:{formField:x.formField}}),y+=q.length,x.bufferOffset=y;continue}k.has(V.id)&&v===null&&I.size>0,j(V,B,G);}}}};if(!et(P))return Ep(g);let C=Va$1(),D=(N,A)=>{let B=y;if(y+=1,N.kind==="textValue"||(fn(F)&&s&&Wr(s,B,B+1),!Oe(F,i,m)))return;let G=lR({simple:N,depth:A,pageContext:n,budget:P,revisions:F,displayMode:i,authorFilter:m,inheritedRunProperties:t,cascadeRuns:r,themeFonts:d,currentLink:h,projectFieldLink:c,documentProperties:u,bodyPageFields:f,...p?{refFields:p}:{}});G&&M(G.text,G.props,G.style,true,B,B+1,{fieldAtom:{formField:false,...G.pageField?{pageField:G.pageField}:{},...G.pageRef?{pageRef:G.pageRef}:{}},...G.link?{linkOverride:G.link}:{}});},z=(N,A,B,G)=>{let $=jc(N);if($){let U=y++;fn(F)&&s&&Wr(s,U,y);let K=ad(He(t,d));return K.hidden||!Oe(F,i,m)?void 0:M("\uFFFC",t,K,true,U,y,{equation:$})}if(Rc$1(N)){D(N,A);return}if(N.kind==="run"){_(N,A);return}if(oc$1(N)){if(G>=nc$1||A>Ot)return;for(let U of rc$1(N))z(U,A+1,B,G+1);return}if(A>Ot||A>=Or)return;let V=N.kind!=="textValue"&&"localName"in N?Ua$1(B,N):B;if(N.kind==="hyperlink"){let U=h;h=o?.(N)??void 0;for(let K of N.children)z(K,A+1,V,G);h=U;return}if(!At(N))return;let q=Yt(N);if(!q||!et(P))return;let Y=F;F=Qt(Y,q);for(let U of N.children)z(U,A+1,V,G);F=Y;};for(let N of e.children)z(N,1,C,0);return H(),Ep(g)}var Np=512,bR=9,bn=31680/20,YC=8,UC=128;function ds(e,t){return e.kind!=="textValue"&&e.namespaceUri===ca$1&&e.localName===t}function rt(e,t){for(let n of e.attributes)if(n.localName===t)return n.value}function jt(e,t){for(let n of e.children)if(ds(n,t))return n}function ur(e,t=false){return e===void 0||!(t?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function qC(e){let t=e/20;return !Number.isFinite(t)||t<=0?0:t>bn?bn:t}function Bp(e){let t=e/20;return Number.isFinite(t)?t>bn?bn:t<-bn?-bn:t:0}function ZC(e){let t={left:0,right:0,hanging:0,firstLine:0};if(!e)return t;let n=jt(e,"ind");if(!n)return t;let r=ur(rt(n,"left")??rt(n,"start"),true),o=ur(rt(n,"right")??rt(n,"end"),true),a=ur(rt(n,"hanging")),i=ur(rt(n,"firstLine"),true);return {left:r===null?0:Bp(r),right:o===null?0:Bp(o),hanging:a===null?0:qC(a),firstLine:i===null?0:Bp(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function JC(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function QC(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function eL(e,t){let n=jt(e,t);if(!n)return false;let r=rt(n,"val");return r!=="0"&&r!=="false"&&r!=="off"}function hR(e,t){let n=jt(e,t);if(!n)return;let r=rt(n,"val");if(!(r===void 0||r.length===0||r.length>UC))return r}function tL(e,t){for(let n of e){if(n.localName!==t)continue;let r=n.attributes?.val;return !(r==="0"||r==="false")}return false}function xR(e){let t=ur(rt(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=jt(e,"start"),r=1;if(n){let h=ur(rt(n,"val"));h!==null&&h>=0&&(r=Math.min(h,9999));}let o=jt(e,"numFmt"),a=(o?rt(o,"val"):void 0)??"decimal",i=jt(e,"lvlText"),s=i?rt(i,"val")??"":"",l=jt(e,"lvlJc"),d=QC(l?rt(l,"val"):void 0),c=jt(e,"suff"),u=JC(c?rt(c,"val"):void 0),f=jt(e,"lvlRestart"),p;if(f){let h=ur(rt(f,"val"));h!==null&&h>=0&&h<=9&&(p=h);}let m=jt(e,"pPr"),g=jt(e,"rPr"),y=g?Ma(g):[];return {ilvl:t,start:r,numFmt:a.length>64?"decimal":a,lvlText:s.length>64?s.slice(0,64):s,lvlJc:d,suff:u,indent:ZC(m),...p!==void 0?{lvlRestart:p}:{},isLgl:eL(e,"isLgl"),runProperties:y,vanish:tL(y,"vanish")}}function nL(e){let t=rt(e,"abstractNumId");if(t===void 0||t.length===0||t.length>64)return null;let n=new Map;for(let a of e.children){if(!ds(a,"lvl"))continue;if(n.size>=9)break;let i=xR(a);i&&!n.has(i.ilvl)&&n.set(i.ilvl,i);}let r=hR(e,"numStyleLink"),o=hR(e,"styleLink");return {abstractNumId:t,levels:n,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function rL(e){let t=ur(rt(e,"ilvl"));if(t===null||t<0||t>8)return null;let n=jt(e,"startOverride"),r;if(n){let i=ur(rt(n,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=jt(e,"lvl"),a=o?xR(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:t,override:{}}:{ilvl:t,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function oL(e){let t=rt(e,"numId");if(t===void 0||t.length===0||t.length>64)return null;let n=jt(e,"abstractNumId"),r=n?rt(n,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!ds(a,"lvlOverride"))continue;if(o.size>=bR)break;let i=rL(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:t,abstractNumId:r,overrides:o}}function Ap(e){let t=new Map,n=new Map;if(!e)return {abstractNums:t,nums:n};let r=0,o=0;for(let a of e.children){if(ds(a,"abstractNum")){if(r>=Np)continue;r+=1;let i=nL(a);i&&!t.has(i.abstractNumId)&&t.set(i.abstractNumId,i);continue}if(ds(a,"num")){if(o>=Np)continue;o+=1;let i=oL(a);i&&!n.has(i.numId)&&n.set(i.numId,i);}}return {abstractNums:t,nums:n}}function aL(e,t,n){let r=new Set([t.abstractNumId]),o=t;for(let a=0;a<YC;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let s=n(i);if(s===void 0)return null;let l=e.nums.get(s);if(!l)return null;let d=e.abstractNums.get(l.abstractNumId);if(!d||r.has(d.abstractNumId))return null;r.add(d.abstractNumId),o=d;}return null}function NS(e,t){let n=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=aL(e,a,t);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),n=true);}return n?{abstractNums:r,nums:e.nums}:e}function Co(e,t,n){if(n<0||n>8)return null;let r=e.nums.get(t);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(n),i=a?.level??o.levels.get(n);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var vp=Object.freeze({abstractNums:new Map,nums:new Map});function iL(e){let t,n,r,o,a,i,s,l,d,c;return {styleCascade(){let u=e.stylesRoot(),f=e.documentThemeFonts();return (l===void 0||u!==r||f.major!==o||f.minor!==a||f.majorEastAsia!==i||f.minorEastAsia!==s)&&(r=u,o=f.major,a=f.minor,i=f.majorEastAsia,s=f.minorEastAsia,l=zf(u,f)),l},defaultTabStopPt(){let u=e.settingsRoot();return (c===void 0||u!==d)&&(d=u,c=df(u)),c},numberingIndex(){let u=e.numberingRoot();return (n===void 0||u!==t)&&(t=u,n=Ap(u)),n}}}function SR(e){let t=e.picture;return t?.embeddedRelationshipId?`embed:${e.ownerPartName}:${t.embeddedRelationshipId}`:t?.linkedRelationshipId?`link:${e.ownerPartName}:${t.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var RR=new WeakMap,Dp=new Map,sL=16,lL=32;function FR(e,t){let n=RR.get(e);if(n)return n;let r;if(e.kind==="drawing"||bb$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Dp,visited:1,deepest:0};else if((t<2||e.children.length>=sL)&&t<lL){let o=null,a=1,i=0;for(let s of e.children){let l=FR(s,t+1);if(a+=l.visited,l.deepest+1>i&&(i=l.deepest+1),l.atoms.size>0){o||(o=new Map);for(let[d,c]of l.atoms)o.set(d,c);}}r={atoms:o??Dp,visited:a,deepest:i};}else {let o=new Map,a=0,i=0,s=[{node:e,depth:0}];for(;s.length>0;){let l=s.pop();if(a+=1,a>$a$1)break;l.depth>i&&(i=l.depth);let d=l.node;if(d.kind==="drawing"||bb$1(d)){o.set(d.id,d);continue}if("children"in d)for(let c=d.children.length-1;c>=0;c-=1)s.push({node:d.children[c],depth:l.depth+1});}r={atoms:o.size>0?o:Dp,visited:a,deepest:i};}return RR.set(e,r),r}function _p(e){let t=FR(e.root,0);return t.visited>$a$1||t.deepest>Za$1.maxDrawingDepth?null:t.atoms}var PR=new WeakMap;function TR(e,t){let n=PR.get(e.root),r=n?.get(t);if(r)return r;let o=_p(e),a=new Map,i=0;if(o)for(let s of o.keys()){let l=t.projectionForAtom?.(s)?.drawingNodeId??s;a.set(l,i),i+=1;}else for(let s of eb$1(e))a.set(s.drawingNodeId,i),i+=1;return n||(n=new WeakMap,PR.set(e.root,n)),n.set(t,a),a}var Hp=new Float64Array(1),ec=new Uint32Array(Hp.buffer);function dL(e){let t=2166136261,n=268435859,r=[];for(let o of e.components){r.push(o.fillHex??"",String(o.fillAlpha),o.strokeHex??"",String(o.strokeAlpha),String(o.strokeWidthEmu),String(o.subpathsEmu.length));for(let a of o.subpathsEmu){r.push(String(a.length));for(let i of a)Hp[0]=i.x,t=Math.imul(t^ec[0],16777619),n=Math.imul(n^ec[1],16777651),Hp[0]=i.y,t=Math.imul(t^ec[1],16777619),n=Math.imul(n^ec[0],16777651);}}return [String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.components.length),r.join(","),(t>>>0).toString(36),(n>>>0).toString(36)].join(";")}function jp(e){let t=e.position,n=e.anchor,r=e.picture,o=e.wrapGeometry,a=e.vectorShape;return me([e.drawingNodeId,e.ownerPartName,e.kind,e.hidden?"1":"0",String(e.extentEmu.cx),String(e.extentEmu.cy),String(e.effectExtentEmu.top),String(e.effectExtentEmu.right),String(e.effectExtentEmu.bottom),String(e.effectExtentEmu.left),e.compatibilityBranchNodeId??"",n?.simplePos?"sp":"pv",n?String(n.relativeHeight):"",n?n.layoutInCell?"1":"0":"",r?me([String(r.crop.left),String(r.crop.top),String(r.crop.right),String(r.crop.bottom),String(r.transform.rotationDegrees),r.transform.flipHorizontal?"1":"0",r.transform.flipVertical?"1":"0",String(r.transform.offsetEmu.x),String(r.transform.offsetEmu.y),String(r.transform.extentEmu.cx),String(r.transform.extentEmu.cy),r.embeddedRelationshipId??"",r.linkedRelationshipId??"",r.presetGeometry??""]):"",a?dL(a):"",o?me([o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length)]):"",t?me([t.horizontal.relativeFrom,t.horizontal.align??"",String(t.horizontal.offsetEmu??""),t.vertical.relativeFrom,t.vertical.align??"",String(t.vertical.offsetEmu??""),String(t.simplePosition.xEmu),String(t.simplePosition.yEmu)]):""])}function cs(e){switch(e.kind){case "ready":return me(["ready",e.resourceKey,e.contentId,`${e.pixelWidth}x${e.pixelHeight}`]);case "pending":return me(["pending",e.resourceKey]);case "external":return me(["external",e.relationshipId,e.sinkSafe?"1":"0"]);case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var cL=1;function zp(e,t){if(e.kind==="drawing"||bb$1(e)){t.push(e.id);return}if("children"in e)for(let n of e.children)zp(n,t);}function uL(e){if(e.kind!=="paragraph")return [];let t=[];for(let n of e.children)zp(n,t);return Object.freeze(t)}function fL(e){let{ownerPartName:t,part:n,pkg:r,lookup:o,onResourceSettled:a,rememberReadyHandle:i,forgetReadyHandle:s}=e,l=false,d=0,c=new Map,u=new Set,f=new Map,p=new WeakMap,m=new WeakMap,g=0,y=ab$1(r,t),h=Xa$1(r),b=fb$1(n,{resolveRelationship:y,resolveSchemeColor:h.resolveSchemeColor,resolveStyleMatrixReference:h.resolveStyleMatrixReference}),R=_p(n),I=(v,w)=>{if(l||u.has(w))return;u.add(w);let F=d;o.resolveForProjection(v).then(M=>{l||F!==d||(c.set(w,M),M.kind==="ready"&&i(M.validatedHandle),g+=1,f.set(w,g),u.delete(w),a(t));}).catch(()=>{l||F!==d||(c.set(w,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(w,g),u.delete(w),a(t));});},T=v=>{let w=SR(v),F=c.get(w);if(F)return F;let M=v.picture?.linkedRelationshipId;if(M){let H=o.resolveLinked(t,M);return c.set(w,H),g+=1,f.set(w,g),H}let S=Object.freeze({kind:"pending",resourceKey:w});return c.set(w,S),g+=1,f.set(w,g),I(v,w),S},k=v=>b.get(v)??null,L=Object.freeze({ownerPartName:t,projectionForAtom:k,project:v=>k(v.id),resourceOf:T}),P=v=>{let w=m.get(v);if(w)return w;let F=uL(v),M=null,S=(j,_)=>{if(!(_>=cL))for(let C of j){let D=b.get(C)?.textboxStory;if(!D)continue;let z=[];if(zp(D.content,z),z.length!==0){M||(M=[...F]);for(let N of z)M.push(N);S(z,_+1);}}};S(F,0);let H=M??F;return m.set(v,H),H};return {context:L,cacheTokenForPart:()=>`${t}|${g}|${d}|${b.size}`,drawingTokenForParagraph:v=>{let w=p.get(v);if(w?.resourceEpoch===g)return w.token;let F=P(v);if(F.length===0)return p.set(v,{resourceEpoch:g,token:""}),"";let M=F.map(H=>pL(b.get(H)??null,H,T,j=>f.get(SR(j))??0)).sort(),S=me(M);return p.set(v,{resourceEpoch:g,token:S}),S},pendingResourceCount:()=>u.size,isCompatibleWith:(v,w)=>{let F=Xa$1(w);if(F.cacheToken!==h.cacheToken)return false;if(v===n)return true;let M=_p(v);if(R&&M&&R.size===M.size){let H=true;for(let[j,_]of R)if(M.get(j)!==_){H=false;break}if(H)return true}let S=fb$1(v,{resolveRelationship:ab$1(w,t),resolveSchemeColor:F.resolveSchemeColor,resolveStyleMatrixReference:F.resolveStyleMatrixReference});if(S.size!==b.size)return false;for(let[H,j]of b){let _=S.get(H);if(!_||jp(_)!==jp(j))return false}return true},dispose:()=>{l=true,d+=1;for(let v of c.values())v.kind==="ready"&&s(v.validatedHandle);c.clear(),u.clear(),f.clear();}}}var wR=0;function uj(e){let t=e.session.packageRevision(),n=e.session.currentPackage(),r=e.resourceLookup??tb$1(n,{decodePort:e.decodePort}),o=new Map,a=new Map,i=new WeakMap,s=new Map,l=new Map,d=m=>{s.set(m.resourceKey,m);let g=hb$1(m);g&&l.set(m.resourceKey,g);},c=m=>{s.delete(m.resourceKey);let g=l.get(m.resourceKey);g&&(ib$1(g),l.delete(m.resourceKey));},u=(m,g)=>{let h=g.currentPackage().parts.get(m)??a.get(m);if(h)return h;if(m===g.part().name)return g.part();throw new Error(`Missing inline drawing part ${m}`)},f=(m,g)=>{let y=o.get(m);if(y)return y;let h=u(m,g);a.set(m,h);let b=fL({ownerPartName:m,part:h,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(m,b),wR+=1,i.set(b,wR),b},p=m=>{let g=m.currentPackage();if(g.partBytes===n.partBytes&&g.relationships===n.relationships&&g.contentTypes===n.contentTypes){for(let[h,b]of o){let R=g.parts.get(h)??(h===m.part().name?m.part():void 0);if(R&&b.isCompatibleWith(R,g)){a.set(h,R);continue}b.dispose(),o.delete(h),a.delete(h);}t=m.packageRevision(),n=g;return}for(let h of o.values())h.dispose();o.clear(),a.clear();for(let h of l.values())ib$1(h);l.clear(),s.clear(),e.resourceLookup||r.dispose(),t=m.packageRevision(),n=g,r=e.resourceLookup??tb$1(g,{decodePort:e.decodePort});};return Object.freeze({get bodyContext(){return f(e.session.part().name,e.session).context},contextForPart(m){return f(m,e.session).context},cacheTokenForPart(m){let g=f(m,e.session);return `${i.get(g)??0}|${g.cacheTokenForPart()}`},drawingTokenForParagraph(m,g){let y=f(g,e.session);return `${i.get(y)??0}|${y.drawingTokenForParagraph(m)}`},pendingResourceCount(){let m=0;for(let g of o.values())m+=g.pendingResourceCount();return m},mintValidatedBytes(m,g){return s.get(m.resourceKey)!==m?null:gb$1(m,g)},sync(m){m.packageRevision()===t&&m.currentPackage()===n||p(m);},dispose(){for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of l.values())ib$1(m);l.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function pL(e,t,n,r){if(!e)return me([t,"refused"]);let o=[t,jp(e),cs(n(e))];return r&&o.push(String(r(e))),me(o)}function kR(e,t,n){if(t===void 0)return IR(e,n);let r=vR.get(e);if(r&&r.epoch===t)return r.token;let o=IR(e,n);return vR.set(e,{epoch:t,token:o}),o}var vR=new WeakMap;function IR(e,t){return Oo(e,t)}function tc(e){return {...e,measuringOnly:true,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function nc(e){let t=[],n=0;for(let r of e.members){let o=Pe(r).length;t.push({paragraphId:r.id,base:n,length:o}),n+=o;}return {members:t,total:n}}function Gp(e,t){let n;for(let r of e.members){if(r.base>t)break;(n===void 0||r.length>0||r.base>n.base)&&(n=r);}return n??e.members[e.members.length-1]}function OR(e,t){let n=Gp(t,e.start);if(!n)return e;let r=e.end-n.base;return {paragraphId:n.paragraphId,start:e.start-n.base,end:Math.min(r,n.length)}}function mL(e,t){return {...e,range:OR(e.range,t)}}function rc(e,t){return e.map(n=>{let r=n.spans.map(u=>mL(u,t)),o=r[0],a=n.drawings?.map(u=>{let f=Gp(t,u.start);return f?{...u,paragraphId:f.paragraphId,start:u.start-f.base}:u}),i=o?r.filter(u=>u.range.paragraphId===o.range.paragraphId):[],s=o?(a??[]).filter(u=>u.paragraphId===o.range.paragraphId):[],l=o?{paragraphId:o.range.paragraphId,start:Math.min(o.range.start,...s.map(u=>u.start)),end:Math.max(i[i.length-1].range.end,...s.map(u=>u.start+1))}:OR(n.range,t),d=a,c=n.deletedRanges?.map(u=>({deleted:u,member:Gp(t,u.start)})).filter(({member:u})=>u?.paragraphId===l.paragraphId).map(({deleted:u,member:f})=>({start:u.start-(f?.base??0),end:u.end-(f?.base??0)}));return {...n,range:l,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}function CR(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function Wp(e,t,n,r,o){let a=CR(o);if(!(e.length===0||!a||!o.inlineDrawingLayout||!o.anchorFrameBase||!o.pageContentClip))for(let i of e){let s=null,l=null,d=i.lines;for(let u of t){for(let f of u.blocks)if(f.kind==="paragraph"&&f.paragraphId===i.paragraphId){s=f.box,d=f.lines,l=u.box;break}if(s)break}if(!s)continue;let c=l??Object.freeze({x:i.cellOriginX,y:n,width:i.cellContentWidth,height:r});a(Mr({paragraph:i.paragraph,paragraphId:i.paragraphId,paragraphBox:s,lines:d,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(s)??s,cellBox:c,pageClip:o.pageContentClip(),measurer:o.measurer,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}}function LR(e,t){let n=CR(e),r=e.deferAnchoredDrawings;return !n&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:n,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{t.push(i);}},flushDeferred:(i,s,l)=>{if(t.length!==0){if(n&&!e.anchorDeferOnly)Wp(t,i,s,l,e);else if(r)for(let d of t)r(d);t.length=0;}}}}var ER=new WeakMap;function us(e){let t=hf(e.borders);return t===""?"":`${t}@${e.indent.left},${e.indent.right}`}function Vp(e,t,n){ER.set(e,{styleCascade:t.styleCascade,tableCellStyle:t.tableCellStyle,listItem:t.listItems?.get(e.id),key:n});}function gL(e,t){let n=t.listItems?.get(e.id),r=ER.get(e);if(r&&r.styleCascade===t.styleCascade&&r.tableCellStyle===t.tableCellStyle&&r.listItem===n)return r.key;let o=us(Io(e,1,t.styleCascade,n,t.tableCellStyle,true));return Vp(e,t,o),o}function MR(e,t){return e&&e.kind==="paragraph"?gL(e,t):""}function oc(e,t,n,r=0){if(!e||!e.markerText||!n)return;let o=t.measure(e.markerText,e.markerStyle),a=jd(e,o,n.y,n.height);if(a)return {text:e.markerText,style:e.markerStyle,box:{x:a.x+r,y:a.y,width:a.width,height:a.height},level:e.ilvl,numId:e.numId,numFmt:e.numFmt,...e.ordinal===void 0?{}:{ordinal:e.ordinal}}}var qp=8;function Xp(e,t){return t?{...t,caret:Ha(e,t.caret)}:null}var BR=new WeakMap;function ic(e){let t=BR.get(e);if(t)return t;let n=[],r=new Map,o=new Map,a=new Map,i=new Map,s=new Map,l=(c,u)=>{for(let f of c){if(f.kind==="paragraph"){if(!u)for(let p of f.lines)o.set(p.range.paragraphId,p.id);continue}for(let p of f.rows){if(!p.isHeaderRepeat&&!r.has(p.id)){let m=a.get(f.tableId)??0;r.set(p.id,m),a.set(f.tableId,m+1);}for(let m of p.cells){if(!p.isHeaderRepeat&&!u){let g=`${f.tableId}|${m.gridColumn}`;if(m.blocks.length===0){let y=s.get(g);y&&i.set(m,y);}else s.set(g,{row:p,cell:m});}l(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)n.push(c.box.y),l(c.fragments,false);let d={pageTops:n,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return BR.set(e,d),d}function ms(e,t){let n=ic(e).pageTops;if(n.length===0)return -1;let r=0,o=n.length-1,a=0;for(;r<=o;){let i=r+o>>1;n[i]<=t?(a=i,r=i+1):o=i-1;}return a}function yL(e,t){let n=e.pages[ms(e,t.y)];if(!n)return false;for(let r of [n.header,n.footer])if(r&&lc(r.box,t))return true;return false}function Yp(e,t,n,r=false){if(!e||e.length===0)return null;let o=[...e].sort((a,i)=>a.behindDocument!==i.behindDocument?a.behindDocument?-1:1:i.relativeHeight-a.relativeHeight);for(let a of o){if(r&&a.behindDocument||!fs(a,t))continue;let i={paragraphId:a.anchorParagraphId,offset:a.start};return {position:i,caret:{position:i,x:a.x,y:a.y,height:a.height,lineId:"",pageIndex:n},pageIndex:n,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function sc(e,t,n,r={}){let o=e.pages[t];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??qp,measurer:r.measurer},i=NR(e,o.index,n),s=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),l=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=Yp(s,n,a.pageIndex);if(d)return {...d,contentControlId:i};let c=Xp(e,ac(o.fragments,n,a,null));if(c?.onGlyphs)return {...c,contentControlId:i};let u=Yp(l,n,a.pageIndex);if(u)return {...u,contentControlId:i};if(c)return {...c,contentControlId:i};for(let f=1;f<e.pages.length;f+=1)for(let p of [t-f,t+f]){let m=e.pages[p];if(!m)continue;let g=Xp(e,ac(m.fragments,n,{...a,pageIndex:m.index},null));if(g)return {...g,contentControlId:NR(e,m.index,n)}}return null}function Cj(e,t,n,r,o={}){let a=e.pages[t];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??qp,measurer:o.measurer};return Xp(e,ac(n,r,i,null))}function hL(e,t,n={}){let r=e.pages[ms(e,t.y)];if(!r)return null;for(let o of [r.header,r.footer]){if(!o?.anchoredDrawings||o.anchoredDrawings.length===0)continue;let a=Object.freeze({x:t.x-o.box.x,y:t.y-o.box.y}),i=Yp(o.anchoredDrawings,a,r.index);if(i)return i}return sc(e,r.index,{x:t.x-r.contentBox.x,y:t.y-r.contentBox.y},n)}function lc(e,t){return t.x>=e.x&&t.x<e.x+e.width&&t.y>=e.y&&t.y<e.y+e.height}function dc(e,t,n){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===t&&lc(i.box,n)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function NR(e,t,n){return dc(e,t,n)?.id??null}function Up(e,t,n){let r=Math.max(e.x-t.x,0,t.x-(e.x+e.width)),o=Math.max(e.y-t.y,0,t.y-(e.y+e.height));return r+o*n}function bL(e,t,n){return e.kind!=="table"||Math.max(e.box.y-t.y,0,t.y-(e.box.y+e.box.height))>0?Up(e.box,t,n):0}function ac(e,t,n,r){if(e.length===0)return null;let o=null;for(let i of e){if(!lc(i.box,t))continue;o=i;let s=AR(i,t,n,r);if(s)return s;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:bL(i,t,n.verticalWeight)})).sort((i,s)=>i.score-s.score);for(let{block:i}of a){let s=AR(i,t,n,r);if(s)return s}return null}function AR(e,t,n,r){return e.kind==="paragraph"?xL(e,t,n,r,lc(e.box,t)):TL(e,t,n)}function xL(e,t,n,r,o){let a=SL(e.lines,t.y);if(!a)return null;let i=vL(a,t.x,t.y,n),s=PL(a,t.x),l=Math.min(Math.max(i.offset,s.start),s.end),d={paragraphId:s.paragraphId,offset:l},c=gs(a,l,n.measurer,s);return {position:d,caret:{position:d,x:i.x,y:c.y,height:c.height,lineId:a.id,pageIndex:n.pageIndex},pageIndex:n.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&t.y>=a.box.y&&t.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?RL(i.drawing):null}}function SL(e,t){if(e.length===0)return null;for(let o of e)if(t>=o.box.y&&t<o.box.y+o.box.height)return o;let n=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=t<o.box.y?o.box.y-t:t-(o.box.y+o.box.height);a<r&&(r=a,n=o);}return n}function RL(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function PL(e,t){let n=Ue(e),r=n[0];for(let o of n){let a=o.spans[0];if(a===void 0)continue;let i=o.spans[o.spans.length-1];if(t>=a.box.x&&(r=o),t<i.box.x+i.box.width)break}return r}function wL(e,t,n){for(let r of n??e.drawings??[])if(r.start===t||r.start+1===t)return r;return null}function fs(e,t){let n=e.hitBounds;return t.x<n.x||t.x>=n.x+n.width||t.y<n.y||t.y>=n.y+n.height?false:Rf(t.x,t.y,e.geometry)}function vL(e,t,n,r){let o=e.spans;for(let l of e.drawings??[])if(fs(l,{x:t,y:n}))return {offset:l.start,x:l.hitBounds.x,withinSpan:true,drawing:l};if(o.length===0&&(e.drawings?.length??0)>0){let l=e.drawings[0];if(t<=l.advanceStart)return {offset:e.range.start,x:l.advanceStart,withinSpan:false,drawing:l};let d=e.drawings[e.drawings.length-1];if(t>=d.advanceEnd)return Kp(e,d.advanceEnd,r);for(let c of e.drawings??[])if(t>=c.advanceStart&&t<c.advanceEnd){let u=t>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:fs(c,{x:t,y:n}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(t<=a.box.x)return {offset:e.range.start,x:a.box.x,withinSpan:false};let i=o[o.length-1],s=i.box.x+i.box.width;if(t>=s)return Kp(e,s,r);for(let l of o)if(t>=l.box.x&&t<l.box.x+l.box.width)return IL(l,t,r);for(let l=0;l<o.length;l+=1){let d=o[l];for(let c of e.drawings??[]){if(t>=c.advanceStart&&t<c.advanceEnd){let u=fs(c,{x:t,y:n}),f=t>=c.x+c.width/2;return {offset:f?c.start+1:c.start,x:f?c.advanceEnd:c.advanceStart,withinSpan:u,drawing:c}}if(!(c.start<=d.range.start&&c.hitBounds.x+c.hitBounds.width<=d.box.x)){if(fs(c,{x:t,y:n}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(t<d.box.x&&t>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(t<c.hitBounds.x&&t>=(o[l-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(t<d.box.x){let c=o[l-1],u=c.box.x+c.box.width;return t-u<=d.box.x-t?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return Kp(e,s,r)}function Kp(e,t,n){let r=GR(n.layout,e);if(r===e.range.end)return {offset:r,x:t,withinSpan:false};for(let o=e.spans.length-1;o>=0;o-=1){let a=e.spans[o];if(r<a.range.start)continue;let i=r-a.range.start,s=n.measurer?ps(a,i,n.measurer):a.box.width*(a.range.end>a.range.start?i/(a.range.end-a.range.start):0);return {offset:r,x:a.box.x+s,withinSpan:false}}return {offset:r,x:t,withinSpan:false}}function GR(e,t){let n=t.range.end;if(n>t.range.start&&$p(t,n-1)===Ec$1)return n-1;if(ic(e).lastLineIdOfParagraph.get(t.range.paragraphId)===t.id)return n;let r=n;for(r>t.range.start&&$p(t,r-1)===`
|
|
16
|
+
`&&(r-=1);r>t.range.start&&$p(t,r-1)===" ";)r-=1;return r}function $p(e,t){for(let n of e.spans)if(!(t<n.range.start||t>=n.range.end))return n.text.length!==n.range.end-n.range.start?null:n.text[t-n.range.start]??null;return null}var DR=new WeakMap,_R=new WeakMap;function HR(e){let t=Nu(),n=DR.get(e);if(n&&n.epoch===t)return n.boundaries;let r=[0];for(let o of Xt(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),DR.set(e,{epoch:t,boundaries:r}),r}function ps(e,t,n){let r=e.caretEdges;if(r&&t>=0&&t<r.length)return r[t];let o=_R.get(n);o||(o=new WeakMap,_R.set(n,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(t);if(i!==void 0)return i;let s=t<=0?0:qn(e.text.slice(0,t),Nt(e.style,e.fontSlot),n),l=e.lineEndWhitespace?Math.min(s,e.box.width):s;return a.set(t,l),l}function Zp(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function cc(e,t,n){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(t-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!n||Zp(e)?e.box.x+e.box.width*(o/r):e.box.x+ps(e,o,n)}function gs(e,t,n,r){let o=wL(e,t,r?.drawings);if(o)return {x:t>o.start?o.advanceEnd:o.advanceStart,y:o.y,height:o.height};let a=r?r.spans:e.spans;if(a.length===0){let d=e.leading??0,c=Math.max(0,e.box.height-d-(e.trailingSpacing??0));if(c<=0&&e.box.height<=0){let u=Math.max(0,e.baseline);return {x:e.contentX,y:e.box.y-u,height:u}}return {x:e.contentX,y:e.box.y+d,height:c}}let i=a[0];for(let d=0;d<a.length;d+=1){let c=a[d];if(t>c.range.start&&t<c.range.end){i=c;break}if(t===c.range.end){let u=a[d+1];if(u&&u.range.start===t&&Zp(c)){i=u;break}if(u&&u.range.start===t&&c.text.endsWith(" ")&&u.box.x-(c.box.x+c.box.width)>.25){i=u;break}i=c;}else t>c.range.end&&(i=c);}let s=cc(i,t,n),l=n?.lineMetrics(Nt(i.style,i.fontSlot));return !l||l.height<=0?{x:s,y:e.box.y,height:e.box.height}:{x:s,y:e.box.y+e.baseline-l.baseline-Cu(i.style),height:l.height}}function IL(e,t,n){let r=t-e.box.x,o=e.range.end-e.range.start;if(o<=0||Zp(e)){let p=r>e.box.width/2;return {offset:p?e.range.end:e.range.start,x:p?e.box.x+e.box.width:e.box.x,withinSpan:true}}if(!n.measurer){let p=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),m=Math.round(p*o),g=HR(e),y=g[0],h=Number.POSITIVE_INFINITY;for(let b of g){let R=Math.abs(b-m);R<h&&(h=R,y=b);}return {offset:e.range.start+y,x:e.box.x+e.box.width*(y/o),withinSpan:true}}let a=HR(e),i=1,s=a.length-1;for(;i<s;){let p=i+s>>1;ps(e,a[p],n.measurer)<r?i=p+1:s=p;}let l=a[i],d=a[i-1],c=ps(e,l,n.measurer),u=ps(e,d,n.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:l),x:e.box.x+(f?u:c),withinSpan:true}}function jR(e,t,n,r){if(e.length===0)return null;for(let i of e){let s=n(i);if(t>=s&&t<s+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let s=n(i),l=t<s?s-t:t-(s+r(i));l<a&&(a=l,o=i);}return o}function FL(e,t,n,r){return {tableId:t.tableId,rowId:n.id,cellId:r.id,rowIndex:ic(e).rowIndexById.get(n.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function TL(e,t,n,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],s=jR(a,t.y,d=>d.box.y,d=>d.box.height);if(s){let d=jR(s.cells,t.x,c=>c.box.x,c=>c.box.width);d&&i.push(kL(n,s,d));}let l=[];for(let d of a)for(let c of d.cells)c.blocks.length!==0&&(i.some(u=>u.cell===c)||l.push({entry:{row:d,cell:c},score:Up(c.box,t,n.verticalWeight)}));l.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...l.map(u=>u.entry)]){let u=FL(n.layout,e,d,c),f=c.textDirection==="btLr"?hx(t,c.box):t,p=ac(c.blocks,f,n,u);if(p)return p}return null}function kL(e,t,n){return n.blocks.length>0?{row:t,cell:n}:ic(e.layout).mergeOriginOf.get(n)??{row:t,cell:n}}function WR(e,t){let n=t.paintBounds;return n.width<=0||n.height<=0?null:Object.freeze({pageIndex:e,x:n.x,y:n.y,width:n.width,height:n.height,record:t})}function OL(e,t,n){for(let r of t.lines)for(let o of r.drawings??[])if(o.drawingNodeId===n)return WR(e,o);return null}function VR(e,t,n){if(t.kind==="paragraph")return OL(e,t,n);for(let r of t.rows)for(let o of r.cells)for(let a of o.blocks){let i=VR(e,a,n);if(i)return i}return null}function zR(e,t,n){for(let r of t){let o=VR(e,r,n);if(o)return o}return null}function CL(e,t){for(let n of e.pages){for(let o of n.anchoredDrawings??[])if(o.drawingNodeId===t)return WR(n.index,o);let r=zR(n.index,n.fragments,t);if(r)return r;for(let o of [n.header,n.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==t)continue;let s=i.paintBounds;return s.width<=0||s.height<=0?null:Object.freeze({pageIndex:n.index,x:o.box.x+s.x-n.contentBox.x,y:o.box.y+s.y-n.contentBox.y,width:s.width,height:s.height,record:i})}let a=zR(n.index,o.fragments,t);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:n.index,x:n.header?.box.x===o.box.x||n.footer?.box.x===o.box.x?o.box.x+i.x-n.contentBox.x:a.x,y:o.box.y+i.y-n.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function LL(e){let t=[0],n=0;for(let r of e)n+=r,t.push(n);return t}function EL(e,t){let n=t.get(e.id);return n===void 0&&(e.isHeaderRepeat?n=0:(n=t.size,t.set(e.id,n))),{...e,rowIndex:n}}function uc(e,t,n,r){return {...e,nestingDepth:n,columnEdges:e.columnEdges??LL(t),rows:e.rows.map(o=>EL(o,r))}}var KR=new WeakMap,Ya=4,Jp=6,$R=14,ML={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function Qp(e,t,n,r,o){for(let a of e){if(a.kind!=="table")continue;let i=a.nestingDepth??r;for(let s of a.rows){o({pageIndex:t,table:a,row:s,rowOrdinal:s.rowIndex,nestingDepth:i,editable:!s.isHeaderRepeat,pageContentBox:n});for(let l of s.cells)Qp(l.blocks,t,n,i+1,o);}}}function Mj(e){let t=KR.get(e);if(t)return t;let n=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=s=>{n.push(s);};Qp(a.fragments,o,a.contentBox,0,i);for(let s of [a.header,a.footer])s&&Qp(s.fragments,o,s.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(n)});return KR.set(e,r),r}function Bj(e){let t=e.sourceRevision;switch(e.kind){case "rowDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${t}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function Nj(e){switch(e.kind){case "rowDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function Aj(e,t){if(t.kind==="insertRow"){for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat)return n.editable?{kind:"insertRow",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}:null;return null}for(let n of e.occurrences)if(n.pageIndex===t.pageIndex&&n.table.tableId===t.tableId&&n.row.id===t.rowId&&n.row.isHeaderRepeat===t.isHeaderRepeat&&n.editable)for(let r=0;r<n.table.columnEdges.length-1;r+=1){let o=ys(n.row,r);if(o===t.gridColumnId)return {kind:"insertColumn",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:n.table.tableId,rowId:n.row.id,gridColumnId:o,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth}}return null}function ys(e,t){for(let n of e.cells)if(n.gridColumn===t)return n.gridColumnId??null;return null}function BL(e,t,n,r,o){if(!e.pages[t.pageIndex])return null;let i=t.pageContentBox,s=n-i.x-o,l=r-i.y,d=t.table,c=s-d.box.x,u=l-d.box.y;return c<-Ya||u<-$R||c>d.box.width+Ya||u>d.box.height+Jp?null:{x:c,y:u}}function NL(e,t,n,r){if(t.row.isHeaderRepeat)return null;let o=t.table,a=t.row.box.y-o.box.y+t.row.box.height;if(!o.columnEdges.slice(1).some(l=>Math.abs(n-l)<=Ya)&&n>=0&&n<=o.box.width&&Math.abs(r-a)<=Ya)return {kind:"rowDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeY:a};if(r<t.row.box.y-t.table.box.y||r>t.row.box.y-t.table.box.y+t.row.box.height)return null;for(let l=1;l<o.columnEdges.length-1;l+=1){let d=o.columnEdges[l];if(Math.abs(n-d)>Ya)continue;let c=ys(t.row,l-1),u=ys(t.row,l);if(!(!c||!u))return {kind:"columnDivider",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:d,sheetY:t.pageContentBox.y+o.box.y+r}}let s=o.columnEdges.at(-1);if(Math.abs(n-s)<=Ya){let l=o.columnEdges.length-2,d=ys(t.row,l);return d?{kind:"rightEdge",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:t.row.id,gridColumnId:d,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth,edgeX:s,sheetY:t.pageContentBox.y+o.box.y+r}:null}return null}function Dj(e,t,n,r,o=0,a){let i=a??ms(r,n),s=i>=0?o:0,l=null,d=-1,c=-1,u=f=>{if(!f)return;let p=ML[f.kind];f.nestingDepth<d||f.nestingDepth===d&&p<=c||(d=f.nestingDepth,c=p,l=f);};for(let f of e.occurrences){if(i>=0&&f.pageIndex!==i)continue;let p=BL(r,f,t,n,s);if(!p||(u(NL(e,f,p.x,p.y)??{kind:"tableBody",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,nestingDepth:f.nestingDepth,editable:f.editable}),!f.editable))continue;let m=f.row.box.y-f.table.box.y;p.x<=Jp&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+Jp&&u({kind:"insertRow",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});for(let g=0;g<f.table.columnEdges.length-1;g+=1){let y=f.table.columnEdges[g],h=f.table.columnEdges[g+1],b=(y+h)/2;if(Math.abs(p.x-b)>(h-y)/2+2||p.y>$R)continue;let R=ys(f.row,g);if(R){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:R,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return l}var XR=1048576;function em(e=XR){let t=e|0;return {cellsRemaining:t>0?t:0}}function fc(e,t,n,r){let o=new Map,a=new Map,i=r?.pageFragment===true,s=i?new Set:null,l=i,c=p=>{let m=a.get(p);m&&(o.set(m.id,m.span),a.delete(p));},u=()=>n!==void 0&&n.cellsRemaining<=0,f=()=>{for(let p of [...a.keys()])c(p);};for(let p of e){if(u()){f();break}l&&p.isHeaderRepeat!==true&&(l=false,f(),s?.clear());let m=new Set,g=false;for(let y of p.cells){if(n){if(n.cellsRemaining<=0){g=true;break}n.cellsRemaining-=1;}let h=Math.max(0,Math.min(y.gridColumn|0,1023));if(m.add(h),y.vMergeContinue){let b=a.get(h);b?b.span+=1:s&&!s.has(h)&&(a.set(h,{id:y.id,span:1}));}else c(h),a.set(h,{id:y.id,span:1});s?.add(h);}if(g){f();break}for(let y of [...a.keys()])m.has(y)||c(y);}return f(),o}var pc=.001;function AL(e,t){return {...e,height:{rule:"auto"},cells:[t]}}function DL(e){let t=fc(e),n=[],r=new Map;for(let o=0;o<e.length;o+=1)for(let a of e[o].cells){let i=t.get(a.id);if(i===void 0||i<2)continue;let s=Math.min(o+i-1,e.length-1);if(s<=o)continue;n.push({span:{headRow:o,endRow:s,headCellId:a.id},cell:a});let l=r.get(o);l?l.add(a.id):r.set(o,new Set([a.id]));}return {heads:n,headIdsByRow:r}}function _L(e,t){if(e.length===0||!e.some(P=>P.cells.some(x=>x.vMergeContinue)))return null;let{heads:n,headIdsByRow:r}=DL(e);if(n.length===0)return null;let o=new Map(n.map(P=>[P.span,P])),a=new Map;for(let P of n){let x=a.get(P.span.headRow);x?x.push(P.span):a.set(P.span.headRow,[P.span]);}for(let P of a.values())P.sort((x,v)=>v.endRow-x.endRow);let i=new Map,s=new Map,l=new Map,d=new Map,c=new Set,u=new Set,f=new Set,p=new Set,m=new Map,g=new Map,y=(P,x,v)=>{let w=new Set;for(let j of r.get(P)??[])(f.has(j)||j===x)&&w.add(j);let F=v===void 0?"":`@${v.toFixed(2)}`,M=`${P}${F}\0${[...w].sort().join("\0")}`,S=i.get(M);if(S!==void 0)return S;let H=t(e[P],w,v);return i.set(M,H),H},h=(P,x)=>{let v=x===void 0?P:`${P.headCellId}@${x.toFixed(2)}`,w=s.get(v);if(w!==void 0)return w;let F=o.get(P),M=t(AL(e[P.headRow],F.cell),void 0,x);return s.set(v,M),M},b=(P,x,v)=>y(P,x,v)+(l.get(P)??0),R=P=>{for(let x=P.headRow+1;x<=P.endRow;x+=1)if(r.has(x))return true;return false},I=(P,x)=>{let v=0;for(let w=P.headRow;w<=P.endRow;w+=1)v+=b(w,P.headCellId,x===void 0?void 0:x+v);return v},T=(P,x)=>{let v=new Map,w=0;for(let F=P.headRow;F<=P.endRow;F+=1){let M=b(F,P.headCellId,x===void 0?void 0:x+w);v.set(F,M),w+=M;}return v},k=P=>{for(let x=P.endRow;x>=P.headRow;x-=1)if(e[x].height.rule!=="exact")return x},L=(P,x)=>{if(R(P)||p.has(P.headRow)&&!u.has(P))return Number.POSITIVE_INFINITY;let v=I(P,x);return k(P)===void 0?v:Math.max(v,h(P,x))};return {spansAt:P=>a.get(P)??[],heightOf:L,accept:(P,x)=>{if(u.has(P)||R(P)||p.has(P.headRow))return;let v=T(P,x),w=0;for(let H of v.values())w+=H;let F=k(P),M=h(P,x);if(F===void 0&&M>w+pc)return;let S=F===void 0?0:M-w;u.add(P),f.add(P.headCellId),p.add(P.headRow),S>pc&&(l.set(F,(l.get(F)??0)+S),v.set(F,(v.get(F)??0)+S));for(let[H,j]of v)c.add(H),d.set(H,Math.max(d.get(H)??0,j));m.set(P,x),g.set(P,S>pc?F:void 0);},withdrawAt:P=>{for(let x of a.get(P)??[]){if(!u.delete(x))continue;f.delete(x.headCellId),p.delete(x.headRow),m.delete(x);let v=g.get(x);v!==void 0&&l.delete(v),g.delete(x);for(let w=x.headRow;w<=x.endRow;w+=1)c.delete(w),d.delete(w);}},rowOptions:P=>{if(!c.has(P))return;let x;for(let v of a.get(P)??[])u.has(v)&&(x??=new Map,x.set(v.headCellId,L(v,m.get(v))));return {...x?{detachedSpanHeightPtByCellId:x}:{},heightFloorPt:d.get(P)??b(P)}}}}function YR(e,t,n,r){for(let o of e?.spansAt(t)??[])n+e.heightOf(o,n)>r+pc||e.accept(o,n);return e?.rowOptions(t)}function UR(e,t,n,r,o){return _L(e.rows,(a,i,s)=>o(a,e.columnWidthsPt,typeof t=="function"?t():t,n,r,e.cellSpacingPt,i?{detachedSpanHeightPtByCellId:new Map([...i].map(l=>[l,Number.POSITIVE_INFINITY]))}:void 0,s))}function qR(e,t,n){for(let r of e?.spansAt(t)??[])e.accept(r,n);return e?.rowOptions(t)}function mc(e,t){return {top:e.top+Ar(t.top),right:e.right+Ar(t.right),bottom:e.bottom+Ar(t.bottom),left:e.left+Ar(t.left)}}function HL(e,t,n){return {top:t?{state:"none"}:e.top,left:e.left,bottom:n?{state:"none"}:e.bottom,right:e.right}}function gc(e,t,n){return !t&&!n?e:{...e,cells:e.cells.map(r=>({...r,borders:HL(r.borders,t,n)}))}}function jL(e,t,n,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=t.find(s=>s.kind==="paragraph"&&s.id===o.paragraphId);!a||a.kind!=="paragraph"||Ht(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,Mr({paragraph:a,paragraphId:o.paragraphId,paragraphBox:o.box,lines:o.lines,drawingLayout:r.inlineDrawingLayout,frameBase:r.anchorFrameBase(),columnBox:r.columnBoxForParagraph?.(o.box)??o.box,cellBox:n,pageClip:r.pageContentClip(),measurer:r.measurer,...r.hostedStory?{layoutTextboxStory:r.hostedStory.layoutTextboxStoryFor}:{},...r.displayMode?{displayMode:r.displayMode}:{}}));}}function Ua(e,t){return t===0?[...e]:e.map(n=>n.kind==="table"?{...n,box:{...n.box,y:n.box.y+t},rows:n.rows.map(r=>({...r,box:{...r.box,y:r.box.y+t},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+t},blocks:Ua(o.blocks,t)}))}))}:{...n,box:{...n.box,y:n.box.y+t},...n.shadingBox?{shadingBox:{...n.shadingBox,y:n.shadingBox.y+t}}:{},...n.bottomBorder?{bottomBorder:{...n.bottomBorder,box:{...n.bottomBorder.box,y:n.bottomBorder.box.y+t}}}:{},...n.borders?{borders:n.borders.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}:{},...n.marker?{marker:{...n.marker,box:{...n.marker.box,y:n.marker.box.y+t}}}:{},lines:n.lines.map(r=>({...r,box:{...r.box,y:r.box.y+t},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+t}})),...r.drawings?{drawings:r.drawings.map(o=>Er(o,0,t))}:{}}))})}function hs(e,t,n,r,o,a,i,s){if(e.length===0)return [];let l=new Map;for(let y of n)for(let h of y.cells)l.set(h.id,h);let d=fc(e,a,o,{pageFragment:true}),c=e.map((y,h)=>({...y,cells:y.cells.map(b=>{let R=d.get(b.id);if(b.vMergeContinue&&R===void 0)return {...b,paintInert:true,rowSpan:1,borders:{},blocks:[]};let I=b.vMergeContinue,T=R??1,k=b.box.height;if(T>1){let v=e[h+T-1];k=v.box.y+v.box.height-b.box.y;}let L=l.get(b.id),P=b.blocks;if(L&&L.vAlign!=="top"&&P.length>0){let v=mc(L.margins,L.borders),w=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY;for(let M of P)w=Math.min(w,M.box.y),F=Math.max(F,M.box.y+M.box.height);if(Number.isFinite(w)&&Number.isFinite(F)){let M=L.textDirection==="btLr",S=(M?b.box.width-v.left-v.right:k-v.top-v.bottom)-(F-w),j=b.box.y+(M?v.left:v.top)+(S>0?L.vAlign==="center"?S/2:S:0)-w;if(Math.abs(j)>.001){P=Ua(P,j);for(let _ of P)_.kind==="paragraph"&&i?.(_.paragraphId,j);}}}let x=Object.freeze({x:b.box.x,y:b.box.y,width:b.box.width,height:k});return L&&s&&(T>1||L.vAlign!=="top"&&P.length>0)&&jL(P,L.blocks,x,s),{...b,...I?{vMergeContinue:false,paintInert:false}:{},rowSpan:T,blocks:P,box:{...b.box,height:k}}})})),u=c.map(y=>y.cells.map(h=>{let b=l.get(h.id);return {gridColumn:h.gridColumn,gridSpan:h.gridSpan,vMergeContinue:h.vMergeContinue,borders:b?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:h.rowSpan??1}})),f=t.columnWidthsPt.length,p=t.tableBorders,m={columnWidthsPt:t.columnWidthsPt,rowBands:c.map(y=>({y:y.box.y,height:y.box.height})),cellBoxes:c.map(y=>y.cells.map(h=>({width:h.box.width,height:h.box.height})))},g=Yf(u,p,f,m,void 0,r);return c.map((y,h)=>({...y,cells:y.cells.map((b,R)=>{let I=g[h][R];return b.paintInert||b.vMergeContinue?{...b,borders:{},paintInert:true}:{...b,borders:I}})}))}function JR(e,t,n,r,o){let a=new Map,i=0,s=l=>{let d=Dr(l,t,0,n,r,o);if(d)for(let c of d.rows)for(let u of c.cells)for(let f of u.blocks)f.localName==="p"?a.set(f.id,i++):f.localName==="tbl"&&s(f);};for(let l of e)l.kind==="paragraph"&&l.paragraph?a.set(l.paragraph.id,i++):l.kind==="table"&&l.table&&s(l.table);return a}var hc=4096,ZR=1,Rn=class extends Error{code;constructor(t,n){super(n),this.name="TablePaginationError",this.code=t;}};function tm(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false}))}function yc(e,t,n){let r=0;for(let o=t;o<n&&o<e.length;o+=1)r+=e[o];return r}function zL(e,t,n,r,o,a,i){let s=e.id,l=o.cache?.keyFor?.bind(o.cache)??ns,d=o.listItems?.get(s),c=Io(e,n,o.styleCascade,d,i?.tableCellStyle,true),{props:u,indent:f,available:p,alignment:m,styleId:g,outlineLevel:y,spacing:h,lineSpacing:b,bottomBorder:R,borders:I,shading:T,inheritedRunProperties:k,markRunProperties:L,tabStops:P,tabStopsCacheToken:x}=c,v={styleCascade:o.styleCascade,tableCellStyle:i?.tableCellStyle,listItems:o.listItems},w=us(c);Vp(e,v,w);let F=le=>w!==""&&MR(le,v)===w,M=F(i?.borderNeighbours?.previous),S=F(i?.borderNeighbours?.next),H=M?void 0:I.top,j=S?I.between:R,_=_i(P,o.defaultTabStopPt),C=_===P?x:Ro(_),D=zd(d,f,o.measurer,_,p),z=o.pageExclusionZones?.()??Object.freeze([]),N=o.paragraphOrderIndex?.(s)??Number.MAX_SAFE_INTEGER,A=o.paragraphOrderIndex?Lb(z,N,le=>o.paragraphOrderIndex?.(le)):z,B=Cb(A,t,0,{left:0,right:f.left+p+f.right}),G=_n(B),$=G?`${r.toFixed(3)}|${G}`:"",V=o.refFields?.tokenForParagraph(s)??"",q=o.hostedStory?.hostedListTokenForParagraph?.(e)??"",Y=l({paragraph:e,properties:[...u,...k,...L,{localName:"tabStops",attributes:{token:C}},...d?[{localName:"list",attributes:{token:d.cacheToken}}]:[],...q?[{localName:"txbxList",attributes:{token:q}}]:[],...V?[{localName:"refFields",attributes:{token:V}}]:[]],width:p,producer:o.producer,drawingToken:ts(o.drawingTokenForParagraph?.(e)||o.drawingLayoutToken||"",o.inlineDrawingLayout!==void 0),projectionToken:o.projectionTokenForParagraph?.(e)??"",...$?{exclusionToken:$}:{}});o.cache&&o.onCellBreakKey?.(Y);let U=cd(e,s,f.left,p,o.measurer,o.cache,o.cache?Y:null,k,_,o.pageContext,o.styleCascade?(le,ee)=>ir(le,ee,o.styleCascade):void 0,{lineSpacing:b,equationCacheToken:o.producer,firstLineOffset:D,marginExtent:{left:0,right:f.left+p+f.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:o.bodyPageFields}:{},...o.refFields?{refFields:o.refFields}:{},displayMode:o.displayMode,...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{},...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:f.left+p+f.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:f.left+p+f.right,height:Math.max(1,p)}),...B.length>0?{pageExclusionZones:B}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:L}),K=i?.lineStart??0,Re=i?.fragmentIndex??0,ge=i?.maxBottom??Number.POSITIVE_INFINITY,se=i?.includeAfter??true,he=i?.includeBottomBorder??true,Le=()=>d!==void 0||o.displayMode==="all-markup"&&_h(e,"all-markup",o.revisionAuthorFilter),fe=(i?.collapseHeight??false)&&!Le(),Ee=K===0&&!fe?va(h.before,a):0,te=t+f.left,Fe=K===0&&!fe?Cr(H):0,ye=[],ve=r+Ee+Fe,We=K,Me=false;for(let le=K;le<U.length;le+=1){let ee=U[le],Ve=le===U.length-1,mt=Ve&&he&&j&&!fe?Cr(j):0,we=Ve&&se&&!fe?h.after:0,gr=fe?0:B.length>0?Hn(ve,ee.height,B):ee.exclusionSkipBefore??0;if((fe?ve:ve+gr+ee.height+mt+we)>ge+.001)break;ve+=gr;let on=t+f.left+(le===0?D:0),wt=Math.max(1,p-(le===0?D:0)),Gn=ee.spans.map(Mt=>({...Mt,range:{...Mt.range,paragraphId:s},box:{...Mt.box,x:Mt.box.x+t,y:ve}})),Yr=ld(Gn,o.measurer,on,wt,m,Ve,m==="center"||m==="right"?ee.width:void 0),Ur=Gn.length>0&&Yr.length>0?Yr[0].box.x-Gn[0].box.x:m!=="left"&&m!=="both"?(()=>{let Mt=wt-ee.width;return Mt<=0?0:m==="center"?Mt/2:Mt})():0,As=Object.freeze({x:t,y:r,width:n,height:Math.max(0,ge-r)}),zo=dd(ee.drawings.map(Mt=>Ql(Object.freeze({...Er(Mt,t,ve),paragraphId:s}),As)),Ur);ye.push({id:o.nextLineId(s,ee.start,le),range:{paragraphId:s,start:ee.start,end:ee.end},spans:Yr,...zo.length>0?{drawings:zo}:{},box:{x:t+f.left,y:ve,width:p,height:fe?0:ee.height},contentX:Yr[0]?.box.x??on+Ur,baseline:fe?Math.max(0,Math.min(ee.baseline,i?.collapseBandAbove??0)):ee.baseline,leading:fe?0:ee.leading,trailingSpacing:fe?0:ee.trailingSpacing,...ee.deletedRanges?{deletedRanges:ee.deletedRanges}:{},...ee.anchorRevisions?{anchorRevisions:ee.anchorRevisions}:{}}),fe||(ve+=ee.height),We=le+1,Me=true;}if(!Me)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:K,complete:false,fitted:false};let Be=We>=U.length,ct=ye[0].box.y,Pn=ve,Et=[],Ge,mr=ct,zt=Pn,ot=I.left?Dt(I.left):0,Rt=I.right?Dt(I.right):0,W=I.left?te-I.left.spacePt-ot:te,O=I.right?te+p+I.right.spacePt+Rt:te+p,Z=Math.max(O-W,0);if(Fe>0&&H){let le=Dt(H),ee=ct-H.spacePt-le;Et.push({side:"top",edge:H,box:{x:W,y:ee,width:Z,height:le}}),mr=ee;}if(Be&&he&&j&&!fe){let le=Dt(j),ee=Pn+j.spacePt,Ve={x:W,y:ee,width:Z,height:le};S||(Ge={edge:j,box:Ve}),Et.push({side:S?"between":"bottom",edge:j,box:Ve}),zt=ee+le;}let ne=Be&&se&&!fe?h.after:0,Ie=M&&K===0?r:mr,Q=S&&Be?zt+ne:zt,xe=Math.max(Q-Ie,0);if(I.left&&Et.push({side:"left",edge:I.left,box:{x:te-I.left.spacePt-ot,y:Ie,width:ot,height:xe}}),I.right&&Et.push({side:"right",edge:I.right,box:{x:te+p+I.right.spacePt,y:Ie,width:Rt,height:xe}}),I.bar){let le=Dt(I.bar);Et.push({side:"bar",edge:I.bar,box:{x:te-I.bar.spacePt-le,y:ct,width:le,height:Math.max(Pn-ct,0)}});}let pe=zt+ne,at=T===void 0?void 0:I.left||I.right?{x:W,y:mr,width:Z,height:Math.max(zt-mr,0)}:vi(ye,te,p),Pe=Be&&o.displayMode==="all-markup"?Gl(e,"all-markup",o.revisionAuthorFilter):null,Pt=Pe?.revisions??[],rn=Pe?.formatRevision??null,qe=K===0?oc(d,o.measurer,ye[0]?{y:ye[0].box.y,height:ye[0].box.height}:void 0,t):void 0,Zt=ya(e),Gt=Zt?rc(ye,nc(Zt)):ye,Xe={kind:"paragraph",id:`${s}#f${Re}`,paragraphId:s,fragmentIndex:Re,range:{paragraphId:s,start:Gt[0].range.start,end:Gt[Gt.length-1].range.end},props:u,styleId:g,outlineLevel:y,alignment:m,spacing:{before:Ee,after:ne},indent:f,tabStops:_,...Ge?{bottomBorder:Ge}:{},...Et.length>0?{borders:Et}:{},...T===void 0?{}:{shading:T},...at===void 0?{}:{shadingBox:at},...qe?{marker:qe}:{},...Wl(Pt,rn),lines:Gt,box:{x:te,y:r,width:p,height:pe-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let le=Object.freeze({x:t,y:r,width:n,height:Math.max(0,ge-r)}),ee=Xe.box,Ve={paragraph:e,paragraphId:s,paragraphBox:ee,lines:Gt};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...Ve,cellOriginX:t,cellContentWidth:n}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(Mr({paragraph:e,paragraphId:s,paragraphBox:ee,lines:Gt,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(ee)??ee,cellBox:le,pageClip:o.pageContentClip(),measurer:o.measurer,...o.hostedStory?{layoutTextboxStory:o.hostedStory.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{},...o.revisionAuthorFilter?{revisionAuthorFilter:o.revisionAuthorFilter}:{}}));}return {fragment:Xe,bottom:pe,spaceAfter:ne,nextLineIndex:We,complete:Be,fitted:true}}function Ao(e,t,n,r,o,a){let i=QR(e,t,n,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false});return {blocks:i.blocks,bottom:i.bottom}}function QR(e,t,n,r,o,a,i,s,l,d=false){let c=[],u=r,f=s.previousSpaceAfter,p=s.blockIndex,m=s.lineIndex,g=s.paragraphFragmentIndex,y=false,h=false,b=s.precededByEmittedTable;for(;p<e.length;){let R=e[p];if(R.kind==="table"){m!==0&&(m=0),f=0;let k=WL(R,t,n,u,a+1,i);if(!k){b=false,p+=1;continue}if(k.bottom>o+.001){h=!y;break}c.push(k.fragment),u=k.bottom,y=true,b=true,p+=1,m=0;continue}if(R.kind!=="paragraph"){b=false,p+=1,m=0;continue}let I=d&&p===e.length-1&&b&&$h(R),T=zL(R,t,Math.max(1,n-t),u,i,f,{lineStart:m,fragmentIndex:g,maxBottom:o,includeAfter:true,includeBottomBorder:true,collapseHeight:I,collapseBandAbove:u-r,...l?{tableCellStyle:l}:{},borderNeighbours:{previous:p>0?e[p-1]:void 0,next:e[p+1]}});if(!T.fitted||!T.fragment)break;if(c.push(T.fragment),u=T.bottom,y=true,T.complete)f=T.spaceAfter,b=false,p+=1,m=0,g=0;else return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:T.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:g+1,precededByEmittedTable:b},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:c,bottom:u,cursor:{blockIndex:p,lineIndex:m,previousSpaceAfter:f,paragraphFragmentIndex:g,precededByEmittedTable:b},complete:p>=e.length,fitted:y,nestedSplitBlocked:h}}function qa(e,t,n,r,o,a,i,s=0,l,d=Number.POSITIVE_INFINITY){return bs(e,t,n,r,Number.POSITIVE_INFINITY,o,false,a,i,tm(e),s,l,d)}function bs(e,t,n,r,o,a,i,s,l,d,c=0,u,f=o){let p=u?.detachedSpanHeightPtByCellId,m=yc(t,0,t.length),g=Number.isFinite(c)&&c>0?c/2:0,y=l.measurer.lineMetrics(Mn).height,h=e.height,b=h.rule==="exact"?h.valuePt:void 0,R=h.rule==="atLeast"?h.valuePt:void 0,I=[],{rowDeps:T,flushDeferred:k}=LR(l,I),L=a&&l.pageOccurrenceKey?{...T,nextLineId:(C,D,z)=>T.nextLineId(C,D,z,l.pageOccurrenceKey())}:T,P=b===void 0?o:Math.min(o,r+Math.max(0,b)),x=[],v=false,w=false,F=r;for(let C=0;C<e.cells.length;C+=1){let D=e.cells[C],z=d[C]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0,precededByEmittedTable:false},N=D.gridSpan,A=D.gridColumn,B=n+yc(t,0,A),G=yc(t,A,Math.min(A+N,t.length))||m,$=Math.min(g,Math.max((G-ZR)/2,0)),V=B+$,q=Math.max(G-2*$,ZR),Y=mc(D.margins,D.borders),U=i?Ar(D.borders.top):Y.top,K=p?.get(D.id),Re=K!==void 0,ge=Re?Math.min(f,r+K):P,se=D.textDirection==="btLr",he=se?V+Y.bottom:V+Y.left,Le=se?V+Math.max(0,ge-r)-U:V+q-Y.right,fe=se?r+Y.left:r+U,Ee=se?r+q-Y.right:ge-Y.bottom,te=[],Fe=fe,ye=z,ve=true,We=false,Me=false;if(!D.vMergeContinue)if(Ee<fe+.001)ve=z.blockIndex>=D.blocks.length;else {let ct=QR(D.blocks,he,Le,fe,Ee,s,L,z,D.styleFormatting,true);te=ct.blocks,Fe=ct.bottom,ye=ct.cursor,ve=ct.complete,We=ct.fitted,Me=ct.nestedSplitBlocked,We&&(v=true),Me&&(w=true);}let Be=Math.min(ge,se&&We?r+U+(yx(te,he)-he)+Y.bottom:We?Fe+Y.bottom:r+U+y+Y.bottom);Be>F&&!Re&&(F=Be),x.push({cell:D,x:V,width:q,gridColumn:A,blocks:te,contentTop:fe,contentBottom:Fe,physicalBottom:Be,insets:{...Y,top:U},nextCursor:ye,complete:D.vMergeContinue?true:ve,fitted:We,nestedSplitBlocked:Me});}F=Math.min(P,Math.max(F,r));for(let C of x){if(p?.has(C.cell.id)===true)continue;let D=C.physicalBottom;D>F&&D<=P+.001&&(F=D);}if(F<=r+.001&&x.length>0){let C=r;for(let D of x){let z=r+D.insets.top+y+D.insets.bottom;z>C&&(C=z);}F=Math.min(P,C);}F=Math.min(P,F);let M=false;if(b!==void 0){let C=r+b;C<=o+.001?(F=C,M=true):F=Math.min(o,F);}else {let C=i?0:u?.heightFloorPt??0,D=r+Math.max(R??0,C);D>F&&D<=o+.001&&x.every(N=>N.complete)&&(F=D);}F=Math.min(o,F);let S=Math.max(0,F-r),H=x.map(C=>{let D=C.blocks,z=M?true:C.complete;if(!C.cell.vMergeContinue&&z&&C.cell.vAlign!=="top"&&D.length>0){let N=C.contentBottom-C.contentTop,A=C.cell.textDirection==="btLr"?C.width-C.insets.left-C.insets.right-N:S-C.insets.top-C.insets.bottom-N;if(A>0){let B=C.cell.vAlign==="center"?A/2:A;D=Ua(D,B);}}return {id:C.cell.id,gridColumn:C.gridColumn,...C.cell.gridColumnId?{gridColumnId:C.cell.gridColumnId}:{},gridSpan:C.cell.gridSpan,vMergeContinue:C.cell.vMergeContinue,...C.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...C.cell.shading===void 0?{}:{shading:C.cell.shading},...C.cell.textDirection==="btLr"?{textDirection:"btLr"}:{},blocks:D,box:{x:C.x,y:r,width:C.width,height:S}}}),j=M||x.every(C=>C.complete)?null:x.map(C=>C.nextCursor),_=M||x.every(C=>C.complete);return k(H,r,S),{record:{id:e.id,...e.revisionKind?{revisionKind:e.revisionKind}:{},...e.revisionId!==void 0?{revisionId:e.revisionId}:{},...e.revisionAuthor!==void 0?{revisionAuthor:e.revisionAuthor}:{},...e.revisionDate!==void 0?{revisionDate:e.revisionDate}:{},rowIndex:0,isHeaderRow:e.isHeader,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:H,box:{x:n,y:r,width:m,height:S}},bottom:F,remainder:_?null:j,fitted:v||e.cells.every(C=>C.vMergeContinue)||M,nestedSplitBlocked:w}}function nm(e,t,n,r,o,a=0,i,s){let l=0,d=s!==void 0,c={...tc(o),...d?{}:{pageExclusionZones:void 0},nextLineId:()=>`probe-${l++}`};return qa(e,t,n,s??0,false,r,c,a,i).record.box.height}function GL(e,t,n,r,o,a,i,s,l){let d=u=>qa(e,t.columnWidthsPt,n,r,i,o,a,t.cellSpacingPt,u),c=d(s);return c.remainder===null||s===void 0?c:(l(),d(void 0))}var rm=(e,t,n,r,o)=>r.measuringOnly===true?null:UR(o?{...e,rows:o}:e,t,n,r,nm);function WL(e,t,n,r,o,a){if(o>=Cd)return null;let i=Math.max(1,n-t),s=Dr(e,i,o,a.styleCascade,a.displayMode,a.revisionAuthorFilter);if(!s||s.rows.length===0)return null;let l=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:h=>{l.push(h);}},c=t+Ji(s,i),u=rm(s,c,o,d),f=[],p=r;for(let[h,b]of s.rows.entries()){let R=l.length,I=GL(b,s,c,p,o,d,false,qR(u,h,p),()=>{l.length=R,u?.withdrawAt(h);});f.push(I.record),p=I.bottom;}let m=hs(f,s,s.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let h of l)for(let b of m)if(b.cells.some(I=>I.blocks.some(T=>T.kind==="paragraph"&&T.paragraphId===h.paragraphId))){Wp([h],b.cells,b.box.y,b.box.height,a);break}let g=yc(s.columnWidthsPt,0,s.columnWidthsPt.length),y=new Map;return {fragment:uc({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:m,box:{x:c,y:r,width:g,height:p-r}},s.columnWidthsPt,o,y),bottom:p}}var VL=4,om=256;function KL(e){return `txbx-${e}`}var eP=new WeakMap;function aP(e,t,n,r="all-markup",o){if(!t||t.nums.size===0)return;let a=eP.get(e);if(a&&a.rawIndex===t&&a.styleCascade===n&&a.displayMode===r&&a.authorFilter===o)return a.listItems;let i=os(t,n),s=rf(e,r,o),l=Hd(s,i,n),d=l.size>0?l:void 0;return eP.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,listItems:d}),d}var iP=2e4,am=Object.freeze({contents:Object.freeze([]),truncated:false}),xs=new WeakMap;function $L(e){let t=[],n=0,r=false,o=[e];for(;o.length>0;){let a=o.pop();if(n+=1,n>iP){r=true;break}if(a.kind!=="textValue"&&a.localName==="txbxContent"){t.push(a);continue}if("children"in a)for(let i=a.children.length-1;i>=0;i-=1)o.push(a.children[i]);}return t.length>0||r?Object.freeze({contents:Object.freeze(t),truncated:r}):am}function XL(e){let t=xs.get(e);if(t)return t;if(e.kind!=="table"){let s=$L(e);return xs.set(e,s),s}let n=[],r=0,o=false,a=[{phase:"enter",node:e,paragraphOwners:[]}];for(;a.length>0;){let s=a.pop();if(s.phase==="exit-paragraph"){xs.has(s.scan.paragraph)||xs.set(s.scan.paragraph,s.scan.contents.length>0?Object.freeze({contents:Object.freeze(s.scan.contents),truncated:false}):am);continue}let l=s.node;if(r+=1,r>iP){o=true;break}if(l.kind!=="textValue"&&l.localName==="txbxContent"){n.push(l);for(let c of s.paragraphOwners)c.contents.push(l);continue}if(!("children"in l))continue;let d=s.paragraphOwners;if(l.kind==="paragraph"){let c={paragraph:l,contents:[]};d=Object.freeze([...d,c]),a.push({phase:"exit-paragraph",scan:c});}for(let c=l.children.length-1;c>=0;c-=1)a.push({phase:"enter",node:l.children[c],paragraphOwners:d});}let i=n.length>0||o?Object.freeze({contents:Object.freeze(n),truncated:o}):am;return xs.set(e,i),i}var tP=1,nP=new WeakMap;function YL(e){let t=nP.get(e);return t===void 0&&(t=tP,tP+=1,nP.set(e,t)),t}var rP=new WeakMap;function UL(e,t,n,r="all-markup",o){if(t.nums.size===0)return "";let a=XL(e);if(a.contents.length===0&&!a.truncated)return "";let i=rP.get(e);if(i&&i.rawIndex===t&&i.styleCascade===n&&i.displayMode===r&&i.authorFilter===o)return i.token;let s=[];for(let d of a.contents){let c=aP(d,t,n,r,o);if(c)for(let[u,f]of c)s.push(me([u,f.cacheToken]));}a.truncated&&s.push(`truncated:${YL(t)}`);let l=s.length===0?"":`|txbxlist:${me(s)}`;return rP.set(e,{rawIndex:t,styleCascade:n,displayMode:r,authorFilter:o,token:l}),l}function bc(e,t,n,r,o){return Object.freeze({layoutTextboxStoryFor:e,hostedListTokenForParagraph:!t||t.nums.size===0?null:a=>UL(a,t,n,r,o)})}function xc(e,t){let n=e.textboxStory;if(!n)return null;let r=pt(e.extentEmu.cx),o=pt(e.extentEmu.cy),a=pt(n.insetsEmu.left),i=pt(n.insetsEmu.right),s=pt(n.insetsEmu.top),l=pt(n.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-s-l),u=pt(n.strokeWidthEmu),f={fillHex:n.fillHex,strokeHex:n.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((t.depth??0)>=VL)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:s},...f,fallbackReason:"textbox-nesting-limit"};let m=rf(n.content,t.displayMode,t.revisionAuthorFilter),g=aP(n.content,t.numberingIndex,t.styleCascade,t.displayMode,t.revisionAuthorFilter),y=KL(e.drawingNodeId),h=0,b=Ao(m,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${y}-line-${h++}`,styleCascade:t.styleCascade,...g?{listItems:g}:{},...t.pageContext?{pageContext:t.pageContext}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...t.displayMode?{displayMode:t.displayMode}:{},...t.revisionAuthorFilter?{revisionAuthorFilter:t.revisionAuthorFilter}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:{},...t.projectionTokenForParagraph?{projectionTokenForParagraph:t.projectionTokenForParagraph}:{},...t.projectionTokenForTable?{projectionTokenForTable:t.projectionTokenForTable}:{}}),R=b.blocks,I=b.bottom,T,k=[];if(R.length>om){oP(R.slice(om),k),R=R.slice(0,om);let x=R[R.length-1];I=x?x.box.y+x.box.height:0,T="textbox-fragment-limit";}if(I>c+.001){let x=R.filter(v=>v.box.y<c-.001);x.length<R.length&&(oP(R.filter(v=>v.box.y>=c-.001),k),R=x,T=T??"textbox-height-clip");}let L=Math.max(0,c-I),P=n.verticalAnchor==="center"?L/2:n.verticalAnchor==="bottom"?L:0;return {fragments:R,flowHeight:I,contentOffset:{x:a,y:s+P},...f,...T?{fallbackReason:T}:{},...k.length>0?{clippedResourceToken:me(k)}:{}}}function oP(e,t){ca({fragments:e},n=>{t.push(cs(n.resource));});}var qL=128,sP=new WeakMap;function ZL(e){let t=sP.get(e);if(t!==void 0)return t;let n=A(na$1(e));return sP.set(e,n),n}function JL(e){let t=Math.max(1,Math.floor(e)),n=new Map;return {get(r){let o=n.get(r);if(o!==void 0)return n.delete(r),n.set(r,o),o},set(r,o){for(n.has(r)&&n.delete(r),n.set(r,o);n.size>t;){let a=n.keys().next();if(a.done)break;n.delete(a.value);}},get size(){return n.size}}}function im(e,t,n,r,o,a,i,s=qL,l,d=Te,c,u,f,p,m,g){let y=g?.revisionAuthorFilter,h=Uu(e.root),b=JL(s),R=Ct(e,d,y),I=dr({numberingIndex:g?.numberingIndex,styleCascade:a},R).listItems,T=ZL(e),k,L=P=>{let x=Hr(h)||c?P:void 0,v=x?.pageNumber??p?.pageNumber??1,w=c&&x?.contentInsetTop!==void 0&&x.contentInsetBottom!==void 0&&x.storyTop!==void 0?`|hf:${x.contentInsetTop},${x.contentInsetBottom},${x.storyTop}`:"",F=sp(x,h)+(c?`|pn:${v}`:"")+w;if(F===""){if(k)return k}else {let N=b.get(F);if(N)return N}let M=0,S=[],H=()=>{let N=x?.pageNumber??p?.pageNumber??1,A=p?.pageWidth??t,B=p?.pageHeight??Math.max(1,t),G=p?.marginLeft??0,$=p?.marginRight??0,V=p?.marginTop??0,q=p?.marginBottom??0,Y=Math.max(1,B-V-q),U=x?.contentInsetTop!==void 0&&x.contentInsetBottom!==void 0&&x.storyTop!==void 0?Object.freeze({top:x.contentInsetTop-x.storyTop,height:Math.max(1,B-x.contentInsetTop-x.contentInsetBottom)}):void 0;return Object.freeze({pageNumber:N,pageWidth:A,pageHeight:B,marginLeft:G,marginRight:$,marginBottom:q,contentInsetTop:V,contentInsetBottom:q,contentWidth:t,...U?{verticalMarginFrame:U}:{},contentHeight:Y,contentBandHeight:Y,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},_=c?bc(N=>xc(N,{measurer:n,producer:r+F+(d===Te?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),cache:o,styleCascade:a,...x?{pageContext:x}:{},...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...y?{revisionAuthorFilter:y}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),g?.numberingIndex,a,d,y):void 0,C=Object.freeze([]),D;if(c){let N=false;for(let A=0;A<Po;A+=1){S.splice(0,S.length),M=0,D=Ao(R,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+F+(d===Te?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${M++}`,styleCascade:a,...I?{listItems:I}:{},hostedStory:_,pageContext:x,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...y?{revisionAuthorFilter:y}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{},inlineDrawingLayout:c,anchorFrameBase:H,pageContentClip:()=>{let G=H();return x?.storyTop!==void 0?Object.freeze({x:-G.marginLeft,y:-x.storyTop,width:G.pageWidth,height:G.pageHeight}):Vi(G)},collectAnchoredDrawings:G=>{S.push(...G);},columnBoxForParagraph:G=>Object.freeze({x:0,y:G.y,width:t,height:G.height}),pageExclusionZones:()=>C,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});let B=Nf(S,c,0,t);if(B.length===0){N=true,C=B;break}if(A>0&&_n(C)===_n(B)){N=true,C=B;break}C=B;}if(!N)throw new Oa(`header/footer exclusion reflow did not converge within ${Po} passes`)}else D=Ao(R,0,Math.max(1,t),0,0,{measurer:n,cache:o,producer:r+F+(d===Te?"":`|rev:${d}`)+(y?`|reviewers:${y.cacheKey}`:""),nextLineId:()=>`hf-${e.name}-line-${M++}`,styleCascade:a,...I?{listItems:I}:{},pageContext:x,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...y?{revisionAuthorFilter:y}:{},...m?{documentProperties:m}:{},...g?.projectLink?{projectLink:g.projectLink}:{},...g?.projectFieldLink?{projectFieldLink:g.projectFieldLink}:{},...g?.projectionTokenForParagraph?{projectionTokenForParagraph:g.projectionTokenForParagraph}:{},...g?.projectionTokenForTable?{projectionTokenForTable:g.projectionTokenForTable}:{}});let z={partName:e.name,part:e,contentKey:T,...g?.projectionEpoch?{projectionEpoch:g.projectionEpoch}:{},fragments:D.blocks,flowHeight:D.bottom,pageFieldNeeds:h,...S.length>0?{anchoredDrawings:Object.freeze([...S])}:{},withPageContext:N=>!Hr(h)&&!z.anchoredDrawings?.length?k??z:L(N)};return F===""?k=z:b.set(F,z),z};return L(i)}function Do(e,t,n){let r=n-e.box.y,o=u=>({...u,y:u.y+r}),a=u=>{if(!u)return;let f={...u,box:o(u.box),...u.anchoredDrawings?{anchoredDrawings:u.anchoredDrawings}:{}};if(!u.pageFieldProjector)return up(u,f,r),f;let p=u.pageFieldProjector;return {...f,pageFieldProjector:m=>{let g=p(m);return {...g,box:o(g.box)}}}},i=u=>{if(u)return {...u,box:o(u.box),...u.separator?{separator:{...u.separator,box:o(u.separator.box)}}:{},notes:u.notes.map(f=>({...f,box:o(f.box)}))}},s=a(e.header),l=a(e.footer),d=i(e.footnotes),c=i(e.endnotes);return {...e,id:`page-${t}`,index:t,box:o(e.box),contentBox:o(e.contentBox),...s?{header:s}:{},...l?{footer:l}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var lP=new WeakMap;function QL(e){let t=lP.get(e);if(t!==void 0)return t;let n=[];co(e,o=>{let a=o.marker;a&&n.push(me([o.paragraphId,a.text,a.numFmt,String(a.level)]));});let r=n.length===0?"":`|list:${me(n)}`;return lP.set(e,r),r}var dP=new WeakMap;function eE(e){let t=dP.get(e);if(t!==void 0)return t;let n=[];ca(e,o=>{n.push(cs(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&n.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=n.length===0?"":`!${me(n)}`;return dP.set(e,r),r}function sm(e,t){return me([e,String(t.flowHeight),t.contentKey,t.projectionEpoch??"",eE(t),QL(t)])}function cP(e,t,n){if(!e)return "";let r=(o,a)=>me([...a].map(([i,s])=>sm(`${o}${i}`,s)).sort());return `|hf:${t},${n},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+me([r("h",e.headers),r("f",e.footers)])}var tE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",nE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";function rE(e){let t=new Map;for(let n of e.relationships.get(e.mainDocumentPart)??[]){if(n.type!==tE&&n.type!==nE)continue;let r=E(n);r.mode!=="Internal"||!r.target.ok||t.has(r.target.partName)||t.set(r.target.partName,n.id);}return t}function oE(e){return e.relationships.get(e.mainDocumentPart)??e.relationships}function aE(e){let{view:t,measurer:n,producer:r,cache:o,styleCascade:a,numberingIndex:i,defaultTabStopPt:s,displayMode:l,revisionAuthorFilter:d,inlineDrawingLayoutForPart:c,drawingLayoutTokenForPart:u,drawingTokenForParagraphForPart:f,linkProjectors:p,projectFieldLink:m}=e,g=new WeakMap,y=new WeakMap,h=(P,x,v)=>{if(x.rId===v)return x;let w=y.get(P);w||(w=new WeakMap,y.set(P,w));let F=w.get(x),M=F?.get(v);if(M)return M;let S={...x,rId:v,withPageContext:H=>h(P,x.withPageContext(H),v)};return F||(F=new Map,w.set(x,F)),F.set(v,S),S},b=new Map,R=null,I=(P,x,v)=>(R!==x&&(R=x,b=rE(P)),b.get(v)),T=(P,x,v)=>{let w=p.epochForPart(P.name),F=d?.cacheKey??"",M=s?.(),S=u?.(P.name)??"",H=i?.(),j=a?.(),_=p.projectLinkForPart(P.name),C=g.get(P);if(C&&C.width===x&&C.pageHeight===v.height&&C.marginTop===v.margin.top&&C.marginBottom===v.margin.bottom&&C.marginLeft===v.margin.left&&C.marginRight===v.margin.right&&C.producer===r&&C.projectionEpoch===w&&C.revisionAuthorFilterKey===F&&C.defaultTabStopPt===M&&C.drawingLayoutToken===S&&C.numberingIndex===H&&C.styleCascade===j)return C.story;let D=im(P,x,n,r,o,j,void 0,void 0,M,l,c?.(P.name),f?z=>f(P.name,z):void 0,void 0,{pageNumber:1,pageWidth:v.width,pageHeight:v.height,marginLeft:v.margin.left,marginRight:v.margin.right,marginTop:v.margin.top,marginBottom:v.margin.bottom},t.documentProperties(),{...H?{numberingIndex:H}:{},projectLink:_,...m?{projectFieldLink:m}:{},projectionEpoch:w,projectionTokenForParagraph:z=>p.tokenForParagraphForPart(P.name,z),projectionTokenForTable:z=>p.tokenForTableForPart(P.name,z),...d?{revisionAuthorFilter:d}:{}});return g.set(P,{width:x,pageHeight:v.height,marginTop:v.margin.top,marginBottom:v.margin.bottom,marginLeft:v.margin.left,marginRight:v.margin.right,producer:r,projectionEpoch:w,revisionAuthorFilterKey:F,defaultTabStopPt:M,drawingLayoutToken:S,numberingIndex:H,styleCascade:j,story:D}),D},k=(P,x,v,w,F)=>{if(!v||v.headers.size===0&&v.footers.size===0)return;let M=F.width-F.margin.left-F.margin.right,S=(H,j)=>{let _=new Map;for(let[C,D]of H){let z=j?.get(C),N=z?.partName===D.name?z.rId:I(P,x,D.name),A=T(D,M,F);_.set(C,N?h(x,A,N):A);}return _};return {titlePage:v.titlePage,evenAndOddHeaders:v.evenAndOddHeaders,headers:S(v.headers,w?.headers),footers:S(v.footers,w?.footers)}},L=()=>{let P=t.currentPackage(),x=oE(P),v=Vd(t.part(),l,d),w=Fp(t.part(),l,d),F=t.headerFooterPartsBySection(),M=t.headerFooterResolutionBySection?.()??zc(P);return v.map((S,H)=>{let j=w[H]??H;return k(P,x,F[j],M[j],cr(S.properties))})};return {sectionFurniture:L,furniture(){let P=L();return P[P.length-1]}}}function iE(e,t,n,r,o){let a=Ct(e,r,o);if(!n)return t.map(s=>{if(s.blockStart===s.blockEndExclusive)return;let l=a[s.blockEndExclusive-1];return l?.kind==="paragraph"?Sn(l):void 0});let i=[];for(let s of a){if(s.kind!=="paragraph")continue;let l=Sn(s);l&&i.push(l);}for(;i.length<t.length;)i.push(void 0);return i}function sE(e){let t=e.view.currentPackage(),n=Xe(t,"footnote"),r=Xe(t,"endnote");if(!n&&!r)return;let o=e.view.part();if(Ye(o).length===0)return;let a=ve(t),i=we(a),s=xe(a),l=ye(void 0,i),d=ze(void 0,s),c=Kd(o,e.displayMode,e.revisionAuthorFilter),u=iE(o,c.sections,c.truncated,e.displayMode,e.revisionAuthorFilter),f=c.sections.map((y,h)=>ye(te(u[h]),i)),p=c.sections.map((y,h)=>ze(ue(u[h]),s)),m=e.inlineDrawingLayoutForPart?y=>{let h=e.inlineDrawingLayoutForPart(y);if(h)return {inlineDrawingLayout:h,...e.drawingTokenForParagraphForPart?{drawingTokenForParagraph:b=>e.drawingTokenForParagraphForPart(y,b)}:{}}}:void 0,g=[n,r];return {footnotesPart:n,endnotesPart:r,footnotePropsBySection:f.length>0?f:[l],endnotePropsBySection:p.length>0?p:[d],documentFootnoteProps:l,documentEndnoteProps:d,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade?.(),numberingIndex:e.numberingIndex?.(),defaultTabStopPt:e.defaultTabStopPt,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,projectLinkForPart:e.linkProjectors.projectLinkForPart,linkRelsEpoch:g.map(y=>y?e.linkProjectors.epochForPart(y.name):"").join("\0"),...e.projectFieldLink?{projectFieldLink:e.projectFieldLink}:{},projectionTokenForParagraphForPart:e.linkProjectors.tokenForParagraphForPart,projectionTokenForTableForPart:e.linkProjectors.tokenForTableForPart,projectionEpoch:g.map(y=>y?e.linkProjectors.epochForPart(y.name):"").join("\0"),...m?{drawingsForPart:m}:{},...m&&e.drawingLayoutEpochForPart?{drawingLayoutEpoch:g.map(y=>y?e.drawingLayoutEpochForPart(y.name):"").join("\0")}:{}}}function lE(e,t,n){return Kd$1(e.currentPackage(),t,n)}var dE=new TextEncoder,cE=512,Vr=Object.freeze({title:"field-projected",creator:"field-projected",subject:"field-projected",keywords:"field-projected",lastModifiedBy:"field-projected",description:"field-projected",company:"reserved",manager:"reserved"}),uE=Object.freeze({title:Vr.title,creator:Vr.creator,subject:Vr.subject,keywords:Vr.keywords,lastModifiedBy:Vr.lastModifiedBy,description:Vr.description}),lm=Object.freeze(Object.keys(uE)),uP=Object.freeze({title:"doc-property:title",creator:"doc-property:creator",subject:"doc-property:subject",keywords:"doc-property:keywords",lastModifiedBy:"doc-property:lastModifiedBy",description:"doc-property:description"}),fP=new WeakMap;function fE(e){let t=fP.get(e);if(t)return t;let n=[],r=[e],o=[e];for(;o.length>0;){let l=o.pop();if(l!==e&&l.kind==="paragraph"&&r.push(l),l.kind==="hyperlink"&&n.push(l),l.kind!=="textValue")for(let d=l.children.length-1;d>=0;d-=1)o.push(l.children[d]);}let a=new Set;for(let l of r){let d=ba(l,[],void 0,void 0,void 0,void 0,"all-markup",void 0,void 0,void 0,void 0,uP),c=new Set(d.map(u=>u.text));for(let u of lm)c.has(uP[u])&&a.add(u);}let i=lm.filter(l=>a.has(l)),s=Object.freeze({links:Object.freeze(n),documentProperties:Object.freeze(i)});return fP.set(e,s),s}function pP(e){return a(dE.encode(me(e)))}var mP=new WeakMap;function gP(e,t){let n=new WeakMap,r=new WeakMap,o=s=>{let l=e.packageRevision(),d=e.currentPackage(),c=mP.get(e);(!c||c.revision!==l||c.pkg!==d)&&(c={revision:l,pkg:d,epochs:new Map},mP.set(e,c));let u=c.epochs.get(s);if(u!==void 0)return u;let f=["story-projection-part:v1",s];f.push(me(Object.keys(Vr).map(g=>`${g}:${Vr[g]}`)));for(let g of d.relationships.get(s)??[])f.push(me([g.id,g.type,g.rawTarget,g.targetMode,String(g.order)]));for(let g of d.externalTargets)g.ownerPart===s&&f.push(me([g.id,g.type,g.rawTarget,g.sinkSafe?"1":"0"]));let p=e.documentProperties();for(let g of lm)f.push(me([g,p[g]??""]));let m=`story-projection-part:${pP(f)}`;return c.epochs.size<cE&&c.epochs.set(s,m),m},a=(s,l)=>{let d=fE(l);if(d.links.length===0&&d.documentProperties.length===0)return "";let c=t(s),u=o(s),f=n.get(l),p=f?.get(c);if(p?.epoch===u)return p.token;let m=e.documentProperties(),g=["story-projection:v1"];for(let b of d.links){let R=c(b);g.push(R?me([R.id,R.kind,R.href??"",R.anchor??"",R.tooltip??""]):"no-link");}for(let b of d.documentProperties)g.push(me([b,m[b]??""]));let y=`story-projection:${pP(g)}`,h=f??new WeakMap;return h.set(c,{epoch:u,token:y}),f||n.set(l,h),y};return Object.freeze({tokenForParagraphForPart:a,tokenForTableForPart:(s,l)=>{let d=t(s),c=o(s),u=r.get(l),f=u?.get(d);if(f?.epoch===c)return f.token;let p=Oo(l,g=>a(s,g)),m=u??new WeakMap;return m.set(d,{epoch:c,token:p}),u||r.set(l,m),p},epochForPart:o})}var pE=512;function yP(e){return t=>{if(t.kind==="textValue")return null;let n=Ta$1(t,e);return {id:t.id,kind:n.kind,href:n.href,...n.anchor!==void 0?{anchor:n.anchor}:{},...n.tooltip!==void 0?{tooltip:n.tooltip}:{}}}}function mE(e){let t=yP(o=>e.relationshipTarget(o)),n=new Map,r=o=>{let a=n.get(o);if(a)return a;let i=yP(s=>Kd$1(e.currentPackage(),o,s));return n.size<pE&&n.set(o,i),i};return Object.freeze({projectLink:t,projectLinkForPart:r,...gP(e,r)})}var gE=4096;function yE(e){let t=e.tooltip!==null?{tooltip:q(e.tooltip)}:{};if(e.target!==null){let o=L(e.target);if(o.ok&&o.href.length>0&&x(o.href).ok){let i=e.anchor!==null&&!o.href.includes("#")?L(q(e.anchor)):null;return {kind:"external",href:i&&i.ok&&i.href.length>0?`${o.href}#${i.href}`:o.href,authored:e.target,...e.anchor!==null?{anchor:q(e.anchor)}:{},...t}}if(e.anchor===null)return null}if(e.anchor===null)return null;let n=q(e.anchor),r=L(n);return {kind:"internal",href:r.ok&&r.href.length>0?`#${r.href}`:null,authored:e.anchor,anchor:n,...t}}function hE(){let e=new Map,t=new Map,n=0;return {project(r){let o=yE(r);if(!o)return null;let a=`${r.target??""}\0${r.anchor??""}\0${r.tooltip??""}`,i=e.get(a);if(i===void 0){if(e.size>=gE)return null;i=`field-hyperlink:${++n}`,e.set(a,i),t.set(i,Object.freeze({id:i,paragraphId:"",start:0,end:0,text:"",kind:o.kind,href:o.href,authored:o.authored,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}));}return {id:i,kind:o.kind,href:o.href,...o.anchor!==void 0?{anchor:o.anchor}:{},...o.tooltip!==void 0?{tooltip:o.tooltip}:{}}},linkById:r=>t.get(r)??null,clear(){e.clear(),t.clear();}}}var hP=new WeakMap;function bE(e){let t=hP.get(e);if(t!==void 0)return t;let n=o=>o.some(a=>a.localName==="pBdr"),r=n(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(n(o.paragraphProperties)){r=true;break}}return hP.set(e,r),r}function bP(e,t){return !t||!bE(t)?rr(e):zi(Aa(t,e).paragraphPropertyNodes)}var xE=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function dm(e){let t=e?.val;return t!=="0"&&t!=="false"&&t!=="off"}function xP(e){let t=false,n=false,r=true;for(let o of e)switch(o.localName){case "keepNext":t=dm(o.attributes);break;case "keepLines":n=dm(o.attributes);break;case "widowControl":r=dm(o.attributes);break;}return !t&&!n&&r?xE:{keepNext:t,keepLines:n,widowControl:r}}function SP(e,t,n,r,o){if(e<=t)return e;if(r.keepLines&&!o)return t;if(!r.widowControl||n<2)return e;let a=e;return n-a<2&&(a-=1),a-t===1&&(a-=1),a<t&&(a=t),a===t&&o?e:a}function RP(e,t,n,r){let o=0,a=n;for(let i=t;i-t<8;i+=1){let s=e[i];if(!s||s.kind!=="paragraph"||!s.spacing||!s.keeps)return null;o+=Math.max(s.spacing.before,a)-a;let l=r(i);if(!s.keeps.keepNext||i+1>=e.length)return o+=l[0]??0,s.keeps.widowControl&&l.length>1&&(o+=l[1]),o;for(let d of l)o+=d;o+=s.spacing.after,a=s.spacing.after;}return null}function SE(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==void 0&&(n===e&&(n=[...e]),n[r]=`${n[r]}~mk~${o}`);}return n}function RE(e,t,n){let r=e;for(let o=0;o<e.length;o+=1){if(!t(o))continue;let a=n(o);if(a===null)continue;let i=o>0&&n(o-1)===a,s=o+1<e.length&&n(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${s?1:0}`;}return r}function PE(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);if(o==="")continue;let a=r>0&&t(r-1)===o,i=r+1<e.length&&t(r+1)===o;n===e&&(n=[...e]),n[r]=`${n[r]}~bg~${a?1:0}${i?1:0}`;}return n}function wE(e,t){let n=e;for(let r=0;r<e.length;r+=1){let o=t(r);o!==""&&(n===e&&(n=[...e]),n[r]=`${n[r]}~toc~${o}`);}return n}function vE(e,t){let n=e,r=0;for(let o=e.length-2;o>=0;o-=1)t(o)&&r<8?(n===e&&(n=[...e]),n[o]=`${e[o]}~kn~${n[o+1]}`,r+=1):r=0;return n}function PP(e,t){let n=RE(e,t.contextualSpacingAt,t.styleIdAt);return n=PE(n,t.borderGroupKeyAt),t.tocVerdicts.length>0&&(n=wE(n,r=>t.tocVerdicts[r])),n=SE(n,t.markerTextAt),n=vE(n,t.keepsNextAt),n}function wP(e){let{geometry:t,insets:n}=e;return Object.freeze({pageNumber:e.pageNumber,onPageParityRead:e.onPageParityRead,pageWidth:t.width,pageHeight:t.height,marginLeft:t.margin.left,marginRight:t.margin.right,marginBottom:t.margin.bottom,contentInsetTop:n.top,contentInsetBottom:n.bottom,contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentBandHeight:n.height,ownerPartName:e.ownerPartName,storyKind:"body"})}function vP(e,t,n){if(e.listItem!==void 0||e.shading!==void 0)return false;let{top:r,bottom:o,left:a,right:i,between:s}=e.borders;return (r??o??a??i??s)||n&&Ht(e.paragraph,n).length>0?false:t.every(l=>l.drawings.length===0&&!l.pageBreakAfter&&!l.columnBreakAfter&&l.spans.every(d=>d.text.length===0))}function IP(e,t,n,r,o,a,i,s,l,d=0){let c=0,u={...tc(s),cache:void 0,borderOwnershipBudget:void 0,vMergeResolveBudget:void 0,onCellBreakKey:void 0,nextLineId:()=>`probe-progress-${c++}`};return bs(e,t,n,r,o,false,a,i,u,l,d).fitted}var IE=Number.MAX_SAFE_INTEGER/1024;function FP(e,t){let{columnWidth:n,columnLeft:r,contentHeight:o,advanceColumn:a,anchorFrames:i,verticalAnchorFrames:s,styleCascade:l,displayMode:d,revisionAuthorFilter:c,deps:u,shiftAnchor:f,publishFragment:p}=t,m=n(),g=Dr(e,m,0,l,d,c);if(!g||g.rows.length===0)return {outOfFlow:false};let y=g.float!==void 0&&g.float.vertAnchor!=="text"&&g.float.ySpec!=="inline",h=t.cursorY,b=y?s():void 0,R=y?()=>IE:o,I=g.columnWidthsPt.reduce(($,V)=>$+V,0),T=()=>g.float?Ax(g.float,I,i()):r()+Ji(g,n()),k=T();g.float&&g.float.vertAnchor==="text"&&!g.float.ySpec?t.cursorY=Math.max(0,Math.min(t.cursorY+g.float.yPt,R())):y&&g.float&&b&&(t.cursorY=op(g.float,0,b));let L=$=>nm($,g.columnWidthsPt,k,0,u,g.cellSpacingPt),P=[];for(let $ of g.rows)if($.isHeader)P.push($);else break;let x=0;for(let $ of P)x+=L($);let v=x>(t.unreservedContentHeight?.()??R())+.001,w=!v,F=0,M=t.cursorY,S=[],H=new Map,j=[],_=()=>{if(S.length===0)return;let $=hs(S,g,j,u.borderOwnershipBudget,u.vMergeResolveBudget,void 0,f,u),V=$[$.length-1],q=uc({kind:"table",...y?{outOfFlow:true}:{},id:`${e.id}#f${F}`,tableId:e.id,fragmentIndex:F,rows:$,box:{x:k,y:M,width:g.columnWidthsPt.reduce((U,K)=>U+K,0),height:V.box.y+V.box.height-M}},g.columnWidthsPt,0,H),Y=q;if(y&&g.float&&b){let K=op(g.float,q.box.height,b)-q.box.y;if(Y=Ua([q],K)[0],Math.abs(K)>.001){let Re=ge=>{for(let se of ge)if(se.kind==="paragraph")f(se.paragraphId,K);else for(let he of se.rows)for(let Le of he.cells)Re(Le.blocks);};for(let ge of q.rows)for(let se of ge.cells)Re(se.blocks);}}p(Y),F+=1,S=[],j=[];},C=($,V)=>{if(P.length===0)return;let q=x;if($&&t.cursorY+q>R()+.001)return;t.cursorY+q>R()+.001&&t.cursorY>0&&(_(),a(),k=T(),M=t.cursorY);let Y=!$&&t.cursorY+q>R()+.001?t.unreservedContentHeight?.()??R():R();if(!$&&t.cursorY+q>Y+.001){v=true,w=false;return}if(!($&&V&&!V(t.cursorY+q)))for(let U of P){let K=qa(U,g.columnWidthsPt,k,t.cursorY,$,0,u,g.cellSpacingPt);if(K.bottom>Y+.001)throw new Rn("table-row-overheight",`Table header row ${U.id} overflowed the page content box`);S.push(K.record),j.push(U),t.cursorY=K.bottom;}},D=$=>{_(),a(),k=T(),M=t.cursorY,w&&C(true,$);};v||C(false);let z=g.rows.slice(v?0:P.length),N=rm(g,()=>k,0,u,z),A,B=0,G=($,V)=>{A=YR(N,$,t.cursorY,R()),B=A?.heightFloorPt??(V?L(V):B);};for(let[$,V]of z.entries()){v&&$>=P.length&&(w=true),G($,V);let q=tm(V),Y=false,U=0,K=false,Re=A!==void 0&&A.detachedSpanHeightPtByCellId===void 0,ge=se=>{let he=R(),Le=he-se;return Le<=.001?false:!Y&&B<=Le+.001?true:!Y&&(V.cantSplit||V.height.rule==="exact")?false:IP(V,g.columnWidthsPt,k,se,he,Y,0,u,q,g.cellSpacingPt)};for(!Re&&B<=R()+.001&&t.cursorY+B>R()+.001&&t.cursorY>0&&(D(ge),K=true,G($));;){if(U+=1,U>hc)throw new Rn("table-row-fragment-limit",`Table row ${V.id} exceeded ${hc} page fragments`);let se=R()-t.cursorY;if(se<=.001&&t.cursorY>0){if(K)throw new Rn("table-row-overheight",`Table row ${V.id} cannot fit after repeated header rows`);D(ge),K=true,G($);continue}if(!Y&&B<=se+.001){let te=qa(V,g.columnWidthsPt,k,t.cursorY,false,0,u,g.cellSpacingPt,A,R());if(te.bottom>R()+.001)throw new Rn("table-row-overheight",`Table row ${V.id} overflowed the page content box after placement`);let Fe=te.remainder!==null;if(S.push(te.record),j.push(Fe?gc(V,Y,true):V),t.cursorY=te.bottom,!Fe)break;q=te.remainder,Y=true,K=false,D(ge);continue}if(!Y&&(V.cantSplit||V.height.rule==="exact")){if(t.cursorY>0&&!K){D(ge),K=true,G($);continue}let te=t.unreservedContentHeight?.()??R();if(te>R()+.001&&B<=te-t.cursorY+.001){let Fe=qa(V,g.columnWidthsPt,k,t.cursorY,false,0,u,g.cellSpacingPt,A,te);if(Fe.bottom<=te+.001&&Fe.remainder===null){S.push(Fe.record),j.push(V),t.cursorY=Fe.bottom;break}}throw new Rn("table-row-overheight",V.height.rule==="exact"?`Table row ${V.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${V.id} has w:cantSplit and is taller than the available page content`)}let he=bs(V,g.columnWidthsPt,k,t.cursorY,R(),false,Y,0,u,q,g.cellSpacingPt,A);if(!he.fitted&&t.cursorY>0&&!K){D(ge),K=true,G($);continue}let Le=t.unreservedContentHeight?.()??R();if(!he.fitted&&t.cursorY<=.001&&!K&&Le>R()+.001){D(ge),K=true,G($);continue}if(!he.fitted)throw new Rn(he.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",he.nestedSplitBlocked?`Table row ${V.id} contains a nested table taller than the page content box`:`Table row ${V.id} has content that cannot fit a page content box`);if(he.bottom>R()+.001)throw new Rn("table-row-overheight",`Table row ${V.id} overflowed the page content box`);let fe=he.remainder!==null,Ee=gc(V,Y,fe);if(S.push(he.record),j.push(Ee),t.cursorY=he.bottom,!fe)break;q=he.remainder,Y=true,K=false,D(ge);}}return _(),y&&(t.cursorY=h),{outOfFlow:y}}function cm(e,t,n,r){let o=`line:${e}:${n}:${t}`;return r===void 0?o:`${o}:occ:${r}`}var TP=new WeakMap;function FE(e){let t=TP.get(e);if(t!==void 0)return t;let n=TE(e);return TP.set(e,n),n}function TE(e){let t=n=>{if(n.kind==="textValue"||Mc$1(n)||Kc(n)!==null)return false;if(n.kind==="text"||n.localName==="t"){for(let r of n.children)if(r.kind==="textValue"&&r.value.trim().length>0)return true;return false}for(let r of n.children)if(r.kind!=="textValue"&&t(r))return true;return false};for(let n of e.children)if(n.kind!=="textValue"&&t(n))return true;return false}function LP(e,t){for(let n of t.resultParagraphIds){let r=Ca$1(e,n);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&FE(r))return true}return false}var kP=new WeakMap,OP=new WeakMap,CP=new WeakMap;function um(e){let t=kP.get(e);if(t)return t;let n=new Set;for(let r of kd$1(e))n.add(r.beginParagraphId),n.add(r.endParagraphId);return kP.set(e,n),n}function fm(e){let t=OP.get(e);if(t)return t;let n=new Set;for(let r of kd$1(e))LP(e,r)||n.add(r.beginParagraphId);return OP.set(e,n),n}function pm(e){let t=CP.get(e);if(t)return t;let n=new Set;for(let r of kd$1(e))if(!LP(e,r))for(let o of r.resultParagraphIds)n.add(o);return CP.set(e,n),n}var kE=.4;function mm(e,t,n){return e&&wc$1(e,"first")&&n===0?"first":e&&wc$1(e,"even")&&(t+n+1)%2===0?"even":"default"}function EP(e){let{furniture:t,pageHeight:n,marginTop:r,marginBottom:o}=e,a=n*kE,i=new Map,s=(l,d,c)=>Math.min(a,Math.max(c,d?l+d.flowHeight:0));return l=>{if(l===0&&e.continuedPageInsets)return e.continuedPageInsets;let d=mm(t,e.pageIndexStart,l),c=i.get(d);if(c)return c;let u=s(e.headerDistance,t?.headers.get(d),r),f=s(e.footerDistance,t?.footers.get(d),o),p=Object.freeze({top:u,bottom:f,height:n-u-f});return i.set(d,p),p}}var gm=new WeakMap;function DG(e){gm.delete(e);}function Ss(e,t){gm.set(e,t);}function ym(e,t,n,r){return gm.get(e)?.(t,n,r)}var _o=24;function MP(e){let{furniture:t,geometry:n,headerDistance:r,footerDistance:o,pageIndexStart:a}=e,i=c=>({x:0,y:c*(n.height+_o),width:n.width,height:n.height}),s=c=>mm(t,a,c),l=(c,u,f)=>{if(!t)return;let p=s(u),m=(c==="header"?t.headers:t.footers).get(p);if(!m)return;let g=P=>{let x=c==="header"?f.y+r:f.y+n.height-o-P.flowHeight;return {kind:c,variant:p,partName:P.partName,...P.part?{part:P.part}:{},...P.rId?{rId:P.rId}:{},box:{x:f.x+n.margin.left,y:x,width:e.contentWidth,height:P.flowHeight},fragments:P.fragments,...P.anchoredDrawings?{anchoredDrawings:P.anchoredDrawings}:{}}},y=a+u+1,h={pageNumber:y,pageCount:Math.max(y,e.pageCount()+1),sectionPageCount:u+1},b=e.insetsFor(u),R=P=>{let x=m;for(let v=0;v<8;v+=1){let w=c==="header"?r:n.height-o-x.flowHeight,F={...P,contentInsetTop:b.top,contentInsetBottom:b.bottom,storyTop:w},M=m.withPageContext(F);if(Math.abs(M.flowHeight-x.flowHeight)<=.001)return M;x=M;}throw new Error("header/footer attached-page anchor layout did not converge")},I=m.pageFieldNeeds,k=Hr(I)||(m.anchoredDrawings?.length??0)>0?R(h):m,L=g(k);return Hr(I)?{...L,pageFieldProjector:P=>g(R(P))}:L};return {pageBox:i,variantFor:s,furnitureFor:l,overflowShellAt:(c,u)=>{let f=c-a,p=l("header",f,u),m=l("footer",f,u);return {insets:e.insetsFor(f),...p?{header:p}:{},...m?{footer:m}:{}}}}}function BP(e){if(e.delta===0)return true;let t=e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity,r=!(e.titlePage||e.continuedInsets)||e.markPageCount>0&&e.delta+e.markPageCount>0;return t&&r&&!e.hasNoteReserves&&!e.hasExclusionZones}var OE="http://schemas.openxmlformats.org/wordprocessingml/2006/main",CE="http://schemas.microsoft.com/office/word/2010/wordml",LE="http://schemas.microsoft.com/office/word/2012/wordml";function EE(e){if(e.kind!=="textValue"){for(let t of e.attributes)if(t.localName==="val"&&t.namespaceUri===OE)return t.value}}function Za(e){for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="contentControlProperties"||t.localName==="sdtPr"))return t}function Ho(e,t){if(e){for(let n of e.children)if(n.kind!=="textValue"&&n.localName===t)return n}}function fr(e,t){let n=Ho(e,t);return n?EE(n):void 0}function Rs(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function Sc(e){if(!e)return "richText";for(let t of e.children){if(t.kind==="textValue")continue;let n=t.kind,r=t.localName,o=t.namespaceUri;if(n==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(n==="contentControlComboBox"||r==="comboBox")return "comboBox";if(n==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(n==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(n==="contentControlCheckbox"||r==="checkbox"&&o===CE)return "checkbox";if(r==="repeatingSection"&&o===LE)return "repeatingSection"}return "richText"}function NP(e){let t=(n,r)=>{for(let o of n)if(o.kind!=="textValue"){if(o.kind==="tableRow")return "row";if(o.kind==="tableCell")return "cell";if(o.kind==="paragraph"||o.kind==="table")return "block";if(oc$1(o)&&r<nc$1){let a=t(rc$1(o),r+1);if(a)return a}}return null};return t(rc$1(e),0)??"inline"}function Ja(e){let t=AP.get(e);if(t!==void 0)return t;let n=ME(e);return Rc!==null&&Rc===n?n=Rc:Rc=n,AP.set(e,n),n}var Rc=null,AP=new WeakMap,DP=new WeakMap;function ME(e){let t=(n,r)=>{if(n.kind==="textValue")return "";let o=n.kind==="paragraph"||n.kind==="table"||oc$1(n);if(o){let i=DP.get(n);if(i!==void 0&&i.depth===r)return i.token}let a;if(oc$1(n)){if(r>=nc$1)return "";let i=Za(n),s=[n.id,fr(i,"alias")??"",fr(i,"tag")??"",Rs(fr(i,"lock")),Sc(i),Ho(i,"showingPlcHdr")?"1":"0",Ho(i,"dataBinding")?"1":"0"].join(":"),l=rc$1(n).map(d=>t(d,r+1)).filter(d=>d.length>0);a=[s,...l].join("|");}else a=n.children.map(i=>t(i,r)).filter(i=>i.length>0).join("|");return o&&DP.set(n,{depth:r,token:a}),a};return t(e.root,0)}function HP(e,t){let n=[t],r=new Set([t]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),n.push(a.part));return n}var hm=new WeakMap,_P=new WeakMap;function jP(e){if(e.length===1)return Ps(e[0]);let t=hm.get(e[0]);if(t&&Pc(t.parts,e))return t.index;let n=e.map(d=>Ps(d)),r=_P.get(n[0]);if(r&&Pc(r.indexes,n))return hm.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of n){for(let c of d.controls)o.push(c);for(let c of d.neededBlockIds)a.add(c);for(let c of d.neededParagraphIds)i.add(c);}let s=`${[...a].sort().join(",")};${[...i].sort().join(",")}`,l={controls:o,neededBlockIds:a,neededParagraphIds:i,neededToken:s};return _P.set(n[0],{indexes:n,index:l}),hm.set(e[0],{parts:e,index:l}),l}function wc(e){if(e.kind==="textValue")return e.value.length;if(e.kind==="tab"||e.kind==="hardBreak")return 1;if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return 0;if(oc$1(e)){let n=0;for(let r of rc$1(e))n+=wc(r);return n}let t=0;for(let n of e.children)t+=wc(n);return t}var bm=new WeakMap;function Pc(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var zP=new WeakMap;function BE(e){for(let t of fg(e))if(t.root.kind!=="textValue"){for(let n of t.root.children)if(n.kind!=="textValue")return n}return null}function Ps(e){let t=bm.get(e);if(t!==void 0)return t;let n=AE(e),r=BE(e),o=r?zP.get(r):void 0;if(o&&Pc(o.lists,n))return bm.set(e,o.index),o.index;let a=[];for(let d of n)for(let c of d)a.push(c);let i=new Set,s=new Set;for(let d of a){for(let c of d.blockIds)i.add(c);d.paragraphId!==void 0&&s.add(d.paragraphId);}let l={controls:a,neededBlockIds:i,neededParagraphIds:s,neededToken:`${[...i].sort().join(",")};${[...s].sort().join(",")}`};return r&&zP.set(r,{lists:n,index:l}),bm.set(e,l),l}var NE=Object.freeze([]);function AE(e){let t=[],n=(i,s)=>{for(let l of i){if(l.kind==="paragraph"||l.kind==="table"){s.push(l.id);continue}if(oc$1(l)){n(rc$1(l),s);continue}(l.kind==="tableRow"||l.kind==="tableCell")&&n(l.children,s);}},r=(i,s,l,d,c)=>{let u=l;for(let f of i)if(!(f.kind==="textValue"||f.kind==="paragraphProperties")){if(oc$1(f)){if(d>=nc$1){u+=wc(f);continue}let p=Za(f),m=Rs(fr(p,"lock")),g=[...c,m],y=u,h=r(rc$1(f),s,u,d+1,g);t.push({control:f,nestingDepth:d,lockStack:g,level:"inline",paragraphId:s,range:{start:y,end:h},blockIds:[]}),u=h;continue}if(f.kind==="hyperlink"){u=r(f.children,s,u,d,c);continue}u+=wc(f);}return u},o=(i,s,l)=>{for(let d of i){if(d.kind==="textValue")continue;if(d.kind==="paragraph"){r(d.children,d.id,0,s,l);continue}if(d.kind==="table"){for(let y of d.children)y.kind==="tableRow"&&o([y],s,l);continue}if(d.kind==="tableRow"){for(let y of d.children)y.kind==="tableCell"?o(y.children,s,l):oc$1(y)&&o([y],s,l);continue}if(!oc$1(d)||s>=nc$1)continue;let c=Za(d),u=Rs(fr(c,"lock")),f=[...l,u],p=NP(d),m=rc$1(d);if(p==="inline"){o(m,s+1,f);continue}let g=[];n(m,g),t.push({control:d,nestingDepth:s,lockStack:f,level:p,blockIds:g}),o(m,s+1,f);}},a=[];for(let i of fg(e))if(i.root.kind!=="textValue")for(let s of i.root.children){if(s.kind==="textValue")continue;let l=GP.get(s);if(l!==void 0){a.push(l);continue}let d=t.length;o([s],0,[]);let c=t.length===d?NE:Object.freeze(t.slice(d));GP.set(s,c),a.push(c);}return a}var GP=new WeakMap,xm=1<<20,WP=new WeakMap,VP=null,KP=0;function DE(e){return e!==VP&&(VP=e,KP+=1),KP}function _E(e,t,n,r){let o=WP.get(e);if(o!==void 0&&o.neededStamp===n)return o;let a=[],i=[],s=e.index*xm,l=0,d=0,c=p=>l===0&&d===0?p:{x:p.x+l,y:p.y+d,width:p.width,height:p.height},u=(p,m)=>{if(m.kind==="paragraph"){t.neededBlockIds.has(m.paragraphId)&&(a.push({pageIndex:p,blockId:m.paragraphId,box:c(m.box)}));let g=t.neededParagraphIds.has(m.paragraphId);for(let y of m.lines){let h=s;if(s=Math.min(s+1,e.index*xm+xm-1),!g)continue;let b=Math.max(0,y.box.height-y.leading-(y.trailingSpacing??0));for(let R of y.spans)i.push({pageIndex:p,paragraphId:R.range.paragraphId,start:R.range.start,end:R.range.end,line:h,box:{x:R.box.x+l,y:R.box.y+y.leading+d,width:R.box.width,height:b}});}return}t.neededBlockIds.has(m.tableId)&&(a.push({pageIndex:p,blockId:m.tableId,box:c(m.box)}));for(let g of m.rows)if(!g.isHeaderRepeat)for(let y of g.cells)for(let h of y.blocks)u(p,h);};for(let p of e.fragments)u(e.index,p);for(let p of [e.header,e.footer])if(p){l=p.box.x-e.contentBox.x,d=p.box.y-e.contentBox.y;for(let m of p.fragments)u(e.index,m);}l=0,d=0;let f={neededStamp:n,blocks:a,spans:i};return WP.set(e,f),f}function HE(e,t,n){let r=DE(t.neededToken),o=new Map,a=new Map,i=new Set;for(let s of e.pages){let l=_E(s,t,r);for(let d of l.blocks){let c=o.get(d.blockId);c?c.push(d):o.set(d.blockId,[d]);}for(let d of l.spans){let c=a.get(d.paragraphId);c?(d.start<c[c.length-1].start&&i.add(d.paragraphId),c.push(d)):a.set(d.paragraphId,[d]);}}return {blocksById:o,spansByParagraph:a,repeatedParagraphs:i}}function jE(e,t,n){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of t.blocksById.get(a)??[]){let s=r.get(i.pageIndex);s?s.push(i.box):r.set(i.pageIndex,[i.box]);}}return [...r.entries()].sort(([a],[i])=>a-i).flatMap(([a,i])=>{let s=Ci(i);return s?[{pageIndex:a,box:s}]:[]})}function zE(e,t,n,r){let o=n.spansByParagraph.get(e)??[],a=new Map,i=n.repeatedParagraphs.has(e),s=0,l=o.length;for(;!i&&s<l;){let d=s+(l-s>>1);(t.start===t.end?o[d].end<t.start:o[d].end<=t.start)?s=d+1:l=d;}i&&(s=0);for(let d=s;d<o.length;d+=1){let c=o[d];if(c.end<=t.start)continue;if(c.start>=t.end){if(i)continue;break}let u=a.get(c.line);u?u.boxes.push(c.box):a.set(c.line,{pageIndex:c.pageIndex,boxes:[c.box]});}if(a.size===0&&t.start===t.end){let d=[],c=new Set;for(let u=s;u<o.length;u+=1){let f=o[u];if(f.start>t.start){if(i)continue;break}if(t.start>f.end||c.has(f.pageIndex))continue;c.add(f.pageIndex);let p=f.start===f.end?f.box.x:f.box.x+f.box.width*(t.start-f.start)/Math.max(1,f.end-f.start);if(d.push({pageIndex:f.pageIndex,box:{x:p,y:f.box.y,width:0,height:f.box.height}}),!i)break}if(d.length>0)return d}return [...a.entries()].sort(([d],[c])=>d-c).flatMap(([,d])=>{let c=Ci(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var $P=new WeakMap;function GE(e){let t=$P.get(e);if(t!==void 0)return t;let n=Za(e),r=fr(n,"alias"),o=fr(n,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:Sc(n),placeholder:Ho(n,"showingPlcHdr")!==void 0,bound:Ho(n,"dataBinding")!==void 0};return $P.set(e,a),a}function WE(e,t,n){let r=e.level==="inline"&&e.paragraphId&&e.range?zE(e.paragraphId,e.range,t):jE(e.blockIds,t);return {...Pm(e),fragments:r}}function VE(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r!==o&&(r.pageIndex!==o.pageIndex||r.box.x!==o.box.x||r.box.y!==o.box.y||r.box.width!==o.box.width||r.box.height!==o.box.height))return false}return true}function KE(e,t){return e.id===t.id&&e.alias===t.alias&&e.tag===t.tag&&e.controlType===t.controlType&&e.lock===t.lock&&e.effectiveLock===t.effectiveLock&&e.placeholder===t.placeholder&&e.bound===t.bound&&e.nestingDepth===t.nestingDepth&&e.level===t.level&&VE(e.fragments,t.fragments)}function Qa(e,t){if(!e)return t.length===0;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(!KE(e[n],t[n]))return false;return true}function Sm(e,t){return {...t,revision:e.revision,pages:e.pages}}var XP=new WeakMap;function Rm(e,t,n=Ja(t),r){let o=HP(e,t);if(o.length>1){let f=o.map(p=>Ja(p));n=f.some(p=>p!=="")?f.join("|"):"";}if(n===""){let f=e.pages.some(m=>m.contentControls!==void 0&&m.contentControls.length>0);if(!f&&e.controlContextToken===n&&Qa(e.contentControls,[]))return e;let p=f?e.pages.map(m=>m.contentControls!==void 0&&m.contentControls.length>0?{...m,contentControls:[]}:m):e.pages;return {...e,pages:p,contentControls:[],controlContextToken:n}}let a=jP(o),i=HE(e,a),s=a.controls.map(f=>WE(f,i)),l=new Map;for(let f of s)for(let p of f.fragments){let m=l.get(p.pageIndex),g={...f,fragments:[p]};m?m.push(g):l.set(p.pageIndex,[g]);}if(e.controlContextToken===n&&Qa(e.contentControls,s)&&e.pages.every(f=>Qa(f.contentControls,l.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let p=l.get(f.index)??[];if(Qa(f.contentControls,p)||p.length===0&&!f.contentControls)return f;d=true;let m=XP.get(f);if(m&&Qa(m.controls,p))return m.wrapped;let g={...f,contentControls:p};return XP.set(f,{controls:p,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===n&&Qa(e.contentControls,s)?e:{...e,pages:u,contentControls:s,controlContextToken:n}}function $E(e,t){return Ps(e).controls.filter(r=>t?r.paragraphId!==void 0?t.has(r.paragraphId):YP(r.control).some(o=>t.has(o)):true).map(Pm)}function YP(e){let t=[],n=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);continue}if(oc$1(o)){n(rc$1(o));continue}n(o.children);}};return n(rc$1(e)),t}function XE(e,t){let n=null;for(let r of Ps(e).controls)(r.paragraphId===t||r.blockIds.includes(t)||YP(r.control).includes(t))&&(!n||r.nestingDepth>=n.nestingDepth)&&(n=r);return n?Pm(n):null}function Pm(e){let t=GE(e.control);return {id:e.control.id,...t.alias!==void 0?{alias:t.alias}:{},...t.tag!==void 0?{tag:t.tag}:{},controlType:t.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:Ml(e.lockStack),placeholder:t.placeholder,bound:t.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var ei=1;function vc(e,t){let n=Math.max(ei,t),r=Math.max(1,Math.min(12,Math.floor(e.count))),o=e.definitions??[],a=e.equalWidth===false&&o.length===r&&o.every(c=>c.widthTwips>0),i,s;if(a){i=o.map(p=>Math.max(ei,qd$1(od$1(p.widthTwips)))),s=o.slice(0,-1).map(p=>Math.max(0,qd$1(od$1(p.gapTwips))));let c=s.reduce((p,m)=>p+m,0),u=Math.max(r*ei,n-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max(ei,m*p));}}else {let c=Math.max(0,qd$1(od$1(e.gapTwips))),u=Math.min(c,Math.max(0,(n-r*ei)/(r-1||1)));s=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max(ei,(n-s.reduce((p,m)=>p+m,0))/r);i=Array.from({length:r},()=>f);}let l=[],d=0;for(let c=0;c<r;c+=1)l.push(d),d+=i[c]+(s[c]??0);return {count:r,widths:i,gaps:s,lefts:l,separator:e.separator===true&&r>1}}var UP=new WeakMap,qP=new WeakMap;function YE(e,t,n){let r=e.map(o=>`${o.blockStart}-${o.blockEndExclusive}`).join(",");return `${t};${n?.cacheKey??""};${r}`}function wm(e){let t=ya(e);return t?t.members.map(n=>n.id):[e.id]}function vm(e){let t=qP.get(e);if(t)return t;let n=[],r=(o,a)=>{if(!(a>32||o.kind==="textValue")){if(o.kind==="paragraph"){n.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),qP.set(e,n),n}function UE(e,t){if(e.kind!==t.kind)return false;let n=e.kind==="paragraph"?wm(e):vm(e),r=t.kind==="paragraph"?wm(t):vm(t);return n.length===r.length&&n.every((o,a)=>o===r[a])}function ZP(e,t,n,r,o){let a=Ct(e,n,r),i=YE(t,n,r),s=o?UP.get(o):void 0;if(s?.boundsFingerprint===i&&s.blocks.length===a.length&&a.every((d,c)=>d===s.blocks[c]||UE(d,s.blocks[c])))return s.blocks=a,s.map;let l=new Map;for(let d=0;d<t.length;d+=1){let c=t[d];for(let u=c.blockStart;u<c.blockEndExclusive;u+=1){let f=a[u];if(!f)continue;let p=f.kind==="paragraph"?wm(f):vm(f);for(let m of p)l.set(m,d);}}return o&&UP.set(o,{blocks:a,boundsFingerprint:i,map:l}),l}var ti=le,ws=512,Im=6,qE=1/3;function JP(e,t){return `note-${e}-${t}`}function ZE(e){if(!e)return [];let t=[];for(let n of ne(e.root)){if(t.length>=ti)break;ee(n)&&t.push(n);}return t}function QP(e,t){if(e){for(let n of ne(e.root))if(de(n)===t)return n}}function Tm(e,t,n){let r=be(e),o=ce(e);if(!r||o===null)return null;let a=Ud$1(r,o),i=n.displayMode??Te,s=ha(e,i,n.revisionAuthorFilter),l=JP(r,o),d=0,c=Math.max(1,t),u=n.maxFlowHeightPt??Number.POSITIVE_INFINITY,f=n.noteMarks?{...n.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},p=n.ownerPartName?n.drawingsForPart?.(n.ownerPartName):void 0,m=(n.ownerPartName?n.projectLinkForPart?.(n.ownerPartName):void 0)??n.projectLink,g=dr({numberingIndex:n.numberingIndex,styleCascade:n.styleCascade},s).listItems,y=Ao(s,0,c,0,0,{measurer:n.measurer,cache:n.cache,producer:n.producer+(i===Te?"":`|rev:${i}`)+(n.revisionAuthorFilter?`|reviewers:${n.revisionAuthorFilter.cacheKey}`:"")+`|${a}`,nextLineId:()=>`${l}-line-${d++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},noteMarks:f,...m?{projectLink:m}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.ownerPartName&&n.projectionTokenForParagraphForPart?{projectionTokenForParagraph:I=>n.projectionTokenForParagraphForPart(n.ownerPartName,I)}:{},...n.ownerPartName&&n.projectionTokenForTableForPart?{projectionTokenForTable:I=>n.projectionTokenForTableForPart(n.ownerPartName,I)}:{},...n.refFields?{refFields:n.refFields}:{},displayMode:i,...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...p?{inlineDrawingLayout:p.inlineDrawingLayout,...p.drawingTokenForParagraph?{drawingTokenForParagraph:p.drawingTokenForParagraph}:{}}:{},...n.revisionAuthorFilter?{revisionAuthorFilter:n.revisionAuthorFilter}:{}}),h=y.blocks,b=y.bottom,R;if(h.length>ws){h=h.slice(0,ws);let I=h[h.length-1];b=I?I.box.y+I.box.height:0,R="note-fragment-limit";}if(b>u){let I=[],T=0;for(let k of h){let L=k.box.y+k.box.height;if(L>u+.001&&I.length>0)break;I.push(k),T=L;}h=I,b=T,R=R??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:de(e),fragments:h,flowHeight:b,...R?{fallbackReason:R}:{}}}function Fm(e,t,n,r){if(!e)return null;let o=pe(e.root,t);return o?Tm(o,n,{...r,ownerPartName:e.name}):null}function vs(e,t,n,r,o){if(!o)return Fm(e,t,n,r);let a=`${e?.name??"none"}\0${t}\0${n}`,i=o.get(a);if(i!==void 0)return i;let s=Fm(e,t,n,r);return o.set(a,s),s}function ew(e,t){return "single"}function tw(e,t,n){let r=ha(e,t,n);if(r.length===0)return true;for(let o of r){if(o.kind!=="paragraph")return false;let a=o.children.find(i=>i.kind==="paragraphProperties");if(Object.keys(rr(a)).length>0||!JE(o))return false}return true}function JE(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="paragraphProperties"){if(t.kind==="run"){if(!QE(t))return false;continue}return false}return true}function QE(e){for(let t of e.children)if(t.kind!=="textValue"&&t.kind!=="runProperties"&&!($d$1(t)||ae(t)||_d$1(t))){if(t.kind==="text"){if(t.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function Ic(e,t,n,r,o,a){let i=ew(),s=QP(e,t);if(s){if(tw(s,r.displayMode,r.revisionAuthorFilter))return {kind:t,fragments:[],flowHeight:Im,synthetic:false,ruleStyle:i};let l=Tm(s,n,{...r,...e?{ownerPartName:e.name}:{}});if(l&&l.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return l.flowHeight>d+.001?{kind:t,fragments:[],flowHeight:Im,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:t,fragments:l.fragments,flowHeight:l.flowHeight,synthetic:false}}}return {kind:t,fragments:[],flowHeight:Im,synthetic:true,ruleStyle:i}}function nw(e,t){let n=Math.max(1,e*qE);return {x:0,y:Math.max(0,(t-.75)/2),width:n,height:.75}}function Fc(e,t,n,r){if(e.ruleStyle!==void 0||e.synthetic){let o=nw(n,e.flowHeight);return {x:t+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:t,y:r,width:n,height:e.flowHeight}}function ni(e,t){return Math.max(0,e-14-t)}var Is=.5,rw=2*Is;function Tc(e,t,n){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-t;i>=0&&i<n&&r.push([i,a]);}return r.length===0?"":(r.sort((o,a)=>o[0]-a[0]),`|nr:${r.map(([o,a])=>`${o}=${a}`).join(",")}`)}function ow(e,t,n){n<=0||e.set(t,Math.max(e.get(t)??0,n));}function Kr(e){let t=new Map;for(let[n,r]of e)r>0&&t.set(n,r);return t}function kc(e,t){let n=Kr(e),r=Kr(t);if(n.size!==r.size)return false;for(let[o,a]of n)if((r.get(o)??0)!==a)return false;return true}function aw(e,t){let n=Kr(e);for(let[r,o]of t)o<=0||n.set(r,Math.max(n.get(r)??0,o));return n}function ri(e){return [...Kr(e)].map(([t,n])=>`${t}=${n}`).sort().join(",")}function eM(e,t){return t===0?e:{...e,box:{...e.box,y:e.box.y+t},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+t}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+t}}}:{},...e.borders?{borders:e.borders.map(n=>({...n,box:{...n.box,y:n.box.y+t}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+t}}}:{},lines:e.lines.map(n=>({...n,box:{...n.box,y:n.box.y+t},spans:n.spans.map(r=>({...r,box:{...r.box,y:r.box.y+t}}))}))}}function km(e,t){return t===0?[...e]:e.map(n=>n.kind==="paragraph"?eM(n,t):{...n,box:{...n.box,y:n.box.y+t}})}function Fs(e){let t=0;for(let n of e)gn(n)||(t=Math.max(t,n.box.y+n.box.height));return t}function Ts(e){let t=0;for(let n of e.fragments)t=Math.max(t,Om(n));return t}function Om(e){if(gn(e))return 0;let t=e.kind==="paragraph"?e.spacing.after:0;return e.box.y+e.box.height-t}function Oc(e){let t=Number.POSITIVE_INFINITY;for(let n of e.fragments){if(gn(n))continue;let r=n.kind==="paragraph"?n.lines[0]?.box.y??n.box.y:n.box.y;t=Math.min(t,r);}return Number.isFinite(t)?t:0}var iw=new WeakMap;function ks(e,t){let n=iw.get(e.fragments);n||(n=new WeakMap,iw.set(e.fragments,n));let r=n.get(t);if(r)return r;let o=tM(e,t);return n.set(t,o),o}function tM(e,t){let n=0,r=0,o=0,a=false;for(let d of e.fragments){if(d.kind==="paragraph"){if(!Zn(d,t.paragraphId,t.atomOffset))continue;let c=nM(d,t),u=c?.top??d.box.y,f=c?.bottom??d.box.y+d.box.height;f>r&&(n=u,r=f,o=d.box.y,a=c!==null);continue}if(rM(d,[t])){let c=d.box.y+d.box.height;c>r&&(n=d.box.y,r=c,a=false);}}let i=d=>Math.min(Math.max(0,d),e.contentBox.height),s=i(n),l=i(r);return {top:s,bottom:l,blockTop:i(o),evictable:a&&l>s}}function nM(e,t){for(let n of e.lines)for(let r of Ue(n))if(hh(r,t.paragraphId,t.atomOffset))return {top:n.box.y,bottom:n.box.y+n.box.height};return null}function rM(e,t){let n=r=>{for(let o of r){if(o.kind==="paragraph"){for(let a of t)if(Zn(o,a.paragraphId,a.atomOffset))return true;continue}for(let a of o.rows)if(!a.isHeaderRepeat){for(let i of a.cells)if(n(i.blocks))return true}}return false};for(let r of e.rows)if(!r.isHeaderRepeat){for(let o of r.cells)if(n(o.blocks))return true}return false}function Cm(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:t,endnotes:n,noteStream:r,...o}=e;return o}function oM(e,t){if(e.lines.length===0)return e.box.y+e.box.height<=t+.001?{head:e,tail:null}:{head:null,tail:e};let n=0;for(;n<e.lines.length;n+=1){let g=e.lines[n];if(g.box.y+g.box.height>t+.001)break}if(n===0)return {head:null,tail:e};if(n>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,n),o=e.lines.slice(n),a=r[r.length-1],i=e.box.y,s=a.box.y+a.box.height,l=e.borders?.filter(g=>g.side!=="bottom"),d={...e,range:{paragraphId:e.paragraphId,start:r[0].range.start,end:a.range.end},spacing:{before:e.spacing.before,after:0},lines:r,box:{...e.box,height:Math.max(0,s-i)},...l&&l.length>0?{borders:l}:{borders:void 0},bottomBorder:void 0,...e.shadingBox?{shadingBox:{...e.shadingBox,height:Math.max(0,s-e.shadingBox.y)}}:{}},c=o[o.length-1],u=o[0].box.y,f=c.box.y+c.box.height,p=e.borders?.filter(g=>g.side!=="top"),m={...e,id:`${e.paragraphId}#f${e.fragmentIndex+1}`,fragmentIndex:e.fragmentIndex+1,range:{paragraphId:e.paragraphId,start:o[0].range.start,end:o[o.length-1].range.end},spacing:{before:0,after:e.spacing.after},lines:o,box:{x:e.box.x,y:u,width:e.box.width,height:Math.max(0,f-u)},marker:void 0,...p&&p.length>0?{borders:p}:{borders:void 0},...e.bottomBorder?{bottomBorder:e.bottomBorder}:{},...e.shadingBox?{shadingBox:{x:e.shadingBox.x,y:u,width:e.shadingBox.width,height:Math.max(0,f-u)}}:{}};return {head:d,tail:m}}function Os(e,t,n){if(e.flowHeight<=t+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(t<=.001)return {head:[],headHeight:0,tail:e.fragments,tailHeight:e.flowHeight};let r=[],o=0,a=0,i=null;for(let u=0;u<e.fragments.length&&u<ws;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=t+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let m=oM(f,t);if(m.head)r.push(m.head),o=m.head.box.y+m.head.box.height,i=m.tail,a=u+1;else {let g=n?.fullContentHeight??t,h=f.lines[0]?.box.height??f.box.height;if(r.length===0&&t>=g-.001&&h>g+.001){n?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let b=e.fragments.slice(a),R=b[0]?.box.y??0;return {head:[],headHeight:0,tail:km(b,-R),tailHeight:Math.max(0,e.flowHeight-R)}}a=u,i=null;}break}a=u;break}let s=[...i?[i]:[],...e.fragments.slice(a)];if(s.length===0)return {head:r,headHeight:o,tail:[],tailHeight:0};let l=s[0]?.box.y??0,d=km(s,-l),c=Fs(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}var aM=9;function sw(e){let{bodyPage:t,nextPage:n}=e;if(!n||n.contentBox.width!==t.contentBox.width||n.contentBox.height!==t.contentBox.height)return 0;let r=n,o=e.pageBottomRefsOf(r);if(o.length===0)return 0;let a,i;for(let w of o){let F=ks(r,w);F.bottom<=F.top||(!a||F.bottom<a.bottom-.001)&&(a=F,i=w);}if(!a||!i)return 0;let s=a.bottom-a.top,l=Ts(t),d=t.contentBox.height;if(d-l<s-.001)return 0;let c,u=0;for(let w of r.fragments){if(w.kind!=="paragraph"||u>=aM)return 0;if(u+=1,Zn(w,i.paragraphId,i.atomOffset)){c=w;break}}if(!c)return 0;let f=o.filter(w=>Zn(c,w.paragraphId,w.atomOffset));if(f.length===0)return 0;let p=Oc(r),m=Math.max(0,a.bottom-p),g=Math.max(0,Om(c)-p),y=t.contentBox.width,h=ni(d,e.plainSeparatorHeight),b=0;for(let w of f){let F=vs(e.footnotesPart,w.noteId,y,e.opts,e.noteLayoutCache);if(!F)continue;let M=ks(r,w),S=M.evictable?M.bottom-M.blockTop:0;F.flowHeight>h-S+.001||(b+=F.flowHeight);}if(b<=0)return 0;let R=(e.existingAreaHeight>0?e.existingAreaHeight:e.plainSeparatorHeight)+b,I=Math.max(0,d-l-Is);if(!(l+m+s+R<=d+.001))return I;if(l+g+s+R<=d+.001)return 0;let{usedReservePt:L}=e;if(L===void 0)return 0;let P=Math.max(0,d-L-l),x=m+s>P+.001,v=Math.abs(L-I)<=rw;return x&&!v?0:I}var lw=Object.freeze({footnotesPart:"identity-check",endnotesPart:"identity-check",footnotePropsBySection:"content-fingerprint",endnotePropsBySection:"content-fingerprint",documentFootnoteProps:"content-fingerprint",documentEndnoteProps:"content-fingerprint",measurer:"identity-check",producer:"content-fingerprint",displayMode:"content-fingerprint",revisionAuthorFilter:"content-fingerprint",cache:"identity-check",styleCascade:"identity-check",numberingIndex:"identity-check",defaultTabStopPt:"content-fingerprint",projectLink:"pass-projector",projectLinkForPart:"relationship-epoch-guarded",linkRelsEpoch:"content-fingerprint",projectionTokenForParagraphForPart:"projection-epoch-guarded",projectionTokenForTableForPart:"projection-epoch-guarded",projectionEpoch:"content-fingerprint",projectFieldLink:"pass-projector",documentProperties:"content-fingerprint",refFields:"content-fingerprint",drawingsForPart:"drawing-epoch-guarded",drawingLayoutEpoch:"content-fingerprint"});function Lm(e,t){for(let n of Object.keys(lw))if(lw[n]===t&&e[n]!==void 0)return true;return false}function Cc(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function dw(e){return Lm(e,"drawing-epoch-guarded")&&e.drawingLayoutEpoch===void 0||Lm(e,"relationship-epoch-guarded")&&e.linkRelsEpoch===void 0||Lm(e,"projection-epoch-guarded")&&e.projectionEpoch===void 0?null:[e.producer,e.displayMode??Te,e.revisionAuthorFilter?.cacheKey??"",e.defaultTabStopPt??"",e.drawingLayoutEpoch??"",e.linkRelsEpoch??"",e.projectionEpoch??"",e.refFields?.valuesToken??"",e.documentProperties?JSON.stringify(e.documentProperties):"",Cc(e.documentFootnoteProps),Cc(e.documentEndnoteProps),e.footnotePropsBySection.map(Cc).join(";"),e.endnotePropsBySection.map(Cc).join(";")].join("\0")}function cw(e){let t=0;return e.map((n,r)=>{let o=`page-${r}`,i=n.index===r&&n.id===o&&n.box.y===t?n:Do(n,r,t);return t+=n.box.height+_o,i})}function uw(e){if(e.kind!=="tableRow")return null;let t=e.children.find(a=>a.namespaceUri===ca$1&&a.localName==="trPr");if(!t)return null;let n=null;for(let a of t.children)if(a.kind!=="textValue"&&a.namespaceUri===ca$1&&!(a.localName!=="ins"&&a.localName!=="del")){n=a;break}if(!n)return null;let r=a=>n.attributes.find(i=>i.namespaceUri===ca$1&&i.localName===a)?.value,o=r("date");return {kind:n.localName==="ins"?"insert":"delete",id:r("id")??"",author:r("author")??"",...o===void 0?{}:{date:o},nodeId:n.id}}function fw(e,t,n){let r=[];for(let o of e){let a=At(o)?Yt(o):uw(o);if(a){if(r.length>=Or)return false;r=Qt(r,a);}}return Oe(r,t,n)}function pw(e){let t=[];for(let n of e){let r=At(n)?Yt(n):uw(n);r&&t.push([r.kind,r.nodeId,r.author]);}return JSON.stringify(t)}function Lc(e){return `${e.noteKind}|${e.noteId}|${e.paragraphId}|${e.customMarkFollows?1:0}|${e.sectionIndex}`}function mw(e){return e.map(t=>`${Lc(t)}|${t.atomOffset}`).join(";")}function Em(e){return e.map(Lc).join(";")}function Mm(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r.atomOffset!==o.atomOffset||Lc(r)!==Lc(o))return false}return true}var Nm=64,Fw=8,yw=Nm+2*Fw,Tw=4096,kw=256,Bm=12,hw=new WeakMap;function iM(e,t,n){if(!e)return {memo:null,allHits:t,reused:false};let r=dw(n);if(r===null)return e.notes=null,{memo:null,allHits:t,reused:false};let o=mw(t),a=null,i=e.notes;if(i){let l=hw.get(i),d=i.inputFingerprint===r&&l!==void 0&&l.footnotesPart===n.footnotesPart&&l.endnotesPart===n.endnotesPart&&l.measurer===n.measurer&&l.cache===n.cache&&l.styleCascade===n.styleCascade&&l.numberingIndex===n.numberingIndex;if(d&&i.hitsFingerprint===o)return {memo:i,allHits:i.allHits,reused:true};if(a=d?Em(t):null,a!==null&&i.identityFingerprint===a)return i.hitsFingerprint=o,i.allHits=t,{memo:i,allHits:t,reused:true}}let s={hitsFingerprint:o,identityFingerprint:a??Em(t),inputFingerprint:r,allHits:t,provisionalMarks:zm(t,n),finalMarks:null,settledReserves:null,reflowSpent:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return hw.set(s,{footnotesPart:n.footnotesPart,endnotesPart:n.endnotesPart,measurer:n.measurer,cache:n.cache,styleCascade:n.styleCascade,numberingIndex:n.numberingIndex}),e.notes=s,{memo:s,allHits:t,reused:false}}function sM(e,t){return t>=e.range.start&&t<e.range.end}var bw=new WeakMap;function Ow(e){let t=bw.get(e);if(t)return t;let n=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){n.push(a);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)r(s.blocks);}};return r(e),bw.set(e,n),n}var xw=new WeakMap;function Am(e){let t=xw.get(e);if(t)return t;let n=new Map;for(let r of e){let o=n.get(r.paragraphId);o?o.push(r):n.set(r.paragraphId,[r]);}return xw.set(e,n),n}var Sw=new WeakMap;function Ls(e,t,n){let r=Ow(e.fragments);if(!n)return t.filter(s=>r.some(l=>Zn(l,s.paragraphId,s.atomOffset)));let o=Sw.get(e.fragments);if(o&&o.refIndex===n)return o.result;let a=[],i=new Set;for(let s of r)for(let l of Tr(s)){let d=n.get(l);if(d)for(let c of d)i.has(c)||Zn(s,l,c.atomOffset)&&(i.add(c),a.push(c));}return Sw.set(e.fragments,{refIndex:n,result:a}),a}function Cw(){let e=new Map;return {get(t,n,r,o,a,i,s){let d=`${t?.name??"none"}\0${o}\0${n}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=Ic(t,n,r,i,o,a);return e.set(d,u),u.fallbackReason&&s.push(u.fallbackReason),u}}}function Lw(e){return e==="sectEnd"||e==="docEnd"}var Rw=new WeakMap;function Ew(e){let t=Rw.get(e);return t||(t=new Map,Rw.set(e,t)),t}function Mw(e,t,n,r,o,a,i,s){if(e)return e.get(t,n,r,o,a,i,s);let l=Ic(t,n,r,i,o,a);return l.fallbackReason&&s.push(l.fallbackReason),l}function lM(e,t){let n=[];for(let r of e){if(n.length>=ti)break;n.push({...r,sectionIndex:t.get(r.paragraphId)??0});}return n}function jo(e,t){return e.footnotePropsBySection[t]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function Dm(e,t){return e.endnotePropsBySection[t]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function _m(e,t){return {measurer:e.measurer,producer:e.producer,displayMode:e.displayMode,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,revisionAuthorFilter:e.revisionAuthorFilter,projectLink:e.projectLink,projectLinkForPart:e.projectLinkForPart,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,refFields:e.refFields,noteMarks:t,drawingsForPart:e.drawingsForPart,projectionTokenForParagraphForPart:e.projectionTokenForParagraphForPart,projectionTokenForTableForPart:e.projectionTokenForTableForPart}}function dM(e,t){let n="FootnoteReference";if(!t)return {...Mn,verticalAlign:"superscript"};let r=ir([],[{localName:"rStyle",attributes:{val:n}}],t);return He(r,t.themeFonts)}function cM(e,t,n,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(t.footnotePropsBySection.length,t.endnotePropsBySection.length,1,...n.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=jo(t,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<Bm;p+=1){let m=un(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=Dm(t,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<Bm;p+=1){let m=un(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let s=dM("footnote",t.styleCascade),l,d=-1;for(let c of o){let u=t.measurer.measure(c,s);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(l?.length??0))&&(l=c,d=u);}return l}function Bw(e,t,n){let r=Lo("footnote",e,s=>jo(n,s)),o=Lo("endnote",t,s=>Dm(n,s)),a=new Map;for(let s of r)a.set(No("footnote",s.noteId),s.mark);for(let s of o)a.set(No("endnote",s.noteId),s.mark);let i=cM(a,n,e,t);return {marks:a,...i?{reservedMarkText:i}:{}}}function uM(e,t){if(t.marks.size===0)return e;let n=false,r=e.pages.map(o=>{if(!fM(o.fragments))return o;let a=Nw(o.fragments,t);return a===o.fragments?o:(n=true,{...o,fragments:a})});return n?{...e,pages:r}:e}var Pw=new WeakMap;function fM(e){let t=Pw.get(e);if(t!==void 0)return t;let n=false,r=o=>{for(let a of o){if(n)return;if(a.kind==="paragraph"){for(let i of a.lines)for(let s of i.spans)if(s.projected&&s.noteNav?.direction==="to-note"){n=true;return}continue}for(let i of a.rows)for(let s of i.cells)r(s.blocks);}};return r(e),Pw.set(e,n),n}function Nw(e,t){let n=false,r=e.map(o=>{if(o.kind==="paragraph"){let s=pM(o,t);return s!==o&&(n=true),s}let a=false,i=o.rows.map(s=>{let l=false,d=s.cells.map(c=>{let u=Nw(c.blocks,t);return u===c.blocks?c:(l=true,{...c,blocks:u})});return l?(a=true,{...s,cells:d}):s});return a?(n=true,{...o,rows:i}):o});return n?r:e}function pM(e,t){let n=false,r=e.lines.map(o=>{let a=mM(o,t);return a!==o&&(n=true),a});return n?{...e,lines:r}:e}function mM(e,t){let n=false,r=e.spans.map(o=>{let a=gM(o,t);return a!==o&&(n=true),a});return n?{...e,spans:r}:e}function gM(e,t){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let n=t.marks.get(e.noteNav.scopeId);if(n===void 0)return e;let r=n??"";return e.text===r?e:{...e,text:r}}function yM(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Aw(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function hM(e){for(let t=e.length-1;t>=0;t-=1)if(Aw(e[t]))return t;return Math.max(0,e.length-1)}function Hm(e,t,n,r,o,a,i,s){let l=new Map(a),d=t.filter(z=>z.noteKind==="footnote"),c=e.contentBox.width,u=_m(n,r),f=[],p=0,m=Tw,g=a.size>0?"continuationSeparator":"separator",y=Math.max(0,e.contentBox.height),h=z=>Mw(s?.separatorCache,n.footnotesPart,z,c,"footnote",y,u,i),b=h(g),R=Ts(e),I=Math.max(0,e.contentBox.height-R-b.flowHeight),T=ni(e.contentBox.height,b.flowHeight),k=s?.reserveColumnBudget?T:I,P={fullContentHeight:Math.max(0,e.contentBox.height-b.flowHeight),reasons:i},x=s?.reserveBandOf?g==="separator"?T:ni(e.contentBox.height,h("separator").flowHeight):0,v=s?.reserveBandOf?Oc(e):0;for(let[z,N]of a){let A=z.match(/^(footnote|endnote):(-?\d+)$/);if(!A||A[1]!=="footnote")continue;let B=Number(A[2]),G=Math.max(0,k-p);if(N.height<=G+.001)f.push({noteKind:"footnote",noteId:B,scopeId:z,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:N.height},fragments:N.fragments}),p+=N.height,l.delete(z);else {let $=Os({fragments:N.fragments,flowHeight:N.height},G,P);$.head.length>0&&(f.push({noteKind:"footnote",noteId:B,scopeId:z,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:$.headHeight},fragments:$.head}),p+=$.headHeight),$.tail.length>0?l.set(z,{fragments:$.tail,height:$.tailHeight,mark:null}):l.delete(z);}}let w;for(let z of d){if(f.length>=ti){i.push("note-count-limit");break}let N=s?.reserveBandOf?.(z);if(w!==void 0&&N&&N.evictable&&N.bottom>w+.001)continue;let A=vs(n.footnotesPart,z.noteId,c,u,s?.noteLayoutCache);if(!A){i.push("missing-note-body");continue}let B=r.marks.get(No("footnote",z.noteId))??null,G=N?Math.min(k,Math.max(0,e.contentBox.height-Math.max(14,N.bottom)-b.flowHeight)):k,$=Math.max(0,G-p);if(N&&N.evictable&&s?.evictionAllowed!==false&&A.flowHeight>$+.001&&A.flowHeight<=x-(N.bottom-N.blockTop)+.001&&N.top>v+.001&&N.top>=14){w=w===void 0?N.top:Math.min(w,N.top);continue}if(m-=A.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(A.flowHeight<=$+.001)f.push({noteKind:"footnote",noteId:z.noteId,scopeId:A.scopeId,mark:z.customMarkFollows?null:B,box:{x:e.contentBox.x,y:0,width:c,height:A.flowHeight},fragments:A.fragments}),p+=A.flowHeight;else {let V=Os(A,$,P);V.head.length>0&&(f.push({noteKind:"footnote",noteId:z.noteId,scopeId:A.scopeId,mark:z.customMarkFollows?null:B,box:{x:e.contentBox.x,y:0,width:c,height:V.headHeight},fragments:V.head}),p+=V.headHeight),V.tail.length>0&&l.set(A.scopeId,{fragments:V.tail,height:V.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:l,evictionTopPt:w};let F=b.flowHeight,M=F+p,S=Fs(e.fragments),H;o==="beneathText"?H=e.contentBox.y+Math.max(R,Math.min(S,e.contentBox.height-M)):(H=e.contentBox.y+e.contentBox.height-M,H=Math.max(H,e.contentBox.y+R));let j=H+F,_=f.map(z=>{let N={...z,box:{...z.box,y:j}};return j+=z.box.height,N}),C=Fc(b,e.contentBox.x,c,H);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:H,width:c,height:M},separator:{kind:g,box:C,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:_},nextCarry:l,evictionTopPt:w}}function Dw(e,t){let n=Math.min(Math.max(t,0),e.length-1);for(;n>0&&e[n].noteStream!==void 0;)n-=1;return n}function bM(e){return t=>{let n=ym(e,t.sectionAnchorIndex,t.landingIndex,t.template.box);return xM(t.template,t.landingIndex,t.noteStream,n)}}function xM(e,t,n,r){let o=r?{x:e.contentBox.x,y:e.box.y+r.insets.top,width:e.contentBox.width,height:r.insets.height}:e.contentBox,a=r?r.header:e.header,i=r?r.footer:e.footer;return {id:`page-${t}`,index:t,box:e.box,contentBox:o,fragments:[],...n?{noteStream:n}:{},...a?{header:a}:{},...i?{footer:i}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+1}}:{}}}function SM(e,t){let n=null,r=false,o=e.map((a,i)=>{if(a.noteStream===void 0)return n=a.index,a;if(n===null)return a;let s=ym(t,n,i,a.box);if(!s)return a;let l=a.box.y+s.insets.top;if(l===a.contentBox.y&&s.insets.height===a.contentBox.height&&s.header?.variant===a.header?.variant&&s.footer?.variant===a.footer?.variant)return a;let c={...a.contentBox,y:l,height:s.insets.height},u=l+c.height,f=a.contentBox.y+a.contentBox.height,p=RM(a,l-a.contentBox.y,u-f);if(!p.fits(l,u))return a;r=true;let{header:m,footer:g,...y}=a;return {...y,contentBox:c,...p.footnotes?{footnotes:p.footnotes}:{},...p.endnotes?{endnotes:p.endnotes}:{},...s.header?{header:s.header}:{},...s.footer?{footer:s.footer}:{}}});return r?o:[...e]}function ww(e,t){if(t===0)return e;let n=r=>({...r,y:r.y+t});return {...e,box:n(e.box),...e.separator?{separator:{...e.separator,box:n(e.separator.box)}}:{},notes:e.notes.map(r=>({...r,box:n(r.box)}))}}function RM(e,t,n){let r=i=>i.placement==="pageBottom"?n:t,o=e.footnotes?ww(e.footnotes,r(e.footnotes)):void 0,a=e.endnotes?ww(e.endnotes,r(e.endnotes)):void 0;return {...o?{footnotes:o}:{},...a?{endnotes:a}:{},fits(i,s){let l=d=>d===void 0||d.box.y>=i-.001&&d.box.y+d.box.height<=s+.001;return l(o)&&l(a)}}}function jm(e,t){let n=new Set;for(let r of Ow(e.fragments))n.add(t.get(r.paragraphId)??0);return [...n].sort((r,o)=>r-o)}function _w(e,t,n){for(let r=e.length-1;r>=0;r-=1)if(jm(e[r],n).includes(t))return r;return Math.max(0,e.length-1)}function PM(e,t,n){let r=_w(e,t,n);for(let o=r+1;o<e.length;o+=1){let a=e[o];if(a.noteStream==="footnote-drain"||a.noteStream==="endnote-overflow"||a.fragments.length===0&&(a.footnotes?.notes.length??0)>0)continue;let i=jm(a,n);if(i.length!==0&&!i.includes(t))return o}return e.length}function wM(e,t){let n=cw(e);return [...jr({revision:t,pages:n}).pages]}function vM(e,t,n,r,o,a,i,s){let l=new Map(a),d=[];if(t.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};let c=e.contentBox.width,u=_m(n,r),f=s?.separatorKind??"separator",p=C=>C==="footnote"?n.footnotesPart:n.endnotesPart,m=n.endnotesPart??n.footnotesPart,g=Math.max(0,e.contentBox.height),y=Mw(s?.separatorCache,m,f,c,"endnote",g,u,i),h=y.flowHeight,b=Fs(e.fragments),R=e.endnotes?Math.max(b,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):b,I=yM(e),T=Math.max(0,I-R-h),L={fullContentHeight:Math.max(0,I-h),reasons:i},P=[],x=0,v=Tw;for(let[C,D]of a){let z=C.match(/^(footnote|endnote):(-?\d+)$/);if(!z)continue;let N=z[1],A=Number(z[2]),B=Math.max(0,T-x);if(D.height<=B+.001)P.push({noteKind:N,noteId:A,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:D.height},fragments:D.fragments}),x+=D.height,l.delete(C);else {let G=Os({fragments:D.fragments,flowHeight:D.height},B,L);G.head.length>0&&(P.push({noteKind:N,noteId:A,scopeId:C,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:G.headHeight},fragments:G.head}),x+=G.headHeight),G.tail.length>0?l.set(C,{fragments:G.tail,height:G.tailHeight,mark:null}):l.delete(C);}}for(let C=0;C<t.length;C+=1){let D=t[C];if(P.length>=ti){i.push("note-count-limit"),d.push(...t.slice(C));break}let z=p(D.noteKind),N=vs(z,D.noteId,c,u,s?.noteLayoutCache);if(!N){i.push("missing-note-body");continue}let A=r.marks.get(No(D.noteKind,D.noteId))??null,B=Math.max(0,T-x);if(v-=N.fragments.length,v<0){i.push("note-area-fragment-limit"),d.push(...t.slice(C));break}if(N.flowHeight<=B+.001)P.push({noteKind:D.noteKind,noteId:D.noteId,scopeId:N.scopeId,mark:D.customMarkFollows?null:A,box:{x:e.contentBox.x,y:0,width:c,height:N.flowHeight},fragments:N.fragments}),x+=N.flowHeight;else {let G=Os(N,B,L);G.head.length>0&&(P.push({noteKind:D.noteKind,noteId:D.noteId,scopeId:N.scopeId,mark:D.customMarkFollows?null:A,box:{x:e.contentBox.x,y:0,width:c,height:G.headHeight},fragments:G.head}),x+=G.headHeight),G.tail.length>0&&l.set(N.scopeId,{fragments:G.tail,height:G.tailHeight,mark:null}),d.push(...t.slice(C+1));break}}if(P.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};if(P.length===0)return {area:void 0,nextCarry:l,remainingRefs:d};let w=e.contentBox.y+R,F=w+h,M=P.map(C=>{let D={...C,box:{...C.box,y:F}};return F+=C.box.height,D}),S=Fc(y,e.contentBox.x,c,w),H=h+x,j=Math.max(0,I-R),_=Math.min(H,j);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:w,width:c,height:_},separator:{kind:f,box:S,fragments:y.fragments,synthetic:y.synthetic,...y.ruleStyle!==void 0?{ruleStyle:y.ruleStyle}:{}},notes:M},nextCarry:l,remainingRefs:d}}function IM(e,t,n,r,o,a,i,s,l){let d=e,c=t,u=e[Dw(e,e.length-1)].index;for(;c.size>0&&a.remaining>0;){let f=d[d.length-1],p=l({template:f,landingIndex:d.length,noteStream:"footnote-drain",sectionAnchorIndex:u}),m=Hm(p,[],n,r,"pageBottom",c,o,{separatorCache:i,noteLayoutCache:s}),g=m.area?.notes.length??0;if(c=m.nextCarry,g===0){o.push("note-overflow-stalled"),m.area&&(d=[...d,{...p,footnotes:m.area}],a.remaining-=1);break}d=[...d,{...p,footnotes:m.area}],a.remaining-=1;}return c.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:d,carry:c}}function FM(e,t,n,r,o,a="endnote-overflow"){let i=r({template:n,landingIndex:t,noteStream:a,sectionAnchorIndex:o});return {pages:[...e.slice(0,t),i,...e.slice(t)],pageIndex:t}}function vw(e,t,n){if(n<=t||t>=e.length)return e;let r=Math.min(n,e.length),o=e[t],a=o.pageFieldSource?.pageNumber??t+1,i=o.pageFieldSource?.format,s=r-t,l=[...e];for(let d=t;d<r;d+=1){let c=l[d];l[d]={...c,pageFieldSource:{pageNumber:a+(d-t),sectionPageCount:s,...i?{format:i}:{}}};}return l}function Iw(e,t,n,r,o,a,i,s,l){if(n.length===0||e.length===0)return e;let d=e[Dw(e,t)].index,c=[...e],u=[...n],f=new Map,p=t,m=0,g="separator",y=l?.stopBeforeIndex??Number.POSITIVE_INFINITY,h=l?.sectionStartIndex??t,b=l?.stopBeforeIndex!==void 0,R=l?.separatorCache;for(;u.length>0||f.size>0;){if(p>=c.length||p>=y){if(s.remaining<=0){i.push("note-overflow-page-limit");break}let L=c[Math.min(Math.max(p,1),c.length)-1]??c[c.length-1],P=Math.min(p,y,c.length),x=FM(c,P,L,l.mint,d,"endnote-overflow");c=x.pages,p=x.pageIndex,b&&(y=P+1),m+=1,s.remaining-=1;}let I=c[p];if(!Aw(I)){p+=1;continue}let T=vM(I,u,r,o,a,f,i,{separatorKind:g,...R?{separatorCache:R}:{},...l.noteLayoutCache?{noteLayoutCache:l.noteLayoutCache}:{}});f=T.nextCarry,u=T.remainingRefs;let k=T.area?.notes.length??0;if(T.area){let L=c[p];c[p]={...L,endnotes:L.endnotes?{...T.area,notes:[...L.endnotes.notes,...T.area.notes],box:{...T.area.box,y:L.endnotes.box.y,height:L.endnotes.box.height+T.area.box.height}}:T.area};}else {if(f.size===0&&u.length===0)break;if(!T.area&&f.size===0&&u.length>0){p+=1,g="separator";continue}}if(k===0&&(f.size>0||u.length>0)&&I.fragments.length===0&&I.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(f.size>0||u.length>0){g="continuationSeparator",p+=1;continue}break}return (u.length>0||f.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),b?c=vw(c,h,Math.min(y,c.length)):m>0&&(c=vw(c,h,c.length)),c}function Hw(e,t,n,r,o,a){let i=o??null,s=new Map,l=[],d=new Map,c=Am(t),u=Cw(),f=Ew(r),p=_m(n,r),m=R=>R.noteKind==="footnote"&&!Lw(jo(n,R.sectionIndex).pos),g=t.some(m),y=R=>Ls(R,t,c).filter(m),h=(R,I,T)=>ow(s,R,Math.min(I,T));for(let R=0;R<e.pages.length;R+=1){let I=e.pages[R],T=Cm(I),L=Ls(T,t,c).filter(B=>B.noteKind==="footnote"),P=L.filter(m),x=P[0]?.sectionIndex??0,v=jo(n,x),w=e.pages[R+1],F=a?a.get(I.index)??0:void 0,M=ni(T.contentBox.height,0),S=B=>g?sw({bodyPage:T,nextPage:w,existingAreaHeight:B,usedReservePt:F,pageBottomRefsOf:y,footnotesPart:n.footnotesPart,opts:p,plainSeparatorHeight:u.get(n.footnotesPart,"separator",T.contentBox.width,"footnote",Math.max(0,T.contentBox.height),p,l).flowHeight,noteLayoutCache:f}):0;if(P.length===0&&d.size===0){h(I.index,S(0),M);continue}if(i&&d.size===0){let B=i.pageReserve.get(I);if(B&&B.marks===r&&Mm(L,B.pageRefs)){for(let G of B.reasons)l.push(G);h(I.index,Math.max(B.reserve,S(B.areaHeight)),M);continue}}let H=d.size===0,j=l.length,{area:_,nextCarry:C,evictionTopPt:D}=Hm(T,P,n,r,v.pos,d,l,{reserveColumnBudget:true,reserveBandOf:B=>ks(T,B),separatorCache:u,noteLayoutCache:f,evictionAllowed:!w||w.contentBox.width===T.contentBox.width&&w.contentBox.height===T.contentBox.height});d=C;let z=D!==void 0?Math.max(0,T.contentBox.height-D-Is):0,N=_?.box.height??0,A=Math.min(Math.max(N,z),M);i&&H&&d.size===0&&i.pageReserve.set(I,{pageRefs:L,marks:r,reserve:A,areaHeight:N,reasons:l.slice(j)}),h(I.index,Math.max(A,S(N)),M);}let b=true;for(let R of e.pages){let I=s.get(R.index)??0;if(I<=0)continue;if(Ts(R)+I>R.contentBox.height+.5){b=false;break}}return {reserves:s,stable:b,reasons:l}}function jw(e,t,n,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,s={remaining:kw},l=Am(t),d=Cw(),c=bM(e),u=[],f=[];for(let k of e.pages)for(let L of Ls(k,t,l)){let P={noteId:L.noteId,sectionIndex:L.sectionIndex,pageIndex:k.index,customMarkFollows:L.customMarkFollows};L.noteKind==="footnote"?u.push(P):f.push(P);}let p=o?[...u,...f].map(k=>`${k.noteId}|${k.sectionIndex}|${k.pageIndex??""}|${k.customMarkFollows?1:0}`).join(";"):"",m;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===p?m=o.finalMarks.marks:(m=Bw(u,f,n),o&&(o.finalMarks={sitesFingerprint:p,marks:m}));let g=Ew(m),y=new Map,h=new Map,b=[],R=e.pages.map(k=>{let L=Ls(k,t,l),P=L.filter(C=>C.noteKind==="footnote"),x=L.filter(C=>C.noteKind==="endnote");for(let C of x)if(Dm(n,C.sectionIndex).pos==="sectEnd"){let z=h.get(C.sectionIndex)??[];z.push(C),h.set(C.sectionIndex,z);}else b.push(C);for(let C of P){let D=jo(n,C.sectionIndex);if(D.pos==="sectEnd"){let z=h.get(C.sectionIndex)??[];z.push(C),h.set(C.sectionIndex,z);}else D.pos==="docEnd"&&b.push(C);}if(o&&y.size===0){let C=o.pageAttach.get(k);if(C&&C.marks===m&&Mm(P,C.pageRefs)){for(let D of C.reasons)a.push(D);return C.attached}}let v=Cm(k),w=P.filter(C=>{let D=jo(n,C.sectionIndex).pos;return D==="pageBottom"||D==="beneathText"}),F=w[0]?.sectionIndex??0,M=jo(n,F),S,H=y.size===0,j=a.length;if(w.length>0||y.size>0||P.length===0&&!Lw(M.pos)){let C=Hm(v,w,n,m,M.pos,y,a,{separatorCache:d,noteLayoutCache:g});S=C.area,y=C.nextCarry;}let _=S?{...v,footnotes:S}:v;if(o&&H&&y.size===0){let C={pageRefs:P,marks:m,attached:_,reserve:0,reasons:a.slice(j)};if(o.pageAttach.set(_,C),_!==k){let D=o.pageReserve.get(k);D&&o.pageReserve.set(_,D);}}return _}),I=R.length;if(y.size>0){let k=IM(R,y,n,m,a,s,d,g,c);R=k.pages,y=k.carry;}if(h.size>0&&R.length>0){let k=[...h.keys()].sort((L,P)=>L-P);for(let L of k){let P=h.get(L),x=_w(R,L,i),v=PM(R,L,i),w=x;for(let F=0;F<=x;F+=1)if(jm(R[F],i).includes(L)){w=F;break}R=Iw(R,x,P,n,m,"sectEnd",a,s,{stopBeforeIndex:v,sectionStartIndex:w,separatorCache:d,noteLayoutCache:g,mint:c});}}return b.length>0&&R.length>0&&(R=Iw(R,hM(R),b,n,m,"docEnd",a,s,{separatorCache:d,noteLayoutCache:g,mint:c})),R.length!==I&&(R=SM(R,e),R=wM(R,e.revision)),{layout:uM({...e,pages:R},m),fallbackReasons:a,noteMarks:m}}function TM(e,t,n){return (t==="all-markup"&&n===void 0?Ye(e):Ze$1(e,{includeReference:(a,i)=>fw(i,t,n),projectionKey:`${t};${n?.cacheKey??""}`,ancestryKey:pw})).map(a=>({noteKind:a.noteKind,noteId:a.noteId,paragraphId:a.paragraphId,atomOffset:a.atomOffset,customMarkFollows:a.customMarkFollows}))}function zw(e,t,n,r,o){let a=n.displayMode??Te,i=n.revisionAuthorFilter,s=TM(e,a,i);if(s.length===0)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),o({...n,noteMarks:void 0,pageBottomReserves:void 0});let l=ZP(e,t,a,i,n.session),d=lM(s,l),c=iM(n.session,d,r),u=c.memo,f=c.allHits,p=u?.provisionalMarks??zm(f,r),m=n.session?.notePageBottomReserves,g=m?Kr(m):new Map,y=[],h=o({...n,noteMarks:p,pageBottomReserves:g}),b=ri(g),R=c.reused&&u?.settledReserves&&u.settledReserves.part===e&&u.settledReserves.fingerprint===b?u.settledReserves:null;if(R)y=[...R.reasons];else {let T=new Set([b]),k=u&&u.reflowSpent&&u.reflowSpent.part===e?u.reflowSpent:{part:e,adopted:0};u&&(u.reflowSpent=k);let L=0,P=m&&g.size>0?Fw:Nm,x=h.pages.length,v=Math.max(8,Math.ceil(x/16)),w=0;for(let F=0;F<P;F+=1){let M=Hw(h,f,r,p,u,g);if(y=[...M.reasons],M.stable&&kc(M.reserves,g))break;if(k.adopted>=yw){y.push("note-reflow-exhausted");break}if(w>=v){y.push("note-reflow-exhausted");break}let S=Kr(M.reserves);if(kc(S,g)){y.push("note-reflow-exhausted");break}let H=ri(S);if(T.has(H)){S=aw(g,M.reserves);let j=ri(S);if(kc(S,g)||T.has(j)){y.push("note-reflow-exhausted");break}}g=S,T.add(ri(g)),k.adopted+=1,L+=1,h=o({...n,noteMarks:p,pageBottomReserves:g}),w=h.pages.length>x?w+1:0,x=h.pages.length,F===P-1&&y.push("note-reflow-exhausted");}u&&(L===0||k.adopted>=yw)&&(u.settledReserves={part:e,fingerprint:ri(g),reasons:[...y]});}let I=jw(h,f,r,{fallbackReasons:y,paragraphSectionIndex:l,memo:u});return n.session&&(n.session.previous=I.layout,n.session.notePageBottomReserves=Kr(g)),I.layout}function zm(e,t){let n=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?n.push(a):r.push(a);}return Bw(n,r,t)}function Gw(e,t){let n=e.projectLink??t.projectLink,r=e.projectFieldLink??t.projectFieldLink,o=e.documentProperties??t.documentProperties,a=e.refFields??t.refFields,i=e.displayMode??t.displayMode,s=e.revisionAuthorFilter??t.revisionAuthorFilter;return {...e,...n?{projectLink:n}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{},...a?{refFields:a}:{},...i?{displayMode:i}:{},...s?{revisionAuthorFilter:s}:{}}}var kM=8,oi=[],Ww=new TextEncoder;function OM(e,t){let n=a(Ww.encode(e===void 0?"undefined":`string:${e}`)),r=a(Ww.encode(t));return `control-producer:v1:${n}:${r}`}function $w(e,t){let n=oi.findIndex(o=>o.base===e&&o.token===t);if(n>=0){let[o]=oi.splice(n,1);return oi.push(o),o.producer}let r=OM(e,t);return oi.push({base:e,token:t,producer:r}),oi.length>kM&&oi.shift(),r}var Vw=new WeakMap,Kw=null;function CM(e,t,n,r,o,a,i){return e!=null&&e.base===t&&e.noteMarks===n&&e.defaultTabStopPt===r&&e.displayMode===o&&e.authorFilter===a&&e.pageNumberFormat===i}function Xw(e,t,n,r,o,a,i){let s=t?Vw.get(t):Kw;if(CM(s,e,n,r,o,a,i))return s.producer;let l=(e??"unversioned-measurer")+(t?`|sc:${t.cacheToken}`:"")+(n?`|nm:${yR(n)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===Te?"":`|rev:${o}`)+(a?`|reviewers:${a.cacheKey}`:"")+(i!==void 0?`|pnf:${i}`:""),d={base:e,noteMarks:n,defaultTabStopPt:r,displayMode:o,authorFilter:a,pageNumberFormat:i,producer:l};return t?Vw.set(t,d):Kw=d,l}var LM={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",range:"hashed",props:"hashed",styleId:"hashed",outlineLevel:"hashed",alignment:"hashed",spacing:"hashed",indent:"hashed",bottomBorder:"hashed",borders:"hashed",shading:"hashed",shadingBox:"hashed",markRevisions:"hashed",markRevision:"covered",markFormatRevision:"hashed",marker:"hashed",tabStops:"hashed",lines:"hashed",box:"hashed"},EM={kind:"covered",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function qw(e){return Object.keys(e).filter(t=>e[t]==="hashed")}var MM=qw(LM),BM=qw(EM),Yw=new WeakMap;function Uw(e){let t=Yw.get(e);if(t!==void 0)return t;let n=e.kind==="table"?JSON.stringify([gn(e),...BM.map(r=>e[r])]):JSON.stringify(MM.map(r=>e[r]));return Yw.set(e,n),n}function Zw(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1){let r=e[n],o=t[n];if(r!==o&&Uw(r)!==Uw(o))return false}return true}function Gm(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return false;return true}var Jw=Object.freeze([]),Qw=new Map;function ev(e,t){if(e===t)return true;if(e.size!==t.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function $r(){return {previous:null,checkpoints:[],keys:[],context:"",producer:"",parityDependent:false,startPageParity:0,prepass:null,startLineCounter:0,endLineCounter:0,endCursorY:0,endSpaceAfter:0,endsOpenPage:true,stats:{placed:0,total:0,reusedPages:0,fullPasses:0},balanceLimit:null,multi:null,notePageBottomReserves:null,notes:null}}function tv(e,t){let n={previous:t.previous,checkpoints:t.checkpoints,keys:t.keys,context:t.context,producer:t.producer,parityDependent:t.parityDependent,startPageParity:t.startPageParity,prepass:t.prepass,notes:t.notes,startLineCounter:t.startLineCounter,endLineCounter:t.endLineCounter,endCursorY:t.endCursorY,endSpaceAfter:t.endSpaceAfter,endsOpenPage:t.endsOpenPage,stats:t.stats,balanceLimit:t.balanceLimit,multi:t.multi,notePageBottomReserves:t.notePageBottomReserves};Object.assign(e,n);}function nv(e,t,n){return me([...e].map(([r,o])=>`${n}${r}=${o.flowHeight}`).sort())}function av(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${nv(e.headers,false,"h")};f:${nv(e.footers,false,"f")}`:""}function Ec(e,t,n){if(e.sectionFurniture)return e.sectionFurniture[t];if(t===n-1)return e.furniture}function NM(e,t){let n=e.map((r,o)=>{let a=cr(r.properties),i=Ec(t,o,e.length),s=r.properties.pageNumbering,l=s?`pn:${me([s.start??"",s.fmt??"",s.chapStyle??"",s.chapSep??""].map(String))}`:"pn:",d=r.properties.columns,c=`cols:${d.count},${d.gapTwips},${d.equalWidth===false?0:1},${d.separator?1:0};${(d.definitions??[]).map(u=>`${u.widthTwips}/${u.gapTwips}`).join(",")}`;return me([r.properties.breakType,a.width,a.height,a.margin.top,a.margin.right,a.margin.bottom,a.margin.left,a.headerDistance??36,a.footerDistance??36,av(i),l,c].map(String))});return me(n)}function AM(e,t,n){if(!e)return null;let r=e.multi;if(r&&r.structureKey===t&&r.sections.length===n)return r;let o={structureKey:t,sections:Array.from({length:n},()=>$r()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1,previousPageRefToken:""};return e.multi=o,o}function DM(e){return e!=="continuous"}function _M(e,t){return e.width===t.width&&e.height===t.height}function HM(e){let t=e.contentBox.y-e.box.y;return {top:t,bottom:e.box.height-t-e.contentBox.height,height:e.contentBox.height}}function jM(e,t){if(t.fragments.length===0&&!t.columnSeparators?.length&&!t.anchoredDrawings?.length)return e;let n=e.anchoredDrawings||t.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...t.anchoredDrawings??[]]):void 0;return {...e,fragments:t.fragments.length>0?[...e.fragments,...t.fragments]:e.fragments,...(e.columnSeparators?.length||t.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...t.columnSeparators??[]]},...n?{anchoredDrawings:n}:{}}}function rv(e,t,n){e.previous=t,e.startLineCounter=0,e.endLineCounter=n,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var ov=new WeakMap;function zM(e,t,n,r,o,a){let i=ov.get(e);if(i&&i.globalIndex===t&&i.sheetY===n&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let s=Do(e,t,n),l=Wa([s],r,o,a)[0];return ov.set(e,{globalIndex:t,sheetY:n,pageNumber:r,sectionPageCount:o,format:a,published:l}),l}function iv(e,t,n,r,o){let{session:a,...i}=r,s=NM(t,r),l=AM(a,s,t.length),d=i.cache&&i.retainKeys!==false?i.retainKeys??(i.cache.retentionPassDue?.()??true?new Set:false):false,c=()=>{d&&!i.retainKeys&&i.cache?.retain(d);},u=[],f=[],p=[],m=0,g=0,y=0,h=0,b=0,R=0,I=0,T=true,k=[],L=null,P="",x=1;for(let M=0;M<t.length;M+=1){let S=t[M],H=e.slice(S.blockStart,S.blockEndExclusive),j=cr(S.properties),_=Ec(r,M,t.length),C=u.length,D=m,z=l?.spans[M],N=av(_);if(H.length===0&&!DM(S.properties.breakType)){p.push({startIndex:C,pageCount:0,sheetY:D,remappedPages:[],sourcePages:[]});continue}let A=M>0&&S.properties.breakType==="continuous"&&u.length>0&&T&&L!==null&&_M(L,j)&&P===N,B=l?.sections[M],G=S.properties.columns.count>1&&t[M+1]?.properties.breakType==="continuous",$=A?HM(u[u.length-1]):void 0,V=S.properties.pageNumbering?.fmt,q=A?u[u.length-1]?.pageFieldSource?.format:void 0,Y=A&&!_r("PAGE",q)?q:V,U=o(H,n,{...i,retainKeys:d,geometry:j,furniture:_,sectionColumns:S.properties.columns,...G?{balanceColumns:G}:{},lineCounterStart:g,pageIndexStart:A?C-1:C,...A?{flowStartY:R,spaceBeforeCarry:I}:{},...$?{continuedPageInsets:$}:{},...Y!==void 0?{bodyPageNumberFormat:Y}:{},...B?{session:B}:{}});k.push({startIndex:C,at:U.overflowShellAt}),g=U.lineCounter,R=U.endCursorY,I=U.endSpaceAfter,T=U.endsOpenPage,L=j,P=N,B?(y+=B.stats.placed,h+=B.stats.total):(y+=H.length,h+=H.length);let K=B!==void 0&&B.stats.placed===0&&B.stats.reusedPages===U.pages.length&&z!==void 0&&z.pageCount===U.pages.length&&z.sourcePages.length===U.pages.length&&z.sourcePages.every((te,Fe)=>te===U.pages[Fe]),Re=z!==void 0&&z.startIndex===C&&z.sheetY===D&&z.remappedPages.length===U.pages.length,ge=S.properties.pageNumbering,se=ge?.start!==void 0?ge.start:x,he=ge?.fmt,Le=z?.remappedPages[0],fe=z===void 0||z.remappedPages.length===0||Le?.pageFieldSource!==void 0&&Le.pageFieldSource.pageNumber===se&&Le.pageFieldSource.sectionPageCount===z.remappedPages.length&&Le.pageFieldSource.format===he,Ee;if(A){let te=u.length-1,Fe=u[te],ye=jM(Fe,U.pages[0]);if(ye!==Fe){u[te]=ye;let Me=f.lastIndexOf(Fe);Me!==-1&&(f[Me]=ye);}let ve=[];for(let Me of U.pages.slice(1)){let Be=Do(Me,u.length+ve.length,m);ve.push(Be),m=Be.box.y+Be.box.height+_o;}let We=ve.length+1;Ee=Wa(ve,se+1,We,he);for(let Me of Ee)u.push(Me),f.push(Me);x=se+We;}else if(K&&Re&&fe){Ee=z.remappedPages,b+=Ee.length;for(let te of Ee)u.push(te),f.push(te),m=te.box.y+te.box.height+_o;x=se+Ee.length;}else {let te=[];for(let Fe of U.pages){let ye=zM(Fe,u.length+te.length,m,se+te.length,U.pages.length,he);te.push(ye),m=ye.box.y+ye.box.height+_o;}Ee=te;for(let Fe of Ee)u.push(Fe),f.push(Fe);x=se+Ee.length;}p.push({startIndex:C,pageCount:Ee.length,sheetY:D,remappedPages:Ee,sourcePages:U.pages});}if(u.length===0){let M=cr(t[0]?.properties??nn),S=o([],n,{...i,retainKeys:d,geometry:M,sectionColumns:t[0]?.properties.columns??nn.columns});c();let H=jr({revision:n,pages:S.pages});return Ss(H,(j,_,C)=>S.overflowShellAt(_,C)),l&&(l.spans=[],l.previousRemapped=S.pages,l.previousFinalized=H,l.previousPageCount=H.pages.length,l.previousPageRefToken=cp(S.pages)),a&&(rv(a,H,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),H}let v=jr({revision:n,pages:u}),w=v,F=cp(u);if(l?.previousFinalized&&l.previousPageCount===v.pages.length&&l.previousRemapped.length===f.length&&l.previousPageRefToken===F){let M=l.previousFinalized.pages,S=l.previousRemapped,H=v.pages.map((j,_)=>f[_]===S[_]&&M[_]?M[_]:j);w={...v,pages:H};}return l&&(l.spans=p,l.previousRemapped=f,l.previousFinalized=w,l.previousPageCount=w.pages.length,l.previousPageRefToken=F),a&&(rv(a,w,g),a.stats={placed:y,total:h||1,reusedPages:b,fullPasses:a.stats.fullPasses+(y===h&&b===0?1:0)}),Ss(w,(M,S,H)=>{let j=k[0];for(let C of k)C.startIndex<=M&&(j=C);return (j??k[k.length-1])?.at(S,H)}),c(),w}function sv(e,t,n){let r=t.lefts.map(()=>n);for(let o of e.fragments){if(gn(o))continue;let a=0;for(let i=t.count-1;i>=0;i-=1)if(o.box.x+.5>=t.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var GM=.25,WM=20;function lv(e,t,n,r){let o=vc(n.sectionColumns??nn.columns,n.geometry.width-n.geometry.margin.left-n.geometry.margin.right);if(!n.balanceColumns||o.count<2||n.columnRegionBottom!==void 0)return n.session&&(n.session.balanceLimit=null),r(e,t,n);let a=n.session,i=n.flowStartY??0,s={...n,session:void 0},l=y=>{let h=y.pages[0],b=h?Math.max(...sv(h,o,i)):y.endCursorY;return a&&(a.endCursorY=b),{...y,endCursorY:b}};if(a&&a.balanceLimit!==null){let y=a.balanceLimit,h=r(e,t,{...n,columnRegionBottom:y});if(a.stats.placed===0&&a.stats.reusedPages===h.pages.length)return a.balanceLimit=y,l(h)}let d=r(e,t,s);if(d.pages.length!==1||!d.endsOpenPage)return a&&(a.balanceLimit=null),r(e,t,n);let c=sv(d.pages[0],o,i),u=c.reduce((y,h)=>y+Math.max(0,h-i),0);if(u<=0)return a&&(a.balanceLimit=null),r(e,t,n);let f=i+u/o.count,p=Math.max(...c)+.01,m=y=>{try{let h=r(e,t,{...s,columnRegionBottom:y});return h.pages.length===1&&h.endsOpenPage}catch{return false}};for(let y=0;y<WM&&p-f>GM;y+=1){let h=(f+p)/2;m(h)?p=h:f=h;}let g=r(e,t,{...n,columnRegionBottom:p});return a&&(a.balanceLimit=p),l(g)}var KM=2,dv=new WeakMap,cv=new WeakMap;function Wm(e){if(e===void 0||e.size===0)return "";let t=cv.get(e);if(t!==void 0)return t;let n=[...e].join(",");return cv.set(e,n),n}function $M(e){let t=Wm(e.chrome),n=Wm(e.placeholder),r=Wm(e.suppressed);return t===""&&n===""&&r===""?"":`${t}|${n}|${r}`}function XM(e,t){let n=t.chrome?.has(e)??false,r=t.placeholder?.has(e)??false,o=t.suppressed?.has(e)??false;return !n&&!r&&!o?"":`${n?1:0}${r?1:0}${o?1:0}`}function YM(e,t,n){let r=n.displayMode??Te,o=n.revisionAuthorFilter,a=Ct(e,r,o),i=Bo(e,a).sections,s=Ja(e),l={...n,displayMode:r,producer:$w(n.producer,s),tocFieldChromeParagraphIds:n.tocFieldChromeParagraphIds??um(e),emptyTocPlaceholderParagraphIds:n.emptyTocPlaceholderParagraphIds??fm(e),emptyTocSuppressedResultParagraphIds:n.emptyTocSuppressedResultParagraphIds??pm(e)},d=n.drawingSourceOrder;!d&&n.inlineDrawingLayout&&(d=TR(e,n.inlineDrawingLayout));let c=n.session?BS(d?{...l,drawingSourceOrder:d}:l,a,n.session):dr(d?{...l,drawingSourceOrder:d}:l,a),u=as(a,c.listItems,n.notes?{footnotesPart:n.notes.footnotesPart,endnotesPart:n.notes.endnotesPart}:void 0,n.notes?YS(n.notes,i):void 0,r,o),f=u===null?c:{...c,refFields:u},p=y=>{if(i.length>1)return iv(a,i,t,y,Vm);let h=i[0],b=y.geometry??(h?cr(h.properties):Li),R=Ec(y,0,i.length)??y.furniture,I=h?.properties.pageNumbering,T=Vm(a,t,{...y,geometry:b,furniture:R,sectionColumns:h?.properties.columns??nn.columns,...I?.fmt?{bodyPageNumberFormat:I.fmt}:{}}),k=I,L=Sm({revision:T.layout.revision,pages:Wa(T.pages,k?.start??1,T.pages.length,k?.fmt)},T.layout),P=jr(L);return Ss(P,(x,v,w)=>T.overflowShellAt(v,w)),y.session&&(y.session.multi=null,y.session.previous=P),P},m=y=>{let h=y;if(y.displayMode!==r){let{contentControls:R,controlContextToken:I,...T}=y;h={...T,displayMode:r,...R!==void 0?{contentControls:R}:{},...I!==void 0?{controlContextToken:I}:{}};}let b=Rm(h,e,s);return n.session&&(n.session.previous=b),b};if(!n.notes)return n.session&&(n.session.notes=null,n.session.notePageBottomReserves=null),m(p(f));let g=Gw(n.notes,u?{...n,refFields:u}:n);return m(zw(e,i,f,g,p))}function UM(e,t,n){let r=n.geometry,o=n.cache?.keyFor?.bind(n.cache)??ns,a=r.width-r.margin.left-r.margin.right,i=vc(n.sectionColumns??nn.columns,a);if(n.inlineDrawingLayout&&n.drawingExclusionPass===void 0&&!n.drawingExclusionConverged){let E=ie=>{let be=n.inlineDrawingLayout?.projectionForAtom?.(ie)?.drawingNodeId??ie;return n.drawingSourceOrder?.get(be)},X=Object.freeze({columnCount:i.count,columnGapPt:i.gaps[0]??0,contentWidth:a,columnLefts:i.lefts,columnWidths:i.widths}),J=new Map,ae=null,_e=false,Ye=new Set,Ce=ie=>(Vm(e,t,ie)),ce=n.session?.previous?.pages;if(ce){if(J=Af(ce,n.inlineDrawingLayout,n.drawingLayoutEpoch,a,n.drawingSourceOrder,X),ae=Ce({...n,drawingExclusionPass:0,drawingExclusionZonesByPage:J}),ae.pages===ce)return ae;let ie=Af(ae.pages,n.inlineDrawingLayout,n.drawingLayoutEpoch,a,n.drawingSourceOrder,X);if(nd(J,ie))return ae;J=new Map(ie),Ye.add(rd(ie));}let je=(ie,be)=>(n.session&&be&&tv(n.session,be),ie),de=ie=>{let be=n.session?$r():void 0;return je(Ce({...n,session:be,drawingExclusionConverged:true,drawingExclusionZonesByPage:ie}),be)};for(let ie=0;ie<Po;ie+=1){let be=n.session?$r():void 0;ae=Ce({...n,session:be,drawingExclusionPass:ie,drawingExclusionZonesByPage:J});let ze=td(ae.pages,n.inlineDrawingLayout,a,E,X);if(ze.size===0)return ie===0&&J.size===0?je(ae,be):de(ze);if(nd(J,ze))return je(ae,be);let ke=rd(ze);if(Ye.has(ke)){_e=true,J=ze;break}Ye.add(ke),J=new Map(ze);}if(!_e)for(let ie=0;ie<KM&&!_e;ie+=1){let be=n.session?$r():void 0;ae=Ce({...n,session:be,drawingExclusionPass:Po+ie,drawingExclusionZonesByPage:J});let ze=td(ae.pages,n.inlineDrawingLayout,a,E,X),ke=rd(ze);if(nd(J,ze))return je(ae,be);if(Ye.has(ke)){_e=true,J=ze;break}Ye.add(ke),J=new Map(ze);}if(!_e)throw new Oa(`wrap exclusion reflow did not converge within ${Po} passes`);return de(J)}let s$1=n.measurer,l=n.cache,d=n.styleCascade,c=n.listItems,u=n.refFields,f=n.defaultTabStopPt,p=n.displayMode??Te,m=n.revisionAuthorFilter,g=p==="all-markup",y=n.tocFieldChromeParagraphIds,h=n.emptyTocPlaceholderParagraphIds,b=n.emptyTocSuppressedResultParagraphIds,R={chrome:y,placeholder:h,suppressed:b},I=$M(R),T=Xw(n.producer,d,n.noteMarks,f,p,m,n.bodyPageNumberFormat),k=i.widths[0],L=n.furniture,P=r.headerDistance??36,x=r.footerDistance??36,v=n.pageBottomReserves,w=n.session,F=n.lineCounterStart??0,M=cP(L,P,x),S=n.flowStartY??0,H=n.spaceBeforeCarry??0,j=n.pageIndexStart??0,_=EP({...L?{furniture:L}:{},pageHeight:r.height,marginTop:r.margin.top,marginBottom:r.margin.bottom,headerDistance:P,footerDistance:x,pageIndexStart:j,...n.continuedPageInsets?{continuedPageInsets:n.continuedPageInsets}:{}}),C=Object.freeze(n.bodyPageNumberFormat!==void 0?{format:n.bodyPageNumberFormat}:{}),D=w?.previous?w.previous.pages.length+1:1/0,z=n.columnRegionBottom,N=`|cols:${i.widths.join(",")};${i.gaps.join(",")};${i.separator?1:0}${z!==void 0?`;bal:${z}`:""}`,A=n.continuedPageInsets,B=A?`|cont:${A.top},${A.height}`:"",G=E=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${S},${H}${B}${M}${E}${N}`,$=G(Tc(v,j,D)),V=j&1,q=false,Y=null,U=()=>{q=true;},K=[],Re=MP({...L?{furniture:L}:{},geometry:r,headerDistance:P,footerDistance:x,pageIndexStart:j,contentWidth:a,insetsFor:_,pageCount:()=>K.length}),{pageBox:ge,furnitureFor:se,overflowShellAt:he}=Re,Le=E=>{let X=Math.max(1,_(K.length).height-E);return z!==void 0&&K.length===0?Math.max(1,Math.min(X,z)):X},fe=()=>Le(v?.get(j+K.length)??0),Ee=()=>Le(0),te=n.inlineDrawingLayout!==void 0,ye=te?bc(E=>xc(E,{measurer:s$1,producer:T,cache:l,styleCascade:d,...f!==void 0?{defaultTabStopPt:f}:{},...p?{displayMode:p}:{},...m?{revisionAuthorFilter:m}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.numberingIndex?{numberingIndex:n.numberingIndex}:{},inlineDrawingLayout:n.inlineDrawingLayout,drawingTokenForParagraph:n.drawingTokenForParagraph,projectionTokenForParagraph:n.projectionTokenForParagraph,projectionTokenForTable:n.projectionTokenForTable}),n.numberingIndex,d,p,m):void 0,ve=(E,X)=>{let J=E.kind==="paragraph"?n.drawingTokenForParagraph?.(E)||n.drawingLayoutToken||"":E.kind==="table"&&n.drawingTokenForParagraph?kR(E,n.drawingLayoutEpoch,n.drawingTokenForParagraph)||n.drawingLayoutToken||"":n.drawingLayoutToken||"",ae=E.kind==="paragraph"?n.projectionTokenForParagraph?.(E)??"":E.kind==="table"&&n.projectionTokenForParagraph?n.projectionTokenForTable?.(E)??Oo(E,n.projectionTokenForParagraph):"",_e=ye?.hostedListTokenForParagraph?.(E)??"",Ye=E.kind==="table"?oS(E,c):c?.get(E.id)?.cacheToken??"",Ce=Ye===""&&_e===""?"":me([Ye,_e]),ce=u===void 0?"":E.kind==="table"?iR(E,u):u.tokenForParagraph(E.id),je=dv.get(E);if(je&&je.contentWidth===X&&je.producer===T&&je.drawingToken===J&&je.projectionToken===ae&&je.listToken===Ce&&je.refToken===ce&&je.drawingContext===te)return je.entry;let de=ts(J,te),ie;if(E.kind==="table")ie={kind:"table",table:E,key:o({paragraph:E,properties:[...Ce?[{localName:"list",attributes:{token:Ce}}]:[],...ce?[{localName:"refFields",attributes:{token:ce}}]:[]],width:X,producer:T,drawingToken:de,projectionToken:ae})};else {let be=c?.get(E.id),ze=Io(E,X,d,be),{props:ke,indent:Jt,available:It,alignment:wn,spacing:an,lineSpacing:qr,contextualSpacing:si,styleId:Wt,outlineLevel:Gs,shading:Ws,inheritedRunProperties:li,markRunProperties:Zr}=ze,hr=bP(E.children.find(Vs=>Vs.kind==="paragraphProperties"),d),vn=_i(ze.tabStops,f),Wn=vn===ze.tabStops?ze.tabStopsCacheToken:Ro(vn);ie={kind:"paragraph",paragraph:E,props:ke,indent:Jt,available:It,alignment:wn,spacing:an,lineSpacing:qr,contextualSpacing:si,styleId:Wt,outlineLevel:Gs,borders:hr,borderGroupKey:us({borders:hr,indent:Jt}),shading:Ws,inheritedRunProperties:li,markRunProperties:Zr,tabStops:vn,keeps:xP(ke),...be?{listItem:be}:{},key:o({paragraph:E,properties:[...ke,...li,...Zr,{localName:"tabStops",attributes:{token:Wn}},...be?[{localName:"list",attributes:{token:be.cacheToken}}]:[],..._e?[{localName:"txbxList",attributes:{token:_e}}]:[],...ce?[{localName:"refFields",attributes:{token:ce}}]:[]],width:It,producer:T,drawingToken:de,projectionToken:ae})};}return dv.set(E,{contentWidth:X,producer:T,drawingToken:J,projectionToken:ae,listToken:Ce,refToken:ce,drawingContext:te,entry:ie}),ie},We=(n.drawingTokenForParagraph!==void 0||n.drawingLayoutToken!==void 0)&&n.drawingLayoutEpoch===void 0?null:ts(n.drawingLayoutEpoch??"",te),Me=n.projectionTokenForParagraph!==void 0&&n.projectionEpoch===void 0?null:n.projectionEpoch??"",Be=w?.prepass,ct=Be!=null&&We!==null&&Me!==null&&Be.drawingEpoch===We&&Be.projectionEpoch===Me&&Be.producer===T&&Be.contentWidth===k&&Be.styleCascade===d&&Be.listItems===c&&Be.numberingIndex===n.numberingIndex&&Be.tocToken===I&&Be.refToken===(u?.valuesToken??"")&&Be.bodies.length===e.length&&Be.bodies.every((E,X)=>E===e[X]),Pn=ct?Be:Et();function Et(){let E=e.map(de=>ve(de,k)),X=E.map(de=>de.key),J=E.map(de=>de.kind==="paragraph"&&de.keeps.keepNext),ae=E.map(de=>de.kind==="paragraph"?c?.get(de.paragraph.id)?.markerText:void 0),_e=E.map(de=>de.kind==="paragraph"&&de.contextualSpacing),Ye=E.map(de=>de.kind==="paragraph"?de.styleId:null),Ce=E.map(de=>de.kind==="paragraph"?de.borderGroupKey:""),ce=I===""?[]:E.map(de=>de.kind==="paragraph"?XM(de.paragraph.id,R):""),je=PP(X,{contextualSpacingAt:de=>_e[de],styleIdAt:de=>Ye[de]??null,borderGroupKeyAt:de=>Ce[de],tocVerdicts:ce,markerTextAt:de=>ae[de],keepsNextAt:de=>J[de]});return {bodies:e,producer:T,contentWidth:k,styleCascade:d,listItems:c,numberingIndex:n.numberingIndex,drawingEpoch:We??"",projectionEpoch:Me??"",prepared:E,keys:X,paragraphDocumentOrder:JR(E,k,d,p,m),keepsNext:J,markerTexts:ae,tocToken:I,refToken:u?.valuesToken??"",flowKeys:je}}w&&We!==null&&Me!==null&&!ct&&(w.prepass=Pn);let{prepared:Ge,keys:mr,paragraphDocumentOrder:zt,keepsNext:ot,flowKeys:Rt}=Pn,W=()=>{n.retainKeys!==false&&(n.retainKeys===void 0&&l&&!(l.retentionPassDue?.()??true)||dS(l,n.retainKeys,mr,Ge.flatMap(E=>E.kind==="table"?[E.table]:[])));},O=w?.previous??null,Z=O!==null&&w!==void 0&&w.context===$&&w.producer===T&&(!w.parityDependent||w.startPageParity===V),ne=i.count===1&&Z,Ie=0;if(Z){let E=Math.min(Rt.length,w.keys.length);for(;Ie<E&&Rt[Ie]===w.keys[Ie];)Ie+=1;}let Q=0;if(ne){let E=Math.min(Rt.length,w.keys.length)-Ie;for(;Q<E&&Rt[Rt.length-1-Q]===w.keys[w.keys.length-1-Q];)Q+=1;}if(Z&&Ie===Ge.length&&Ge.length===w.keys.length){let E=Sm({revision:t,pages:O.pages},O),X=F+(w.endLineCounter-w.startLineCounter);return w.previous=E,w.startLineCounter=F,w.endLineCounter=X,w.startPageParity=V,w.stats={placed:0,total:Ge.length,reusedPages:O.pages.length,fullPasses:w.stats.fullPasses},W(),{layout:E,pages:E.pages,lineCounter:X,endCursorY:w.endCursorY,endSpaceAfter:w.endSpaceAfter,endsOpenPage:w.endsOpenPage,overflowShellAt:he}}let xe=_x(Ge,k,d,p,m),pe=new Set(xe.map(({table:E})=>E.id)),at=Hx(xe,Rt),Ae=[],Pe=0,Pt=0,rn=()=>i.lefts[Pe],qe=()=>i.widths[Pe],Zt=()=>({text:{left:rn(),width:qe()},margin:{left:0,width:a},page:{left:-r.margin.left,width:r.width}}),Gt=()=>Gx(Ae,Pt),Xe=[],le=[],ee=new Map,Ve=new Set,mt=[],we=S,gr=S,gt=0,on=F,wt=H,Gn=[],Yr=()=>({pageCount:K.length,pageFragments:[...Ae],pendingAnchoredDrawings:[...Xe],deferredAnchoredDrawings:le.length>0?[...le]:Jw,anchorPageDeferCounts:ee.size>0?new Map(ee):Qw,...at.checkpoint(Ve,mt),cursorY:we,lineCounter:on,previousSpaceAfter:wt,flowColumnIndex:gt}),Ur=0,As=0,zo=0,Mt=S===0;if(ne&&Ie>0&&Ie<w.checkpoints.length){let E=w.checkpoints[Ie];K.push(...O.pages.slice(0,E.pageCount)),Ae=[...E.pageFragments],Xe=[...E.pendingAnchoredDrawings],le=[...E.deferredAnchoredDrawings],ee.clear();for(let[X,J]of E.anchorPageDeferCounts)ee.set(X,J);we=E.cursorY,gt=E.flowColumnIndex,Pe=E.flowColumnIndex,on=E.lineCounter,wt=E.previousSpaceAfter,at.restore(E,Ve,mt),Ur=Ie,Mt=false,zo=K.length,Gn.push(...w.checkpoints.slice(0,Ie));}let Ds=i.count,Go=rn,jc=E=>Object.freeze({x:i.lefts[gt]??0,y:E.y,width:i.widths[gt]??k,height:E.height}),_s=()=>wP({pageNumber:j+K.length+1,onPageParityRead:U,geometry:r,insets:_(K.length),contentWidth:k,contentHeight:fe(),ownerPartName:n.inlineDrawingLayout?.ownerPartName??s}),qm=()=>Vi(_s()),zc=E=>{let X=n.inlineDrawingLayout?.projectionForAtom?.(E)?.drawingNodeId??E;return n.drawingSourceOrder?.get(X)},Hs=E=>{if(E.length===0)return;for(let J of E)Xe.some(ae=>ae.drawingNodeId===J.drawingNodeId)||Xe.push(J.sourceOrder===void 0&&zc(J.drawingNodeId)!==void 0?Object.freeze({...J,sourceOrder:zc(J.drawingNodeId)}):J);if(!n.inlineDrawingLayout)return;let X=kb(Xe,{pageBottom:fe()});if(Xe.splice(0,Xe.length,...X.drawings),X.deferred.length>0)for(let J of X.deferred){let ae=(ee.get(J.drawingNodeId)??0)+1;ee.set(J.drawingNodeId,ae),ae>=Of?Xe.push(Bf(J,"page-defer-exhausted")):le.push(J);}},Zm=()=>{if(le.length===0)return;let E=le.map(X=>Ef(X,we-X.y));le=[],Hs(E);},Jm=()=>{},Wo=()=>{Jm();let E=K.length,X=ge(E),J=se("header",E,X),ae=se("footer",E,X),{usedBottom:_e,hasBodyPageFields:Ye}=lp(Ae,gr),Ce=_(E);K.push({id:`page-${E}`,index:E,box:X,contentBox:{x:X.x+r.margin.left,y:X.y+Ce.top,width:a,height:Ce.height},fragments:Ae,hasBodyPageFields:Ye,...i.separator?{columnSeparators:i.gaps.map((ce,je)=>({x:i.lefts[je]+i.widths[je]+ce/2-.375,y:gr,width:.75,height:Math.max(0,_e-gr)}))}:{},...Xe.length>0?{anchoredDrawings:Tb(Xe)}:{},...J?{header:J}:{},...ae?{footer:ae}:{}}),Ae=[],Xe=[],we=0,Pe=0,gt=0,gr=0,Pt=0;},eI=(E,X)=>E.kind==="paragraph"&&vP(E,X,n.inlineDrawingLayout),js=()=>{if(Pe+1<i.count){Pe+=1,gt=Pe,we=gr,wt=0,Pt=Ae.length;return}Wo(),Zm();},tI={measurer:s$1,cache:l,producer:T,onCellBreakKey:E=>{Y?.push(E);},nextLineId:(E,X,J,ae)=>(on+=1,cm(E,X,J,ae)),pageOccurrenceKey:()=>String(K.length),styleCascade:d,listItems:c,...f!==void 0?{defaultTabStopPt:f}:{},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:C,...u?{refFields:u}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout!==void 0?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:n.drawingLayoutToken?{drawingLayoutToken:n.drawingLayoutToken}:{},...n.projectionTokenForParagraph?{projectionTokenForParagraph:n.projectionTokenForParagraph}:{},...n.inlineDrawingLayout?{anchorFrameBase:_s,pageContentClip:qm,hostedStory:ye,publishAnchoredDrawings:Hs,collectAnchoredDrawings:Hs,columnBoxForParagraph:jc,pageExclusionZones:()=>n.drawingExclusionZonesByPage?.get(K.length)??Object.freeze([]),paragraphOrderIndex:E=>zt.get(E),onAnchorShift:(E,X)=>Ff(Xe,E,X),onAnchorRepublish:(E,X)=>{for(let J=Xe.length-1;J>=0;J-=1)Xe[J].anchorParagraphId===E&&Xe.splice(J,1);Xe.push(...X);}}:{},borderOwnershipBudget:yd(),vMergeResolveBudget:em(),displayMode:p,...m?{revisionAuthorFilter:m}:{}},Gc=E=>zd(c?.get(E.paragraph.id)??E.listItem,E.indent,s$1,E.tabStops,E.available),zs=new Map,nI=(E,X)=>{let J=zs.get(E);J||(J=new Set,zs.set(E,J)),J.add(X);},Qm=E=>{let X=zs.get(E);if(!(!X||!l)){for(let J of X)l.release?.(J);zs.delete(E);}},Wc=(E,X,J=0)=>{let ae=E.paragraph.id,Ye=!(h?.has(ae)??false)&&((y?.has(ae)??false)||(b?.has(ae)??false)),Ce=E.available,ce=Go(),de=(n.drawingExclusionZonesByPage?.get(K.length)??Object.freeze([])).filter(ke=>{let Jt=zt.get(E.paragraph.id),It=zt.get(ke.anchorParagraphId);if(Jt!==void 0&&It!==void 0){if(It>Jt)return false}else {let wn=Ge.findIndex(an=>an.kind==="paragraph"&&an.paragraph.id===ke.anchorParagraphId);if(wn<0||wn>X)return false}return !(Ds>1&&ke.columnIndex!==gt)}),ie=_n(de),be=null;l&&!Ye&&(be=E.key,ie&&(be+=`\0excl:${gt}|${we.toFixed(3)}|${ie}`),J>0&&(be+=`\0from:${J}`),nI(ae,be));let ze=Ds>1;return cd(E.paragraph,ae,E.indent.left,Ce,s$1,l,be,E.inheritedRunProperties,E.tabStops,void 0,d?(ke,Jt)=>ir(ke,Jt,d):void 0,{lineSpacing:E.lineSpacing,equationCacheToken:T,firstLineOffset:J===0?Gc(E):0,startOffset:J,marginExtent:{left:0,right:E.indent.left+Ce+E.indent.right},...n.projectLink?{projectLink:n.projectLink}:{},...n.projectFieldLink?{projectFieldLink:n.projectFieldLink}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},bodyPageFields:C,...u?{refFields:u}:{},displayMode:p,...m?{revisionAuthorFilter:m}:{},...n.noteMarks?{noteMarks:n.noteMarks}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},contentLeft:ze?ce:0,contentRight:ze?ce+qe():E.indent.left+Ce+E.indent.right,paragraphStartY:we,...de.length>0?{pageExclusionZones:de}:{},...Ye?{suppressEmptyPlaceholderLine:true}:{},...d?{themeFonts:d.themeFonts}:{},markRunProperties:E.markRunProperties})},eg=(E,X)=>(n.drawingExclusionZonesByPage?.get(K.length)??Object.freeze([])).filter(ae=>{let _e=zt.get(E.paragraph.id),Ye=zt.get(ae.anchorParagraphId);if(_e!==void 0&&Ye!==void 0){if(Ye>_e)return false}else {let Ce=Ge.findIndex(ce=>ce.kind==="paragraph"&&ce.paragraph.id===ae.anchorParagraphId);if(Ce<0||Ce>X)return false}return !(Ds>1&&ae.columnIndex!==gt||ae.anchorParagraphId===E.paragraph.id&&ae.input.mode==="topAndBottom")}),tg=(E,X,J,ae,_e,Ye,Ce)=>{let ce=eg(E,X);if(!n.inlineDrawingLayout||ae<=_e)return ce;let je=pn(E.paragraph),de=new Map,ie=0;for(let It=_e;It<ae;It+=1){let wn=J[It];for(let qr of je.values())qr>=wn.start&&qr<wn.end&&de.set(qr,ie);let an=Ce.get(It)??J[It].exclusionSkipBefore??0;ie+=an+J[It].height;}if(de.size===0)return ce;let be=Ds>1,ze=E.available,ke=Go(),Jt=ed({paragraph:E.paragraph,paragraphId:E.paragraph.id,drawingLayout:n.inlineDrawingLayout,contentLeft:be?ke:0,contentRight:be?ke+qe():E.indent.left+ze+E.indent.right,paragraphStartY:Ye,anchorLineTopByModelStart:de,columnIndex:gt,displayMode:p,...m?{revisionAuthorFilter:m}:{}});return Object.freeze([...ce,...Jt])},rI=(E,X,J,ae,_e,Ye,Ce,ce)=>{if(n.inlineDrawingLayout){let be=[...pn(E.paragraph).values()];if(be.length>0){let ze=Math.min(...be);if(Ce.end<=ze||be.some(ke=>ke>=Ce.start&&ke<Ce.end)&&Ce.end<=ze+1)return 0}}let je=tg(E,X,J,ae,_e,Ye,ce),de=je.length>0?Hn(we,Ce.height,je):0,ie=Ce.exclusionSkipBefore??0;return de>.001?de:ie},ng=E=>{let X={cursorY:we,columnWidth:qe,columnLeft:rn,contentHeight:fe,unreservedContentHeight:Ee,advanceColumn:()=>{we=X.cursorY,js(),X.cursorY=we;},anchorFrames:Zt,verticalAnchorFrames:()=>zx(_s(),we,r.margin.top),styleCascade:d,displayMode:p,...m?{revisionAuthorFilter:m}:{},deps:tI,shiftAnchor:(ae,_e)=>Ff(Xe,ae,_e),publishFragment:ae=>Ae.push(ae)},J=FP(E,X);return we=X.cursorY,J.outOfFlow};Jm=()=>jx(xe,Ve,Ae,mt,(E,X)=>{let J=Pe,ae=gt;Pe=X,gt=X,Y=[];try{ng(E),bp(E,Y);}finally{Y=null,Pe=J,gt=ae;}});let yr=false,Vc=Ge.length,Kc=0;for(let E=Ur;E<Ge.length;E+=1){let X=ve(e[E],qe());if(Gn[E]=Yr(),ne&&Q>0&&E>=Ge.length-Q){let oe=w.checkpoints[E+(w.keys.length-Ge.length)];if(oe&&oe.cursorY===we&&oe.previousSpaceAfter===wt&&oe.flowColumnIndex===gt&&Zw(oe.pageFragments,Ae)&&Gm(oe.pendingAnchoredDrawings,Xe)&&Gm(oe.deferredAnchoredDrawings,le)&&ev(oe.anchorPageDeferCounts,ee)&&at.same(oe.pendingPositionedTableTokens,oe.positionedTableAnchorSignals,Ve,mt)){let ue=K.length-oe.pageCount;if(BP({delta:ue,titlePage:L?.titlePage===true,evenAndOddHeaders:L?.evenAndOddHeaders===true,parityDependent:w.parityDependent,usedPageParity:q,markPageCount:oe.pageCount,continuedInsets:A!==void 0,hasNoteReserves:v!==void 0,hasExclusionZones:(n.drawingExclusionZonesByPage?.size??0)>0})){let Vt=ue===0?O.pages.slice(oe.pageCount):O.pages.slice(oe.pageCount).map((Ft,In)=>Do(Ft,K.length+In,ge(K.length+In).y));K.push(...Vt),zo+=Vt.length,yr=true,Vc=E,Kc=ue,on+=w.endLineCounter-oe.lineCounter;break}}}if(As+=1,X.kind==="table"){if(pe.has(X.table.id)){Ve.add(X.table.id);continue}Y=[];try{ng(X.table)||(wt=0),bp(X.table,Y);}finally{Y=null;}continue}let{paragraph:J,props:ae,spacing:_e,contextualSpacing:Ye,styleId:Ce,borders:ce,shading:je,keeps:de}=X,{indent:ie,alignment:be,markRunProperties:ze}=X,ke=X.available,Jt=E>0?Ge[E-1]:void 0,It=Ge[E+1],wn=oe=>oe?.kind==="paragraph"&&oe.styleId===Ce&&Ce!==null,an=Ye?{before:wn(Jt)?0:_e.before,after:wn(It)?0:_e.after}:_e,qr=c?.get(J.id)??X.listItem,si=Gc(X),Wt=J.id,Gs=X.borderGroupKey,Ws=oe=>Gs!==""&&oe?.kind==="paragraph"&&oe.borderGroupKey===Gs,li=Ws(Jt),Zr=Ws(It),hr=li?void 0:ce.top,vn=Zr?ce.between:ce.bottom,Wn=Cr(hr),Vs=Cr(vn);ff(ae)&&(Ae.length>0||K.length===0)&&(Wo(),wt=0);let it=Wc(X,E);if(it.length===0){Qm(Wt),at.note(mt,J.id,gt,Ae.length);continue}let aI=Sn(J)!==void 0&&eI(X,it),dg=()=>aI&&z===void 0&&Pe+1>=i.count,$c=oe=>{let ue=ve(J,qe());ue.kind==="paragraph"&&(ie=ue.indent,be=ue.alignment,ke=ue.available,ze=ue.markRunProperties,si=oe===0?Gc(ue):0,it=[...Wc(ue,E,oe)]);};{let oe=va(an.before,wt),ue=ze.length===0?Mn:He(ze,d?.themeFonts),vt=it.length<=1?Vs:0,Vt=we+oe+Wn,Ft=tg(X,E,it,0,0,Vt,new Map),In=it[0]?_f(Vt,it[0],Ft,vt):s$1.lineMetrics(ue).height+vt,Sr=oe+Wn+In;if(de.keepNext&&!ot[E-1]){let Tt=RP(Ge,E,wt,Vn=>{let Fn=ve(e[Vn],qe());return Fn.kind==="paragraph"?Wc(Fn,Vn).map(sn=>sn.height):[]});Tt!==null&&Tt+Wn<=fe()&&(Sr=Math.max(Sr,Tt+Wn));}we+Sr>fe()&&we>0&&!dg()&&(js(),wt=0,$c(0));}let iI=we===0&&!Gt(),Xc=bf(an.before,wt,iI,Mt);Xc>0&&(we+=Xc),Wn>0&&(we+=Wn),Mt=false;let br=0,Ke=[],cg=it[0]?.start??0,Vo=Xc,Jr=Wn,Yc=false,di=we,ug=0,Ks=new Map;wt=0;let fg=n.inlineDrawingLayout!==void 0&&Ht(X.paragraph,n.inlineDrawingLayout).length>0,pg=false,Uc=null,{revisions:sI,formatRevision:lI}=Gl(X.paragraph,p,m),mg=ya(X.paragraph),gg=mg?nc(mg):null,dI=()=>{let oe=Ke[0];if(!oe)return 0;let ue=ug;if(ue<=.001)return 0;let vt=Hn(di,oe.box.height,eg(X,E));return Math.max(0,ue-vt)},$s=oe=>{if(Ke.length===0)return;let ue=rn(),vt=Go(),Vt=Ke[0].box.y,Ft=Vt-Vo-Jr,In=Ke[Ke.length-1].box.y+Ke[Ke.length-1].box.height,Sr=oe?an.after:0,Tt=[],Vn,Fn=Vt,sn=In,Rr=ce.left?Dt(ce.left):0,ui=ce.right?Dt(ce.right):0,Ko=ce.left?ue+ie.left-ce.left.spacePt-Rr:ue+ie.left,Zc=ce.right?ue+ie.left+ke+ce.right.spacePt+ui:ue+ie.left+ke,$o=Math.max(Zc-Ko,0);if(Jr>0&&hr){let yt=Dt(hr),Tn=Vt-hr.spacePt-yt;Tt.push({side:"top",edge:hr,box:{x:Ko,y:Tn,width:$o,height:yt}}),Fn=Tn;}if(oe&&vn){let yt=Dt(vn),Tn=In+vn.spacePt,Pr={x:Ko,y:Tn,width:$o,height:yt};Tt.push({side:Zr?"between":"bottom",edge:vn,box:Pr}),Zr||(Vn={edge:vn,box:Pr}),sn=Tn+yt;}oe&&(we=Math.max(we,sn+Sr));let Xo=Math.max(sn+Sr-Ft,0),ut=li&&br===0?Ft:Fn,Kn=Zr&&oe?Ft+Xo:sn,Yo=Math.max(Kn-ut,0);if(ce.left&&Tt.push({side:"left",edge:ce.left,box:{x:ue+ie.left-ce.left.spacePt-Rr,y:ut,width:Rr,height:Yo}}),ce.right&&Tt.push({side:"right",edge:ce.right,box:{x:ue+ie.left+ke+ce.right.spacePt,y:ut,width:ui,height:Yo}}),ce.bar){let yt=Dt(ce.bar);Tt.push({side:"bar",edge:ce.bar,box:{x:ue+ie.left-ce.bar.spacePt-yt,y:Vt,width:yt,height:Math.max(In-Vt,0)}});}let Uo=gg?rc(Ke,gg):null,qo=br===0?oc(qr,s$1,Ke[0]?{y:Ke[0].box.y,height:Ke[0].box.height}:void 0):void 0,Xs=qo?{...qo,box:{...qo.box,x:qo.box.x+ue}}:void 0;if(br===0&&at.note(mt,Wt,gt,Ae.length),Ae.push({kind:"paragraph",id:`${Wt}#f${br}`,paragraphId:Wt,fragmentIndex:br,range:Uo?Uo[Uo.length-1].range:{paragraphId:Wt,start:cg,end:Ke[Ke.length-1].range.end},props:ae,styleId:X.styleId,outlineLevel:X.outlineLevel,alignment:X.alignment,spacing:{before:Vo,after:Sr},indent:ie,...Vn?{bottomBorder:Vn}:{},...Tt.length>0?{borders:Tt}:{},...je===void 0?{}:{shading:je,shadingBox:ce.left||ce.right?{x:Ko,y:Fn,width:$o,height:Math.max(sn-Fn,0)}:vi(Ke,ue+ie.left,ke)},tabStops:X.tabStops,...Xs?{marker:Xs}:{},...oe&&g?Wl(sI,lI):{},lines:Uo??Ke,box:{x:vt+ie.left,y:Ft,width:ke,height:Xo}}),n.inlineDrawingLayout&&fg&&!pg){pg=true;let yt=[...pn(X.paragraph).values()],Tn=yt.length>0&&yt.every(Kt=>Ke.some(Qr=>Kt>=Qr.range.start&&Kt<Qr.range.end)),Pr,Ys,Jc;if(Tn){let Kt=Ft-dI();Pr=Ke,Ys={x:vt+ie.left,y:Kt,width:ke,height:Xo},Jc=jc({x:vt+ie.left,y:Kt,height:Xo});}else {let Kt=Uc??{columnX:vt,columnWidth:qe(),startY:Ft},Qr=Kt.startY;Pr=it.map((ln,cI)=>{let uI={id:`anchor-line-${cI}`,range:{paragraphId:Wt,start:ln.start,end:ln.end},box:{x:Kt.columnX+ie.left,y:Qr,width:ke,height:ln.height},contentX:ln.spans.length>0?ln.spans[0].box.x+Kt.columnX:Kt.columnX+ie.left,baseline:ln.baseline,leading:ln.leading,trailingSpacing:ln.trailingSpacing,spans:ln.spans.map(Qc=>({...Qc,box:{...Qc.box,x:Qc.box.x+Kt.columnX,y:Qr}}))};return Qr+=ln.height+(ln.exclusionSkipBefore??0),uI});let yg=Kt.startY;Ys={x:Kt.columnX+ie.left,y:yg,width:ke,height:Math.max(Qr-yg,Ke[0]?.box.height??0)},Jc=jc(Ys);}Hs(Mr({paragraph:X.paragraph,paragraphId:Wt,paragraphBox:Ys,lines:Pr,drawingLayout:n.inlineDrawingLayout,frameBase:_s(),columnBox:Jc,cellBox:null,pageClip:qm(),measurer:s$1,sourceOrderOf:zc,layoutTextboxStory:ye.layoutTextboxStoryFor,displayMode:p,...m?{revisionAuthorFilter:m}:{}}));}br+=1,cg=Ke[Ke.length-1].range.end,Ke=[],Vo=0,Jr=0;},xr=0,qc=0,ci=it.length+8;for(let oe=0;oe<it.length;oe+=1){let ue=it[oe],vt=oe===it.length-1,Vt=vt?Vs:0;oe===xr&&(di=we,fg&&Uc===null&&br===0&&(Uc=Object.freeze({columnX:Go(),columnWidth:qe(),startY:di})));let Ft=rI(X,E,it,oe,xr,di,ue,Ks),In=Ft+Math.max(0,ue.height-ue.trailingSpacing)+Vt;if(we+In>fe()&&!dg()&&(Ke.length>0||Ae.length>0||K.length>0)){let ut=!Gt(),Kn=qc<ci?SP(oe,xr,it.length,de,ut):oe,Yo=Kn<oe;for(let yt=oe;yt>Kn;yt-=1){Ke.pop();let Tn=it[yt-1],Pr=Ks.get(yt-1)??Tn.exclusionSkipBefore??0;Ks.delete(yt-1),we-=Tn.height+Pr,on-=1;}let Uo=Yo&&Ke.length===0&&br===0,qo=it[Kn].start,Xs=qe();if($s(false),js(),Vo=0,Uo?we=Jr:Jr=0,qe()!==Xs){$c(qo),ci=Math.max(ci,it.length+8),xr=0,Yo&&(qc+=1),oe=-1;continue}if(xr=Kn,di=we,Yo){qc+=1,oe=Kn-1;continue}}let Tt=Go();Ks.set(oe,Ft),we+=Ft;let Vn=Tt+ie.left+(oe===0?si:0),Fn=Math.max(1,ke-(oe===0?si:0)),sn=ue.spans.map(ut=>({...ut,range:{...ut.range,paragraphId:Wt},box:{...ut.box,x:ut.box.x+Tt,y:we}})),Rr=ld(sn,s$1,Vn,Fn,be,vt,be==="center"||be==="right"?ue.width:void 0),ui=sn.length>0&&Rr.length>0?Rr[0].box.x-sn[0].box.x:be!=="left"&&be!=="both"?(()=>{let ut=Fn-ue.width;return ut<=0?0:be==="center"?ut/2:ut})():0,Ko=Object.freeze({x:0,y:0,width:a,height:fe()}),Zc=ue.drawings.map(ut=>{let Kn=Object.freeze({...Er(ut,Tt,we),paragraphId:Wt});return Ql(Kn,Ko)}),$o=dd(Zc,ui),Xo={id:cm(J.id,ue.start,oe),range:{paragraphId:Wt,start:ue.start,end:ue.end},spans:Rr,box:{x:Go()+ie.left,y:we,width:ke,height:ue.height},contentX:Rr[0]?.box.x??Vn+ui,baseline:ue.baseline,leading:ue.leading,trailingSpacing:ue.trailingSpacing,...ue.deletedRanges?{deletedRanges:ue.deletedRanges}:{},...$o.length>0?{drawings:$o}:{},...ue.anchorRevisions?{anchorRevisions:ue.anchorRevisions}:{}};if(on+=1,Ke.length===0&&(ug=Ft),Ke.push(Xo),we+=ue.height,ue.columnBreakAfter){let ut=qe();if($s(vt),js(),Vo=0,Jr=0,Yc=true,!vt&&qe()!==ut){$c(ue.end),ci=Math.max(ci,it.length+8),xr=0,oe=-1;continue}xr=oe+1;}else ue.pageBreakAfter&&($s(vt),Wo(),Vo=0,Jr=0,Yc=true,xr=oe+1);}$s(true),Qm(Wt),wt=Yc?0:an.after;}yr||(Gn[Ge.length]=Yr());let rg=yr&&w?w.endCursorY:we,og=yr&&w?w.endSpaceAfter:wt,ag=!yr&&(Ae.length>0||mt.length>0||K.length===0),ig=yr&&w?w.endsOpenPage:ag;ag&&Wo();let sg=0,oI=Of*4+8;for(;(Xe.length>0||le.length>0)&&sg<oI;)sg+=1,Xe.length===0&&Zm(),Wo();le.length>0&&(Xe.push(...le.map(E=>Bf(E,"page-defer-exhausted"))),le=[],Wo()),W();let lg={revision:t,pages:K,...n.displayMode?{displayMode:n.displayMode}:{}};if(w){w.previous=lg,w.checkpoints=yr?[...Gn.slice(0,Vc),...w.checkpoints.slice(Vc+(w.keys.length-Ge.length)).map(X=>Kc===0?X:{...X,pageCount:X.pageCount+Kc})]:Gn,w.keys=Rt,w.context=K.length+1===D?$:G(Tc(v,j,K.length+1)),w.producer=T;let E=q||L?.evenAndOddHeaders===true;w.parityDependent=Ur===0&&!yr?E:w.parityDependent||E,w.startPageParity=V,w.startLineCounter=F,w.endLineCounter=on,w.endCursorY=rg,w.endSpaceAfter=og,w.endsOpenPage=ig,w.stats={placed:As,total:Ge.length,reusedPages:zo,fullPasses:w.stats.fullPasses+(Ur===0?1:0)};}return {layout:lg,pages:K,lineCounter:on,endCursorY:rg,endSpaceAfter:og,endsOpenPage:ig,overflowShellAt:he}}function Vm(e,t,n){return lv(e,t,n,UM)}var mv="Calibri, Carlito, Helvetica, Arial, sans-serif",PK=new Map([["calibri","Carlito"]]),qM=65536,ZM=256;function uv(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function fv(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var pv=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function gv(e=null){return e!=null&&typeof e.measureText=="function"}function yv(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??mv,r=e.context??null;if(!gv(r))return null;let o=r,a=fv(uv(e.maxWidthEntries,qM)),i=fv(uv(e.maxMetricsEntries,ZM)),s=e.fontAlias,l=c=>{let u=c.fontFamily&&pv.test(c.fontFamily)?c.fontFamily:null,f=u?s?.(u):void 0,p=f&&pv.test(f)?f:null,m=u?p?`"${p}", "${u}", ${n}`:`"${u}", ${n}`:n,g=c.bold?"bold":"normal",y=c.italic?"italic":"normal",h=c.smallCaps?"small-caps":"normal",b=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*t;return `${y} ${h} ${g} ${b}px ${m}`},d=(c,u,f)=>c/t*(f.horizontalScalePercent/100)+u.length*f.characterSpacingPt;return {measure(c,u){if(c.length===0)return 0;let f=l(u),p=`${f}\0${c}`,m=a.get(p);if(m!==void 0)return d(m,c,u);o.font=f;let g=o.measureText(c).width;return a.set(p,g),d(g,c,u)},lineMetrics(c){let u=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75),f=l(c),p=i.get(f);if(p)return p;let m=u*1.15,g=u*.8;o.font=f;let y=o.measureText("Hxg"),h=y.fontBoundingBoxAscent,b=y.fontBoundingBoxDescent;if(typeof h=="number"&&Number.isFinite(h)&&h>0&&(g=h/t,typeof b=="number"&&Number.isFinite(b)&&b>=0)){let I=(h+b)/t;I>0&&(m=Math.max(I,m));}m>0||(m=u*1.15);let R={height:m,baseline:g};return i.set(f,R),R}}}function JM(e=1,t={}){let n=yv({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Rl(),producer:"fixed-measurer"}}function QM(e){let t;return n=>{t===void 0&&(t=Ed(e.pages)?.hosts??null);let r=t?.get(n);return r?Ga(r.pageNumber,r.format):null}}function hv(e,t){let n=Ct(e,t.displayMode??Te),r=dr({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:Xe(t.package,"footnote"),endnotesPart:Xe(t.package,"endnote")}:void 0,a=as(n,r,o,t.package?US(t.package,e,n):void 0,t.displayMode??Te);return {blocks:n,notes:o,context:a}}function bv(e,t,n,r,o){for(let a of t){if(r.length>=kh$1)return;if(n.tokenForParagraph(a.id)!==""&&nh$1(e,a.id)===null)for(let i of mh$1(a)){if(r.length>=kh$1)return;if(!i.rewritable)continue;let s=hn(i.instruction);if(s===null)continue;let l=n.liveValueOf(i.fieldNodeId,s);if(l===null&&o&&n.pageRefProjectionOf){let d=n.pageRefProjectionOf(i.fieldNodeId,s);if(d){let c=o(d.targetParagraphId);c!==null&&c.length>0&&dp(d.calibration,d.cached,c,Number.NaN)&&(l=c);}}l===null||l===i.cachedText||l.length>lh$1||l.includes(`
|
|
17
|
+
`)||l.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:l});}}}function eB(e,t){let{blocks:n,context:r}=hv(e,t);if(r===null)return null;let o=[];return bv(e,xn(n),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function EK(e,t){let{notes:n,context:r}=hv(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:s}of a){if(!s)continue;let l=[];for(let d of Yd(s,t.displayMode??Te)){if(l.length>=kh$1)break;bv(s,xn(d),r,l);}l.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:l}});}return o}function tB(e){return e.box}function xv(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)xv(o,t);}function nB(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>Jf$1*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let l of r)t.get(l)?.push(s.id);n(s,s.id,i+1);continue}if(s.kind==="contentControl"){t.set(s.id,[]),r.push(s.id);let l=Tf$1(s);l&&n(l,a,i+1),r.pop();let d=t.get(s.id);d&&d.length===0&&a!==null&&d.push(a);continue}n(s,a,i+1);}}},r=[];return n(e,null,0),t}function rB(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function oB(e,t){let n=Xf$1(e.root);if(n.length===0)return aB;let r=new Map;t.pages.forEach((i,s)=>{(d=>{for(let c of d){let u=new Set;xv(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:s,box:tB(c)}),r.set(f,p);}}})(i.fragments);});let o=nB(e.root),a=[];for(let i of n){let s=Vf$1(i.node),l=[...i.ancestors.map(f=>Vf$1(f).lock),s.lock],d=o.get(i.node.id)??[],c=new Map;for(let f of d)for(let p of r.get(f)??[]){let m=c.get(p.pageIndex);c.set(p.pageIndex,m?rB(m,p.box):p.box);}let u=[...c.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:s.type,level:Wf$1(i.node),depth:i.depth,lock:s.lock,effectiveLock:_f$1(l),showingPlaceholder:s.showingPlaceholder,temporary:s.temporary,...s.tag===void 0?{}:{tag:s.tag},...s.alias===void 0?{}:{alias:s.alias},...s.id===void 0?{}:{id:s.id},...s.dataBinding===void 0?{}:{dataBinding:s.dataBinding},paragraphIds:d,fragments:u});}return a}var aB=Object.freeze([]);function Rv(e,t,n){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return n<o.range.end;let i=a.filter(s=>s.range.paragraphId===t);return i.length===a.length?n<o.range.end:i.length>0&&n<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function yB(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of hB(r,t))n.has(o)||n.set(o,a);return n}var Sv=new WeakMap;function hB(e,t){let n=Sv.get(t);n||(n=new WeakMap,Sv.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let s of a.lines??[])for(let l of s.spans??[])i.add(l.range.paragraphId);for(let s of i)o.has(s)||o.set(s,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function bB(e,t){let n=Ba$1(e);if(!n)return null;let r=t.get(n.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+Rv(r,n.start.paragraphId,n.start.offset)}:null}var xB="abcdefghijklmnopqrstuvwxyz";function Mc(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function Es(e,t,n,r,o){return e.shape({text:o,fontSizeHalfPoints:Mc(r),bidiLevel:0,environment:ao({...t,font:n,direction:"ltr",features:r.smallCaps?{...t.features,smcp:1}:t.features,fallbackOrder:[]})})}function Pv(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let s of xB){let l=Es(e,t,n,{...r,smallCaps:!0},s),d=Es(e,t,n,{...r,smallCaps:!1},s);if(!(l.glyphs.length!==d.glyphs.length||l.glyphs.some((u,f)=>u.id!==d.glyphs[f]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}var SB=.5,RB=4,wv=4096,vv=e=>e.verticalAlign==="baseline"?1:.75;function Iv(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o,fallback:a}=e,i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},s=new WeakMap,l=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=new Array(wv),p=0,m=(h,b,R)=>{let I=f[p];I&&I.cache.delete(I.text),h.set(b,R),f[p]={cache:h,text:b},p=(p+1)%wv;},g=h=>{let b=c.get(h);if(b!==void 0)return b;let R=o(h);return c.set(h,R),R},y=(h,b,R)=>{let I=R?l:s,T=I.get(h);T||(T=new Map,I.set(h,T));let k=T.get(b);return k||(k=new Map,T.set(b,k)),k};return {measure(h,b){if(h.length===0)return 0;let R=g(b);if(!R)return a.measure(h,b);let I=y(R,Mc(b),b.smallCaps),T=I.get(h);if(T===void 0){let k=0;try{if(b.smallCaps&&!Pv(r,i,R,b,u))return a.measure(h,b);let L=Es(r,i,R,b,h);for(let P of L.glyphs)k+=P.advanceX;}catch{return a.measure(h,b)}T=k/i.fixedPointScale,m(I,h,T);}return T*vv(b)*(b.horizontalScalePercent/100)+h.length*b.characterSpacingPt},lineMetrics(h){let b=g(h);if(!b)return a.lineMetrics(h);let R=vv(h),I=d.get(b);I||(I=new Map,d.set(b,I));let T=Mc(h),k=I.get(T);if(k)return R===1?k:{height:k.height*R,baseline:k.baseline*R};let L,P=true,x=b.substitution?.lineMetrics;if(x){let v=T/2;L={height:x.heightEm*v,baseline:x.baselineEm*v};}else try{let v=Es(r,i,b,h," "),w=v.metrics.ascent/i.fixedPointScale,F=v.metrics.descent/i.fixedPointScale,M=T/2,S=w+F,H=M*RB,j=S>H?H/S:1,_=S*j,C=Math.min(Math.max(0,v.metrics.lineGap/i.fixedPointScale),_*SB),D=_+C;D>0?L={height:D,baseline:w*j}:(L=a.lineMetrics(h),P=!1);}catch{L=a.lineMetrics(h),P=false;}return P?(I.set(T,L),R===1?L:{height:L.height*R,baseline:L.baseline*R}):L}}}function PB(e,t){return Iv({...t,shaper:e.shaper,environment:e.environment})}function wB(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let l of t.pages)r.add(l.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,s=-1;for(let l of t.pages){let d=l.box.y;d+l.box.height>=n.top&&d<=a&&(i===-1&&(i=l.index),s=l.index);}if(i===-1){let l=vB(t,n.top);l!==null&&(i=l,s=l);}if(i!==-1){let l=Math.max(0,i-o),d=Math.min(t.pages.length-1,s+o);for(let c=l;c<=d;c+=1)r.add(c);}for(let l of e.pinnedPages??[])l>=0&&l<t.pages.length&&r.add(l);return r}function vB(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Fv=["text-local","paragraph-local","flow-structural","global"];function Tv(e,t){return Fv.indexOf(t)>Fv.indexOf(e)?t:e}function IB(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function FB(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,s=null,l=0,d=0;function c(y){let h=e.runCooperatively;if(!h)return t(y);let b=h(y);s=b;try{for(;;){let R=b.step();if(R)return R;if(n()!==y.revision)return b.cancel(),d+=1,null;if(s!==b)return null}}finally{s===b&&(s=null);}}function u(y){let h=p(n());h.impact=Tv(h.impact,y.impact),h.structural=h.structural||y.structural;for(let b of y.paragraphIds)h.paragraphIds.add(b);for(let b of y.created)h.created.add(b);for(let b of y.deleted)h.deleted.add(b);for(let b of y.dependencyKeys)h.dependencyKeys.add(b);}let f=y=>({impact:y.impact,paragraphIds:y.paragraphIds,created:y.created,deleted:y.deleted,dependencyKeys:y.dependencyKeys,structural:y.structural,revision:y.revision});function p(y){return a||(a=IB(y)),a.revision=Math.max(a.revision,y),a}function m(){!o||i||(i=o(()=>{i=null,g();}));}function g(){i&&(i(),i=null),s&&(s.cancel(),s=null,d+=1);let y=a;if(!y)return false;a=null;let h=f(y),b=c(h);return !b||b.revision!==n()?(l+=1,u(h),m(),false):(r(b,h),true)}return {notify(y){let h=p(n());h.impact=Tv(h.impact,y.impact);for(let b of y.dirty)h.paragraphIds.add(b);for(let b of y.created)h.created.add(b),h.paragraphIds.add(b);for(let b of y.deleted)h.deleted.add(b),h.paragraphIds.add(b);for(let b of y.dependencyKeys)h.dependencyKeys.add(b);for(let b of y.splitJoin)h.structural=true,"split"in b?(h.paragraphIds.add(b.split.from),h.paragraphIds.add(b.split.tail)):(h.paragraphIds.add(b.join.kept),h.paragraphIds.add(b.join.removed));(y.impact==="flow-structural"||y.impact==="global")&&(h.structural=true),m();},invalidateAll(y,h){let b=p(y);b.impact="flow-structural",b.structural=true,h&&b.dependencyKeys.add(h),m();},flush:g,pending:()=>a?f(a):null,cancel(){i?.(),i=null,s?.cancel(),s=null,a=null;},get staleDiscards(){return l},get cancelledRuns(){return d}}}function zn(e,t,n,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(t===i.start)return i.advanceStart;if(t===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(t<=i.range.start)return i.box.x;if(t>=i.range.end){a=i.box.x+i.box.width;continue}return cc(i,t,n)}return a}function Cv(e,t,n,r){return Lv(e,t,n,true,r)}function n$(e,t,n,r){return Lv(e,t,n,false,r)}var kv=new WeakMap,Ov=new WeakMap;function TB(e){let t=kv.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let o of Ze(r))for(let a of o.lines)for(let i of Ue(a)){let s=n.get(i.paragraphId);(!s||i.end>s.end||i.end===s.end&&i.start>s.start)&&n.set(i.paragraphId,{end:i.end,start:i.start});}return kv.set(e,n),n}function kB(e){let t=Ov.get(e);if(t)return t;let n=new Map(e.map((r,o)=>[r,o]));return Ov.set(e,n),n}function OB(e){return Math.max(3,Math.min(8,e*.25))}function Lv(e,t,n,r,o){let a=Bc(t,n);if(!a)return [];let i=kB(n),s=i.get(a.from.paragraphId),l=i.get(a.to.paragraphId),d=TB(e),c=[];for(let u of e.pages)for(let f of Ze(u))for(let p of f.lines){let m=Ue(p);for(let[g,y]of m.entries()){let h=uo(e,y,a.from,a.to),b=i.get(y.paragraphId),R=d.get(y.paragraphId),I=s!==void 0&&l!==void 0&&b!==void 0&&b>=s&&b<l&&R?.end===y.end&&R.start===y.start&&g===m.length-1;if((!r||!h)&&!I)continue;let T=r&&h?zn(p,h.start,o,y):null,k=r&&h?zn(p,h.end,o,y):null,L=I?zn(p,y.end,o,y):null,P=L!==null?L+OB(Math.max(0,p.box.height-p.leading-(p.trailingSpacing??0))):null,x=[T,k,L,P].filter(F=>F!==null),v=Math.min(...x),w=Math.max(...x);c.push(ep(e,y.paragraphId,{pageIndex:u.index,x:v,y:p.box.y,width:w-v,height:p.box.height}));}}return c}function Ev(e,t,n,r){let o=new Map;if(t.length===0)return o;for(let a of e.pages)if(!(n&&!n.has(a.index)))for(let i of Ze(a))for(let s of i.lines)for(let l of Ue(s))for(let d of t){let c=uo(e,l,d.from,d.to);if(!c)continue;let u=zn(s,c.start,r,l),f=zn(s,c.end,r,l),p=o.get(d.key)??[];p.push(ep(e,l.paragraphId,{pageIndex:a.index,x:Math.min(u,f),y:s.box.y,width:Math.abs(f-u),height:s.box.height})),o.set(d.key,p);}return o}function r$(e){return {x:e.contentBox.x,y:e.contentBox.y}}function Ms(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function o$(e,t,n){if(fo(e).has(t))return {x:0,y:0};let r=e.pages[n];if(!r)return {x:0,y:0};let o=a=>xt(a).some(i=>i.paragraphId===t);if(r.header&&o(r.header.fragments))return Ms(r,r.header.box);if(r.footer&&o(r.footer.fragments))return Ms(r,r.footer.box);for(let a of [r.footnotes,r.endnotes])if(a){for(let i of a.notes)if(o(i.fragments))return Ms(r,i.box)}return {x:0,y:0}}function a$(e,t,n,r,o){let a=new Map,i=[];for(let l of t){let d=Bc({anchor:l.from,head:l.to},n);d&&i.push({key:l.key,from:d.from,to:d.to});}if(i.length===0)return a;let s=(l,d,c,u)=>{for(let f of xt(l))for(let p of f.lines){for(let m of Ue(p))for(let g of i){let y=uo(e,m,g.from,g.to);if(!y)continue;let h=zn(p,y.start,o,m),b=zn(p,y.end,o,m),R=a.get(g.key)??[];R.push({pageIndex:d,x:Math.min(h,b)+c,y:p.box.y+u,width:Math.abs(b-h),height:p.box.height}),a.set(g.key,R);}}};for(let l of e.pages)if(!(r&&!r.has(l.index))){s(l.fragments,l.index,0,0);for(let d of [l.header,l.footer]){if(!d)continue;let c=Ms(l,d.box);s(d.fragments,l.index,c.x,c.y);}for(let d of [l.footnotes,l.endnotes])if(d)for(let c of d.notes){let u=Ms(l,c.box);s(c.fragments,l.index,u.x,u.y);}}return a}function Km(e){let t=new Map;for(let n=0;n<e.length;n+=1){let r=e[n].position,o=t.get(r.paragraphId);o||(o=new Map,t.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,n);}return {stops:e,index:t}}var Nc=class{#e=new WeakMap;#s=new WeakMap;get(t,n,r,o){let a;if(!r)a=this.#e.get(t)??new Map,this.#e.has(t)||this.#e.set(t,a);else {let l=this.#s.get(t);l||(l=new WeakMap,this.#s.set(t,l)),a=l.get(r)??new Map,l.has(r)||l.set(r,a);}let i=a.get(n);if(i)return i;let s=o();return a.set(n,s),s}};function Mv(e){let t=[],n=new Set;for(let r of e)n.has(r.lineId)||(n.add(r.lineId),t.push(r.lineId));return t}function Bv(e,t,n){let r=null;for(let o of e)o.lineId===t&&(!r||Math.abs(o.x-n)<Math.abs(r.x-n))&&(r=o);return r}function Bs(e,t){let n=null;for(let r of e)r.position.paragraphId===t.paragraphId&&(!n||Math.abs(r.position.offset-t.offset)<Math.abs(n.position.offset-t.offset))&&(n=r);return n}function $m(e,t,n){let r=null;for(let o of e){if(o.position.paragraphId!==t.paragraphId)continue;let a=o.position.offset;n===1?a>t.offset&&(!r||a<r.position.offset)&&(r=o):a<t.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function Nv(e,t,n){let r=n.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?Bs(n.stops,e):n.stops[r];if(!o)return null;let a=o.lineId,i=n.stops.filter(s=>s.lineId===a);return (t===-1?i[0]:i[i.length-1])?.position??null}function Av(e,t,n,r,o){let a=o(e.paragraphId),i=a.index.get(e.paragraphId)?.get(e.offset);if(i===void 0){let c=$m(a.stops,e,t);if(c)return {position:c.position,desiredX:null}}else {let c=i+t;if(c>=0&&c<a.stops.length)return {position:a.stops[c].position,desiredX:null}}let s=n[r+t];if(!s)return {position:e,desiredX:null};let l=o(s).stops,d=t===-1?l[l.length-1]:l[0];return d?{position:d.position,desiredX:null}:null}function Dv(e,t,n){let r=e===-1?t[0]:t[t.length-1];if(!r)return null;let o=n(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function _v(e,t,n,r,o,a){let i=a(e.paragraphId),s=i.index.get(e.paragraphId)?.get(e.offset),l=s===void 0?Bs(i.stops,e):i.stops[s];if(!l)return null;let d=n??l.x,c=Mv(i.stops),u=c.indexOf(l.lineId),f=c[u+t];if(f){let m=Bv(i.stops,f,d);return m?{position:m.position,desiredX:d}:null}for(let m=o+t;m>=0&&m<r.length;m+=t){let g=a(r[m]),y=Mv(g.stops),h=t===-1?y[y.length-1]:y[0];if(!h)continue;let b=Bv(g.stops,h,d);if(b)return {position:b.position,desiredX:d}}let p=t===-1?i.stops[0]:i.stops[i.stops.length-1];return p?{position:p.position,desiredX:d}:null}var Hv=new WeakMap,jv=new WeakMap;function qt(e){let t=Hv.get(e);if(t)return t;let n=new Map;for(let r of e.pages)for(let[o,a]of EB(r)){let i=n.get(o);i?i.push(...a):n.set(o,[...a]);}return Hv.set(e,n),n}function EB(e){let t=jv.get(e);if(t)return t;let n=new Map,r=(a,i)=>{for(let s of Ue(a)){let l={line:a,pageIndex:i},d=n.get(s.paragraphId);d?d.push(l):n.set(s.paragraphId,[l]);}},o=(a,i)=>{let s=l=>{for(let d of l){if(d.kind==="paragraph"){for(let c of d.lines)r(c,i);continue}for(let c of d.rows)if(!c.isHeaderRepeat)for(let u of c.cells)s(u.blocks);}};s(a);};for(let a of Ze(e))for(let i of a.lines)r(i,e.index);e.header&&o(e.header.fragments,e.index),e.footer&&o(e.footer.fragments,e.index);for(let a of [e.footnotes,e.endnotes])if(a)for(let i of a.notes)o(i.fragments,e.index);return jv.set(e,n),n}function u$(e,t,n){let r=qt(e).get(t);if(r&&r.length>0){let o=Oi(e,t,n,r.map(a=>a.line));if(o)return o}return Oi(e,t,n)}var zv=new WeakMap;function Xm(e,t){let n=zv.get(e);n||(n=new Map,zv.set(e,n));let r=n.get(t);if(r)return r;let o=[];for(let{line:i}of qt(e).get(t)??[])if(i.range.paragraphId===t)for(let s of i.deletedRanges??[])o.push({start:s.start,end:s.end});o.sort((i,s)=>i.start-s.start);let a=[];for(let i of o){let s=a[a.length-1];s&&i.start<=s.end?s.end=Math.max(s.end,i.end):a.push(i);}return n.set(t,a),a}function Gv(e,t){for(let n of e)if(t>n.start&&t<n.end)return true;return false}function Wv(e,t){for(let n of Xm(e,t.paragraphId))if(t.offset>n.start&&t.offset<n.end)return {paragraphId:t.paragraphId,offset:n.end};return t}var MB=/[\p{L}\p{N}_'\u2019]/u;function Ns(e,t,n,r=BB){let o=i=>{let s=e[i];return s!==void 0&&MB.test(s)},a=Math.max(0,Math.min(t,e.length));if(n===-1){for(;a>0&&!o(a-1);)if(a-=1,r.has(a))return a;for(;a>0&&o(a-1);)if(a-=1,r.has(a))return a;return a}for(;a<e.length&&!o(a);)if(a+=1,r.has(a))return a;for(;a<e.length&&o(a);)if(a+=1,r.has(a))return a;return a}var BB=new Set;function NB(e,t,n){let r=qt(e).get(t.range.paragraphId)??[],o=false;for(let a of r){if(a.line===t){o=true;continue}if(o&&a.line.range.start===n)return true}return false}function AB(e,t,n){for(let{line:r}of qt(e).get(t)??[])if(r.range.start===n&&r.drawings?.some(o=>o.start===n))return r;return null}function DB(e,t,n){for(let r of n?n.spans:e.spans)if(!(t<=r.range.start||t>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function $v(e){let t=e.spans[e.spans.length-1]?.text;return t===`
|
|
18
|
+
`||t===Ec$1}function _B(e,t){if(t.end-t.start!==1||!e.drawings?.some(n=>n.start===t.start))return false;for(let n of t.spans)if(n.range.end>n.range.start)return false;return true}function _c(e,t,n,r,o,a,i){for(let s of Ue(n))i!==void 0&&s.paragraphId!==i||HB(e,t,n,s,r,o,a);}function HB(e,t,n,r,o,a,i){let s=Ue(n).length>1,l=Xm(t,r.paragraphId),d=c=>r.spans.some(u=>u.range.start<=c&&c<=u.range.end);for(let c=r.start;c<=r.end;c+=1)if(!(c===r.end&&c>r.start&&!s&&$v(n)&&NB(t,n,c))){if(c===r.start&&c>a&&e.length>0){let u=e[e.length-1];if(u.position.paragraphId===r.paragraphId&&u.position.offset===c)continue}DB(n,c,r)||Gv(l,c)&&!d(c)||e.push(Ha(t,{position:{paragraphId:r.paragraphId,offset:c},x:zn(n,c,i,r),y:n.box.y,height:n.box.height,lineId:n.id,pageIndex:o}));}}function Xv(e,t,n,r,o){for(let a of t){if(a.kind==="paragraph"){for(let i of a.lines)_c(r,e,i,n,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)Xv(e,s.blocks,n,r,o);}}var jB=new Nc;function Yv(e,t){let n=[];for(let r of e.pages)for(let o of Ze(r))for(let a of o.lines)_c(n,e,a,r.index,o.range.start,t);return n}function zB(e,t,n){let o=(qt(e).get(t.paragraphId)??[]).find(({line:i})=>{let s=Bn(i,t.paragraphId);return s!==null&&t.offset>=s.start&&t.offset<=s.end});if(!o||Ue(o.line).length<2)return null;let a=[];return _c(a,e,o.line,o.pageIndex,0,n),Km(a)}function Ac(e,t,n){return jB.get(e,t,n,()=>{let r=[];for(let{line:o,pageIndex:a}of qt(e).get(t)??[])_c(r,e,o,a,0,n,t);return Km(r)})}function GB(e,t,n,r){if(!e.pages[t])return [];let o=[];return Xv(e,n,t,o,r),o}function WB(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function VB(e,t,n){let r=e.pages[t];if(!r)return [];let o=[];for(let a of Ze(r,true))if(a.paragraphId===n)for(let i of a.lines)o.push({line:i,pageIndex:t});return o}function Uv(e,t,n){let r=WB(n),o=qt(e).get(t.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:VB(e,a,t.paragraphId),s=new Set(o.map(f=>f.line.id)),l=i.filter(f=>!s.has(f.line.id)),d=l.length>0?[...o,...l]:o,c=a===void 0?d:[...d].sort((f,p)=>{let m=f.pageIndex===a?0:1,g=p.pageIndex===a?0:1;return m-g}),u=null;for(let{line:f,pageIndex:p}of c){let m=Bn(f,t.paragraphId);if(!m||t.offset<m.start||t.offset>m.end)continue;if(t.offset===m.end&&t.offset>m.start&&Ue(f).length===1&&($v(f)||_B(f,m))){u??={line:f,pageIndex:p};continue}if(t.offset===m.end&&t.offset>m.start&&AB(e,t.paragraphId,t.offset))continue;let g=gs(f,t.offset,r.measurer,m);return Ha(e,{position:t,x:g.x,y:g.y,height:g.height,lineId:f.id,pageIndex:p})}if(u){let f=gs(u.line,t.offset,r.measurer,Bn(u.line,t.paragraphId));return Ha(e,{position:t,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex})}return null}function KB(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return sc(e,n,t)?.caret??null}function $B(e,t){let n=t.pageIndex!==void 0&&e.pages[t.pageIndex]?t.pageIndex:0;return dc(e,n,t)}function XB(e){return El(e)}var Vv=new WeakMap;function Dc(e,t){let n=Vv.get(e);return n||(n=new Map,e.forEach((r,o)=>{n.has(r)||n.set(r,o);}),Vv.set(e,n)),n.get(t)??-1}function Bc(e,t){if(e.anchor.paragraphId===e.head.paragraphId)return e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor};let n=Dc(t,e.anchor.paragraphId),r=Dc(t,e.head.paragraphId);return n===-1||r===-1?null:n<r||n===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function ai(e,t){let n=[],r=new Set;for(let{line:a}of qt(e).get(t)??[]){let i=Bn(a,t);if(i){for(let s of i.spans){if(s.range.end===s.range.start)continue;let l=`${s.range.start}:${s.range.end}`;if(r.has(l))continue;r.add(l);let d=s.range.end-s.range.start,c=s.text.length===d?s.text:s.text.slice(0,d).padEnd(d," ");n.push({start:s.range.start,text:c});}for(let s of i.drawings){let l=s.start,d=l+1,c=`${l}:${d}`;r.has(c)||(r.add(c),n.push({start:l,text:"\uFFFC"}));}}}n.sort((a,i)=>a.start-i.start);let o="";for(let a of n)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}function Ym(e,t){let n=new Set;for(let{line:r}of qt(e).get(t)??[]){let o=Bn(r,t);if(o)for(let a of o.spans)a.range.end!==a.range.start&&a.revisions?.some(i=>i.kind==="delete"||i.kind==="moveFrom")&&(n.add(a.range.start),n.add(a.range.end));}return n}function Kv(e,t,n,r){let o=po(e),a=fo(e).get(t.paragraphId);return a===void 0?null:Av(t,n,o,a,i=>Ac(e,i,r))}function YB(e,t,n,r=null,o={}){if(!o.stops&&(n==="left"||n==="right"))return Kv(e,t,n==="left"?-1:1,o.measurer);if(!o.stops&&(n==="wordLeft"||n==="wordRight")){let l=n==="wordLeft"?-1:1,d=Ns(ai(e,t.paragraphId),t.offset,l,Ym(e,t.paragraphId));return d===t.offset?Kv(e,t,l,o.measurer):{position:{paragraphId:t.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(n==="lineStart"||n==="lineEnd")){let l=Nv(t,n==="lineStart"?-1:1,zB(e,t,o.measurer)??Ac(e,t.paragraphId,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(n==="documentStart"||n==="documentEnd")){let l=Dv(n==="documentStart"?-1:1,po(e),d=>Ac(e,d,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(n==="up"||n==="down")){let l=fo(e).get(t.paragraphId);return l===void 0?null:_v(t,n==="up"?-1:1,r,po(e),l,d=>Ac(e,d,o.measurer))}let a=o.stops?[...o.stops]:Yv(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(l=>l.position.paragraphId===t.paragraphId&&l.position.offset===t.offset);if(i===-1){if(n==="left"||n==="right"){let d=$m(a,t,n==="left"?-1:1)??Bs(a,t);return d?{position:d.position,desiredX:null}:null}let l=Bs(a,t);if(!l)return null;i=a.indexOf(l);}let s=a[i];switch(n){case "left":return {position:a[Math.max(0,i-1)].position,desiredX:null};case "right":return {position:a[Math.min(a.length-1,i+1)].position,desiredX:null};case "lineStart":return {position:a.filter(d=>d.lineId===s.lineId)[0].position,desiredX:null};case "lineEnd":{let l=a.filter(d=>d.lineId===s.lineId);return {position:l[l.length-1].position,desiredX:null}}case "wordLeft":case "wordRight":{let l=ai(e,t.paragraphId),d=n==="wordLeft"?-1:1,c=Ns(l,t.offset,d,Ym(e,t.paragraphId));return c===t.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:t.paragraphId,offset:c},desiredX:null}}case "documentStart":return {position:a[0].position,desiredX:null};case "documentEnd":return {position:a[a.length-1].position,desiredX:null};case "pageUp":case "pageDown":{let l=r??s.x,d=s.pageIndex+(n==="pageUp"?-1:1),c=a.filter(p=>p.pageIndex===d);if(c.length===0)return {position:(n==="pageUp"?a[0]:a[a.length-1]).position,desiredX:l};let u=c[0],f=Number.POSITIVE_INFINITY;for(let p of c){let m=Math.abs(p.y-s.y)*1e3+Math.abs(p.x-l);m<f&&(f=m,u=p);}return {position:u.position,desiredX:l}}case "up":case "down":{let l=r??s.x,d=[],c=new Set;for(let g of a)c.has(g.lineId)||(c.add(g.lineId),d.push(g.lineId));let u=d.indexOf(s.lineId),f=n==="up"?u-1:u+1;if(f<0||f>=d.length)return {position:(n==="up"?a[0]:a[a.length-1]).position,desiredX:l};let p=a.filter(g=>g.lineId===d[f]),m=p[0];for(let g of p)Math.abs(g.x-l)<Math.abs(m.x-l)&&(m=g);return {position:m.position,desiredX:l}}default:return null}}function UB(e,t,n){return Uv(e,t,n)}function qB(e,t,n){let r=Bc(t,n);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return ZB(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:l}of qt(e).get(r.from.paragraphId)??[]){let d=Bn(l,r.from.paragraphId);if(!d)continue;let c=uo(e,d,r.from,r.to);if(c)for(let u of d.spans)u.range.end>c.start&&u.range.start<c.end&&o.push(u);}return o}let a=qt(e),i=Dc(n,r.from.paragraphId),s=Dc(n,r.to.paragraphId);if(i===-1||s===-1)return [];for(let l=i;l<=s;l+=1)for(let{line:d}of a.get(n[l])??[]){let c=Bn(d,n[l]);if(!c)continue;let u=uo(e,c,r.from,r.to);if(u)for(let f of c.spans)f.range.end>u.start&&f.range.start<u.end&&o.push(f);}return o}function ZB(e,t){let n=null;for(let{line:r}of qt(e).get(t.paragraphId)??[])for(let o of Bn(r,t.paragraphId)?.spans??[]){if(o.range.start<t.offset&&t.offset<=o.range.end)return [o];n===null&&o.range.start===t.offset&&(n=o);}return n?[n]:[]}var qv=new WeakMap;function pr(e){let t=qv.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=(s,l,d,c)=>{for(let u of s){if(u.kind==="paragraph")continue;let f=u.tableId,p=o.get(f);p||(p=new Map,o.set(f,p),n.set(f,[]),r.set(f,new Map));for(let m of u.rows){let g=p.get(m.id);g===void 0&&(g=p.size,p.set(m.id,g),r.get(f).set(g,m.cells));for(let y of m.cells)n.get(f).push({pageIndex:l,tableId:f,row:m,cell:y,rowIndex:g,isHeaderRepeat:m.isHeaderRepeat,offsetX:d,offsetY:c}),a(y.blocks,l,d,c);}}};for(let s of e.pages){a(s.fragments,s.index,0,0);for(let l of [s.header,s.footer])l&&a(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);for(let l of [s.footnotes,s.endnotes])if(l)for(let d of l.notes)a(d.fragments,s.index,d.box.x-s.contentBox.x,d.box.y-s.contentBox.y);}let i=new Map;for(let[s,l]of n)i.set(s,{placed:l,rows:r.get(s)??new Map});return qv.set(e,i),i}function Jv(e){let t=0;for(let n of e.rows.values())for(let r of n)t=Math.max(t,Xr(r).to+1);return t}var Xr=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function JB(e,t,n){if(t.tableId!==n.tableId)return null;let r=pr(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(Xr(t).from,Xr(n).from),s=Math.max(Xr(t).to,Xr(n).to),l=p=>{let{from:m,to:g}=Xr(p);return g>=i&&m<=s},d=p=>(r.rows.get(p)??[]).some(m=>m.vMergeContinue&&l(m)),c=r.rows.size+Jv(r)+2;for(let p=0;!(p>c);p+=1){let m=false;for(let[g,y]of r.rows)if(!(g<o||g>a))for(let h of y){if(!l(h))continue;let{from:b,to:R}=Xr(h);b<i&&(i=b,m=true),R>s&&(s=R,m=true);}for(;o>0&&d(o);)o-=1,m=true;for(;d(a+1);)a+=1,m=true;if(!m)break}let u=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:m,to:g}=Xr(p.cell);g<i||m>s||f.has(p.cell.id)||(f.add(p.cell.id),u.push(p.cell.id));}return u.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:s},text:QB(e,t.tableId,u)}}function M$(e,t){return Qv(e,t,true)}function Hc(e,t){return Qv(e,t,false)}function Qv(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of pr(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let l of s.cell.blocks)n&&l.kind!=="paragraph"||ii(l,o,a);return o}function ii(e,t,n){if(e.kind==="paragraph"){for(let r of Tr(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)ii(a,t,n);}function QB(e,t,n){let r=Hc(e,n),o=r[0],a=r[r.length-1];return !o||!a?eN(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:ai(e,a).length}}}function eN(e,t){let n=pr(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)ii(s,a,new Set);let i=a[0];if(i){let s={paragraphId:i,offset:0};return {anchor:s,head:s}}}for(let o of e.pages)for(let a of Ze(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function tN(e){let t=[...Ze(e)];for(let n of [e.header,e.footer])n&&t.push(...xt(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...xt(r.fragments));return t}function nN(e,t){let n=new Set(Hc(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of tN(a))if(n.has(i.paragraphId))for(let s of i.lines)for(let l of s.spans){let d=`${l.range.paragraphId}:${l.range.start}:${l.range.end}`;o.has(d)||(o.add(d),r.push(l));}return r}function rN(e,t){let n=new Set(t),r=[];for(let o of pr(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function oN(e,t){let n=pr(e).get(t.tableId);if(!n)return "";let r=new Set(t.cellIds),o=new Map,a=new Set;for(let i of n.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let s=Hc(e,[i.cell.id]).map(d=>ai(e,d)).join(`
|
|
19
|
+
`),l=o.get(i.rowIndex);l?l.set(i.cell.gridColumn,s):o.set(i.rowIndex,new Map([[i.cell.gridColumn,s]]));}return [...o.keys()].sort((i,s)=>i-s).map(i=>{let s=o.get(i),l=[];for(let d=t.columns.from;d<=t.columns.to;d+=1)l.push(s.get(d)??"");return l.join(" ")}).join(`
|
|
20
|
+
`)}function Um(e,t){let n=null,r=-1;for(let[o,a]of pr(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)ii(d,s,new Set);if(!s.includes(t))continue;let l=o.length;l<=r||(r=l,n={tableId:o,rows:a.rows.size,columns:Jv(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return n}function B$(e,t,n){if(n){let a=Um(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let s=pr(e).get(n.tableId);if(!s)return null;for(let l of s.placed)if(l.cell.id===i)return {tableId:n.tableId,rowId:l.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:l.cell.gridColumn,isHeaderRepeat:l.isHeaderRepeat};return null}let r=Um(e,t);if(!r)return null;let o=pr(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let s of a.cell.blocks)ii(s,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var Zv=new WeakMap;function N$(e,t){let n=Zv.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of pr(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)ii(d,s,new Set);let l={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let d of s){let c=r.get(d);c&&c.tableId.length>=o.length||r.set(d,l);}}return Zv.set(e,r),r.get(t)??null}export{Nu as $,xo as $a,pf as $b,xn as $c,lE as $d,Ev as $e,Un as A,Gu as Aa,Ai as Ab,nx as Ac,Co as Ad,Ls as Ae,N$ as Af,R0 as B,oF as Ba,Ct as Bb,wd as Bc,vp as Bd,Hw as Be,P0 as C,cF as Ca,ha as Cb,vd as Cc,iL as Cd,jw as Ce,SN as D,ki as Da,XF as Db,Id as Dc,uj as Dd,zm as De,Tu as E,ca as Ea,YF as Eb,Xf as Ec,qp as Ed,$r as Ee,RN as F,fh as Fa,UF as Fb,ix as Fc,ms as Fd,YM as Fe,w0 as G,co as Ga,qF as Gb,Yf as Gc,yL as Gd,mv as Ge,I0 as H,ph as Ha,of as Hb,Ar as Hc,sc as Hd,PK as He,PN as I,Oi as Ia,xa as Ib,mn as Ic,Cj as Id,gv as Ie,F0 as J,El as Ja,sf as Jb,px as Jc,hL as Jd,yv as Je,wl as K,Ci as Ka,lf as Kb,Qf as Kc,dc as Kd,JM as Ke,wi as L,Ml as La,_i as Lb,JD as Lc,GR as Ld,QM as Le,ku as M,Li as Ma,df as Mb,Cd as Mc,cc as Md,eB as Me,Ou as N,Ue as Na,Sa as Nb,Nx as Nc,gs as Nd,EK as Ne,vi as O,YN as Oa,cf as Ob,Ji as Oc,CL as Od,oB as Oe,Mn as P,Tr as Pa,Ro as Pb,Dr as Pc,Mj as Pd,Rv as Pe,He as Q,UN as Qa,qh as Qb,Ga as Qc,Bj as Qd,yB as Qe,aa as R,po as Ra,Kl as Rb,P_ as Rc,Nj as Rd,bB as Re,qn as S,Bl as Sa,Ra as Sb,zr as Sc,Aj as Sd,Es as Se,C0 as T,wh as Ta,ff as Tb,hn as Tc,Dj as Td,Pv as Te,Cu as U,mF as Ua,Qh as Ub,ns as Uc,hc as Ud,Iv as Ue,Fi as V,go as Va,ji as Vb,KO as Vc,Rn as Vd,PB as Ve,E0 as W,Ei as Wa,eb as Wb,xp as Wc,aP as Wd,wB as We,Nt as X,fa as Xa,tb as Xb,e1 as Xc,XL as Xd,FB as Xe,N0 as Y,yo as Ya,wa as Yb,kS as Yc,im as Yd,zn as Ye,A0 as Z,bF as Za,nb as Zb,os as Zc,aE as Zd,Cv as Ze,Mu as _,bo as _a,MA as _b,OS as _c,sE as _d,n$ as _e,ta as a,Xt as aa,Oh as ab,mf as ac,Hd as ad,mE as ae,r$ as af,Xn as b,H0 as ba,xF as bb,gf as bc,dr as bd,hE as be,Ms as bf,vr as c,j0 as ca,SF as cb,yf as cc,jd as cd,xP as ce,o$ as cf,wr as d,z0 as da,er as db,rr as dc,dC as dd,um as de,a$ as df,na as e,kl as ea,kr as eb,zi as ec,Lo as ed,fm as ee,u$ as ef,yy as f,W0 as fa,Ch as fb,Dt as fc,AS as fd,pm as fe,Wv as ff,Ir as g,Au as ga,qu as gb,Cr as gc,Gd as gd,DG as ge,Ns as gf,ml as h,Ol as ha,Lh as hb,dT as hc,nn as hd,$E as he,Yv as hf,yl as i,V0 as ia,Zu as ib,hf as ic,GS as id,XE as ie,GB as if,hu as j,K0 as ja,Eh as jb,va as jc,Wd as jd,ti as je,Uv as jf,On as k,$0 as ka,un as kb,bf as kc,gC as kd,ws as ke,KB as kf,ao as l,_u as la,_l as lb,jA as lc,Sn as ld,JP as le,$B as lf,Fy as m,eh as ma,Te as mb,kf as mc,yC as md,ZE as me,XB as mf,Ru as n,th as na,fA as nb,uk as nc,Vd as nd,QP as ne,ai as nf,Sl as o,nh as oa,LF as ob,Nb as oc,Fp as od,Tm as oe,Ym as of,RI as p,rh as pa,Oe as pb,id as pc,Kd as pd,Fm as pe,YB as pf,io as q,oh as qa,So as qb,jb as qc,cr as qd,ew as qe,UB as qf,wu as r,ah as ra,Bi as rb,ar as rc,MC as rd,tw as re,qB as rf,PI as s,q0 as sa,Qu as sb,pd as sc,Zd as sd,Ic as se,JB as sf,$e as t,Z0 as ta,Hh as tb,$b as tc,gH as td,nw as te,M$ as tf,vu as u,la as ua,NF as ub,zf as uc,yH as ud,Fc as ue,Hc as uf,ky as v,eF as va,AF as vb,Aa as vc,No as vd,Nm as ve,nN as vf,Fu as w,ju as wa,fn as wb,qb as wc,Mp as wd,kw as we,rN as wf,By as x,Ll as xa,_F as xb,ir as xc,Np as xd,Bm as xe,oN as xf,Rl as y,Ze as ya,tf as yb,Io as yc,bR as yd,sM as ye,Um as yf,Ny as z,xt as za,nf as zb,gd as zc,Ap as zd,Am as ze,B$ as zf};
|