@docx-editor.dev/core 2.9.2 → 2.10.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.
Files changed (94) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.js +1 -1
  3. package/dist/binding.cjs +1 -1
  4. package/dist/binding.d.cts +74 -10
  5. package/dist/binding.d.ts +74 -10
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-27APDXY2.js +2 -0
  8. package/dist/chunk-35MI6K7M.cjs +10 -0
  9. package/dist/chunk-4XL7SOWQ.cjs +2 -0
  10. package/dist/chunk-6K6QQVAZ.cjs +18 -0
  11. package/dist/chunk-7ZJL5AEY.cjs +1 -0
  12. package/dist/chunk-C6LK2BYA.cjs +2 -0
  13. package/dist/chunk-HBEBUCRM.cjs +5 -0
  14. package/dist/chunk-LG5K46OM.js +2 -0
  15. package/dist/chunk-LWADHMVV.js +5 -0
  16. package/dist/chunk-N725IUO7.js +18 -0
  17. package/dist/chunk-N7DBENH4.js +10 -0
  18. package/dist/chunk-NVGFWMCO.js +1 -0
  19. package/dist/chunk-SYTWKJPJ.cjs +18 -0
  20. package/dist/chunk-YI6JXF7U.js +18 -0
  21. package/dist/contracts/document.d.cts +6 -1
  22. package/dist/contracts/document.d.ts +6 -1
  23. package/dist/contracts/editor.d.cts +6 -6
  24. package/dist/contracts/editor.d.ts +6 -6
  25. package/dist/contracts/interaction.d.cts +6 -6
  26. package/dist/contracts/interaction.d.ts +6 -6
  27. package/dist/contracts/modules.d.cts +3 -4
  28. package/dist/contracts/modules.d.ts +3 -4
  29. package/dist/{custom-node-writes-D6SGwebL.d.ts → custom-node-writes-BvpWCnW8.d.ts} +35 -4
  30. package/dist/{custom-node-writes-Dy3b20PS.d.cts → custom-node-writes-Db8H6Z3n.d.cts} +35 -4
  31. package/dist/{editor-Cvd7Geoc.d.ts → editor-C0my6Uta.d.ts} +35 -14
  32. package/dist/{editor-cAEf1uXW.d.cts → editor-CwzY2Hcg.d.cts} +35 -14
  33. package/dist/editor.cjs +1 -1
  34. package/dist/editor.css +57 -456
  35. package/dist/editor.d.cts +20 -20
  36. package/dist/editor.d.ts +20 -20
  37. package/dist/editor.js +1 -1
  38. package/dist/{index-DRqY5JVF.d.ts → index-kID8Ymkp.d.ts} +79 -19
  39. package/dist/{index-wb-iOxfh.d.cts → index-nLFwo_17.d.cts} +79 -19
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.cts +13 -13
  42. package/dist/index.d.ts +13 -13
  43. package/dist/index.js +1 -1
  44. package/dist/layout.cjs +1 -1
  45. package/dist/layout.d.cts +38 -19
  46. package/dist/layout.d.ts +38 -19
  47. package/dist/layout.js +1 -1
  48. package/dist/output.cjs +1 -1
  49. package/dist/output.d.cts +6 -6
  50. package/dist/output.d.ts +6 -6
  51. package/dist/output.js +1 -1
  52. package/dist/{review-items-B8tffIXj.d.cts → review-items-CwixiHNe.d.cts} +1 -1
  53. package/dist/{review-items-bdGxFWNA.d.ts → review-items-Dw-8a6Ie.d.ts} +1 -1
  54. package/dist/{review-reads-Bxz03tHG.d.cts → review-reads-BqkiJTeR.d.cts} +1 -1
  55. package/dist/{review-reads-CHODU0LI.d.ts → review-reads-C0u-IKEA.d.ts} +1 -1
  56. package/dist/{semantic-cell-selection-BPzx6DdT.d.cts → semantic-cell-selection-DT9x9WLf.d.cts} +2 -2
  57. package/dist/{semantic-cell-selection-CsHcr-yk.d.ts → semantic-cell-selection-Utrf0lz7.d.ts} +2 -2
  58. package/dist/{semantic-interaction-BfWDD_0V.d.cts → semantic-interaction-B6hFRQLy.d.ts} +21 -2
  59. package/dist/{semantic-interaction-D-RZ9Ust.d.ts → semantic-interaction-Z0xKQcB4.d.cts} +21 -2
  60. package/dist/{semantic-paint-WhVtSDJK.d.ts → semantic-paint-CQEOC0Od.d.cts} +2 -2
  61. package/dist/{semantic-paint-Bd7EqzXV.d.cts → semantic-paint-quke354p.d.ts} +2 -2
  62. package/dist/{semantic-records-DadVT_E1.d.cts → semantic-records-CMakzQ1X.d.cts} +16 -2
  63. package/dist/{semantic-records-DCt-ZwKU.d.ts → semantic-records-Do3-i5oB.d.ts} +16 -2
  64. package/dist/{shaped-measurer-B9f4A7QA.d.ts → shaped-measurer-BxwTUluj.d.ts} +1 -1
  65. package/dist/{shaped-measurer-CninrHr_.d.cts → shaped-measurer-DzRwWrL5.d.cts} +1 -1
  66. package/dist/store.cjs +1 -1
  67. package/dist/store.d.cts +128 -12
  68. package/dist/store.d.ts +128 -12
  69. package/dist/store.js +1 -1
  70. package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +24 -0
  71. package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +24 -0
  72. package/dist/{tree-op-types-CnRb7AYo.d.ts → tree-op-types-BuOfCrkp.d.ts} +259 -32
  73. package/dist/{tree-op-types-D1vNJ7XC.d.cts → tree-op-types-DSJYmf5b.d.cts} +259 -32
  74. package/dist/{tree-session-Df02ajqc.d.cts → tree-session-contract-ByWx8eew.d.cts} +44 -104
  75. package/dist/{tree-session-ZuBFOhIh.d.ts → tree-session-contract-C1dfE9hy.d.ts} +44 -104
  76. package/dist/{tree-store-DgETo6Mf.d.ts → tree-store-ASBtz7UB.d.ts} +1 -1
  77. package/dist/{tree-store-B_sJBMIS.d.cts → tree-store-CWOUMGN8.d.cts} +1 -1
  78. package/package.json +2 -2
  79. package/dist/chunk-6JWP2H7K.js +0 -2
  80. package/dist/chunk-6KNLLEUW.cjs +0 -18
  81. package/dist/chunk-7ADTI533.cjs +0 -10
  82. package/dist/chunk-7ETDCPF6.cjs +0 -2
  83. package/dist/chunk-7I3BSGGS.js +0 -1
  84. package/dist/chunk-7UU5YFCD.cjs +0 -2
  85. package/dist/chunk-CKDAK3MV.js +0 -10
  86. package/dist/chunk-DIMEYVNS.js +0 -2
  87. package/dist/chunk-H2656QDI.cjs +0 -1
  88. package/dist/chunk-KQGENNL5.cjs +0 -15
  89. package/dist/chunk-LIXPSV4T.js +0 -18
  90. package/dist/chunk-O4UULRAQ.cjs +0 -5
  91. package/dist/chunk-SIIFNE6U.js +0 -15
  92. package/dist/chunk-VXYECPKA.js +0 -5
  93. package/dist/image-resources-BgA9EQxY.d.ts +0 -203
  94. package/dist/image-resources-BiA-IXgo.d.cts +0 -203
@@ -0,0 +1,18 @@
1
+ import {f,c,d,e}from'./chunk-WU7PUTVA.js';import {y}from'./chunk-LG5K46OM.js';import {m,Xe as Xe$1,Dd as Dd$1,da as da$1,kd as kd$1,Bd as Bd$1,rd,sd as sd$1,pd as pd$1,xd as xd$1,yd as yd$1,ud as ud$1,zd as zd$1,I,Hc as Hc$1,Be,g,Yb as Yb$1,lb as lb$1,bb as bb$1,$a as $a$1,Bc as Bc$1,Ob as Ob$1,ma as ma$1,Fc as Fc$1,Fd as Fd$1,wd as wd$1,vd as vd$1,td,Gd as Gd$1,qd as qd$1,Za as Za$1,Ie,Ge,Le,He,Sg as Sg$1,Pb as Pb$1,a,ya as ya$1,qa as qa$1,Lb as Lb$1,Va as Va$1,_a as _a$1,Kb as Kb$1,Nb as Nb$1,jc as jc$1,lc as lc$1,Se,he as he$1,ue,Ee as Ee$1,Ua as Ua$1,Sa as Sa$1,s,$d as $d$1,Wa as Wa$1,ec as ec$1,cc as cc$1,hc as hc$1,rc as rc$1,sc as sc$1,Qa as Qa$1,gc as gc$1,ic as ic$1,Xa as Xa$1,ka as ka$1,Gb as Gb$1,Pa as Pa$1,pc as pc$1,qc as qc$1,Zb as Zb$1,$b as $b$1,oc as oc$1,ab as ab$1}from'./chunk-N7DBENH4.js';var aS=Symbol("validated-resolved-font"),ad=64*1024*1024,id=256,sd=128*1024*1024,Yt=class extends Error{name="FontResolutionError";request;code;limit;actual;diagnostic;expectedHash;actualHash;constructor(n,t,r={}){super(`Font resolution failed (${n}) for ${qr(t)}`),this.code=n,this.request=Zr(t),this.limit=r.limit,this.actual=r.actual,this.diagnostic=r.diagnostic,this.expectedHash=r.expectedHash,this.actualHash=r.actualHash;}},bp=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")},Zr=e=>(bp(e),Object.freeze({family:e.family,weight:e.weight,style:e.style})),qr=e=>(bp(e),JSON.stringify([e.family,e.weight,e.style])),ld=class{[aS]=true;id;identity;request;family;byteLength;hash;faceIndex;substitution;constructor(n,t){if(n.id.length===0)throw new TypeError("Resolved font id must not be empty");if(!Number.isInteger(n.faceIndex)||n.faceIndex<0)throw new RangeError("Font face index must be a non-negative integer");this.id=n.id,this.request=Zr(n.request),this.family=this.request.family,this.hash=n.hash,this.faceIndex=n.faceIndex,this.identity=`${this.hash}#${this.faceIndex}`,this.byteLength=n.byteLength,this.substitution=null,t&&(this.substitution=Object.freeze({requested:Zr(t.requested),resolved:Zr(t.resolved)})),Object.freeze(this);}get bytes(){return wi(this).slice()}},xp=new WeakSet,Sp=new WeakMap,Rp=new WeakMap,wp=(e,n,t,r)=>{let o=new ld(e,r);return Sp.set(o,n),Rp.set(o,t),xp.add(o),o},wi=e=>{Qr(e);let n=Sp.get(e);if(!n)throw new TypeError("Resolved font has no owned byte capability");return n},Pi=e=>{Qr(e);let n=Rp.get(e);if(!n)throw new TypeError("Resolved font has no admitted table metadata");return n},Qr=e=>{if(typeof e!="object"||e===null||!xp.has(e))throw new TypeError("Shaping requires a validated resolved font")};var Pp=(e,n)=>e[n]<<8|e[n+1],Jr=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,yp=(e,n)=>{if(n>e.byteLength-12)return {valid:false,diagnostic:"truncated sfnt header"};let t=String.fromCharCode(e[n],e[n+1],e[n+2],e[n+3]);if(!(e[n]===0&&e[n+1]===1&&e[n+2]===0&&e[n+3]===0)&&t!=="OTTO"&&t!=="true"&&t!=="typ1")return {valid:false,diagnostic:"unsupported sfnt signature"};let o=Pp(e,n+4),a=n+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=n+12+i*16,l=Jr(e,s+8),d=Jr(e,s+12);if(l>e.byteLength||d>e.byteLength-l)return {valid:false,diagnostic:"sfnt table range exceeds font bytes"}}return {valid:true}},iS=(e,n)=>{let r=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Jr(e,12+n*4):0,o=Pp(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)},Ii=(e,n)=>{if(!Number.isSafeInteger(n)||n<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 n!==0?{valid:false,diagnostic:"standalone sfnt has only face index zero"}:yp(e,0);let r=Jr(e,4);if(r!==65536&&r!==131072)return {valid:false,diagnostic:"unsupported TTC version"};let o=Jr(e,8),a=12+o*4;if(o===0||!Number.isSafeInteger(a)||a>e.byteLength||n>=o)return {valid:false,diagnostic:"invalid TTC face directory"};let i=Jr(e,12+n*4);return i<a?{valid:false,diagnostic:"invalid TTC face offset"}:yp(e,i)},sS=(e,n,t,r)=>{if(e.availability==="forbidden")return {kind:"forbidden"};if(e.bytes.byteLength>n)return {kind:"overLimit",actual:e.bytes.byteLength};let o=e.bytes.slice();r?.onOwnedByteCopy?.(),r?.onHash?.();let a$1=a(o);if(e.hash!==a$1)return {kind:"hashMismatch",expectedHash:e.hash,actualHash:a$1};let i=Ii(o,e.faceIndex);if(!i.valid)return {kind:"malformed",diagnostic:i.diagnostic};r?.onTableScan?.();let s=iS(o,e.faceIndex);try{let d=t(o,e.faceIndex);if(!d.valid)return {kind:"malformed",diagnostic:d.diagnostic}}catch(d){return {kind:"malformed",diagnostic:d instanceof Error?d.message:"font validator threw"}}let l={kind:"resolved",font:wp({...e,byteLength:o.byteLength},o,s)};return r?.onAdmission?.(),l},lS=e=>{if(!Number.isSafeInteger(e.epoch)||e.epoch<0)throw new RangeError("Font resource epoch must be a non-negative safe integer");if(!Number.isSafeInteger(e.maxFontBytes)||e.maxFontBytes<=0||e.maxFontBytes>ad)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${ad}`);if(typeof e.validateFont!="function")throw new TypeError("Font snapshot requires a validator");if(e.resources.length>id)throw new RangeError(`Font source count must not exceed ${id}`);let n=0;for(let l of e.resources){if(l.bytes.byteLength>sd-n)throw new RangeError(`Aggregate font bytes must not exceed ${sd}`);n+=l.bytes.byteLength;}let t=e.epoch,r=e.maxFontBytes,o=e.validateFont,a=new Map;for(let l of e.resources){let d=qr(l.request);if(a.has(d))throw new TypeError(`Duplicate font resource request: ${d}`);a.set(d,sS(l,r,o,e.instrumentation));}let i=new Map;for(let l of e.substitutions??[]){let d=qr(l.from);if(i.has(d))throw new TypeError(`Duplicate font substitution request: ${d}`);i.set(d,Zr(l.to));}return Object.freeze({epoch:t,resolve:l=>{let d=Zr(l),c=qr(d),u=i.get(c),f=u??d,p=a.get(qr(f));return p?p.kind==="forbidden"?new Yt("forbidden",d):p.kind==="overLimit"?new Yt("overLimit",d,{limit:r,actual:p.actual}):p.kind==="malformed"?new Yt("malformed",d,{diagnostic:p.diagnostic}):p.kind==="hashMismatch"?new Yt("hashMismatch",d,{expectedHash:p.expectedHash,actualHash:p.actualHash}):u?wp({request:p.font.request,id:p.font.id,hash:p.font.hash,faceIndex:p.font.faceIndex,byteLength:p.font.byteLength},wi(p.font),Pi(p.font),{requested:d,resolved:u}):p.font:new Yt("missing",d)}})};var it=e=>{if(!Number.isSafeInteger(e))throw new RangeError("Fixed-point value must be a safe integer");return e},vi=(e,n)=>{if(e.trim().length===0||/[\u0000-\u001f\u007f]/.test(e))throw new TypeError(`${n} must be non-blank and contain no control characters`)},dS=(e,n)=>{if(!/^[\x20-\x7e]{4}$/.test(e))throw new TypeError(`${n} must be a four-byte ASCII tag`)},Ip=(e,n,t)=>{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(dS(a,`${n} key`),!Number.isFinite(i)||t&&(!Number.isSafeInteger(i)||i<0))throw new RangeError(`${n} value must be ${t?"a non-negative safe integer":"finite"}`);if(t&&i>4294967295)throw new RangeError(`${n} value must fit an unsigned 32-bit integer`);o[a]=i;}return Object.freeze(o)},dd=e=>Object.freeze({family:e.family,weight:e.weight,style:e.style}),cS=e=>e?Object.freeze({requested:dd(e.requested),resolved:dd(e.resolved)}):void 0,vp=new WeakSet,ud=e=>{if(Qr(e),!vp.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");vp.add(e);}},cd=e=>(ud(e),e),ki=e=>(ud(e),Object.freeze({identity:e.identity,id:e.id,family:e.family,request:dd(e.request),hash:e.hash,faceIndex:e.faceIndex,byteLength:e.byteLength,substitution:cS(e.substitution)??null})),hr=e=>{if(vi(e.shapingLibrary.name,"shaping library name"),vi(e.shapingLibrary.version,"shaping library version"),vi(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(vi(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 n=cd(e.font),t=e.fallbackOrder.map(cd),r=new Set;for(let o of t){let a=JSON.stringify(ki(o));if(r.has(a))throw new TypeError("fallback order contains a duplicate font");r.add(a);}return Object.freeze({font:n,variationAxes:Ip(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:Ip(e.features,"OpenType feature",true),fallbackOrder:Object.freeze([...t]),fixedPointScale:e.fixedPointScale,roundingMode:e.roundingMode})},kp=e=>{let n=hr(e);return Object.freeze({font:ki(n.font),variationAxes:Object.freeze(Object.entries(n.variationAxes).map(t=>Object.freeze(t))),shapingLibrary:Object.freeze({name:n.shapingLibrary.name,version:n.shapingLibrary.version}),unicodeDataVersion:n.unicodeDataVersion,normalization:n.normalization,script:n.script,language:n.language,direction:n.direction,features:Object.freeze(Object.entries(n.features).map(t=>Object.freeze(t))),fallbackOrder:Object.freeze(n.fallbackOrder.map(ki)),fixedPointScale:n.fixedPointScale,roundingMode:n.roundingMode})},fd=e=>JSON.stringify(kp(e)),gr=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},Vn=e=>{try{return it(e)}catch{throw new RangeError("Shaped run contains a non-integer fixed-point value")}},Tp=new WeakMap,Ti=e=>{let n=Tp.get(e);if(n)return n;ud(e);let t=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 Tp.set(e,t),t},Oi=(e,n)=>{let t=hr(n);if(e.direction!=="ltr"&&e.direction!=="rtl")throw new TypeError("Shaped run direction must be ltr or rtl");if(e.direction!==t.direction)throw new TypeError("Shaped run direction does not match shaping environment");if(gr(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=>{gr(l.id,"glyph id"),gr(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:Vn(l.originX),originY:Vn(l.originY),advanceX:Vn(l.advanceX),advanceY:Vn(l.advanceY),offsetX:Vn(l.offsetX),offsetY:Vn(l.offsetY),outline:d})}),a=e.fontSpans.map(l=>{if(gr(l.glyphStart,"font span start"),gr(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&&gr(l.fallbackIndex,"fallback index");let d=cd(l.font);if(l.fallbackIndex===null){if(Ti(d)!==Ti(t.font))throw new TypeError("Shaped primary font does not match shaping environment")}else {let c=t.fallbackOrder[l.fallbackIndex];if(!c)throw new RangeError("Shaped fallback index is outside fallback order");if(Ti(d)!==Ti(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]])gr(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:Vn(l.advance),caretEdges:Object.freeze(l.caretEdges.map(Vn))})}),s=Object.freeze({ascent:Vn(e.metrics.ascent),descent:Vn(e.metrics.descent),lineGap:Vn(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})},uS=(e,n)=>{let t=Oi(e,n);return Object.freeze({text:t.text,direction:t.direction,script:n.script,language:n.language,bidiLevel:t.bidiLevel,glyphs:t.glyphs,clusters:t.clusters,fontSpans:Object.freeze(t.fontSpans.map(r=>Object.freeze({glyphStart:r.glyphStart,glyphEnd:r.glyphEnd,fallbackIndex:r.fallbackIndex,font:ki(r.font)}))),metrics:t.metrics})};var sa=Object.freeze({name:"HarfBuzz",version:"14.3.0"}),la=null,aa=null;function fS(){return la?Promise.resolve():aa||(aa=import('./dist-YFULGVS3.js').then(e=>{let n=e.versionString();if(n!==sa.version)throw new Me("shapingLibraryMismatch",{diagnostic:f(sa.version,n)});la=e;}).catch(e$1=>{throw aa=null,e$1 instanceof Me?e$1:c(e$1)?new Me("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new Me("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),aa)}function pS(){return la!==null}function mS(){if(!la)throw new Me("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return la}var Me=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(n,t={}){super(`HarfBuzz shaping failed (${n})`,{cause:t.cause}),this.code=n,this.limit=t.limit,this.actual=t.actual,this.diagnostic=t.diagnostic;}},gS=16*1024*1024,hS=1e6,yS=1e6,bS=1e6,xS=4,SS=512,RS=1024*1024,wS=16*1024*1024,PS=32*1024*1024,IS=64*1024*1024,vS=64*1024*1024,TS=1e6,kS=1e6,OS=1e6,CS=64,BS=4096,LS=4*1024*1024,MS=64*1024*1024,ES=64*1024*1024,FS=256*1024*1024,NS=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Op=["cmap","head","hhea","hmtx","maxp"],AS=(e,n)=>e[n]<<8|e[n+1],DS=(e,n)=>e[n]*16777216+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]>>>0,_S=(e,n)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?DS(e,12+n*4):0,HS=(e,n)=>{let t=_S(e,n),r=AS(e,t+4),o=new Set;for(let a=0;a<r;a+=1){let i=t+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},zS=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),jS=(e,n)=>{let t=Ii(e,n);if(!t.valid)return t;let r=HS(e,n);for(let o of Op)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},GS=jS,st=(e,n,t)=>{if(!Number.isSafeInteger(e)||e<=0||e>t)throw new RangeError(`${n} must be a positive safe integer no greater than ${t}`);return e},WS=(e,n,t)=>{let r=e<0n,o=r?-e:e,a=o/n,i=o%n;if(t!=="towardZero"){let d=i*2n;(d>n||d===n&&(t==="halfAwayFromZero"||t==="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},Cp=(e,n,t,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(t)||t<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");return it(WS(BigInt(e)*BigInt(t),BigInt(n),r))},$S=(e,n,t,r)=>{if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("font size must be a positive integer number of half points");if(n>Math.floor(Number.MAX_SAFE_INTEGER/t))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=n*t,a=e*2;return i=>Cp(i,a,o,r)},XS=(e,n)=>{if(n.length===0)return [];let t=[...new Set(n.map(i=>i.cluster))].sort((i,s)=>i-s),r=new Map;for(let i=0;i<t.length;i+=1)r.set(t[i],t[i+1]??e.length);let o=[],a=0;for(;a<n.length;){let i=n[a].cluster,s=a+1;for(;s<n.length&&n[s].cluster===i;)s+=1;let l=n.slice(a,s).reduce((c,u)=>c+u.advanceX,0),d=it(l);o.push({textStart:i,textEnd:r.get(i),glyphStart:a,glyphEnd:s,advance:d,caretEdges:Object.freeze([it(0),d]),fontSpan:0}),a=s;}return o},lt=64,Pt=8,yr=8,VS=32,Bp=lt+2*Pt,YS=lt+Pt+yr,KS=lt+Pt+yr,US=lt+Pt+yr,Lp=lt+8*Pt,Mp=lt+8*yr+Pt,qS=lt+6*yr+Pt,ZS=lt+3*yr+2*Pt,JS=lt+3*yr,da=e=>lt+e.length*Uint16Array.BYTES_PER_ELEMENT,md=e=>US+da(e),ia=e=>VS+e*Pt,QS=(e,n)=>Bp+da(e)+YS+md(n),eR=e=>Lp+da(e)+ia(e.length)+e.length*Mp,nR=e=>{let n=new Set(e.glyphs.map(t=>t.outline));return Lp+da(e.text)+ia(e.glyphs.length)+e.glyphs.length*Mp+ia(e.clusters.length)+e.clusters.length*qS+e.clusters.reduce((t,r)=>t+ia(r.caretEdges.length),0)+ia(e.fontSpans.length)+e.fontSpans.length*ZS+JS+[...n].reduce((t,r)=>t+md(r.path),0)},tR=(e,n)=>Bp+da(e)+KS+n,pd=class{#n;#s;#u;#f;#p;#y;#b;#m;#g;#l;#h;#d;#e;#o=new Map;#a=new Map;#t=new Map;#i=0;#r=0;#c;constructor(n,t){this.#n=n,this.#s=st(t.maxFontBytes??gS,"maximum font bytes",vS),this.#u=st(t.maxInputUtf16??hS,"maximum input UTF-16 code units",TS),this.#f=st(t.maxCodepoints??yS,"maximum input code points",kS),this.#p=st(t.maxGlyphs??bS,"maximum shaped glyphs",OS),this.#y=st(t.maxCachedFaces??xS,"maximum cached faces",CS),this.#b=st(t.maxCachedShapes??SS,"maximum cached shape results",BS),this.#m=st(t.maxOutlineBytes??RS,"maximum outline bytes",LS),this.#g=st(t.maxCachedOutlineBytes??wS,"maximum cached outline bytes",MS),this.#l=st(t.maxShapedRunBytes??PS,"maximum shaped run bytes",ES),this.#h=st(t.maxCachedShapeBytes??IS,"maximum cached shape bytes",FS),this.#d=t.instrumentation?.onFaceCacheEvent,this.#e=t.instrumentation,this.#c=new this.#n.Buffer;}dispose(){this.#o.clear(),this.#a.clear(),this.#t.clear(),this.#i=0,this.#r=0,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#c=void 0;}#S(n,t){let r=this.#o.get(n.identity);if(r)return this.#o.delete(n.identity),this.#o.set(n.identity,r),this.#d?.(Object.freeze({kind:"hit",identity:n.identity})),r;let o=Pi(n);for(let c of Op)if(!o.has(c))throw new Me("malformedFont",{diagnostic:`missing required ${c} table`});this.#e?.onByteCopy?.();let a=new this.#n.Blob(zS(t)),i=new this.#n.Face(a,n.faceIndex),s=new this.#n.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 Me("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});if(s.setScale(i.upem,i.upem),this.#o.size>=this.#y){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:n.identity,blob:a,face:i,font:s,unitsPerEm:i.upem};return this.#o.set(n.identity,d),this.#d?.(Object.freeze({kind:"created",identity:n.identity})),d}#R(n,t,r){let o=JSON.stringify([n.identity,n.unitsPerEm,r,t]),a=this.#a.get(o);if(a)return this.#a.delete(o),this.#a.set(o,a),this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#i})),a.outline;this.#e?.onOutlinePathCall?.();let i=n.font.glyphToPath(t),s=md(i);if(s>this.#m)throw new Me("outlineOverLimit",{limit:this.#m,actual:s});let l=Object.freeze({path:i,unitsPerEm:n.unitsPerEm}),d=QS(o,i);if(d>this.#g)return this.#e?.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.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#i}));}return this.#a.set(o,{outline:l,bytes:d}),this.#i+=d,this.#e?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#i})),l}#x(n){if(n.length>this.#u)throw new Me("textOverLimit",{limit:this.#u,actual:n.length});let t=0;for(let r=0;r<n.length;){let o=n.codePointAt(r);if(r+=o>65535?2:1,t+=1,t>this.#f)throw new Me("codepointsOverLimit",{limit:this.#f,actual:t})}}shape(n){if(!this.#c)throw new Me("disposed");if(Qr(n.environment.font),n.environment.font.byteLength>this.#s)throw new Me("fontOverLimit",{limit:this.#s,actual:n.environment.font.byteLength});this.#x(n.text);let t=eR(n.text);if(t>this.#l)throw new Me("shapedRunOverLimit",{limit:this.#l,actual:t});let r=hr(n.environment),o=JSON.stringify([n.text,n.fontSizeHalfPoints,n.bidiLevel,fd(r)]),a=this.#t.get(o);if(a)return this.#t.delete(o),this.#t.set(o,a),this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==sa.name||r.shapingLibrary.version!==sa.version)throw new Me("shapingLibraryMismatch");if(r.normalization!=="none")throw new Me("unsupportedNormalization");if(!Number.isSafeInteger(n.bidiLevel)||n.bidiLevel<0||(n.bidiLevel&1)===1!=(r.direction==="rtl"))throw new Me("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new Me("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new Me("unsupportedFallback");let i=wi(r.font),s=Pi(r.font);if([...NS].some(d=>s.has(d)))throw new Me("unsupportedColorFont");let l=n.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.#n.Direction.RTL:this.#n.Direction.LTR),f.setScript(r.script),f.setLanguage(r.language),f.setClusterLevel(this.#n.ClusterLevel.MONOTONE_CHARACTERS);let p=Object.entries(r.features).map(([C,k])=>new this.#n.Feature(C,k));this.#e?.onShapeCall?.(),this.#n.shape(u,f,p);let m=f.getGlyphInfosAndPositions();if(m.length>this.#p)throw new Me("glyphOverLimit",{limit:this.#p,actual:m.length});let g=$S(c.upem,n.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),b=it(0),h=it(0),x=new Map,I=JSON.stringify(Object.entries(r.variationAxes).sort(([C],[k])=>C.localeCompare(k))),w=m.map(C=>{let k=g(C.xAdvance??0),z=g(C.yAdvance??0),F={id:C.codepoint,cluster:C.cluster,originX:b,originY:h,advanceX:k,advanceY:z,offsetX:g(C.xOffset??0),offsetY:g(C.yOffset??0),outline:x.get(C.codepoint)??(()=>{let y=this.#R(d,C.codepoint,I);return x.set(C.codepoint,y),y})()};return b=it(b+k),h=it(h+z),F}),O=u.hExtents(),M=Oi({text:l,direction:r.direction,bidiLevel:n.bidiLevel,glyphs:w,clusters:XS(l,w),fontSpans:w.length===0?[]:[{glyphStart:0,glyphEnd:w.length,font:r.font,fallbackIndex:null}],metrics:{ascent:g(O.ascender),descent:g(-O.descender),lineGap:g(O.lineGap)}},r),P=nR(M);if(P>this.#l)throw new Me("shapedRunOverLimit",{limit:this.#l,actual:P});let L=tR(o,P);if(L>this.#h)return this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),M;for(;this.#t.size>=this.#b||this.#r+L>this.#h;){let C=this.#t.keys().next().value;if(C===void 0)break;let k=this.#t.get(C);this.#t.delete(C),this.#r-=k.bytes,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#t.set(o,{run:M,bytes:L}),this.#r+=L,this.#e?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),M}catch(d){throw d instanceof Me?d:new Me("malformedFont",{diagnostic:d instanceof Error?d.message:"HarfBuzz shaping failed"})}}},rR=(e={})=>new pd(mS(),e);var te=(e,n,t)=>e>=n&&e<=t,Ci=class extends Error{name="UnsupportedScriptError";code="unsupportedScript";codePoint;constructor(n){super(`Unsupported Unicode script at U+${n.toString(16).toUpperCase()}`),this.codePoint=n;}},oR=e=>{if(te(e,65313,65338)||te(e,65345,65370))return {slot:"hAnsi",script:"Latn"};if(te(e,1424,1535)||te(e,64285,64335))return {slot:"cs",script:"Hebr"};if(te(e,1536,1791)||te(e,1872,1919)||te(e,2160,2207)||te(e,2208,2303)||te(e,64336,65023)||te(e,65136,65279)||te(e,126464,126719))return {slot:"cs",script:"Arab"};if(te(e,4352,4607)||te(e,11904,12351)||te(e,12352,12543)||te(e,12544,12687)||te(e,12784,12799)||te(e,13312,19903)||te(e,19968,40959)||te(e,44032,55215)||te(e,63744,64255)||te(e,65382,65437)||te(e,65440,65500)||te(e,131072,201551))return {slot:"eastAsia",script:"Hani"};if(te(e,2304,2431)||te(e,43232,43263))return {slot:"cs",script:"Deva"};if(te(e,2432,2559))return {slot:"cs",script:"Beng"};if(te(e,880,1023)||te(e,7936,8191))return {slot:"hAnsi",script:"Grek"};if(te(e,1024,1327)||te(e,7296,7311)||te(e,11744,11775)||te(e,42560,42655))return {slot:"hAnsi",script:"Cyrl"};if(te(e,3584,3711))return {slot:"cs",script:"Thai"};if(te(e,6016,6143)||te(e,6624,6655))return {slot:"cs",script:"Khmr"};if(te(e,768,879)||te(e,6832,6911)||te(e,7616,7679)||te(e,8400,8447)||te(e,8192,8303)||te(e,65056,65071)||e<=47||te(e,58,64)||te(e,91,96)||te(e,123,191)||e===5760||te(e,8192,11263)||te(e,65024,65039)||te(e,65280,65381)||te(e,65438,65439)||te(e,65501,65535)||te(e,126976,129791)||te(e,917760,917999))return null;if(e<=127)return {slot:"ascii",script:"Latn"};if(te(e,192,687)||te(e,7424,7551)||te(e,7552,7615)||te(e,7680,7935)||te(e,11360,11391)||te(e,42784,43007)||te(e,43824,43887))return {slot:"hAnsi",script:"Latn"};throw new Ci(e)};function aR(e,n,t){let r=[];for(let s=0;s<e.length;){let l=e.codePointAt(s),d=s+(l>65535?2:1);r.push({from:s,to:d,classified:oR(l)}),s=d;}let o=null;for(let s of r)s.classified?o=s.classified:o&&(s.classified=o);o=null;for(let s=r.length-1;s>=0;s-=1){let l=r[s];l.classified?o=l.classified:o&&(l.classified=o);}let a=[],i=r.every(({from:s})=>e.codePointAt(s)<=127)?"ascii":"hAnsi";for(let s of r){let l=t.levels[n+s.from]??0,d=(l&1)===1?"rtl":"ltr",c=s.classified??{slot:i,script:"Zyyy"},u=a.at(-1);u&&u.to===s.from&&u.bidiLevel===l&&u.slot===c.slot&&u.script===c.script?a[a.length-1]={...u,to:s.to}:a.push({from:s.from,to:s.to,direction:d,bidiLevel:l,script:c.script,slot:c.slot});}return a}var iR="und";function sR(){return typeof Intl.Segmenter=="function"}function lR(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error("Intl.Segmenter is required for deterministic grapheme segmentation (locale: und)");return e}function dR(){let e=new(lR())("und",{granularity:"grapheme"});return {segment(n){let t=[],r=0;for(let o of e.segment(n)){let a=o.index,i=a+o.segment.length;t.push({index:r,text:o.segment,utf16From:a,utf16To:i}),r+=1;}return t}}}var yd=dR(),bd=yd,Ep=0;function xd(){return Ep}var eo=null,br=null,Bi=null,ca=null;function Yn(e){if(eo===e&&br)return br;if(Bi===e&&ca){let t=ca;return Bi=eo,ca=br,eo=e,br=t,t}let n=bd.segment(e);return Bi=eo,ca=br,eo=e,br=n,n}function cR(e){bd=e,Fp();}function uR(){bd=yd,Fp();}function Fp(){Ep+=1,eo=null,br=null,Bi=null,ca=null,gd=null,Li=null,hd=0;}function fR(e){return Yn(e).length}var gd=null,Li=null,hd=0;function pR(e){if(gd===e&&Li)return {offsets:Li,count:hd};let n=Yn(e),t=new Int32Array(e.length+1);for(let r of n)for(let o=r.utf16From;o<r.utf16To&&o<e.length;o+=1)t[o]=r.index;return t[e.length]=n.length,gd=e,Li=t,hd=n.length,{offsets:t,count:n.length}}function Mi(e,n){let t=Math.max(0,Math.min(n,e.length)),{offsets:r}=pR(e);return r[t]}function mR(e,n){let t=Yn(e);if(t.length===0)return 0;let r=Math.max(0,Math.min(n,t.length));return r>=t.length?e.length:t[r].utf16From}function Sd(e){let n=new Set([0,e.text.length]);for(let r of Yn(e.text))n.add(r.utf16From),n.add(r.utf16To);let t=new Set([0,e.text.length]);for(let r of e.clusters)t.add(r.textStart),t.add(r.textEnd);return [...n].filter(r=>t.has(r)).sort((r,o)=>r-o)}function Ei(e,n){return Sd(e).includes(n)}function gR(e,n){return Ei(e,n)}function hR(e,n,t){return t>=n&&Ei(e,n)&&Ei(e,t)}function yR(e){let n=Yn(e.text);return Sd(e).map(t=>t===e.text.length?n.length:n.findIndex(r=>r.utf16From===t))}var wd="und";function _p(){return typeof Intl.Segmenter=="function"}function bR(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${wd})`);return e}function Hp(){let e=new(bR())(wd,{granularity:"word"});return {segment(n){let t=[];for(let r of e.segment(n)){let o=r.index,a=o+r.segment.length;t.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return t}}}var xR=/^[\p{L}\p{N}']$/u,SR=/^\s$/u;function Np(e){return xR.test(e)}function Ap(e){return SR.test(e)}function Rd(e,n,t,r){let o=e[n],a=e[t-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function zp(e){let n=Yn(e);if(n.length===0)return [];let t=[],r=0;for(;r<n.length;){let o=n[r];if(Ap(o.text)){let a=r+1;for(;a<n.length&&Ap(n[a].text);)a+=1;t.push(Rd(n,r,a,false)),r=a;continue}if(Np(o.text)){let a=r+1;for(;a<n.length&&Np(n[a].text);)a+=1;t.push(Rd(n,r,a,true)),r=a;continue}t.push(Rd(n,r,r+1,false)),r+=1;}return t}function jp(){return {segment:zp}}function Gp(e={}){let n=e.isIntlAvailable??_p,t=e.createIntlBoundary??Hp,r=e.createFallbackBoundary??jp;if(!n())return r();try{return t()}catch{return r()}}var Dp;function Wp(){return Dp??=Gp(),Dp}function RR(e,n=Wp()){return n.segment(e)}function wR(e,n){return n.map(t=>({graphemeFrom:Mi(e,t.utf16From),graphemeTo:Mi(e,t.utf16To),wordLike:t.wordLike}))}var $p={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},vd=Object.keys($p),Xp=vd.filter(e=>$p[e]==="coarse-gate"),Fi=(e,n)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${n} must be a non-negative safe integer`)},no=(e,n)=>{if(e.trim().length===0)throw new TypeError(`${n} must not be blank`)},PR={resourceEpoch:Fi,configEpoch:Fi,extensionFingerprint:no,shapingHash:no,producerVersion:Fi},IR=(e,n)=>{PR[n](e[n],n);},to=e=>{for(let n of vd)IR(e,n);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},vR=(e,n)=>{let t=to(e),r=to(n),o=vd.filter(a=>t[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},Pd=e=>{let n=e.map(({key:t,fingerprint:r})=>(no(t,"resource dependency key"),no(r,"resource dependency fingerprint"),Object.freeze({key:t,fingerprint:r}))).sort((t,r)=>t.key<r.key?-1:t.key>r.key?1:0);for(let t=1;t<n.length;t+=1)if(n[t-1].key===n[t].key)throw new TypeError(`Duplicate resource dependency: ${n[t].key}`);return Object.freeze(n)},TR=e=>(Fi(e.revision,"revision"),no(e.dependencyFingerprint,"dependencyFingerprint"),no(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:Pd(e.resourceDependencies),...to(e)})),kR=(e,n)=>{let t=Pd(e),r=Pd(n),o=Math.max(t.length,r.length);for(let a=0;a<o;a+=1){let i=t[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 OR(e,n){if(e.dependencyFingerprint!==n.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==n.inputFingerprint)return {hit:false,reason:"input-changed"};let t=kR(e.resourceDependencies,n.resourceDependencies);if(t)return t;for(let r of Xp)if(e[r]!==n[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var Id=class{entries=new Map;get(n,t){let r=this.entries.get(n);if(!r)return {hit:false,reason:"absent"};let o=OR(r.provenance,t);return o||{hit:true,value:r.value,provenance:r.provenance}}set(n,t,r){this.entries.set(n,{value:t,provenance:TR(r)});}evictEpoch(n){let t=to(n),r=0;for(let[o,a]of this.entries){let i=a.provenance;Xp.some(s=>i[s]!==t[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(n,t){let r=to(n),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(l=>t.get(l.key)!==l.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function $e(e,n=false){return An(e.fragments,n)}var Vp=new WeakMap;function An(e,n=false){let t=Vp.get(e),r=n?"withRepeats":"withoutRepeats",o=t?.[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&&!n))for(let c of d.cells)i(c.blocks);}};return i(e),t||(t={},Vp.set(e,t)),t[r]=a,a}function Td(e){let n=[];for(let t of e.pages)for(let r of $e(t))n.push(...r.lines);return n}function CR(e){return e.anchoredDrawings??[]}var Yp=16;function ua(e,n){let t=o=>{if(o.kind==="table"){for(let a of o.rows)for(let i of a.cells)for(let s of i.blocks)t(s);return}for(let a of o.lines)for(let i of a.drawings??[])n(i);},r=(o,a)=>{if(!(a>Yp)){for(let i of o.anchoredDrawings??[])n(i),i.textboxStory&&r(i.textboxStory,a+1);for(let i of o.fragments)t(i);}};r(e,0);}function kd(e,n){let t=(r,o)=>{if(!(o>Yp)){for(let a of r.anchoredDrawings??[])a.textboxStory&&t(a.textboxStory,o+1);for(let a of An(r.fragments,true))n(a);}};t(e,0);}function Kp(e,n){let t=[];for(let r of e.pages)for(let o of $e(r))o.paragraphId===n&&t.push(o);return t.sort((r,o)=>r.fragmentIndex-o.fragmentIndex)}function fa(e,n,t,r){for(let o of r??Td(e)){let a=o.range.paragraphId===n?o.range.start:Number.NaN,i=o.range.paragraphId===n?o.range.end:Number.NaN;for(let s of o.spans)s.range.paragraphId===n&&(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===n&&(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)&&t>=a&&t<=i)return o}return null}function Ni(e){return e.contentControls??[]}function pa(e){if(e.length===0)return null;let n=1/0,t=1/0,r=-1/0,o=-1/0;for(let a of e)n=Math.min(n,a.x),t=Math.min(t,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height);return {x:n,y:t,width:r-n,height:o-t}}function Ai(e){let n=false,t=false;for(let r of e)(r==="contentLocked"||r==="sdtContentLocked")&&(n=true),(r==="sdtLocked"||r==="sdtContentLocked")&&(t=true);return n&&t?"sdtContentLocked":n?"contentLocked":t?"sdtLocked":"unlocked"}var ma=Object.freeze({width:612,height:792,margin:Object.freeze({top:72,right:72,bottom:72,left:72})});var Up=1,Di=1;function ro(e){let n=Math.max(e,1),t=3;if(n>=t){let i=n/3;if(i>=1)return {strokePt:i,gapPt:i,extentPt:n,insetPt:0}}let r=1,o=1,a=Math.max(n,t);return {strokePt:r,gapPt:o,extentPt:a,insetPt:(n-a)/2}}var BR=new Set(["double","triple","thinThickSmallGap","thickThinSmallGap","thinThickThinSmallGap","thinThickMediumGap","thickThinMediumGap","thinThickThinMediumGap","thinThickLargeGap","thickThinLargeGap","thinThickThinLargeGap","doubleWave"]);function LR(e){return BR.has(e)}function qp(e,n){return LR(e)?ro(n).extentPt:n}function Cd(e){let n=false;for(let t of e){if(t.localName!=="pageBreakBefore")continue;let r=t.attributes?.val;n=r===void 0||Hi(r);}return n}var Jp=31680/20,ha=12,Qp=3168,em=14,ao=Object.freeze({rule:"auto",value:240}),MR=132,ER=1584,nm=["top","left","bottom","right","between","bar"],FR=Object.freeze({}),NR=/^[0-9A-Fa-f]{6}$/,AR=new Set(["nil","none"]);function _i(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function Od(e,n){return !Number.isFinite(e)||e<=0?0:e>n?n:e}function Zp(e){let n=_i(e,true);return n===null?0:Od(Hc$1(Fc$1(n)),Jp)}function Hi(e){return e!=="0"&&e!=="false"&&e!=="off"}function DR(e){return e===void 0||e==="auto"?null:NR.test(e)?e.toUpperCase():null}function ga(e,n){return e.attributes.find(t=>t.localName===n)?.value}function dt(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function RO(e,n){let t=null;for(let r of e)r.localName===n&&(t={...t??{},...r.attributes??{}});return t}function Bd(e,n){let t=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&&(t=Zp(s)),l!==void 0&&(r=Zp(l));let d=i.attributes?.beforeAutospacing,c=i.attributes?.afterAutospacing;d!==void 0&&(o=Hi(d)),c!==void 0&&(a=Hi(c));}if(o||a){let i=n?.inList||n?.inTableCell?0:em;o&&(t=i),a&&(r=i);}return {before:t,after:r}}function Ld(e){let n,t;for(let a of e){if(a.localName!=="spacing")continue;let i=a.attributes?.lineRule;(i==="auto"||i==="exact"||i==="atLeast")&&(n=i);let s=a.attributes?.line;if(s!==void 0){let l=_i(s,true);l!==null&&(t=l);}}if(t===void 0)return ao;let r=n??"auto";if(r==="auto"){let a=t/240;return a>0?{rule:"auto",value:Math.min(a,MR)*240}:ao}let o=t/20;return o>0?{rule:r,value:Math.min(o,ER)}:ao}function Md(e,n,t){let r=e.rule==="auto"?n*(e.value/240):e.rule==="exact"?e.value:Math.max(n,e.value),o=r-n;return o<0?{height:r,baseline:Math.max(0,Math.min(t,r))}:e.rule==="exact"?{height:r,baseline:t+o/2}:{height:r,baseline:t}}function Ed(e){let n=false;for(let t of e){if(t.localName!=="contextualSpacing")continue;let r=t.attributes?.val;n=r===void 0||Hi(r);}return n}function oo(e){if(!e)return;let n=ga(e,"val");if(!n||AR.has(n))return;let t=_i(ga(e,"sz")),r=t===null?.5:Od(t/8,ha)||.5,o=_i(ga(e,"space")),a=o===null?0:Od(o,Qp),i=ga(e,"shadow"),s=i!==void 0&&i!=="0"&&i!=="false"&&i!=="off";return {val:n,color:DR(ga(e,"color")),widthPt:r,spacePt:a,...s?{shadow:true}:{}}}function tm(e){let n=oo(dt(e,"top")),t=oo(dt(e,"left")??dt(e,"start")),r=oo(dt(e,"bottom")),o=oo(dt(e,"right")??dt(e,"end")),a=oo(dt(e,"between")),i=oo(dt(e,"bar"));return {...n?{top:n}:{},...t?{left:t}:{},...r?{bottom:r}:{},...o?{right:o}:{},...a?{between:a}:{},...i?{bar:i}:{}}}function It(e){if(!e||e.kind==="textValue")return {};let n=dt(e,"pBdr");return n?tm(n):{}}function ya(e){let n=FR;for(let t of e){if(!t||t.kind==="textValue")continue;let r=dt(t,"pBdr");r&&(n=tm(r));}return n}function In(e){return qp(e.val,e.widthPt)}function Kt(e){return e?e.spacePt+In(e):0}function _R(e){return Kt(e)}function Fd(e){let n=[];for(let t of nm){let r=e[t];r&&n.push(`${t}:${r.val},${r.color??"auto"},${r.widthPt},${r.spacePt},${r.shadow?1:0}`);}return n.join("|")}function io(e,n){return Math.max(e,n)-n}function Nd(e,n,t,r){return t&&!r?0:io(e,n)}var HR=/^[0-9A-Fa-f]{6}$/;function zi(e){if(!(e===void 0||e==="auto"||e==="nil")&&HR.test(e))return e.toUpperCase()}function ba(e){if(e&&e.val!=="nil")return zi(e.fill)}function Ad(e){if(!e||e.localName!=="shd")return;let n={};for(let t of e.attributes)n[t.localName]=t.value;return ba(n)}function Dd(e){let n;for(let t of e)t.localName==="shd"&&(n=ba(t.attributes));return n}function xa(e,n,t){if(e.length===0)return;let r=e[0].box.y,o=e[e.length-1].box;return {x:n,y:r,width:t,height:Math.max(o.y+o.height-r,0)}}var zR=64,jR=31680,GR=720,WR=36,_d=new Map([["dot","."],["hyphen","-"],["underscore","_"],["heavy","_"],["middleDot","\xB7"]]),so=Object.freeze({stops:Object.freeze([]),defaultIntervalPt:36}),$R=new Map([["left","left"],["start","left"],["center","center"],["right","right"],["end","right"],["decimal","decimal"]]),XR=new Set(["dot","hyphen","underscore","heavy","middleDot"]);function Sa(e){return e.kind!=="textValue"}function ji(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Hd(e,n){for(let t of e.children)if(Sa(t)&&t.localName===n)return t}function rm(e){return e===void 0||!/^-?\d{1,9}$/.test(e)?null:Number(e)}function VR(e){return !Number.isFinite(e)||e<0?null:e>31680?31680:e}function om(e,n){if(!n)return;let t=0;for(let r of n.children){if(t>=128)break;if(t+=1,!Sa(r)||r.localName!=="tab")continue;let o=VR(rm(ji(r,"pos"))??NaN);if(o===null)continue;let a=ji(r,"val")??"left";if(a==="clear"){e.delete(o);continue}let i=$R.get(a);if(i===void 0||e.size>=64&&!e.has(o))continue;let s=ji(r,"leader");e.set(o,{alignment:i,...s!==void 0&&XR.has(s)?{leader:s}:{}});}}function am(e,n=36){let t=[...e.entries()].sort((o,a)=>o[0]-a[0]),r=[];for(let o=0;o<t.length&&o<64;o+=1){let[a,i]=t[o];r.push({positionPt:a/20,alignment:i.alignment,...YR(i)});}return {stops:Object.freeze(r),defaultIntervalPt:n}}function YR(e){return e.leader?{leader:e.leader}:{}}function zd(e){let n=new Map;for(let t of e)!t||!Sa(t)||om(n,Hd(t,"tabs"));return am(n)}function jd(e){if(!e||!Sa(e))return so;let n=new Map;return om(n,Hd(e,"tabs")),am(n)}function Ra(e,n){return n===void 0||!Number.isFinite(n)||n<=0||n===e.defaultIntervalPt?e:{stops:e.stops,defaultIntervalPt:n}}function KR(e){if(!e||!Sa(e))return 36;let n=Hd(e,"defaultTabStop");if(!n)return 36;let t=rm(ji(n,"val"));return t===null||t<=0||t>31680?36:t/20}function lo(e,n,t){let r=Math.max(n,t);for(let i of e.stops)if(i.positionPt>n)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((n+1e-9)/o)*o;return a<=n&&(a+=o),{positionPt:Math.min(a,r),alignment:"left"}}function Gd(e,n,t,r,o){let a=t;switch(e){case "center":a=t-r/2;break;case "right":a=t-r;break;case "decimal":a=t-o;break;default:a=t;}let i=a-n;return i>0?i:0}function xr(e){return `tabs(${e.stops.map(t=>`${t.alignment}@${Math.round(t.positionPt*1e3)}${t.leader?`/${t.leader}`:""}`).join(",")}|d${Math.round(e.defaultIntervalPt*1e3)})`}var Gi=4,im=4096,Ut=64,Vd=Object.freeze({hasPage:false,hasNumPages:false,hasSectionPages:false}),UR=/\s*\\\*\s*MERGEFORMAT\s*$/i;function co(e){if(e.length>rc$1)return null;let n=e.replace(/\s+/g," ").trim().toUpperCase();return n.length>rc$1?null:n.replace(UR,"").trim()}function Sr(e){let n=co(e);return n==="PAGE"||n==="NUMPAGES"||n==="SECTIONPAGES"?n:null}function vn(e,n){return gc$1(e,n)}function Rr(e){return hc$1(e)}function Yd(){return {nodes:0,exhausted:false}}function vt(e){return e.exhausted?false:(e.nodes+=1,e.nodes>im?(e.exhausted=true,false):true)}function Pa(){return {nesting:0,instruction:"",instructionOverflow:false,deletedInstruction:"",deletedInstructionOverflow:false,sawLiveInstruction:false,nestingOverflow:false,phase:"idle",inner:[]}}function wa(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 Wi(e){return e.sawLiveInstruction?{instruction:e.instruction,overflow:e.instructionOverflow}:{instruction:e.deletedInstruction,overflow:e.deletedInstructionOverflow}}function qR(e){return e.sawLive?{instruction:e.instruction,overflow:e.overflow}:{instruction:e.deletedInstruction,overflow:e.deletedOverflow}}function Ia(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>Gi?e.nestingOverflow=true:e.nesting>=2&&(e.inner[e.nesting-2]={instruction:"",overflow:false,deletedInstruction:"",deletedOverflow:false,sawLive:false,separated:false});}function uo(e){return e.nesting<2||e.nesting>Gi?null:e.inner[e.nesting-2]??null}function sm(e){if(e.nesting===1)return e.phase==="instruction";let n=uo(e);return n!==null&&!n.separated}function $d(e,n){if(!sm(e))return false;if(e.nesting===1)return n?!e.deletedInstructionOverflow:!e.instructionOverflow;let t=uo(e);return n?!t.deletedOverflow:!t.overflow}function lm(e){if(e.nesting===1){e.sawLiveInstruction=true;return}let n=uo(e);n&&(n.sawLive=true);}function Xd(e,n){if(e.nesting===1){n?(e.deletedInstructionOverflow=true,e.deletedInstruction=""):(e.instructionOverflow=true,e.instruction="");return}let t=uo(e);t&&(n?(t.deletedOverflow=true,t.deletedInstruction=""):(t.overflow=true,t.instruction=""));}function Wd(e){Xd(e,false),Xd(e,true);}function ZR(e,n,t=false){if(!$d(e,t))return;let r=uo(e);t||lm(e);let o=r?t?r.deletedInstruction:r.instruction:t?e.deletedInstruction:e.instruction;if(o.length+n.length>rc$1){Xd(e,t);return}r?t?r.deletedInstruction=o+n:r.instruction=o+n:t?e.deletedInstruction=o+n:e.instruction=o+n;}function va(e,n,t,r){if(!sm(e))return;let o=ic$1(n);if(o||lm(e),!$d(e,o))return;if(r>Ut){Wd(e);return}let a=[],i=n.kind==="textValue"?[]:n.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(!vt(t)){Wd(e);return}if(s.depth>Ut){Wd(e);return}if(s.node.kind==="textValue"){if(ZR(e,s.node.value,o),!$d(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 Ta(e){if(e.nesting===1){if(e.phase!=="instruction"||(e.phase="result",e.nestingOverflow))return null;let r=Wi(e);return r.overflow?null:Sr(r.instruction)}let n=uo(e);if(!n||n.separated)return null;n.separated=true;let t=qR(n);return t.overflow?null:Sr(t.instruction)}function ka(e){e.nesting>0&&(e.nesting-=1),e.nesting===0&&wa(e);}function dm(e){return e.phase==="instruction"&&e.nesting>=1}function cm(e){return e.phase==="result"&&e.nesting>=1}function Kd(e){let n=false,t=false,r=false,o=Yd(),a=Pa(),i=()=>n&&t&&r,s=p=>{p==="PAGE"?n=true:p==="NUMPAGES"?t=true:r=true;},l=false,d=[],c=(p,m)=>{if(p.kind!=="runProperties"){if(vn(p,"begin")){Ia(a),a.nestingOverflow&&(l=true);return}if(Rr(p)){va(a,p,o,m);return}if(vn(p,"separate")){let g=a.nesting,b=a.phase,h=Ta(a);if(l)return;h&&(g<=1||b==="result")&&d.push(h);return}if(vn(p,"end")&&(ka(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(!vt(o))return;if(c(g,m+1),(g.kind==="drawing"||g.kind==="generic")&&!Rr(g)&&"children"in g&&g.children.length>0){let b={...a,inner:a.inner.map(I=>({...I}))},h=l,x=d;d=[],f(g,m+1),Object.assign(a,b),l=h,d=x;}if(i()||o.exhausted)return}},f=(p,m)=>{if(!i()&&vt(o)&&!(m>Ut)&&p.kind!=="textValue"){if(p.kind==="paragraph"){wa(a),l=false,d.length=0;for(let g of p.children)if(f(g,m+1),i()||o.exhausted)return;wa(a),l=false,d.length=0;return}if(p.kind==="run"){u(p,m);return}if(jc$1(p)){let g=Sr(lc$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),!n&&!t&&!r?Vd:{hasPage:n,hasNumPages:t,hasSectionPages:r}}var JR=64,QR=64,ew=[{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 Tt(e){if(!Number.isFinite(e))return 1;let n=Math.trunc(e);return n<0?1:n>9999?9999:n}function qt(e){return String(Tt(e))}function um(e){let n=Tt(e);return n<10?`0${n}`:String(n)}function Ud(e){let n=Tt(e);n>3999&&(n=3999);let t="";for(let{value:r,glyph:o}of ew)for(;n>=r;)if(t+=o,n-=r,t.length>=64)return t.slice(0,64);return t||"I"}function fm(e){return Ud(e).toLowerCase()}function qd(e){let n=Tt(e),t="";for(;n>0&&t.length<8;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t||"A"}function pm(e){return qd(e).toLowerCase()}function nw(e){let n=Tt(e),t=n%100,r=n%10,o=t>=11&&t<=13?"th":r===1?"st":r===2?"nd":r===3?"rd":"th";return `${n}${o}`}function tw(e){return Tt(e).toString(16).toUpperCase()}function rw(e){let n=["*","\u2020","\u2021","\xA7"],t=Tt(e);if(t<=0)return n[0];let r=(t-1)%n.length,o=Math.min(Math.floor((t-1)/n.length)+1,ow);return n[r].repeat(o)}var ow=8,$i=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],aw=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function Xi(e){let n=Tt(e);if(n<20)return $i[n];if(n<100){let r=n%10;return aw[Math.floor(n/10)]+(r===0?"":`-${$i[r]}`)}if(n<1e3){let r=n%100;return `${$i[Math.floor(n/100)]} hundred${r===0?"":` ${Xi(r)}`}`}let t=n%1e3;return `${$i[Math.floor(n/1e3)]} thousand${t===0?"":` ${Xi(t)}`}`}function mm(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function iw(e){return mm(Xi(e))}var sw=new Map([["zero","zeroth"],["one","first"],["two","second"],["three","third"],["five","fifth"],["eight","eighth"],["nine","ninth"],["twelve","twelfth"]]);function lw(e){let n=sw.get(e);return n!==void 0?n:e.endsWith("y")?`${e.slice(0,-1)}ieth`:`${e}th`}function dw(e){let n=Xi(e),t=Math.max(n.lastIndexOf(" "),n.lastIndexOf("-")),r=t<0?"":n.slice(0,t+1);return mm(r+lw(n.slice(t+1)))}function kt(e,n){switch(e){case "decimal":return qt(n);case "decimalZero":return um(n);case "upperRoman":return Ud(n);case "lowerRoman":return fm(n);case "upperLetter":return qd(n);case "lowerLetter":return pm(n);case "ordinal":return nw(n);case "cardinalText":return iw(n);case "ordinalText":return dw(n);case "hex":return tw(n);case "chicago":return rw(n);case "numberInDash":return `- ${qt(n)} -`;case "none":case "bullet":return "";default:return qt(n)}}function Zd(e,n,t){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=t[l]??"decimal",c=n[l]??1,u=d==="bullet"?"":kt(d,c);for(let f of u){if(o.length>=64)break;o+=f;}a+=1;continue}}o+=i;}return o}var Yi="0";function Qd(e,n){if(!Number.isFinite(e)||e<0)return "";let t=Math.floor(e),r=n&&n.length>0?n:"decimal";if(r==="none"||r==="bullet")return qt(t);let o=kt(r,t);return o.length>0?o:qt(t)}function Ot(e,n){if(e==="PAGE")return Qd(n.pageNumber,n.format);let t=e==="NUMPAGES"?n.pageCount:n.sectionPageCount??n.pageCount;return !Number.isFinite(t)||t<0?"":qt(Math.floor(t))}function Zt(e){return e.hasPage||e.hasNumPages||e.hasSectionPages}function ec(e,n=Vd){if(!e||!Zt(n))return "";let t=[];return n.hasPage&&(t.push(`p${e.pageNumber}`),e.format&&t.push(`f${e.format}`)),n.hasNumPages&&t.push(`n${e.pageCount}`),n.hasSectionPages&&t.push(`s${e.sectionPageCount??e.pageCount}`),`|fld:${t.join("/")}`}function fo(e,n,t,r){let o=false,a=e.map((i,s)=>{let l=n+s,d=i.pageFieldSource;return d&&d.pageNumber===l&&d.sectionPageCount===t&&d.format===r?i:(o=true,{...i,pageFieldSource:{pageNumber:l,sectionPageCount:t,...r?{format:r}:{}}})});return o?a:e}function cw(e){for(let n of e.spans)if(n.fieldAtom?.pageField)return true;return false}function gm(e){if(e.kind==="paragraph"){for(let n of e.lines)if(cw(n))return true;return false}for(let n of e.rows)for(let t of n.cells)for(let r of t.blocks)if(gm(r))return true;return false}function nc(e,n){let t=n,r=false;for(let o of e)t=Math.max(t,o.box.y+o.box.height),!r&&gm(o)&&(r=true);return {usedBottom:t,hasBodyPageFields:r}}function uw(e,n){let t=null;for(let r=0;r<e.spans.length;r+=1){let o=e.spans[r],a=o.fieldAtom?.pageField?.kind;if(!a)continue;let i=Ot(a,n);i!==o.text&&(t||(t=e.spans.slice()),t[r]={...o,text:i});}return t?{...e,spans:t}:e}function hm(e,n){let t=null;for(let r=0;r<e.length;r+=1){let o=e[r],a=o;if(o.kind==="paragraph"){let i=null;for(let s=0;s<o.lines.length;s+=1){let l=o.lines[s],d=uw(l,n);d!==l&&(i||(i=o.lines.slice()),i[s]=d);}i&&(a={...o,lines:i});}else {let i=null;for(let s=0;s<o.rows.length;s+=1){let l=o.rows[s],d=null;for(let c=0;c<l.cells.length;c+=1){let u=l.cells[c],f=hm(u.blocks,n);f!==u.blocks&&(d||(d=l.cells.slice()),d[c]={...u,blocks:f});}d&&(i||(i=o.rows.slice()),i[s]={...l,cells:d});}i&&(a={...o,rows:i});}a!==o&&(t||(t=e.slice()),t[r]=a);}return t??e}var Vi=new WeakMap;function fw(e,n){return e.pageNumber===n.pageNumber&&e.pageCount===n.pageCount&&(e.sectionPageCount??e.pageCount)===(n.sectionPageCount??n.pageCount)&&e.format===n.format}function tc(e,n,t){let r=Vi.get(e);r&&Vi.set(n,{context:r.context,projector:r.projector,dy:r.dy+t});}var Jd=new WeakMap;function Jt(e){let n=e.pages.length;if(n===0)return e;let t=false,r=e.pages.map(o=>{let a=Jd.get(o);if(a&&a.pageCount===n)return a.result!==o&&(t=true),a.result;let i=o.pageFieldSource,s={pageNumber:i?.pageNumber??o.index+1,pageCount:n,sectionPageCount:i?.sectionPageCount??n,...i?.format?{format:i.format}:{}},l=p=>{if(!p)return p;let m=p.pageFieldProjector,g=0;if(!m){let O=Vi.get(p);if(!O||fw(O.context,s))return p;m=O.projector,g=O.dy;}t=true;let b=m(s),{pageFieldProjector:h,box:x,...I}=b,w={...I,box:g===0?x:{...x,y:x.y+g}};return Vi.set(w,{context:s,projector:m,dy:g}),w},d=l(o.header),c=l(o.footer),u=o.hasBodyPageFields===false?o.fragments:hm(o.fragments,s);if(d===o.header&&c===o.footer&&u===o.fragments)return Jd.set(o,{pageCount:n,result:o}),o;u!==o.fragments&&(t=true);let f={...o,...d!==void 0?{header:d}:{},...c!==void 0?{footer:c}:{},...u!==o.fragments?{fragments:u}:{}};return Jd.set(o,{pageCount:n,result:f}),f});return t?{revision:e.revision,pages:r}:e}var pw=`
2
+ \r`,mw=/[ \t\n\r]*\\\*[ \t\n\r]*(?:"[^"]*"|[^ \t\n\r"\\]+)?[ \t\n\r]*$/;function ym(e,n){let t=n;for(;t<e.length&&pw.includes(e[t]);)t+=1;return t}function bm(e,n){if(e[n]==='"'){let r=n+1;for(;r<e.length&&e[r]!=='"';)r+=1;return r<e.length?r+1:r}let t=n;for(;t<e.length&&!`
3
+ \r"`.includes(e[t]);)t+=1;return t}function Ki(e){if(e.length===0||e.length>256)return null;let n=ym(e,0);if(e[n]==='"')return null;let t=bm(e,n),r=e.slice(n,t).toUpperCase();if(r!=="MACROBUTTON"&&r!=="GOTOBUTTON")return null;let o=ym(e,t);if(o>=e.length)return null;let a=bm(e,o),i=e.slice(a).trim();for(;;){let s=i.replace(mw,"").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 xm=Object.freeze({TITLE:"title",AUTHOR:"creator",SUBJECT:"subject",KEYWORDS:"keywords",LASTSAVEDBY:"lastModifiedBy",COMMENTS:"description"}),gw=/\s*\\[A-Z*@#!]\s*(?:"[^"]*"|[^\s"\\]+)?\s*$/;function hw(e){let n=e;for(;;){let t=n.replace(gw,"").trimEnd();if(t===n)return n;n=t;}}function yw(e){let n=e.trimStart();if(n.length===0)return null;if(n[0]==='"'){let o=n.indexOf('"',1),a=o===-1?n.slice(1):n.slice(1,o);return a.length>0?a:null}let t=n.search(/\s/),r=t===-1?n:n.slice(0,t);return r.length>0?r:null}function Ui(e){let n=co(e);if(n===null||n.length===0)return null;let t=hw(n),r=xm[t];if(r)return {property:r};if(!t.startsWith("DOCPROPERTY"))return null;let o=t.slice(11);if(o.length===0||!/^\s/.test(o))return null;let a=yw(o);if(a===null)return null;let i=xm[a];return i?{property:i}:null}function qi(e,n){if(!n)return null;let t=n[e.property];return t!==void 0&&t.length>0?t:null}var bw=rc$1,xw=2048,Sw=256;function Rw(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
4
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
5
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}var ww=new Set(["\\l","\\o","\\t","\\m","\\n","\\*","\\#","\\@"]);function Zi(e){if(e.length===0||e.length>bw)return null;let n=Rw(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="HYPERLINK")return null;let r=null,o=false,a=null,i=false,s=null,l=false;for(let d=1;d<n.length;d+=1){let c=n[d];if(!c.quoted&&c.value.startsWith("\\")){let u=c.value.toLowerCase();if(!ww.has(u))continue;let f=n[d+1];if(!f||!f.quoted&&f.value.startsWith("\\"))continue;d+=1;let p=f.value.length>0&&f.value.length<=Sw;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<=xw&&(r=c.value));}return r===null&&a===null?null:{target:r,anchor:a,tooltip:s}}function Oa(e){if(e.kind==="text"||e.kind==="deletedText"){let n="";for(let t of e.children)t.kind==="textValue"&&(n+=t.value);return n}return e.kind==="tab"?" ":e.kind==="hardBreak"?$b$1(e):""}function po(e){if(!e||e.kind==="textValue")return [];let n=[];for(let t of e.children){if(t.kind==="textValue")continue;let r={};for(let o of t.attributes)r[o.localName]=o.value;n.push(Object.keys(r).length>0?{localName:t.localName,attributes:r}:{localName:t.localName});}return n}function Ji(e,n,t){let r=po(e.kind==="run"?e.children.find(o=>o.kind==="runProperties"):void 0);return t?[...t(n,r)]:n.length===0?r:[...n,...r]}var ct=Object.freeze({fontFamily: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}),Pw=/^[0-9A-Fa-f]{6}$/;function Qt(e){let n=e.attributes?.val;return n===void 0||!(n==="0"||n==="false"||n==="off")}function Ca(e,n=false){return e===void 0||!(n?/^-?\d{1,7}$/:/^\d{1,7}$/).test(e)?null:Number(e)}function Sm(e){return e===void 0||e==="auto"?null:Pw.test(e)?e.toUpperCase():null}function Rm(e,n){return e==="minorAscii"||e==="minorHAnsi"?n.minor:e==="majorAscii"||e==="majorHAnsi"?n.major:null}function Ee(e,n){let t={...ct};for(let r of e)switch(r.localName){case "rFonts":{let o=r.attributes,i=(n?Rm(o?.asciiTheme,n)??Rm(o?.hAnsiTheme,n):null)??o?.ascii??o?.hAnsi;i&&i.length<=128&&(t.fontFamily=i);break}case "sz":{let o=Ca(r.attributes?.val);o!==null&&o>0&&(t.fontSizePt=o/2);break}case "color":{t.color=Sm(r.attributes?.val);break}case "b":t.bold=Qt(r);break;case "i":t.italic=Qt(r);break;case "u":{let o=r.attributes?.val??"single";t.underline=o==="none"||!Qt(r)?null:{variant:o,color:Sm(r.attributes?.color)};break}case "strike":t.strike=Qt(r);break;case "dstrike":t.doubleStrike=Qt(r);break;case "highlight":{let o=r.attributes?.val;t.highlight=o&&o!=="none"?o:null;break}case "shd":{t.shading=ba(r.attributes)??null;break}case "vertAlign":{let o=r.attributes?.val;o==="superscript"||o==="subscript"?t.verticalAlign=o:o==="baseline"&&(t.verticalAlign="baseline");break}case "position":{let o=Ca(r.attributes?.val,true);o!==null&&(t.baselineShiftPt=o/2);break}case "caps":t.caps=Qt(r);break;case "smallCaps":t.smallCaps=Qt(r);break;case "spacing":{let o=Ca(r.attributes?.val,true);o!==null&&(t.characterSpacingPt=o/20);break}case "w":{let o=Ca(r.attributes?.val);o!==null&&o>0&&(t.horizontalScalePercent=o);break}case "kern":{let o=Ca(r.attributes?.val);o!==null&&(t.kerningMinPt=o/2);break}case "vanish":t.hidden=Qt(r);break;}return t}function er(e,n){return n.caps?e.toUpperCase():e}function Dn(e,n,t){return t.measure(er(e,n),n)}function Iw(e,n){return e.fontFamily===n.fontFamily&&e.fontSizePt===n.fontSizePt&&e.color===n.color&&e.bold===n.bold&&e.italic===n.italic&&e.strike===n.strike&&e.doubleStrike===n.doubleStrike&&e.highlight===n.highlight&&e.shading===n.shading&&e.verticalAlign===n.verticalAlign&&e.baselineShiftPt===n.baselineShiftPt&&e.caps===n.caps&&e.smallCaps===n.smallCaps&&e.characterSpacingPt===n.characterSpacingPt&&e.horizontalScalePercent===n.horizontalScalePercent&&e.kerningMinPt===n.kerningMinPt&&e.hidden===n.hidden&&e.underline?.variant===n.underline?.variant&&e.underline?.color===n.underline?.color}function rc(e){return e.verticalAlign==="superscript"?e.baselineShiftPt+e.fontSizePt*.33:e.verticalAlign==="subscript"?e.baselineShiftPt-e.fontSizePt*.16:e.baselineShiftPt}var vw=new Map([[167,"\u2663"],[168,"\u2666"],[169,"\u2665"],[170,"\u2660"],[174,"\u2192"],[176,"\xB0"],[180,"\xD7"],[183,"\u2022"],[222,"\u21D2"]]),wm=new Map([[108,"\u25CF"],[110,"\u25A0"],[111,"\u25A1"],[167,"\u25AA"],[216,"\u27A2"],[252,"\u2714"],[253,"\u2718"]]),Pm=new Map([[167,"\u25AA"],[183,"\u2022"]]),Im=new Map([["symbol",vw],["wingdings",wm],["wingdings 2",Pm],["wingdings 3",Pm],["webdings",wm]]),Tw=64;function Ba(e){return !e||e.length>Tw?false:Im.has(e.toLowerCase())}function mo(e,n,t){if(e.length===0||!Ba(n))return e;let r=Im.get(n.toLowerCase());if(t?.(n)===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 nr=61440,La=61695,oc=128;function go(e){return e.kind==="generic"&&e.namespaceUri===da$1&&e.localName==="sym"}function vm(e,n){if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes)if(t.localName===n&&(t.namespaceUri===da$1||t.namespaceUri===""))return t.value}}function kw(e){return !e||e.length>4||!/^[0-9A-Fa-f]{1,4}$/.test(e)?null:Number.parseInt(e,16)}function Qi(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 ho(e){if(!go(e))return null;let n=kw(vm(e,"char"));if(n===null)return null;let t=vm(e,"font"),r=t&&t.length<=oc?t:null,o=Ba(r),a=o&&n<=255&&n+nr<=La?n+nr:n;if(o&&a>=nr&&a<=La){let i=mo(String.fromCodePoint(a),r),s=i.codePointAt(0)<nr;return {text:i,font:r,unicode:s}}return Qi(n)?{text:String.fromCodePoint(n),font:r,unicode:n<57344||n>63743}:null}function ac(e,n,t){if(!n.font)return {props:e,style:Ee(e,t)};let r=[...e,{localName:"rFonts",attributes:{ascii:n.font,hAnsi:n.font}}];return {props:r,style:Ee(r,t)}}var Ow=256,Cw=9;function Bw(e){let n=[],t=0;for(;t<e.length;){let r=e[t];if(r===" "||r===" "||r===`
6
+ `||r==="\r"){t+=1;continue}if(r==='"'){let a=t+1;for(;a<e.length&&e[a]!=='"';)a+=1;n.push({value:e.slice(t+1,a),quoted:true}),t=a<e.length?a+1:a;continue}let o=t;for(;o<e.length&&!`
7
+ \r"`.includes(e[o]);)o+=1;n.push({value:e.slice(t,o),quoted:false}),t=o;}return n}function Lw(e){if(e.quoted)return null;let n=e.value;if(n.length===0||n.length>Cw)return null;let t;if(n.startsWith("0x")||n.startsWith("0X")){let r=n.slice(2);if(!/^[0-9A-Fa-f]{1,6}$/.test(r))return null;t=Number.parseInt(r,16);}else {if(!/^\d{1,7}$/.test(n))return null;t=Number.parseInt(n,10);}return t>1114111||t>=55296&&t<=57343?null:t}function es(e){if(e.length===0||e.length>Ow)return null;let n=Bw(e);if(n.length<2)return null;let t=n[0];if(t.quoted||t.value.toUpperCase()!=="SYMBOL")return null;let r=Lw(n[1]);if(r===null)return null;let o=null,a=null,i=false;for(let s=2;s<n.length;s+=1){let l=n[s];if(l.quoted||!l.value.startsWith("\\"))continue;let d=l.value.toLowerCase();if(d==="\\f"){let c=n[s+1];c&&c.value.length>0&&c.value.length<=oc&&(c.quoted||!c.value.startsWith("\\"))&&(o=c.value,s+=1);continue}if(d==="\\s"){let c=n[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 ns(e,n,t){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?[...n,...r]:n,a=Ee(o,t);if(e.unicode)return Qi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null;let i=e.font??a.fontFamily;if(Ba(i)){let s=e.code<=255&&e.code+nr<=La?e.code+nr:e.code;if(s>=nr&&s<=La)return {text:mo(String.fromCodePoint(s),i),props:o,style:a}}return Qi(e.code)?{text:String.fromCodePoint(e.code),props:o,style:a}:null}function ts(){let e=null,n=0,t=false,r=false,o=()=>{e=null,n=0,t=false,r=false;};return {get active(){return e!==null},onSeparate(a,i){e===null&&a!==null&&(e=a,n=i,t=false,r=false);},onEnd(a,i){if(e===null||a>n)return null;let s=a===n,d=s&&i&&!(t&&!r)?Ot(e,i):"";return o(),s?d:null},reset:o,noteResult(a){t=true,a&&(r=true);}}}var je="all-markup",os=Object.freeze([]),Mw=32,Ew={revisionInsert:"insert",revisionDelete:"delete",revisionMoveFrom:"moveFrom",revisionMoveTo:"moveTo"};function Ct(e,n){for(let t of e.attributes)if(t.localName===n&&t.namespaceUri===e.namespaceUri&&(t.kind==="wmlVal"||t.kind==="genericExtension"||t.kind==="xmlSpace"))return t.value}function yo(e){if(e.kind==="textValue")return null;let n=Ew[e.kind];if(n===void 0)return null;let t=Ct(e,"date");return {kind:n,id:Ct(e,"id")??"",author:Ct(e,"author")??"",...t===void 0?{}:{date:t},nodeId:e.id}}function bo(e,n){return e.length===0?[n]:[...e,n]}function wr(e){return e.kind!=="textValue"&&ka$1(e.kind)}var xo=Mw;function Te(e,n){if(n==="all-markup"||e.length===0)return true;for(let t of e)if(n==="proposed"?t.kind==="delete"||t.kind==="moveFrom":t.kind==="insert"||t.kind==="moveTo")return false;return true}function So(e){if(e.kind==="textValue")return rs;let n=e.children.find(o=>o.kind==="paragraphProperties");if(!n||n.kind==="textValue")return rs;let t=n.children.find(o=>o.kind==="runProperties");if(!t||t.kind==="textValue")return rs;let r=[];for(let o of t.children){if(o.kind==="textValue"||o.namespaceUri!==da$1)continue;let a=Fw[o.localName];if(a===void 0)continue;let i=Ct(o,"date");r.push({kind:a,id:Ct(o,"id")??"",author:Ct(o,"author")??"",...i===void 0?{}:{date:i},nodeId:o.id});}return r.length>0?r:rs}var Fw={ins:"insert",del:"delete",moveFrom:"moveFrom",moveTo:"moveTo"};function Ma(e){if(e.kind==="textValue")return null;let n=e.children.find(r=>r.kind==="paragraphProperties");if(!n||n.kind==="textValue")return null;let t=n.children.find(r=>r.kind==="runProperties");if(!t||t.kind==="textValue")return null;for(let r of t.children){if(r.kind==="textValue"||r.namespaceUri!==da$1||r.localName!=="rPrChange")continue;let o=Ct(r,"date");return {kind:"format",id:Ct(r,"id")??"",author:Ct(r,"author")??"",...o===void 0?{}:{date:o},nodeId:r.id}}return null}var rs=Object.freeze([]);function ic(e){return e.find(n=>Tm(n))??e[0]}function Tm(e){return e.kind==="delete"||e.kind==="moveFrom"}function as(e,n){let t=ic(e);return {...t?{markRevisions:e,markRevision:t}:{},...n?{markFormatRevision:n}:{}}}function Nw(e){return ic(So(e))??null}function Aw(e){for(let n of e){if(n.localName!=="rPrChange"&&n.localName!=="pPrChange")continue;let t=n.attributes??{},r=t.date;return {kind:"format",id:t.id??"",author:t.author??"",...r===void 0?{}:{date:r},nodeId:""}}return null}function Kn(e){return e.some(n=>n.kind==="delete"||n.kind==="moveFrom")}function Dw(e){let{simple:n,depth:t,pageContext:r,budget:o,revisions:a,displayMode:i,inheritedRunProperties:s,cascadeRuns:l,themeFonts:d}=e,c="",u,f,p=false,m=Pa(),g=ts(),b=(x,I)=>{u||(u=x,f=I);},h=(x,I,w)=>{if(!(x.kind==="textValue"||I>Ut)){for(let O of x.children)if(O.kind!=="textValue"){if(!vt(o))return;if(O.kind==="run"){let M=Ji(O,s,l),P=Ee(M,d);for(let L of O.children){if(L.kind==="runProperties")continue;if(vn(L,"begin")){Ia(m),m.nesting===1&&g.reset();continue}if(Rr(L)){va(m,L,o,I+1);continue}if(vn(L,"separate")){let y=m.nesting,ee=m.phase,v=Ta(m);(y===1||ee==="result"&&!m.nestingOverflow)&&g.onSeparate(r?v:null,y);continue}if(vn(L,"end")){let y=g.onEnd(m.nesting,r);y!==null&&(c+=y),ka(m);continue}if(oc$1(L))continue;if(go(L)){if(Te(w,i)&&(p=true),g.active){g.noteResult(!P.hidden&&Te(w,i));continue}let y=ho(L);if(!y?.unicode||P.hidden||!Te(w,i))continue;b(M,P),c+=y.text;continue}let C=Oa(L);if(C.length===0)continue;let k=Kn(w),z=!Te(w,i)||L.kind==="deletedText"&&!k;z||(p=true);let F=P.hidden||z;if(g.active){g.noteResult(!F),F||b(M,P);continue}F||(b(M,P),c+=C);}continue}if(jc$1(O)){let M=g.active?null:Sr(lc$1(O)??"");if(M&&r){if(!Te(w,i))continue;let P=c.length;h(O,I+1,w),c=c.slice(0,P),c+=Ot(M,r);continue}h(O,I+1,w);continue}if(O.kind==="hyperlink"){h(O,I+1,w);continue}if(wr(O)&&w.length<xo){let M=yo(O);h(O,I+1,M?bo(w,M):w);continue}h(O,I+1,w);}}};return h(n,t,a),{text:c,resultProps:u,resultStyle:f,sawResultContent:p}}function km(e){let{simple:n,pageContext:t,inheritedRunProperties:r,themeFonts:o}=e,a=Dw(e),i=lc$1(n)??"",s=a.resultProps??r,l=Sr(i);if(l&&t){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:Ot(l,t),props:s,style:g}}if(l&&e.bodyPageFields&&!t&&a.text.length===0&&!a.sawResultContent){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:Yi,props:s,style:g,pageField:{kind:l}}}let d=es(i);if(d){let g=ns(d,s,o);if(g)return g.style.hidden?null:{text:g.text,props:g.props,style:g.style}}let c=a.text.length===0&&!a.sawResultContent;if(c){let g=Ui(i);if(g){let b=qi(g,e.documentProperties);if(b!==null){let h=a.resultStyle??Ee(r,o);return h.hidden?null:{text:b,props:s,style:h}}}}let u=c?Ki(i):null;if(u){let g=a.resultStyle??Ee(r,o);return g.hidden?null:{text:u.display,props:s,style:g}}if(a.text.length===0)return null;let f=a.resultStyle??Ee(r,o);if(f.hidden)return null;let p=e.currentLink?null:Zi(i),m=p?e.projectFieldLink?.(p)??null:null;return {text:a.text,props:s,style:f,...m?{link:m}:{}}}var _w="\u2612",Hw="\u2610";function zw(e){let n=co(e);return n==="FORMCHECKBOX"?"checkbox":n==="FORMDROPDOWN"?"dropdown":null}function sc(e,n){e.symbolSpec=es(n),!e.symbolSpec&&(e.linkSpec=Zi(n),!e.linkSpec&&(e.formSpec=zw(n),!e.formSpec&&(e.buttonSpec=Ki(n),!e.buttonSpec&&(e.docPropertySpec=Ui(n)))));}function Om(e,n){if(e.formSpec==="checkbox"){if(e.formData?.kind!=="checkbox")return null;let t=e.formData.checked?_w:Hw;if(e.formData.sizeHalfPoints===null)return {text:t,props:e.props,style:e.style};let r=[...e.props,{localName:"sz",attributes:{val:String(e.formData.sizeHalfPoints)}}];return {text:t,props:r,style:Ee(r,n)}}if(e.formSpec==="dropdown"){if(e.cachedText.length>0||e.sawResultContent||e.formData?.kind!=="dropdown")return null;let t=e.formData.entries[e.formData.selectedIndex]??"";return t.length===0?null:{text:t,props:e.props,style:e.style}}return null}function Cm(e,n){if(e.symbolSpec){let r=ns(e.symbolSpec,e.props,n.themeFonts);if(r)return {text:r.text,props:r.props,style:r.style}}let t=Om(e,n.themeFonts);if(t)return {text:t.text,props:t.props,style:t.style};if(e.kind&&n.pageContext)return {text:Ot(e.kind,n.pageContext),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&&n.bodyPageFields)return {text:Yi,props:e.props,style:e.style,pageField:{kind:e.kind}};if(e.docPropertySpec){let r=qi(e.docPropertySpec,n.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 tr(e,n,t){if(t<=n)return;let r=e[e.length-1];if(r&&r.end>=n){r.end=Math.max(r.end,t);return}e.push({start:n,end:t});}var jw=new Set(["left","center","right"]),Gw=new Set(["margin","indent","leftMargin"]),Ww=new Set(["dot","hyphen","underscore","middleDot"]);function Bm(e){if(e.kind==="textValue"||e.localName!=="ptab"||e.namespaceUri!==da$1)return null;let n="left",t="margin",r;for(let o of e.attributes)o.namespaceUri===da$1&&(o.localName==="alignment"?n=o.value:o.localName==="relativeTo"?t=o.value:o.localName==="leader"&&(r=o.value));return {alignment:jw.has(n)?n:"left",relativeTo:Gw.has(t)?t:"margin",...r!==void 0&&Ww.has(r)?{leader:r}:{}}}function Lm(e){return e.kind==="drawing"||Wa$1(e)}function Mm(e){let{node:n,layout:t,revisions:r,displayMode:o}=e,a=t.projectionForAtom?.(n.id)??(n.kind==="drawing"?t.project(n):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=Kn(r),s=e.hiddenRun||!Te(r,o);return a.hidden||s?a.hidden?{recordDeleted:i,emit:true}:{recordDeleted:i,emit:false}:{recordDeleted:i,emit:true,extras:{inlineDrawing:Object.freeze({drawingNodeId:n.id,ownerPartName:t.ownerPartName,projection:a,resource:t.resourceOf(a)})}}}Object.freeze({marks:Object.freeze(new Map)});function Pr(e,n){return kd$1(e,n)}function lc(e,n){if(!Bd$1(e))return null;if(rd(e)||sd$1(e))return {text:"",projected:true,kind:null,noteId:null};let t=pd$1(e),r=xd$1(e)??yd$1(e);if(!r)return null;let o=ud$1(e),a=o!==null?Pr(r,o):t?void 0:n?.activeNoteKey,i=o!==null?o:a?$w(a,r)??null:null,s=a,l=s!==void 0?t?"to-note":"to-body":void 0,d={projected:true,kind:r,noteId:i,...l?{nav:l}:{},...s?{scopeId:s}:{}};if(t&&o!==null&&zd$1(e))return {text:"",...d};if(!n||!a)return {text:"",...d};let c=n.marks.get(a);return c==null?{text:"",...d}:n.reservedMarkText&&n.reservedMarkText.length>0?{text:c,measureText:n.reservedMarkText,...d}:{text:c,...d}}function $w(e,n){let t=`${n}:`;if(!e.startsWith(t))return null;let r=e.slice(t.length);if(!/^-?\d+$/.test(r))return null;let o=Number(r);return Number.isSafeInteger(o)?o:null}function Fm(e){return pd$1(e)||qd$1(e)||rd(e)||sd$1(e)}function Xw(e){let n=2166136261;for(let t=0;t<e.length;t+=1)n^=e.charCodeAt(t),n=Math.imul(n,16777619);return (n>>>0).toString(16).padStart(8,"0")}var Em=new WeakMap;function Nm(e){if(!e)return "";let n=Em.get(e);if(n!==void 0)return n;let t=JSON.stringify([[...e.marks],e.reservedMarkText??null,e.activeNoteKey??null]),r=`${e.marks.size}:${Xw(t)}`;return Em.set(e,r),r}var Ro=.7,Vw=1.25,Am="Cambria Math";function ss(e){return e.fontFamily===Am?e:Object.freeze({...e,fontFamily:Am})}function ut(e,n,t,r){return Object.freeze({x:e,y:n,width:t,height:r})}function En(e,n,t){return Object.freeze({...e,box:ut(n,t,e.box.width,e.box.height)})}var Yw=4,Kw=8,Dm=new WeakMap;function Uw(e){let n=ss(e);return [n.fontFamily??"",n.fontSizePt,n.bold?1:0,n.italic?1:0,n.verticalAlign,n.baselineShiftPt,n.caps?1:0,n.smallCaps?1:0,n.characterSpacingPt,n.horizontalScalePercent,n.kerningMinPt].join("|")}function qw(e,n){if(n===void 0)return {projections:new WeakMap};let t=Dm.get(e);t||(t=new Map,Dm.set(e,t));let r=t.get(n);if(r)return t.delete(n),t.set(n,r),r;if(t.size>=Yw){let a=t.keys().next().value;a!==void 0&&t.delete(a);}let o={projections:new WeakMap};return t.set(n,o),o}function wo(e,n,t){let r=t.styles.get(n);if(r)return r;let o=n===1?e:Object.freeze({...e,fontSizePt:e.fontSizePt*n,characterSpacingPt:e.characterSpacingPt*n});return t.styles.set(n,o),o}function _m(e,n,t,r){let o=r.metrics.get(t);if(o)return o;let a=e.lineMetrics(wo(n,t,r));return r.metrics.set(t,a),a}function is(e,n,t,r,o,a){let i=wo(r,o,a),s=_m(t,r,o,a);return Object.freeze({kind:e,text:n,fontSizePt:i.fontSizePt,box:ut(0,0,Dn(n,i,t),s.height),baseline:s.baseline})}function Zw(e,n){if(e.length===0)return Object.freeze({kind:"row",items:Object.freeze([]),box:ut(0,0,0,n.height),baseline:n.baseline});let t=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=En(i,o,t-i.baseline);return o+=i.box.width,s});return Object.freeze({kind:"row",items:Object.freeze(a),box:ut(0,0,o,t+r),baseline:t})}function _n(e,n,t,r,o){switch(e.kind){case "text":return is("text",e.value,n,t,r,o);case "fallback":return is("fallback",e.text||"\u2026",n,t,r,o);case "row":return Zw(e.items.map(a=>_n(a,n,t,r,o)),_m(n,t,r,o));case "fraction":{let a=wo(t,r,o),i=_n(e.numerator,n,t,r*Ro,o),s=_n(e.denominator,n,t,r*Ro,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:En(i,(u-i.box.width)/2,0),denominator:En(s,(u-s.box.width)/2,p),bar:ut(l/2,f,u-l,c),box:ut(0,0,u,m),baseline:g})}case "radical":{let a=wo(t,r,o),i=_n(e.radicand,n,t,r,o),s=is("text","\u221A",n,t,r,o),l=e.degree?_n(e.degree,n,t,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:En(s,f,m-s.baseline),radicand:En(i,p,u),...l?{degree:En(l,0,0)}:{},bar:ut(p,0,i.box.width,d),box:ut(0,0,p+i.box.width,g),baseline:m})}case "script":{let a=wo(t,r,o),i=_n(e.base,n,t,r,o),s=e.subscript?_n(e.subscript,n,t,r*Ro,o):void 0,l=e.superscript?_n(e.superscript,n,t,r*Ro,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),b=Math.max(f+i.box.height,l?u+l.box.height:0,s?m+s.box.height:0);return Object.freeze({kind:"script",base:En(i,0,f),...s?{subscript:En(s,c,m)}:{},...l?{superscript:En(l,c,u)}:{},box:ut(0,0,g,b),baseline:p})}case "nary":{let a=wo(t,r,o),i=is("text",e.operator,n,t,r*Vw,o),s=_n(e.body,n,t,r,o),l=e.lowerLimit?_n(e.lowerLimit,n,t,r*Ro,o):void 0,d=e.upperLimit?_n(e.upperLimit,n,t,r*Ro,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),b=u+c,h=m-s.baseline,I=-Math.min(0,p,h,l?g:0),w=m+I,O=Math.max(p+i.box.height,l?g+l.box.height:0,h+s.box.height)+I;return Object.freeze({kind:"nary",operator:En(i,(u-i.box.width)/2,p+I),body:En(s,b,h+I),...l?{lowerLimit:En(l,(u-l.box.width)/2,g+I)}:{},...d?{upperLimit:En(d,(u-d.box.width)/2,I)}:{},box:ut(0,0,b+s.box.width,O),baseline:w})}}}function Hm(e,n,t){let r=ss(t),o={styles:new Map,metrics:new Map};return Object.freeze({sourceNodeId:e.sourceNodeId,geometry:_n(e.expression,n,r,1,o),fallbackText:e.fallbackText,truncated:e.truncated})}function zm(e,n){let t=qw(e,n);return (r,o)=>{let a=Uw(o),i=t.projections.get(r),s=i?.get(a);if(s&&i)return i.delete(a),i.set(a,s),s;let l=Hm(r,e,o);if(i||(i=new Map,t.projections.set(r,i)),i.size>=Kw){let d=i.keys().next().value;d!==void 0&&i.delete(d);}return i.set(a,l),l}}function ls(e,n=[],t,r,o,a,i=je,s,l,d,c,u,f=false){if(e.kind==="textValue")return [];if(e.kind!=="paragraph")return [];let p=[],m=0,g,b=sc$1(e,{maxNesting:Gi,maxInstructionChars:rc$1}),h=b.filter(T=>T.addressing==="atomic"),x=new Set(h.filter(T=>T.kind==="complex").map(T=>T.node.id)),I=new Set(b.filter(T=>T.kind==="complex"&&T.addressing==="editable-result").map(T=>T.node.id)),w=new Set;for(let T of h)for(let j of T.removeNodeIds)w.add(j);let O=Pa(),M=Yd(),P=null,L=null,C=ts(),k=os,z=(T,j,N,V,Y,G,K)=>{if(T.length===0&&!V&&!K?.inlineDrawing)return;let $=K?.linkOverride??g,J=K?.revisionsOverride??k,U=$?{link:$}:{},re=J.length===0?{}:{revisions:J};if(V){p.push({text:T,props:j,style:N,start:Y,end:G,projected:true,...K?.measureText!==void 0?{measureText:K.measureText}:{},...K?.noteNav?{noteNav:K.noteNav}:{},...K?.inlineDrawing?{inlineDrawing:K.inlineDrawing}:{},...K?.anchoredAtom?{anchoredAtom:true}:{},...K?.equation?{equation:K.equation}:{},...K?.fieldAtom?{fieldAtom:K.fieldAtom}:{},...U,...re});return}T.length!==0&&p.push({text:T,props:j,style:N,start:Y,end:G,...K?.positionalTab?{positionalTab:K.positionalTab}:{},...K?.breakKind?{breakKind:K.breakKind}:{},...U,...re});},F=()=>{if(!P||!P.atomic){P=null,L=null;return}let T=P.atomStart,j=T+1;if(P.style.hidden){P=null,L=null;return}if(!Te(P.resultRevisions,i)){s&&Kn(P.resultRevisions)&&tr(s,T,j),P=null,L=null;return}let{resultLink:N,linkSpec:V,resultRevisions:Y,formField:G}=P,K,$=()=>{if(K)return K;let U=!N&&V?c?.(V)??null:null,re=N??U;return K={...Y.length>0?{revisionsOverride:Y}:{},...re?{linkOverride:re}:{},fieldAtom:{formField:G}},K},J=Cm(P,{pageContext:t,themeFonts:d,documentProperties:u,bodyPageFields:f});if(J){let U=$(),re=J.pageField?{...U,fieldAtom:{formField:P.formField,pageField:J.pageField}}:U;z(J.text,J.props,J.style,true,T,j,re);}P=null,L=null;},y=()=>{if(!P)return;let T=!P.resultLink&&P.linkSpec?c?.(P.linkSpec)??null:null,j=N=>T&&!N.link?{...N,link:T}:N;if(P.atomic){m=P.atomStart;for(let N of P.buffered)p.push({...j(N),start:m,end:m+(N.end-N.start)}),m+=N.end-N.start;P.cachedText.length>0&&P.buffered.length===0&&(z(P.cachedText,P.props,P.style,false,m,m+P.cachedText.length,T?{linkOverride:T}:void 0),m+=P.cachedText.length);}else {for(let N of P.buffered)p.push(j(N));m=P.bufferOffset;}P=null,L=null;},ee=(T,j,N)=>{if(Lm(T)){let $=m;m+=1;let J=m;if(!l)return;let U=Mm({node:T,layout:l,hiddenRun:N.hidden,revisions:k,displayMode:i});U.recordDeleted&&s&&tr(s,$,J),U.emit&&z("\uFFFC",j,N,true,$,J,U.extras);return}if(Fm(T)){let $=lc(T,a),J=m,U=J+1;if(m=U,N.hidden||!$||$.text.length===0&&!$.measureText)return;let re=$.scopeId&&$.nav?{scopeId:$.scopeId,direction:$.nav}:void 0;z($.text.length>0?$.text:$.measureText??"",j,N,true,J,U,{...$.measureText!==void 0?{measureText:$.measureText}:{},...re?{noteNav:re}:{}});return}let V=Bm(T);if(V){N.hidden||z(" ",j,N,false,m,m,{positionalTab:V});return}if(go(T)){let $=ho(T);if(!$||N.hidden||!Te(k,i))return;let J=ac(j,$,d);z($.text,J.props,J.style,true,m,m);return}let Y=Oa(T);if(Y.length===0)return;let G=Kn(k);N.hidden||!Te(k,i)||T.kind==="deletedText"&&!G||z(Y,j,N,false,m,m+Y.length,{...T.kind==="hardBreak"?{breakKind:Zb$1(T)}:{}}),G&&s&&tr(s,m,m+Y.length),m+=Y.length;},v=(T,j)=>{if(T.kind!=="run")return;let N=Ji(T,n,r),V=Ee(N,d),Y=()=>{P&&(P.capturedResultStyle||(P.props=N,P.style=V,P.capturedResultStyle=true),P.capturedResultRevisions||(P.resultRevisions=k,P.capturedResultRevisions=true,!P.resultLink&&g&&(P.resultLink=g)));};for(let G of T.children){if(!vt(M)){if(y(),wa(O),C.reset(),G.kind==="runProperties"||vn(G,"begin")||vn(G,"separate")||vn(G,"end")||Rr(G)||w.has(G.id)&&L===null)continue;ee(G,N,V);continue}if(G.kind!=="runProperties"){if(vn(G,"begin")){let K=x.has(G.id);Ia(O),O.nesting===1&&(y(),C.reset(),L=K?G.id:null,P={kind:null,symbolSpec:null,linkSpec:null,formSpec:null,buttonSpec:null,docPropertySpec:null,formData:qc$1(G),atomic:K,editableResult:I.has(G.id),atomStart:m,props:N,style:V,capturedResultStyle:false,cachedText:"",sawResultContent:false,buffered:[],bufferOffset:m,resultRevisions:k,capturedResultRevisions:k.length>0,formField:pc$1(G),...g?{resultLink:g}:{}},K&&(m+=1));continue}if(Rr(G)){va(O,G,M,j+1);continue}if(vn(G,"separate")){let K=O.nesting===1&&O.phase==="instruction",$=O.nesting,J=Ta(O);if(K&&P){P.kind=J;let U=Wi(O);!P.kind&&!U.overflow&&!O.nestingOverflow&&sc(P,U.instruction),P.props=N,P.style=V;}else P?.atomic&&O.phase==="result"&&!O.nestingOverflow&&C.onSeparate(t?J:null,$);continue}if(vn(G,"end")){let K=O.nesting===1;if(K&&P?.atomic&&O.phase==="instruction"){let J=Wi(O);!J.overflow&&!O.nestingOverflow&&sc(P,J.instruction);}let $=C.onEnd(O.nesting,t);$!==null&&P?.atomic&&(P.cachedText+=$),ka(O),K&&(P?.atomic?F():y());continue}if(!(dm(O)&&P?.atomic)){if(P&&cm(O)){if(go(G)){if(P.atomic){if(Te(k,i)&&(P.sawResultContent=true),C.active){C.noteResult(!V.hidden&&Te(k,i));continue}if(!V.hidden&&Te(k,i)){let ke=ho(G);ke?.unicode&&(Y(),P.cachedText+=ke.text);}continue}let U=ho(G);if(!U||V.hidden||!Te(k,i))continue;let re=ac(N,U,d);P.buffered.push({text:U.text,props:re.props,style:re.style,start:m,end:m,projected:true,...k.length>0?{revisions:k}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}});continue}let K=Oa(G);if(K.length===0)continue;let $=Kn(k),J=!Te(k,i)||G.kind==="deletedText"&&!$;if(P.atomic&&!J&&(P.sawResultContent=true),$&&s&&(P.atomic?tr(s,P.atomStart,P.atomStart+1):tr(s,m,m+K.length)),J){P.atomic&&C.active&&C.noteResult(false),P.atomic||(m+=K.length,P.bufferOffset=m);continue}if(P.atomic){if(C.active){if(C.noteResult(!V.hidden),V.hidden)continue;Y();continue}if(V.hidden)continue;Y(),P.cachedText+=K;continue}if(V.hidden){m+=K.length,P.bufferOffset=m;continue}P.capturedResultStyle||(P.props=N,P.style=V,P.capturedResultStyle=true),P.buffered.push({text:K,props:N,style:V,start:m,end:m+K.length,...k.length>0?{revisions:k}:{},...g?{link:g}:{},fieldAtom:{formField:P.formField}}),m+=K.length,P.bufferOffset=m;continue}w.has(G.id)&&L===null&&x.size>0,ee(G,N,V);}}}};if(!vt(M))return p;let E=Qa$1(),_=(T,j)=>{let N=m;if(m+=1,T.kind==="textValue"||(Kn(k)&&s&&tr(s,N,N+1),!Te(k,i)))return;let V=km({simple:T,depth:j,pageContext:t,budget:M,revisions:k,displayMode:i,inheritedRunProperties:n,cascadeRuns:r,themeFonts:d,currentLink:g,projectFieldLink:c,documentProperties:u,bodyPageFields:f});V&&z(V.text,V.props,V.style,true,N,N+1,{fieldAtom:{formField:false,...V.pageField?{pageField:V.pageField}:{}},...V.link?{linkOverride:V.link}:{}});},A=(T,j,N,V)=>{let Y=Gb$1(T);if(Y){let J=m++;Kn(k)&&s&&tr(s,J,m);let U=ss(Ee(n,d));return U.hidden||!Te(k,i)?void 0:z("\uFFFC",n,U,true,J,m,{equation:Y})}if(jc$1(T)){_(T,j);return}if(T.kind==="run"){v(T,j);return}if(Lb$1(T)){if(V>=Kb$1||j>Ut)return;for(let J of Ob$1(T))A(J,j+1,N,V+1);return}if(j>Ut||j>=xo)return;let G=T.kind!=="textValue"&&"localName"in T?Pa$1(N,T):N;if(T.kind==="hyperlink"){let J=g;g=o?.(T)??void 0;for(let U of T.children)A(U,j+1,G,V);g=J;return}if(!wr(T))return;let K=yo(T);if(!K||!vt(M))return;let $=k;k=bo($,K);for(let J of T.children)A(J,j+1,G,V);k=$;};for(let T of e.children)A(T,1,E,0);return y(),p}function Jw(e){let n=Object.entries(e.attributes??{}).sort(([t],[r])=>t<r?-1:t>r?1:0).map(([t,r])=>`${t}=${r}`).join(",");return `${e.localName}(${n})`}function Qw(e){return e.map(Jw).join(";")}var jm=new WeakMap,Wm=1<<18;function $m(e){if(e.kind==="textValue")return `t:${e.value}`;let n=e.kind==="paragraph"||e.kind==="table";if(n){let r=jm.get(e);if(r!==void 0)return r}let t=eP(e);return n&&t.length<=Wm&&jm.set(e,t),t}function eP(e){if(e.kind==="textValue")return `t:${e.value}`;let n=[`${e.kind}:${"localName"in e?e.localName:""}#${"id"in e?e.id:""}`];if("attributes"in e&&Array.isArray(e.attributes)){let t=[...e.attributes].map(r=>`${r.namespaceUri??""}:${r.localName}=${r.value}`).sort();for(let r of t)n.push(r);}for(let t of e.children??[])n.push($m(t));return `(${n.join("|")})`}var Gm=new WeakMap;function Ir(e){let n=Math.round(e.width*1e3),t=e.drawingToken??"",r=e.exclusionToken??"",o=Qw(e.properties),a=Gm.get(e.paragraph);if(a&&a.producer===e.producer&&a.width===n&&a.drawingToken===t&&a.exclusionToken===r&&a.propertiesToken===o)return a.key;let i=[e.producer,n,t,r,o,$m(e.paragraph)].join("\0");return i.length<=Wm&&Gm.set(e.paragraph,{producer:e.producer,width:n,drawingToken:t,exclusionToken:r,propertiesToken:o,key:i}),i}var Xm=new WeakMap;function Vm(e,n){Xm.set(e,n);}function Ym(e,n,t,r){if(!e)return;let o=n??new Set;for(let a of t)o.add(a);for(let a of r){let i=Xm.get(a);if(i)for(let s of i)o.add(s);}n||e.retain(o);}var nP=8,tP=8;function rP(e={}){let n=Math.max(1,e.maxEntries??4096),t=n*8,r=new Map,o=0,a=0,i=0,s=0,l=0;return {get(d){let c=r.get(d);if(c===void 0){s+=1;return}return i+=1,r.delete(d),c.generation=o,r.set(d,c),c.value},set(d,c){for(r.has(d)&&r.delete(d),r.set(d,{value:c,generation:o});r.size>n;){let u=r.entries().next();if(u.done||u.value[1].generation>=o&&r.size<=t)break;r.delete(u.value[0]),l+=1;}},retentionPassDue(){return a+=1,a%nP===0},retain(d){o+=1;for(let c of d){let u=r.get(c);u&&(u.generation=o);}for(let[c,u]of r)o-u.generation>tP&&(r.delete(c),l+=1);},clear(){r.clear();},get stats(){return {hits:i,misses:s,evictions:l,size:r.size}}}}var Km=21600;function Xe(e){return Number.isFinite(e)?e:0}function Ea(e){if(e.length===0)return Object.freeze([]);let n=[...e].sort((o,a)=>o.start-a.start||o.end-a.end),t=[],r=n[0];for(let o=1;o<n.length;o+=1){let a=n[o];a.start<=r.end+1e-4?r=Object.freeze({start:r.start,end:Math.max(r.end,a.end)}):(t.push(r),r=a);}return t.push(r),Object.freeze(t)}function oP(e,n){let t=[];for(let r of e)for(let o of n){let a=Math.max(r.start,o.start),i=Math.min(r.end,o.end);i>a+1e-6&&t.push(Object.freeze({start:a,end:i}));}return Ea(t)}function dc(e,n,t){let r=[];for(let o of e){let a=Math.max(o.start,n),i=Math.min(o.end,t);i>a+1e-6&&r.push(Object.freeze({start:a,end:i}));}return Ea(r)}function aP(e,n,t){let r=[],o=n;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<t&&r.push(Object.freeze({start:o,end:t})),Object.freeze(r)}function qm(e,n){return Po(e,n)}function cc(e,n,t){return qm(Po(e,n),t)}function iP(e,n){let t=[],r=Math.min(e.length,mn);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(n<d||n>c||n===c&&l>s||n===d&&l<s)continue;let u=(n-s)/(l-s),f=a.x+u*(i.x-a.x);Number.isFinite(f)&&t.push({x:f,delta:l>s?1:-1});}return t.sort((o,a)=>o.x-a.x||o.delta-a.delta),Object.freeze(t)}function sP(e,n){let t=[],r=Math.min(e.length,mn);for(let o=0;o<r;o+=1){let a=e[o],i=e[(o+1)%r];if(a.y!==i.y||Math.abs(n-a.y)>1e-6)continue;let s=Math.min(a.x,i.x),l=Math.max(a.x,i.x);l>s&&t.push(Object.freeze({start:s,end:l}));}return Ea(t)}function Um(e,n,t){let r=lP(iP(e,n),t),o=sP(e,n);return Ea([...r,...o])}function lP(e,n){if(e.length===0)return Object.freeze([]);let t=[];if(n==="evenodd"){for(let a=0;a+1<e.length;a+=2){let i=e[a].x,s=e[a+1].x;s>i&&t.push(Object.freeze({start:i,end:s}));}return Object.freeze(t)}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&&t.push(Object.freeze({start:o,end:a.x})),o=null);}return Object.freeze(t)}function dP(e,n){return Object.freeze({top:Xe(e.top)+Xe(n.top),right:Xe(e.right)+Xe(n.right),bottom:Xe(e.bottom)+Xe(n.bottom),left:Xe(e.left)+Xe(n.left)})}function cP(e,n,t,r,o,a){let i=n.x-e.x,s=n.y-e.y,l=r.x-t.x,d=r.y-t.y,c=i*d-s*l;if(Math.abs(c)<1e-12)return null;let f=((t.x-e.x)*s-(t.y-e.y)*i)/c,p=((t.x-e.x)*d-(t.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 uP(e,n,t,r){let o=[],a=Math.min(e.length,mn),i=Math.min(n.length,mn);if(a<2||i<2)return Object.freeze([]);let s=mn*mn,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=n[f],m=n[(f+1)%i],g=cP(c,u,p,m,t,r);g!==null&&o.push(g);}}return Object.freeze(o)}function fP(e,n,t){let r=new Set;r.add(n),r.add(t);for(let o of e){let a=Math.min(o.length,mn);for(let i=0;i<a;i+=1){let s=o[i].y;Number.isFinite(s)&&s>=n-1e-6&&s<=t+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 [n,t]){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 uP(e[0],e[1],n,t))r.add(o);return Object.freeze([...r].sort((o,a)=>o-a))}function pP(e,n,t,r){let o=Um(e,t,r);return n&&n.length>=3&&(o=oP(o,Um(n,t,"nonzero"))),o}function Zm(e,n,t,r,o=null){let a=Xe(t.top),i=Xe(t.bottom),s=Xe(t.left),l=Xe(t.right),d=n-i,c=n+a,u=fP(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 b=u[g+1];return b<=m+1e-6?[m]:[m,b,(m+b)/2]}):[d];for(let m of p){let g=pP(e,o,m,r);for(let b of g)f.push(Object.freeze({start:b.start-s,end:b.end+l}));}return Ea(f)}function Jm(e){let{x:n,y:t,width:r,height:o}=e;return Object.freeze([Object.freeze({x:n,y:t}),Object.freeze({x:n+r,y:t}),Object.freeze({x:n+r,y:t+o}),Object.freeze({x:n,y:t+o})])}function mP(e){let n=Math.max(0,Xe(e.extentWidthPt)),t=Math.max(0,Xe(e.extentHeightPt)),r=cs(e.transform,n,t),o=Math.min(e.polygonEmu.length,mn);if(o<3)return Jm({x:e.anchorX,y:e.anchorY,width:n,height:t});let a=r.width/Km,i=r.height/Km,s=[];for(let l=0;l<o;l+=1){let d=e.polygonEmu[l];s.push(Object.freeze({x:Xe(d.x)*a,y:Xe(d.y)*i}));}return us({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:n,layoutHeight:t,anchorX:e.anchorX,anchorY:e.anchorY})}function gP(e,n){let t=n.effectInsets??ds,r=n.wrapDistances??ds,o=Xe(n.contentLeft),a=Xe(n.contentRight);if(n.mode==="topAndBottom"){let c=qm(Po(n.contentBounds,t),r);return e<c.y||e>=c.y+c.height?Object.freeze([]):dc([{start:o,end:a}],o,a)}if(n.mode==="square"){let c=cc(n.contentBounds,t,r);return e<c.y||e>=c.y+c.height?Object.freeze([]):dc([{start:c.x,end:c.x+c.width}],o,a)}let i=n.polygon&&n.polygon.length>=3?n.polygon:Jm(n.contentBounds),s=n.mode==="through"?"evenodd":"nonzero",l=dP(r,t),d=Zm(i,e,l,s,n.clipPolygon);return dc(d,o,a)}function hP(e){return e.length===0?null:Object.freeze({start:Math.min(...e.map(n=>n.start)),end:Math.max(...e.map(n=>n.end))})}function yP(e,n,t,r,o){if(t==="bothSides"||n.length===0)return e;let a=hP(n);if(!a)return e;if(t==="left")return Object.freeze(e.filter(l=>l.end<=a.start+1e-4));if(t==="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 Qm(e,n){let t=gP(e,n),r=aP(t,n.contentLeft,n.contentRight);return yP(r,t,n.textSide,n.contentLeft,n.contentRight)}function bP(e,n,t,r){return t.length<3?false:Zm(t,n,r,"nonzero").some(a=>e>=a.start-1e-6&&e<=a.end+1e-6)}function uc(e,n,t){let r=t.effectInsets??ds,o=t.hitBounds;if(e<o.x||e>o.x+o.width||n<o.y||n>o.y+o.height)return false;if(t.clipPolygon&&t.clipPolygon.length>=3)return bP(e,n,t.clipPolygon,r);let a=Po(t.contentBounds,r);return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function eg(e){let n=Object.freeze({top:Xe(e.wrapDistancesEmu.top/ft),right:Xe(e.wrapDistancesEmu.right/ft),bottom:Xe(e.wrapDistancesEmu.bottom/ft),left:Xe(e.wrapDistancesEmu.left/ft)}),t=e.mode==="tight"||e.mode==="through"?mP({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:t,clipPolygon:e.geometry.clipPolygon,wrapDistances:n,effectInsets:e.geometry.effectInsets,textSide:e.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}var Tn=1e5,mn=m.maxPolygonPoints,ds=Object.freeze({top:0,right:0,bottom:0,left:0}),xP=32,SP=.1,RP=new Set(["rect","ellipse","roundRect"]);function ge(e){return Number.isFinite(e)?e:0}function Hn(e,n,t){return Number.isFinite(e)?Math.min(t,Math.max(n,e)):n}function ng(e,n){let t=e+n;return Number.isFinite(t)?t:0}function tg(e,n,t){let r=Hn(e,0,t),o=Hn(n,0,t);if(r<=0||o<=0)return {left:r,right:o};let a=r+o;if(a>=t){let i=(t-1)/a;r*=i,o*=i;}return {left:r,right:o}}function wP(e){let n=tg(Hn(e.left,0,Tn),Hn(e.right,0,Tn),Tn),t=tg(Hn(e.top,0,Tn),Hn(e.bottom,0,Tn),Tn);return Object.freeze({left:n.left,top:t.left,right:n.right,bottom:t.right})}function PP(e){let n=wP({left:e.left*Tn,top:e.top*Tn,right:e.right*Tn,bottom:e.bottom*Tn});return Object.freeze({left:n.left/Tn,top:n.top/Tn,right:n.right/Tn,bottom:n.bottom/Tn})}function IP(e){let n=t=>{if(!Number.isFinite(t))return 0;let r=t/ft;return !Number.isFinite(r)||Math.abs(r)>72e4?0:r};return Object.freeze({top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)})}function Po(e,n){let t=ge(n.left),r=ge(n.right),o=ge(n.top),a=ge(n.bottom);return Object.freeze({x:e.x-t,y:e.y-o,width:Math.max(0,ng(e.width,t+r)),height:Math.max(0,ng(e.height,o+a))})}function vP(e,n,t){let r=e*Hn(t.left,0,1),o=n*Hn(t.top,0,1),a=e*(1-Hn(t.right,0,1)),i=n*(1-Hn(t.bottom,0,1));if(a<=r||i<=o){let s=e/2,l=n/2;return Object.freeze({left:s,top:l,right:s,bottom:l})}return Object.freeze({left:r,top:o,right:a,bottom:i})}function cs(e,n,t){let r=e.extentEmu?.cx??0,o=e.extentEmu?.cy??0,a=e.offsetEmu??{x:0,y:0},i=r>0?ge(rr(r)??n):Math.max(0,ge(n)),s=o>0?ge(rr(o)??t):Math.max(0,ge(t));return Object.freeze({offsetX:ge(rr(a.x)??0),offsetY:ge(rr(a.y)??0),width:i,height:s})}function TP(e,n,t,r){let o=vP(n,t,r),a=o.right-o.left,i=o.bottom-o.top,s=n>0?n:1,l=t>0?t:1,d=[],c=Math.min(e.length,mn);for(let u=0;u<c;u+=1){let f=e[u],p=a<=0?o.left:o.left+Hn(f.x/s,0,1)*a,m=i<=0?o.top:o.top+Hn(f.y/l,0,1)*i;d.push(Object.freeze({x:ge(p),y:ge(m)}));}return Object.freeze(d)}function rg(e,n,t){let r=e.x-n.x,o=e.y-n.y;t.flipHorizontal&&(r=-r),t.flipVertical&&(o=-o);let a=ge(t.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:ge(l+n.x),y:ge(d+n.y)})}function og(e){if(e.length===0)return Object.freeze({x:0,y:0,width:0,height:0});let n=e[0].x,t=e[0].x,r=e[0].y,o=e[0].y,a=Math.min(e.length,mn);for(let i=1;i<a;i+=1){let s=e[i];!Number.isFinite(s.x)||!Number.isFinite(s.y)||(n=Math.min(n,s.x),t=Math.max(t,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y));}return Object.freeze({x:n,y:r,width:Math.max(0,t-n),height:Math.max(0,o-r)})}function fc(e){let n=Object.freeze({x:e.offsetX+e.sourceWidth/2,y:e.offsetY+e.sourceHeight/2}),t=Fa(0,0,e.sourceWidth,e.sourceHeight),r=[];for(let s of t)r.push(rg(Object.freeze({x:s.x+e.offsetX,y:s.y+e.offsetY}),n,e.transform));let o=og(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,ge(e.layoutWidth))/a,scaleY:Math.max(0,ge(e.layoutHeight))/i,anchorX:ge(e.anchorX),anchorY:ge(e.anchorY)})}function kP(e,n){return Object.freeze({x:ge(n.anchorX+(e.x-n.bboxX)*n.scaleX),y:ge(n.anchorY+(e.y-n.bboxY)*n.scaleY)})}function us(e){let n=e.mapping??fc({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}),t=TP(e.points,e.sourceWidth,e.sourceHeight,e.crop),r=Math.min(t.length>0?t.length:e.points.length,mn),o=t.length>0?t: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:ge(l.x+e.offsetX),y:ge(l.y+e.offsetY)});i.push(kP(rg(d,a,e.transform),n));}return Object.freeze(i)}function Fa(e,n,t,r){if(t<=0||r<=0){let o=Object.freeze({x:e,y:n});return Object.freeze([o,o,o,o])}return Object.freeze([Object.freeze({x:e,y:n}),Object.freeze({x:e+t,y:n}),Object.freeze({x:e+t,y:n+r}),Object.freeze({x:e,y:n+r})])}function OP(e,n,t){if(!e||!RP.has(e))return null;if(n<=0||t<=0)return Fa(0,0,Math.max(0,n),Math.max(0,t));if(e==="rect")return Fa(0,0,n,t);if(e==="ellipse"){let s=[],l=n/2,d=t/2,c=n/2,u=t/2,f=Math.min(xP,mn);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(n,t)*SP,o=Math.max(0,r),a=n,i=t;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 vo(e){return Object.freeze({x:ge(e.x),y:ge(e.y)})}function CP(e,n){if(e.length===0)return Object.freeze([]);let t=n.x+n.width,r=n.y+n.height,o=(i,s,l)=>{if(i.length===0)return Object.freeze([]);let d=[],c=Math.min(i.length,mn);for(let u=0;u<c;u+=1){let f=vo(i[u]),p=vo(i[(u+1)%c]),m=s(f),g=s(p);if(m&&g?d.push(p):m&&!g?d.push(vo(l(f,p))):!m&&g&&(d.push(vo(l(f,p))),d.push(p)),d.length>=mn)break}return Object.freeze(d.slice(0,mn))},a=e.slice(0,mn).map(vo);return a=[...o(a,i=>i.x>=n.x,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(n.x-i.x)/l:0;return Object.freeze({x:n.x,y:ge(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.x<=t,(i,s)=>{let l=s.x-i.x,d=Math.abs(l)>1e-6?(t-i.x)/l:0;return Object.freeze({x:t,y:ge(i.y+d*(s.y-i.y))})})],a=[...o(a,i=>i.y>=n.y,(i,s)=>{let l=s.y-i.y,d=Math.abs(l)>1e-6?(n.y-i.y)/l:0;return Object.freeze({x:ge(i.x+d*(s.x-i.x)),y:n.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:ge(i.x+d*(s.x-i.x)),y:r})})],Object.freeze(a)}function BP(e){let n=og(e);return Object.freeze({x:n.x,y:n.y,width:n.width,height:n.height})}function fs(e,n){let t=LP(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=a=>{if(!a||a.length===0)return a;let i=CP(a,n);return i.length>=3?Object.freeze(i.map(vo)):Object.freeze([])};return Object.freeze({...e,paintBounds:t,hitBounds:r,transformedCorners:Object.freeze(o(e.transformedCorners)??e.transformedCorners),clipPolygon:o(e.clipPolygon)})}function LP(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function MP(e){let n=Math.max(0,ge(e.extentWidth)),t=Math.max(0,ge(e.extentHeight)),r=ge(e.anchorX),o=ge(e.anchorY),a=PP(e.crop),i=IP(e.effectExtentEmu),s=cs(e.transform,n,t),l=Object.freeze({x:r,y:o,width:n,height:t}),d={sourceWidth:s.width,sourceHeight:s.height,offsetX:s.offsetX,offsetY:s.offsetY,crop:a,transform:e.transform,layoutWidth:n,layoutHeight:t,anchorX:r,anchorY:o},c=fc(d),u=Object.freeze({left:0,top:0,right:0,bottom:0}),f=us({points:Fa(0,0,s.width,s.height),...d,crop:u,mapping:c}),p=OP(e.presetGeometry,s.width,s.height),m="none",g=p;g||(m=e.presetGeometry?"unsupported-preset":"none",g=Fa(0,0,s.width,s.height));let b=us({points:g,...d,crop:u,mapping:c}),h=BP(b.length>=3?b:f),x=Po(h,i);return Object.freeze({contentBounds:l,paintBounds:x,hitBounds:x,transformedCorners:f,clipPolygon:b.length>=3?b:f,clipFallback:m,effectInsets:i})}function To(e){let n=e.projection.picture,t=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})});return MP({extentWidth:e.extentWidth,extentHeight:e.extentHeight,anchorX:e.anchorX,anchorY:e.anchorY,effectExtentEmu:e.projection.effectExtentEmu,crop:n?.crop??{left:0,top:0,right:0,bottom:0},transform:n?.transform??t,presetGeometry:n?.presetGeometry??null})}function EP(e){let{transform:n,contentWidth:t,contentHeight:r}=e;if(t<=0||r<=0)return null;let o=cs(n,t,r),a=o.width,i=o.height,s=fc({sourceWidth:a,sourceHeight:i,offsetX:o.offsetX,offsetY:o.offsetY,transform:n,layoutWidth:t,layoutHeight:r,anchorX:0,anchorY:0}),l=ge(n.rotationDegrees),d=Math.abs(l%360)>1e-4,c=n.flipHorizontal?-1:1,u=n.flipVertical?-1:1,f=s.scaleX,p=s.scaleY,m=a>0?a/t: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,x=Math.cos(h),I=Math.sin(h),w=o.offsetX+a/2,O=o.offsetY+i/2,M=f*x*c,P=-f*I*u,L=p*I*c,C=p*x*u,k=f*(w-x*c*(a/2)+I*u*(i/2)-s.bboxX),z=p*(O-I*c*(a/2)-x*u*(i/2)-s.bboxY);return Object.freeze({a:ge(M*m),b:ge(L*m),c:ge(P*g),d:ge(C*g),e:ge(k),f:ge(z)})}function lB(e){let n=EP(e);if(n)return `matrix(${Io(n.a)}, ${Io(n.b)}, ${Io(n.c)}, ${Io(n.d)}, ${Io(n.e)}, ${Io(n.f)})`}function Io(e){return Number.isFinite(e)?String(e):"0"}var FP=Object.freeze({"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"}),NP=Object.freeze({rotationDegrees:0,flipHorizontal:false,flipVertical:false,offsetEmu:Object.freeze({x:0,y:0}),extentEmu:Object.freeze({cx:0,cy:0})}),AP=Object.freeze({left:0,top:0,right:0,bottom:0});function sg(e){let n=e.picture,t=null;if(!n){for(let r of e.diagnostics){if(r.code!=="unsupported-graphic")continue;let o=r.detail??"";t=FP[o]??"graphic";break}t===null&&(t="graphic");}return Object.freeze({hyperlinkHref:e.hyperlinkHref,effects:e.effects,crop:n?.crop??AP,transform:n?.transform??NP,placeholderGraphicKind:n?null:t,vectorShape:e.vectorShape})}var ft=12700;function ln(e){return e/ft}function rr(e){if(!Number.isFinite(e)||Math.abs(e)>1e4*ft*72)return null;let n=e/ft;return Number.isFinite(n)?n:null}function Bt(e){let n=ln(e.inlineDistancesEmu.left),t=ln(e.inlineDistancesEmu.right),r=ln(e.inlineDistancesEmu.top),o=ln(e.inlineDistancesEmu.bottom),a=ln(e.effectExtentEmu.left),i=ln(e.effectExtentEmu.right),s=ln(e.effectExtentEmu.top),l=ln(e.effectExtentEmu.bottom),d=ln(e.extentEmu.cx),c=ln(e.extentEmu.cy);return Object.freeze({distL:n,distR:t,distT:r,distB:o,effectL:a,effectR:i,effectT:s,effectB:l,width:d,height:c,totalWidth:n+a+d+i+t,lineContribution:r+s+c+l+o})}function lg(e,n,t){let r=Math.max(t.distT+t.effectT,e-t.height),o=Math.max(n,r-t.effectT+t.height+t.effectB+t.distB),a=r+t.height+t.effectB;return Object.freeze({extentTopY:r,lineHeight:o,baseline:Math.max(e,a)})}function ps(e,n,t){if(Math.abs(n)<1e-4&&Math.abs(t)<1e-4)return e;let r=a=>Object.freeze({...a,x:a.x+n,y:a.y+t}),o=a=>Object.freeze({x:a.x+n,y:a.y+t});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 ms(e,n,t){return Math.abs(n)<1e-4&&Math.abs(t)<1e-4?e:Object.freeze({...e,x:e.x+n,y:e.y+t,advanceStart:e.advanceStart+n,advanceEnd:e.advanceEnd+n,paintBounds:Object.freeze({...e.paintBounds,x:e.paintBounds.x+n,y:e.paintBounds.y+t}),hitBounds:Object.freeze({...e.hitBounds,x:e.hitBounds.x+n,y:e.hitBounds.y+t}),geometry:ps(e.geometry,n,t)})}function pc(e,n){return e.length===0?e:e.map(t=>{let r=t.geometry.effectInsets.bottom,o=n-t.height-r,a=o-t.y;return Math.abs(a)<1e-4&&t.baselineOffset===n?t:Object.freeze({...t,y:o,baselineOffset:n,geometry:ps(t.geometry,0,a),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+a}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+a})})})}function mc(e,n){let t=Math.max(e.x,n.x),r=Math.max(e.y,n.y),o=Math.min(e.x+e.width,n.x+n.width),a=Math.min(e.y+e.height,n.y+n.height);return o<=t||a<=r?Object.freeze({x:t,y:r,width:0,height:0}):Object.freeze({x:t,y:r,width:o-t,height:a-r})}function gs(e,n){let t=mc(e.paintBounds,n),r=t.width>0&&t.height>0?t:Object.freeze({...t}),o=e.x-e.geometry.contentBounds.x,a=e.y-e.geometry.contentBounds.y,i=ps(e.geometry,o,a);return Object.freeze({...e,paintBounds:t,hitBounds:r,geometry:fs(i,n)})}var ag=new Set(["character","column","insideMargin","leftMargin","margin","outsideMargin","page","rightMargin"]),ig=new Set(["bottomMargin","insideMargin","line","margin","outsideMargin","page","paragraph","topMargin"]);function pt(e){return e.onPageParityRead?.(),e.pageNumber%2===1}function dg(e,n){return !(!n.layoutInCell||n.cellBox===null||!Number.isFinite(n.cellBox.height)||n.cellBox.height<=0||!Number.isFinite(n.cellBox.width)||n.cellBox.width<=0)}function cg(e,n){if(dg(e,n)){let l=n.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:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "insideMargin":return pt(n)?{left:d,right:d+c,center:d+c/2}:{left:d+c,right:d+c,center:d+c};case "outsideMargin":return pt(n)?{left:d+c,right:d+c,center:d+c}:{left:d,right:d+c,center:d+c/2};default:return null}}let t=-n.marginLeft,r=n.contentWidth+n.marginRight,o=0,a=n.contentWidth,i=n.columnBox.x,s=n.columnBox.x+n.columnBox.width;switch(e){case "page":return {left:t,right:r,center:(t+r)/2};case "margin":return {left:o,right:a,center:o+n.contentWidth/2};case "column":return {left:i,right:s,center:i+n.columnBox.width/2};case "character":return {left:n.anchorCharacterX,right:n.anchorCharacterX,center:n.anchorCharacterX};case "leftMargin":return {left:t,right:t,center:t};case "rightMargin":return {left:r,right:r,center:r};case "insideMargin":return pt(n)?{left:o,right:o,center:o}:{left:a,right:a,center:a};case "outsideMargin":return pt(n)?{left:r,right:r,center:r}:{left:t,right:t,center:t};default:return null}}function ug(e,n){if(dg(e,n)){let l=n.cellBox;if(!l)return null;let{y:d,height:c}=l;switch(e){case "page":case "margin":case "topMargin":case "bottomMargin":return {top:d,bottom:d+c,center:d+c/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "insideMargin":return pt(n)?{top:d,bottom:d+c,center:d+c/2}:{top:d+c,bottom:d+c,center:d+c};case "outsideMargin":return pt(n)?{top:d+c,bottom:d+c,center:d+c}:{top:d,bottom:d+c,center:d+c/2};default:return null}}let t=-n.contentInsetTop,r=n.contentBandHeight,o=t+n.pageHeight-n.marginBottom,a=r+n.contentInsetBottom,i=0,s=n.contentHeight;switch(e){case "page":return {top:t,bottom:a,center:(t+a)/2};case "margin":return {top:i,bottom:s,center:i+n.contentHeight/2};case "paragraph":return {top:n.paragraphBox.y,bottom:n.paragraphBox.y+n.paragraphBox.height,center:n.paragraphBox.y+n.paragraphBox.height/2};case "line":return {top:n.anchorLineBox.y,bottom:n.anchorLineBox.y+n.anchorLineBox.height,center:n.anchorLineBox.y+n.anchorLineBox.height/2};case "topMargin":return {top:t,bottom:t,center:t};case "bottomMargin":return {top:o,bottom:o,center:o};case "insideMargin":return pt(n)?{top:i,bottom:i,center:i}:{top:s,bottom:s,center:s};case "outsideMargin":return pt(n)?{top:a,bottom:a,center:a}:{top:t,bottom:t,center:t};default:return null}}function fg(e){return e===null?0:rr(e)}function DP(e,n,t){let r=pt(t);if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.width)&&t.cellBox.width>0){let{x:o,width:a}=t.cellBox;return e==="inside"?r?o:o+a-n:e==="outside"?r?o+a-n:o:null}return e==="inside"?r?0:t.contentWidth-n:e==="outside"?r?t.contentWidth-n:0:null}function _P(e,n,t){let r=pt(t),o=t.contentBandHeight;if(t.layoutInCell&&t.cellBox&&Number.isFinite(t.cellBox.height)&&t.cellBox.height>0){let{y:a,height:i}=t.cellBox;return e==="inside"?r?a:a+i-n:e==="outside"?r?a+i-n:a:null}return e==="inside"?r?0:o-n:e==="outside"?r?o-n:0:null}function HP(e,n,t,r,o){let a=cg(e,o);if(!a)return null;let i=fg(t);if(i===null)return null;if(n==="left")return a.left+i;if(n==="center")return a.center-r/2+i;if(n==="right")return a.right-r+i;if(n==="inside"||n==="outside"){let s=DP(n,r,o);if(s!==null)return s+i}return a.left+i}function zP(e,n,t,r,o){let a=ug(e,o);if(!a)return null;let i=fg(t);if(i===null)return null;if(n==="top")return a.top+i;if(n==="center")return a.center-r/2+i;if(n==="bottom")return a.bottom-r+i;if(n==="inside"||n==="outside"){let s=_P(n,r,o);if(s!==null)return s+i}return a.top+i}function Na(e){let n=e.contentBandHeight;return Object.freeze({x:-e.marginLeft,y:-e.contentInsetTop,width:e.pageWidth,height:n+e.contentInsetTop+e.contentInsetBottom})}function gc(e,n){let t=Bt(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=rr(r.simplePosition.xEmu),b=rr(r.simplePosition.yEmu);return Object.freeze(g===null||b===null?{x:0,y:0,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0,layoutFallback:"unresolvable-frame"}:{x:g-n.marginLeft,y:b-n.contentInsetTop,horizontalFrame:r.horizontal.relativeFrom,verticalFrame:r.vertical.relativeFrom,horizontalFrameOrigin:0,verticalFrameOrigin:0})}let s=r.horizontal.relativeFrom,l=r.vertical.relativeFrom,d=cg(s,n),c=ug(l,n),u=d?.left??0,f=c?.top??0;if(!ag.has(s)||!ig.has(l))return Object.freeze({x:0,y:0,horizontalFrame:ag.has(s)?s:a,verticalFrame:ig.has(l)?l:i,horizontalFrameOrigin:u,verticalFrameOrigin:f,layoutFallback:"unresolvable-frame"});let p=HP(s,r.horizontal.align,r.horizontal.offsetEmu,t.width,n),m=zP(l,r.vertical.align,r.vertical.offsetEmu,t.height,n);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 jP(e){let n=e.input.projection,t=n.anchor,r=Bt(n),o=To({projection:n,anchorX:e.resolved.x,anchorY:e.resolved.y,extentWidth:r.width,extentHeight:r.height}),a=e.clipRegion?mc(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:t?.behindDocument??false,allowOverlap:t?.allowOverlap??true,layoutInCell:t?.layoutInCell??true,relativeHeight:t?.relativeHeight??0,wrap:n.wrap==="inline"?"inFront":n.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?fs(o,e.clipRegion):o,resource:e.input.resource,accessibility:Xa$1(n),...sg(n)})}function zn(e,n){if(e.kind!=="paragraph")return [];let t=[],r=(o,a)=>{if(o.kind==="drawing"){let i=n.projectionForAtom?.(o.id)??n.project(o);i?.kind==="anchored"&&t.push({atomId:o.id,projection:i,revisions:a});return}if(Wa$1(o)){let i=n.projectionForAtom?.(o.id)??null;i?.kind==="anchored"&&t.push({atomId:o.id,projection:i,revisions:a});return}if("children"in o){let i=wr(o)?yo(o):null,s=i?bo(a,i):a;for(let l of o.children)r(l,s);}};for(let o of e.children)r(o,os);return Object.freeze(t)}function Un(e){let n=new Map;if(e.kind!=="paragraph")return n;let t=0,r=a=>{if(a.kind==="drawing"||Wa$1(a)){n.set(a.id,t),t+=1;return}if(a.kind==="textValue"){t+=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"||wr(a))for(let i of a.children)o(i);};for(let a of e.children)o(a);return n}function GP(e,n,t){for(let o of e.spans){if(n<o.range.start)break;if(n<o.range.end){if(t&&o.text!==void 0&&o.style!==void 0){let s=n-o.range.start;return o.box.x+Dn(o.text.slice(0,s),o.style,t)}let a=o.range.end-o.range.start;if(a<=0)return o.box.x;let i=n-o.range.start;return o.box.x+o.box.width*i/a}if(n===o.range.end)return t&&o.text!==void 0&&o.style!==void 0?o.box.x+Dn(o.text,o.style,t):o.box.x+o.box.width}let r;for(let o of e.spans)o.range.end<=n&&(r=o);return r?t&&r.text!==void 0&&r.style!==void 0?r.box.x+Dn(r.text,r.style,t):r.box.x+r.box.width:e.box.x}function WP(e,n){let t=e.range.start;for(let r of e.spans)r.range.end<=n&&(t=r.range.end);return t}function hc(e,n,t){if(!(Math.abs(t)<=.001))for(let r=0;r<e.length;r+=1){let o=e[r];o.anchorParagraphId===n&&(e[r]=Object.freeze({...o,y:o.y+t,geometry:ps(o.geometry,0,t),paintBounds:Object.freeze({...o.paintBounds,y:o.paintBounds.y+t}),hitBounds:Object.freeze({...o.hitBounds,y:o.hitBounds.y+t})}));}}function ko(e){let n=zn(e.paragraph,e.drawingLayout);if(n.length===0)return [];let t=Un(e.paragraph),r=e.displayMode??je,o=[];for(let a of n){let i=a.projection;if(i.hidden||!Te(a.revisions,r))continue;let s=t.get(a.atomId);if(s===void 0||e.fragmentRange&&(s<e.fragmentRange.start||s>=e.fragmentRange.end))continue;let l=e.lines.find(h=>s>=h.range.start&&s<h.range.end);if(!l)continue;let d=i.anchor?.layoutInCell??true,u=i.position?.horizontal.relativeFrom==="character"?WP(l,s):s,f=Object.freeze({...e.frameBase,paragraphBox:e.paragraphBox,anchorLineBox:l.box,anchorCharacterX:GP(l,u,e.measurer),columnBox:e.columnBox,cellBox:e.cellBox,layoutInCell:d}),p=gc(i,f),g=d&&e.cellBox!==null&&Number.isFinite(e.cellBox.height)&&e.cellBox.height>0&&Number.isFinite(e.cellBox.width)&&e.cellBox.width>0?e.cellBox:Na(e.frameBase),b=jP({input:Object.freeze({drawingNodeId:a.atomId,ownerPartName:e.drawingLayout.ownerPartName,projection:i,resource:e.drawingLayout.resourceOf(i)}),anchorParagraphId:e.paragraphId,start:u,resolved:p,clipRegion:g,revisions:a.revisions,...e.sourceOrderOf?{sourceOrder:e.sourceOrderOf(a.atomId)}:{},...i.textboxStory&&e.layoutTextboxStory?{textboxStory:e.layoutTextboxStory(i)}:{}});o.push(b);}return Object.freeze(o)}function pg(e){let n=Bt(e.input.projection),t=e.slotX+n.distL+n.effectL,r=To({projection:e.input.projection,anchorX:t,anchorY:e.y,extentWidth:n.width,extentHeight:n.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=mc(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:t,y:e.y,width:n.width,height:n.height,distL:n.distL,distR:n.distR,distT:n.distT,distB:n.distB,advanceStart:e.slotX,advanceEnd:e.slotX+n.totalWidth,baselineOffset:e.baseline,paintBounds:a,hitBounds:i,geometry:fs(r,o),resource:e.input.resource,accessibility:Xa$1(e.input.projection),...sg(e.input.projection),...e.revisions&&e.revisions.length>0?{revisions:e.revisions}:{}})}var $P=256,xc=8,vr=8,Oo=class extends Error{name="DrawingExclusionConvergenceError";constructor(n="drawing exclusion reflow did not converge"){super(n);}};function XP(e,n){let t=Math.max(1,n.columnCount);if(t<=1)return 0;let r=e.x+e.width/2;if(n.columnLefts&&n.columnWidths&&n.columnLefts.length===t){for(let i=0;i<t;i+=1){let s=n.columnLefts[i],l=s+n.columnWidths[i];if(r>=s-.001&&r<l+.001)return i}return t-1}let o=n.columnGapPt,a=(n.contentWidth-o*(t-1))/t;for(let i=0;i<t;i+=1){let s=i*(a+o),l=s+a;if(r>=s-.001&&r<l+.001)return i}return t-1}function bc(e){return e.behindDocument?"behind":"inFront"}function gg(e){return e!=="inline"&&e!=="behind"&&e!=="inFront"}function VP(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 YP(e){return e==="squareLeft"?"left":e==="squareRight"?"right":"bothSides"}function Sc(e){let n=VP(e.projection.wrap);if(!n||!e.projection.wrapGeometry)return null;let t=e.projection.wrapGeometry,r=Object.freeze({x:e.anchorX,y:e.anchorY,width:e.geometry.contentBounds.width,height:e.geometry.contentBounds.height});return eg({mode:n,contentBounds:r,geometry:e.geometry,wrapDistancesEmu:t.distancesEmu,polygonEmu:t.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:n==="square"?YP(e.projection.wrap):t.textSide,contentLeft:e.contentLeft,contentRight:e.contentRight})}function Rc(e){if(e.mode==="topAndBottom"||e.mode==="square")return cc(e.contentBounds,e.effectInsets,e.wrapDistances);let n=[e.contentBounds.y,e.contentBounds.y+e.contentBounds.height];if(e.polygon)for(let o of e.polygon)n.push(o.y);let t=Math.min(...n)-e.effectInsets.top-e.wrapDistances.top,r=Math.max(...n)+e.effectInsets.bottom+e.wrapDistances.bottom;return Object.freeze({x:e.contentLeft,y:t,width:Math.max(0,e.contentRight-e.contentLeft),height:Math.max(0,r-t)})}function KP(e){if(e.drawing.behindDocument||!gg(e.drawing.wrap))return null;let n=e.yOverride??e.drawing.y,t=Sc({projection:e.projection,geometry:e.drawing.geometry,contentLeft:e.contentLeft,contentRight:e.contentRight,anchorX:e.drawing.x,anchorY:n});return t?Object.freeze({drawingNodeId:e.drawing.drawingNodeId,anchorParagraphId:e.drawing.anchorParagraphId,anchorModelStart:e.drawing.start,sourceOrder:e.sourceOrder,paintLayer:bc(e.drawing),relativeHeight:e.drawing.relativeHeight,allowOverlap:e.drawing.allowOverlap,columnIndex:e.columnIndex??0,y:n,verticalBand:Rc(t),input:t}):null}function hg(e,n){let t=e.sourceOrder??Number.MAX_SAFE_INTEGER,r=n.sourceOrder??Number.MAX_SAFE_INTEGER;return t!==r?t-r:e.drawingNodeId.localeCompare(n.drawingNodeId)}function UP(e,n){let t=bc(e),r=bc(n);return t!==r?t==="behind"?-1:1:e.relativeHeight!==n.relativeHeight?e.relativeHeight-n.relativeHeight:hg(e,n)}function yg(e){return Object.freeze([...e].sort(UP))}function yc(e,n){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function wc(e,n){if(Math.abs(n)<=1e-4)return e;let t=e.geometry;return Object.freeze({...e,y:e.y+n,paintBounds:Object.freeze({...e.paintBounds,y:e.paintBounds.y+n}),hitBounds:Object.freeze({...e.hitBounds,y:e.hitBounds.y+n}),geometry:Object.freeze({...t,contentBounds:Object.freeze({...t.contentBounds,y:t.contentBounds.y+n}),paintBounds:Object.freeze({...t.paintBounds,y:t.paintBounds.y+n}),hitBounds:Object.freeze({...t.hitBounds,y:t.hitBounds.y+n}),transformedCorners:t.transformedCorners.map(r=>Object.freeze({x:r.x,y:r.y+n})),clipPolygon:t.clipPolygon?t.clipPolygon.map(r=>Object.freeze({x:r.x,y:r.y+n})):null})})}function bg(e,n){let t=n.maxAttempts??$P,r=[...e].sort(hg),o=[],a=[],i=[];for(let s of r){if(s.allowOverlap){o.push(s);continue}let l=s,d=0;for(;d<t&&o.some(g=>yc(g.paintBounds,l.paintBounds));){let p=o.find(g=>yc(g.paintBounds,l.paintBounds)),m=p.paintBounds.y+p.paintBounds.height-l.paintBounds.y+.001;l=wc(l,m),d+=1;}let c=o.some(f=>yc(f.paintBounds,l.paintBounds)),u=l.paintBounds.y+l.paintBounds.height>n.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 Co(e,n,t,r){let o=[{start:t,end:r}];for(let a of n){let i=a.verticalBand;if(e<i.y||e>=i.y+i.height)continue;let s=Qm(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 xg(e,n){for(let t of n)if(e>=t.start-1e-6&&e<t.end-1e-6)return Math.max(0,t.end-e);return 0}function qP(e,n){for(let t of n)if(t.end>e+1e-6)return t;return null}function Pc(e,n){let t=qP(e,n);if(!t)return null;let r=Math.max(e,t.start),o=t.end-r;return o<=.001?null:Object.freeze({x:r,available:o})}function ZP(e,n,t){let r=e.contentBounds;return Object.freeze({...e,contentBounds:Object.freeze({...r,x:r.x+n,y:r.y+t}),contentLeft:e.contentLeft+n,contentRight:e.contentRight+n,...e.polygon?{polygon:e.polygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{},...e.clipPolygon?{clipPolygon:e.clipPolygon.map(o=>Object.freeze({x:o.x+n,y:o.y+t}))}:{}})}function Ic(e,n){return Object.freeze({...e,layoutFallback:n})}function Sg(e,n,t,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-t,verticalBand:Object.freeze({...a,x:a.x-n,y:a.y-t}),input:Object.freeze({...ZP(i,-n,-t),contentLeft:r?.left,contentRight:r?.right??i.contentRight-n})})}))}function Rg(e,n,t){return Object.freeze(e.filter(r=>{let o=t(r.anchorParagraphId);return o===void 0?r.sourceOrder<=n:o<=n}))}function wg(e){let n=zn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Un(e.paragraph),r=e.displayMode??je,o=Math.max(1,e.contentRight-e.contentLeft),a=[];for(let i of n){if(!Te(i.revisions,r)||i.projection.anchor?.behindDocument||!gg(i.projection.wrap)||i.projection.wrap==="topAndBottom")continue;let s=t.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=gc(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=Bt(i.projection),m=To({projection:i.projection,anchorX:u.x,anchorY:f,extentWidth:p.width,extentHeight:p.height}),g=Sc({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.atomId)??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:Rc(g),input:g}));}return a.sort((i,s)=>i.sourceOrder-s.sourceOrder),Object.freeze(a)}function hs(e){let n=zn(e.paragraph,e.drawingLayout);if(n.length===0)return Object.freeze([]);let t=Un(e.paragraph),r=e.displayMode??je,o=[];for(let a of n){if(!Te(a.revisions,r)||a.projection.anchor?.behindDocument||a.projection.wrap!=="topAndBottom")continue;let i=t.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=Bt(a.projection),c=To({projection:a.projection,anchorX:e.contentLeft,anchorY:l,extentWidth:d.width,extentHeight:d.height}),u=Sc({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.atomId)??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:Rc(u),input:u}));}return o.sort((a,i)=>a.sourceOrder-i.sourceOrder),Object.freeze(o)}var JP=8;function QP(e,n,t,r){return e<r&&n>t}function gt(e,n,t){if(n<=0||t.length===0)return 0;let r=0;for(let o=0;o<JP;o+=1){let a=e+r,i=a+n,s=a,l=false;for(let c of t){if(c.input.mode!=="topAndBottom")continue;let u=c.verticalBand.y,f=u+c.verticalBand.height;QP(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 e0(e){return e.map(n=>`${n.start.toFixed(3)}-${n.end.toFixed(3)}`).join(",")}function n0(e){let n=e.contentBounds,t=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,n.x.toFixed(3),n.y.toFixed(3),n.width.toFixed(3),n.height.toFixed(3),t.top.toFixed(3),t.right.toFixed(3),t.bottom.toFixed(3),t.left.toFixed(3),r.top.toFixed(3),r.right.toFixed(3),r.bottom.toFixed(3),r.left.toFixed(3),o,a].join(":")}function mt(e){return e.length===0?"":e.map(n=>{let t=n.verticalBand,r=n.y+n.input.contentBounds.height/2,o=Co(r,[n],n.input.contentLeft,n.input.contentRight);return [n.drawingNodeId,String(n.sourceOrder),String(n.columnIndex),n.y.toFixed(3),t.x.toFixed(3),t.y.toFixed(3),t.width.toFixed(3),t.height.toFixed(3),n0(n.input),e0(o)].join("|")}).join(`
8
+ `)}function vc(e,n,t,r,o,a){let i=[];for(let s of e){let l=n.projectionForAtom?.(s.drawingNodeId);if(!l)continue;let d=s.sourceOrder??o?.(s.drawingNodeId)??Number.MAX_SAFE_INTEGER,c=a!==void 0?XP(s,a):0,u=KP({drawing:s,projection:l,sourceOrder:d,contentLeft:t,contentRight:r,columnIndex:c});u&&i.push(u);}return i.sort((s,l)=>s.sourceOrder-l.sourceOrder),Object.freeze(i)}function ys(e,n,t,r,o){let a=o??Object.freeze({columnCount:1,columnGapPt:0,contentWidth:t}),i=new Map;for(let s of e){let l=s.anchoredDrawings??[],d=vc(l,n,0,t,r,a);d.length>0&&i.set(s.index,d);}return i}var mg=new WeakMap;function t0(e){return e?`${e.columnCount};${e.columnGapPt};${e.contentWidth};${(e.columnLefts??[]).join(",")};${(e.columnWidths??[]).join(",")}`:""}function Tc(e,n,t,r,o,a){let i=t0(a),s=mg.get(e);if(s&&s.drawingLayout===n&&s.drawingLayoutEpoch===t&&s.contentWidth===r&&s.drawingSourceOrder===o&&s.columnToken===i)return s.zones;let l=ys(e,n,r,o?d=>o.get(d):void 0,a);return mg.set(e,{drawingLayout:n,drawingLayoutEpoch:t,contentWidth:r,drawingSourceOrder:o,columnToken:i,zones:l}),l}function bs(e,n){if(e.size!==n.size)return false;for(let[t,r]of e){let o=n.get(t);if(!o||mt(r)!==mt(o))return false}return true}function xs(e){return e.size===0?"":[...e.entries()].sort(([n],[t])=>n-t).map(([n,t])=>`${n}:${mt(t)}`).join(`
9
+ `)}function kc(e,n,t,r=0){return (t.length>0?gt(e,n.height,t):n.exclusionSkipBefore??0)+Math.max(0,n.height-n.trailingSpacing)+r}function Pg(e){return Object.freeze({spans:e.spans.map(n=>Object.freeze({...n,box:Object.freeze({...n.box})})),drawings:e.drawings.map(n=>Object.freeze({...n,paintBounds:Object.freeze({...n.paintBounds}),hitBounds:Object.freeze({...n.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 r0=.001;function kn(e){return po(e)}var Rs=new Set(["-","\u2010","\u2013","\u2014"]);function Ig(e){let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===" "?(t>0&&n[n.length-1]!==t&&n.push(t),n.push(t+1)):(r===" "||Rs.has(r)&&t>0&&e[t-1]!==" "&&t+1<e.length&&e[t+1]!==" "&&!Rs.has(e[t+1]))&&n.push(t+1);}return n[n.length-1]!==e.length&&n.push(e.length),n}function o0(e,n,t){for(let r=n;r<e.length;r+=1){let o=e[r];if(o.inlineDrawing)return true;let a=r===n?t:0;for(let i=a;i<o.text.length;i+=1){let s=o.text[i];if(s===`
10
+ `||s===Yb$1)return false;if(s!==" "&&s!==" ")return true}}return false}function a0(e,n,t,r){let o=0,a=0,i=false;for(let s=n;s<e.length;s+=1){let l=e[s],d=s===n?t:0;for(let c=d;c<l.text.length;){let u=l.text[c];if(u===" "||u===`
11
+ `||u===Yb$1)return {width:o,decimalOffset:i?a:o};let f=c+1,p=l.text.slice(c,f),m=r.measure(er(p,l.style),l.style);!i&&u==="."?i=true:i||(a+=m),o+=m,c=f;}}return {width:o,decimalOffset:i?a:o}}function i0(e,n,t,r){let o=e.relativeTo==="indent"||!r?{left:n,right:t}: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 Ss=31680;function Aa(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return null;let n=Number(e);return Number.isFinite(n)?n>Ss?Fc$1(Ss):n<-Ss?Fc$1(-Ss):Fc$1(n):null}function Da(e){let n=0,t=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=Aa(o),s=Aa(a);i!==null&&(n=Hc$1(i)),s!==null&&(t=Hc$1(s));}return {left:n,right:t}}function vg(e){let n="left";for(let t of e)if(t.localName==="jc")switch(t.attributes?.val){case "center":n="center";break;case "right":case "end":n="right";break;case "both":case "distribute":n="both";break;default:n="left";}return n}function s0(e){return e.endsWith(" ")}function l0(e,n){let t=e.range.end-e.range.start;if(t<=0||e.text===" "||e.projected||e.text.length!==t)return Object.freeze([0,e.box.width]);let r=[0];for(let o=1;o<=e.text.length;o+=1)r.push(Dn(e.text.slice(0,o),e.style,n));return Object.freeze(r)}function Bo(e,n){return e.map(t=>t.caretEdges?t:{...t,caretEdges:l0(t,n)})}function ws(e,n,t,r,o,a,i){if(e.length===0)return e;if(o==="left")return Bo(e,n);let s=e[e.length-1],l=s.text.replace(/\s+$/,""),d=l===s.text?0:s.box.width-Dn(l,s.style,n),c=i??s.box.x-t+s.box.width-d,u=r-c;if(u<=0)return Bo(e,n);if(o==="both"){if(a)return Bo(e,n);let p=[];for(let h=1;h<e.length;h+=1)s0(e[h-1].text)&&p.push(h);if(p.length===0)return Bo(e,n);let m=u/p.length,g=new Set(p),b=0;return Bo(e.map((h,x)=>(g.has(x)&&(b+=m),b===0?h:{...h,box:{...h.box,x:h.box.x+b}})),n)}let f=o==="center"?u/2:u;return Bo(e.map(p=>({...p,box:{...p.box,x:p.box.x+f}})),n)}function Ps(e,n){return n===0||e.length===0?e:e.map(t=>ms(t,n,0))}function Is(e,n,t,r,o,a,i,s=[],l=so,d,c,u){let f=i!==null&&a?a.get(i):void 0;if(f)return f;let p=u?.lineSpacing??ao,m=u?.firstLineOffset??0,g=[],b=ls(e,s,d,c,u?.projectLink,u?.noteMarks,u?.displayMode??je,g,u?.inlineDrawingLayout,u?.themeFonts,u?.projectFieldLink,u?.documentProperties,u?.bodyPageFields??false),h=Math.max(0,u?.startOffset??0),x=b.flatMap(B=>{if(B.end<=h)return [];if(B.start>=h)return [B];let S=h-B.start;return [{...B,text:B.projected?B.text:B.text.slice(S),start:h}]}),I=zm(o,u?.equationCacheToken),w=B=>B.equation?I(B.equation,B.style):null;if(x.length===0&&u?.suppressEmptyPlaceholderLine)return [];let O=B=>({...B.revisions===void 0?{}:{revisions:B.revisions},...B.fieldAtom===void 0?{}:{fieldAtom:B.fieldAtom}}),M=u?.markRunProperties??s,P=M.length===0?ct:Ee(M,u?.themeFonts),L=t+r,C=u?.contentLeft??t,k=u?.contentRight??L,z=u?.contentOriginX??0,F=[],y={spans:[],start:h,end:h,drawings:[],width:0,height:0,baseline:0,leading:0,trailingSpacing:0},ee=false,v=new Map,E=u?.displayMode??je,_=(()=>{let B=new Set;if(!u?.inlineDrawingLayout)return B;let S=Un(e);for(let H of zn(e,u.inlineDrawingLayout)){if(!Te(H.revisions,E)||H.projection.wrap!=="topAndBottom")continue;let Q=S.get(H.atomId);Q!==void 0&&B.add(Q);}return B})(),A=(()=>{let B=new Set;if(!u?.inlineDrawingLayout)return B;let S=Un(e);for(let H of zn(e,u.inlineDrawingLayout)){if(!Te(H.revisions,E)||H.projection.anchor?.behindDocument||H.projection.wrap==="topAndBottom"||H.projection.wrap==="inline"||H.projection.wrap==="behind"||H.projection.wrap==="inFront")continue;let Q=S.get(H.atomId);Q!==void 0&&B.add(Q);}return B})(),T=[...(u?.pageExclusionZones??[]).filter(B=>B.anchorParagraphId===n).map(B=>B.anchorModelStart),..._,...A],j=(()=>{let B=new Map;if(T.length===0)return B;let S=0,H=0,Q=0,oe=()=>Q===0?m:0,W=()=>Math.max(1,r-oe()),Re=se=>{S=se,H=0,Q+=1;};for(let se of x){let He=w(se);if(He){let Ne=He.geometry.box.width;H>0&&H+Ne>W()&&Re(se.start),T.includes(se.start)&&B.set(se.start,S),H+=Ne;continue}if(se.inlineDrawing){let Ne=Bt(se.inlineDrawing.projection).totalWidth;H>0&&H+Ne>W()&&Re(se.start),T.includes(se.start)&&B.set(se.start,S),H+=Ne;continue}if(se.text===`
12
+ `||se.text===Yb$1){Re(se.end);continue}let Pe=0;for(let Ne of Ig(se.text)){let un=se.text.slice(Pe,Ne);if(un.length===0)continue;let wn=se.style,Bn=o.measure(un,wn),pe=se.start+Pe;H>0&&H+Bn>W()&&Re(pe),T.includes(pe)&&B.set(pe,S),T.includes(se.start)&&B.set(se.start,S),H+=Bn,Pe=Ne;}}for(let se of T)B.has(se)||B.set(se,S);return B})();for(let B of A){let S=j.get(B);S!==void 0&&v.set(B,S);}let N=B=>{if(B.anchorParagraphId!==n)return true;let S=j.get(B.anchorModelStart);return S!==void 0&&y.start>=S||y.end>=B.anchorModelStart},V=()=>{let B=u?.pageExclusionZones?.filter(Q=>!(!N(Q)||Q.anchorParagraphId===n&&(Q.input.mode==="topAndBottom"||u?.anchorCellBox!=null)))??[],S=u?.inlineDrawingLayout&&u.anchorCellBox!=null&&v.size>0?wg({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:C,contentRight:k,paragraphStartY:u.paragraphStartY??0,anchorLineTopByModelStart:v,anchorCellBox:u.anchorCellBox,displayMode:E}):Object.freeze([]),H=u?.inlineDrawingLayout&&v.size>0?hs({paragraph:e,paragraphId:n,drawingLayout:u.inlineDrawingLayout,contentLeft:C,contentRight:k,paragraphStartY:u?.paragraphStartY??0,anchorLineTopByModelStart:v,displayMode:E}):Object.freeze([]);return Object.freeze([...B,...S,...H])},Y=()=>F.length===0?m:0,G=()=>z+t+Y(),K=()=>Math.max(1,r-Y()),$=()=>F.reduce((B,S)=>B+S.height+(S.exclusionSkipBefore??0),0),J=()=>(u?.paragraphStartY??0)+$(),U=B=>{_.has(B)&&v.set(B,$());},re=()=>{if(ee)return;let B=V();if(B.length===0||y.spans.length>0||y.drawings.length>0)return;let S=o.lineMetrics(P),H=gt(J(),y.height>0?y.height:S.height,B);H>.001&&(ee=true,y.exclusionSkipBefore=H);},ke=()=>J()+(y.exclusionSkipBefore??0)+.001,be=()=>{let B=V();if(B.length===0)return true;re();let S=Co(ke(),B,C,k),H=G()+y.width,Q=Pc(H,S);return Q?(Q.x>H+.001&&(y.width=Q.x-G()),true):false},ne=()=>{let B=K(),S=V();if(S.length===0)return B;if(re(),!be())return 0;let H=Co(ke(),S,C,k),Q=G()+y.width,oe=xg(Q,H);return oe<=.001?0:Math.min(B,y.width+oe)},xe=()=>Math.max(0,ne()-y.width),we=()=>{let B=V();if(B.length===0||!B.some(W=>W.anchorParagraphId!==n||y.end>W.anchorModelStart))return false;let H=Co(ke(),B,C,k),Q=G()+y.width,oe=false;for(let W of H){if(!oe){Q>=W.start-1e-6&&Q<W.end-1e-6&&(oe=true);continue}if(W.end-W.start>.001)return y.width=W.start-G(),true}return false},Qe=B=>{if(T.length===0||B<Math.min(...T))return;let S=V().filter(Re=>Re.anchorParagraphId===n&&B>=Re.anchorModelStart);if(S.length===0)return;re();let H=Co(ke(),S,C,k),Q=G()+y.width,oe=-1;for(let Re=0;Re<H.length;Re+=1){let se=H[Re];if(Q>=se.start-.001&&Q<se.end-.001){oe=Re;break}}if(oe>=0)return;let W=Pc(Q,H);W&&W.x>Q+.001&&(y.width=W.x-G());},ye=B=>{V().filter(H=>H.input.mode==="topAndBottom"&&H.anchorParagraphId===n&&B>=H.anchorModelStart).length!==0&&((y.spans.length>0||y.drawings.length>0)&&Fe(),re());},Ae=(B,S=0)=>S>64?xe()>=B:(re(),be()?B<=xe()+.001?true:y.spans.length>0||y.drawings.length>0?we()&&B<=xe()+.001?true:(Fe(),Ae(B,S+1)):we()?Ae(B,S+1):true:y.spans.length>0||y.drawings.length>0?(Fe(),Ae(B,S+1)):true),Ke=(B,S)=>g.filter(H=>H.start<S&&H.end>B).map(H=>({start:Math.max(H.start,B),end:Math.min(H.end,S)})),Rn=-1,cn=0,et=0,Ge="",Gn=(B,S)=>{let H=o.lineMetrics(B),Q=lg(H.baseline,y.height||H.height,S);return y.height===0?(y.height=Q.lineHeight,y.baseline=Q.baseline):(Q.lineHeight>y.height&&(y.height=Q.lineHeight),y.baseline=Math.max(y.baseline,Q.baseline)),{extentTopY:Q.extentTopY}},Wn=()=>{if(y.drawings.length===0)return;y.spans.length===0&&(y.baseline=Math.max(y.baseline,...y.drawings.map(S=>S.y+S.height)));let B=pc(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...B),y.baseline=Math.max(y.baseline,...y.drawings.map(S=>S.y+S.height));},gn=()=>{if(y.drawings.length===0)return;let B=pc(y.drawings,y.baseline);y.drawings.splice(0,y.drawings.length,...B);},nt=B=>{let S=0;for(let H of y.spans)S=Math.max(S,o.lineMetrics(H.style).height);return S>0?S:B},on=()=>{if(y.drawings.length===0)return;let B=Math.max(0,...y.drawings.map(S=>S.y+S.height+S.distB));y.height=Math.max(y.height,B);},Cn=()=>{Wn(),on();},At=()=>{if(!(y.spans.length<2))for(let B=1;B<y.spans.length;B+=1){let S=y.spans[B-1],H=y.spans[B],Q=H.box.x-(S.box.x+S.box.width);Q<=.001||y.drawings.some(W=>W.start>=S.range.end&&W.start<H.range.start)||(y.spans[B]={...H,wrapAdvanceBefore:Q});}},Fe=B=>{let S=o.lineMetrics(P),H=y.baseline;y.height===0?(y.height=S.height,y.baseline=S.baseline,H=S.baseline):B?.includeParagraphMark&&(y.height=Math.max(y.height,S.height)),Cn();let Q=y.height,oe=p.rule==="auto"&&y.drawings.length>0,W=oe?nt(S.height):Q,Re=Md(p,W,y.baseline);oe||(y.baseline=Re.baseline),y.leading=Math.max(0,y.baseline-H),y.height=Re.height,gn(),p.rule!=="exact"&&on(),y.trailingSpacing=y.drawings.length===0&&p.rule!=="exact"?Math.max(0,Re.height-Q):0,(()=>{let Pe=V();if(Pe.length===0)return;let Ne=gt(J(),y.height,Pe);Ne>.001?y.exclusionSkipBefore=Ne:delete y.exclusionSkipBefore;})(),At();let He=Ke(y.start,y.end);He.length>0&&(y.deletedRanges=He),F.push(y),Rn=-1,cn=0,ee=false,y={spans:[],drawings:[],start:y.end,end:y.end,width:0,height:0,baseline:0,leading:0,trailingSpacing:0},re();},We=false;for(let B=0;B<x.length;B+=1){let S=x[B];if(S.breakKind==="column"){let oe=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:S.text,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:oe.height},...S.link?{link:S.link}:{},...O(S)}),y.height=Math.max(y.height,oe.height),y.baseline=Math.max(y.baseline,oe.baseline),y.end=S.end,Fe(),F[F.length-1].columnBreakAfter=true,We=true;continue}if(S.equation){let oe=w(S),W=oe.geometry.box.width;if((y.spans.length>0||y.drawings.length>0)&&y.width+W>ne()&&Fe(),!Ae(W))continue;let se=Math.max(0,y.height-y.baseline),He=Math.max(0,oe.geometry.box.height-oe.geometry.baseline);y.baseline=Math.max(y.baseline,oe.geometry.baseline),y.height=y.baseline+Math.max(se,He),y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:"\uFFFC",props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:W,height:oe.geometry.box.height},projected:true,equation:oe,...O(S)}),y.width+=W,y.end=S.end,Rn=-1,Ge="";continue}if(S.projected&&!S.inlineDrawing&&S.text==="\uFFFC"){U(S.start),S.anchoredAtom&&S.revisions!==void 0&&Te(S.revisions,E)&&(y.anchorRevisions=[...y.anchorRevisions??[],...S.revisions]),y.end=S.end;continue}if(S.inlineDrawing){U(S.start);let oe=Bt(S.inlineDrawing.projection),W=oe.totalWidth;if((y.spans.length>0||y.drawings.length>0)&&y.width+W>ne()&&Fe(),!Ae(W))continue;let{extentTopY:se}=Gn(S.style,oe),He=G()+y.width;y.drawings.push(pg({input:S.inlineDrawing,paragraphId:n,start:S.start,slotX:He,y:se,baseline:y.baseline,contentLeft:C,contentRight:k,...S.revisions?{revisions:S.revisions}:{}})),y.width+=W,y.end=S.end,Rn=-1,Ge="";continue}if(S.text===Yb$1){let oe=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:Yb$1,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:oe.height},...S.link?{link:S.link}:{},...O(S)}),y.height=Math.max(y.height,oe.height),y.baseline=Math.max(y.baseline,oe.baseline),y.end=S.end,Fe(),F[F.length-1].pageBreakAfter=true,We=false;continue}if(S.text===`
13
+ `){let oe=o.lineMetrics(S.style);y.spans.push({range:{paragraphId:n,start:S.start,end:S.end},text:`
14
+ `,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:0,height:oe.height},...S.link?{link:S.link}:{},...O(S)}),y.height=Math.max(y.height,oe.height),y.baseline=Math.max(y.baseline,oe.baseline),y.end=S.end,Fe(),We=true;continue}We=false,ye(S.start),T.length>0&&S.start>=Math.min(...T)&&Qe(S.start);let H=o.lineMetrics(S.style),Q=0;for(let oe of Ig(S.text)){let W=S.text.slice(Q,oe);if(W.length===0)continue;let Re=!!S.projected||!!S.positionalTab||S.end-S.start!==S.text.length,se=Re?{paragraphId:n,start:S.start,end:S.end}:{paragraphId:n,start:S.start+Q,end:S.start+oe};if(W===" "){(y.spans.length>0||y.drawings.length>0)&&y.width>=ne()&&o0(x,B,oe)&&Fe();let pe=G()+y.width,an=a0(x,B,oe,o),Ve=S.positionalTab?i0(S.positionalTab,t,L,u?.marginExtent):null,Nn=Ve===null?lo(l,pe,L):Ve.positionPt>pe?Ve:{...lo(l,pe,L),...Ve.leader?{leader:Ve.leader}:{}},Dt=Gd(Nn.alignment,pe,Nn.positionPt,an.width,an.decimalOffset);y.spans.push({range:se,text:" ",props:S.props,style:S.style,box:{x:pe,y:0,width:Dt,height:H.height},...Nn.leader?{tabLeader:Nn.leader,tabLeaderAdvancePt:o.measure(_d.get(Nn.leader)??".",S.style)}:{},...S.link?{link:S.link}:{},...Nn.leader?{tabLeader:Nn.leader}:{},...Re&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...O(S)}),y.width+=Dt,y.height=Math.max(y.height,H.height),y.baseline=Math.max(y.baseline,H.baseline),y.end=Re?S.end:S.start+oe,Ge=" ",Q=oe;continue}let He=S.measureText??W,Pe=o.measure(er(He,S.style),S.style),Ne=Q>0||Ge===""||/[\s\u00a0]$/.test(Ge)||/^[\s\u00a0]/.test(W)||Rs.has(Ge[Ge.length-1])&&!Rs.has(W[0]);if(Ne&&(Rn=y.spans.length,cn=y.width,et=y.end),Qe(S.start+Q),y.width+Pe>ne()+r0&&(y.spans.length>0||y.drawings.length>0))if(Ne||Rn<=0){if(!(we()&&y.width+Pe<=ne()+.001)){if(Fe(),!Ae(Pe))continue}}else {let pe=y.spans.splice(Rn);y.width=cn,y.end=et,y.height=0,y.baseline=0;for(let an of y.spans){let Ve=o.lineMetrics(an.style);y.height=Math.max(y.height,Ve.height),y.baseline=Math.max(y.baseline,Ve.baseline);}Fe();for(let an of pe){let Ve=o.lineMetrics(an.style);y.spans.push({...an,box:{...an.box,x:G()+y.width}}),y.width+=an.box.width,y.height=Math.max(y.height,Ve.height),y.baseline=Math.max(y.baseline,Ve.baseline),y.end=an.range.end;}Rn=0,cn=0;}else if(y.spans.length===0&&y.drawings.length===0&&Pe>ne()+.001&&!Ae(Pe))continue;let un=W,wn=S.start+Q,Bn=Pe;if(!Re&&S.measureText===void 0)for(;y.spans.length===0&&un.length>1&&Bn>ne();){let pe=1,an=un.length-1,Ve=1;for(;pe<=an;){let yt=pe+an>>1;o.measure(er(un.slice(0,yt),S.style),S.style)<=ne()?(Ve=yt,pe=yt+1):an=yt-1;}let Nn=un.slice(0,Ve),Dt=o.measure(er(Nn,S.style),S.style);y.spans.push({range:{paragraphId:n,start:wn,end:wn+Ve},text:Nn,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:Dt,height:H.height},...S.link?{link:S.link}:{},...S.noteNav?{noteNav:S.noteNav}:{},...O(S)}),y.width+=Dt,y.height=Math.max(y.height,H.height),y.baseline=Math.max(y.baseline,H.baseline),y.end=wn+Ve,Fe(),un=un.slice(Ve),wn+=Ve,Bn=o.measure(er(un,S.style),S.style);}y.spans.push({range:Re?se:{paragraphId:n,start:wn,end:S.start+oe},text:un,props:S.props,style:S.style,box:{x:G()+y.width,y:0,width:Bn,height:H.height},...S.link?{link:S.link}:{},...Re&&!S.positionalTab?{projected:true}:{},...S.noteNav?{noteNav:S.noteNav}:{},...O(S)}),y.width+=Bn,y.height=Math.max(y.height,H.height),y.baseline=Math.max(y.baseline,H.baseline),y.end=Re?S.end:S.start+oe,Ge=W,Q=oe;}}return (y.spans.length>0||y.drawings.length>0||F.length===0||We)&&Fe({includeParagraphMark:true}),i!==null&&a&&a.set(i,F.map(Pg)),F}var Ts=32,kg=4096,d0=128,c0=/[\u0000-\u001F\u007F-\u009F]/,u0={major:null,minor:null};function kr(e){return e.kind!=="textValue"}function Lo(e,n){return e.attributes.find(t=>t.localName===n)?.value}function Mo(e,n){for(let t of e.children)if(kr(t)&&t.localName===n)return t}function Tr(e){return !(e===void 0||e.length===0||e.length>d0||c0.test(e)||I(e))}function f0(e){return e==="1"||e==="true"||e==="on"}function vs(e){return e.map(n=>n.attributes?{n:n.localName,a:n.attributes}:{n:n.localName})}function Ha(e){if(e){for(let n of e.children)if(kr(n)&&(n.kind==="runProperties"||n.localName==="rPr"))return n}}function ks(e){if(e){for(let n of e.children)if(kr(n)&&(n.kind==="paragraphProperties"||n.localName==="pPr"))return n}}var Tg=new Set(["rPrChange","pPrChange","ins","del","moveFrom","moveTo"]);function Eo(e){return e.some(n=>Tg.has(n.localName))?e.filter(n=>!Tg.has(n.localName)):e}function p0(e){let n=Mo(e,"docDefaults");if(!n)return {run:[],paragraph:[],paragraphNode:void 0};let t=Mo(n,"rPrDefault"),r=Mo(n,"pPrDefault"),o=Ha(t),a=ks(r);return {run:Eo(kn(o)),paragraph:Eo(kn(a)),paragraphNode:a}}function m0(e){let n=Lo(e,"styleId");if(!Tr(n))return null;let t=Lo(e,"type")??"",r=(()=>{let u=Mo(e,"basedOn");return u?Lo(u,"val"):void 0})(),o=Tr(r)?r:null,a=(()=>{let u=Mo(e,"next");return u?Lo(u,"val"):void 0})(),i=Tr(a)?a:null,s=ks(e),l=Ha(e),d=new Map,c=0;for(let u of e.children){if(u.kind==="textValue"||u.localName!=="tblStylePr")continue;if(c>=g0)break;c+=1;let f=Lo(u,"type");f&&!d.has(f)&&d.set(f,u);}return {styleId:n,type:t,basedOn:o,next:i,isDefault:f0(Lo(e,"default")),paragraphProperties:Eo(kn(s)),runProperties:Eo(kn(l)),paragraphPropertiesNode:s,tablePropertiesNode:Mo(e,"tblPr"),conditionalTableFormats:d}}var g0=32,_a=Object.freeze({tablePropertyNodes:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),paragraphProperties:Object.freeze([]),runProperties:Object.freeze([]),conditional:new Map});function Og(e,n){if(!n||!Tr(n))return _a;let t=Bc(e,n,"table");if(t.length===0)return _a;let r=[],o=[],a=[],i=[],s=new Map;for(let l of t){l.tablePropertiesNode&&r.push(l.tablePropertiesNode),l.paragraphPropertiesNode&&o.push(l.paragraphPropertiesNode),a.push(...l.paragraphProperties),i.push(...l.runProperties);for(let[d,c]of l.conditionalTableFormats)s.set(d,c);}return {tablePropertyNodes:r,paragraphPropertyNodes:o,paragraphProperties:a,runProperties:i,conditional:s}}var Oc=Object.freeze({paragraphProperties:Object.freeze([]),paragraphPropertyNodes:Object.freeze([]),runProperties:Object.freeze([])});function Cg(e,n){let t=[...e.paragraphPropertyNodes],r=[...e.paragraphProperties],o=[...e.runProperties];for(let a of n){let i=e.conditional.get(a);if(!i)continue;let s=ks(i);s&&(t.push(s),r.push(...Eo(kn(s))));let l=Ha(i);l&&o.push(...Eo(kn(l)));}return t.length===0&&r.length===0&&o.length===0?Oc:{paragraphProperties:r,paragraphPropertyNodes:t,runProperties:o}}function h0(e,n=u0){let t=new Map;if(!e)return {cacheToken:y({empty:true,theme:n}),docDefaultsRun:[],docDefaultsParagraph:[],docDefaultsParagraphNode:void 0,defaultParagraphStyleId:null,defaultCharacterStyleId:null,themeFonts:n,styles:t};let r=p0(e),o=null,a=null,i=0;for(let l of e.children){if(!kr(l)||l.localName!=="style")continue;if(i>=kg)break;i+=1;let d=m0(l);if(!d)continue;let{isDefault:c,...u}=d;t.set(u.styleId,u),u.type==="paragraph"?c?o=u.styleId:o===u.styleId&&(o=null):u.type==="character"&&(c?a=u.styleId:a===u.styleId&&(a=null));}return {cacheToken:y({dR:vs(r.run),dP:vs(r.paragraph),defP:o,defC:a,theme:n,styles:[...t.values()].map(l=>({id:l.styleId,type:l.type,basedOn:l.basedOn,p:vs(l.paragraphProperties),r:vs(l.runProperties)}))}),docDefaultsRun:r.run,docDefaultsParagraph:r.paragraph,docDefaultsParagraphNode:r.paragraphNode,defaultParagraphStyleId:o,defaultCharacterStyleId:a,themeFonts:n,styles:t}}function Cc(e,n){let t=null;for(let r of e){if(r.localName!==n)continue;let o=r.attributes?.val;t=Tr(o)?o:null;}return t}function Bc(e,n,t){let r=e.styles.get(n);if(!r||r.type!==t)return [];let o=[],a=new Set,i=n,s=0;for(;i!==null&&s<Ts&&!(a.has(i)||!Tr(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 Fo(e,n,t){let r=kn(n),o=Cc(r,"pStyle")??e.defaultParagraphStyleId,a=o?Bc(e,o,"paragraph"):[],i=[...e.docDefaultsParagraph,...t?.paragraphProperties??[],...a.flatMap(p=>p.paragraphProperties)],s=[...i,...r],l=[];e.docDefaultsParagraphNode&&l.push(e.docDefaultsParagraphNode),t&&l.push(...t.paragraphPropertyNodes);for(let p of a)p.paragraphPropertiesNode&&l.push(p.paragraphPropertiesNode);n&&l.push(n);let d=Ha(n&&kr(n)?n:void 0),c=kn(d),u=[...e.docDefaultsRun,...t?.runProperties??[],...a.flatMap(p=>p.runProperties)],f=c.length===0?u:[...u,...c];return {paragraphProperties:s,inheritedParagraphProperties:i,paragraphPropertyNodes:l,runProperties:u,markRunProperties:f,styleId:o??null}}function Bg(e){let n;for(let t of e){if(!t||t.kind==="textValue")continue;let r=false;for(let o of t.children)if(kr(o)&&o.localName==="pBdr"){r=true;break}r&&(n=It(t).bottom);}return n}function Lt(e,n,t){let r=[];if(t){let a=Cc(n,"rStyle")??t.defaultCharacterStyleId;a&&(r=Bc(t,a,"character").flatMap(i=>i.runProperties));}return e.length===0&&r.length===0?n:n.length===0&&r.length===0?e:[...e,...r,...n]}function za(e,n,t,r,o,a=false){let i=ks(e),s=t?Fo(t,i,o):null,l=s?[...s.paragraphProperties]:kn(i),d=kn(Ha(i&&kr(i)?i:void 0)),c=s?s.runProperties:[],u=s?s.markRunProperties:d,f=Da(l),p=0,m=0;if(r)p=r.indent.hanging,m=r.indent.firstLine;else for(let h of l){if(h.localName!=="ind")continue;let x=Aa(h.attributes?.hanging),I=Aa(h.attributes?.firstLine);(h.attributes?.hanging!==void 0||h.attributes?.firstLine!==void 0)&&(p=x!==null?Math.max(0,Hc$1(x)):0,m=I!==null?Hc$1(I):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},b=s?zd(s.paragraphPropertyNodes):jd(i);return {props:l,indent:g,available:Math.max(1,n-g.left-g.right),alignment:vg(l),spacing:Bd(l,{inList:r!==void 0,inTableCell:a}),lineSpacing:Ld(l),contextualSpacing:Ed(l),styleId:s?s.styleId:Cc(l,"pStyle")??null,bottomBorder:s?Bg(s.paragraphPropertyNodes):It(i).bottom,borders:s?ya(s.paragraphPropertyNodes):It(i),shading:Dd(l),inheritedRunProperties:c,markRunProperties:u,tabStops:b,tabStopsCacheToken:xr(b),...r?{listItem:r}:{}}}var Lg=new WeakMap;function y0(e){let n=Lg.get(e);if(n!==void 0)return n;let t=o=>o.some(a=>a.localName==="pBdr"),r=t(e.docDefaultsParagraph);if(!r){for(let o of e.styles.values())if(t(o.paragraphProperties)){r=true;break}}return Lg.set(e,r),r}function Mg(e,n){return !n||!y0(n)?It(e):ya(Fo(n,e).paragraphPropertyNodes)}var b0=Object.freeze({keepNext:false,keepLines:false,widowControl:true});function Lc(e){let n=e?.val;return n!=="0"&&n!=="false"&&n!=="off"}function Eg(e){let n=false,t=false,r=true;for(let o of e)switch(o.localName){case "keepNext":n=Lc(o.attributes);break;case "keepLines":t=Lc(o.attributes);break;case "widowControl":r=Lc(o.attributes);break;}return !n&&!t&&r?b0:{keepNext:n,keepLines:t,widowControl:r}}function Fg(e,n,t,r,o){if(e<=n)return e;if(r.keepLines&&!o)return n;if(!r.widowControl||t<2)return e;let a=e;return t-a<2&&(a-=1),a-n===1&&(a-=1),a<n&&(a=n),a===n&&o?e:a}function Ng(e,n,t,r){let o=0,a=t;for(let i=n;i-n<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 x0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==void 0&&(t===e&&(t=[...e]),t[r]=`${t[r]}~mk~${o}`);}return t}function S0(e,n,t){let r=e;for(let o=0;o<e.length;o+=1){if(!n(o))continue;let a=t(o);if(a===null)continue;let i=o>0&&t(o-1)===a,s=o+1<e.length&&t(o+1)===a;r===e&&(r=[...e]),r[o]=`${r[o]}~cs~${i?1:0}${s?1:0}`;}return r}function R0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);if(o==="")continue;let a=r>0&&n(r-1)===o,i=r+1<e.length&&n(r+1)===o;t===e&&(t=[...e]),t[r]=`${t[r]}~bg~${a?1:0}${i?1:0}`;}return t}function w0(e,n){let t=e;for(let r=0;r<e.length;r+=1){let o=n(r);o!==""&&(t===e&&(t=[...e]),t[r]=`${t[r]}~toc~${o}`);}return t}function P0(e,n){let t=e,r=0;for(let o=e.length-2;o>=0;o-=1)n(o)&&r<8?(t===e&&(t=[...e]),t[o]=`${e[o]}~kn~${t[o+1]}`,r+=1):r=0;return t}function Ag(e,n){let t=S0(e,n.contextualSpacingAt,n.styleIdAt);return t=R0(t,n.borderGroupKeyAt),n.tocVerdicts.length>0&&(t=w0(t,r=>n.tocVerdicts[r])),t=x0(t,n.markerTextAt),t=P0(t,n.keepsNextAt),t}var I0=xo;function qn(e,n){if(e.kind!=="textValue"){for(let t of e.children)if(t.kind!=="textValue"&&t.namespaceUri===da$1&&t.localName===n)return t}}function Dg(e){if(e.kind==="textValue")return false;let n=qn(e,"paragraphProperties")??qn(e,"pPr");if(!n)return false;let t=qn(n,"runProperties")??qn(n,"rPr");return t===void 0?false:qn(t,"del")!==void 0||qn(t,"moveFrom")!==void 0}function _g(e,n){if(e.kind==="textValue"||n>I0)return true;let t=(r,o)=>{for(let a of r){if(a.kind==="textValue")continue;if(a.kind==="run"){for(let s of a.children){if(s.kind==="text"){for(let l of s.children)if(l.kind==="textValue"&&l.value.length>0)return false;continue}if(s.kind!=="runProperties")return false}continue}if(Lb$1(a)){if(o>=Kb$1)continue;let s=Nb$1(a);if(s&&!t(s,o+1))return false;continue}if((a.kind==="hyperlink"||a.kind==="revisionInsert"||a.kind==="revisionMoveTo")&&!_g(a,o+1))return false}return true};return t(e.children,n)}function Hg(e,n){if(n==="all-markup"||e.kind==="textValue")return false;let t=qn(e,"paragraphProperties")??qn(e,"pPr");if(!t)return false;let r=qn(t,"runProperties")??qn(t,"rPr");return r===void 0?false:(n==="proposed"?["del","moveFrom"]:["ins","moveTo"]).some(a=>qn(r,a)!==void 0)}function Mc(e,n="proposed"){return e.kind!=="paragraph"||n!=="proposed"||!Dg(e)?false:_g(e,0)}function v0(e){let n=e.root;if(n.localName==="hdr"||n.localName==="ftr")return n;let t=r=>{if(r.kind!=="textValue"){if(r.kind==="body")return r;for(let o of r.children){let a=t(o);if(a)return a}}};return t(n)}function T0(e,n){return !(e.kind==="paragraph"&&Mc(e,n))}var $g=new WeakMap;function Os(e){return $g.get(e)??null}function Xg(e,n){let t=n.children.filter(a=>zg(a)),r=e.flatMap(a=>a.children.filter(i=>!zg(i))),o={...n,children:[...t,...r]};return $g.set(o,{merged:o,members:e}),o}function zg(e){return e.kind!=="textValue"&&(e.kind==="paragraphProperties"||e.localName==="pPr")}function k0(e,n){if(n==="all-markup")return e.map(i=>i.block);let t=[],r=[],o=null,a=()=>{t.push(...jg(r)),r=[],o=null;};for(let{block:i,parentKey:s}of e){if(r.length>0&&s!==o&&a(),i.kind!=="paragraph"){a(),t.push(i);continue}let l=Hg(i,n);if((l||r.length>0)&&!C0(i,n)){a(),t.push(i);continue}if(l){r.push(i),o=s;continue}if(r.length===0){t.push(i);continue}let d=[...r,i];r=[],o=null,t.push(Xg(d,i));}return t.push(...jg(r)),t}function jg(e){if(e.length<2)return e;let n=e[e.length-1];return [Xg(e,n)]}function ja(e,n){return k0(O0(e),n).filter(r=>T0(r,n))}function O0(e){let n=[],t=(r,o,a)=>{for(let i of r)if(i.kind!=="textValue"){if(i.kind==="paragraph"||i.kind==="table"){n.push({block:i,parentKey:a});continue}Lb$1(i)&&o<Kb$1&&t(Ob$1(i),o+1,i.id);}};return t(e,0,""),n}var Gg=new WeakMap;function C0(e,n){let t=Gg.get(e),r=t?.get(n);if(r!==void 0)return r;let o=B0(e,n);return t?t.set(n,o):Gg.set(e,new Map([[n,o]])),o}function B0(e,n){if(!L0(e))return false;let t=ls(e,[],void 0,void 0,void 0,void 0,n),r=0;for(let o of t)r=Math.max(r,o.end);return r<=$d$1(e).length}function L0(e){let n=0,t=false,r=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===da$1&&o.localName==="fldChar"){let a=o.attributes.find(i=>i.localName==="fldCharType")?.value;a==="begin"?n+=1:a==="end"&&(n-=1,n<0&&(t=true));}for(let a of o.children)r(a);}};return r(e),n===0&&!t}var Wg=Xe$1(16);function Mt(e,n="all-markup"){let t=Wg.get(e),r=t?.[n];if(r)return r;let o=v0(e),a=o?ja(o.children,n):[];return t?t[n]=a:Wg.set(e,{[n]:a}),a}function Cs(e,n="all-markup"){return e.kind!=="note"?[]:ja(e.children,n)}function Ec(e,n="all-markup"){return e.kind==="textValue"?[]:ja(e.children,n)}var M0={state:"none"},Vg=(e,n)=>n.state==="omitted"?e:n;function Bs(e,n,t={}){return e.state==="omitted"?n:e.state==="none"?M0:e}function Fc(e,n){let t=Vg;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right),insideH:t(e.insideH,n.insideH),insideV:t(e.insideV,n.insideV)}}function Nc(e,n){let t=Vg;return {top:t(e.top,n.top),left:t(e.left,n.left),bottom:t(e.bottom,n.bottom),right:t(e.right,n.right)}}function Ls(e=1048576){let n=e|0;return {intervalsRemaining:n>0?n:0}}function Yg(e,n,t,r){let o=Math.max(0,Math.min(n|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]=E0(e[i],o,t,r);}return a}function E0(e,n,t,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(n,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}),t&&(t.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 F0(e,n){let t=0,r=e.length;for(;t<r;){let o=t+r>>1;e[o].start<=n?t=o+1:r=o;}return t}function Ac(e,n,t,r){r&&(r.columnLookups+=1);let o=e[n];if(!o||t<0)return;let a=F0(o,t)-1;if(a<0)return;let i=o[a];if(!(t>=i.end))return {cell:i.cell,cellIndex:i.cellIndex}}var Zg=256,qe={state:"omitted"},Ds={state:"none"},Jg={top:qe,left:qe,bottom:qe,right:qe,insideH:qe,insideV:qe},Qg={top:qe,left:qe,bottom:qe,right:qe},Kg={single:1,thick:2,double:3,dotted:4,dashed:5,triple:10},A0=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 No(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Dc(e,n){return e.attributes.find(t=>t.localName===n)?.value}function D0(e){return e===void 0||!/^\d{1,9}$/.test(e)?null:Number(e)}function _0(e){if(e===null)return .5;let n=e/8;return !Number.isFinite(n)||n<=0?.5:n>ha?ha:n}function _s(e){if(!e)return qe;let n=Dc(e,"val");if(!n)return qe;if(n==="nil"||n==="none")return Ds;let t=A0.get(n)??"single",r=Dc(e,"color"),o=r===void 0||r==="auto"?null:zi(r)??null;return {state:"edge",style:t,color:o,widthPt:_0(D0(Dc(e,"sz")))}}function eh(e,n){if(!e)return Qg;let t={top:qe,left:qe,bottom:qe,right:qe};for(let r of n){let o=r==="left"?"start":r==="right"?"end":void 0,a=No(e,r)??(o?No(e,o):void 0);t[r]=_s(a);}return t}function Hs(e){let n=e&&No(e,"tblBorders");return n?{...eh(n,["top","left","bottom","right"]),insideH:_s(No(n,"insideH")),insideV:_s(No(n,"insideV"))}:Jg}function zs(e){return eh(e&&No(e,"tcBorders"),["top","left","bottom","right"])}function _c(e){return e.state!=="edge"?0:Math.max(1,Math.round(e.widthPt*8))}function Ug(e){if(!e)return 0;let n=Number.parseInt(e.slice(0,2),16),t=Number.parseInt(e.slice(2,4),16),r=Number.parseInt(e.slice(4,6),16);return n+t+r}function nh(e,n,t=true){if(e.state==="omitted")return n.state==="omitted"?qe:n;if(n.state==="omitted")return e;if(e.state==="none")return n.state==="none"?Ds:n;if(n.state==="none")return e;let r=_c(e),o=_c(n);if(r>o)return e;if(o>r)return n;let a=Kg[e.style],i=Kg[n.style];if(a!==i)return a>i?e:n;let s=Ug(e.color),l=Ug(n.color);return s<l?e:l<s?n:t?e:n}function Ms(e){if(e.state==="edge")return {style:e.style,color:e.color,widthPt:e.widthPt}}function H0(e,n,t){return t?n==="top"||n==="bottom"?e.insideH:e.insideV:e[n]}function z0(e,n){return e===void 0&&n===void 0?true:!e||!n?false:e.style===n.style&&e.color===n.color&&e.widthPt===n.widthPt}function Es(e){if(e.length===0)return [];let n=[],t={...e[0]};for(let r=1;r<e.length;r+=1){let o=e[r];t.gridEnd===o.gridStart&&z0(t.edge,o.edge)?t={...t,gridEnd:o.gridEnd}:(n.push(t),t={...o});}return n.push(t),n}function Fs(e,n,t){let r=e.filter(a=>a.edge!==void 0);if(r.length!==1)return;let o=r[0];if(!(o.gridStart!==n||o.gridEnd!==t))return o.edge}function qg(e,n,t){let r=0,o=Math.min(t,e.length);for(let a=Math.max(0,n);a<o;a+=1)r+=e[a];return r}function j0(e){if(!(!e||e.style!=="double"))return ro(e.widthPt)}function Ns(e){return e==="dashed"?"dashed":e==="dotted"?"dotted":"solid"}function G0(e,n){return n?e==="outer"?n.insetPt:n.insetPt+n.strokePt+n.gapPt:0}function W0(e,n,t){return t?e==="outer"?n-t.insetPt:n-t.insetPt-t.strokePt-t.gapPt:n}function $0(e,n){return n?e==="outer"?n.insetPt+n.strokePt:n.insetPt+n.extentPt:0}function X0(e,n,t){return t?e==="outer"?n-t.insetPt-t.strokePt:n-t.insetPt-t.extentPt:n}function or(e,n){e.length>=Zg||!(n.width>0)||!(n.height>0)||e.push(n);}function V0(e,n,t,r,o,a,i,s,l,d,c){let u=ro(t.widthPt),{strokePt:f,gapPt:p,extentPt:m,insetPt:g}=u,b=Math.abs(r)<1e-6,h=Math.abs(o-a)<1e-6,x=Math.abs(r)<1e-6,I=Math.abs(o-i)<1e-6;if(n==="top"||n==="bottom"){let M=n==="top"?g:i-g-f,P=n==="top"?g+f+p:i-g-m;for(let L of ["outer","inner"]){let C=r,k=o;b&&(C=G0(L,s)),h&&(k=W0(L,a,l)),or(e,{side:n,role:L,color:t.color,cssStyle:"solid",x:C,y:L==="outer"?M:P,width:k-C,height:f});}return}let w=n==="left"?g:a-g-f,O=n==="left"?g+f+p:a-g-m;for(let M of ["outer","inner"]){let P=r,L=o;x&&(P=$0(M,d)),I&&(L=X0(M,i,c)),or(e,{side:n,role:M,color:t.color,cssStyle:"solid",x:M==="outer"?w:O,y:P,width:f,height:L-P});}}function Y0(e,n,t,r,o,a,i){let s=t.widthPt,l=Math.max(1,s),d=s*3+l*2;if(n==="top"||n==="bottom"){let u=n==="top"?0:i-d;for(let f=0;f<3;f+=1)or(e,{side:n,role:f===0?"outer":f===1?"middle":"inner",color:t.color,cssStyle:"solid",x:r,y:u+f*(s+l),width:o-r,height:s});return}let c=n==="left"?0:a-d;for(let u=0;u<3;u+=1)or(e,{side:n,role:u===0?"outer":u===1?"middle":"inner",color:t.color,cssStyle:"solid",x:c+u*(s+l),y:r,width:s,height:o-r});}function K0(e,n,t,r,o,a,i){let s=t.widthPt;n==="top"?or(e,{side:n,role:"edge",color:t.color,cssStyle:Ns(t.style),x:r,y:0,width:o-r,height:s}):n==="bottom"?or(e,{side:n,role:"edge",color:t.color,cssStyle:Ns(t.style),x:r,y:i-s,width:o-r,height:s}):n==="left"?or(e,{side:n,role:"edge",color:t.color,cssStyle:Ns(t.style),x:0,y:r,width:s,height:o-r}):or(e,{side:n,role:"edge",color:t.color,cssStyle:Ns(t.style),x:a-s,y:r,width:s,height:o-r});}function As(e,n){if(e.length===0)return;let t=e[0];return j0(t.edge)}function U0(e,n,t,r,o,a,i,s,l,d){let c=(F,y,ee)=>{let v=[];for(let E of y){if(!E.edge)continue;let _,A;ee?(_=qg(i,s,E.gridStart),A=qg(i,s,E.gridEnd)):(_=l[E.gridStart-d]??0,A=l[E.gridEnd-d]??a),v.push({side:F,gridStart:E.gridStart,gridEnd:E.gridEnd,startPt:_,endPt:A,edge:E.edge});}return v},u=c("top",e,true),f=c("left",n,false),p=c("bottom",t,true),m=c("right",r,false),g=[...u,...m,...p,...f],b=As(n),h=As(r),x=As(e),I=As(t),w=(F,y)=>F.length===1&&Math.abs(F[0].startPt)<1e-6&&Math.abs(F[0].endPt-y)<1e-6,O=w(u,o),M=w(f,a),P=w(p,o),L=w(m,a),C=[],k=(F,y,ee)=>{for(let v of y){let{edge:E,startPt:_,endPt:A}=v;E.style==="double"?V0(C,F,E,_,A,o,a,F==="top"||F==="bottom"?b:void 0,F==="top"||F==="bottom"?h:void 0,F==="left"||F==="right"?x:void 0,F==="left"||F==="right"?I:void 0):E.style==="triple"?Y0(C,F,E,_,A,o,a):ee||K0(C,F,E,_,A,o,a);}};k("top",u,O),k("left",f,M),k("bottom",p,P),k("right",m,L);let z={};return O&&u[0]&&(z.top=u[0].edge),M&&f[0]&&(z.left=f[0].edge),P&&p[0]&&(z.bottom=p[0].edge),L&&m[0]&&(z.right=m[0].edge),g.length>0&&(z.edgeSegments=g),C.length>0&&(z.strokes=C),z}function Hc(e,n,t,r,o,a){let i=e.length,s=e.map(u=>u.map(()=>({})));o&&(o.ownershipSlotsWritten=0,o.columnLookups=0);let l=Yg(e,t,o,a),d=(u,f,p)=>Bs(u.borders[f],H0(n,f,p),{}),c=(u,f,p,m)=>u.state==="none"&&f.state!=="edge"||f.state==="none"&&u.state!=="edge"?Ds:nh(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,b=u+g-1,h=u===0,x=b===i-1,I=m.gridColumn===0,w=m.gridColumn+m.gridSpan-1,O=w>=t-1,M=[];if(h)for(let _=m.gridColumn;_<=w;_+=1)M.push({gridStart:_,gridEnd:_+1,edge:Ms(d(m,"top",false))});let P=[];if(I)for(let _=u;_<=b;_+=1)P.push({gridStart:_,gridEnd:_+1,edge:Ms(d(m,"left",false))});let L=[];for(let _=m.gridColumn;_<=w;_+=1){let A;if(x)A=d(m,"bottom",false);else {let T=Ac(l,b+1,_,o);T?.cell.vMergeContinue?A=qe:A=c(m.borders.bottom,T?T.cell.borders.top:qe,d(m,"bottom",true),T?d(T.cell,"top",true):n.insideH);}L.push({gridStart:_,gridEnd:_+1,edge:Ms(A)});}let C=[];for(let _=u;_<=b;_+=1){let A;if(O)A=d(m,"right",false);else {let T=Ac(l,_,w+1,o);A=c(m.borders.right,T?T.cell.borders.left:qe,d(m,"right",true),T?d(T.cell,"left",true):n.insideV);}C.push({gridStart:_,gridEnd:_+1,edge:Ms(A)});}let k=Es(M),z=Es(P),F=Es(L),y=Es(C);if(!r){let _={},A=Fs(k,m.gridColumn,w+1),T=Fs(z,u,b+1),j=Fs(F,m.gridColumn,w+1),N=Fs(y,u,b+1);A&&(_.top=A),T&&(_.left=T),j&&(_.bottom=j),N&&(_.right=N);let V=[],Y=(G,K)=>{for(let $ of K)$.edge&&V.push({side:G,gridStart:$.gridStart,gridEnd:$.gridEnd,startPt:$.gridStart,endPt:$.gridEnd,edge:$.edge});};Y("top",k),Y("left",z),Y("bottom",F),Y("right",y),V.length>0&&(_.edgeSegments=V),s[u][p]=_;continue}let ee=r.cellBoxes[u][p],v=[0],E=0;for(let _=u;_<=b;_+=1){let A=r.rowBands[_];E+=A.height,v.push(E);}v.length>1&&(v[v.length-1]=ee.height),s[u][p]=U0(k,z,F,y,ee.width,ee.height,r.columnWidthsPt,m.gridColumn,v,u);}}return s}function Or(e){return e?"state"in e?e.state==="edge"?e.widthPt:0:e.widthPt:0}var zc=Jg,jc=Qg;var rh=31680/20,Zn=Object.freeze({type:"auto",value:0}),q0=100,Z0=Object.freeze({mm:72/25.4,cm:72/2.54,in:72,pt:1,pc:12,pi:12});function J0(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function Wc(e,n){return e.attributes.find(t=>t.localName===n)?.value}function oh(e){if(/^\d{1,9}$/.test(e)){let r=Number(e)/20;return Number.isFinite(r)?{kind:"length",pt:r}:null}let n=/^(\d{1,7}(?:\.\d{1,4})?)%$/.exec(e);if(n){let r=Number(n[1]);return Number.isFinite(r)?{kind:"percent",percent:r}:null}let t=/^(\d{1,9}(?:\.\d{1,4})?)(mm|cm|in|pt|pc|pi)$/.exec(e);if(t){let r=Number(t[1])*Z0[t[2]];return Number.isFinite(r)?{kind:"length",pt:r}:null}return null}function Cr(e){if(!e)return Zn;let n=Wc(e,"type");if(n!==void 0&&n!=="pct"&&n!=="dxa")return n==="nil"?{type:"nil",value:0}:Zn;let t=Wc(e,"w");if(t===void 0)return Zn;let r=oh(t);if(!r)return Zn;let o=/^\d{1,9}$/.test(t);if(r.kind==="percent"||o&&n==="pct"){let a=r.kind==="percent"?r.percent:Number(t)/50;return !Number.isFinite(a)||a<=0?Zn:{type:"pct",value:Math.min(a,q0)}}return !Number.isFinite(r.pt)||r.pt<=0?Zn:{type:"dxa",value:Math.min(r.pt,rh)}}function Ga(e,n){if(!e)return;let t=Cr(e);if(t.type==="dxa")return Math.min(t.value,n)}function ah(e){let n=J0(e,"tblGrid");if(!n)return [];let t=[];for(let r of n.children)if(r.kind!=="textValue"&&r.localName==="gridCol"&&(t.push(r),t.length>=1024))break;return t}function Q0(e){let n=[];for(let t of e){let r=Wc(t,"w"),o=r===void 0?null:oh(r);if(!o||o.kind!=="length"||!Number.isFinite(o.pt)||o.pt<=0){n.push(void 0);continue}n.push(o.pt>rh?void 0:o.pt);}return n}var Gc=1,th=.001;function eI(e,n,t,r){let o=[];for(let i=0;i<t;i+=1)o.push(e[i]);let a=n.filter(i=>i.start<t&&(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,t);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 ih(e){let{columnCount:n,tableWidth:t}=e,r=Number.isFinite(e.contentWidthPt)&&e.contentWidthPt>0,o=r?e.contentWidthPt:Gc,a=t.type==="dxa"?t.value:t.type==="pct"?o*t.value/100:0,i=Q0(e.gridCols),s=eI(i,e.claims,n,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(n-d,1):o/n,x=Math.max(o-l,0)/d,I=Math.max(Math.min(x,h),Gc);for(let w of s)c.push(w??I);}else for(let h of s)c.push(h);let u=c.reduce((h,x)=>h+x,0);if(!Number.isFinite(u)||u<=0)return new Array(n).fill(o/n);let f=n*Gc,p=e.layoutFixed||!r?Number.POSITIVE_INFINITY:o,m=Math.max(a>0?Math.min(a,p):Math.min(u,p),f),g=t.type==="pct"&&a>0;if(u<=m+th&&!g||Math.abs(u-m)<=th)return c;let b=m/u;return c.map(h=>h*b)}var Ws=16,$a=3,Gs=31680/20,Sh=31680/20,sh=1023,nI=256,lh=31680/20;function dh(e){let n=e&&he(e,"jc");if(!n)return;let t=_e(n,"val");if(t==="center")return "center";if(t==="right"||t==="end")return "right";if(t==="left"||t==="start")return "left"}var ch=31680/20,Rh={top:$a,right:$a,bottom:$a,left:$a};function he(e,n){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}function _e(e,n){return e.attributes.find(t=>t.localName===n)?.value}function tI(e){let n=e&&he(e,"gridSpan"),t=n&&_e(n,"val");if(!t||!/^\d{1,7}$/.test(t))return 1;let r=Number(t);return Number.isInteger(r)&&r>1?Math.min(r,1024):1}function uh(e,n){let t=e&&he(e,n),r=t&&_e(t,"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 rI(e){let n=e&&he(e,"vMerge");return n?_e(n,"val")!=="restart":false}function oI(e){let n=e&&he(e,"vAlign"),t=n&&_e(n,"val");return t==="center"?"center":t==="bottom"?"bottom":"top"}function fh(e){return Ad(e&&he(e,"shd"))}function ph(e,n){let t=e&&he(e,n);if(!t)return false;let r=_e(t,"val");return r===void 0||r!=="0"&&r!=="false"&&r!=="off"}var Wa=Object.freeze({rule:"auto"});function aI(e){let n=e&&he(e,"trHeight");if(!n)return Wa;let t=_e(n,"hRule"),r=t==="auto"||t==="exact"||t==="atLeast"?t:void 0;if(r==="auto")return Wa;let o=_e(n,"val");if(o===void 0||!/^\d{1,9}$/.test(o))return Wa;let a=Number(o);if(!Number.isFinite(a)||a<=0)return Wa;let i=Math.min(a/20,Sh);return i>0?{rule:r==="exact"?"exact":"atLeast",valuePt:i}:Wa}function js(e){if(!e)return;let n=_e(e,"w");if(n===void 0||!/^\d{1,9}$/.test(n))return;let t=Number(n);if(!Number.isFinite(t)||t<0)return;let r=t/20;return r>Gs?Gs:r}function $c(e){if(!e)return {};let n=js(he(e,"top")),t=js(he(e,"left")??he(e,"start")),r=js(he(e,"bottom")),o=js(he(e,"right")??he(e,"end"));return {...n===void 0?{}:{top:n},...t===void 0?{}:{left:t},...r===void 0?{}:{bottom:r},...o===void 0?{}:{right:o}}}function Xc(e,n){return {top:n.top??e.top,right:n.right??e.right,bottom:n.bottom??e.bottom,left:n.left??e.left}}function Xa(e,n){let t=e.columnWidthsPt.reduce((o,a)=>o+a,0),r=n-t;return !Number.isFinite(r)||r<=0?0:e.alignment==="center"?r/2:e.alignment==="right"?r:Math.min(e.indentPt,r)}function mh(e){if(e==="page")return "page";if(e==="margin")return "margin";if(e==="text")return "text"}function gh(e){if(e===void 0||!/^-?\d{1,9}$/.test(e))return;let n=Number(e);if(!Number.isFinite(n))return;let t=n/20;return Math.max(-ch,Math.min(ch,t))}function hh(e){let n=e&&he(e,"tblpPr");if(!n)return;let t=_e(n,"tblpXSpec"),r=t==="left"||t==="center"||t==="right"||t==="inside"||t==="outside"?t:void 0,o=_e(n,"tblpYSpec"),a=o==="inline"||o==="top"||o==="center"||o==="bottom"||o==="inside"||o==="outside"?o:void 0;return {horzAnchor:mh(_e(n,"horzAnchor"))??"text",vertAnchor:mh(_e(n,"vertAnchor"))??"text",...r?{xSpec:r}:{},xPt:gh(_e(n,"tblpX"))??0,...a?{ySpec:a}:{},yPt:gh(_e(n,"tblpY"))??0}}function wh(e,n,t){let r=t[e.horzAnchor],o=r.width-n,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=t.page.left+t.page.width;return Math.max(t.page.left,Math.min(a,i))}var iI=Object.freeze({firstRow:false,lastRow:false,firstColumn:false,lastColumn:false,rowBanding:true,columnBanding:true});function Et(e,n){let t=_e(e,n);if(t!==void 0)return t!=="0"&&t!=="false"&&t!=="off"}function sI(e){let n=e&&he(e,"tblLook");if(!n)return iI;let t=_e(n,"val"),r=t&&/^[0-9A-Fa-f]{1,4}$/.test(t)?Number.parseInt(t,16):0;return {firstRow:Et(n,"firstRow")??(r&32)!==0,lastRow:Et(n,"lastRow")??(r&64)!==0,firstColumn:Et(n,"firstColumn")??(r&128)!==0,lastColumn:Et(n,"lastColumn")??(r&256)!==0,rowBanding:Et(n,"noHBand")===void 0?(r&512)===0:!Et(n,"noHBand"),columnBanding:Et(n,"noVBand")===void 0?(r&1024)===0:!Et(n,"noVBand")}}var Vc=["firstRow","lastRow","firstCol","lastCol","band1Vert","band2Vert","band1Horz","band2Horz","nwCell","neCell","swCell","seCell"],yh=["firstRow","lastRow","firstColumn","lastColumn","oddVBand","evenVBand","oddHBand","evenHBand","firstRowFirstColumn","firstRowLastColumn","lastRowFirstColumn","lastRowLastColumn"];function bh(e,n){let t=e&&he(e,"cnfStyle");if(!t)return;let r=_e(t,"val");if(r&&/^[01]{1,12}$/.test(r))for(let o=0;o<r.length&&o<Vc.length;o+=1)r[o]==="1"&&n.add(Vc[o]);for(let o=0;o<yh.length;o+=1)Et(t,yh[o])===true&&n.add(Vc[o]);}var lI=["band1Vert","band2Vert","band1Horz","band2Horz","firstCol","lastCol","firstRow","lastRow","nwCell","neCell","swCell","seCell"];function dI(e){let n=new Set;bh(e.rowProperties,n),bh(e.cellProperties,n);let{look:t,rowIndex:r,rowCount:o,gridColumn:a,gridSpan:i,columnCount:s}=e,l=n.has("firstRow")||t.firstRow&&r===0,d=n.has("lastRow")||t.lastRow&&r===o-1,c=n.has("firstCol")||t.firstColumn&&a===0,u=n.has("lastCol")||t.lastColumn&&a+i>=s;if(!(n.has("band1Vert")||n.has("band2Vert"))&&t.columnBanding&&!c&&!u){let g=a-(t.firstColumn?1:0);n.add(g%2===0?"band1Vert":"band2Vert");}if(!(n.has("band1Horz")||n.has("band2Horz"))&&t.rowBanding&&!l&&!d){let g=r-(t.firstRow?1:0);n.add(g%2===0?"band1Horz":"band2Horz");}c&&n.add("firstCol"),u&&n.add("lastCol"),l&&n.add("firstRow"),d&&n.add("lastRow"),l&&c&&n.add("nwCell"),l&&u&&n.add("neCell"),d&&c&&n.add("swCell"),d&&u&&n.add("seCell");let m=[];for(let g of lI)n.has(g)&&m.push(g);return m}var xh=new WeakMap;function Ao(e,n,t,r,o="all-markup"){let a=xh.get(e);if(a&&a.contentWidthPt===n&&a.depth===t&&a.styleCascade===r&&a.displayMode===o)return a.structure;let i=cI(e,n,t,r,o);return xh.set(e,{contentWidthPt:n,depth:t,styleCascade:r,displayMode:o,structure:i}),i}function cI(e,n,t,r,o){if(t>=Ws||e.kind!=="table")return null;let a=he(e,"tblPr"),i=a&&he(a,"tblStyle")?_e(he(a,"tblStyle"),"val"):void 0,s=r?Og(r,i):_a,l=sI(a),d=Rh,c=zc;for(let j of s.tablePropertyNodes)d=Xc(d,$c(he(j,"tblCellMar"))),c=Fc(c,Hs(j));let u=Xc(d,$c(a&&he(a,"tblCellMar"))),f=Fc(c,a?Hs(a):zc),p=new Map,m=j=>{if(s===_a)return Oc;let N=j.join("|"),V=p.get(N);if(V)return V;let Y=Cg(s,j);return p.size<nI&&p.set(N,Y),Y},g=[],b=[],h=1;for(let j of Be(e.children)){if(j.kind!=="tableRow")continue;let N=he(j,"trPr"),V=[],Y=[],G=[],K=Math.min(uh(N,"gridBefore"),sh);K>0&&b.push({start:0,span:K,preferred:Cr(N&&he(N,"wBefore"))});let $=K,J=Be(j.children);for(let ke of J){if(ke.kind!=="tableCell")continue;let be=he(ke,"tcPr"),ne=Math.min($,sh),xe=Math.min(tI(be),1024-ne),we=Cr(be&&he(be,"tcW"));V.push(ne),Y.push(xe),G.push(we),b.push({start:ne,span:xe,preferred:we}),$=ne+xe;}let U=uh(N,"gridAfter"),re=Math.min($+U,1024);U>0&&$<1024&&b.push({start:$,span:Math.min(U,1024-$),preferred:Cr(N&&he(N,"wAfter"))}),re>h&&(h=re),g.push({node:j,cells:J,properties:N,starts:V,spans:Y,preferred:G,gridColumns:re});}let x=ah(e),I=x.length>0?x.length:h,w=g.length,O=[];for(let j=0;j<g.length;j+=1){let N=g[j],V=N.node,Y=N.properties,G=0,K=[];for(let be of N.cells){if(be.kind!=="tableCell")continue;let ne=he(be,"tcPr"),xe=N.starts[G],we=N.spans[G],Qe=N.preferred[G]??Zn,ye=dI({look:l,rowIndex:j,rowCount:w,gridColumn:xe,gridSpan:we,columnCount:I,rowProperties:Y,cellProperties:ne});G+=1;let Ae,Ke=jc;for(let Ge of ye){let Gn=s.conditional.get(Ge);if(!Gn)continue;let Wn=he(Gn,"tcPr");Ae=fh(Wn)??Ae,Ke=Nc(Ke,zs(Wn));}let Rn=fh(ne)??Ae,cn=Xc(u,$c(ne&&he(ne,"tcMar"))),et=ja(be.children,o);K.push({id:be.id,gridSpan:we,gridColumn:xe,...x[xe]?.id?{gridColumnId:x[xe].id}:{},vMergeContinue:rI(ne),vAlign:oI(ne),margins:cn,borders:Nc(Ke,ne?zs(ne):jc),...Rn===void 0?{}:{shading:Rn},preferredWidth:Qe,styleFormatting:m(ye),blocks:et});}let $=Y?he(Y,"ins")??he(Y,"del"):void 0,J=$?$.localName==="ins"?"insert":"delete":void 0,U=$&&_e($,"id"),re=$&&_e($,"author"),ke=$&&_e($,"date");O.push({id:V.id,...J?{revisionKind:J}:{},...U!==void 0?{revisionId:U}:{},...re!==void 0?{revisionAuthor:re}:{},...ke!==void 0?{revisionDate:ke}:{},isHeader:ph(Y,"tblHeader"),cantSplit:ph(Y,"cantSplit"),height:aI(Y),cells:K});}let M=Zn,P,L,C,k,z;for(let j of s.tablePropertyNodes){let N=he(j,"tblW");N&&(M=Cr(N));let V=he(j,"tblLayout");V&&(P=_e(V,"type")==="fixed"),L=Ga(he(j,"tblInd"),lh)??L,C=dh(j)??C,k=Ga(he(j,"tblCellSpacing"),Gs)??k,z=hh(j)??z;}let F=a&&he(a,"tblW"),y=F?Cr(F):M,ee=a&&he(a,"tblLayout"),v=ee?_e(ee,"type")==="fixed":P??false,E=Ga(a&&he(a,"tblInd"),lh)??L??0,_=dh(a)??C??"left",A=t===0?hh(a)??z:void 0,T=Ga(a&&he(a,"tblCellSpacing"),Gs)??k??0;return {columnWidthsPt:ih({gridCols:x,claims:b,columnCount:I,contentWidthPt:n,tableWidth:y,layoutFixed:v}),rows:O,tableWidth:y,layoutFixed:v,indentPt:E,alignment:_,...A?{float:A}:{},cellSpacingPt:T,tableBorders:f,defaultMargins:u}}function $s(e){let n=[],t=0;for(let r of e.members){let o=$d$1(r).length;n.push({paragraphId:r.id,base:t,length:o}),t+=o;}return {members:n,total:t}}function Yc(e,n){let t;for(let r of e.members){if(r.base>n)break;(t===void 0||r.length>0||r.base>t.base)&&(t=r);}return t??e.members[e.members.length-1]}function Ph(e,n){let t=Yc(n,e.start);if(!t)return e;let r=e.end-t.base;return {paragraphId:t.paragraphId,start:e.start-t.base,end:Math.min(r,t.length)}}function uI(e,n){return {...e,range:Ph(e.range,n)}}function Xs(e,n){return e.map(t=>{let r=t.spans.map(u=>uI(u,n)),o=r[0],a=t.drawings?.map(u=>{let f=Yc(n,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))}:Ph(t.range,n),d=a,c=t.deletedRanges?.map(u=>({deleted:u,member:Yc(n,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 {...t,range:l,spans:r,...d?{drawings:d}:{},...c?{deletedRanges:c}:{}}})}var Uc=512,vh=9,Jn=31680/20,fI=8,pI=128;function Va(e,n){return e.kind!=="textValue"&&e.namespaceUri===da$1&&e.localName===n}function Ze(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function On(e,n){for(let t of e.children)if(Va(t,n))return t}function Ft(e,n=false){return e===void 0||!(n?/^-?\d{1,9}$/:/^\d{1,9}$/).test(e)?null:Number(e)}function mI(e){let n=e/20;return !Number.isFinite(n)||n<=0?0:n>Jn?Jn:n}function Kc(e){let n=e/20;return Number.isFinite(n)?n>Jn?Jn:n<-Jn?-Jn:n:0}function gI(e){let n={left:0,right:0,hanging:0,firstLine:0};if(!e)return n;let t=On(e,"ind");if(!t)return n;let r=Ft(Ze(t,"left")??Ze(t,"start"),true),o=Ft(Ze(t,"right")??Ze(t,"end"),true),a=Ft(Ze(t,"hanging")),i=Ft(Ze(t,"firstLine"),true);return {left:r===null?0:Kc(r),right:o===null?0:Kc(o),hanging:a===null?0:mI(a),firstLine:i===null?0:Kc(i),stated:{left:r!==null,right:o!==null,firstLineOffset:a!==null||i!==null}}}function hI(e){return e==="space"?"space":e==="nothing"?"nothing":"tab"}function yI(e){return e==="center"?"center":e==="right"||e==="end"?"right":"left"}function bI(e,n){let t=On(e,n);if(!t)return false;let r=Ze(t,"val");return r!=="0"&&r!=="false"&&r!=="off"}function Ih(e,n){let t=On(e,n);if(!t)return;let r=Ze(t,"val");if(!(r===void 0||r.length===0||r.length>pI))return r}function xI(e,n){for(let t of e){if(t.localName!==n)continue;let r=t.attributes?.val;return !(r==="0"||r==="false")}return false}function Th(e){let n=Ft(Ze(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=On(e,"start"),r=1;if(t){let h=Ft(Ze(t,"val"));h!==null&&h>=0&&(r=Math.min(h,9999));}let o=On(e,"numFmt"),a=(o?Ze(o,"val"):void 0)??"decimal",i=On(e,"lvlText"),s=i?Ze(i,"val")??"":"",l=On(e,"lvlJc"),d=yI(l?Ze(l,"val"):void 0),c=On(e,"suff"),u=hI(c?Ze(c,"val"):void 0),f=On(e,"lvlRestart"),p;if(f){let h=Ft(Ze(f,"val"));h!==null&&h>=0&&h<=9&&(p=h);}let m=On(e,"pPr"),g=On(e,"rPr"),b=g?po(g):[];return {ilvl:n,start:r,numFmt:a.length>64?"decimal":a,lvlText:s.length>64?s.slice(0,64):s,lvlJc:d,suff:u,indent:gI(m),...p!==void 0?{lvlRestart:p}:{},isLgl:bI(e,"isLgl"),runProperties:b,vanish:xI(b,"vanish")}}function SI(e){let n=Ze(e,"abstractNumId");if(n===void 0||n.length===0||n.length>64)return null;let t=new Map;for(let a of e.children){if(!Va(a,"lvl"))continue;if(t.size>=9)break;let i=Th(a);i&&!t.has(i.ilvl)&&t.set(i.ilvl,i);}let r=Ih(e,"numStyleLink"),o=Ih(e,"styleLink");return {abstractNumId:n,levels:t,...r!==void 0?{numStyleLink:r}:{},...o!==void 0?{styleLink:o}:{}}}function RI(e){let n=Ft(Ze(e,"ilvl"));if(n===null||n<0||n>8)return null;let t=On(e,"startOverride"),r;if(t){let i=Ft(Ze(t,"val"));i!==null&&i>=0&&(r=Math.min(i,9999));}let o=On(e,"lvl"),a=o?Th(o)??void 0:void 0;return r===void 0&&a===void 0?{ilvl:n,override:{}}:{ilvl:n,override:{...r!==void 0?{startOverride:r}:{},...a?{level:a}:{}}}}function wI(e){let n=Ze(e,"numId");if(n===void 0||n.length===0||n.length>64)return null;let t=On(e,"abstractNumId"),r=t?Ze(t,"val"):void 0;if(!r||r.length>64)return null;let o=new Map;for(let a of e.children){if(!Va(a,"lvlOverride"))continue;if(o.size>=vh)break;let i=RI(a);i&&!o.has(i.ilvl)&&o.set(i.ilvl,i.override);}return {numId:n,abstractNumId:r,overrides:o}}function PI(e){let n=new Map,t=new Map;if(!e)return {abstractNums:n,nums:t};let r=0,o=0;for(let a of e.children){if(Va(a,"abstractNum")){if(r>=Uc)continue;r+=1;let i=SI(a);i&&!n.has(i.abstractNumId)&&n.set(i.abstractNumId,i);continue}if(Va(a,"num")){if(o>=Uc)continue;o+=1;let i=wI(a);i&&!t.has(i.numId)&&t.set(i.numId,i);}}return {abstractNums:n,nums:t}}function II(e,n,t){let r=new Set([n.abstractNumId]),o=n;for(let a=0;a<fI;a+=1){let i=o.numStyleLink;if(i===void 0)return o;let s=t(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 kh(e,n){let t=false,r=new Map(e.abstractNums);for(let[o,a]of e.abstractNums){if(a.numStyleLink===void 0)continue;let i=II(e,a,n);!i||i.levels===a.levels||i.levels.size===0||(r.set(o,{...a,levels:i.levels}),t=true);}return t?{abstractNums:r,nums:e.nums}:e}function Do(e,n,t){if(t<0||t>8)return null;let r=e.nums.get(n);if(!r)return null;let o=e.abstractNums.get(r.abstractNumId);if(!o)return null;let a=r.overrides.get(t),i=a?.level??o.levels.get(t);return i?{abstractNumId:r.abstractNumId,level:i,...a?.startOverride!==void 0?{startOverride:a.startOverride}:{}}:null}var qc=Object.freeze({abstractNums:new Map,nums:new Map});function vI(e,n){let t=e.nums.get(n),r=[];for(let o=0;o<=8;o+=1){let a=Do(e,n,o);if(!a){r.push(1);continue}let i=t?.overrides.get(o)?.startOverride;r.push(i??a.level.start);}return r}function TI(e,n,t){let r=[];for(let o=0;o<=8;o+=1){let a=Do(e,n,o);r.push(a?.level.numFmt??"decimal");}return {formats:r,starts:[...t]}}function kI(e,n){if(n===0)return null;if(n===void 0)return e-1;let t=n-1;return t>=e?null:t}function Zc(e){let n=new Map,t=new Map,r=new Map,o=a=>{let i=n.get(a);i||(i=[0,0,0,0,0,0,0,0,0],n.set(a,i));let s=t.get(a);s||(s=[false,false,false,false,false,false,false,false,false],t.set(a,s));let l=r.get(a);return l||(l=vI(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=Do(e,a,i);if(!s)return null;let{abstractNumId:l,level:d}=s,{counters:c,initialized:u,starts:f}=o(a),{formats:p}=TI(e,a,f);for(let w=i+1;w<=8;w+=1){let O=Do(e,a,w);if(!O)continue;let M=kI(w,O.level.lvlRestart);M!==null&&i<=M&&(u[w]=false);}let m=f[i]??d.start;u[i]?c[i]+=1:(c[i]=m,u[i]=true);let g=c.slice(),b=u.slice(),h=g.map((w,O)=>b[O]?w:f[O]??1),x=d.isLgl?p.map(w=>w==="bullet"||w==="none"?w:"decimal"):p,I=d.vanish?"":d.numFmt==="bullet"&&!/%[1-9]/.test(d.lvlText)?d.lvlText:Zd(d.lvlText,h,x);return {abstractNumId:l,numId:a,ilvl:i,level:d,counters:g,markerText:I}}}}var eu=new WeakMap;function XL(e,n){let t=n.dependencyKeys.size===0||[...n.dependencyKeys].every(r=>r===g.story);eu.set(e,{preservesNumberedSequence:n.impact==="text-local"&&!n.structural&&n.created.size===0&&n.deleted.size===0&&t});}function CI(e){let n=eu.get(e);return eu.delete(e),n}function BI(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(",")}function nu(e){return e.kind!=="textValue"}function Oh(e,n){for(let t of e.attributes)if(t.localName===n)return t.value}function Vs(e,n){for(let t of e.children)if(nu(t)&&t.localName===n)return t}function tu(e){let n=null;for(let t of e){if(!nu(t))continue;let r=Vs(t,"numPr");if(!r)continue;let o=Vs(r,"ilvl"),a=Vs(r,"numId"),i=a?Oh(a,"val"):void 0,s=o?Oh(o,"val"):"0";if(!i||i==="0"){n=null;continue}if(i.length>64){n=null;continue}let l=/^\d{1,2}$/.test(s??"")?Number(s):0;if(l<0||l>8){n=null;continue}n={numId:i,ilvl:l};}return n}function LI(e,n){let t=new Set,r=e.styles.get(n);for(let o=0;r!==void 0&&o<Ts;o+=1){if(t.has(r.styleId))return;t.add(r.styleId);let a=r.paragraphPropertiesNode,i=a?tu([a]):null;if(i)return i.numId;r=r.basedOn===null?void 0:e.styles.get(r.basedOn);}}var Jc=new WeakMap;function Ya(e,n){if(!n)return e;let t=Jc.get(e);if(t&&t.styleCascade===n)return t.linked;let r=kh(e,a=>LI(n,a)),o={styleCascade:n,linked:r};return Jc.set(e,o),Jc.set(r,o),r}function Ch(e){return Number.isFinite(e)?e>Jn?Jn:e<-Jn?-Jn:e:0}function Bh(e){let n=null;for(let t of e){if(t.localName!=="ind")continue;let r=t.attributes?.hanging,o=t.attributes?.firstLine;r===void 0&&o===void 0||(n={hanging:r!==void 0&&/^\d{1,9}$/.test(r)?Ch(Number(r)/20):0,firstLine:o!==void 0&&/^-?\d{1,9}$/.test(o)?Ch(Number(o)/20):0});}return n}function Lh(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.left!==void 0||n.attributes?.start!==void 0))}function Mh(e){return e.some(n=>n.localName==="ind"&&(n.attributes?.right!==void 0||n.attributes?.end!==void 0))}function Ah(e,n,t=[]){let r=e.stated??{left:false,right:false,firstLineOffset:false},o=Da(n),a=Da(t),i={hanging:e.hanging,firstLine:e.firstLine},s=Lh(t)?a.left:r.left?e.left:Lh(n)?o.left:e.left,l=Mh(t)?a.right:r.right?e.right:Mh(n)?o.right:e.right,d=Bh(t)??(r.firstLineOffset?i:Bh(n)??i);return {left:s,right:l,...d}}function ru(e,n=8){let t=[],r=(o,a)=>{for(let i of o){if(i.kind==="paragraph"){t.push(i);continue}if(!(i.kind!=="table"||a>=n)){for(let s of Be(i.children))if(s.kind==="tableRow")for(let l of Be(s.children)){if(l.kind!=="tableCell")continue;let d=Pb$1(l.children);r(d,a+1);}}}};return r(e,0),t}var Eh=new WeakMap;function Dh(e,n){let t=Eh.get(e);if(t&&t.styleCascade===n)return t;let r=e.children.find(l=>l.kind==="paragraphProperties"),o=n?Fo(n,r):null,a=o?o.paragraphPropertyNodes:r?[r]:[],i=r&&nu(r)?Vs(r,"rPr"):void 0,s={styleCascade:n,numPr:tu(a),inheritedParagraphProperties:o?.inheritedParagraphProperties??[],directProps:kn(r),inheritedMarkProps:o?o.markRunProperties:kn(i),perLevel:new WeakMap};return Eh.set(e,s),s}function Ys(e,n,t,r){let o=new Map;if(n.nums.size===0)return o;let a=Ya(n,t),i=Zc(a);for(let s of ru(e)){let l=Dh(s,t),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 b=Ah(c.level.indent,l.inheritedParagraphProperties,l.directProps),h=Lt(l.inheritedMarkProps,c.level.runProperties,t);u={indent:b,markerStyle:Ee(h,t?.themeFonts)},l.perLevel.set(c.level,u);}let{indent:f,markerStyle:p}=u,m=mo(c.markerText,p.fontFamily,r),g=[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,BI(p)].join("|");o.set(s.id,{numId:c.numId,ilvl:c.ilvl,abstractNumId:c.abstractNumId,numFmt:c.level.numFmt,markerText:m,markerAlign:c.level.lvlJc,suffix:c.level.suff,indent:f,markerStyle:p,cacheToken:g});}return o}var _h=new WeakMap,Hh=new WeakMap;function Fh(e,n,t){let r=t?Hh.get(t):_h.get(n);if(r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable)return r}function MI(e,n,t){n?Hh.set(n,t):_h.set(e,t);}function zh(e,n,t){if(e.listItems===void 0){let i=Fh(e,n,t);if(i&&t===void 0)return {...e,numberingIndex:i.linkedIndex,...i.listItems?{listItems:i.listItems}:{}}}let r=e.listItems===void 0?Fh(e,n,t):void 0,o=r&&r.rawIndex===e.numberingIndex&&r.styleCascade===e.styleCascade&&r.isFontAvailable===e.isFontAvailable?r.linkedIndex:Ya(e.numberingIndex??qc,e.styleCascade),a=e.listItems??(o.nums.size>0?AI(n,e.numberingIndex,o,e.styleCascade,e.isFontAvailable,t):void 0);return e.listItems===void 0&&MI(n,t,{rawIndex:e.numberingIndex,styleCascade:e.styleCascade,isFontAvailable:e.isFontAvailable,linkedIndex:o,listItems:a}),{...e,numberingIndex:o,...a?{listItems:a}:{}}}function Br(e,n){return zh(e,n,void 0)}function jh(e,n,t){return zh(e,n,t)}var Nh=new WeakMap,EI=Object.freeze([]);function FI(e,n){let t=Nh.get(e);if(t&&t.styleCascade===n)return t.numbered;let r=ru([e]).filter(a=>Dh(a,n).numPr!==null),o=r.length>0?r:EI;return Nh.set(e,{styleCascade:n,numbered:o}),o}var _o=new WeakMap,Qc=new WeakMap;function NI(e,n){return e.length===n.length&&e.every((t,r)=>{let o=n[r];if(!o||t.id!==o.id)return false;let a=t.children.find(s=>s.kind==="paragraphProperties"),i=o.children.find(s=>s.kind==="paragraphProperties");return a===i})}function AI(e,n,t,r,o,a){let i=e[0],s=e[e.length-1],l=a?Qc.get(a):(i?_o.get(i):void 0)??(s?_o.get(s):void 0);if((a?CI(a):void 0)?.preservesNumberedSequence&&l&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o)return l.listItems;let c=new Array(e.length),u=l!==void 0&&l.rawIndex===n&&l.styleCascade===r&&l.isFontAvailable===o&&l.blocks.length===e.length;for(let m=0;m<e.length;m+=1){let g=e[m],b=l&&l.blocks[m]===g?l.numberedByBlock[m]:FI(g,r);c[m]=b,u&&!NI(b,l.numberedByBlock[m])&&(u=false);}if(l&&u){let m={...l,blocks:e,numberedByBlock:c};return a?Qc.set(a,m):(i&&_o.set(i,m),s&&s!==i&&_o.set(s,m)),l.listItems}let f=Ys(e,t,r,o),p={rawIndex:n,styleCascade:r,isFontAvailable:o,blocks:e,numberedByBlock:c,listItems:f};return a?Qc.set(a,p):(i&&_o.set(i,p),s&&s!==i&&_o.set(s,p)),f}function Ks(e,n,t,r){if((!e.markerText||e.indent.hanging<=0&&n<=0)&&!e.markerText||!e.markerText)return null;let o=e.indent.left,a=e.indent.hanging,i=Math.min(0,o),s=Math.max(i,o-a),l=Math.max(a,n),d=s;return e.markerAlign==="right"?d=o-n:e.markerAlign==="center"&&(d=s+(l-n)/2),d<i&&(d=i),{x:d,y:t,width:Math.max(n,0),height:r}}function DI(e,n,t=so,r=Number.POSITIVE_INFINITY){if(!e.markerText)return 0;let o=n.measure(e.markerText,e.markerStyle),a=Ks(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+n.measure(" ",e.markerStyle)-i:s<=i?0:lo(t,s,r).positionPt-i}function Us(e,n,t,r,o){return e?DI(e,t,r,o===void 0?void 0:n.left+o):n.hanging>0?-n.hanging:n.firstLine}function qs(e,n,t,r=0){if(!e||!e.markerText||!t)return;let o=n.measure(e.markerText,e.markerStyle),a=Ks(e,o,t.y,t.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}}var Gh=new WeakMap,Wh=new WeakMap,$h=new WeakMap,Xh=new WeakMap;function Vh(e){let n=Xh.get(e);if(n)return n;let t=new Set,r=[];for(let o of $e(e)){for(let a of o.lines)for(let i of dn(a))t.has(i.paragraphId)||(t.add(i.paragraphId),r.push(i.paragraphId));o.lines.length===0&&!t.has(o.paragraphId)&&(t.add(o.paragraphId),r.push(o.paragraphId));}return Xh.set(e,r),r}function Lr(e){let n=Gh.get(e);if(n)return n;let t=new Set,r=[];for(let o of e.pages)for(let a of Vh(o))t.has(a)||(t.add(a),r.push(a));return Gh.set(e,r),r}function Ka(e){let n=Wh.get(e);if(n)return n;let t=new Map;for(let[r,o]of Lr(e).entries())t.set(o,r);return Wh.set(e,t),t}function Yh(e){let n=$h.get(e);if(n)return n;let t=new Set,r=[],o=a=>{for(let i of An(a)){for(let s of i.lines)for(let l of dn(s))t.has(l.paragraphId)||(t.add(l.paragraphId),r.push(l.paragraphId));i.lines.length===0&&!t.has(i.paragraphId)&&(t.add(i.paragraphId),r.push(i.paragraphId));}};for(let a of e.pages){for(let i of Vh(a))t.has(i)||(t.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 $h.set(e,r),r}var Kh=new WeakMap;function ou(e){let n=Kh.get(e);if(n)return n;let t=[...$e(e)];for(let r of [e.header,e.footer])r&&t.push(...An(r.fragments));for(let r of [e.footnotes,e.endnotes])if(r)for(let o of r.notes)t.push(...An(o.fragments));return Kh.set(e,t),t}var Uh=new WeakMap;function dn(e){let n=Uh.get(e);if(n)return n;let t={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)?_I(e):[t];return Uh.set(e,o),o}function _I(e){let n=[];for(let t of e.spans){let r=n[n.length-1];if(r&&r.paragraphId===t.range.paragraphId){n[n.length-1]={...r,start:Math.min(r.start,t.range.start),end:Math.max(r.end,t.range.end),spans:[...r.spans,t]};continue}n.push({paragraphId:t.range.paragraphId,start:t.range.start,end:t.range.end,spans:[t],drawings:[]});}return n.map(t=>({...t,drawings:(e.drawings??[]).filter(r=>r.paragraphId===t.paragraphId)}))}function ht(e,n){return dn(e).find(t=>t.paragraphId===n)??null}function Ho(e,n,t,r){let o=Ka(e),a=o.get(n.paragraphId)??-1,i=o.get(t.paragraphId)??-1,s=o.get(r.paragraphId)??-1;if(a<i||a>s)return null;let l=a===i?Math.max(n.start,t.offset):n.start,d=a===s?Math.min(n.end,r.offset):n.end;return d>l?{start:l,end:d}:null}function rM(e,n){for(let t of e.pages)for(let r of $e(t)){let o=ar(r).indexOf(n);if(o>0)return ar(r).slice(0,o).reverse()}return []}var qh=new WeakMap;function ar(e){let n=qh.get(e);if(n)return n;let t=[];for(let r of e.lines??[])for(let o of dn(r))t.includes(o.paragraphId)||t.push(o.paragraphId);return t.includes(e.paragraphId)||t.push(e.paragraphId),qh.set(e,t),t}function HI(e,n){let t=ar(e);if(t.length===1)return t[0]===n?{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=ht(a,n);i&&(r=Math.min(r,i.start),o=Math.max(o,i.end));}return o>=r?{start:r,end:o}:null}function au(e,n,t){let r=HI(e,n);return r!==null&&t>=r.start&&t<r.end}function oM(e,n){for(let t of e.pages)for(let r of ou(t))if(r.paragraphId===n)return r;for(let t of e.pages)for(let r of ou(t))if(ar(r).includes(n))return r;return null}var cu=8,Zh=new WeakMap;function Js(e){let n=Zh.get(e);if(n)return n;let t=[],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 b=s.get(g);b&&i.set(m,b);}else s.set(g,{row:p,cell:m});}l(m.blocks,u||p.isHeaderRepeat);}}}};for(let c of e.pages)t.push(c.box.y),l(c.fragments,false);let d={pageTops:t,rowIndexById:r,lastLineIdOfParagraph:o,mergeOriginOf:i};return Zh.set(e,d),d}function Za(e,n){let t=Js(e).pageTops;if(t.length===0)return -1;let r=0,o=t.length-1,a=0;for(;r<=o;){let i=r+o>>1;t[i]<=n?(a=i,r=i+1):o=i-1;}return a}function zI(e,n){let t=e.pages[Za(e,n.y)];if(!t)return false;for(let r of [t.header,t.footer])if(r&&el(r.box,n))return true;return false}function lu(e,n,t,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||!Ua(a,n))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:t},pageIndex:t,lineId:"",cell:null,contentControlId:null,onGlyphs:true,drawing:Object.freeze({drawingNodeId:a.drawingNodeId,paragraphId:a.anchorParagraphId,start:a.start})}}return null}function Qs(e,n,t,r={}){let o=e.pages[n];if(!o)return null;let a={layout:e,pageIndex:o.index,verticalWeight:r.verticalWeight??cu,measurer:r.measurer},i=Jh(e,o.index,t),s=(o.anchoredDrawings??[]).filter(f=>!f.behindDocument),l=(o.anchoredDrawings??[]).filter(f=>f.behindDocument),d=lu(s,t,a.pageIndex);if(d)return {...d,contentControlId:i};let c=Zs(o.fragments,t,a,null);if(c?.onGlyphs)return {...c,contentControlId:i};let u=lu(l,t,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 [n-f,n+f]){let m=e.pages[p];if(!m)continue;let g=Zs(m.fragments,t,{...a,pageIndex:m.index},null);if(g)return {...g,contentControlId:Jh(e,m.index,t)}}return null}function uM(e,n,t,r,o={}){let a=e.pages[n];if(!a)return null;let i={layout:e,pageIndex:a.index,verticalWeight:o.verticalWeight??cu,measurer:o.measurer};return Zs(t,r,i,null)}function jI(e,n,t={}){let r=e.pages[Za(e,n.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:n.x-o.box.x,y:n.y-o.box.y}),i=lu(o.anchoredDrawings,a,r.index);if(i)return i}return Qs(e,r.index,{x:n.x-r.contentBox.x,y:n.y-r.contentBox.y},t)}function el(e,n){return n.x>=e.x&&n.x<e.x+e.width&&n.y>=e.y&&n.y<e.y+e.height}function nl(e,n,t){let r=e.contentControls??[],o=null;for(let a of r)for(let i of a.fragments)i.pageIndex===n&&el(i.box,t)&&(!o||a.nestingDepth>o.nestingDepth)&&(o=a);return o}function Jh(e,n,t){return nl(e,n,t)?.id??null}function du(e,n,t){let r=Math.max(e.x-n.x,0,n.x-(e.x+e.width)),o=Math.max(e.y-n.y,0,n.y-(e.y+e.height));return r+o*t}function GI(e,n,t){return e.kind!=="table"||Math.max(e.box.y-n.y,0,n.y-(e.box.y+e.box.height))>0?du(e.box,n,t):0}function Zs(e,n,t,r){if(e.length===0)return null;let o=null;for(let i of e){if(!el(i.box,n))continue;o=i;let s=Qh(i,n,t,r);if(s)return s;break}let a=e.filter(i=>i!==o).map(i=>({block:i,score:GI(i,n,t.verticalWeight)})).sort((i,s)=>i.score-s.score);for(let{block:i}of a){let s=Qh(i,n,t,r);if(s)return s}return null}function Qh(e,n,t,r){return e.kind==="paragraph"?WI(e,n,t,r,el(e.box,n)):ZI(e,n,t)}function WI(e,n,t,r,o){let a=$I(e.lines,n.y);if(!a)return null;let i=KI(a,n.x,n.y,t),s=VI(a,n.x),l=Math.min(Math.max(i.offset,s.start),s.end),d={paragraphId:s.paragraphId,offset:l},c=Ja(a,l,t.measurer,s);return {position:d,caret:{position:d,x:i.x,y:c.y,height:c.height,lineId:a.id,pageIndex:t.pageIndex},pageIndex:t.pageIndex,lineId:a.id,cell:r,onGlyphs:o&&i.withinSpan&&n.y>=a.box.y&&n.y<a.box.y+a.box.height,contentControlId:null,drawing:i.drawing&&i.withinSpan?XI(i.drawing):null}}function $I(e,n){if(e.length===0)return null;for(let o of e)if(n>=o.box.y&&n<o.box.y+o.box.height)return o;let t=e[0],r=Number.POSITIVE_INFINITY;for(let o of e){let a=n<o.box.y?o.box.y-n:n-(o.box.y+o.box.height);a<r&&(r=a,t=o);}return t}function XI(e){return Object.freeze({drawingNodeId:e.drawingNodeId,paragraphId:e.paragraphId,start:e.start})}function VI(e,n){let t=dn(e),r=t[0];for(let o of t){let a=o.spans[0];if(a===void 0)continue;let i=o.spans[o.spans.length-1];if(n>=a.box.x&&(r=o),n<i.box.x+i.box.width)break}return r}function YI(e,n,t){for(let r of t??e.drawings??[])if(r.start===n||r.start+1===n)return r;return null}function Ua(e,n){let t=e.hitBounds;return n.x<t.x||n.x>=t.x+t.width||n.y<t.y||n.y>=t.y+t.height?false:uc(n.x,n.y,e.geometry)}function KI(e,n,t,r){let o=e.spans;for(let l of e.drawings??[])if(Ua(l,{x:n,y:t}))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(n<=l.advanceStart)return {offset:e.range.start,x:l.advanceStart,withinSpan:false,drawing:l};let d=e.drawings[e.drawings.length-1];if(n>=d.advanceEnd)return iu(e,d.advanceEnd,r);for(let c of e.drawings??[])if(n>=c.advanceStart&&n<c.advanceEnd){let u=n>=c.x+c.width/2;return {offset:u?c.start+1:c.start,x:u?c.advanceEnd:c.advanceStart,withinSpan:Ua(c,{x:n,y:t}),drawing:c}}}if(o.length===0)return {offset:e.range.start,x:e.contentX,withinSpan:false};let a=o[0];if(n<=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(n>=s)return iu(e,s,r);for(let l of o)if(n>=l.box.x&&n<l.box.x+l.box.width)return UI(l,n,r);for(let l=0;l<o.length;l+=1){let d=o[l];for(let c of e.drawings??[]){if(n>=c.advanceStart&&n<c.advanceEnd){let u=Ua(c,{x:n,y:t}),f=n>=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(Ua(c,{x:n,y:t}))return {offset:c.start,x:c.hitBounds.x,withinSpan:true,drawing:c};if(n<d.box.x&&n>=c.hitBounds.x+c.hitBounds.width)return {offset:c.start+1,x:c.hitBounds.x+c.hitBounds.width,withinSpan:false,drawing:c};if(n<c.hitBounds.x&&n>=(o[l-1]?.box.x??e.contentX))return {offset:c.start,x:c.hitBounds.x,withinSpan:false,drawing:c}}}if(n<d.box.x){let c=o[l-1],u=c.box.x+c.box.width;return n-u<=d.box.x-n?{offset:c.range.end,x:u,withinSpan:false}:{offset:d.range.start,x:d.box.x,withinSpan:false}}}return iu(e,s,r)}function iu(e,n,t){let r=ay(t.layout,e);if(r===e.range.end)return {offset:r,x:n,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=t.measurer?qa(a,i,t.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:n,withinSpan:false}}function ay(e,n){let t=n.range.end;if(t>n.range.start&&su(n,t-1)===Yb$1)return t-1;if(Js(e).lastLineIdOfParagraph.get(n.range.paragraphId)===n.id)return t;let r=t;for(r>n.range.start&&su(n,r-1)===`
15
+ `&&(r-=1);r>n.range.start&&su(n,r-1)===" ";)r-=1;return r}function su(e,n){for(let t of e.spans)if(!(n<t.range.start||n>=t.range.end))return t.text.length!==t.range.end-t.range.start?null:t.text[n-t.range.start]??null;return null}var ey=new WeakMap,ny=new WeakMap;function ty(e){let n=xd(),t=ey.get(e);if(t&&t.epoch===n)return t.boundaries;let r=[0];for(let o of Yn(e.text))r.push(o.utf16To);return r[r.length-1]!==e.text.length&&r.push(e.text.length),ey.set(e,{epoch:n,boundaries:r}),r}function qa(e,n,t){let r=e.caretEdges;if(r&&n>=0&&n<r.length)return r[n];let o=ny.get(t);o||(o=new WeakMap,ny.set(t,o));let a=o.get(e);a||(a=new Map,o.set(e,a));let i=a.get(n);if(i!==void 0)return i;let s=n<=0?0:Dn(e.text.slice(0,n),e.style,t);return a.set(n,s),s}function uu(e){return e.text===" "||e.projected?true:e.text.length!==e.range.end-e.range.start}function tl(e,n,t){let r=e.range.end-e.range.start;if(r<=0)return e.box.x;let o=Math.max(0,Math.min(n-e.range.start,r)),a=e.caretEdges;return a&&o<a.length?e.box.x+a[o]:!t||uu(e)?e.box.x+e.box.width*(o/r):e.box.x+qa(e,o,t)}function Ja(e,n,t,r){let o=YI(e,n,r?.drawings);if(o)return {x:n>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;return {x:e.contentX,y:e.box.y+d,height:Math.max(0,e.box.height-d-(e.trailingSpacing??0))}}let i=a[0];for(let d=0;d<a.length;d+=1){let c=a[d];if(n>c.range.start&&n<c.range.end){i=c;break}if(n===c.range.end){let u=a[d+1];if(u&&u.range.start===n&&uu(c)){i=u;break}if(u&&u.range.start===n&&c.text.endsWith(" ")&&u.box.x-(c.box.x+c.box.width)>.25){i=u;break}i=c;}else n>c.range.end&&(i=c);}let s=tl(i,n,t),l=t?.lineMetrics(i.style);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-rc(i.style),height:l.height}}function UI(e,n,t){let r=n-e.box.x,o=e.range.end-e.range.start;if(o<=0||uu(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(!t.measurer){let p=Math.max(0,Math.min(1,r/Math.max(e.box.width,Number.EPSILON))),m=Math.round(p*o),g=ty(e),b=g[0],h=Number.POSITIVE_INFINITY;for(let x of g){let I=Math.abs(x-m);I<h&&(h=I,b=x);}return {offset:e.range.start+b,x:e.box.x+e.box.width*(b/o),withinSpan:true}}let a=ty(e),i=1,s=a.length-1;for(;i<s;){let p=i+s>>1;qa(e,a[p],t.measurer)<r?i=p+1:s=p;}let l=a[i],d=a[i-1],c=qa(e,l,t.measurer),u=qa(e,d,t.measurer),f=r-u<=c-r;return {offset:e.range.start+(f?d:l),x:e.box.x+(f?u:c),withinSpan:true}}function ry(e,n,t,r){if(e.length===0)return null;for(let i of e){let s=t(i);if(n>=s&&n<s+r(i))return i}let o=e[0],a=Number.POSITIVE_INFINITY;for(let i of e){let s=t(i),l=n<s?s-n:n-(s+r(i));l<a&&(a=l,o=i);}return o}function qI(e,n,t,r){return {tableId:n.tableId,rowId:t.id,cellId:r.id,rowIndex:Js(e).rowIndexById.get(t.id)??0,gridColumn:r.gridColumn,gridSpan:r.gridSpan}}function ZI(e,n,t,r){let o=e.rows.filter(d=>!d.isHeaderRepeat),a=o.length>0?o:e.rows,i=[],s=ry(a,n.y,d=>d.box.y,d=>d.box.height);if(s){let d=ry(s.cells,n.x,c=>c.box.x,c=>c.box.width);d&&i.push(JI(t,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:du(c.box,n,t.verticalWeight)}));l.sort((d,c)=>d.score-c.score);for(let{row:d,cell:c}of [...i,...l.map(u=>u.entry)]){let u=qI(t.layout,e,d,c),f=Zs(c.blocks,n,t,u);if(f)return f}return null}function JI(e,n,t){return t.blocks.length>0?{row:n,cell:t}:Js(e.layout).mergeOriginOf.get(t)??{row:n,cell:t}}function iy(e,n){let t=n.paintBounds;return t.width<=0||t.height<=0?null:Object.freeze({pageIndex:e,x:t.x,y:t.y,width:t.width,height:t.height,record:n})}function QI(e,n,t){for(let r of n.lines)for(let o of r.drawings??[])if(o.drawingNodeId===t)return iy(e,o);return null}function sy(e,n,t){if(n.kind==="paragraph")return QI(e,n,t);for(let r of n.rows)for(let o of r.cells)for(let a of o.blocks){let i=sy(e,a,t);if(i)return i}return null}function oy(e,n,t){for(let r of n){let o=sy(e,r,t);if(o)return o}return null}function ev(e,n){for(let t of e.pages){for(let o of t.anchoredDrawings??[])if(o.drawingNodeId===n)return iy(t.index,o);let r=oy(t.index,t.fragments,n);if(r)return r;for(let o of [t.header,t.footer]){if(!o)continue;for(let i of o.anchoredDrawings??[]){if(i.drawingNodeId!==n)continue;let s=i.paintBounds;return s.width<=0||s.height<=0?null:Object.freeze({pageIndex:t.index,x:o.box.x+s.x-t.contentBox.x,y:o.box.y+s.y-t.contentBox.y,width:s.width,height:s.height,record:i})}let a=oy(t.index,o.fragments,n);if(a){let i=a.record.paintBounds;return Object.freeze({pageIndex:t.index,x:t.header?.box.x===o.box.x||t.footer?.box.x===o.box.x?o.box.x+i.x-t.contentBox.x:a.x,y:o.box.y+i.y-t.contentBox.y,width:a.width,height:a.height,record:a.record})}}}return null}function nv(e){let n=[0],t=0;for(let r of e)t+=r,n.push(t);return n}function tv(e,n){let t=n.get(e.id);return t===void 0&&(e.isHeaderRepeat?t=0:(t=n.size,n.set(e.id,t))),{...e,rowIndex:t}}function rl(e,n,t,r){return {...e,nestingDepth:t,columnEdges:e.columnEdges??nv(n),rows:e.rows.map(o=>tv(o,r))}}var ly=new WeakMap,zo=4,fu=6,dy=14,rv={rowDivider:4,columnDivider:4,rightEdge:4,insertRow:3,insertColumn:3,tableBody:0};function pu(e,n,t,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:n,table:a,row:s,rowOrdinal:s.rowIndex,nestingDepth:i,editable:!s.isHeaderRepeat,pageContentBox:t});for(let l of s.cells)pu(l.blocks,n,t,i+1,o);}}}function mM(e){let n=ly.get(e);if(n)return n;let t=[];for(let o=0;o<e.pages.length;o+=1){let a=e.pages[o],i=s=>{t.push(s);};pu(a.fragments,o,a.contentBox,0,i);for(let s of [a.header,a.footer])s&&pu(s.fragments,o,s.box,0,i);}let r=Object.freeze({sourceRevision:e.revision,occurrences:Object.freeze(t)});return ly.set(e,r),r}function gM(e){let n=e.sourceRevision;switch(e.kind){case "rowDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.edgeY}`;case "columnDivider":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.leftGridColumnId}:${e.rightGridColumnId}:${e.edgeX}`;case "rightEdge":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}:${e.gridColumnId}:${e.edgeX}`;case "insertRow":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.isHeaderRepeat}`;case "insertColumn":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.rowId}:${e.gridColumnId}:${e.isHeaderRepeat}`;case "tableBody":return `${n}:${e.kind}:${e.pageIndex}:${e.tableId}:${e.nestingDepth}:${e.editable}`}}function hM(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 yM(e,n){if(n.kind==="insertRow"){for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat)return t.editable?{kind:"insertRow",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}:null;return null}for(let t of e.occurrences)if(t.pageIndex===n.pageIndex&&t.table.tableId===n.tableId&&t.row.id===n.rowId&&t.row.isHeaderRepeat===n.isHeaderRepeat&&t.editable)for(let r=0;r<t.table.columnEdges.length-1;r+=1){let o=Qa(t.row,r);if(o===n.gridColumnId)return {kind:"insertColumn",pageIndex:t.pageIndex,sourceRevision:e.sourceRevision,tableId:t.table.tableId,rowId:t.row.id,gridColumnId:o,isHeaderRepeat:t.row.isHeaderRepeat,nestingDepth:t.nestingDepth}}return null}function Qa(e,n){for(let t of e.cells)if(t.gridColumn===n)return t.gridColumnId??null;return null}function ov(e,n,t,r,o){if(!e.pages[n.pageIndex])return null;let i=n.pageContentBox,s=t-i.x-o,l=r-i.y,d=n.table,c=s-d.box.x,u=l-d.box.y;return c<-zo||u<-dy||c>d.box.width+zo||u>d.box.height+fu?null:{x:c,y:u}}function av(e,n,t,r){if(n.row.isHeaderRepeat)return null;let o=n.table,a=n.row.box.y-o.box.y+n.row.box.height;if(!o.columnEdges.slice(1).some(l=>Math.abs(t-l)<=zo)&&t>=0&&t<=o.box.width&&Math.abs(r-a)<=zo)return {kind:"rowDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeY:a};if(r<n.row.box.y-n.table.box.y||r>n.row.box.y-n.table.box.y+n.row.box.height)return null;for(let l=1;l<o.columnEdges.length-1;l+=1){let d=o.columnEdges[l];if(Math.abs(t-d)>zo)continue;let c=Qa(n.row,l-1),u=Qa(n.row,l);if(!(!c||!u))return {kind:"columnDivider",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,leftGridColumnId:c,rightGridColumnId:u,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:d,sheetY:n.pageContentBox.y+o.box.y+r}}let s=o.columnEdges.at(-1);if(Math.abs(t-s)<=zo){let l=o.columnEdges.length-2,d=Qa(n.row,l);return d?{kind:"rightEdge",pageIndex:n.pageIndex,sourceRevision:e.sourceRevision,tableId:o.tableId,rowId:n.row.id,gridColumnId:d,isHeaderRepeat:n.row.isHeaderRepeat,nestingDepth:n.nestingDepth,edgeX:s,sheetY:n.pageContentBox.y+o.box.y+r}:null}return null}function bM(e,n,t,r,o=0,a){let i=a??Za(r,t),s=i>=0?o:0,l=null,d=-1,c=-1,u=f=>{if(!f)return;let p=rv[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=ov(r,f,n,t,s);if(!p||(u(av(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<=fu&&Math.abs(p.y-(m+f.row.box.height/2))<=f.row.box.height/2+fu&&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 b=f.table.columnEdges[g],h=f.table.columnEdges[g+1],x=(b+h)/2;if(Math.abs(p.x-x)>(h-b)/2+2||p.y>dy)continue;let I=Qa(f.row,g);if(I){u({kind:"insertColumn",pageIndex:f.pageIndex,sourceRevision:e.sourceRevision,tableId:f.table.tableId,rowId:f.row.id,gridColumnId:I,isHeaderRepeat:f.row.isHeaderRepeat,nestingDepth:f.nestingDepth});break}}}return l}var cy=1048576;function mu(e=cy){let n=e|0;return {cellsRemaining:n>0?n:0}}function gu(e,n,t,r){let o=new Map,a=new Map,i=r?.pageFragment===true,s=new Set,l=i,c=p=>{let m=a.get(p);m&&(o.set(m.id,m.span),a.delete(p));},u=()=>t!==void 0&&t.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 b of p.cells){if(t){if(t.cellsRemaining<=0){g=true;break}t.cellsRemaining-=1;}let h=Math.max(0,Math.min(b.gridColumn|0,1023));if(m.add(h),b.vMergeContinue){let x=a.get(h);x?x.span+=1:s&&!s.has(h)&&(a.set(h,{id:b.id,span:1}));}else c(h),a.set(h,{id:b.id,span:1});s?.add(h);}if(g){f();break}for(let b of [...a.keys()])m.has(b)||c(b);}return f(),o}function fy(e,n,t,r){let o=new Map,a=0,i=s=>{let l=Ao(s,n,0,t,r);if(l)for(let d of l.rows)for(let c of d.cells)for(let u of c.blocks)u.localName==="p"?o.set(u.id,a++):u.localName==="tbl"&&i(u);};for(let s of e)s.kind==="paragraph"&&s.paragraph?o.set(s.paragraph.id,a++):s.kind==="table"&&s.table&&i(s.table);return o}var al=4096,uy=1,jn=class extends Error{code;constructor(n,t){super(t),this.name="TablePaginationError",this.code=n;}};function hu(e){return e.cells.map(()=>({blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0}))}function py(e){return e.publishAnchoredDrawings??e.collectAnchoredDrawings}function my(e,n,t,r,o){let a=py(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 n){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:t,width:i.cellContentWidth,height:r});a(ko({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.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}}function iv(e,n,t,r){if(!(!r.onAnchorRepublish||!r.inlineDrawingLayout||!r.anchorFrameBase||!r.pageContentClip))for(let o of e){if(o.kind!=="paragraph")continue;let a=n.find(s=>s.kind==="paragraph"&&s.id===o.paragraphId);!a||a.kind!=="paragraph"||zn(a,r.inlineDrawingLayout).length===0||r.onAnchorRepublish(o.paragraphId,ko({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:t,pageClip:r.pageContentClip(),measurer:r.measurer,...r.layoutTextboxStoryFor?{layoutTextboxStory:r.layoutTextboxStoryFor}:{},...r.displayMode?{displayMode:r.displayMode}:{}}));}}function sv(e,n){let t=py(e),r=e.deferAnchoredDrawings;return !t&&!r?{rowDeps:e,flushDeferred:()=>{}}:{rowDeps:{...e,publishAnchoredDrawings:t,collectAnchoredDrawings:void 0,deferAnchoredDrawings:i=>{n.push(i);}},flushDeferred:(i,s,l)=>{if(n.length!==0){if(t&&!e.anchorDeferOnly)my(n,i,s,l,e);else if(r)for(let d of n)r(d);n.length=0;}}}}function ol(e,n,t){let r=0;for(let o=n;o<t&&o<e.length;o+=1)r+=e[o];return r}function yu(e,n){return n===0?[...e]:e.map(t=>t.kind==="table"?{...t,box:{...t.box,y:t.box.y+n},rows:t.rows.map(r=>({...r,box:{...r.box,y:r.box.y+n},cells:r.cells.map(o=>({...o,box:{...o.box,y:o.box.y+n},blocks:yu(o.blocks,n)}))}))}:{...t,box:{...t.box,y:t.box.y+n},...t.shadingBox?{shadingBox:{...t.shadingBox,y:t.shadingBox.y+n}}:{},...t.bottomBorder?{bottomBorder:{...t.bottomBorder,box:{...t.bottomBorder.box,y:t.bottomBorder.box.y+n}}}:{},...t.borders?{borders:t.borders.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}:{},...t.marker?{marker:{...t.marker,box:{...t.marker.box,y:t.marker.box.y+n}}}:{},lines:t.lines.map(r=>({...r,box:{...r.box,y:r.box.y+n},spans:r.spans.map(o=>({...o,box:{...o.box,y:o.box.y+n}})),...r.drawings?{drawings:r.drawings.map(o=>ms(o,0,n))}:{}}))})}function lv(e,n,t,r,o,a,i){let s=e.id,l=o.listItems?.get(s),{props:d,indent:c,available:u,alignment:f,spacing:p,lineSpacing:m,bottomBorder:g,borders:b,shading:h,inheritedRunProperties:x,markRunProperties:I,tabStops:w,tabStopsCacheToken:O}=za(e,t,o.styleCascade,l,i?.tableCellStyle,true),M=Ra(w,o.defaultTabStopPt),P=M===w?O:xr(M),L=Us(l,c,o.measurer,M,u),C=o.pageExclusionZones?.()??Object.freeze([]),k=o.paragraphOrderIndex?.(s)??Number.MAX_SAFE_INTEGER,z=o.paragraphOrderIndex?Rg(C,k,B=>o.paragraphOrderIndex?.(B)):C,F=Sg(z,n,0,{left:0,right:c.left+u+c.right}),y=mt(F),ee=y?`${r.toFixed(3)}|${y}`:"",v=Ir({paragraph:e,properties:[...d,...x,...I,{localName:"tabStops",attributes:{token:P}},...l?[{localName:"list",attributes:{token:l.cacheToken}}]:[]],width:u,producer:o.producer,...o.drawingTokenForParagraph?.(e)?{drawingToken:o.drawingTokenForParagraph(e)}:o.drawingLayoutToken?{drawingToken:o.drawingLayoutToken}:{},...ee?{exclusionToken:ee}:{}});o.cache&&o.onCellBreakKey?.(v);let E=Is(e,s,c.left,u,o.measurer,o.cache,o.cache?v:null,x,M,o.pageContext,o.styleCascade?(B,S)=>Lt(B,S,o.styleCascade):void 0,{lineSpacing:m,equationCacheToken:o.producer,firstLineOffset:L,marginExtent:{left:0,right:c.left+u+c.right},...o.projectLink?{projectLink:o.projectLink}:{},...o.projectFieldLink?{projectFieldLink:o.projectFieldLink}:{},...o.documentProperties?{documentProperties:o.documentProperties}:{},...o.bodyPageFields?{bodyPageFields:true}:{},displayMode:o.displayMode,...o.noteMarks?{noteMarks:o.noteMarks}:{},...o.inlineDrawingLayout?{inlineDrawingLayout:o.inlineDrawingLayout}:{},contentLeft:0,contentRight:c.left+u+c.right,paragraphStartY:r,anchorCellBox:Object.freeze({x:0,y:0,width:c.left+u+c.right,height:Math.max(1,u)}),...F.length>0?{pageExclusionZones:F}:{},...o.styleCascade?{themeFonts:o.styleCascade.themeFonts}:{},markRunProperties:I}),_=i?.lineStart??0,A=i?.fragmentIndex??0,T=i?.maxBottom??Number.POSITIVE_INFINITY,j=i?.includeAfter??true,N=i?.includeBottomBorder??true,V=_===0?io(p.before,a):0,Y=n+c.left,G=_===0?Kt(b.top):0,K=[],$=r+V+G,J=_,U=false;for(let B=_;B<E.length;B+=1){let S=E[B],H=B===E.length-1,Q=H&&N&&g?Kt(g):0,oe=H&&j?p.after:0,W=F.length>0?gt($,S.height,F):S.exclusionSkipBefore??0;if($+W+S.height+Q+oe>T+.001)break;$+=W;let se=n+c.left+(B===0?L:0),He=Math.max(1,u-(B===0?L:0)),Pe=S.spans.map(pe=>({...pe,range:{...pe.range,paragraphId:s},box:{...pe.box,x:pe.box.x+n,y:$}})),Ne=ws(Pe,o.measurer,se,He,f,H,f==="center"||f==="right"?S.width:void 0),un=Pe.length>0&&Ne.length>0?Ne[0].box.x-Pe[0].box.x:f!=="left"&&f!=="both"?(()=>{let pe=He-S.width;return pe<=0?0:f==="center"?pe/2:pe})():0,wn=Object.freeze({x:n,y:r,width:t,height:Math.max(0,T-r)}),Bn=Ps(S.drawings.map(pe=>gs(Object.freeze({...pe,paragraphId:s,x:n+pe.x,advanceStart:n+pe.advanceStart,advanceEnd:n+pe.advanceEnd,y:$+pe.y,paintBounds:Object.freeze({...pe.paintBounds,x:n+pe.paintBounds.x,y:$+pe.paintBounds.y}),hitBounds:Object.freeze({...pe.hitBounds,x:n+pe.hitBounds.x,y:$+pe.hitBounds.y})}),wn)),un);K.push({id:o.nextLineId(s,S.start,B),range:{paragraphId:s,start:S.start,end:S.end},spans:Ne,...Bn.length>0?{drawings:Bn}:{},box:{x:n+c.left,y:$,width:u,height:S.height},contentX:Ne[0]?.box.x??se+un,baseline:S.baseline,leading:S.leading,trailingSpacing:S.trailingSpacing,...S.deletedRanges?{deletedRanges:S.deletedRanges}:{},...S.anchorRevisions?{anchorRevisions:S.anchorRevisions}:{}}),$+=S.height,J=B+1,U=true;}if(!U)return {fragment:null,bottom:r,spaceAfter:a,nextLineIndex:_,complete:false,fitted:false};let re=J>=E.length,ke=K[0].box.y,be=$,ne=[],xe,we=ke,Qe=be,ye=b.left?In(b.left):0,Ae=b.right?In(b.right):0,Ke=b.left?Y-b.left.spacePt-ye:Y,Rn=b.right?Y+u+b.right.spacePt+Ae:Y+u,cn=Math.max(Rn-Ke,0);if(G>0&&b.top){let B=In(b.top),S=ke-b.top.spacePt-B;ne.push({side:"top",edge:b.top,box:{x:Ke,y:S,width:cn,height:B}}),we=S;}if(re&&N&&g){let B=In(g),S=be+g.spacePt,H={x:Ke,y:S,width:cn,height:B};xe={edge:g,box:H},ne.push({side:"bottom",edge:g,box:H}),Qe=S+B;}let et=Math.max(Qe-we,0);if(b.left&&ne.push({side:"left",edge:b.left,box:{x:Y-b.left.spacePt-ye,y:we,width:ye,height:et}}),b.right&&ne.push({side:"right",edge:b.right,box:{x:Y+u+b.right.spacePt,y:we,width:Ae,height:et}}),b.bar){let B=In(b.bar);ne.push({side:"bar",edge:b.bar,box:{x:Y-b.bar.spacePt-B,y:ke,width:B,height:Math.max(be-ke,0)}});}let Ge=re&&j?p.after:0,Gn=Qe+Ge,Wn=h===void 0?void 0:b.left||b.right?{x:Ke,y:we,width:cn,height:Math.max(Qe-we,0)}:xa(K,Y,u),gn=re&&o.displayMode==="all-markup",nt=gn?So(e):[],on=gn?Ma(e):null,Cn=_===0?qs(l,o.measurer,K[0]?{y:K[0].box.y,height:K[0].box.height}:void 0,n):void 0,At=Os(e),Fe=At?Xs(K,$s(At)):K,We={kind:"paragraph",id:`${s}#f${A}`,paragraphId:s,fragmentIndex:A,range:{paragraphId:s,start:Fe[0].range.start,end:Fe[Fe.length-1].range.end},props:d,spacing:{before:V,after:Ge},indent:c,tabStops:M,...xe?{bottomBorder:xe}:{},...ne.length>0?{borders:ne}:{},...h===void 0?{}:{shading:h},...Wn===void 0?{}:{shadingBox:Wn},...Cn?{marker:Cn}:{},...as(nt,on),lines:Fe,box:{x:Y,y:r,width:u,height:Gn-r}};if(o.inlineDrawingLayout&&o.anchorFrameBase&&o.pageContentClip){let B=Object.freeze({x:n,y:r,width:t,height:Math.max(0,T-r)}),S=We.box,H={paragraph:e,paragraphId:s,paragraphBox:S,lines:Fe};o.deferAnchoredDrawings?o.deferAnchoredDrawings({...H,cellOriginX:n,cellContentWidth:t}):o.collectAnchoredDrawings&&o.collectAnchoredDrawings(ko({paragraph:e,paragraphId:s,paragraphBox:S,lines:Fe,drawingLayout:o.inlineDrawingLayout,frameBase:o.anchorFrameBase(),columnBox:o.columnBoxForParagraph?.(S)??S,cellBox:B,pageClip:o.pageContentClip(),measurer:o.measurer,...o.layoutTextboxStoryFor?{layoutTextboxStory:o.layoutTextboxStoryFor}:{},...o.displayMode?{displayMode:o.displayMode}:{}}));}return {fragment:We,bottom:Gn,spaceAfter:Ge,nextLineIndex:J,complete:re,fitted:true}}function Mr(e,n,t,r,o,a){let i=gy(e,n,t,r,Number.POSITIVE_INFINITY,o,a,{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0});return {blocks:i.blocks,bottom:i.bottom}}function gy(e,n,t,r,o,a,i,s,l){let d=[],c=r,u=s.previousSpaceAfter,f=s.blockIndex,p=s.lineIndex,m=s.paragraphFragmentIndex,g=false,b=false;for(;f<e.length;){let h=e[f];if(h.kind==="table"){p!==0&&(p=0),u=0;let I=uv(h,n,t,c,a+1,i);if(!I){f+=1;continue}if(I.bottom>o+.001){b=!g;break}d.push(I.fragment),c=I.bottom,g=true,f+=1,p=0;continue}if(h.kind!=="paragraph"){f+=1,p=0;continue}let x=lv(h,n,Math.max(1,t-n),c,i,u,{lineStart:p,fragmentIndex:m,maxBottom:o,includeAfter:true,includeBottomBorder:true,...l?{tableCellStyle:l}:{}});if(!x.fitted||!x.fragment)break;if(d.push(x.fragment),c=x.bottom,g=true,x.complete)u=x.spaceAfter,f+=1,p=0,m=0;else return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:x.nextLineIndex,previousSpaceAfter:0,paragraphFragmentIndex:m+1},complete:false,fitted:true,nestedSplitBlocked:false}}return {blocks:d,bottom:c,cursor:{blockIndex:f,lineIndex:p,previousSpaceAfter:u,paragraphFragmentIndex:m},complete:f>=e.length,fitted:g,nestedSplitBlocked:b}}function hy(e,n){return {top:e.top+Or(n.top),right:e.right+Or(n.right),bottom:e.bottom+Or(n.bottom),left:e.left+Or(n.left)}}function dv(e,n,t){return {top:n?{state:"none"}:e.top,left:e.left,bottom:t?{state:"none"}:e.bottom,right:e.right}}function yy(e,n,t){return !n&&!t?e:{...e,cells:e.cells.map(r=>({...r,borders:dv(r.borders,n,t)}))}}function ei(e,n,t,r,o,a,i,s=0){let l=bu(e,n,t,r,Number.POSITIVE_INFINITY,o,false,a,i,hu(e),s);return {record:l.record,bottom:l.bottom}}function bu(e,n,t,r,o,a,i,s,l,d,c=0){let u=ol(n,0,n.length),f=Number.isFinite(c)&&c>0?c/2:0,p=l.measurer.lineMetrics(ct).height,m=e.height,g=m.rule==="exact"?m.valuePt:void 0,b=m.rule==="atLeast"?m.valuePt:void 0,h=[],{rowDeps:x,flushDeferred:I}=sv(l,h),w=a&&l.pageOccurrenceKey?{...x,nextLineId:(v,E,_)=>x.nextLineId(v,E,_,l.pageOccurrenceKey())}:x,O=g===void 0?o:Math.min(o,r+Math.max(0,g)),M=[],P=false,L=false,C=r;for(let v=0;v<e.cells.length;v+=1){let E=e.cells[v],_=d[v]??{blockIndex:0,lineIndex:0,previousSpaceAfter:0,paragraphFragmentIndex:0},A=E.gridSpan,T=E.gridColumn,j=t+ol(n,0,T),N=ol(n,T,Math.min(T+A,n.length))||u,V=Math.min(f,Math.max((N-uy)/2,0)),Y=j+V,G=Math.max(N-2*V,uy),K=hy(E.margins,E.borders),$=i?Or(E.borders.top):K.top,J=r+$,U=O-K.bottom,re=[],ke=J,be=_,ne=true,xe=false,we=false;if(!E.vMergeContinue)if(U<J+.001)ne=_.blockIndex>=E.blocks.length;else {let ye=gy(E.blocks,Y+K.left,Y+G-K.right,J,U,s,w,_,E.styleFormatting);re=ye.blocks,ke=ye.bottom,be=ye.cursor,ne=ye.complete,xe=ye.fitted,we=ye.nestedSplitBlocked,xe&&(P=true),we&&(L=true);}let Qe=Math.min(O,xe?ke+K.bottom:r+$+p+K.bottom);Qe>C&&(C=Qe),M.push({cell:E,x:Y,width:G,gridColumn:T,blocks:re,contentTop:J,contentBottom:ke,insets:{...K,top:$},nextCursor:be,complete:E.vMergeContinue?true:ne,fitted:xe,nestedSplitBlocked:we});}C=Math.min(O,Math.max(C,r));for(let v of M){let E=v.fitted?v.contentBottom+v.insets.bottom:r+v.insets.top+p+v.insets.bottom;E>C&&E<=O+.001&&(C=E);}C=Math.min(O,C);let k=false;if(g!==void 0){let v=r+g;v<=o+.001?(C=v,k=true):C=Math.min(o,C);}else if(b!==void 0){let v=r+b;M.every(_=>_.complete)&&v<=o+.001&&v>C&&(C=v);}C=Math.min(o,C);let z=Math.max(0,C-r),F=M.map(v=>{let E=v.blocks,_=k?true:v.complete;if(!v.cell.vMergeContinue&&_&&v.cell.vAlign!=="top"&&E.length>0){let A=v.contentBottom-v.contentTop,T=z-v.insets.top-v.insets.bottom-A;if(T>0){let j=v.cell.vAlign==="center"?T/2:T;E=yu(E,j);}}return {id:v.cell.id,gridColumn:v.gridColumn,...v.cell.gridColumnId?{gridColumnId:v.cell.gridColumnId}:{},gridSpan:v.cell.gridSpan,vMergeContinue:v.cell.vMergeContinue,...v.cell.vMergeContinue?{paintInert:true}:{},rowSpan:1,...v.cell.shading===void 0?{}:{shading:v.cell.shading},blocks:E,box:{x:v.x,y:r,width:v.width,height:z}}}),y=k||M.every(v=>v.complete)?null:M.map(v=>v.nextCursor),ee=k||M.every(v=>v.complete);return I(F,r,z),{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,isHeaderRepeat:a,...i?{isContinuation:true}:{},cells:F,box:{x:t,y:r,width:u,height:z}},bottom:C,remainder:ee?null:y,fitted:P||e.cells.every(v=>v.vMergeContinue)||k,nestedSplitBlocked:L}}function cv(e){return {...e,collectAnchoredDrawings:void 0,publishAnchoredDrawings:void 0,deferAnchoredDrawings:void 0,onAnchorRepublish:void 0,onAnchorShift:void 0,anchorDeferOnly:true}}function xu(e,n,t,r,o,a=0){let i=0,s={...cv(o),pageExclusionZones:void 0,nextLineId:()=>`probe-${i++}`};return ei(e,n,t,0,false,r,s,a).record.box.height}function Su(e,n,t,r,o,a,i,s){if(e.length===0)return [];let l=new Map;for(let b of t)for(let h of b.cells)l.set(h.id,h);let d=gu(e,a,o,{pageFragment:true}),c=e.map((b,h)=>({...b,cells:b.cells.map(x=>{let I=d.get(x.id);if(x.vMergeContinue&&I===void 0)return {...x,paintInert:true,rowSpan:1,borders:{},blocks:[]};let w=x.vMergeContinue,O=I??1,M=x.box.height;if(O>1){let k=e[h+O-1];M=k.box.y+k.box.height-x.box.y;}let P=l.get(x.id),L=x.blocks;if(P&&P.vAlign!=="top"&&L.length>0){let k=hy(P.margins,P.borders),z=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY;for(let y of L)z=Math.min(z,y.box.y),F=Math.max(F,y.box.y+y.box.height);if(Number.isFinite(z)&&Number.isFinite(F)){let y=M-k.top-k.bottom-(F-z),v=x.box.y+k.top+(y>0?P.vAlign==="center"?y/2:y:0)-z;if(Math.abs(v)>.001){L=yu(L,v);for(let E of L)E.kind==="paragraph"&&i?.(E.paragraphId,v);}}}let C=Object.freeze({x:x.box.x,y:x.box.y,width:x.box.width,height:M});return P&&s&&(O>1||P.vAlign!=="top"&&L.length>0)&&iv(L,P.blocks,C,s),{...x,...w?{vMergeContinue:false,paintInert:false}:{},rowSpan:O,blocks:L,box:{...x.box,height:M}}})})),u=c.map(b=>b.cells.map(h=>{let x=l.get(h.id);return {gridColumn:h.gridColumn,gridSpan:h.gridSpan,vMergeContinue:h.vMergeContinue,borders:x?.borders??{top:{state:"omitted"},left:{state:"omitted"},bottom:{state:"omitted"},right:{state:"omitted"}},mergeRowSpan:h.rowSpan??1}})),f=n.columnWidthsPt.length,p=n.tableBorders,m={columnWidthsPt:n.columnWidthsPt,rowBands:c.map(b=>({y:b.box.y,height:b.box.height})),cellBoxes:c.map(b=>b.cells.map(h=>({width:h.box.width,height:h.box.height})))},g=Hc(u,p,f,m,void 0,r);return c.map((b,h)=>({...b,cells:b.cells.map((x,I)=>{let w=g[h][I];return x.paintInert||x.vMergeContinue?{...x,borders:{},paintInert:true}:{...x,borders:w}})}))}function uv(e,n,t,r,o,a){if(o>=Ws)return null;let i=Math.max(1,t-n),s=Ao(e,i,o,a.styleCascade,a.displayMode);if(!s||s.rows.length===0)return null;let l=[],d={...a,publishAnchoredDrawings:void 0,collectAnchoredDrawings:void 0,anchorDeferOnly:true,deferAnchoredDrawings:b=>{l.push(b);}},c=n+Xa(s,i),u=[],f=r;for(let b of s.rows){let h=ei(b,s.columnWidthsPt,c,f,false,o,d,s.cellSpacingPt);u.push(h.record),f=h.bottom;}let p=Su(u,s,s.rows,a.borderOwnershipBudget,a.vMergeResolveBudget,void 0,void 0,void 0);for(let b of l)for(let h of p)if(h.cells.some(I=>I.blocks.some(w=>w.kind==="paragraph"&&w.paragraphId===b.paragraphId))){my([b],h.cells,h.box.y,h.box.height,a);break}let m=ol(s.columnWidthsPt,0,s.columnWidthsPt.length),g=new Map;return {fragment:rl({kind:"table",id:`${e.id}#f0`,tableId:e.id,fragmentIndex:0,rows:p,box:{x:c,y:r,width:m,height:f-r}},s.columnWidthsPt,o,g),bottom:f}}function by(e){let n=e.picture;return n?.embeddedRelationshipId?`embed:${e.ownerPartName}:${n.embeddedRelationshipId}`:n?.linkedRelationshipId?`link:${e.ownerPartName}:${n.linkedRelationshipId}`:`nonpicture:${e.drawingNodeId}`}var xy=new WeakMap,Ru=new Map,fv=16,pv=32;function Iy(e,n){let t=xy.get(e);if(t)return t;let r;if(e.kind==="drawing"||Wa$1(e))r={atoms:new Map([[e.id,e]]),visited:1,deepest:0};else if(!("children"in e)||e.children.length===0)r={atoms:Ru,visited:1,deepest:0};else if((n<2||e.children.length>=fv)&&n<pv){let o=null,a=1,i=0;for(let s of e.children){let l=Iy(s,n+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??Ru,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>Ua$1)break;l.depth>i&&(i=l.depth);let d=l.node;if(d.kind==="drawing"||Wa$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:Ru,visited:a,deepest:i};}return xy.set(e,r),r}function Sy(e){let n=Iy(e.root,0);return n.visited>Ua$1||n.deepest>Sa$1.maxDrawingDepth?null:n.atoms}function wu(e){let n=e.position,t=e.anchor,r=e.picture,o=e.wrapGeometry;return [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??"",t?.simplePos?"sp":"pv",t?String(t.relativeHeight):"",t?t.layoutInCell?"1":"0":"",r?[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??""].join(":"):"",o?[o.element,o.textSide,String(o.distancesEmu.top),String(o.distancesEmu.right),String(o.distancesEmu.bottom),String(o.distancesEmu.left),String(o.polygon.length)].join(":"):"",n?[n.horizontal.relativeFrom,n.horizontal.align??"",String(n.horizontal.offsetEmu??""),n.vertical.relativeFrom,n.vertical.align??"",String(n.vertical.offsetEmu??""),String(n.simplePosition.xEmu),String(n.simplePosition.yEmu)].join(":"):""].join("|")}function ni(e){switch(e.kind){case "ready":return `ready:${e.resourceKey}:${e.contentId}:${e.pixelWidth}x${e.pixelHeight}`;case "pending":return `pending:${e.resourceKey}`;case "external":return `external:${e.relationshipId}:${e.sinkSafe?"1":"0"}`;case "missing":return "missing";case "unrenderable":return `unrenderable:${e.reason}`;default:return e.kind}}var mv=1;function Pu(e,n){if(e.kind==="drawing"||Wa$1(e)){n.push(e.id);return}if("children"in e)for(let t of e.children)Pu(t,n);}function gv(e){if(e.kind!=="paragraph")return [];let n=[];for(let t of e.children)Pu(t,n);return Object.freeze(n)}function hv(e){let{ownerPartName:n,part:t,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,b=Va$1(r,n),h=_a$1(t,{resolveRelationship:b}),x=Sy(t),I=(C,k)=>{if(l||u.has(k))return;u.add(k);let z=d;o.resolveForProjection(C).then(F=>{l||z!==d||(c.set(k,F),F.kind==="ready"&&i(F.validatedHandle),g+=1,f.set(k,g),a(n));}).catch(()=>{l||z!==d||(c.set(k,Object.freeze({kind:"unrenderable",partName:null,mime:"unknown",reason:"decode-failed"})),g+=1,f.set(k,g),a(n));}).finally(()=>{u.delete(k);});},w=C=>{let k=by(C),z=c.get(k);if(z)return z;let F=C.picture?.linkedRelationshipId;if(F){let ee=o.resolveLinked(n,F);return c.set(k,ee),g+=1,f.set(k,g),ee}let y=Object.freeze({kind:"pending",resourceKey:k});return c.set(k,y),g+=1,f.set(k,g),I(C,k),y},O=C=>h.get(C)??null,M=Object.freeze({ownerPartName:n,projectionForAtom:O,project:C=>O(C.id),resourceOf:w}),P=C=>{let k=m.get(C);if(k)return k;let z=gv(C),F=null,y=(v,E)=>{if(!(E>=mv))for(let _ of v){let A=h.get(_)?.textboxStory;if(!A)continue;let T=[];if(Pu(A.content,T),T.length!==0){F||(F=[...z]);for(let j of T)F.push(j);y(T,E+1);}}};y(z,0);let ee=F??z;return m.set(C,ee),ee};return {context:M,cacheTokenForPart:()=>`${n}|${g}|${d}|${h.size}`,drawingTokenForParagraph:C=>{let k=p.get(C);if(k?.resourceEpoch===g)return k.token;let z=P(C);if(z.length===0)return p.set(C,{resourceEpoch:g,token:""}),"";let y=z.map(ee=>{let v=h.get(ee);if(!v)return `${ee}:refused`;let E=w(v);return [ee,wu(v),ni(E),String(f.get(by(v))??0)].join("|")}).sort().join(";");return p.set(C,{resourceEpoch:g,token:y}),y},isCompatibleWith:(C,k)=>{if(C===t)return true;let z=Sy(C);if(x&&z&&x.size===z.size){let y=true;for(let[ee,v]of x)if(z.get(ee)!==v){y=false;break}if(y)return true}let F=_a$1(C,{resolveRelationship:Va$1(k,n)});if(F.size!==h.size)return false;for(let[y,ee]of h){let v=F.get(y);if(!v||wu(v)!==wu(ee))return false}return true},dispose:()=>{l=true,d+=1;for(let C of c.values())C.kind==="ready"&&s(C.validatedHandle);c.clear(),u.clear(),f.clear();}}}var Ry=0;function VM(e){let n=e.session.packageRevision(),t=e.session.currentPackage(),r=e.resourceLookup??lb$1(t,{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=ab$1(m);g&&l.set(m.resourceKey,g);},c=m=>{s.delete(m.resourceKey);let g=l.get(m.resourceKey);g&&(bb$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 b=o.get(m);if(b)return b;let h=u(m,g);a.set(m,h);let x=hv({ownerPartName:m,part:h,pkg:g.currentPackage(),lookup:r,onResourceSettled:()=>e.onResourcesChanged(),rememberReadyHandle:d,forgetReadyHandle:c});return o.set(m,x),Ry+=1,i.set(x,Ry),x},p=m=>{let g=m.currentPackage();if(g.partBytes===t.partBytes&&g.relationships===t.relationships&&g.contentTypes===t.contentTypes){for(let[h,x]of o){let I=g.parts.get(h)??(h===m.part().name?m.part():void 0);if(I&&x.isCompatibleWith(I,g)){a.set(h,I);continue}x.dispose(),o.delete(h),a.delete(h);}n=m.packageRevision(),t=g;return}for(let h of o.values())h.dispose();o.clear(),a.clear();for(let h of l.values())bb$1(h);l.clear(),s.clear(),e.resourceLookup||r.dispose(),n=m.packageRevision(),t=g,r=e.resourceLookup??lb$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){return f(g,e.session).drawingTokenForParagraph(m)},mintValidatedBytes(m,g){let b=s.get(m.resourceKey);return !b||b.contentId!==m.contentId?null:$a$1(m,g)},sync(m){m.packageRevision()!==n&&p(m);},dispose(){for(let m of o.values())m.dispose();o.clear(),a.clear();for(let m of l.values())bb$1(m);l.clear(),s.clear(),e.resourceLookup||r.dispose();}})}function vy(e,n,t){if(n===void 0)return Py(e,t);let r=wy.get(e);if(r&&r.epoch===n)return r.token;let o=Py(e,t);return wy.set(e,{epoch:n,token:o}),o}var wy=new WeakMap;function Py(e,n){let t=[],r=o=>{if(o.kind==="paragraph"){let a=n(o);a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.sort().join(";")}var Ty=new WeakMap;function yv(e){let n=Ty.get(e);if(n!==void 0)return n;let t=bv(e);return Ty.set(e,t),t}function bv(e){let n=t=>{if(t.kind==="textValue"||ec$1(t)||cc$1(t)!==null)return false;if(t.kind==="text"||t.localName==="t"){for(let r of t.children)if(r.kind==="textValue"&&r.value.trim().length>0)return true;return false}for(let r of t.children)if(r.kind!=="textValue"&&n(r))return true;return false};for(let t of e.children)if(t.kind!=="textValue"&&n(t))return true;return false}function By(e,n){for(let t of n.resultParagraphIds){let r=ya$1(e,t);if(!(!r||r.kind==="textValue"||r.kind!=="paragraph")&&yv(r))return true}return false}var ky=new WeakMap,Oy=new WeakMap,Cy=new WeakMap;function Iu(e){let n=ky.get(e);if(n)return n;let t=new Set;for(let r of Bc$1(e))t.add(r.beginParagraphId),t.add(r.endParagraphId);return ky.set(e,t),t}function vu(e){let n=Oy.get(e);if(n)return n;let t=new Set;for(let r of Bc$1(e))By(e,r)||t.add(r.beginParagraphId);return Oy.set(e,t),t}function Tu(e){let n=Cy.get(e);if(n)return n;let t=new Set;for(let r of Bc$1(e))if(!By(e,r))for(let o of r.resultParagraphIds)t.add(o);return Cy.set(e,t),t}var xv=4,ku=256;function Sv(e){return `txbx-${e}`}var Ly=new WeakMap;function Dy(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return;let o=Ly.get(e);if(o&&o.rawIndex===n&&o.styleCascade===t&&o.displayMode===r)return o.listItems;let a=Ya(n,t),i=Ec(e,r),s=Ys(i,a,t),l=s.size>0?s:void 0;return Ly.set(e,{rawIndex:n,styleCascade:t,displayMode:r,listItems:l}),l}var Rv=2e4,wv=Object.freeze({contents:Object.freeze([]),truncated:false}),My=new WeakMap;function Pv(e){let n=My.get(e);if(n)return n;let t=[],r=0,o=false,a=[e];for(;a.length>0;){let s=a.pop();if(r+=1,r>Rv){o=true;break}if(s.kind!=="textValue"&&s.localName==="txbxContent"){t.push(s);continue}if("children"in s)for(let l=s.children.length-1;l>=0;l-=1)a.push(s.children[l]);}let i=t.length>0||o?Object.freeze({contents:Object.freeze(t),truncated:o}):wv;return My.set(e,i),i}var Ey=1,Fy=new WeakMap;function Iv(e){let n=Fy.get(e);return n===void 0&&(n=Ey,Ey+=1,Fy.set(e,n)),n}var Ny=new WeakMap;function _y(e,n,t,r="all-markup"){if(!n||n.nums.size===0)return "";let o=Pv(e);if(o.contents.length===0&&!o.truncated)return "";let a=Ny.get(e);if(a&&a.rawIndex===n&&a.styleCascade===t&&a.displayMode===r)return a.token;let i=[];for(let l of o.contents){let d=Dy(l,n,t,r);if(d)for(let[c,u]of d)i.push(`${c}=${u.cacheToken}`);}o.truncated&&i.push(`truncated:${Iv(n)}`);let s=i.length===0?"":`|txbxlist:${i.join(",")}`;return Ny.set(e,{rawIndex:n,styleCascade:t,displayMode:r,token:s}),s}function il(e,n){let t=e.textboxStory;if(!t)return null;let r=ln(e.extentEmu.cx),o=ln(e.extentEmu.cy),a=ln(t.insetsEmu.left),i=ln(t.insetsEmu.right),s=ln(t.insetsEmu.top),l=ln(t.insetsEmu.bottom),d=Math.max(1,r-a-i),c=Math.max(0,o-s-l),u=ln(t.strokeWidthEmu),f={fillHex:t.fillHex,strokeHex:t.strokeHex,strokeWidthPt:u,contentWidth:d,contentHeight:c};if((n.depth??0)>=xv)return {fragments:[],flowHeight:0,contentOffset:{x:a,y:s},...f,fallbackReason:"textbox-nesting-limit"};let m=Ec(t.content,n.displayMode),g=Dy(t.content,n.numberingIndex,n.styleCascade,n.displayMode),b=Sv(e.drawingNodeId),h=0,x=Mr(m,0,d,0,0,{measurer:n.measurer,cache:n.cache,producer:`${n.producer}|txbx:${e.drawingNodeId}`,nextLineId:()=>`${b}-line-${h++}`,styleCascade:n.styleCascade,...g?{listItems:g}:{},...n.pageContext?{pageContext:n.pageContext}:{},...n.documentProperties?{documentProperties:n.documentProperties}:{},...n.defaultTabStopPt!==void 0?{defaultTabStopPt:n.defaultTabStopPt}:{},...n.displayMode?{displayMode:n.displayMode}:{},...n.inlineDrawingLayout?{inlineDrawingLayout:n.inlineDrawingLayout}:{},...n.drawingTokenForParagraph?{drawingTokenForParagraph:n.drawingTokenForParagraph}:{}}),I=x.blocks,w=x.bottom,O,M=[];if(I.length>ku){Ay(I.slice(ku),M),I=I.slice(0,ku);let C=I[I.length-1];w=C?C.box.y+C.box.height:0,O="textbox-fragment-limit";}if(w>c+.001){let C=I.filter(k=>k.box.y<c-.001);C.length<I.length&&(Ay(I.filter(k=>k.box.y>=c-.001),M),I=C,O=O??"textbox-height-clip");}let P=Math.max(0,c-w),L=t.verticalAnchor==="center"?P/2:t.verticalAnchor==="bottom"?P:0;return {fragments:I,flowHeight:w,contentOffset:{x:a,y:s+L},...f,...O?{fallbackReason:O}:{},...M.length>0?{clippedResourceToken:M.join("!")}:{}}}function Ay(e,n){ua({fragments:e},t=>{n.push(ni(t.resource));});}var vv=128,Hy=new WeakMap;function Tv(e){let n=Hy.get(e);if(n!==void 0)return n;let t=y(qa$1(e));return Hy.set(e,t),t}function kv(e){let n=Math.max(1,Math.floor(e)),t=new Map;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>n;){let a=t.keys().next();if(a.done)break;t.delete(a.value);}},get size(){return t.size}}}function Ov(e,n,t,r,o,a,i,s=vv,l,d=je,c,u,f,p,m,g){let b=Kd(e.root),h=kv(s),x=Mt(e,d),I=Br({numberingIndex:g?.numberingIndex,styleCascade:a},x).listItems,w=Tv(e),O,M=P=>{let L=Zt(b)||c?P:void 0,C=L?.pageNumber??p?.pageNumber??1,k=ec(L,b)+(c?`|pn:${C}`:"");if(k===""){if(O)return O}else {let _=h.get(k);if(_)return _}let z=0,F=[],y=()=>{let _=L?.pageNumber??p?.pageNumber??1,A=p?.pageWidth??n,T=p?.pageHeight??Math.max(1,n),j=p?.marginLeft??0,N=p?.marginRight??0,V=p?.marginTop??0,Y=p?.marginBottom??0,G=Math.max(1,T-V-Y);return Object.freeze({pageNumber:_,pageWidth:A,pageHeight:T,marginLeft:j,marginRight:N,marginBottom:Y,contentInsetTop:V,contentInsetBottom:Y,contentWidth:n,contentHeight:G,contentBandHeight:G,ownerPartName:e.name,storyKind:e.name.includes("ftr")?"footer":"header"})},ee=Object.freeze([]),v;if(c){let _=false;for(let A=0;A<vr;A+=1){F.splice(0,F.length),z=0,v=Mr(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+k+(d===je?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${z++}`,styleCascade:a,...I?{listItems:I}:{},pageContext:L,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,anchorFrameBase:y,pageContentClip:()=>Na(y()),layoutTextboxStoryFor:j=>il(j,{measurer:t,producer:r+k+(d===je?"":`|rev:${d}`),cache:o,styleCascade:a,...L?{pageContext:L}:{},...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{},inlineDrawingLayout:c,...u?{drawingTokenForParagraph:u}:{},...g?.numberingIndex?{numberingIndex:g.numberingIndex}:{}}),collectAnchoredDrawings:j=>{F.push(...j);},columnBoxForParagraph:j=>Object.freeze({x:0,y:j.y,width:n,height:j.height}),pageExclusionZones:()=>ee,...u?{drawingTokenForParagraph:u}:f?{drawingLayoutToken:f}:{}});let T=vc(F,c,0,n);if(T.length===0){_=true,ee=T;break}if(A>0&&mt(ee)===mt(T)){_=true,ee=T;break}ee=T;}if(!_)throw new Oo(`header/footer exclusion reflow did not converge within ${vr} passes`)}else v=Mr(x,0,Math.max(1,n),0,0,{measurer:t,cache:o,producer:r+k+(d===je?"":`|rev:${d}`),nextLineId:()=>`hf-${e.name}-line-${z++}`,styleCascade:a,...I?{listItems:I}:{},pageContext:L,...l!==void 0?{defaultTabStopPt:l}:{},displayMode:d,...m?{documentProperties:m}:{}});let E={partName:e.name,part:e,contentKey:w,fragments:v.blocks,flowHeight:v.bottom,pageFieldNeeds:b,...F.length>0?{anchoredDrawings:Object.freeze([...F])}:{},withPageContext:_=>!Zt(b)&&!E.anchoredDrawings?.length?O??E:M(_)};return k===""?O=E:h.set(k,E),E};return M(i)}function ti(e,n,t){let r=t-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 tc(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-${n}`,index:n,box:o(e.box),contentBox:o(e.contentBox),...s?{header:s}:{},...l?{footer:l}:{},...d?{footnotes:d}:{},...c?{endnotes:c}:{}}}var zy=new WeakMap;function Ou(e){let n=zy.get(e);if(n!==void 0)return n;let t=[];kd(e,o=>{let a=o.marker;a&&t.push(`${o.paragraphId}=${a.text}@${a.numFmt}:${a.level}`);});let r=t.length===0?"":`|list:${t.join(",")}`;return zy.set(e,r),r}var jy=new WeakMap;function Cu(e){let n=jy.get(e);if(n!==void 0)return n;let t=[];ua(e,o=>{t.push(ni(o.resource)),o.kind==="anchoredDrawing"&&o.textboxStory?.clippedResourceToken&&t.push(`clip:${o.textboxStory.clippedResourceToken}`);});let r=t.length===0?"":`!${t.join("!")}`;return jy.set(e,r),r}function Gy(e,n,t){if(!e)return "";let r=(o,a)=>[...a].map(([i,s])=>`${o}${i}=${s.flowHeight}@${s.contentKey}${Cu(s)}${Ou(s)}`).sort().join(",");return `|hf:${n},${t},${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};`+r("h",e.headers)+";"+r("f",e.footers)}function Wy(e){return e.delta===0?true:(e.delta%2===0||!e.evenAndOddHeaders&&!e.parityDependent&&!e.usedPageParity)&&(!e.titlePage||e.markPageCount>0)&&!e.hasNoteReserves&&!e.hasExclusionZones}var Cv="http://schemas.openxmlformats.org/wordprocessingml/2006/main",Bv="http://schemas.microsoft.com/office/word/2010/wordml",Lv="http://schemas.microsoft.com/office/word/2012/wordml";function Mv(e){if(e.kind!=="textValue"){for(let n of e.attributes)if(n.localName==="val"&&n.namespaceUri===Cv)return n.value}}function jo(e){for(let n of e.children)if(n.kind!=="textValue"&&(n.kind==="contentControlProperties"||n.localName==="sdtPr"))return n}function Er(e,n){if(e){for(let t of e.children)if(t.kind!=="textValue"&&t.localName===n)return t}}function Nt(e,n){let t=Er(e,n);return t?Mv(t):void 0}function ri(e){return e==="sdtLocked"||e==="contentLocked"||e==="sdtContentLocked"?e:"unlocked"}function sl(e){if(!e)return "richText";for(let n of e.children){if(n.kind==="textValue")continue;let t=n.kind,r=n.localName,o=n.namespaceUri;if(t==="contentControlDropDownList"||r==="dropDownList")return "dropdown";if(t==="contentControlComboBox"||r==="comboBox")return "comboBox";if(t==="contentControlDate"||r==="date")return "date";if(r==="picture")return "picture";if(t==="contentControlText"||r==="text")return "plainText";if(r==="richText")return "richText";if(t==="contentControlCheckbox"||r==="checkbox"&&o===Bv)return "checkbox";if(r==="repeatingSection"&&o===Lv)return "repeatingSection"}return "richText"}function $y(e){let n=(t,r)=>{for(let o of t)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(Lb$1(o)&&r<Kb$1){let a=n(Ob$1(o),r+1);if(a)return a}}return null};return n(Ob$1(e),0)??"inline"}function Go(e){let n=Xy.get(e);if(n!==void 0)return n;let t=Ev(e);return ll!==null&&ll===t?t=ll:ll=t,Xy.set(e,t),t}var ll=null,Xy=new WeakMap,Vy=new WeakMap;function Ev(e){let n=(t,r)=>{if(t.kind==="textValue")return "";let o=t.kind==="paragraph"||t.kind==="table"||Lb$1(t);if(o){let i=Vy.get(t);if(i!==void 0&&i.depth===r)return i.token}let a;if(Lb$1(t)){if(r>=Kb$1)return "";let i=jo(t),s=[t.id,Nt(i,"alias")??"",Nt(i,"tag")??"",ri(Nt(i,"lock")),sl(i),Er(i,"showingPlcHdr")?"1":"0",Er(i,"dataBinding")?"1":"0"].join(":"),l=Ob$1(t).map(d=>n(d,r+1)).filter(d=>d.length>0);a=[s,...l].join("|");}else a=t.children.map(i=>n(i,r)).filter(i=>i.length>0).join("|");return o&&Vy.set(t,{depth:r,token:a}),a};return n(e.root,0)}function Ky(e,n){let t=[n],r=new Set([n]);for(let o of e.pages)for(let a of [o.header,o.footer])!a?.part||r.has(a.part)||(r.add(a.part),t.push(a.part));return t}var Bu=new WeakMap,Yy=new WeakMap;function Uy(e){if(e.length===1)return oi(e[0]);let n=Bu.get(e[0]);if(n&&dl(n.parts,e))return n.index;let t=e.map(d=>oi(d)),r=Yy.get(t[0]);if(r&&dl(r.indexes,t))return Bu.set(e[0],{parts:e,index:r.index}),r.index;let o=[],a=new Set,i=new Set;for(let d of t){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 Yy.set(t[0],{indexes:t,index:l}),Bu.set(e[0],{parts:e,index:l}),l}function cl(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(Lb$1(e)){let t=0;for(let r of Ob$1(e))t+=cl(r);return t}let n=0;for(let t of e.children)n+=cl(t);return n}var Lu=new WeakMap;function dl(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var qy=new WeakMap;function Fv(e){for(let n of Se(e))if(n.root.kind!=="textValue"){for(let t of n.root.children)if(t.kind!=="textValue")return t}return null}function oi(e){let n=Lu.get(e);if(n!==void 0)return n;let t=Av(e),r=Fv(e),o=r?qy.get(r):void 0;if(o&&dl(o.lists,t))return Lu.set(e,o.index),o.index;let a=[];for(let d of t)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&&qy.set(r,{lists:t,index:l}),Lu.set(e,l),l}var Nv=Object.freeze([]);function Av(e){let n=[],t=(i,s)=>{for(let l of i){if(l.kind==="paragraph"||l.kind==="table"){s.push(l.id);continue}if(Lb$1(l)){t(Ob$1(l),s);continue}(l.kind==="tableRow"||l.kind==="tableCell")&&t(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(Lb$1(f)){if(d>=Kb$1){u+=cl(f);continue}let p=jo(f),m=ri(Nt(p,"lock")),g=[...c,m],b=u,h=r(Ob$1(f),s,u,d+1,g);n.push({control:f,nestingDepth:d,lockStack:g,level:"inline",paragraphId:s,range:{start:b,end:h},blockIds:[]}),u=h;continue}if(f.kind==="hyperlink"){u=r(f.children,s,u,d,c);continue}u+=cl(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 b of d.children)b.kind==="tableRow"&&o([b],s,l);continue}if(d.kind==="tableRow"){for(let b of d.children)b.kind==="tableCell"?o(b.children,s,l):Lb$1(b)&&o([b],s,l);continue}if(!Lb$1(d)||s>=Kb$1)continue;let c=jo(d),u=ri(Nt(c,"lock")),f=[...l,u],p=$y(d),m=Ob$1(d);if(p==="inline"){o(m,s+1,f);continue}let g=[];t(m,g),n.push({control:d,nestingDepth:s,lockStack:f,level:p,blockIds:g}),o(m,s+1,f);}},a=[];for(let i of Se(e))if(i.root.kind!=="textValue")for(let s of i.root.children){if(s.kind==="textValue")continue;let l=Zy.get(s);if(l!==void 0){a.push(l);continue}let d=n.length;o([s],0,[]);let c=n.length===d?Nv:Object.freeze(n.slice(d));Zy.set(s,c),a.push(c);}return a}var Zy=new WeakMap,Mu=1<<20,Jy=new WeakMap,Qy=null,eb=0;function Dv(e){return e!==Qy&&(Qy=e,eb+=1),eb}function _v(e,n,t,r){let o=Jy.get(e);if(o!==void 0&&o.neededStamp===t)return o;let a=[],i=[],s=e.index*Mu,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"){n.neededBlockIds.has(m.paragraphId)&&(a.push({pageIndex:p,blockId:m.paragraphId,box:c(m.box)}));let g=n.neededParagraphIds.has(m.paragraphId);for(let b of m.lines){let h=s;if(s=Math.min(s+1,e.index*Mu+Mu-1),!g)continue;let x=Math.max(0,b.box.height-b.leading-(b.trailingSpacing??0));for(let I of b.spans)i.push({pageIndex:p,paragraphId:I.range.paragraphId,start:I.range.start,end:I.range.end,line:h,box:{x:I.box.x+l,y:I.box.y+b.leading+d,width:I.box.width,height:x}});}return}n.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 b of g.cells)for(let h of b.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:t,blocks:a,spans:i};return Jy.set(e,f),f}function Hv(e,n,t){let r=Dv(n.neededToken),o=new Map,a=new Map,i=new Set;for(let s of e.pages){let l=_v(s,n,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 zv(e,n,t){let r=new Map,o=new Set;for(let a of e)if(!o.has(a)){o.add(a);for(let i of n.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=pa(i);return s?[{pageIndex:a,box:s}]:[]})}function jv(e,n,t,r){let o=t.spansByParagraph.get(e)??[],a=new Map,i=t.repeatedParagraphs.has(e),s=0,l=o.length;for(;!i&&s<l;){let d=s+(l-s>>1);(n.start===n.end?o[d].end<n.start:o[d].end<=n.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<=n.start)continue;if(c.start>=n.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&&n.start===n.end){let d=[],c=new Set;for(let u=s;u<o.length;u+=1){let f=o[u];if(f.start>n.start){if(i)continue;break}if(n.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*(n.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=pa(d.boxes);return c?[{pageIndex:d.pageIndex,box:c}]:[]})}var nb=new WeakMap;function Gv(e){let n=nb.get(e);if(n!==void 0)return n;let t=jo(e),r=Nt(t,"alias"),o=Nt(t,"tag"),a={...r!==void 0?{alias:r}:{},...o!==void 0?{tag:o}:{},controlType:sl(t),placeholder:Er(t,"showingPlcHdr")!==void 0,bound:Er(t,"dataBinding")!==void 0};return nb.set(e,a),a}function Wv(e,n,t){let r=e.level==="inline"&&e.paragraphId&&e.range?jv(e.paragraphId,e.range,n):zv(e.blockIds,n);return {...Nu(e),fragments:r}}function $v(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];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 Xv(e,n){return e.id===n.id&&e.alias===n.alias&&e.tag===n.tag&&e.controlType===n.controlType&&e.lock===n.lock&&e.effectiveLock===n.effectiveLock&&e.placeholder===n.placeholder&&e.bound===n.bound&&e.nestingDepth===n.nestingDepth&&e.level===n.level&&$v(e.fragments,n.fragments)}function Wo(e,n){if(!e)return n.length===0;if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(!Xv(e[t],n[t]))return false;return true}function Eu(e,n){return {revision:e.revision,pages:e.pages,...n.contentControls!==void 0?{contentControls:n.contentControls}:{},...n.controlContextToken!==void 0?{controlContextToken:n.controlContextToken}:{}}}var tb=new WeakMap;function Fu(e,n,t=Go(n),r){let o=Ky(e,n);if(o.length>1){let f=o.map(p=>Go(p));t=f.some(p=>p!=="")?f.join("|"):"";}if(t===""){let f=e.pages.some(m=>m.contentControls!==void 0&&m.contentControls.length>0);if(!f&&e.controlContextToken===t&&Wo(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 {revision:e.revision,pages:p,contentControls:[],controlContextToken:t}}let a=Uy(o),i=Hv(e,a),s=a.controls.map(f=>Wv(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===t&&Wo(e.contentControls,s)&&e.pages.every(f=>Wo(f.contentControls,l.get(f.index)??[])))return e;let d=false,c=e.pages.map(f=>{let p=l.get(f.index)??[];if(Wo(f.contentControls,p)||p.length===0&&!f.contentControls)return f;d=true;let m=tb.get(f);if(m&&Wo(m.controls,p))return m.wrapped;let g={...f,contentControls:p};return tb.set(f,{controls:p,wrapped:g}),g}),u=d?c:e.pages;return u===e.pages&&e.controlContextToken===t&&Wo(e.contentControls,s)?e:{revision:e.revision,pages:u,contentControls:s,controlContextToken:t}}function Vv(e,n){return oi(e).controls.filter(r=>n?r.paragraphId!==void 0?n.has(r.paragraphId):rb(r.control).some(o=>n.has(o)):true).map(Nu)}function rb(e){let n=[],t=r=>{for(let o of r)if(o.kind!=="textValue"){if(o.kind==="paragraph"){n.push(o.id);continue}if(Lb$1(o)){t(Ob$1(o));continue}t(o.children);}};return t(Ob$1(e)),n}function Yv(e,n){let t=null;for(let r of oi(e).controls)(r.paragraphId===n||r.blockIds.includes(n)||rb(r.control).includes(n))&&(!t||r.nestingDepth>=t.nestingDepth)&&(t=r);return t?Nu(t):null}function Nu(e){let n=Gv(e.control);return {id:e.control.id,...n.alias!==void 0?{alias:n.alias}:{},...n.tag!==void 0?{tag:n.tag}:{},controlType:n.controlType,lock:e.lockStack[e.lockStack.length-1]??"unlocked",effectiveLock:Ai(e.lockStack),placeholder:n.placeholder,bound:n.bound,nestingDepth:e.nestingDepth,level:e.level,fragments:[]}}var ul=4096,Qn=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 Au(e,n,t=31680*2){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<=0||r>t?n:r}function Fr(e,n){if(e===void 0||!/^-?\d{1,7}$/.test(e))return n;let t=Number(e);return !Number.isFinite(t)||Math.abs(t)>31680?n:t}function lb(e,n,t=31680){if(e===void 0||!/^\d{1,7}$/.test(e))return n;let r=Number(e);return !Number.isFinite(r)||r<0||r>t?n:r}var Je=(e,n)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let t of e.attributes??[])if(t.localName===n)return t.value}},Nr=(e,n)=>{if(e.kind!=="textValue"){for(let t of e.children??[])if(t.kind!=="textValue"&&"localName"in t&&t.localName===n)return t}};function ob(e,n,t){let r=Je(e,n);return r===void 0?t:r==="0"||r==="false"||r==="off"||r==="no"?false:r==="1"||r==="true"||r==="on"||r==="yes"?true:t}function Kv(e){if(!e)return 1;let n=Je(e,"num");return !n||!/^\d{1,7}$/.test(n)?1:Math.max(1,Math.min(12,Number(n)))}function Uv(e,n,t){if(!e||e.kind==="textValue")return [];let r=[];for(let o of e.children??[]){if(r.length>=n||o.kind==="textValue"||!("localName"in o)||o.localName!=="col")continue;let a=r.length;r.push({widthTwips:Au(Je(o,"w"),1,31680),gapTwips:a===n-1?0:lb(Je(o,"space"),t)});}return r}function qv(e){let n=e?Nr(e,"type"):void 0,t=n?Je(n,"val"):void 0;return t==="continuous"||t==="evenPage"||t==="oddPage"||t==="nextColumn"?t:"nextPage"}var Zv=new Set(["hyphen","period","colon","emDash","enDash"]);function db(e){let n=Nr(e,"pgNumType");if(!n||n.kind==="textValue")return;let t={},r=Je(n,"start");if(r!==void 0&&/^-?\d{1,7}$/.test(r)){let s=Number(r);Number.isFinite(s)&&s>=0&&s<=9999&&(t.start=s);}let o=Je(n,"fmt");o!==void 0&&o.length>0&&o.length<=64&&!/[<>&"']/.test(o)&&(t.fmt=o);let a=Je(n,"chapStyle");if(a!==void 0&&/^\d{1,2}$/.test(a)){let s=Number(a);Number.isFinite(s)&&s>=0&&s<=9&&(t.chapStyle=s);}let i=Je(n,"chapSep");return i!==void 0&&Zv.has(i)&&(t.chapSep=i),t}var ab=new WeakMap;function fl(e){if(!e)return Qn;let n=ab.get(e);if(n!==void 0)return n;let t=Jv(e);return ab.set(e,t),t}function Jv(e){let n=Nr(e,"pgSz"),t=Nr(e,"pgMar"),r=Nr(e,"cols"),o=Qn,a=n?Je(n,"orient"):void 0,i=n?Au(Je(n,"w"),o.pageSize.widthTwips):o.pageSize.widthTwips,s=n?Au(Je(n,"h"),o.pageSize.heightTwips):o.pageSize.heightTwips,l=db(e),d=Kv(r),c=r?lb(Je(r,"space"),o.columns.gapTwips):o.columns.gapTwips,u=r?ob(r,"equalWidth",true):true;return {pageSize:{widthTwips:i,heightTwips:s},margins:{topTwips:t?Fr(Je(t,"top"),1440):o.margins.topTwips,rightTwips:t?Fr(Je(t,"right"),1440):o.margins.rightTwips,bottomTwips:t?Fr(Je(t,"bottom"),1440):o.margins.bottomTwips,leftTwips:t?Fr(Je(t,"left"),1440):o.margins.leftTwips,headerTwips:t?Fr(Je(t,"header"),720):o.margins.headerTwips,footerTwips:t?Fr(Je(t,"footer"),720):o.margins.footerTwips,gutterTwips:t?Fr(Je(t,"gutter"),0):o.margins.gutterTwips},columns:{count:d,gapTwips:c,equalWidth:u,separator:r?ob(r,"sep",false):false,definitions:u?[]:Uv(r,d,c)},landscape:a==="landscape"||i>s,titlePage:ma$1(e,"titlePg"),breakType:qv(e),...l!==void 0?{pageNumbering:l}:{}}}function Qv(e){let n=t=>{if(t.kind!=="textValue"){if(t.kind==="body")return Nr(t,"sectPr");for(let r of t.children??[]){let o=n(r);if(o)return o}}};return n(e.root)}var ib=new WeakMap;function pl(e){let n=ib.get(e);if(n!==void 0)return n??void 0;let t=e.children.find(a=>a.kind==="paragraphProperties"),r=t?Nr(t,"sectPr"):void 0,o=r&&r.kind!=="textValue"?r:void 0;return ib.set(e,o??null),o}function eT(e){let n=cb(e);return n[n.length-1]?.properties??Qn}function cb(e,n="all-markup"){return ub(e,n).sections}function ub(e,n="all-markup"){return Du(e,Mt(e,n))}var sb=Xe$1(16);function Du(e,n){let t=sb.get(n);if(t&&t.part===e)return t.result;let r=nT(e,n);return sb.set(n,{part:e,result:r}),r}function nT(e,n){let t=[],r=0,o=false;for(let i=0;i<n.length;i+=1){let s=n[i];if(s.kind!=="paragraph")continue;let l=pl(s);if(l){if(t.length>=ul){o=true;continue}t.push({index:t.length,properties:fl(l),blockStart:r,blockEndExclusive:i+1}),r=i+1;}}if(o){if(t.length>0){let i=t[t.length-1];t[t.length-1]={...i,blockEndExclusive:n.length};}return {sections:t,truncated:true}}let a=Qv(e);if(r<n.length||t.length===0){if(t.length>=ul){let i=t[t.length-1];return t[t.length-1]={...i,blockEndExclusive:n.length},{sections:t,truncated:true}}t.push({index:t.length,properties:fl(a),blockStart:r,blockEndExclusive:n.length});}else if(a){if(t.length>=ul)return {sections:t,truncated:true};t.push({index:t.length,properties:fl(a),blockStart:r,blockEndExclusive:n.length});}return {sections:t,truncated:o}}function Ar(e){let n=Hc$1(Fc$1(e.pageSize.widthTwips)),t=Hc$1(Fc$1(e.pageSize.heightTwips)),r=Hc$1(Fc$1(e.margins.leftTwips+e.margins.gutterTwips)),o=Hc$1(Fc$1(e.margins.rightTwips)),a=Hc$1(Fc$1(e.margins.topTwips)),i=Hc$1(Fc$1(e.margins.bottomTwips));return n-r-o<=0||t-a-i<=0?ma:{width:n,height:t,margin:{top:a,right:o,bottom:i,left:r},headerDistance:Hc$1(Fc$1(Math.max(0,e.margins.headerTwips))),footerDistance:Hc$1(Fc$1(Math.max(0,e.margins.footerTwips)))}}var $o=1;function _u(e,n){let t=Math.max($o,n),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($o,Hc$1(Fc$1(p.widthTwips)))),s=o.slice(0,-1).map(p=>Math.max(0,Hc$1(Fc$1(p.gapTwips))));let c=s.reduce((p,m)=>p+m,0),u=Math.max(r*$o,t-c),f=i.reduce((p,m)=>p+m,0);if(f>u){let p=u/f;i=i.map(m=>Math.max($o,m*p));}}else {let c=Math.max(0,Hc$1(Fc$1(e.gapTwips))),u=Math.min(c,Math.max(0,(t-r*$o)/(r-1||1)));s=Array.from({length:Math.max(0,r-1)},()=>u);let f=Math.max($o,(t-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}}function tT(e,n,t){return ai(e,n,()=>t)}function ai(e,n,t){let r=[],o=null,a=-1,i=-1;for(let s of n){let l=t(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:kt(l.numFmt,d),displayNumber:d});}return r}function fb(e){let n=new Map;for(let t of e)n.set(t.noteId,t.mark);return n}var Xo=Dd$1,ii=512,Hu=6,rT=1/3;function pb(e,n){return `note-${e}-${n}`}function oT(e){if(!e)return [];let n=[];for(let t of Fd$1(e.root)){if(n.length>=Xo)break;wd$1(t)&&n.push(t);}return n}function mb(e,n){if(e){for(let t of Fd$1(e.root))if(vd$1(t)===n)return t}}function zu(e,n,t){let r=td(e),o=ud$1(e);if(!r||o===null)return null;let a=kd$1(r,o),i=Cs(e),s=pb(r,o),l=0,d=Math.max(1,n),c=t.maxFlowHeightPt??Number.POSITIVE_INFINITY,u=t.noteMarks?{...t.noteMarks,activeNoteKey:a}:{marks:new Map,activeNoteKey:a},f=t.ownerPartName?t.drawingsForPart?.(t.ownerPartName):void 0,p=Br({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},i).listItems,m=Mr(i,0,d,0,0,{measurer:t.measurer,cache:t.cache,producer:`${t.producer}|${a}`,nextLineId:()=>`${s}-line-${l++}`,styleCascade:t.styleCascade,...p?{listItems:p}:{},noteMarks:u,...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.defaultTabStopPt!==void 0?{defaultTabStopPt:t.defaultTabStopPt}:{},...f?{inlineDrawingLayout:f.inlineDrawingLayout,...f.drawingTokenForParagraph?{drawingTokenForParagraph:f.drawingTokenForParagraph}:{}}:{}}),g=m.blocks,b=m.bottom,h;if(g.length>ii){g=g.slice(0,ii);let x=g[g.length-1];b=x?x.box.y+x.box.height:0,h="note-fragment-limit";}if(b>c){let x=[],I=0;for(let w of g){let O=w.box.y+w.box.height;if(O>c+.001&&x.length>0)break;x.push(w),I=O;}g=x,b=I,h=h??"note-height-cap";}return {noteKind:r,noteId:o,scopeId:a,noteType:vd$1(e),fragments:g,flowHeight:b,...h?{fallbackReason:h}:{}}}function ml(e,n,t,r){if(!e)return null;let o=Gd$1(e.root,n);return o?zu(o,t,{...r,ownerPartName:e.name}):null}function gb(e,n){return "single"}function hb(e){let n=Cs(e);if(n.length===0)return true;for(let t of n){if(t.kind!=="paragraph")return false;let r=t.children.find(o=>o.kind==="paragraphProperties");if(Object.keys(It(r)).length>0||!aT(t))return false}return true}function aT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="paragraphProperties"){if(n.kind==="run"){if(!iT(n))return false;continue}return false}return true}function iT(e){for(let n of e.children)if(n.kind!=="textValue"&&n.kind!=="runProperties"&&!(rd(n)||sd$1(n)||qd$1(n))){if(n.kind==="text"){if(n.children.map(r=>r.value).join("").trim().length>0)return false;continue}return false}return true}function si(e,n,t,r,o,a){let i=gb(),s=mb(e,n);if(s){if(hb(s))return {kind:n,fragments:[],flowHeight:Hu,synthetic:false,ruleStyle:i};let l=zu(s,t,{...r,...e?{ownerPartName:e.name}:{}});if(l&&l.flowHeight>0){let d=a??Number.POSITIVE_INFINITY;return l.flowHeight>d+.001?{kind:n,fragments:[],flowHeight:Hu,synthetic:true,ruleStyle:i,fallbackReason:"note-separator-height-cap"}:{kind:n,fragments:l.fragments,flowHeight:l.flowHeight,synthetic:false}}}return {kind:n,fragments:[],flowHeight:Hu,synthetic:true,ruleStyle:i}}function yb(e,n){let t=Math.max(1,e*rT);return {x:0,y:Math.max(0,(n-.75)/2),width:t,height:.75}}function gl(e,n,t,r){if(e.ruleStyle!==void 0||e.synthetic){let o=yb(t,e.flowHeight);return {x:n+o.x,y:r+o.y,width:o.width,height:Math.max(o.height,e.ruleStyle==="double"?2.25:.75)}}return {x:n,y:r,width:t,height:e.flowHeight}}var Gu=8,Cb=4096,Bb=256,Lb=14,Wu=12;function sT(e){let n=[];for(let t of e)n.push(`${t.noteKind}|${t.noteId}|${t.paragraphId}|${t.atomOffset}|${t.customMarkFollows?1:0}|${t.sectionIndex}`);return n.join(";")}function hl(e){return `${e.pos},${e.numFmt},${e.numStart},${e.numRestart}`}function lT(e){return e.drawingsForPart!==void 0&&e.drawingLayoutEpoch===void 0?null:[e.producer,e.defaultTabStopPt??"",e.drawingLayoutEpoch??"",hl(e.documentFootnoteProps),hl(e.documentEndnoteProps),e.footnotePropsBySection.map(hl).join(";"),e.endnotePropsBySection.map(hl).join(";")].join("\0")}var bb=new WeakMap;function dT(e,n,t){if(!e)return {memo:null,allHits:n,reused:false};let r=lT(t);if(r===null)return e.notes=null,{memo:null,allHits:n,reused:false};let o=sT(n),a=e.notes;if(a&&a.hitsFingerprint===o){let s=bb.get(a);if(a.inputFingerprint===r&&s&&s.footnotesPart===t.footnotesPart&&s.endnotesPart===t.endnotesPart&&s.measurer===t.measurer&&s.cache===t.cache&&s.styleCascade===t.styleCascade&&s.numberingIndex===t.numberingIndex)return {memo:a,allHits:a.allHits,reused:true}}let i={hitsFingerprint:o,inputFingerprint:r,allHits:n,provisionalMarks:Zu(n,t),finalMarks:null,pageAttach:new WeakMap,pageReserve:new WeakMap};return bb.set(i,{footnotesPart:t.footnotesPart,endnotesPart:t.endnotesPart,measurer:t.measurer,cache:t.cache,styleCascade:t.styleCascade,numberingIndex:t.numberingIndex}),e.notes=i,{memo:i,allHits:n,reused:false}}function cT(e,n){return n>=e.range.start&&n<e.range.end}var xb=new WeakMap;function Mb(e){let n=xb.get(e);if(n)return n;let t=[],r=o=>{for(let a of o){if(a.kind==="paragraph"){t.push(a);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)r(s.blocks);}};return r(e),xb.set(e,t),t}var Sb=new WeakMap;function Vu(e){let n=Sb.get(e);if(n)return n;let t=new Map;for(let r of e){let o=t.get(r.paragraphId);o?o.push(r):t.set(r.paragraphId,[r]);}return Sb.set(e,t),t}var Rb=new WeakMap;function bl(e,n,t){let r=Mb(e.fragments);if(!t)return n.filter(s=>r.some(l=>au(l,s.paragraphId,s.atomOffset)));let o=Rb.get(e.fragments);if(o&&o.refIndex===t)return o.result;let a=[],i=new Set;for(let s of r)for(let l of ar(s)){let d=t.get(l);if(d)for(let c of d)i.has(c)||au(s,l,c.atomOffset)&&(i.add(c),a.push(c));}return Rb.set(e.fragments,{refIndex:t,result:a}),a}function Eb(){let e=new Map;return {get(n,t,r,o,a,i,s){let d=`${n?.name??"none"}\0${o}\0${t}\0${r}\0${a}`,c=e.get(d);if(c)return c;let u=si(n,t,r,i,o,a);return e.set(d,u),u.fallbackReason&&s.push(u.fallbackReason),u}}}function uT(e,n){let t=[];for(let r of e){if(t.length>=Xo)break;t.push({...r,sectionIndex:n.get(r.paragraphId)??0});}return t}function Vo(e,n){return e.footnotePropsBySection[n]??e.footnotePropsBySection[0]??e.documentFootnoteProps}function Yu(e,n){return e.endnotePropsBySection[n]??e.endnotePropsBySection[0]??e.documentEndnoteProps}function Fb(e,n){return {measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:e.defaultTabStopPt,projectLink:e.projectLink,projectFieldLink:e.projectFieldLink,documentProperties:e.documentProperties,noteMarks:n,drawingsForPart:e.drawingsForPart}}function fT(e,n){return n===0?e:{...e,box:{...e.box,y:e.box.y+n},...e.shadingBox?{shadingBox:{...e.shadingBox,y:e.shadingBox.y+n}}:{},...e.bottomBorder?{bottomBorder:{...e.bottomBorder,box:{...e.bottomBorder.box,y:e.bottomBorder.box.y+n}}}:{},...e.borders?{borders:e.borders.map(t=>({...t,box:{...t.box,y:t.box.y+n}}))}:{},...e.marker?{marker:{...e.marker,box:{...e.marker.box,y:e.marker.box.y+n}}}:{},lines:e.lines.map(t=>({...t,box:{...t.box,y:t.box.y+n},spans:t.spans.map(r=>({...r,box:{...r.box,y:r.box.y+n}}))}))}}function wb(e,n){return n===0?[...e]:e.map(t=>t.kind==="paragraph"?fT(t,n):{...t,box:{...t.box,y:t.box.y+n}})}function pT(e,n){if(e.lines.length===0)return e.box.y+e.box.height<=n+.001?{head:e,tail:null}:{head:null,tail:e};let t=0;for(;t<e.lines.length;t+=1){let g=e.lines[t];if(g.box.y+g.box.height>n+.001)break}if(t===0)return {head:null,tail:e};if(t>=e.lines.length)return {head:e,tail:null};let r=e.lines.slice(0,t),o=e.lines.slice(t),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 mT(e){let n=0;for(let t of e)n=Math.max(n,t.box.y+t.box.height);return n}function xl(e,n,t){if(e.flowHeight<=n+.001)return {head:e.fragments,headHeight:e.flowHeight,tail:[],tailHeight:0};if(n<=.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<ii;u+=1){let f=e.fragments[u],p=f.box.y+f.box.height;if(p<=n+.001){r.push(f),o=p,a=u+1;continue}if(f.kind==="paragraph"){let m=pT(f,n);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=t?.fullContentHeight??n,h=f.lines[0]?.box.height??f.box.height;if(r.length===0&&n>=g-.001&&h>g+.001){t?.reasons?.push("note-line-exceeds-page"),a=u+1,i=null;let x=e.fragments.slice(a),I=x[0]?.box.y??0;return {head:[],headHeight:0,tail:wb(x,-I),tailHeight:Math.max(0,e.flowHeight-I)}}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=wb(s,-l),c=mT(d);return {head:r,headHeight:o,tail:d,tailHeight:c}}function gT(e,n){let t="FootnoteReference";if(!n)return {...ct,verticalAlign:"superscript"};let r=Lt([],[{localName:"rStyle",attributes:{val:t}}],n);return Ee(r,n.themeFonts)}function hT(e,n,t,r){let o=new Set;for(let c of e.values())c&&c.length>0&&o.add(c);let a=Math.max(n.footnotePropsBySection.length,n.endnotePropsBySection.length,1,...t.map(c=>c.sectionIndex+1),...r.map(c=>c.sectionIndex+1)),i=false;for(let c=0;c<a;c+=1){let u=Vo(n,c);if(u.numRestart==="eachPage"){i=true;for(let p=0;p<Wu;p+=1){let m=kt(u.numFmt,u.numStart+p);m.length>0&&o.add(m);}}let f=Yu(n,c);if(f.numRestart==="eachPage"){i=true;for(let p=0;p<Wu;p+=1){let m=kt(f.numFmt,f.numStart+p);m.length>0&&o.add(m);}}}if(!i||o.size===0)return;let s=gT("footnote",n.styleCascade),l,d=-1;for(let c of o){let u=n.measurer.measure(c,s);(u>d+.001||Math.abs(u-d)<=.001&&c.length>(l?.length??0))&&(l=c,d=u);}return l}function Nb(e,n,t){let r=ai("footnote",e,s=>Vo(t,s)),o=ai("endnote",n,s=>Yu(t,s)),a=new Map;for(let s of r)a.set(Pr("footnote",s.noteId),s.mark);for(let s of o)a.set(Pr("endnote",s.noteId),s.mark);let i=hT(a,t,e,n);return {marks:a,...i?{reservedMarkText:i}:{}}}function Sl(e){let n=0;for(let t of e.fragments)n=Math.max(n,t.box.y+t.box.height);return n}function $u(e){if(e.footnotes===void 0&&e.endnotes===void 0&&e.noteStream===void 0)return e;let{footnotes:n,endnotes:t,noteStream:r,...o}=e;return o}function yT(e,n){if(n.marks.size===0)return e;let t=false,r=e.pages.map(o=>{if(!bT(o.fragments))return o;let a=Ab(o.fragments,n);return a===o.fragments?o:(t=true,{...o,fragments:a})});return t?{revision:e.revision,pages:r}:e}var Pb=new WeakMap;function bT(e){let n=Pb.get(e);if(n!==void 0)return n;let t=false,r=o=>{for(let a of o){if(t)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"){t=true;return}continue}for(let i of a.rows)for(let s of i.cells)r(s.blocks);}};return r(e),Pb.set(e,t),t}function Ab(e,n){let t=false,r=e.map(o=>{if(o.kind==="paragraph"){let s=xT(o,n);return s!==o&&(t=true),s}let a=false,i=o.rows.map(s=>{let l=false,d=s.cells.map(c=>{let u=Ab(c.blocks,n);return u===c.blocks?c:(l=true,{...c,blocks:u})});return l?(a=true,{...s,cells:d}):s});return a?(t=true,{...o,rows:i}):o});return t?r:e}function xT(e,n){let t=false,r=e.lines.map(o=>{let a=ST(o,n);return a!==o&&(t=true),a});return t?{...e,lines:r}:e}function ST(e,n){let t=false,r=e.spans.map(o=>{let a=RT(o,n);return a!==o&&(t=true),a});return t?{...e,spans:r}:e}function RT(e,n){if(!e.projected||e.noteNav?.direction!=="to-note")return e;let t=n.marks.get(e.noteNav.scopeId);if(t===void 0)return e;let r=t??"";return e.text===r?e:{...e,text:r}}function wT(e){return e.footnotes?Math.max(0,Math.min(e.contentBox.height,e.footnotes.box.y-e.contentBox.y)):e.contentBox.height}function Db(e){return !(e.noteStream==="footnote-drain"||e.fragments.length===0&&(e.footnotes?.notes.length??0)>0)}function PT(e){for(let n=e.length-1;n>=0;n-=1)if(Db(e[n]))return n;return Math.max(0,e.length-1)}function Ku(e,n,t,r,o,a,i,s){let l=new Map(a),d=n.filter(v=>v.noteKind==="footnote"),c=e.contentBox.width,u=Fb(t,r),f=[],p=0,m=Cb,g=a.size>0?"continuationSeparator":"separator",b=Math.max(0,e.contentBox.height),h=s?.separatorCache?s.separatorCache.get(t.footnotesPart,g,c,"footnote",b,u,i):(()=>{let v=si(t.footnotesPart,g,c,u,"footnote",b);return v.fallbackReason&&i.push(v.fallbackReason),v})(),x=Math.max(0,e.contentBox.height-Sl(e)-h.flowHeight),I=Math.max(0,e.contentBox.height-Lb-h.flowHeight),w=s?.reserveColumnBudget?I:x,M={fullContentHeight:Math.max(0,e.contentBox.height-h.flowHeight),reasons:i};for(let[v,E]of a){let _=v.match(/^(footnote|endnote):(-?\d+)$/);if(!_||_[1]!=="footnote")continue;let A=Number(_[2]),T=Math.max(0,w-p);if(E.height<=T+.001)f.push({noteKind:"footnote",noteId:A,scopeId:v,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:E.height},fragments:E.fragments}),p+=E.height,l.delete(v);else {let j=xl({fragments:E.fragments,flowHeight:E.height},T,M);j.head.length>0&&(f.push({noteKind:"footnote",noteId:A,scopeId:v,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:j.headHeight},fragments:j.head}),p+=j.headHeight),j.tail.length>0?l.set(v,{fragments:j.tail,height:j.tailHeight,mark:null}):l.delete(v);}}for(let v of d){if(f.length>=Xo){i.push("note-count-limit");break}let E=ml(t.footnotesPart,v.noteId,c,u);if(!E){i.push("missing-note-body");continue}let _=r.marks.get(Pr("footnote",v.noteId))??null,A=Math.max(0,w-p);if(m-=E.fragments.length,m<0){i.push("note-area-fragment-limit");break}if(E.flowHeight<=A+.001)f.push({noteKind:"footnote",noteId:v.noteId,scopeId:E.scopeId,mark:v.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:E.flowHeight},fragments:E.fragments}),p+=E.flowHeight;else {let T=xl(E,A,M);T.head.length>0&&(f.push({noteKind:"footnote",noteId:v.noteId,scopeId:E.scopeId,mark:v.customMarkFollows?null:_,box:{x:e.contentBox.x,y:0,width:c,height:T.headHeight},fragments:T.head}),p+=T.headHeight),T.tail.length>0&&l.set(E.scopeId,{fragments:T.tail,height:T.tailHeight,mark:null});}}if(f.length===0&&a.size===0)return {area:void 0,nextCarry:l};let P=h.flowHeight,L=P+p,C=Sl(e),k;o==="beneathText"?k=e.contentBox.y+C:(k=e.contentBox.y+e.contentBox.height-L,k=Math.max(k,e.contentBox.y+C));let z=k+P,F=f.map(v=>{let E={...v,box:{...v.box,y:z}};return z+=v.box.height,E}),y=gl(h,e.contentBox.x,c,k);return {area:{kind:"footnotes",placement:o==="beneathText"?"beneathText":"pageBottom",box:{x:e.contentBox.x,y:k,width:c,height:L},separator:{kind:g,box:y,fragments:h.fragments,synthetic:h.synthetic,...h.ruleStyle!==void 0?{ruleStyle:h.ruleStyle}:{}},notes:F},nextCarry:l}}function _b(e,n,t){return {id:`page-${n}`,index:n,box:e.box,contentBox:e.contentBox,fragments:[],...t?{noteStream:t}:{},...e.header?{header:e.header}:{},...e.footer?{footer:e.footer}:{},...e.pageFieldSource?{pageFieldSource:{...e.pageFieldSource,pageNumber:e.pageFieldSource.pageNumber+(n-e.index)}}:{}}}function Uu(e,n){let t=new Set;for(let r of Mb(e.fragments))t.add(n.get(r.paragraphId)??0);return [...t].sort((r,o)=>r-o)}function Hb(e,n,t){for(let r=e.length-1;r>=0;r-=1)if(Uu(e[r],t).includes(n))return r;return Math.max(0,e.length-1)}function IT(e,n,t){let r=Hb(e,n,t);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=Uu(a,t);if(i.length!==0&&!i.includes(n))return o}return e.length}function vT(e){return e.map((n,t)=>n.index===t&&n.id===`page-${t}`?n:{...n,id:`page-${t}`,index:t})}function TT(e){let n=vT(e);return [...Jt({revision:0,pages:n}).pages]}function kT(e,n,t,r,o,a,i,s){let l=new Map(a),d=[];if(n.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};let c=e.contentBox.width,u=Fb(t,r),f=s?.separatorKind??"separator",p=A=>A==="footnote"?t.footnotesPart:t.endnotesPart,m=t.endnotesPart??t.footnotesPart,g=Math.max(0,e.contentBox.height),b=s?.separatorCache?s.separatorCache.get(m,f,c,"endnote",g,u,i):(()=>{let A=si(m,f,c,u,"endnote",g);return A.fallbackReason&&i.push(A.fallbackReason),A})(),h=b.flowHeight,x=Sl(e),I=e.endnotes?Math.max(x,e.endnotes.box.y-e.contentBox.y+e.endnotes.box.height):x,w=wT(e),O=Math.max(0,w-I-h),P={fullContentHeight:Math.max(0,w-h),reasons:i},L=[],C=0,k=Cb;for(let[A,T]of a){let j=A.match(/^(footnote|endnote):(-?\d+)$/);if(!j)continue;let N=j[1],V=Number(j[2]),Y=Math.max(0,O-C);if(T.height<=Y+.001)L.push({noteKind:N,noteId:V,scopeId:A,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:T.height},fragments:T.fragments}),C+=T.height,l.delete(A);else {let G=xl({fragments:T.fragments,flowHeight:T.height},Y,P);G.head.length>0&&(L.push({noteKind:N,noteId:V,scopeId:A,mark:null,continuation:true,box:{x:e.contentBox.x,y:0,width:c,height:G.headHeight},fragments:G.head}),C+=G.headHeight),G.tail.length>0?l.set(A,{fragments:G.tail,height:G.tailHeight,mark:null}):l.delete(A);}}for(let A=0;A<n.length;A+=1){let T=n[A];if(L.length>=Xo){i.push("note-count-limit"),d.push(...n.slice(A));break}let j=p(T.noteKind),N=ml(j,T.noteId,c,u);if(!N){i.push("missing-note-body");continue}let V=r.marks.get(Pr(T.noteKind,T.noteId))??null,Y=Math.max(0,O-C);if(k-=N.fragments.length,k<0){i.push("note-area-fragment-limit"),d.push(...n.slice(A));break}if(N.flowHeight<=Y+.001)L.push({noteKind:T.noteKind,noteId:T.noteId,scopeId:N.scopeId,mark:T.customMarkFollows?null:V,box:{x:e.contentBox.x,y:0,width:c,height:N.flowHeight},fragments:N.fragments}),C+=N.flowHeight;else {let G=xl(N,Y,P);G.head.length>0&&(L.push({noteKind:T.noteKind,noteId:T.noteId,scopeId:N.scopeId,mark:T.customMarkFollows?null:V,box:{x:e.contentBox.x,y:0,width:c,height:G.headHeight},fragments:G.head}),C+=G.headHeight),G.tail.length>0&&l.set(N.scopeId,{fragments:G.tail,height:G.tailHeight,mark:null}),d.push(...n.slice(A+1));break}}if(L.length===0&&a.size===0)return {area:void 0,nextCarry:l,remainingRefs:d};if(L.length===0)return {area:void 0,nextCarry:l,remainingRefs:d};let z=e.contentBox.y+I,F=z+h,y=L.map(A=>{let T={...A,box:{...A.box,y:F}};return F+=A.box.height,T}),ee=gl(b,e.contentBox.x,c,z),v=h+C,E=Math.max(0,w-I),_=Math.min(v,E);return {area:{kind:"endnotes",placement:o,box:{x:e.contentBox.x,y:z,width:c,height:_},separator:{kind:f,box:ee,fragments:b.fragments,synthetic:b.synthetic,...b.ruleStyle!==void 0?{ruleStyle:b.ruleStyle}:{}},notes:y},nextCarry:l,remainingRefs:d}}function OT(e,n,t,r,o,a,i){let s=e,l=n;for(;l.size>0&&a.remaining>0;){let d=s[s.length-1],c=_b(d,d.index+1,"footnote-drain"),u=Ku(c,[],t,r,"pageBottom",l,o,{separatorCache:i}),f=u.area?.notes.length??0;if(l=u.nextCarry,f===0){o.push("note-overflow-stalled"),u.area&&(s=[...s,{...c,footnotes:u.area}],a.remaining-=1);break}s=[...s,{...c,footnotes:u.area}],a.remaining-=1;}return l.size>0&&!o.includes("note-overflow-stalled")&&o.push("note-overflow-page-limit"),{pages:s,carry:l}}function CT(e,n,t,r="endnote-overflow"){let o=_b(t,n,r);return {pages:[...e.slice(0,n),o,...e.slice(n)],pageIndex:n}}function Ib(e,n,t){if(t<=n||n>=e.length)return e;let r=Math.min(t,e.length),o=e[n],a=o.pageFieldSource?.pageNumber??n+1,i=o.pageFieldSource?.format,s=r-n,l=[...e];for(let d=n;d<r;d+=1){let c=l[d];l[d]={...c,pageFieldSource:{pageNumber:a+(d-n),sectionPageCount:s,...i?{format:i}:{}}};}return l}function vb(e,n,t,r,o,a,i,s,l){if(t.length===0||e.length===0)return e;let d=[...e],c=[...t],u=new Map,f=n,p=0,m="separator",g=l?.stopBeforeIndex??Number.POSITIVE_INFINITY,b=l?.sectionStartIndex??n,h=l?.stopBeforeIndex!==void 0,x=l?.separatorCache;for(;c.length>0||u.size>0;){if(f>=d.length||f>=g){if(s.remaining<=0){i.push("note-overflow-page-limit");break}let M=d[Math.min(Math.max(f,1),d.length)-1]??d[d.length-1],P=Math.min(f,g,d.length),L=CT(d,P,M,"endnote-overflow");d=L.pages,f=L.pageIndex,h&&(g=P+1),p+=1,s.remaining-=1;}let I=d[f];if(!Db(I)){f+=1;continue}let w=kT(I,c,r,o,a,u,i,{separatorKind:m,...x?{separatorCache:x}:{}});u=w.nextCarry,c=w.remainingRefs;let O=w.area?.notes.length??0;if(w.area){let M=d[f];d[f]={...M,endnotes:M.endnotes?{...w.area,notes:[...M.endnotes.notes,...w.area.notes],box:{...w.area.box,y:M.endnotes.box.y,height:M.endnotes.box.height+w.area.box.height}}:w.area};}else {if(u.size===0&&c.length===0)break;if(!w.area&&u.size===0&&c.length>0){f+=1,m="separator";continue}}if(O===0&&(u.size>0||c.length>0)&&I.fragments.length===0&&I.noteStream==="endnote-overflow"){i.push("note-overflow-stalled");break}if(u.size>0||c.length>0){m="continuationSeparator",f+=1;continue}break}return (c.length>0||u.size>0)&&(i.includes("note-overflow-stalled")||i.push("note-overflow-page-limit")),h?d=Ib(d,b,Math.min(g,d.length)):p>0&&(d=Ib(d,b,d.length)),d}function zb(e,n,t,r,o){let a=o??null,i=new Map,s=[],l=new Map,d=Vu(n),c=Eb();for(let f of e.pages){let p=$u(f),g=bl(p,n,d).filter(L=>L.noteKind==="footnote"),b=g[0]?.sectionIndex??0,h=Vo(t,b);if(h.pos==="sectEnd"||h.pos==="docEnd")continue;if(a&&l.size===0){let L=a.pageReserve.get(f);if(L&&L.allHits===n&&L.marks===r){for(let C of L.reasons)s.push(C);L.reserve>0&&i.set(f.index,Math.max(i.get(f.index)??0,L.reserve));continue}}let x=Math.max(0,p.contentBox.height-Lb),I=l.size===0,w=s.length,{area:O,nextCarry:M}=Ku(p,g,t,r,h.pos,l,s,{reserveColumnBudget:true,separatorCache:c});l=M;let P=Math.min(O?.box.height??0,x);if(a&&I&&l.size===0&&a.pageReserve.set(f,{allHits:n,marks:r,reserve:P>0?P:0,reasons:s.slice(w)}),P>0){let L=i.get(f.index)??0;i.set(f.index,Math.max(L,P));}}let u=true;for(let f of e.pages){let p=i.get(f.index)??0;if(p<=0)continue;if(Sl($u(f))+p>f.contentBox.height+.5){u=false;break}}return {reserves:i,stable:u,reasons:s}}function jb(e,n,t,r){let o=r?.memo??null,a=[...r?.fallbackReasons??[]],i=r?.paragraphSectionIndex??new Map,s={remaining:Bb},l=Vu(n),d=Eb(),c=[],u=[];for(let w of e.pages)for(let O of bl(w,n,l)){let M={noteId:O.noteId,sectionIndex:O.sectionIndex,pageIndex:w.index,customMarkFollows:O.customMarkFollows};O.noteKind==="footnote"?c.push(M):u.push(M);}let f=o?[...c,...u].map(w=>`${w.noteId}|${w.sectionIndex}|${w.pageIndex??""}|${w.customMarkFollows?1:0}`).join(";"):"",p;o&&o.finalMarks&&o.finalMarks.sitesFingerprint===f?p=o.finalMarks.marks:(p=Nb(c,u,t),o&&(o.finalMarks={sitesFingerprint:f,marks:p}));let m=new Map,g=new Map,b=[],h=e.pages.map(w=>{let O=bl(w,n,l),M=O.filter(v=>v.noteKind==="footnote"),P=O.filter(v=>v.noteKind==="endnote");for(let v of P)if(Yu(t,v.sectionIndex).pos==="sectEnd"){let _=g.get(v.sectionIndex)??[];_.push(v),g.set(v.sectionIndex,_);}else b.push(v);for(let v of M){let E=Vo(t,v.sectionIndex);if(E.pos==="sectEnd"){let _=g.get(v.sectionIndex)??[];_.push(v),g.set(v.sectionIndex,_);}else E.pos==="docEnd"&&b.push(v);}if(o&&m.size===0){let v=o.pageAttach.get(w);if(v&&v.allHits===n&&v.marks===p){for(let E of v.reasons)a.push(E);return v.attached}}let L=$u(w),C=M[0]?.sectionIndex??0,k=Vo(t,C),z,F=m.size===0,y=a.length;if(k.pos==="pageBottom"||k.pos==="beneathText"){let v=M.filter(_=>{let A=Vo(t,_.sectionIndex).pos;return A==="pageBottom"||A==="beneathText"}),E=Ku(L,v,t,p,k.pos,m,a,{separatorCache:d});z=E.area,m=E.nextCarry;}let ee=z?{...L,footnotes:z}:L;return o&&F&&m.size===0&&o.pageAttach.set(w,{allHits:n,marks:p,attached:ee,reserve:0,reasons:a.slice(y)}),ee}),x=h.length;if(m.size>0){let w=OT(h,m,t,p,a,s,d);h=w.pages,m=w.carry;}if(g.size>0&&h.length>0){let w=[...g.keys()].sort((O,M)=>O-M);for(let O of w){let M=g.get(O),P=Hb(h,O,i),L=IT(h,O,i),C=P;for(let k=0;k<=P;k+=1)if(Uu(h[k],i).includes(O)){C=k;break}h=vb(h,P,M,t,p,"sectEnd",a,s,{stopBeforeIndex:L,sectionStartIndex:C,separatorCache:d});}}return b.length>0&&h.length>0&&(h=vb(h,PT(h),b,t,p,"docEnd",a,s,{separatorCache:d})),h.length!==x&&(h=TT(h)),{layout:yT({revision:e.revision,pages:h},p),fallbackReasons:a,noteMarks:p}}function BT(e){return he$1(e).map(n=>({noteKind:n.noteKind,noteId:n.noteId,paragraphId:n.paragraphId,atomOffset:n.atomOffset,customMarkFollows:n.customMarkFollows}))}var Tb=new WeakMap;function LT(e,n){return `${n};${e.map(t=>`${t.blockStart}-${t.blockEndExclusive}`).join(",")}`}function MT(e,n){if(e.kind!==n.kind)return false;if(e.kind==="paragraph")return e.id===n.id;let t=Xu(e),r=Xu(n);if(t.length!==r.length)return false;for(let o=0;o<t.length;o+=1)if(t[o]!==r[o])return false;return true}function ET(e,n,t,r){let o=Mt(e,t),a=LT(n,t),i=r?Tb.get(r):void 0;if(i&&i.boundsFingerprint===a&&i.blocks.length===o.length){let l=true;for(let d=0;d<o.length;d+=1){let c=o[d],u=i.blocks[d];if(c!==u&&!MT(c,u)){l=false;break}}if(l)return i.blocks=o,i.map}let s=new Map;for(let l=0;l<n.length;l+=1){let d=n[l];for(let c=d.blockStart;c<d.blockEndExclusive;c+=1){let u=o[c];if(u){if(u.kind==="paragraph"){s.set(u.id,l);continue}for(let f of Xu(u))s.set(f,l);}}}return r&&Tb.set(r,{blocks:o,boundsFingerprint:a,map:s}),s}var kb=new WeakMap;function Xu(e){let n=kb.get(e);if(n)return n;let t=[],r=(o,a)=>{if(!(a>32)&&o.kind!=="textValue"){if(o.kind==="paragraph"){t.push(o.id);return}for(let i of o.children)r(i,a+1);}};return r(e,0),kb.set(e,t),t}function qu(e,n,t){if(!e)return "";let r=[];for(let[o,a]of e){let i=o-n;i>=0&&i<t&&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 Dr(e){let n=new Map;for(let[t,r]of e)r>0&&n.set(t,r);return n}function ju(e,n){let t=Dr(e),r=Dr(n);if(t.size!==r.size)return false;for(let[o,a]of t)if((r.get(o)??0)!==a)return false;return true}function Ob(e,n){let t=Dr(e);for(let[r,o]of n)o<=0||t.set(r,Math.max(t.get(r)??0,o));return t}function yl(e){return [...Dr(e)].map(([n,t])=>`${n}=${t}`).sort().join(",")}function Gb(e,n,t,r,o){let a=BT(e);if(a.length===0)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),o({...t,noteMarks:void 0,pageBottomReserves:void 0});let i=ET(e,n,t.displayMode??je,t.session),s=uT(a,i),l=dT(t.session,s,r),d=l.memo,c=l.allHits,u=d?.provisionalMarks??Zu(c,r),f=t.session?.notePageBottomReserves,p=f?Dr(f):new Map,m=[],g=o({...t,noteMarks:u,pageBottomReserves:p}),b=new Set([yl(p)]);for(let x=0;x<Gu;x+=1){let I=zb(g,c,r,u,d);if(m=[...I.reasons],I.stable&&ju(I.reserves,p))break;let w=I.stable?Dr(I.reserves):Ob(p,I.reserves);if(ju(w,p)){m.push("note-reflow-exhausted");break}let O=yl(w);if(b.has(O)){w=Ob(p,I.reserves);let M=yl(w);if(ju(w,p)||b.has(M)){m.push("note-reflow-exhausted");break}}p=w,b.add(yl(p)),g=o({...t,noteMarks:u,pageBottomReserves:p}),x===Gu-1&&m.push("note-reflow-exhausted");}let h=jb(g,c,r,{fallbackReasons:m,paragraphSectionIndex:i,memo:d});return t.session&&(t.session.previous=h.layout,t.session.notePageBottomReserves=Dr(p)),h.layout}function Zu(e,n){let t=[],r=[];for(let o of e){let a={noteId:o.noteId,sectionIndex:o.sectionIndex,customMarkFollows:o.customMarkFollows};o.noteKind==="footnote"?t.push(a):r.push(a);}return Nb(t,r,n)}function Wb(e,n){let t=e.projectLink??n.projectLink,r=e.projectFieldLink??n.projectFieldLink,o=e.documentProperties??n.documentProperties;return {...e,...t?{projectLink:t}:{},...r?{projectFieldLink:r}:{},...o?{documentProperties:o}:{}}}var $b=null;function Yb(e,n){let t=$b;if(t&&t.base===e&&t.token===n)return t.producer;let r=`${e??"unversioned-measurer"}|cc:${n}`;return $b={base:e,token:n,producer:r},r}var Xb=new WeakMap,Vb=null;function FT(e,n,t,r,o){return e!=null&&e.base===n&&e.noteMarks===t&&e.defaultTabStopPt===r&&e.displayMode===o}function Kb(e,n,t,r,o){let a=n?Xb.get(n):Vb;if(FT(a,e,t,r,o))return a.producer;let i=(e??"unversioned-measurer")+(n?`|sc:${n.cacheToken}`:"")+(t?`|nm:${Nm(t)}`:"")+(r!==void 0?`|dts:${r}`:"")+(o===je?"":`|rev:${o}`),s={base:e,noteMarks:t,defaultTabStopPt:r,displayMode:o,producer:i};return n?Xb.set(n,s):Vb=s,i}var NT={kind:"covered",id:"hashed",paragraphId:"covered",fragmentIndex:"covered",range:"hashed",props:"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"},AT={kind:"covered",id:"hashed",tableId:"hashed",fragmentIndex:"hashed",nestingDepth:"hashed",columnEdges:"hashed",rows:"hashed",box:"hashed"};function Zb(e){return Object.keys(e).filter(n=>e[n]==="hashed")}var DT=Zb(NT),_T=Zb(AT),Ub=new WeakMap;function qb(e){let n=Ub.get(e);if(n!==void 0)return n;let t=e.kind==="table"?JSON.stringify(_T.map(r=>e[r])):JSON.stringify(DT.map(r=>e[r]));return Ub.set(e,t),t}function Jb(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1){let r=e[t],o=n[t];if(r!==o&&qb(r)!==qb(o))return false}return true}function Ju(e,n){if(e.length!==n.length)return false;for(let t=0;t<e.length;t+=1)if(e[t]!==n[t])return false;return true}var Qb=Object.freeze([]),ex=new Map;function nx(e,n){if(e===n)return true;if(e.size!==n.size)return false;for(let[t,r]of e)if(n.get(t)!==r)return false;return true}function Rl(){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 tx(e,n){return [...e].map(([t,r])=>`${t}=${r.flowHeight}`).sort().join(",")}function ax(e){return e?`hf:${e.titlePage?1:0}${e.evenAndOddHeaders?1:0};h:${tx(e.headers)};f:${tx(e.footers)}`:""}function wl(e,n,t){if(e.sectionFurniture)return e.sectionFurniture[n];if(n===t-1)return e.furniture}function HT(e,n){return e.map((t,r)=>{let o=Ar(t.properties),a=wl(n,r,e.length),i=t.properties.pageNumbering,s=i?`pn:${i.start??""},${i.fmt??""},${i.chapStyle??""},${i.chapSep??""}`:"pn:",l=t.properties.columns,d=`cols:${l.count},${l.gapTwips},${l.equalWidth===false?0:1},${l.separator?1:0};${(l.definitions??[]).map(c=>`${c.widthTwips}/${c.gapTwips}`).join(",")}`;return [t.properties.breakType,o.width,o.height,o.margin.top,o.margin.right,o.margin.bottom,o.margin.left,o.headerDistance??36,o.footerDistance??36,ax(a),s,d].join(":")}).join("|")}function zT(e,n,t){if(!e)return null;let r=e.multi;if(r&&r.structureKey===n&&r.sections.length===t)return r;let o={structureKey:n,sections:Array.from({length:t},()=>Rl()),spans:[],previousRemapped:[],previousFinalized:null,previousPageCount:-1};return e.multi=o,o}function jT(e){return e!=="continuous"}function GT(e,n){return e.width===n.width&&e.height===n.height}function WT(e,n){if(n.fragments.length===0&&!n.columnSeparators?.length&&!n.anchoredDrawings?.length)return e;let t=e.anchoredDrawings||n.anchoredDrawings?Object.freeze([...e.anchoredDrawings??[],...n.anchoredDrawings??[]]):void 0;return {...e,fragments:n.fragments.length>0?[...e.fragments,...n.fragments]:e.fragments,...(e.columnSeparators?.length||n.columnSeparators?.length)&&{columnSeparators:[...e.columnSeparators??[],...n.columnSeparators??[]]},...t?{anchoredDrawings:t}:{}}}function rx(e,n,t){e.previous=n,e.startLineCounter=0,e.endLineCounter=t,e.keys=[],e.checkpoints=[],e.context="",e.producer="";}var ox=new WeakMap;function $T(e,n,t,r,o,a){let i=ox.get(e);if(i&&i.globalIndex===n&&i.sheetY===t&&i.pageNumber===r&&i.sectionPageCount===o&&i.format===a)return i.published;let s=ti(e,n,t),l=fo([s],r,o,a)[0];return ox.set(e,{globalIndex:n,sheetY:t,pageNumber:r,sectionPageCount:o,format:a,published:l}),l}function ix(e,n,t,r,o){let{session:a,...i}=r,s=HT(n,r),l=zT(a,s,n.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,b=0,h=0,x=0,I=0,w=0,O=true,M=null,P="",L=1;for(let z=0;z<n.length;z+=1){let F=n[z],y=e.slice(F.blockStart,F.blockEndExclusive),ee=Ar(F.properties),v=wl(r,z,n.length),E=u.length,_=m,A=l?.spans[z],T=ax(v);if(y.length===0&&!jT(F.properties.breakType)){p.push({startIndex:E,pageCount:0,sheetY:_,remappedPages:[],sourcePages:[]});continue}let j=z>0&&F.properties.breakType==="continuous"&&u.length>0&&O&&M!==null&&GT(M,ee)&&P===T,N=l?.sections[z],V=F.properties.columns.count>1&&n[z+1]?.properties.breakType==="continuous",Y=o(y,t,{...i,retainKeys:d,geometry:ee,furniture:v,sectionColumns:F.properties.columns,...V?{balanceColumns:V}:{},lineCounterStart:g,pageIndexStart:j?E-1:E,...j?{flowStartY:I,spaceBeforeCarry:w}:{},...N?{session:N}:{}});g=Y.lineCounter,I=Y.endCursorY,w=Y.endSpaceAfter,O=Y.endsOpenPage,M=ee,P=T,N?(b+=N.stats.placed,h+=N.stats.total):(b+=y.length,h+=y.length);let G=N!==void 0&&N.stats.placed===0&&N.stats.reusedPages===Y.pages.length&&A!==void 0&&A.pageCount===Y.pages.length&&A.sourcePages.length===Y.pages.length&&A.sourcePages.every((ne,xe)=>ne===Y.pages[xe]),K=A!==void 0&&A.startIndex===E&&A.sheetY===_&&A.remappedPages.length===Y.pages.length,$=F.properties.pageNumbering,J=$?.start!==void 0?$.start:L,U=$?.fmt,re=A?.remappedPages[0],ke=A===void 0||A.remappedPages.length===0||re?.pageFieldSource!==void 0&&re.pageFieldSource.pageNumber===J&&re.pageFieldSource.sectionPageCount===A.remappedPages.length&&re.pageFieldSource.format===U,be;if(j){let ne=u.length-1,xe=u[ne],we=WT(xe,Y.pages[0]);if(we!==xe){u[ne]=we;let Ae=f.lastIndexOf(xe);Ae!==-1&&(f[Ae]=we);}let Qe=[];for(let Ae of Y.pages.slice(1)){let Ke=ti(Ae,u.length+Qe.length,m);Qe.push(Ke),m=Ke.box.y+Ke.box.height+24;}let ye=Qe.length+1;be=fo(Qe,J+1,ye,U);for(let Ae of be)u.push(Ae),f.push(Ae);L=J+ye;}else if(G&&K&&ke){be=A.remappedPages,x+=be.length;for(let ne of be)u.push(ne),f.push(ne),m=ne.box.y+ne.box.height+24;L=J+be.length;}else {let ne=[];for(let xe of Y.pages){let we=$T(xe,u.length+ne.length,m,J+ne.length,Y.pages.length,U);ne.push(we),m=we.box.y+we.box.height+24;}be=ne;for(let xe of be)u.push(xe),f.push(xe);L=J+be.length;}p.push({startIndex:E,pageCount:be.length,sheetY:_,remappedPages:be,sourcePages:Y.pages});}if(u.length===0){let z=Ar(n[0]?.properties??Qn),F=o([],t,{...i,retainKeys:d,geometry:z,sectionColumns:n[0]?.properties.columns??Qn.columns});c();let y=Jt({revision:t,pages:F.pages});return l&&(l.spans=[],l.previousRemapped=F.pages,l.previousFinalized=y,l.previousPageCount=y.pages.length),a&&(rx(a,y,g),a.stats={placed:0,total:0,reusedPages:0,fullPasses:a.stats.fullPasses+1}),y}let C=Jt({revision:t,pages:u}),k=C;if(l?.previousFinalized&&l.previousPageCount===C.pages.length&&l.previousRemapped.length===f.length){let z=l.previousFinalized.pages,F=l.previousRemapped,y=C.pages.map((ee,v)=>f[v]===F[v]&&z[v]?z[v]:ee);k={revision:t,pages:y};}return l&&(l.spans=p,l.previousRemapped=f,l.previousFinalized=k,l.previousPageCount=k.pages.length),a&&(rx(a,k,g),a.stats={placed:b,total:h||1,reusedPages:x,fullPasses:a.stats.fullPasses+(b===h&&x===0?1:0)}),c(),k}function Pl(e=6,n=14){let t=r=>r.fontSizePt/11;return {measure:(r,o)=>r.length*e*t(o)*(o.horizontalScalePercent/100)+r.length*o.characterSpacingPt,lineMetrics:r=>{let o=r.verticalAlign==="baseline"?1:.75,a=n*t(r)*o;return {height:a,baseline:a*.8}}}}var XT=2;function VT(e,n){if(!n||n.size===0)return "";let t=[],r=o=>{if(o.kind==="paragraph"){let a=n.get(o.id)?.cacheToken;a&&t.push(a);return}if("children"in o)for(let a of o.children)r(a);};return r(e),t.join(";")}var sx=new WeakMap,lx=new WeakMap;function ef(e){if(e===void 0||e.size===0)return "";let n=lx.get(e);if(n!==void 0)return n;let t=[...e].join(",");return lx.set(e,t),t}function YT(e){let n=ef(e.chrome),t=ef(e.placeholder),r=ef(e.suppressed);return n===""&&t===""&&r===""?"":`${n}|${t}|${r}`}function KT(e,n){let t=n.chrome?.has(e)??false,r=n.placeholder?.has(e)??false,o=n.suppressed?.has(e)??false;return !t&&!r&&!o?"":`${t?1:0}${r?1:0}${o?1:0}`}var dx=new WeakMap;function UT(e,n,t){let r=t.displayMode??je,o=Mt(e,r),a=Du(e,o).sections,i=Go(e),s={...t,producer:Yb(t.producer,i),tocFieldChromeParagraphIds:t.tocFieldChromeParagraphIds??Iu(e),emptyTocPlaceholderParagraphIds:t.emptyTocPlaceholderParagraphIds??vu(e),emptyTocSuppressedResultParagraphIds:t.emptyTocSuppressedResultParagraphIds??Tu(e)},l=t.drawingSourceOrder;!l&&t.inlineDrawingLayout&&(l=dx.get(t.inlineDrawingLayout),l||(l=(()=>{let p=new Map;return Za$1(e).forEach((m,g)=>{p.set(m.drawingNodeId,g);}),p})(),dx.set(t.inlineDrawingLayout,l)));let d=t.session?jh(l?{...s,drawingSourceOrder:l}:s,o,t.session):Br(l?{...s,drawingSourceOrder:l}:s,o),c=p=>{if(a.length>1)return ix(o,a,n,p,Yo);let m=a[0],g=p.geometry??(m?Ar(m.properties):ma),b=wl(p,0,a.length)??p.furniture,h=Yo(o,n,{...p,geometry:g,furniture:b,sectionColumns:m?.properties.columns??Qn.columns}),x=m?.properties.pageNumbering,I=Eu({revision:h.layout.revision,pages:fo(h.pages,x?.start??1,h.pages.length,x?.fmt)},h.layout),w=Jt(I);return p.session&&(p.session.multi=null,p.session.previous=w),w},u=p=>{let m=Fu(p,e,i);return t.session&&(t.session.previous=m),m};if(!t.notes)return t.session&&(t.session.notes=null,t.session.notePageBottomReserves=null),u(c(d));let f=Wb(t.notes,t);return u(Gb(e,a,d,f,c))}function cx(e,n,t,r){let o=`line:${e}:${t}:${n}`;return r===void 0?o:`${o}:occ:${r}`}function _r(e,n,t){let r=t.geometry,o=r.width-r.margin.left-r.margin.right,a=_u(t.sectionColumns??Qn.columns,o);if(t.inlineDrawingLayout&&t.drawingExclusionPass===void 0&&!t.drawingExclusionConverged){let R=q=>t.drawingSourceOrder?.get(q),X=Object.freeze({columnCount:a.count,columnGapPt:a.gaps[0]??0,contentWidth:o,columnLefts:a.lefts,columnWidths:a.widths}),D=new Map,ae=null,me=false,ue=new Set,ce=t.session?.previous?.pages;if(ce){if(D=Tc(ce,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,X),ae=Yo(e,n,{...t,drawingExclusionPass:0,drawingExclusionZonesByPage:D}),ae.pages===ce)return ae;let q=Tc(ae.pages,t.inlineDrawingLayout,t.drawingLayoutEpoch,o,t.drawingSourceOrder,X);if(bs(D,q))return ae;D=new Map(q),ue.add(xs(q));}for(let q=0;q<vr;q+=1){ae=Yo(e,n,{...t,session:void 0,drawingExclusionPass:q,drawingExclusionZonesByPage:D});let fe=ys(ae.pages,t.inlineDrawingLayout,o,R,X);if(fe.size===0){me=true,D=fe;break}let Z=xs(fe);if(ue.has(Z)){me=true,D=fe;break}if(ue.add(Z),q>0&&bs(D,fe)){me=true,D=fe;break}D=new Map(fe);}if(!me)for(let q=0;q<XT&&!me;q+=1){ae=Yo(e,n,{...t,session:void 0,drawingExclusionPass:vr+q,drawingExclusionZonesByPage:D});let fe=ys(ae.pages,t.inlineDrawingLayout,o,R,X),Z=xs(fe);if(bs(D,fe)||ue.has(Z)){me=true,D=fe;break}ue.add(Z),D=new Map(fe);}if(!me)throw new Oo(`wrap exclusion reflow did not converge within ${vr} passes`);return Yo(e,n,{...t,drawingExclusionConverged:true,drawingExclusionZonesByPage:D})}let i=t.measurer,s$1=t.cache,l=t.styleCascade,d=t.listItems,c=t.defaultTabStopPt,u=t.displayMode??je,f=u==="all-markup",p=t.tocFieldChromeParagraphIds,m=t.emptyTocPlaceholderParagraphIds,g=t.emptyTocSuppressedResultParagraphIds,b={chrome:p,placeholder:m,suppressed:g},h=YT(b),x=Kb(t.producer,l,t.noteMarks,c,u),I=a.widths[0],w=t.furniture,O=r.headerDistance??36,M=r.footerDistance??36,P=R=>{let X=0;for(let D of R?.values()??[])X=Math.max(X,D.flowHeight);return X},L=r.height*.4,C=Math.min(L,Math.max(r.margin.top,w?O+P(w.headers):0)),k=Math.min(L,Math.max(r.margin.bottom,w?M+P(w.footers):0)),z=r.height-C-k,F=t.pageBottomReserves,y=t.session,ee=t.lineCounterStart??0,v=Gy(w,O,M),E=t.flowStartY??0,_=t.spaceBeforeCarry??0,A=t.pageIndexStart??0,T=y?.previous?y.previous.pages.length+1:1/0,j=t.columnRegionBottom,N=`|cols:${a.widths.join(",")};${a.gaps.join(",")};${a.separator?1:0}${j!==void 0?`;bal:${j}`:""}`,V=R=>`${r.width}x${r.height}|${r.margin.top},${r.margin.right},${r.margin.bottom},${r.margin.left}|fs:${E},${_}${v}${R}${N}`,Y=V(qu(F,A,T)),G=A&1,K=false,$=null,J=()=>{K=true;},U=[],re=()=>{let R=Math.max(1,z-(F?.get(A+U.length)??0));return j!==void 0&&U.length===0?Math.max(1,Math.min(R,j)):R},ke=(R,X)=>{let D=R.kind==="paragraph"?t.drawingTokenForParagraph?.(R)??t.drawingLayoutToken??"":R.kind==="table"&&t.drawingTokenForParagraph?vy(R,t.drawingLayoutEpoch,t.drawingTokenForParagraph):"",ae=_y(R,t.numberingIndex,l,u),me=(R.kind==="table"?VT(R,d):d?.get(R.id)?.cacheToken??"")+ae,ue=sx.get(R);if(ue&&ue.contentWidth===X&&ue.producer===x&&ue.drawingToken===D&&ue.listToken===me)return ue.entry;let ce;if(R.kind==="table")ce={kind:"table",table:R,key:Ir({paragraph:R,properties:ae?[{localName:"txbxList",attributes:{token:ae}}]:[],width:X,producer:x,...D?{drawingToken:D}:{}})};else {let q=d?.get(R.id),fe=za(R,X,l,q),{props:Z,indent:Se,available:Ie,alignment:ve,spacing:Oe,lineSpacing:sn,contextualSpacing:de,styleId:ze,shading:Be,inheritedRunProperties:De,markRunProperties:bt}=fe,Ue=Mg(R.children.find(jt=>jt.kind==="paragraphProperties"),l),zt=Fd(Ue),hn=Ra(fe.tabStops,c),cr=hn===fe.tabStops?fe.tabStopsCacheToken:xr(hn);ce={kind:"paragraph",paragraph:R,props:Z,indent:Se,available:Ie,alignment:ve,spacing:Oe,lineSpacing:sn,contextualSpacing:de,styleId:ze,borders:Ue,borderGroupKey:zt===""?"":`${zt}@${Se.left},${Se.right}`,shading:Be,inheritedRunProperties:De,markRunProperties:bt,tabStops:hn,keeps:Eg(Z),...q?{listItem:q}:{},key:Ir({paragraph:R,properties:[...Z,...De,...bt,{localName:"tabStops",attributes:{token:cr}},...q?[{localName:"list",attributes:{token:q.cacheToken}}]:[],...ae?[{localName:"txbxList",attributes:{token:ae}}]:[]],width:Ie,producer:x,...D?{drawingToken:D}:{}})};}return sx.set(R,{contentWidth:X,producer:x,drawingToken:D,listToken:me,entry:ce}),ce},be=t.drawingTokenForParagraph===void 0&&t.drawingLayoutToken===void 0?t.drawingLayoutEpoch??"":t.drawingLayoutEpoch??null,ne=y?.prepass,xe=ne!=null&&be!==null&&ne.drawingEpoch===be&&ne.producer===x&&ne.contentWidth===I&&ne.styleCascade===l&&ne.listItems===d&&ne.tocToken===h&&ne.bodies.length===e.length&&ne.bodies.every((R,X)=>R===e[X]),we=xe?ne:Qe();function Qe(){let R=e.map(Z=>ke(Z,I)),X=R.map(Z=>Z.key),D=R.map(Z=>Z.kind==="paragraph"&&Z.keeps.keepNext),ae=R.map(Z=>Z.kind==="paragraph"?d?.get(Z.paragraph.id)?.markerText:void 0),me=R.map(Z=>Z.kind==="paragraph"&&Z.contextualSpacing),ue=R.map(Z=>Z.kind==="paragraph"?Z.styleId:null),ce=R.map(Z=>Z.kind==="paragraph"?Z.borderGroupKey:""),q=h===""?[]:R.map(Z=>Z.kind==="paragraph"?KT(Z.paragraph.id,b):""),fe=Ag(X,{contextualSpacingAt:Z=>me[Z],styleIdAt:Z=>ue[Z]??null,borderGroupKeyAt:Z=>ce[Z],tocVerdicts:q,markerTextAt:Z=>ae[Z],keepsNextAt:Z=>D[Z]});return {bodies:e,producer:x,contentWidth:I,styleCascade:l,listItems:d,drawingEpoch:be??"",prepared:R,keys:X,paragraphDocumentOrder:fy(R,I,l,u),keepsNext:D,markerTexts:ae,tocToken:h,flowKeys:fe}}y&&be!==null&&!xe&&(y.prepass=we);let{prepared:ye,keys:Ae,paragraphDocumentOrder:Ke,keepsNext:Rn,flowKeys:cn}=we,et=()=>{t.retainKeys!==false&&(t.retainKeys===void 0&&s$1&&!(s$1.retentionPassDue?.()??true)||Ym(s$1,t.retainKeys,Ae,ye.flatMap(R=>R.kind==="table"?[R.table]:[])));},Ge=y?.previous??null,Gn=Ge!==null&&y!==void 0&&y.context===Y&&y.producer===x&&(!y.parityDependent||y.startPageParity===G),Wn=a.count===1&&Gn,gn=0;if(Gn){let R=Math.min(cn.length,y.keys.length);for(;gn<R&&cn[gn]===y.keys[gn];)gn+=1;}let nt=0;if(Wn){let R=Math.min(cn.length,y.keys.length)-gn;for(;nt<R&&cn[cn.length-1-nt]===y.keys[y.keys.length-1-nt];)nt+=1;}if(Gn&&gn===ye.length&&ye.length===y.keys.length){let R=Eu({revision:n,pages:Ge.pages},Ge),X=ee+(y.endLineCounter-y.startLineCounter);return y.previous=R,y.startLineCounter=ee,y.endLineCounter=X,y.startPageParity=G,y.stats={placed:0,total:ye.length,reusedPages:Ge.pages.length,fullPasses:y.stats.fullPasses},et(),{layout:R,pages:R.pages,lineCounter:X,endCursorY:y.endCursorY,endSpaceAfter:y.endSpaceAfter,endsOpenPage:y.endsOpenPage}}let on=[],Cn=0,At=0,Fe=()=>a.lefts[Cn],We=()=>a.widths[Cn],B=()=>({text:{left:Fe(),width:We()},margin:{left:0,width:o},page:{left:-r.margin.left,width:r.width}}),S=()=>on.length>At,H=[],Q=[],oe=new Map,W=E,Re=E,se=0,He=ee,Pe=_,Ne=[],un=()=>({pageCount:U.length,pageFragments:[...on],pendingAnchoredDrawings:[...H],deferredAnchoredDrawings:Q.length>0?[...Q]:Qb,anchorPageDeferCounts:oe.size>0?new Map(oe):ex,cursorY:W,lineCounter:He,previousSpaceAfter:Pe,flowColumnIndex:se}),wn=0,Bn=0,pe=0,an=E===0;if(Wn&&gn>0&&gn<y.checkpoints.length){let R=y.checkpoints[gn];U.push(...Ge.pages.slice(0,R.pageCount)),on=[...R.pageFragments],H=[...R.pendingAnchoredDrawings],Q=[...R.deferredAnchoredDrawings],oe.clear();for(let[X,D]of R.anchorPageDeferCounts)oe.set(X,D);W=R.cursorY,se=R.flowColumnIndex,Cn=R.flowColumnIndex,He=R.lineCounter,Pe=R.previousSpaceAfter,wn=gn,an=false,pe=U.length,Ne.push(...y.checkpoints.slice(0,gn));}let Ve=R=>({x:0,y:R*(r.height+24),width:r.width,height:r.height}),Nn=R=>w?.titlePage&&R===0?"first":w?.evenAndOddHeaders&&(A+R+1)%2===0?"even":"default",Dt=(R,X,D)=>{if(!w)return;let ae=Nn(X),me=(R==="header"?w.headers:w.footers).get(ae);if(!me)return;let ue=ve=>{let Oe=R==="header"?D.y+O:D.y+r.height-M-ve.flowHeight;return {kind:R,variant:ae,partName:ve.partName,...ve.part?{part:ve.part}:{},...ve.rId?{rId:ve.rId}:{},box:{x:D.x+r.margin.left,y:Oe,width:o,height:ve.flowHeight},fragments:ve.fragments,...ve.anchoredDrawings?{anchoredDrawings:ve.anchoredDrawings}:{}}},ce=A+X+1,q={pageNumber:ce,pageCount:Math.max(ce,U.length+1),sectionPageCount:X+1},fe=me.pageFieldNeeds,Se=Zt(fe)||(me.anchoredDrawings?.length??0)>0?me.withPageContext(q):me,Ie=ue(Se);return Zt(fe)?{...Ie,pageFieldProjector:ve=>ue(me.withPageContext(ve))}:Ie},yt=a.count,dr=Fe,Cl=R=>Object.freeze({x:a.lefts[se]??0,y:R.y,width:a.widths[se]??I,height:R.height}),Bl=()=>Object.freeze({pageNumber:A+U.length+1,onPageParityRead:J,pageWidth:r.width,pageHeight:r.height,marginLeft:r.margin.left,marginRight:r.margin.right,marginBottom:r.margin.bottom,contentInsetTop:C,contentInsetBottom:k,contentWidth:I,contentHeight:re(),contentBandHeight:z,ownerPartName:t.inlineDrawingLayout?.ownerPartName??s,storyKind:"body"}),df=()=>Na(Bl()),Ll=R=>t.drawingSourceOrder?.get(R),ui=R=>{if(R.length===0)return;for(let D of R)H.some(ae=>ae.drawingNodeId===D.drawingNodeId)||H.push(D.sourceOrder===void 0&&Ll(D.drawingNodeId)!==void 0?Object.freeze({...D,sourceOrder:Ll(D.drawingNodeId)}):D);if(!t.inlineDrawingLayout)return;let X=bg(H,{pageBottom:re()});if(H.splice(0,H.length,...X.drawings),X.deferred.length>0)for(let D of X.deferred){let ae=(oe.get(D.drawingNodeId)??0)+1;oe.set(D.drawingNodeId,ae),ae>=xc?H.push(Ic(D,"page-defer-exhausted")):Q.push(D);}},cf=()=>{if(Q.length===0)return;let R=Q.map(X=>wc(X,W-X.y));Q=[],ui(R);},Hr=()=>{let R=U.length,X=Ve(R),D=Dt("header",R,X),ae=Dt("footer",R,X),{usedBottom:me,hasBodyPageFields:ue}=nc(on,Re);U.push({id:`page-${R}`,index:R,box:X,contentBox:{x:X.x+r.margin.left,y:X.y+C,width:o,height:z},fragments:on,hasBodyPageFields:ue,...a.separator?{columnSeparators:a.gaps.map((ce,q)=>({x:a.lefts[q]+a.widths[q]+ce/2-.375,y:Re,width:.75,height:Math.max(0,me-Re)}))}:{},...H.length>0?{anchoredDrawings:yg(H)}:{},...D?{header:D}:{},...ae?{footer:ae}:{}}),on=[],H=[],W=0,Cn=0,se=0,Re=0,At=0;},Ux=(R,X)=>{if(R.kind!=="paragraph"||R.listItem!==void 0||R.shading!==void 0)return false;let{top:D,bottom:ae,left:me,right:ue,between:ce}=R.borders;if(D??ae??me??ue??ce)return false;let q=t.inlineDrawingLayout;return q&&zn(R.paragraph,q).length>0?false:X.every(fe=>fe.drawings.length===0&&!fe.pageBreakAfter&&!fe.columnBreakAfter&&fe.spans.every(Z=>Z.text.length===0))},Uo=()=>{if(Cn+1<a.count){Cn+=1,se=Cn,W=Re,Pe=0,At=on.length;return}Hr(),cf();},uf=R=>il(R,{measurer:i,producer:x,cache:s$1,styleCascade:l,...c!==void 0?{defaultTabStopPt:c}:{},...u?{displayMode:u}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},...t.numberingIndex?{numberingIndex:t.numberingIndex}:{},inlineDrawingLayout:t.inlineDrawingLayout,drawingTokenForParagraph:t.drawingTokenForParagraph}),_t={measurer:i,cache:s$1,producer:x,onCellBreakKey:R=>{$?.push(R);},nextLineId:(R,X,D,ae)=>(He+=1,cx(R,X,D,ae)),pageOccurrenceKey:()=>String(U.length),styleCascade:l,listItems:d,...c!==void 0?{defaultTabStopPt:c}:{},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:true,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},...t.drawingTokenForParagraph?{drawingTokenForParagraph:t.drawingTokenForParagraph}:t.drawingLayoutToken?{drawingLayoutToken:t.drawingLayoutToken}:{},...t.inlineDrawingLayout?{anchorFrameBase:Bl,pageContentClip:df,layoutTextboxStoryFor:uf,publishAnchoredDrawings:ui,collectAnchoredDrawings:ui,columnBoxForParagraph:Cl,pageExclusionZones:()=>t.drawingExclusionZonesByPage?.get(U.length)??Object.freeze([]),paragraphOrderIndex:R=>Ke.get(R),onAnchorShift:(R,X)=>hc(H,R,X),onAnchorRepublish:(R,X)=>{for(let D=H.length-1;D>=0;D-=1)H[D].anchorParagraphId===R&&H.splice(D,1);H.push(...X);}}:{},borderOwnershipBudget:Ls(),vMergeResolveBudget:mu(),displayMode:u},Ml=R=>Us(d?.get(R.paragraph.id)??R.listItem,R.indent,i,R.tabStops,R.available),El=(R,X,D=0)=>{let ae=R.paragraph.id,ue=!(m?.has(ae)??false)&&((p?.has(ae)??false)||(g?.has(ae)??false)),ce=R.available,q=dr(),Z=(t.drawingExclusionZonesByPage?.get(U.length)??Object.freeze([])).filter(sn=>{let de=Ke.get(R.paragraph.id),ze=Ke.get(sn.anchorParagraphId);if(de!==void 0&&ze!==void 0){if(ze>de)return false}else {let Be=ye.findIndex(De=>De.kind==="paragraph"&&De.paragraph.id===sn.anchorParagraphId);if(Be<0||Be>X)return false}return !(yt>1&&sn.columnIndex!==se)}),Se=mt(Z),Ie=t.drawingTokenForParagraph?.(R.paragraph)??t.drawingLayoutToken??(t.inlineDrawingLayout?"drawing":void 0),ve=s$1&&!ue?Se||Ie?Ir({paragraph:R.paragraph,properties:R.props,width:ce,producer:x,...Ie?{drawingToken:Ie}:{},...Se?{exclusionToken:`${se}|${W.toFixed(3)}|${Se}`}:{},...D>0?{startOffset:D}:{}}):D===0?R.key:`${R.key}|from:${D}`:null,Oe=yt>1;return Is(R.paragraph,ae,R.indent.left,ce,i,s$1,ve,R.inheritedRunProperties,R.tabStops,void 0,l?(sn,de)=>Lt(sn,de,l):void 0,{lineSpacing:R.lineSpacing,equationCacheToken:x,firstLineOffset:D===0?Ml(R):0,startOffset:D,marginExtent:{left:0,right:R.indent.left+ce+R.indent.right},...t.projectLink?{projectLink:t.projectLink}:{},...t.projectFieldLink?{projectFieldLink:t.projectFieldLink}:{},...t.documentProperties?{documentProperties:t.documentProperties}:{},bodyPageFields:true,displayMode:u,...t.noteMarks?{noteMarks:t.noteMarks}:{},...t.inlineDrawingLayout?{inlineDrawingLayout:t.inlineDrawingLayout}:{},contentLeft:Oe?q:0,contentRight:Oe?q+We():R.indent.left+ce+R.indent.right,paragraphStartY:W,...Z.length>0?{pageExclusionZones:Z}:{},...ue?{suppressEmptyPlaceholderLine:true}:{},...l?{themeFonts:l.themeFonts}:{},markRunProperties:R.markRunProperties})},ff=(R,X)=>(t.drawingExclusionZonesByPage?.get(U.length)??Object.freeze([])).filter(ae=>{let me=Ke.get(R.paragraph.id),ue=Ke.get(ae.anchorParagraphId);if(me!==void 0&&ue!==void 0){if(ue>me)return false}else {let ce=ye.findIndex(q=>q.kind==="paragraph"&&q.paragraph.id===ae.anchorParagraphId);if(ce<0||ce>X)return false}return !(yt>1&&ae.columnIndex!==se||ae.anchorParagraphId===R.paragraph.id&&ae.input.mode==="topAndBottom")}),pf=(R,X,D,ae,me,ue,ce)=>{let q=ff(R,X);if(!t.inlineDrawingLayout||ae<=me)return q;let fe=Un(R.paragraph),Z=new Map,Se=0;for(let de=me;de<ae;de+=1){let ze=D[de];for(let De of fe.values())De>=ze.start&&De<ze.end&&Z.set(De,Se);let Be=ce.get(de)??D[de].exclusionSkipBefore??0;Se+=Be+D[de].height;}if(Z.size===0)return q;let Ie=yt>1,ve=R.available,Oe=dr(),sn=hs({paragraph:R.paragraph,paragraphId:R.paragraph.id,drawingLayout:t.inlineDrawingLayout,contentLeft:Ie?Oe:0,contentRight:Ie?Oe+We():R.indent.left+ve+R.indent.right,paragraphStartY:ue,anchorLineTopByModelStart:Z,columnIndex:se,displayMode:u});return Object.freeze([...q,...sn])},qx=(R,X,D,ae,me,ue,ce,q)=>{if(t.inlineDrawingLayout){let Ie=[...Un(R.paragraph).values()];if(Ie.length>0){let ve=Math.min(...Ie);if(ce.end<=ve||Ie.some(Oe=>Oe>=ce.start&&Oe<ce.end)&&ce.end<=ve+1)return 0}}let fe=pf(R,X,D,ae,me,ue,q),Z=fe.length>0?gt(W,ce.height,fe):0,Se=ce.exclusionSkipBefore??0;return Z>.001?Z:Se},Zx=R=>{let X=We(),D=Ao(R,X,0,l,u);if(!D||D.rows.length===0)return;let ae=D.columnWidthsPt.reduce((de,ze)=>de+ze,0),me=()=>D.float?wh(D.float,ae,B()):Fe()+Xa(D,We()),ue=me();D.float&&D.float.vertAnchor==="text"&&!D.float.ySpec&&(W=Math.max(0,Math.min(W+D.float.yPt,re())));let ce=[];for(let de of D.rows)if(de.isHeader)ce.push(de);else break;let q=0,fe=W,Z=[],Se=new Map,Ie=[],ve=()=>{if(Z.length===0)return;let de=Su(Z,D,Ie,_t.borderOwnershipBudget,_t.vMergeResolveBudget,void 0,(Be,De)=>{hc(H,Be,De);},_t),ze=de[de.length-1];on.push(rl({kind:"table",id:`${R.id}#f${q}`,tableId:R.id,fragmentIndex:q,rows:de,box:{x:ue,y:fe,width:D.columnWidthsPt.reduce((Be,De)=>Be+De,0),height:ze.box.y+ze.box.height-fe}},D.columnWidthsPt,0,Se)),q+=1,Z=[],Ie=[];},Oe=de=>{if(ce.length===0)return;let ze=0;for(let Be of ce)ze+=xu(Be,D.columnWidthsPt,ue,0,_t,D.cellSpacingPt);if(ze>re()+.001)throw new jn("table-row-overheight",`Table header group (${ce.length} row(s)) is taller than the page content box`);W+ze>re()+.001&&W>0&&(ve(),Uo(),ue=me(),fe=W);for(let Be of ce){let De=ei(Be,D.columnWidthsPt,ue,W,de,0,_t,D.cellSpacingPt);if(De.bottom>re()+.001)throw new jn("table-row-overheight",`Table header row ${Be.id} overflowed the page content box`);Z.push(De.record),Ie.push(Be),W=De.bottom;}},sn=de=>{ve(),Uo(),ue=me(),fe=W,Oe(true);};Oe(false);for(let de of D.rows.slice(ce.length)){let ze=xu(de,D.columnWidthsPt,ue,0,_t,D.cellSpacingPt),Be=hu(de),De=false,bt=0,Ue=false;for(ze<=re()+.001&&W+ze>re()+.001&&W>0&&(sn(),Ue=true);;){if(bt+=1,bt>al)throw new jn("table-row-fragment-limit",`Table row ${de.id} exceeded ${al} page fragments`);let zt=re()-W;if(zt<=.001&&W>0){if(Ue)throw new jn("table-row-overheight",`Table row ${de.id} cannot fit after repeated header rows`);sn(),Ue=true;continue}if(!De&&ze<=zt+.001){let xt=ei(de,D.columnWidthsPt,ue,W,false,0,_t,D.cellSpacingPt);if(xt.bottom>re()+.001)throw new jn("table-row-overheight",`Table row ${de.id} overflowed the page content box after placement`);Z.push(xt.record),Ie.push(de),W=xt.bottom;break}if(de.cantSplit||de.height.rule==="exact"){if(W>0&&!Ue){sn(),Ue=true;continue}throw new jn("table-row-overheight",de.height.rule==="exact"?`Table row ${de.id} has w:trHeight hRule=exact taller than the available page content`:`Table row ${de.id} has w:cantSplit and is taller than the available page content`)}let hn=bu(de,D.columnWidthsPt,ue,W,re(),false,De,0,_t,Be,D.cellSpacingPt);if(!hn.fitted&&W>0&&!Ue){sn(),Ue=true;continue}if(!hn.fitted)throw new jn(hn.nestedSplitBlocked?"table-row-split-unsupported":"table-row-overheight",hn.nestedSplitBlocked?`Table row ${de.id} contains a nested table taller than the page content box`:`Table row ${de.id} has content that cannot fit a page content box`);if(hn.bottom>re()+.001)throw new jn("table-row-overheight",`Table row ${de.id} overflowed the page content box`);let cr=hn.remainder!==null,jt=yy(de,De,cr);if(Z.push(hn.record),Ie.push(jt),W=hn.bottom,!cr)break;Be=hn.remainder,De=true,Ue=false,sn();}}ve();},Ht=false,Fl=ye.length,Nl=0;for(let R=wn;R<ye.length;R+=1){let X=ke(e[R],We());if(Ne[R]=un(),Wn&&nt>0&&R>=ye.length-nt){let ie=y.checkpoints[R+(y.keys.length-ye.length)];if(ie&&ie.cursorY===W&&ie.previousSpaceAfter===Pe&&ie.flowColumnIndex===se&&Jb(ie.pageFragments,on)&&Ju(ie.pendingAnchoredDrawings,H)&&Ju(ie.deferredAnchoredDrawings,Q)&&nx(ie.anchorPageDeferCounts,oe)){let le=U.length-ie.pageCount;if(Wy({delta:le,titlePage:w?.titlePage===true,evenAndOddHeaders:w?.evenAndOddHeaders===true,parityDependent:y.parityDependent,usedPageParity:K,markPageCount:ie.pageCount,hasNoteReserves:F!==void 0,hasExclusionZones:(t.drawingExclusionZonesByPage?.size??0)>0})){let Ln=le===0?Ge.pages.slice(ie.pageCount):Ge.pages.slice(ie.pageCount).map((bn,tt)=>ti(bn,U.length+tt,Ve(U.length+tt).y));U.push(...Ln),pe+=Ln.length,Ht=true,Fl=R,Nl=le,He+=y.endLineCounter-ie.lineCounter;break}}}if(Bn+=1,X.kind==="table"){Pe=0,$=[];try{Zx(X.table),Vm(X.table,$);}finally{$=null;}continue}let{paragraph:D,props:ae,spacing:me,contextualSpacing:ue,styleId:ce,borders:q,shading:fe,keeps:Z}=X,{indent:Se,alignment:Ie,markRunProperties:ve}=X,Oe=X.available,sn=R>0?ye[R-1]:void 0,de=ye[R+1],ze=ie=>ie?.kind==="paragraph"&&ie.styleId===ce&&ce!==null,Be=ue?{before:ze(sn)?0:me.before,after:ze(de)?0:me.after}:me,De=d?.get(D.id)??X.listItem,bt=Ml(X),Ue=D.id,zt=X.borderGroupKey,hn=ie=>zt!==""&&ie?.kind==="paragraph"&&ie.borderGroupKey===zt,cr=hn(sn),jt=hn(de),xt=cr?void 0:q.top,zr=jt?q.between:q.bottom,ur=Kt(xt),Sf=Kt(zr);Cd(ae)&&(on.length>0||U.length===0)&&(Hr(),Pe=0);let en=El(X,R);if(en.length===0)continue;let Qx=pl(D)!==void 0&&Ux(X,en),Rf=()=>Qx&&j===void 0&&Cn+1>=a.count,Al=ie=>{let le=ke(D,We());le.kind==="paragraph"&&(Se=le.indent,Ie=le.alignment,Oe=le.available,ve=le.markRunProperties,bt=ie===0?Ml(le):0,en=[...El(le,R,ie)]);};{let ie=io(Be.before,Pe),le=ve.length===0?ct:Ee(ve,l?.themeFonts),yn=en.length<=1?Sf+Be.after:0,Ln=W+ie+ur,bn=pf(X,R,en,0,0,Ln,new Map),tt=en[0]?kc(Ln,en[0],bn,yn):i.lineMetrics(le).height+yn,Wt=ie+ur+tt;if(Z.keepNext&&!Rn[R-1]){let nn=Ng(ye,R,Pe,St=>{let rt=ye[St];return rt?.kind==="paragraph"?El(rt,St).map($n=>$n.height):[]});nn!==null&&nn+ur<=re()&&(Wt=Math.max(Wt,nn+ur));}W+Wt>re()&&W>0&&!Rf()&&(Uo(),Pe=0,Al(0));}let eS=W===0&&!S(),Dl=Nd(Be.before,Pe,eS,an);Dl>0&&(W+=Dl),ur>0&&(W+=ur),an=false;let fr=0,Le=[],wf=en[0]?.start??0,jr=Dl,pr=ur,_l=false,qo=W,Pf=0,fi=new Map;Pe=0;let If=t.inlineDrawingLayout!==void 0&&zn(X.paragraph,t.inlineDrawingLayout).length>0,vf=false,Hl=null,nS=So(X.paragraph),Tf=Os(X.paragraph),kf=Tf?$s(Tf):null,tS=()=>{let ie=Le[0];if(!ie)return 0;let le=Pf;if(le<=.001)return 0;let yn=gt(qo,ie.box.height,ff(X,R));return Math.max(0,le-yn)},pi=ie=>{if(Le.length===0)return;let le=Fe(),yn=dr(),Ln=Le[0].box.y,bn=Ln-jr-pr,tt=Le[Le.length-1].box.y+Le[Le.length-1].box.height,Wt=ie?Be.after:0,nn=[],St,rt=Ln,$n=tt,$t=q.left?In(q.left):0,Jo=q.right?In(q.right):0,Gr=q.left?le+Se.left-q.left.spacePt-$t:le+Se.left,jl=q.right?le+Se.left+Oe+q.right.spacePt+Jo:le+Se.left+Oe,Wr=Math.max(jl-Gr,0);if(pr>0&&xt){let fn=In(xt),ot=Ln-xt.spacePt-fn;nn.push({side:"top",edge:xt,box:{x:Gr,y:ot,width:Wr,height:fn}}),rt=ot;}if(ie&&zr){let fn=In(zr),ot=tt+zr.spacePt,Xt={x:Gr,y:ot,width:Wr,height:fn};nn.push({side:jt?"between":"bottom",edge:zr,box:Xt}),jt||(St={edge:zr,box:Xt}),$n=ot+fn;}ie&&(W=Math.max(W,$n+Wt));let $r=Math.max($n+Wt-bn,0),Ce=cr&&fr===0?bn:rt,Rt=jt&&ie?bn+$r:$n,Xr=Math.max(Rt-Ce,0);if(q.left&&nn.push({side:"left",edge:q.left,box:{x:le+Se.left-q.left.spacePt-$t,y:Ce,width:$t,height:Xr}}),q.right&&nn.push({side:"right",edge:q.right,box:{x:le+Se.left+Oe+q.right.spacePt,y:Ce,width:Jo,height:Xr}}),q.bar){let fn=In(q.bar);nn.push({side:"bar",edge:q.bar,box:{x:le+Se.left-q.bar.spacePt-fn,y:Ln,width:fn,height:Math.max(tt-Ln,0)}});}let Vr=kf?Xs(Le,kf):null,Yr=fr===0?qs(De,i,Le[0]?{y:Le[0].box.y,height:Le[0].box.height}:void 0):void 0,mi=Yr?{...Yr,box:{...Yr.box,x:Yr.box.x+le}}:void 0;if(on.push({kind:"paragraph",id:`${Ue}#f${fr}`,paragraphId:Ue,fragmentIndex:fr,range:Vr?Vr[Vr.length-1].range:{paragraphId:Ue,start:wf,end:Le[Le.length-1].range.end},props:ae,spacing:{before:jr,after:Wt},indent:Se,...St?{bottomBorder:St}:{},...nn.length>0?{borders:nn}:{},...fe===void 0?{}:{shading:fe,shadingBox:q.left||q.right?{x:Gr,y:rt,width:Wr,height:Math.max($n-rt,0)}:xa(Le,le+Se.left,Oe)},tabStops:X.tabStops,...mi?{marker:mi}:{},...ie&&f?as(nS,Ma(X.paragraph)):{},lines:Vr??Le,box:{x:yn+Se.left,y:bn,width:Oe,height:$r}}),t.inlineDrawingLayout&&If&&!vf){vf=true;let fn=[...Un(X.paragraph).values()],ot=fn.length>0&&fn.every(Mn=>Le.some(mr=>Mn>=mr.range.start&&Mn<mr.range.end)),Xt,gi,Gl;if(ot){let Mn=bn-tS();Xt=Le,gi={x:yn+Se.left,y:Mn,width:Oe,height:$r},Gl=Cl({x:yn+Se.left,y:Mn,height:$r});}else {let Mn=Hl??{columnX:yn,columnWidth:We(),startY:bn},mr=Mn.startY;Xt=en.map((Xn,rS)=>{let oS={id:`anchor-line-${rS}`,range:{paragraphId:Ue,start:Xn.start,end:Xn.end},box:{x:Mn.columnX+Se.left,y:mr,width:Oe,height:Xn.height},contentX:Xn.spans.length>0?Xn.spans[0].box.x+Mn.columnX:Mn.columnX+Se.left,baseline:Xn.baseline,leading:Xn.leading,trailingSpacing:Xn.trailingSpacing,spans:Xn.spans.map(Wl=>({...Wl,box:{...Wl.box,x:Wl.box.x+Mn.columnX,y:mr}}))};return mr+=Xn.height+(Xn.exclusionSkipBefore??0),oS});let Of=Mn.startY;gi={x:Mn.columnX+Se.left,y:Of,width:Oe,height:Math.max(mr-Of,Le[0]?.box.height??0)},Gl=Cl(gi);}ui(ko({paragraph:X.paragraph,paragraphId:Ue,paragraphBox:gi,lines:Xt,drawingLayout:t.inlineDrawingLayout,frameBase:Bl(),columnBox:Gl,cellBox:null,pageClip:df(),measurer:i,sourceOrderOf:Ll,layoutTextboxStory:uf,displayMode:u}));}fr+=1,wf=Le[Le.length-1].range.end,Le=[],jr=0,pr=0;},Gt=0,zl=0,Zo=en.length+8;for(let ie=0;ie<en.length;ie+=1){let le=en[ie],yn=ie===en.length-1,Ln=yn?Sf+Be.after:0;ie===Gt&&(qo=W,If&&Hl===null&&fr===0&&(Hl=Object.freeze({columnX:dr(),columnWidth:We(),startY:qo})));let bn=qx(X,R,en,ie,Gt,qo,le,fi),tt=bn+Math.max(0,le.height-le.trailingSpacing)+Ln;if(W+tt>re()&&!Rf()&&(Le.length>0||on.length>0||U.length>0)){let Ce=!S(),Rt=zl<Zo?Fg(ie,Gt,en.length,Z,Ce):ie,Xr=Rt<ie;for(let fn=ie;fn>Rt;fn-=1){Le.pop();let ot=en[fn-1],Xt=fi.get(fn-1)??ot.exclusionSkipBefore??0;fi.delete(fn-1),W-=ot.height+Xt,He-=1;}let Vr=Xr&&Le.length===0&&fr===0,Yr=en[Rt].start,mi=We();if(pi(false),Uo(),jr=0,Vr?W=pr:pr=0,We()!==mi){Al(Yr),Zo=Math.max(Zo,en.length+8),Gt=0,Xr&&(zl+=1),ie=-1;continue}if(Gt=Rt,qo=W,Xr){zl+=1,ie=Rt-1;continue}}let nn=dr();fi.set(ie,bn),W+=bn;let St=nn+Se.left+(ie===0?bt:0),rt=Math.max(1,Oe-(ie===0?bt:0)),$n=le.spans.map(Ce=>({...Ce,range:{...Ce.range,paragraphId:Ue},box:{...Ce.box,x:Ce.box.x+nn,y:W}})),$t=ws($n,i,St,rt,Ie,yn,Ie==="center"||Ie==="right"?le.width:void 0),Jo=$n.length>0&&$t.length>0?$t[0].box.x-$n[0].box.x:Ie!=="left"&&Ie!=="both"?(()=>{let Ce=rt-le.width;return Ce<=0?0:Ie==="center"?Ce/2:Ce})():0,Gr=Object.freeze({x:0,y:0,width:I,height:re()}),jl=le.drawings.map(Ce=>{let Rt=Object.freeze({...Ce,paragraphId:Ue,x:nn+Ce.x,y:W+Ce.y,advanceStart:Ce.advanceStart+nn,advanceEnd:Ce.advanceEnd+nn,paintBounds:Object.freeze({...Ce.paintBounds,x:nn+Ce.paintBounds.x,y:W+Ce.paintBounds.y}),hitBounds:Object.freeze({...Ce.hitBounds,x:nn+Ce.hitBounds.x,y:W+Ce.hitBounds.y})});return gs(Rt,Gr)}),Wr=Ps(jl,Jo),$r={id:cx(D.id,le.start,ie),range:{paragraphId:Ue,start:le.start,end:le.end},spans:$t,box:{x:dr()+Se.left,y:W,width:Oe,height:le.height},contentX:$t[0]?.box.x??St+Jo,baseline:le.baseline,leading:le.leading,trailingSpacing:le.trailingSpacing,...le.deletedRanges?{deletedRanges:le.deletedRanges}:{},...Wr.length>0?{drawings:Wr}:{},...le.anchorRevisions?{anchorRevisions:le.anchorRevisions}:{}};if(He+=1,Le.length===0&&(Pf=bn),Le.push($r),W+=le.height,le.columnBreakAfter){let Ce=We();if(pi(yn),Uo(),jr=0,pr=0,_l=true,!yn&&We()!==Ce){Al(le.end),Zo=Math.max(Zo,en.length+8),Gt=0,ie=-1;continue}Gt=ie+1;}else le.pageBreakAfter&&(pi(yn),Hr(),jr=0,pr=0,_l=true,Gt=ie+1);}pi(true),Pe=_l?0:Be.after;}Ht||(Ne[ye.length]=un());let mf=Ht&&y?y.endCursorY:W,gf=Ht&&y?y.endSpaceAfter:Pe,hf=!Ht&&(on.length>0||U.length===0),yf=Ht&&y?y.endsOpenPage:hf;hf&&Hr();let bf=0,Jx=xc*4+8;for(;(H.length>0||Q.length>0)&&bf<Jx;)bf+=1,H.length===0&&cf(),Hr();Q.length>0&&(H.push(...Q.map(R=>Ic(R,"page-defer-exhausted"))),Q=[],Hr()),et();let xf={revision:n,pages:U};if(y){y.previous=xf,y.checkpoints=Ht?[...Ne.slice(0,Fl),...y.checkpoints.slice(Fl+(y.keys.length-ye.length)).map(X=>Nl===0?X:{...X,pageCount:X.pageCount+Nl})]:Ne,y.keys=cn,y.context=U.length+1===T?Y:V(qu(F,A,U.length+1)),y.producer=x;let R=K||w?.evenAndOddHeaders===true;y.parityDependent=wn===0&&!Ht?R:y.parityDependent||R,y.startPageParity=G,y.startLineCounter=ee,y.endLineCounter=He,y.endCursorY=mf,y.endSpaceAfter=gf,y.endsOpenPage=yf,y.stats={placed:Bn,total:ye.length,reusedPages:pe,fullPasses:y.stats.fullPasses+(wn===0?1:0)};}return {layout:xf,pages:U,lineCounter:He,endCursorY:mf,endSpaceAfter:gf,endsOpenPage:yf}}function ux(e,n,t){let r=n.lefts.map(()=>t);for(let o of e.fragments){let a=0;for(let i=n.count-1;i>=0;i-=1)if(o.box.x+.5>=n.lefts[i]){a=i;break}r[a]=Math.max(r[a],o.box.y+o.box.height);}return r}var qT=.25,ZT=20;function Yo(e,n,t){let r=_u(t.sectionColumns??Qn.columns,t.geometry.width-t.geometry.margin.left-t.geometry.margin.right);if(!t.balanceColumns||r.count<2||t.columnRegionBottom!==void 0)return t.session&&(t.session.balanceLimit=null),_r(e,n,t);let o=t.session,a=t.flowStartY??0,{session:i,...s}=t,l=b=>{let h=b.pages[0],x=h?Math.max(...ux(h,r,a)):b.endCursorY;return o&&(o.endCursorY=x),{...b,endCursorY:x}};if(o&&o.balanceLimit!==null){let b=o.balanceLimit,h=_r(e,n,{...t,columnRegionBottom:b});if(o.stats.placed===0&&o.stats.reusedPages===h.pages.length)return o.balanceLimit=b,l(h)}let d=_r(e,n,s);if(d.pages.length!==1||!d.endsOpenPage)return o&&(o.balanceLimit=null),_r(e,n,t);let c=ux(d.pages[0],r,a),u=c.reduce((b,h)=>b+Math.max(0,h-a),0);if(u<=0)return o&&(o.balanceLimit=null),_r(e,n,t);let f=a+u/r.count,p=Math.max(...c)+.01,m=b=>{try{let h=_r(e,n,{...s,columnRegionBottom:b});return h.pages.length===1&&h.endsOpenPage}catch{return false}};for(let b=0;b<ZT&&p-f>qT;b+=1){let h=(f+p)/2;m(h)?p=h:f=h;}let g=_r(e,n,{...t,columnRegionBottom:p});return o&&(o.balanceLimit=p),l(g)}var gx="Calibri, Carlito, Helvetica, Arial, sans-serif",lN=new Map([["calibri","Carlito"]]),JT=65536,QT=256;function fx(e,n){return e===void 0?Math.max(1,Math.floor(n)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function px(e){let n=new Map,t=0;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>e;){let a=n.keys().next();if(a.done)break;n.delete(a.value),t+=1;}},get size(){return n.size},get evictions(){return t}}}var mx=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function hx(e=null){return e!=null&&typeof e.measureText=="function"}function yx(e={}){let n=e.scale??1;if(!(n>0)||!Number.isFinite(n))return null;let t=e.fallbackFamily??gx,r=e.context??null;if(!hx(r))return null;let o=r,a=px(fx(e.maxWidthEntries,JT)),i=px(fx(e.maxMetricsEntries,QT)),s=e.fontAlias,l=c=>{let u=c.fontFamily&&mx.test(c.fontFamily)?c.fontFamily:null,f=u?s?.(u):void 0,p=f&&mx.test(f)?f:null,m=u?p?`"${p}", "${u}", ${t}`:`"${u}", ${t}`:t,g=c.bold?"bold":"normal",b=c.italic?"italic":"normal",h=c.fontSizePt*(c.verticalAlign==="baseline"?1:.75)*n;return `${b} ${g} ${h}px ${m}`},d=(c,u,f)=>c/n*(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 b=o.measureText("Hxg"),h=b.fontBoundingBoxAscent,x=b.fontBoundingBoxDescent;if(typeof h=="number"&&Number.isFinite(h)&&h>0&&(g=h/n,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let w=(h+x)/n;w>0&&(m=w);}m>0||(m=u*1.15);let I={height:m,baseline:g};return i.set(f,I),I}}}function ek(e=1,n={}){let t=yx({...n,scale:n.scale??e});return t?{measurer:t,producer:n.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:Pl(),producer:"fixed-measurer"}}function nk(e){return e.box}function bx(e,n){if(e.kind==="paragraph"){n.add(e.paragraphId);return}for(let t of e.rows)for(let r of t.cells)for(let o of r.blocks)bx(o,n);}function tk(e){let n=new Map,t=(o,a,i)=>{if(!(o.kind==="textValue"||i>ue*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let l of r)n.get(l)?.push(s.id);t(s,s.id,i+1);continue}if(s.kind==="contentControl"){n.set(s.id,[]),r.push(s.id);let l=Ee$1(s);l&&t(l,a,i+1),r.pop();let d=n.get(s.id);d&&d.length===0&&a!==null&&d.push(a);continue}t(s,a,i+1);}}},r=[];return t(e,null,0),n}function rk(e,n){let t=Math.min(e.x,n.x),r=Math.min(e.y,n.y);return {x:t,y:r,width:Math.max(e.x+e.width,n.x+n.width)-t,height:Math.max(e.y+e.height,n.y+n.height)-r}}function ok(e,n){let t=Ie(e.root);if(t.length===0)return ak;let r=new Map;n.pages.forEach((i,s)=>{(d=>{for(let c of d){let u=new Set;bx(c,u);for(let f of u){let p=r.get(f)??[];p.push({pageIndex:s,box:nk(c)}),r.set(f,p);}}})(i.fragments);});let o=tk(e.root),a=[];for(let i of t){let s=Ge(i.node),l=[...i.ancestors.map(f=>Ge(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?rk(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:He(i.node),depth:i.depth,lock:s.lock,effectiveLock:Le(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 ak=Object.freeze([]);function Sx(e,n,t){let r=e.lines?.find(o=>{let a=o.spans;if(!a)return t<o.range.end;let i=a.filter(s=>s.range.paragraphId===n);return i.length===a.length?t<o.range.end:i.length>0&&t<i[i.length-1].range.end});return r?r.box.y:e.fragmentY}function hk(e,n){let t=new Map;for(let r of e.pages)for(let[o,a]of yk(r,n))t.has(o)||t.set(o,a);return t}var xx=new WeakMap;function yk(e,n){let t=xx.get(n);t||(t=new WeakMap,xx.set(n,t));let r=t.get(e);if(r)return r;let o=new Map;for(let a of n(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 t.set(e,o),o}function bk(e,n){let t=Sg$1(e);if(!t)return null;let r=n.get(t.start.paragraphId);return r?{pageIndex:r.pageIndex,y:r.contentY+Sx(r,t.start.paragraphId,t.start.offset)}:null}var Rx=e=>e.verticalAlign==="baseline"?1:.75;function nf(e){let n=Math.round(e.fontSizePt*2);return Math.max(1,n)}function xk(e){let{shaper:n,resolveFont:t,fallback:r,shapingLibrary:o,unicodeDataVersion:a,fixedPointScale:i=1e3,script:s="Latn",language:l="en"}=e,d=new WeakMap,c=new WeakMap,u=new WeakMap,f=g=>{let b=u.get(g);if(b!==void 0)return b;let h=t(g);return u.set(g,h),h},p=(g,b)=>{let h=d.get(g);h||(h=new Map,d.set(g,h));let x=h.get(b);return x||(x=new Map,h.set(b,x)),x},m=(g,b,h)=>n.shape({text:g,fontSizeHalfPoints:nf(h),bidiLevel:0,environment:hr({font:b,variationAxes:{},shapingLibrary:o,unicodeDataVersion:a,normalization:"none",script:s,language:l,direction:"ltr",features:{},fallbackOrder:[],fixedPointScale:i,roundingMode:"halfToEven"})});return {measure(g,b){if(g.length===0)return 0;let h=f(b);if(!h)return r.measure(g,b);let x=p(h,nf(b)),I=x.get(g);if(I===void 0){let w=0;try{for(let O of m(g,h,b).glyphs)w+=O.advanceX;}catch{return r.measure(g,b)}I=w/i,x.set(g,I);}return I*Rx(b)*(b.horizontalScalePercent/100)+g.length*b.characterSpacingPt},lineMetrics(g){let b=f(g);if(!b)return r.lineMetrics(g);let h=Rx(g),x=c.get(b);x||(x=new Map,c.set(b,x));let I=nf(g),w=x.get(I);if(w)return h===1?w:{height:w.height*h,baseline:w.baseline*h};let O,M=true;try{let P=m(" ",b,g),L=P.metrics.ascent/i,C=P.metrics.descent/i,k=L+C;k>0?O={height:k,baseline:L}:(O=r.lineMetrics(g),M=!1);}catch{O=r.lineMetrics(g),M=false;}return M?(x.set(I,O),h===1?O:{height:O.height*h,baseline:O.baseline*h}):O}}}function Sk(e){let{layout:n,viewport:t}=e,r=new Set;if(!t){for(let l of n.pages)r.add(l.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=t.top+t.height,i=-1,s=-1;for(let l of n.pages){let d=l.box.y;d+l.box.height>=t.top&&d<=a&&(i===-1&&(i=l.index),s=l.index);}if(i===-1){let l=Rk(n,t.top);l!==null&&(i=l,s=l);}if(i!==-1){let l=Math.max(0,i-o),d=Math.min(n.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<n.pages.length&&r.add(l);return r}function Rk(e,n){let t=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=n<o.box.y?o.box.y-n:n>o.box.y+o.box.height?n-(o.box.y+o.box.height):0;a<r&&(r=a,t=o.index);}return t}var wx=["text-local","paragraph-local","flow-structural","global"];function Px(e,n){return wx.indexOf(n)>wx.indexOf(e)?n:e}function wk(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function Pk(e){let{run:n,currentRevision:t,publish:r,schedule:o}=e,a=null,i=null,s=null,l=0,d=0;function c(b){let h=e.runCooperatively;if(!h)return n(b);let x=h(b);s=x;try{for(;;){let I=x.step();if(I)return I;if(t()!==b.revision)return x.cancel(),d+=1,null;if(s!==x)return null}}finally{s===x&&(s=null);}}function u(b){let h=p(t());h.impact=Px(h.impact,b.impact),h.structural=h.structural||b.structural;for(let x of b.paragraphIds)h.paragraphIds.add(x);for(let x of b.created)h.created.add(x);for(let x of b.deleted)h.deleted.add(x);for(let x of b.dependencyKeys)h.dependencyKeys.add(x);}let f=b=>({impact:b.impact,paragraphIds:b.paragraphIds,created:b.created,deleted:b.deleted,dependencyKeys:b.dependencyKeys,structural:b.structural,revision:b.revision});function p(b){return a||(a=wk(b)),a.revision=Math.max(a.revision,b),a}function m(){!o||i||(i=o(()=>{i=null,g();}));}function g(){i&&(i(),i=null),s&&(s.cancel(),s=null,d+=1);let b=a;if(!b)return false;a=null;let h=f(b),x=c(h);return !x||x.revision!==t()?(l+=1,u(h),m(),false):(r(x,h),true)}return {notify(b){let h=p(t());h.impact=Px(h.impact,b.impact);for(let x of b.dirty)h.paragraphIds.add(x);for(let x of b.created)h.created.add(x),h.paragraphIds.add(x);for(let x of b.deleted)h.deleted.add(x),h.paragraphIds.add(x);for(let x of b.dependencyKeys)h.dependencyKeys.add(x);for(let x of b.splitJoin)h.structural=true,"split"in x?(h.paragraphIds.add(x.split.from),h.paragraphIds.add(x.split.tail)):(h.paragraphIds.add(x.join.kept),h.paragraphIds.add(x.join.removed));(b.impact==="flow-structural"||b.impact==="global")&&(h.structural=true),m();},invalidateAll(b,h){let x=p(b);x.impact="flow-structural",x.structural=true,h&&x.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 ir(e,n,t,r){let o=r?r.spans:e.spans;for(let i of r?r.drawings:e.drawings??[]){if(n===i.start)return i.advanceStart;if(n===i.start+1)return i.advanceEnd}let a=r?r.spans[0]?.box.x??e.contentX:e.contentX;for(let i of o){if(n<=i.range.start)return i.box.x;if(n>=i.range.end){a=i.box.x+i.box.width;continue}return tl(i,n,t)}return a}function Tx(e,n,t){return kx(e,n,t,true)}function ON(e,n,t){return kx(e,n,t,false)}var Ix=new WeakMap,vx=new WeakMap;function Ik(e){let n=Ix.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let o of $e(r))for(let a of o.lines)for(let i of dn(a)){let s=t.get(i.paragraphId);(!s||i.end>s.end||i.end===s.end&&i.start>s.start)&&t.set(i.paragraphId,{end:i.end,start:i.start});}return Ix.set(e,t),t}function vk(e){let n=vx.get(e);if(n)return n;let t=new Map(e.map((r,o)=>[r,o]));return vx.set(e,t),t}function Tk(e){return Math.max(3,Math.min(8,e*.25))}function kx(e,n,t,r){let o=tf(n,t);if(!o)return [];let a=vk(t),i=a.get(o.from.paragraphId),s=a.get(o.to.paragraphId),l=Ik(e),d=[];for(let c of e.pages)for(let u of $e(c))for(let f of u.lines){let p=dn(f);for(let[m,g]of p.entries()){let b=Ho(e,g,o.from,o.to),h=a.get(g.paragraphId),x=l.get(g.paragraphId),I=i!==void 0&&s!==void 0&&h!==void 0&&h>=i&&h<s&&x?.end===g.end&&x.start===g.start&&m===p.length-1;if((!r||!b)&&!I)continue;let w=r&&b?ir(f,b.start,void 0,g):null,O=r&&b?ir(f,b.end,void 0,g):null,M=I?ir(f,g.end,void 0,g):null,P=M!==null?M+Tk(Math.max(0,f.box.height-f.leading-(f.trailingSpacing??0))):null,L=[w,O,M,P].filter(z=>z!==null),C=Math.min(...L),k=Math.max(...L);d.push({pageIndex:c.index,x:C,y:f.box.y,width:k-C,height:f.box.height});}}return d}function Ox(e,n,t){let r=new Map;if(n.length===0)return r;for(let o of e.pages)if(!(t&&!t.has(o.index)))for(let a of $e(o))for(let i of a.lines)for(let s of dn(i))for(let l of n){let d=Ho(e,s,l.from,l.to);if(!d)continue;let c=ir(i,d.start,void 0,s),u=ir(i,d.end,void 0,s),f=r.get(l.key)??[];f.push({pageIndex:o.index,x:Math.min(c,u),y:i.box.y,width:Math.abs(u-c),height:i.box.height}),r.set(l.key,f);}return r}function rf(e){let n=new Map;for(let t=0;t<e.length;t+=1){let r=e[t].position,o=n.get(r.paragraphId);o||(o=new Map,n.set(r.paragraphId,o)),o.has(r.offset)||o.set(r.offset,t);}return {stops:e,index:n}}var Il=class{#n=new WeakMap;#s=new WeakMap;get(n,t,r,o){let a;if(!r)a=this.#n.get(n)??new Map,this.#n.has(n)||this.#n.set(n,a);else {let l=this.#s.get(n);l||(l=new WeakMap,this.#s.set(n,l)),a=l.get(r)??new Map,l.has(r)||l.set(r,a);}let i=a.get(t);if(i)return i;let s=o();return a.set(t,s),s}};function Cx(e){let n=[],t=new Set;for(let r of e)t.has(r.lineId)||(t.add(r.lineId),n.push(r.lineId));return n}function Bx(e,n,t){let r=null;for(let o of e)o.lineId===n&&(!r||Math.abs(o.x-t)<Math.abs(r.x-t))&&(r=o);return r}function li(e,n){let t=null;for(let r of e)r.position.paragraphId===n.paragraphId&&(!t||Math.abs(r.position.offset-n.offset)<Math.abs(t.position.offset-n.offset))&&(t=r);return t}function of(e,n,t){let r=null;for(let o of e){if(o.position.paragraphId!==n.paragraphId)continue;let a=o.position.offset;t===1?a>n.offset&&(!r||a<r.position.offset)&&(r=o):a<n.offset&&(!r||a>r.position.offset)&&(r=o);}return r}function Lx(e,n,t){let r=t.index.get(e.paragraphId)?.get(e.offset),o=r===void 0?li(t.stops,e):t.stops[r];if(!o)return null;let a=o.lineId,i=t.stops.filter(s=>s.lineId===a);return (n===-1?i[0]:i[i.length-1])?.position??null}function Mx(e,n,t,r,o){let a=o(e.paragraphId),i=a.index.get(e.paragraphId)?.get(e.offset);if(i===void 0){let c=of(a.stops,e,n);if(c)return {position:c.position,desiredX:null}}else {let c=i+n;if(c>=0&&c<a.stops.length)return {position:a.stops[c].position,desiredX:null}}let s=t[r+n];if(!s)return {position:e,desiredX:null};let l=o(s).stops,d=n===-1?l[l.length-1]:l[0];return d?{position:d.position,desiredX:null}:null}function Ex(e,n,t){let r=e===-1?n[0]:n[n.length-1];if(!r)return null;let o=t(r).stops;return (e===-1?o[0]:o[o.length-1])?.position??null}function Fx(e,n,t,r,o,a){let i=a(e.paragraphId),s=i.index.get(e.paragraphId)?.get(e.offset),l=s===void 0?li(i.stops,e):i.stops[s];if(!l)return null;let d=t??l.x,c=Cx(i.stops),u=c.indexOf(l.lineId),f=c[u+n];if(f){let m=Bx(i.stops,f,d);return m?{position:m.position,desiredX:d}:null}for(let m=o+n;m>=0&&m<r.length;m+=n){let g=a(r[m]),b=Cx(g.stops),h=n===-1?b[b.length-1]:b[0];if(!h)continue;let x=Bx(g.stops,h,d);if(x)return {position:x.position,desiredX:d}}let p=n===-1?i.stops[0]:i.stops[i.stops.length-1];return p?{position:p.position,desiredX:d}:null}var Nx=new WeakMap,Ax=new WeakMap;function Fn(e){let n=Nx.get(e);if(n)return n;let t=new Map;for(let r of e.pages)for(let[o,a]of kk(r)){let i=t.get(o);i?i.push(...a):t.set(o,[...a]);}return Nx.set(e,t),t}function kk(e){let n=Ax.get(e);if(n)return n;let t=new Map,r=(a,i)=>{for(let s of dn(a)){let l={line:a,pageIndex:i},d=t.get(s.paragraphId);d?d.push(l):t.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 $e(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 Ax.set(e,t),t}function FN(e,n,t){let r=Fn(e).get(n);if(r&&r.length>0){let o=fa(e,n,t,r.map(a=>a.line));if(o)return o}return fa(e,n,t)}var Dx=new WeakMap;function af(e,n){let t=Dx.get(e);t||(t=new Map,Dx.set(e,t));let r=t.get(n);if(r)return r;let o=[];for(let{line:i}of Fn(e).get(n)??[])if(i.range.paragraphId===n)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 t.set(n,a),a}function _x(e,n){for(let t of e)if(n>t.start&&n<t.end)return true;return false}function Hx(e,n){for(let t of af(e,n.paragraphId))if(n.offset>t.start&&n.offset<t.end)return {paragraphId:n.paragraphId,offset:t.end};return n}var Ok=/[\p{L}\p{N}_'\u2019]/u;function di(e,n,t,r=Ck){let o=i=>{let s=e[i];return s!==void 0&&Ok.test(s)},a=Math.max(0,Math.min(n,e.length));if(t===-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 Ck=new Set;function Bk(e,n,t){let r=Fn(e).get(n.range.paragraphId)??[],o=false;for(let a of r){if(a.line===n){o=true;continue}if(o&&a.line.range.start===t)return true}return false}function Lk(e,n,t){for(let{line:r}of Fn(e).get(n)??[])if(r.range.start===t&&r.drawings?.some(o=>o.start===t))return r;return null}function Mk(e,n,t){for(let r of t?t.spans:e.spans)if(!(n<=r.range.start||n>=r.range.end)&&(r.projected||r.text.length!==r.range.end-r.range.start))return true;return false}function Gx(e){let n=e.spans[e.spans.length-1]?.text;return n===`
16
+ `||n===Yb$1}function Ek(e,n){if(n.end-n.start!==1||!e.drawings?.some(t=>t.start===n.start))return false;for(let t of n.spans)if(t.range.end>t.range.start)return false;return true}function kl(e,n,t,r,o,a,i){for(let s of dn(t))i!==void 0&&s.paragraphId!==i||Fk(e,n,t,s,r,o,a);}function Fk(e,n,t,r,o,a,i){let s=dn(t).length>1,l=af(n,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&&Gx(t)&&Bk(n,t,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}Mk(t,c,r)||_x(l,c)&&!d(c)||e.push({position:{paragraphId:r.paragraphId,offset:c},x:ir(t,c,i,r),y:t.box.y,height:t.box.height,lineId:t.id,pageIndex:o});}}function Wx(e,n,t,r,o){for(let a of n){if(a.kind==="paragraph"){for(let i of a.lines)kl(r,e,i,t,a.range.start,o);continue}for(let i of a.rows)if(!i.isHeaderRepeat)for(let s of i.cells)Wx(e,s.blocks,t,r,o);}}var Nk=new Il;function $x(e,n){let t=[];for(let r of e.pages)for(let o of $e(r))for(let a of o.lines)kl(t,e,a,r.index,o.range.start,n);return t}function Ak(e,n,t){let o=(Fn(e).get(n.paragraphId)??[]).find(({line:i})=>{let s=ht(i,n.paragraphId);return s!==null&&n.offset>=s.start&&n.offset<=s.end});if(!o||dn(o.line).length<2)return null;let a=[];return kl(a,e,o.line,o.pageIndex,0,t),rf(a)}function vl(e,n,t){return Nk.get(e,n,t,()=>{let r=[];for(let{line:o,pageIndex:a}of Fn(e).get(n)??[])kl(r,e,o,a,0,t,n);return rf(r)})}function Dk(e,n,t,r){if(!e.pages[n])return [];let o=[];return Wx(e,t,n,o,r),o}function _k(e){return e?typeof e.measure=="function"?{measurer:e}:e:{}}function Hk(e,n,t){let r=e.pages[n];if(!r)return [];let o=[];for(let a of $e(r,true))if(a.paragraphId===t)for(let i of a.lines)o.push({line:i,pageIndex:n});return o}function Xx(e,n,t){let r=_k(t),o=Fn(e).get(n.paragraphId)??[],a=r.preferredPageIndex,i=a===void 0?[]:Hk(e,a,n.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=ht(f,n.paragraphId);if(!m||n.offset<m.start||n.offset>m.end)continue;if(n.offset===m.end&&n.offset>m.start&&dn(f).length===1&&(Gx(f)||Ek(f,m))){u??={line:f,pageIndex:p};continue}if(n.offset===m.end&&n.offset>m.start&&Lk(e,n.paragraphId,n.offset))continue;let g=Ja(f,n.offset,r.measurer,m);return {position:n,x:g.x,y:g.y,height:g.height,lineId:f.id,pageIndex:p}}if(u){let f=Ja(u.line,n.offset,r.measurer,ht(u.line,n.paragraphId));return {position:n,x:f.x,y:f.y,height:f.height,lineId:u.line.id,pageIndex:u.pageIndex}}return null}function zk(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return Qs(e,t,n)?.caret??null}function jk(e,n){let t=n.pageIndex!==void 0&&e.pages[n.pageIndex]?n.pageIndex:0;return nl(e,t,n)}function Gk(e){return Ni(e)}var zx=new WeakMap;function Tl(e,n){let t=zx.get(e);return t||(t=new Map,e.forEach((r,o)=>{t.has(r)||t.set(r,o);}),zx.set(e,t)),t.get(n)??-1}function tf(e,n){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 t=Tl(n,e.anchor.paragraphId),r=Tl(n,e.head.paragraphId);return t===-1||r===-1?null:t<r||t===r&&e.anchor.offset<=e.head.offset?{from:e.anchor,to:e.head}:{from:e.head,to:e.anchor}}function Ko(e,n){let t=[],r=new Set;for(let{line:a}of Fn(e).get(n)??[]){let i=ht(a,n);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," ");t.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),t.push({start:l,text:"\uFFFC"}));}}}t.sort((a,i)=>a.start-i.start);let o="";for(let a of t)a.start>o.length&&(o+=" ".repeat(a.start-o.length)),o=o.slice(0,a.start)+a.text;return o}function sf(e,n){let t=new Set;for(let{line:r}of Fn(e).get(n)??[]){let o=ht(r,n);if(o)for(let a of o.spans)a.range.end!==a.range.start&&a.revisions?.some(i=>i.kind==="delete"||i.kind==="moveFrom")&&(t.add(a.range.start),t.add(a.range.end));}return t}function jx(e,n,t,r){let o=Lr(e),a=Ka(e).get(n.paragraphId);return a===void 0?null:Mx(n,t,o,a,i=>vl(e,i,r))}function Wk(e,n,t,r=null,o={}){if(!o.stops&&(t==="left"||t==="right"))return jx(e,n,t==="left"?-1:1,o.measurer);if(!o.stops&&(t==="wordLeft"||t==="wordRight")){let l=t==="wordLeft"?-1:1,d=di(Ko(e,n.paragraphId),n.offset,l,sf(e,n.paragraphId));return d===n.offset?jx(e,n,l,o.measurer):{position:{paragraphId:n.paragraphId,offset:d},desiredX:null}}if(!o.stops&&(t==="lineStart"||t==="lineEnd")){let l=Lx(n,t==="lineStart"?-1:1,Ak(e,n,o.measurer)??vl(e,n.paragraphId,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="documentStart"||t==="documentEnd")){let l=Ex(t==="documentStart"?-1:1,Lr(e),d=>vl(e,d,o.measurer));return l?{position:l,desiredX:null}:null}if(!o.stops&&(t==="up"||t==="down")){let l=Ka(e).get(n.paragraphId);return l===void 0?null:Fx(n,t==="up"?-1:1,r,Lr(e),l,d=>vl(e,d,o.measurer))}let a=o.stops?[...o.stops]:$x(e,o.measurer);if(a.length===0)return null;let i=a.findIndex(l=>l.position.paragraphId===n.paragraphId&&l.position.offset===n.offset);if(i===-1){if(t==="left"||t==="right"){let d=of(a,n,t==="left"?-1:1)??li(a,n);return d?{position:d.position,desiredX:null}:null}let l=li(a,n);if(!l)return null;i=a.indexOf(l);}let s=a[i];switch(t){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=Ko(e,n.paragraphId),d=t==="wordLeft"?-1:1,c=di(l,n.offset,d,sf(e,n.paragraphId));return c===n.offset?{position:a[d===-1?Math.max(0,i-1):Math.min(a.length-1,i+1)].position,desiredX:null}:{position:{paragraphId:n.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+(t==="pageUp"?-1:1),c=a.filter(p=>p.pageIndex===d);if(c.length===0)return {position:(t==="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=t==="up"?u-1:u+1;if(f<0||f>=d.length)return {position:(t==="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 $k(e,n){return Xx(e,n)}function Xk(e,n,t){let r=tf(n,t);if(!r)return [];if(r.from.paragraphId===r.to.paragraphId&&r.from.offset===r.to.offset)return Vk(e,r.from);let o=[];if(r.from.paragraphId===r.to.paragraphId){for(let{line:l}of Fn(e).get(r.from.paragraphId)??[]){let d=ht(l,r.from.paragraphId);if(!d)continue;let c=Ho(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=Fn(e),i=Tl(t,r.from.paragraphId),s=Tl(t,r.to.paragraphId);if(i===-1||s===-1)return [];for(let l=i;l<=s;l+=1)for(let{line:d}of a.get(t[l])??[]){let c=ht(d,t[l]);if(!c)continue;let u=Ho(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 Vk(e,n){let t=null;for(let{line:r}of Fn(e).get(n.paragraphId)??[])for(let o of ht(r,n.paragraphId)?.spans??[]){if(o.range.start<n.offset&&n.offset<=o.range.end)return [o];t===null&&o.range.start===n.offset&&(t=o);}return t?[t]:[]}var Vx=new WeakMap;function lr(e){let n=Vx.get(e);if(n)return n;let t=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),t.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 b of m.cells)t.get(f).push({pageIndex:l,tableId:f,row:m,cell:b,rowIndex:g,isHeaderRepeat:m.isHeaderRepeat,offsetX:d,offsetY:c}),a(b.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 t)i.set(s,{placed:l,rows:r.get(s)??new Map});return Vx.set(e,i),i}function Yx(e){let n=0;for(let t of e.rows.values())for(let r of t)n=Math.max(n,sr(r).to+1);return n}var sr=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function Yk(e,n,t){if(n.tableId!==t.tableId)return null;let r=lr(e).get(n.tableId);if(!r)return null;let o=Math.min(n.rowIndex,t.rowIndex),a=Math.max(n.rowIndex,t.rowIndex),i=Math.min(sr(n).from,sr(t).from),s=Math.max(sr(n).to,sr(t).to),l=p=>{let{from:m,to:g}=sr(p);return g>=i&&m<=s},d=p=>(r.rows.get(p)??[]).some(m=>m.vMergeContinue&&l(m)),c=r.rows.size+Yx(r)+2;for(let p=0;!(p>c);p+=1){let m=false;for(let[g,b]of r.rows)if(!(g<o||g>a))for(let h of b){if(!l(h))continue;let{from:x,to:I}=sr(h);x<i&&(i=x,m=true),I>s&&(s=I,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}=sr(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:n.tableId,cellIds:u,rows:{from:o,to:a},columns:{from:i,to:s},text:Kk(e,n.tableId,u)}}function nA(e,n){return Kx(e,n,true)}function Ol(e,n){return Kx(e,n,false)}function Kx(e,n,t){let r=new Set(n),o=[],a=new Set;for(let i of lr(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let l of s.cell.blocks)t&&l.kind!=="paragraph"||ci(l,o,a);return o}function ci(e,n,t){if(e.kind==="paragraph"){for(let r of ar(e))t.has(r)||(t.add(r),n.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)ci(a,n,t);}function Kk(e,n,t){let r=Ol(e,t),o=r[0],a=r[r.length-1];return !o||!a?Uk(e,n):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Ko(e,a).length}}}function Uk(e,n){let t=lr(e).get(n);for(let o of t?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)ci(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 $e(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function qk(e){let n=[...$e(e)];for(let t of [e.header,e.footer])t&&n.push(...An(t.fragments));for(let t of [e.footnotes,e.endnotes])if(t)for(let r of t.notes)n.push(...An(r.fragments));return n}function Zk(e,n){let t=new Set(Ol(e,n)),r=[],o=new Set;for(let a of e.pages)for(let i of qk(a))if(t.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 Jk(e,n){let t=new Set(n),r=[];for(let o of lr(e).values())for(let a of o.placed)t.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 Qk(e,n){let t=lr(e).get(n.tableId);if(!t)return "";let r=new Set(n.cellIds),o=new Map,a=new Set;for(let i of t.placed){if(i.isHeaderRepeat||!r.has(i.cell.id)||a.has(i.cell.id))continue;a.add(i.cell.id);let s=Ol(e,[i.cell.id]).map(d=>Ko(e,d)).join(`
17
+ `),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=n.columns.from;d<=n.columns.to;d+=1)l.push(s.get(d)??"");return l.join(" ")}).join(`
18
+ `)}function lf(e,n){let t=null,r=-1;for(let[o,a]of lr(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let d of i.cell.blocks)ci(d,s,new Set);if(!s.includes(n))continue;let l=o.length;l<=r||(r=l,t={tableId:o,rows:a.rows.size,columns:Yx(a),rowIndex:i.rowIndex,columnIndex:i.cell.gridColumn});}return t}function tA(e,n,t){if(t){let a=lf(e,n);if(!a||a.tableId!==t.tableId)return null;let i=t.cellIds[0];if(!i)return null;let s=lr(e).get(t.tableId);if(!s)return null;for(let l of s.placed)if(l.cell.id===i)return {tableId:t.tableId,rowId:l.row.id,cellId:i,cellIds:t.cellIds,gridColumnIndex:l.cell.gridColumn,isHeaderRepeat:l.isHeaderRepeat};return null}let r=lf(e,n);if(!r)return null;let o=lr(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)ci(s,i,new Set);if(i.includes(n))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}export{ua as $,fm as $a,$a as $b,Qv as $c,zk as $d,Yn as A,Fd as Aa,bc as Ab,zI as Ac,zb as Ad,cR as B,io as Ba,Ss as Bb,Qs as Bc,jb as Bd,uR as C,Nd as Ca,vg as Cb,uM as Cc,Zu as Cd,fR as D,zi as Da,Ts as Db,jI as Dc,Rl as Dd,Mi as E,ba as Ea,kg as Eb,nl as Ec,Pl as Ed,mR as F,Ad as Fa,Tr as Fb,ay as Fc,UT as Fd,Sd as G,Dd as Ga,h0 as Gb,tl as Gc,gx as Gd,Ei as H,xa as Ha,Fo as Hb,Ja as Hc,lN as Hd,gR as I,zR as Ia,Bg as Ib,ev as Ic,hx as Id,hR as J,jR as Ja,Lt as Jb,mM as Jc,yx as Jd,yR as K,GR as Ka,za as Kb,gM as Kc,ek as Kd,wd as L,WR as La,Eg as Lb,hM as Lc,ok as Ld,_p as M,_d as Ma,Dg as Mb,yM as Mc,Sx as Md,Hp as N,so as Na,Mc as Nb,bM as Nc,hk as Nd,zp as O,zd as Oa,Mt as Ob,al as Oc,bk as Od,jp as P,jd as Pa,Cs as Pb,jn as Pc,xk as Pd,Gp as Q,Ra as Qa,Bs as Qb,VM as Qc,Sk as Qd,Wp as R,KR as Ra,Zg as Rb,Iu as Rc,Pk as Rd,RR as S,lo as Sa,_s as Sb,vu as Sc,Tx as Sd,wR as T,Gd as Ta,Hs as Tb,Tu as Tc,ON as Td,to as U,xr as Ua,zs as Ub,Ov as Uc,Ox as Ud,vR as V,JR as Va,_c as Vb,Vv as Vc,FN as Vd,Id as W,QR as Wa,nh as Wb,Yv as Wc,Hx as Wd,$e as X,Tt as Xa,Hc as Xb,ul as Xc,di as Xd,An as Y,qt as Ya,Or as Yb,Qn as Yc,$x as Yd,Td as Z,um as Za,Zn as Zb,db as Zc,Dk as Zd,CR as _,Ud as _a,Ws as _b,fl as _c,Xx as _d,ad as a,Kp as aa,qd as ab,Sh as ac,pl as ad,jk as ae,id as b,fa as ba,pm as bb,Rh as bc,eT as bd,Gk as be,sd as c,Ni as ca,kt as cb,Xa as cc,cb as cd,Ko as ce,Yt as d,pa as da,Zd as db,Ao as dc,ub as dd,sf as de,qr as e,Ai as ea,Qd as eb,Uc as ec,Ar as ed,Wk as ee,Ii as f,ma as fa,ct as fb,vh as fc,tT as fd,$k as fe,lS as g,Up as ga,Ee as gb,PI as gc,ai as gd,Xk as ge,it as h,Di as ha,er as hb,Do as hc,fb as hd,Yk as he,hr as i,ro as ia,Dn as ib,qc as ic,Xo as id,nA as ie,kp as j,Cd as ja,Iw as jb,Zc as jc,ii as jd,Ol as je,fd as k,Jp as ka,rc as kb,XL as kc,pb as kd,Zk as ke,Oi as l,ha as la,je as lb,tu as lc,oT as ld,Jk as le,uS as m,Qp as ma,Te as mb,Ya as mc,mb as md,Qk as me,sa as n,em as na,So as nb,Ah as nc,zu as nd,lf as ne,fS as o,ao as oa,Ma as ob,ru as oc,ml as od,tA as oe,pS as p,nm as pa,ic as pb,Ys as pc,gb as pd,Me as q,RO as qa,Tm as qb,Br as qc,hb as qd,GS as r,Bd as ra,Nw as rb,Ks as rc,si as rd,Cp as s,Ld as sa,Aw as sb,Lr as sc,yb as sd,rR as t,Md as ta,Kn as tb,Yh as tc,gl as td,Ci as u,Ed as ua,Pr as ub,dn as uc,Gu as ud,aR as v,It as va,lc as vb,rM as vc,Bb as vd,iR as w,ya as wa,Hm as wb,ar as wc,Wu as wd,sR as x,In as xa,Ir as xb,oM as xc,cT as xd,yd as y,Kt as ya,rP as yb,cu as yc,Vu as yd,xd as z,_R as za,lB as zb,Za as zc,bl as zd};